com.pulumi.awsnative.ssm.kotlin.ResourceDataSync.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.ssm.kotlin
import com.pulumi.awsnative.ssm.kotlin.outputs.ResourceDataSyncS3Destination
import com.pulumi.awsnative.ssm.kotlin.outputs.ResourceDataSyncSyncSource
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.ssm.kotlin.outputs.ResourceDataSyncS3Destination.Companion.toKotlin as resourceDataSyncS3DestinationToKotlin
import com.pulumi.awsnative.ssm.kotlin.outputs.ResourceDataSyncSyncSource.Companion.toKotlin as resourceDataSyncSyncSourceToKotlin
/**
* Builder for [ResourceDataSync].
*/
@PulumiTagMarker
public class ResourceDataSyncResourceBuilder internal constructor() {
public var name: String? = null
public var args: ResourceDataSyncArgs = ResourceDataSyncArgs()
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 ResourceDataSyncArgsBuilder.() -> Unit) {
val builder = ResourceDataSyncArgsBuilder()
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(): ResourceDataSync {
val builtJavaResource = com.pulumi.awsnative.ssm.ResourceDataSync(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return ResourceDataSync(builtJavaResource)
}
}
/**
* Resource Type definition for AWS::SSM::ResourceDataSync
* ## 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.
* ### Example
* No Java example available.
* ### Example
* No Java example available.
*/
public class ResourceDataSync internal constructor(
override val javaResource: com.pulumi.awsnative.ssm.ResourceDataSync,
) : KotlinCustomResource(javaResource, ResourceDataSyncMapper) {
/**
* The name of the S3 bucket where the aggregated data is stored.
*/
public val bucketName: Output?
get() = javaResource.bucketName().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* An Amazon S3 prefix for the bucket.
*/
public val bucketPrefix: Output?
get() = javaResource.bucketPrefix().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The AWS Region with the S3 bucket targeted by the resource data sync.
*/
public val bucketRegion: Output?
get() = javaResource.bucketRegion().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The Amazon Resource Name (ARN) of an encryption key for a destination in Amazon S3 . You can use a KMS key to encrypt inventory data in Amazon S3 . You must specify a key that exist in the same AWS Region as the destination Amazon S3 bucket.
*/
public val kmsKeyArn: Output?
get() = javaResource.kmsKeyArn().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* Configuration information for the target S3 bucket.
*/
public val s3Destination: Output?
get() = javaResource.s3Destination().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> resourceDataSyncS3DestinationToKotlin(args0) })
}).orElse(null)
})
/**
* A supported sync format. The following format is currently supported: JsonSerDe
*/
public val syncFormat: Output?
get() = javaResource.syncFormat().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* A name for the resource data sync.
*/
public val syncName: Output
get() = javaResource.syncName().applyValue({ args0 -> args0 })
/**
* Information about the source where the data was synchronized.
*/
public val syncSource: Output?
get() = javaResource.syncSource().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
resourceDataSyncSyncSourceToKotlin(args0)
})
}).orElse(null)
})
/**
* The type of resource data sync. If `SyncType` is `SyncToDestination` , then the resource data sync synchronizes data to an S3 bucket. If the `SyncType` is `SyncFromSource` then the resource data sync synchronizes data from AWS Organizations or from multiple AWS Regions .
*/
public val syncType: Output?
get() = javaResource.syncType().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
}
public object ResourceDataSyncMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.ssm.ResourceDataSync::class == javaResource::class
override fun map(javaResource: Resource): ResourceDataSync = ResourceDataSync(
javaResource as
com.pulumi.awsnative.ssm.ResourceDataSync,
)
}
/**
* @see [ResourceDataSync].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [ResourceDataSync].
*/
public suspend fun resourceDataSync(
name: String,
block: suspend ResourceDataSyncResourceBuilder.() -> Unit,
): ResourceDataSync {
val builder = ResourceDataSyncResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [ResourceDataSync].
* @param name The _unique_ name of the resulting resource.
*/
public fun resourceDataSync(name: String): ResourceDataSync {
val builder = ResourceDataSyncResourceBuilder()
builder.name(name)
return builder.build()
}