com.pulumi.awsnative.neptunegraph.kotlin.Graph.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.neptunegraph.kotlin
import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.neptunegraph.kotlin.outputs.GraphVectorSearchConfiguration
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
import com.pulumi.awsnative.neptunegraph.kotlin.outputs.GraphVectorSearchConfiguration.Companion.toKotlin as graphVectorSearchConfigurationToKotlin
/**
* Builder for [Graph].
*/
@PulumiTagMarker
public class GraphResourceBuilder internal constructor() {
public var name: String? = null
public var args: GraphArgs = GraphArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend GraphArgsBuilder.() -> Unit) {
val builder = GraphArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): Graph {
val builtJavaResource = com.pulumi.awsnative.neptunegraph.Graph(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Graph(builtJavaResource)
}
}
/**
* The AWS::NeptuneGraph::Graph resource creates an Amazon NeptuneGraph Graph.
*/
public class Graph internal constructor(
override val javaResource: com.pulumi.awsnative.neptunegraph.Graph,
) : KotlinCustomResource(javaResource, GraphMapper) {
/**
* Value that indicates whether the Graph has deletion protection enabled. The graph can't be deleted when deletion protection is enabled.
* _Default_: If not specified, the default value is true.
*/
public val deletionProtection: Output?
get() = javaResource.deletionProtection().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The connection endpoint for the graph. For example: `g-12a3bcdef4.us-east-1.neptune-graph.amazonaws.com`
*/
public val endpoint: Output
get() = javaResource.endpoint().applyValue({ args0 -> args0 })
/**
* Graph resource ARN
*/
public val graphArn: Output
get() = javaResource.graphArn().applyValue({ args0 -> args0 })
/**
* The auto-generated id assigned by the service.
*/
public val graphId: Output
get() = javaResource.graphId().applyValue({ args0 -> args0 })
/**
* Contains a user-supplied name for the Graph.
* If you don't specify a name, we generate a unique Graph Name using a combination of Stack Name and a UUID comprising of 4 characters.
* _Important_: If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
*/
public val graphName: Output?
get() = javaResource.graphName().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* Memory for the Graph.
*/
public val provisionedMemory: Output
get() = javaResource.provisionedMemory().applyValue({ args0 -> args0 })
/**
* Specifies whether the Graph can be reached over the internet. Access to all graphs requires IAM authentication.
* When the Graph is publicly reachable, its Domain Name System (DNS) endpoint resolves to the public IP address from the internet.
* When the Graph isn't publicly reachable, you need to create a PrivateGraphEndpoint in a given VPC to ensure the DNS name resolves to a private IP address that is reachable from the VPC.
* _Default_: If not specified, the default value is false.
*/
public val publicConnectivity: Output?
get() = javaResource.publicConnectivity().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Specifies the number of replicas you want when finished. All replicas will be provisioned in different availability zones.
* Replica Count should always be less than or equal to 2.
* _Default_: If not specified, the default value is 1.
*/
public val replicaCount: Output?
get() = javaResource.replicaCount().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The tags associated with this graph.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> tagToKotlin(args0) })
})
}).orElse(null)
})
/**
* Vector Search Configuration
*/
public val vectorSearchConfiguration: Output?
get() = javaResource.vectorSearchConfiguration().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> graphVectorSearchConfigurationToKotlin(args0) })
}).orElse(null)
})
}
public object GraphMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.neptunegraph.Graph::class == javaResource::class
override fun map(javaResource: Resource): Graph = Graph(
javaResource as
com.pulumi.awsnative.neptunegraph.Graph,
)
}
/**
* @see [Graph].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Graph].
*/
public suspend fun graph(name: String, block: suspend GraphResourceBuilder.() -> Unit): Graph {
val builder = GraphResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Graph].
* @param name The _unique_ name of the resulting resource.
*/
public fun graph(name: String): Graph {
val builder = GraphResourceBuilder()
builder.name(name)
return builder.build()
}