io.cloudshiftdev.awscdk.services.ec2.CfnLocalGatewayRouteTableVPCAssociation.kt Maven / Gradle / Ivy
The newest version!
@file:Suppress("RedundantVisibilityModifier","RedundantUnitReturnType","RemoveRedundantQualifierName","unused","UnusedImport","ClassName","REDUNDANT_PROJECTION","DEPRECATION")
package io.cloudshiftdev.awscdk.services.ec2
import io.cloudshiftdev.awscdk.CfnResource
import io.cloudshiftdev.awscdk.CfnTag
import io.cloudshiftdev.awscdk.IInspectable
import io.cloudshiftdev.awscdk.ITaggable
import io.cloudshiftdev.awscdk.TagManager
import io.cloudshiftdev.awscdk.TreeInspector
import io.cloudshiftdev.awscdk.common.CdkDslMarker
import kotlin.String
import kotlin.Unit
import kotlin.collections.List
import io.cloudshiftdev.constructs.Construct as CloudshiftdevConstructsConstruct
import software.constructs.Construct as SoftwareConstructsConstruct
/**
* Associates the specified VPC with the specified local gateway route table.
*
* 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.ec2.*;
* CfnLocalGatewayRouteTableVPCAssociation cfnLocalGatewayRouteTableVPCAssociation =
* CfnLocalGatewayRouteTableVPCAssociation.Builder.create(this,
* "MyCfnLocalGatewayRouteTableVPCAssociation")
* .localGatewayRouteTableId("localGatewayRouteTableId")
* .vpcId("vpcId")
* // the properties below are optional
* .tags(List.of(CfnTag.builder()
* .key("key")
* .value("value")
* .build()))
* .build();
* ```
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-localgatewayroutetablevpcassociation.html)
*/
public open class CfnLocalGatewayRouteTableVPCAssociation(
cdkObject: software.amazon.awscdk.services.ec2.CfnLocalGatewayRouteTableVPCAssociation,
) : CfnResource(cdkObject),
IInspectable,
ITaggable {
public constructor(
scope: CloudshiftdevConstructsConstruct,
id: String,
props: CfnLocalGatewayRouteTableVPCAssociationProps,
) :
this(software.amazon.awscdk.services.ec2.CfnLocalGatewayRouteTableVPCAssociation(scope.let(CloudshiftdevConstructsConstruct.Companion::unwrap),
id, props.let(CfnLocalGatewayRouteTableVPCAssociationProps.Companion::unwrap))
)
public constructor(
scope: CloudshiftdevConstructsConstruct,
id: String,
props: CfnLocalGatewayRouteTableVPCAssociationProps.Builder.() -> Unit,
) : this(scope, id, CfnLocalGatewayRouteTableVPCAssociationProps(props)
)
/**
* The ID of the local gateway.
*/
public open fun attrLocalGatewayId(): String = unwrap(this).getAttrLocalGatewayId()
/**
* The ID of the association.
*/
public open fun attrLocalGatewayRouteTableVpcAssociationId(): String =
unwrap(this).getAttrLocalGatewayRouteTableVpcAssociationId()
/**
* The state of the association.
*/
public open fun attrState(): String = unwrap(this).getAttrState()
/**
* Examines the CloudFormation resource and discloses attributes.
*
* @param inspector tree inspector to collect and process attributes.
*/
public override fun inspect(inspector: TreeInspector) {
unwrap(this).inspect(inspector.let(TreeInspector.Companion::unwrap))
}
/**
* The ID of the local gateway route table.
*/
public open fun localGatewayRouteTableId(): String = unwrap(this).getLocalGatewayRouteTableId()
/**
* The ID of the local gateway route table.
*/
public open fun localGatewayRouteTableId(`value`: String) {
unwrap(this).setLocalGatewayRouteTableId(`value`)
}
/**
* Tag Manager which manages the tags for this resource.
*/
public override fun tags(): TagManager = unwrap(this).getTags().let(TagManager::wrap)
/**
* The tags assigned to the association.
*/
public open fun tagsRaw(): List = unwrap(this).getTagsRaw()?.map(CfnTag::wrap) ?:
emptyList()
/**
* The tags assigned to the association.
*/
public open fun tagsRaw(`value`: List) {
unwrap(this).setTagsRaw(`value`.map(CfnTag.Companion::unwrap))
}
/**
* The tags assigned to the association.
*/
public open fun tagsRaw(vararg `value`: CfnTag): Unit = tagsRaw(`value`.toList())
/**
* The ID of the VPC.
*/
public open fun vpcId(): String = unwrap(this).getVpcId()
/**
* The ID of the VPC.
*/
public open fun vpcId(`value`: String) {
unwrap(this).setVpcId(`value`)
}
/**
* A fluent builder for
* [io.cloudshiftdev.awscdk.services.ec2.CfnLocalGatewayRouteTableVPCAssociation].
*/
@CdkDslMarker
public interface Builder {
/**
* The ID of the local gateway route table.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-localgatewayroutetablevpcassociation.html#cfn-ec2-localgatewayroutetablevpcassociation-localgatewayroutetableid)
* @param localGatewayRouteTableId The ID of the local gateway route table.
*/
public fun localGatewayRouteTableId(localGatewayRouteTableId: String)
/**
* The tags assigned to the association.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-localgatewayroutetablevpcassociation.html#cfn-ec2-localgatewayroutetablevpcassociation-tags)
* @param tags The tags assigned to the association.
*/
public fun tags(tags: List)
/**
* The tags assigned to the association.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-localgatewayroutetablevpcassociation.html#cfn-ec2-localgatewayroutetablevpcassociation-tags)
* @param tags The tags assigned to the association.
*/
public fun tags(vararg tags: CfnTag)
/**
* The ID of the VPC.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-localgatewayroutetablevpcassociation.html#cfn-ec2-localgatewayroutetablevpcassociation-vpcid)
* @param vpcId The ID of the VPC.
*/
public fun vpcId(vpcId: String)
}
private class BuilderImpl(
scope: SoftwareConstructsConstruct,
id: String,
) : Builder {
private val cdkBuilder:
software.amazon.awscdk.services.ec2.CfnLocalGatewayRouteTableVPCAssociation.Builder =
software.amazon.awscdk.services.ec2.CfnLocalGatewayRouteTableVPCAssociation.Builder.create(scope,
id)
/**
* The ID of the local gateway route table.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-localgatewayroutetablevpcassociation.html#cfn-ec2-localgatewayroutetablevpcassociation-localgatewayroutetableid)
* @param localGatewayRouteTableId The ID of the local gateway route table.
*/
override fun localGatewayRouteTableId(localGatewayRouteTableId: String) {
cdkBuilder.localGatewayRouteTableId(localGatewayRouteTableId)
}
/**
* The tags assigned to the association.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-localgatewayroutetablevpcassociation.html#cfn-ec2-localgatewayroutetablevpcassociation-tags)
* @param tags The tags assigned to the association.
*/
override fun tags(tags: List) {
cdkBuilder.tags(tags.map(CfnTag.Companion::unwrap))
}
/**
* The tags assigned to the association.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-localgatewayroutetablevpcassociation.html#cfn-ec2-localgatewayroutetablevpcassociation-tags)
* @param tags The tags assigned to the association.
*/
override fun tags(vararg tags: CfnTag): Unit = tags(tags.toList())
/**
* The ID of the VPC.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-localgatewayroutetablevpcassociation.html#cfn-ec2-localgatewayroutetablevpcassociation-vpcid)
* @param vpcId The ID of the VPC.
*/
override fun vpcId(vpcId: String) {
cdkBuilder.vpcId(vpcId)
}
public fun build(): software.amazon.awscdk.services.ec2.CfnLocalGatewayRouteTableVPCAssociation
= cdkBuilder.build()
}
public companion object {
public val CFN_RESOURCE_TYPE_NAME: String =
software.amazon.awscdk.services.ec2.CfnLocalGatewayRouteTableVPCAssociation.CFN_RESOURCE_TYPE_NAME
public operator fun invoke(
scope: CloudshiftdevConstructsConstruct,
id: String,
block: Builder.() -> Unit = {},
): CfnLocalGatewayRouteTableVPCAssociation {
val builderImpl = BuilderImpl(CloudshiftdevConstructsConstruct.unwrap(scope), id)
return CfnLocalGatewayRouteTableVPCAssociation(builderImpl.apply(block).build())
}
internal
fun wrap(cdkObject: software.amazon.awscdk.services.ec2.CfnLocalGatewayRouteTableVPCAssociation):
CfnLocalGatewayRouteTableVPCAssociation = CfnLocalGatewayRouteTableVPCAssociation(cdkObject)
internal fun unwrap(wrapped: CfnLocalGatewayRouteTableVPCAssociation):
software.amazon.awscdk.services.ec2.CfnLocalGatewayRouteTableVPCAssociation =
wrapped.cdkObject as
software.amazon.awscdk.services.ec2.CfnLocalGatewayRouteTableVPCAssociation
}
}