com.pulumi.awsnative.eventschemas.kotlin.RegistryPolicy.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.eventschemas.kotlin
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.Any
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
/**
* Builder for [RegistryPolicy].
*/
@PulumiTagMarker
public class RegistryPolicyResourceBuilder internal constructor() {
public var name: String? = null
public var args: RegistryPolicyArgs = RegistryPolicyArgs()
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 RegistryPolicyArgsBuilder.() -> Unit) {
val builder = RegistryPolicyArgsBuilder()
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(): RegistryPolicy {
val builtJavaResource =
com.pulumi.awsnative.eventschemas.RegistryPolicy(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return RegistryPolicy(builtJavaResource)
}
}
/**
* Resource Type definition for AWS::EventSchemas::RegistryPolicy
* ## Example Usage
* ### Example
* No Java example available.
* ### Example
* No Java example available.
* ### Example
* No Java example available.
*/
public class RegistryPolicy internal constructor(
override val javaResource: com.pulumi.awsnative.eventschemas.RegistryPolicy,
) : KotlinCustomResource(javaResource, RegistryPolicyMapper) {
/**
* The ID of the policy.
*/
public val awsId: Output
get() = javaResource.awsId().applyValue({ args0 -> args0 })
/**
* A resource-based policy.
* Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::EventSchemas::RegistryPolicy` for more information about the expected schema for this property.
*/
public val policy: Output
get() = javaResource.policy().applyValue({ args0 -> args0 })
/**
* The name of the registry.
*/
public val registryName: Output
get() = javaResource.registryName().applyValue({ args0 -> args0 })
/**
* The revision ID of the policy.
*/
public val revisionId: Output?
get() = javaResource.revisionId().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
}
public object RegistryPolicyMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.eventschemas.RegistryPolicy::class == javaResource::class
override fun map(javaResource: Resource): RegistryPolicy = RegistryPolicy(
javaResource as
com.pulumi.awsnative.eventschemas.RegistryPolicy,
)
}
/**
* @see [RegistryPolicy].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [RegistryPolicy].
*/
public suspend fun registryPolicy(
name: String,
block: suspend RegistryPolicyResourceBuilder.() -> Unit,
): RegistryPolicy {
val builder = RegistryPolicyResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [RegistryPolicy].
* @param name The _unique_ name of the resulting resource.
*/
public fun registryPolicy(name: String): RegistryPolicy {
val builder = RegistryPolicyResourceBuilder()
builder.name(name)
return builder.build()
}