io.cloudshiftdev.awscdk.services.appconfig.CfnDeploymentProps.kt Maven / Gradle / Ivy
The newest version!
@file:Suppress("RedundantVisibilityModifier","RedundantUnitReturnType","RemoveRedundantQualifierName","unused","UnusedImport","ClassName","REDUNDANT_PROJECTION","DEPRECATION")
package io.cloudshiftdev.awscdk.services.appconfig
import io.cloudshiftdev.awscdk.CfnTag
import io.cloudshiftdev.awscdk.IResolvable
import io.cloudshiftdev.awscdk.common.CdkDslMarker
import io.cloudshiftdev.awscdk.common.CdkObject
import io.cloudshiftdev.awscdk.common.CdkObjectWrappers
import kotlin.Any
import kotlin.String
import kotlin.Unit
import kotlin.collections.List
/**
* Properties for defining a `CfnDeployment`.
*
* Example:
*
* ```
* // The code below shows an example of how to instantiate this type.
* // The values are placeholders you should change.
* import io.cloudshiftdev.awscdk.services.appconfig.*;
* CfnDeploymentProps cfnDeploymentProps = CfnDeploymentProps.builder()
* .applicationId("applicationId")
* .configurationProfileId("configurationProfileId")
* .configurationVersion("configurationVersion")
* .deploymentStrategyId("deploymentStrategyId")
* .environmentId("environmentId")
* // the properties below are optional
* .description("description")
* .dynamicExtensionParameters(List.of(DynamicExtensionParametersProperty.builder()
* .extensionReference("extensionReference")
* .parameterName("parameterName")
* .parameterValue("parameterValue")
* .build()))
* .kmsKeyIdentifier("kmsKeyIdentifier")
* .tags(List.of(CfnTag.builder()
* .key("key")
* .value("value")
* .build()))
* .build();
* ```
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appconfig-deployment.html)
*/
public interface CfnDeploymentProps {
/**
* The application ID.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appconfig-deployment.html#cfn-appconfig-deployment-applicationid)
*/
public fun applicationId(): String
/**
* The configuration profile ID.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appconfig-deployment.html#cfn-appconfig-deployment-configurationprofileid)
*/
public fun configurationProfileId(): String
/**
* The configuration version to deploy.
*
* If deploying an AWS AppConfig hosted configuration version, you can specify either the version
* number or version label. For all other configurations, you must specify the version number.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appconfig-deployment.html#cfn-appconfig-deployment-configurationversion)
*/
public fun configurationVersion(): String
/**
* The deployment strategy ID.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appconfig-deployment.html#cfn-appconfig-deployment-deploymentstrategyid)
*/
public fun deploymentStrategyId(): String
/**
* A description of the deployment.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appconfig-deployment.html#cfn-appconfig-deployment-description)
*/
public fun description(): String? = unwrap(this).getDescription()
/**
* A map of dynamic extension parameter names to values to pass to associated extensions with
* `PRE_START_DEPLOYMENT` actions.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appconfig-deployment.html#cfn-appconfig-deployment-dynamicextensionparameters)
*/
public fun dynamicExtensionParameters(): Any? = unwrap(this).getDynamicExtensionParameters()
/**
* The environment ID.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appconfig-deployment.html#cfn-appconfig-deployment-environmentid)
*/
public fun environmentId(): String
/**
* The AWS Key Management Service key identifier (key ID, key alias, or key ARN) provided when the
* resource was created or updated.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appconfig-deployment.html#cfn-appconfig-deployment-kmskeyidentifier)
*/
public fun kmsKeyIdentifier(): String? = unwrap(this).getKmsKeyIdentifier()
/**
* Metadata to assign to the deployment.
*
* Tags help organize and categorize your AWS AppConfig resources. Each tag consists of a key and
* an optional value, both of which you define.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appconfig-deployment.html#cfn-appconfig-deployment-tags)
*/
public fun tags(): List = unwrap(this).getTags()?.map(CfnTag::wrap) ?: emptyList()
/**
* A builder for [CfnDeploymentProps]
*/
@CdkDslMarker
public interface Builder {
/**
* @param applicationId The application ID.
*/
public fun applicationId(applicationId: String)
/**
* @param configurationProfileId The configuration profile ID.
*/
public fun configurationProfileId(configurationProfileId: String)
/**
* @param configurationVersion The configuration version to deploy.
* If deploying an AWS AppConfig hosted configuration version, you can specify either the
* version number or version label. For all other configurations, you must specify the version
* number.
*/
public fun configurationVersion(configurationVersion: String)
/**
* @param deploymentStrategyId The deployment strategy ID.
*/
public fun deploymentStrategyId(deploymentStrategyId: String)
/**
* @param description A description of the deployment.
*/
public fun description(description: String)
/**
* @param dynamicExtensionParameters A map of dynamic extension parameter names to values to
* pass to associated extensions with `PRE_START_DEPLOYMENT` actions.
*/
public fun dynamicExtensionParameters(dynamicExtensionParameters: IResolvable)
/**
* @param dynamicExtensionParameters A map of dynamic extension parameter names to values to
* pass to associated extensions with `PRE_START_DEPLOYMENT` actions.
*/
public fun dynamicExtensionParameters(dynamicExtensionParameters: List)
/**
* @param dynamicExtensionParameters A map of dynamic extension parameter names to values to
* pass to associated extensions with `PRE_START_DEPLOYMENT` actions.
*/
public fun dynamicExtensionParameters(vararg dynamicExtensionParameters: Any)
/**
* @param environmentId The environment ID.
*/
public fun environmentId(environmentId: String)
/**
* @param kmsKeyIdentifier The AWS Key Management Service key identifier (key ID, key alias, or
* key ARN) provided when the resource was created or updated.
*/
public fun kmsKeyIdentifier(kmsKeyIdentifier: String)
/**
* @param tags Metadata to assign to the deployment.
* Tags help organize and categorize your AWS AppConfig resources. Each tag consists of a key
* and an optional value, both of which you define.
*/
public fun tags(tags: List)
/**
* @param tags Metadata to assign to the deployment.
* Tags help organize and categorize your AWS AppConfig resources. Each tag consists of a key
* and an optional value, both of which you define.
*/
public fun tags(vararg tags: CfnTag)
}
private class BuilderImpl : Builder {
private val cdkBuilder: software.amazon.awscdk.services.appconfig.CfnDeploymentProps.Builder =
software.amazon.awscdk.services.appconfig.CfnDeploymentProps.builder()
/**
* @param applicationId The application ID.
*/
override fun applicationId(applicationId: String) {
cdkBuilder.applicationId(applicationId)
}
/**
* @param configurationProfileId The configuration profile ID.
*/
override fun configurationProfileId(configurationProfileId: String) {
cdkBuilder.configurationProfileId(configurationProfileId)
}
/**
* @param configurationVersion The configuration version to deploy.
* If deploying an AWS AppConfig hosted configuration version, you can specify either the
* version number or version label. For all other configurations, you must specify the version
* number.
*/
override fun configurationVersion(configurationVersion: String) {
cdkBuilder.configurationVersion(configurationVersion)
}
/**
* @param deploymentStrategyId The deployment strategy ID.
*/
override fun deploymentStrategyId(deploymentStrategyId: String) {
cdkBuilder.deploymentStrategyId(deploymentStrategyId)
}
/**
* @param description A description of the deployment.
*/
override fun description(description: String) {
cdkBuilder.description(description)
}
/**
* @param dynamicExtensionParameters A map of dynamic extension parameter names to values to
* pass to associated extensions with `PRE_START_DEPLOYMENT` actions.
*/
override fun dynamicExtensionParameters(dynamicExtensionParameters: IResolvable) {
cdkBuilder.dynamicExtensionParameters(dynamicExtensionParameters.let(IResolvable.Companion::unwrap))
}
/**
* @param dynamicExtensionParameters A map of dynamic extension parameter names to values to
* pass to associated extensions with `PRE_START_DEPLOYMENT` actions.
*/
override fun dynamicExtensionParameters(dynamicExtensionParameters: List) {
cdkBuilder.dynamicExtensionParameters(dynamicExtensionParameters.map{CdkObjectWrappers.unwrap(it)})
}
/**
* @param dynamicExtensionParameters A map of dynamic extension parameter names to values to
* pass to associated extensions with `PRE_START_DEPLOYMENT` actions.
*/
override fun dynamicExtensionParameters(vararg dynamicExtensionParameters: Any): Unit =
dynamicExtensionParameters(dynamicExtensionParameters.toList())
/**
* @param environmentId The environment ID.
*/
override fun environmentId(environmentId: String) {
cdkBuilder.environmentId(environmentId)
}
/**
* @param kmsKeyIdentifier The AWS Key Management Service key identifier (key ID, key alias, or
* key ARN) provided when the resource was created or updated.
*/
override fun kmsKeyIdentifier(kmsKeyIdentifier: String) {
cdkBuilder.kmsKeyIdentifier(kmsKeyIdentifier)
}
/**
* @param tags Metadata to assign to the deployment.
* Tags help organize and categorize your AWS AppConfig resources. Each tag consists of a key
* and an optional value, both of which you define.
*/
override fun tags(tags: List) {
cdkBuilder.tags(tags.map(CfnTag.Companion::unwrap))
}
/**
* @param tags Metadata to assign to the deployment.
* Tags help organize and categorize your AWS AppConfig resources. Each tag consists of a key
* and an optional value, both of which you define.
*/
override fun tags(vararg tags: CfnTag): Unit = tags(tags.toList())
public fun build(): software.amazon.awscdk.services.appconfig.CfnDeploymentProps =
cdkBuilder.build()
}
private class Wrapper(
cdkObject: software.amazon.awscdk.services.appconfig.CfnDeploymentProps,
) : CdkObject(cdkObject),
CfnDeploymentProps {
/**
* The application ID.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appconfig-deployment.html#cfn-appconfig-deployment-applicationid)
*/
override fun applicationId(): String = unwrap(this).getApplicationId()
/**
* The configuration profile ID.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appconfig-deployment.html#cfn-appconfig-deployment-configurationprofileid)
*/
override fun configurationProfileId(): String = unwrap(this).getConfigurationProfileId()
/**
* The configuration version to deploy.
*
* If deploying an AWS AppConfig hosted configuration version, you can specify either the
* version number or version label. For all other configurations, you must specify the version
* number.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appconfig-deployment.html#cfn-appconfig-deployment-configurationversion)
*/
override fun configurationVersion(): String = unwrap(this).getConfigurationVersion()
/**
* The deployment strategy ID.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appconfig-deployment.html#cfn-appconfig-deployment-deploymentstrategyid)
*/
override fun deploymentStrategyId(): String = unwrap(this).getDeploymentStrategyId()
/**
* A description of the deployment.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appconfig-deployment.html#cfn-appconfig-deployment-description)
*/
override fun description(): String? = unwrap(this).getDescription()
/**
* A map of dynamic extension parameter names to values to pass to associated extensions with
* `PRE_START_DEPLOYMENT` actions.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appconfig-deployment.html#cfn-appconfig-deployment-dynamicextensionparameters)
*/
override fun dynamicExtensionParameters(): Any? = unwrap(this).getDynamicExtensionParameters()
/**
* The environment ID.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appconfig-deployment.html#cfn-appconfig-deployment-environmentid)
*/
override fun environmentId(): String = unwrap(this).getEnvironmentId()
/**
* The AWS Key Management Service key identifier (key ID, key alias, or key ARN) provided when
* the resource was created or updated.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appconfig-deployment.html#cfn-appconfig-deployment-kmskeyidentifier)
*/
override fun kmsKeyIdentifier(): String? = unwrap(this).getKmsKeyIdentifier()
/**
* Metadata to assign to the deployment.
*
* Tags help organize and categorize your AWS AppConfig resources. Each tag consists of a key
* and an optional value, both of which you define.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appconfig-deployment.html#cfn-appconfig-deployment-tags)
*/
override fun tags(): List = unwrap(this).getTags()?.map(CfnTag::wrap) ?: emptyList()
}
public companion object {
public operator fun invoke(block: Builder.() -> Unit = {}): CfnDeploymentProps {
val builderImpl = BuilderImpl()
return Wrapper(builderImpl.apply(block).build())
}
internal fun wrap(cdkObject: software.amazon.awscdk.services.appconfig.CfnDeploymentProps):
CfnDeploymentProps = CdkObjectWrappers.wrap(cdkObject) as? CfnDeploymentProps ?:
Wrapper(cdkObject)
internal fun unwrap(wrapped: CfnDeploymentProps):
software.amazon.awscdk.services.appconfig.CfnDeploymentProps = (wrapped as
CdkObject).cdkObject as software.amazon.awscdk.services.appconfig.CfnDeploymentProps
}
}