
com.pulumi.awsnative.codestarconnections.kotlin.SyncConfiguration.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.codestarconnections.kotlin
import com.pulumi.awsnative.codestarconnections.kotlin.enums.SyncConfigurationProviderType
import com.pulumi.awsnative.codestarconnections.kotlin.enums.SyncConfigurationPublishDeploymentStatus
import com.pulumi.awsnative.codestarconnections.kotlin.enums.SyncConfigurationTriggerResourceUpdateOn
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.codestarconnections.kotlin.enums.SyncConfigurationProviderType.Companion.toKotlin as syncConfigurationProviderTypeToKotlin
import com.pulumi.awsnative.codestarconnections.kotlin.enums.SyncConfigurationPublishDeploymentStatus.Companion.toKotlin as syncConfigurationPublishDeploymentStatusToKotlin
import com.pulumi.awsnative.codestarconnections.kotlin.enums.SyncConfigurationTriggerResourceUpdateOn.Companion.toKotlin as syncConfigurationTriggerResourceUpdateOnToKotlin
/**
* Builder for [SyncConfiguration].
*/
@PulumiTagMarker
public class SyncConfigurationResourceBuilder internal constructor() {
public var name: String? = null
public var args: SyncConfigurationArgs = SyncConfigurationArgs()
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 SyncConfigurationArgsBuilder.() -> Unit) {
val builder = SyncConfigurationArgsBuilder()
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(): SyncConfiguration {
val builtJavaResource =
com.pulumi.awsnative.codestarconnections.SyncConfiguration(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return SyncConfiguration(builtJavaResource)
}
}
/**
* Schema for AWS::CodeStarConnections::SyncConfiguration resource which is used to enables an AWS resource to be synchronized from a source-provider.
*/
public class SyncConfiguration internal constructor(
override val javaResource: com.pulumi.awsnative.codestarconnections.SyncConfiguration,
) : KotlinCustomResource(javaResource, SyncConfigurationMapper) {
/**
* The name of the branch of the repository from which resources are to be synchronized,
*/
public val branch: Output
get() = javaResource.branch().applyValue({ args0 -> args0 })
/**
* The source provider repository path of the sync configuration file of the respective SyncType.
*/
public val configFile: Output
get() = javaResource.configFile().applyValue({ args0 -> args0 })
/**
* the ID of the entity that owns the repository.
*/
public val ownerId: Output
get() = javaResource.ownerId().applyValue({ args0 -> args0 })
/**
* The name of the external provider where your third-party code repository is configured.
*/
public val providerType: Output
get() = javaResource.providerType().applyValue({ args0 ->
args0.let({ args0 ->
syncConfigurationProviderTypeToKotlin(args0)
})
})
/**
* Whether to enable or disable publishing of deployment status to source providers.
*/
public val publishDeploymentStatus: Output?
get() = javaResource.publishDeploymentStatus().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
syncConfigurationPublishDeploymentStatusToKotlin(args0)
})
}).orElse(null)
})
/**
* A UUID that uniquely identifies the RepositoryLink that the SyncConfig is associated with.
*/
public val repositoryLinkId: Output
get() = javaResource.repositoryLinkId().applyValue({ args0 -> args0 })
/**
* The name of the repository that is being synced to.
*/
public val repositoryName: Output
get() = javaResource.repositoryName().applyValue({ args0 -> args0 })
/**
* The name of the resource that is being synchronized to the repository.
*/
public val resourceName: Output
get() = javaResource.resourceName().applyValue({ args0 -> args0 })
/**
* The IAM Role that allows AWS to update CloudFormation stacks based on content in the specified repository.
*/
public val roleArn: Output
get() = javaResource.roleArn().applyValue({ args0 -> args0 })
/**
* The type of resource synchronization service that is to be configured, for example, CFN_STACK_SYNC.
*/
public val syncType: Output
get() = javaResource.syncType().applyValue({ args0 -> args0 })
/**
* When to trigger Git sync to begin the stack update.
*/
public val triggerResourceUpdateOn: Output?
get() = javaResource.triggerResourceUpdateOn().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
syncConfigurationTriggerResourceUpdateOnToKotlin(args0)
})
}).orElse(null)
})
}
public object SyncConfigurationMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.codestarconnections.SyncConfiguration::class == javaResource::class
override fun map(javaResource: Resource): SyncConfiguration = SyncConfiguration(
javaResource as
com.pulumi.awsnative.codestarconnections.SyncConfiguration,
)
}
/**
* @see [SyncConfiguration].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [SyncConfiguration].
*/
public suspend fun syncConfiguration(
name: String,
block: suspend SyncConfigurationResourceBuilder.() -> Unit,
): SyncConfiguration {
val builder = SyncConfigurationResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [SyncConfiguration].
* @param name The _unique_ name of the resulting resource.
*/
public fun syncConfiguration(name: String): SyncConfiguration {
val builder = SyncConfigurationResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy