
com.pulumi.awsnative.proton.kotlin.EnvironmentAccountConnection.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.proton.kotlin
import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.proton.kotlin.enums.EnvironmentAccountConnectionStatus
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 kotlin.collections.List
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
import com.pulumi.awsnative.proton.kotlin.enums.EnvironmentAccountConnectionStatus.Companion.toKotlin as environmentAccountConnectionStatusToKotlin
/**
* Builder for [EnvironmentAccountConnection].
*/
@PulumiTagMarker
public class EnvironmentAccountConnectionResourceBuilder internal constructor() {
public var name: String? = null
public var args: EnvironmentAccountConnectionArgs = EnvironmentAccountConnectionArgs()
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 EnvironmentAccountConnectionArgsBuilder.() -> Unit) {
val builder = EnvironmentAccountConnectionArgsBuilder()
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(): EnvironmentAccountConnection {
val builtJavaResource =
com.pulumi.awsnative.proton.EnvironmentAccountConnection(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return EnvironmentAccountConnection(builtJavaResource)
}
}
/**
* Resource Schema describing various properties for AWS Proton Environment Account Connections resources.
*/
public class EnvironmentAccountConnection internal constructor(
override val javaResource: com.pulumi.awsnative.proton.EnvironmentAccountConnection,
) : KotlinCustomResource(javaResource, EnvironmentAccountConnectionMapper) {
/**
* The Amazon Resource Name (ARN) of the environment account connection.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* The ID of the environment account connection.
*/
public val awsId: Output
get() = javaResource.awsId().applyValue({ args0 -> args0 })
/**
* The Amazon Resource Name (ARN) of an IAM service role in the environment account. AWS Proton uses this role to provision infrastructure resources using CodeBuild-based provisioning in the associated environment account.
*/
public val codebuildRoleArn: Output?
get() = javaResource.codebuildRoleArn().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The Amazon Resource Name (ARN) of the IAM service role that AWS Proton uses when provisioning directly defined components in the associated environment account. It determines the scope of infrastructure that a component can provision in the account.
*/
public val componentRoleArn: Output?
get() = javaResource.componentRoleArn().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The environment account that's connected to the environment account connection.
*/
public val environmentAccountId: Output?
get() = javaResource.environmentAccountId().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The name of the AWS Proton environment that's created in the associated management account.
*/
public val environmentName: Output?
get() = javaResource.environmentName().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The ID of the management account that accepts or rejects the environment account connection. You create an manage the AWS Proton environment in this account. If the management account accepts the environment account connection, AWS Proton can use the associated IAM role to provision environment infrastructure resources in the associated environment account.
*/
public val managementAccountId: Output?
get() = javaResource.managementAccountId().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The Amazon Resource Name (ARN) of the IAM service role that's created in the environment account. AWS Proton uses this role to provision infrastructure resources in the associated environment account.
*/
public val roleArn: Output?
get() = javaResource.roleArn().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The status of the environment account connection.
*/
public val status: Output
get() = javaResource.status().applyValue({ args0 ->
args0.let({ args0 ->
environmentAccountConnectionStatusToKotlin(args0)
})
})
/**
* An optional list of metadata items that you can associate with the Proton environment account connection. A tag is a key-value pair.
* For more information, see Proton resources and tagging in the
* Proton User Guide.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> tagToKotlin(args0) })
})
}).orElse(null)
})
}
public object EnvironmentAccountConnectionMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.proton.EnvironmentAccountConnection::class == javaResource::class
override fun map(javaResource: Resource): EnvironmentAccountConnection =
EnvironmentAccountConnection(
javaResource as
com.pulumi.awsnative.proton.EnvironmentAccountConnection,
)
}
/**
* @see [EnvironmentAccountConnection].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [EnvironmentAccountConnection].
*/
public suspend fun environmentAccountConnection(
name: String,
block: suspend EnvironmentAccountConnectionResourceBuilder.() -> Unit,
): EnvironmentAccountConnection {
val builder = EnvironmentAccountConnectionResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [EnvironmentAccountConnection].
* @param name The _unique_ name of the resulting resource.
*/
public fun environmentAccountConnection(name: String): EnvironmentAccountConnection {
val builder = EnvironmentAccountConnectionResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy