cloudshift.awscdk.dsl.services.dax.CfnSubnetGroupDsl.kt Maven / Gradle / Ivy
@file:Suppress("RedundantVisibilityModifier","RedundantUnitReturnType","RemoveRedundantQualifierName","unused","UnusedImport","ClassName","REDUNDANT_PROJECTION","DEPRECATION")
package cloudshift.awscdk.dsl.services.dax
import cloudshift.awscdk.common.CdkDslMarker
import kotlin.String
import kotlin.collections.Collection
import kotlin.collections.MutableList
import software.amazon.awscdk.services.dax.CfnSubnetGroup
import software.constructs.Construct
/**
* Creates a new subnet group.
*
* Example:
*
* ```
* // The code below shows an example of how to instantiate this type.
* // The values are placeholders you should change.
* import software.amazon.awscdk.services.dax.*;
* CfnSubnetGroup cfnSubnetGroup = CfnSubnetGroup.Builder.create(this, "MyCfnSubnetGroup")
* .subnetIds(List.of("subnetIds"))
* // the properties below are optional
* .description("description")
* .subnetGroupName("subnetGroupName")
* .build();
* ```
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dax-subnetgroup.html)
*/
@CdkDslMarker
public class CfnSubnetGroupDsl(
scope: Construct,
id: String,
) {
private val cdkBuilder: CfnSubnetGroup.Builder = CfnSubnetGroup.Builder.create(scope, id)
private val _subnetIds: MutableList = mutableListOf()
/**
* The description of the subnet group.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dax-subnetgroup.html#cfn-dax-subnetgroup-description)
* @param description The description of the subnet group.
*/
public fun description(description: String) {
cdkBuilder.description(description)
}
/**
* The name of the subnet group.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dax-subnetgroup.html#cfn-dax-subnetgroup-subnetgroupname)
* @param subnetGroupName The name of the subnet group.
*/
public fun subnetGroupName(subnetGroupName: String) {
cdkBuilder.subnetGroupName(subnetGroupName)
}
/**
* A list of VPC subnet IDs for the subnet group.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dax-subnetgroup.html#cfn-dax-subnetgroup-subnetids)
* @param subnetIds A list of VPC subnet IDs for the subnet group.
*/
public fun subnetIds(vararg subnetIds: String) {
_subnetIds.addAll(listOf(*subnetIds))
}
/**
* A list of VPC subnet IDs for the subnet group.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dax-subnetgroup.html#cfn-dax-subnetgroup-subnetids)
* @param subnetIds A list of VPC subnet IDs for the subnet group.
*/
public fun subnetIds(subnetIds: Collection) {
_subnetIds.addAll(subnetIds)
}
public fun build(): CfnSubnetGroup {
if(_subnetIds.isNotEmpty()) cdkBuilder.subnetIds(_subnetIds)
return cdkBuilder.build()
}
}