cloudshift.awscdk.dsl.services.apigateway.CfnClientCertificateDsl.kt Maven / Gradle / Ivy
@file:Suppress("RedundantVisibilityModifier","RedundantUnitReturnType","RemoveRedundantQualifierName","unused","UnusedImport","ClassName","REDUNDANT_PROJECTION","DEPRECATION")
package cloudshift.awscdk.dsl.services.apigateway
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.services.apigateway.CfnClientCertificate
import software.constructs.Construct
/**
* The `AWS::ApiGateway::ClientCertificate` resource creates a client certificate that API Gateway
* uses to configure client-side SSL authentication for sending requests to the integration endpoint.
*
* 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.apigateway.*;
* CfnClientCertificate cfnClientCertificate = CfnClientCertificate.Builder.create(this,
* "MyCfnClientCertificate")
* .description("description")
* .tags(List.of(CfnTag.builder()
* .key("key")
* .value("value")
* .build()))
* .build();
* ```
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-clientcertificate.html)
*/
@CdkDslMarker
public class CfnClientCertificateDsl(
scope: Construct,
id: String,
) {
private val cdkBuilder: CfnClientCertificate.Builder = CfnClientCertificate.Builder.create(scope,
id)
private val _tags: MutableList = mutableListOf()
/**
* The description of the client certificate.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-clientcertificate.html#cfn-apigateway-clientcertificate-description)
* @param description The description of the client certificate.
*/
public fun description(description: String) {
cdkBuilder.description(description)
}
/**
* The collection of tags.
*
* Each tag element is associated with a given resource.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-clientcertificate.html#cfn-apigateway-clientcertificate-tags)
* @param tags The collection of tags.
*/
public fun tags(tags: CfnTagDsl.() -> Unit) {
_tags.add(CfnTagDsl().apply(tags).build())
}
/**
* The collection of tags.
*
* Each tag element is associated with a given resource.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-clientcertificate.html#cfn-apigateway-clientcertificate-tags)
* @param tags The collection of tags.
*/
public fun tags(tags: Collection) {
_tags.addAll(tags)
}
public fun build(): CfnClientCertificate {
if(_tags.isNotEmpty()) cdkBuilder.tags(_tags)
return cdkBuilder.build()
}
}