![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.awsnative.cloudformation.kotlin.ResourceVersion.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.cloudformation.kotlin
import com.pulumi.awsnative.cloudformation.kotlin.enums.ResourceVersionProvisioningType
import com.pulumi.awsnative.cloudformation.kotlin.enums.ResourceVersionVisibility
import com.pulumi.awsnative.cloudformation.kotlin.outputs.ResourceVersionLoggingConfig
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.String
import kotlin.Suppress
import kotlin.Unit
import com.pulumi.awsnative.cloudformation.kotlin.enums.ResourceVersionProvisioningType.Companion.toKotlin as resourceVersionProvisioningTypeToKotlin
import com.pulumi.awsnative.cloudformation.kotlin.enums.ResourceVersionVisibility.Companion.toKotlin as resourceVersionVisibilityToKotlin
import com.pulumi.awsnative.cloudformation.kotlin.outputs.ResourceVersionLoggingConfig.Companion.toKotlin as resourceVersionLoggingConfigToKotlin
/**
* Builder for [ResourceVersion].
*/
@PulumiTagMarker
public class ResourceVersionResourceBuilder internal constructor() {
public var name: String? = null
public var args: ResourceVersionArgs = ResourceVersionArgs()
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 ResourceVersionArgsBuilder.() -> Unit) {
val builder = ResourceVersionArgsBuilder()
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(): ResourceVersion {
val builtJavaResource =
com.pulumi.awsnative.cloudformation.ResourceVersion(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return ResourceVersion(builtJavaResource)
}
}
/**
* A resource that has been registered in the CloudFormation Registry.
* ## Example Usage
* ### Example
* No Java example available.
* ### Example
* No Java example available.
* ### Example
* No Java example available.
* ### Example
* No Java example available.
* ### Example
* No Java example available.
* ### Example
* No Java example available.
*/
public class ResourceVersion internal constructor(
override val javaResource: com.pulumi.awsnative.cloudformation.ResourceVersion,
) : KotlinCustomResource(javaResource, ResourceVersionMapper) {
/**
* The Amazon Resource Name (ARN) of the type, here the ResourceVersion. This is used to uniquely identify a ResourceVersion resource
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* The Amazon Resource Name (ARN) of the IAM execution role to use to register the type. If your resource type calls AWS APIs in any of its handlers, you must create an IAM execution role that includes the necessary permissions to call those AWS APIs, and provision that execution role in your account. CloudFormation then assumes that execution role to provide your resource type with the appropriate credentials.
*/
public val executionRoleArn: Output?
get() = javaResource.executionRoleArn().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Indicates if this type version is the current default version
*/
public val isDefaultVersion: Output
get() = javaResource.isDefaultVersion().applyValue({ args0 -> args0 })
/**
* Specifies logging configuration information for a type.
*/
public val loggingConfig: Output?
get() = javaResource.loggingConfig().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> resourceVersionLoggingConfigToKotlin(args0) })
}).orElse(null)
})
/**
* The provisioning behavior of the type. AWS CloudFormation determines the provisioning type during registration, based on the types of handlers in the schema handler package submitted.
*/
public val provisioningType: Output
get() = javaResource.provisioningType().applyValue({ args0 ->
args0.let({ args0 ->
resourceVersionProvisioningTypeToKotlin(args0)
})
})
/**
* A url to the S3 bucket containing the schema handler package that contains the schema, event handlers, and associated files for the type you want to register.
* For information on generating a schema handler package for the type you want to register, see submit in the CloudFormation CLI User Guide.
*/
public val schemaHandlerPackage: Output
get() = javaResource.schemaHandlerPackage().applyValue({ args0 -> args0 })
/**
* The Amazon Resource Name (ARN) of the type without the versionID.
*/
public val typeArn: Output
get() = javaResource.typeArn().applyValue({ args0 -> args0 })
/**
* The name of the type being registered.
* We recommend that type names adhere to the following pattern: company_or_organization::service::type.
*/
public val typeName: Output
get() = javaResource.typeName().applyValue({ args0 -> args0 })
/**
* The ID of the version of the type represented by this resource instance.
*/
public val versionId: Output
get() = javaResource.versionId().applyValue({ args0 -> args0 })
/**
* The scope at which the type is visible and usable in CloudFormation operations.
* Valid values include:
* PRIVATE: The type is only visible and usable within the account in which it is registered. Currently, AWS CloudFormation marks any types you register as PRIVATE.
* PUBLIC: The type is publically visible and usable within any Amazon account.
*/
public val visibility: Output
get() = javaResource.visibility().applyValue({ args0 ->
args0.let({ args0 ->
resourceVersionVisibilityToKotlin(args0)
})
})
}
public object ResourceVersionMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.cloudformation.ResourceVersion::class == javaResource::class
override fun map(javaResource: Resource): ResourceVersion = ResourceVersion(
javaResource as
com.pulumi.awsnative.cloudformation.ResourceVersion,
)
}
/**
* @see [ResourceVersion].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [ResourceVersion].
*/
public suspend fun resourceVersion(
name: String,
block: suspend ResourceVersionResourceBuilder.() -> Unit,
): ResourceVersion {
val builder = ResourceVersionResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [ResourceVersion].
* @param name The _unique_ name of the resulting resource.
*/
public fun resourceVersion(name: String): ResourceVersion {
val builder = ResourceVersionResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy