cloudshift.awscdk.dsl.services.voiceid.CfnDomainDsl.kt Maven / Gradle / Ivy
@file:Suppress("RedundantVisibilityModifier","RedundantUnitReturnType","RemoveRedundantQualifierName","unused","UnusedImport","ClassName","REDUNDANT_PROJECTION","DEPRECATION")
package cloudshift.awscdk.dsl.services.voiceid
import cloudshift.awscdk.common.CdkDslMarker
import cloudshift.awscdk.dsl.CfnTagDsl
import kotlin.String
import kotlin.Unit
import kotlin.collections.Collection
import kotlin.collections.MutableList
import software.amazon.awscdk.CfnTag
import software.amazon.awscdk.IResolvable
import software.amazon.awscdk.services.voiceid.CfnDomain
import software.constructs.Construct
/**
* Creates a domain that contains all Amazon Connect Voice ID data, such as speakers, fraudsters,
* customer audio, and voiceprints.
*
* Every domain is created with a default watchlist that fraudsters can be a part of.
*
* 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.voiceid.*;
* CfnDomain cfnDomain = CfnDomain.Builder.create(this, "MyCfnDomain")
* .name("name")
* .serverSideEncryptionConfiguration(ServerSideEncryptionConfigurationProperty.builder()
* .kmsKeyId("kmsKeyId")
* .build())
* // the properties below are optional
* .description("description")
* .tags(List.of(CfnTag.builder()
* .key("key")
* .value("value")
* .build()))
* .build();
* ```
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-voiceid-domain.html)
*/
@CdkDslMarker
public class CfnDomainDsl(
scope: Construct,
id: String,
) {
private val cdkBuilder: CfnDomain.Builder = CfnDomain.Builder.create(scope, id)
private val _tags: MutableList = mutableListOf()
/**
* The description of the domain.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-voiceid-domain.html#cfn-voiceid-domain-description)
* @param description The description of the domain.
*/
public fun description(description: String) {
cdkBuilder.description(description)
}
/**
* The name for the domain.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-voiceid-domain.html#cfn-voiceid-domain-name)
* @param name The name for the domain.
*/
public fun name(name: String) {
cdkBuilder.name(name)
}
/**
* The server-side encryption configuration containing the KMS key identifier you want Voice ID to
* use to encrypt your data.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-voiceid-domain.html#cfn-voiceid-domain-serversideencryptionconfiguration)
* @param serverSideEncryptionConfiguration The server-side encryption configuration containing
* the KMS key identifier you want Voice ID to use to encrypt your data.
*/
public fun serverSideEncryptionConfiguration(serverSideEncryptionConfiguration: IResolvable) {
cdkBuilder.serverSideEncryptionConfiguration(serverSideEncryptionConfiguration)
}
/**
* The server-side encryption configuration containing the KMS key identifier you want Voice ID to
* use to encrypt your data.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-voiceid-domain.html#cfn-voiceid-domain-serversideencryptionconfiguration)
* @param serverSideEncryptionConfiguration The server-side encryption configuration containing
* the KMS key identifier you want Voice ID to use to encrypt your data.
*/
public
fun serverSideEncryptionConfiguration(serverSideEncryptionConfiguration: CfnDomain.ServerSideEncryptionConfigurationProperty) {
cdkBuilder.serverSideEncryptionConfiguration(serverSideEncryptionConfiguration)
}
/**
* The tags used to organize, track, or control access for this resource.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-voiceid-domain.html#cfn-voiceid-domain-tags)
* @param tags The tags used to organize, track, or control access for this resource.
*/
public fun tags(tags: CfnTagDsl.() -> Unit) {
_tags.add(CfnTagDsl().apply(tags).build())
}
/**
* The tags used to organize, track, or control access for this resource.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-voiceid-domain.html#cfn-voiceid-domain-tags)
* @param tags The tags used to organize, track, or control access for this resource.
*/
public fun tags(tags: Collection) {
_tags.addAll(tags)
}
public fun build(): CfnDomain {
if(_tags.isNotEmpty()) cdkBuilder.tags(_tags)
return cdkBuilder.build()
}
}