Class CfnServiceNetworkVpcAssociation

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.vpclattice.CfnServiceNetworkVpcAssociation
All Implemented Interfaces:
IInspectable, ITaggable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-08T21:35:14.818Z") @Stability(Stable) public class CfnServiceNetworkVpcAssociation extends CfnResource implements IInspectable, ITaggable
Associates a VPC with a service network.

When you associate a VPC with the service network, it enables all the resources within that VPC to be clients and communicate with other services in the service network. For more information, see Manage VPC associations in the Amazon VPC Lattice User Guide .

You can't use this operation if there is a disassociation in progress. If the association fails, retry by deleting the association and recreating it.

As a result of this operation, the association gets created in the service network account and the VPC owner account.

If you add a security group to the service network and VPC association, the association must continue to always have at least one security group. You can add or edit security groups at any time. However, to remove all security groups, you must first delete the association and recreate it without security groups.

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.vpclattice.*;
 CfnServiceNetworkVpcAssociation cfnServiceNetworkVpcAssociation = CfnServiceNetworkVpcAssociation.Builder.create(this, "MyCfnServiceNetworkVpcAssociation")
         .securityGroupIds(List.of("securityGroupIds"))
         .serviceNetworkIdentifier("serviceNetworkIdentifier")
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .vpcIdentifier("vpcIdentifier")
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnServiceNetworkVpcAssociation

      protected CfnServiceNetworkVpcAssociation(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnServiceNetworkVpcAssociation

      protected CfnServiceNetworkVpcAssociation(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnServiceNetworkVpcAssociation

      @Stability(Stable) public CfnServiceNetworkVpcAssociation(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable CfnServiceNetworkVpcAssociationProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties.
    • CfnServiceNetworkVpcAssociation

      @Stability(Stable) public CfnServiceNetworkVpcAssociation(@NotNull software.constructs.Construct scope, @NotNull String id)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The Amazon Resource Name (ARN) of the association between the service network and the VPC.
    • getAttrCreatedAt

      @Stability(Stable) @NotNull public String getAttrCreatedAt()
      The date and time that the association was created, specified in ISO-8601 format.
    • getAttrId

      @Stability(Stable) @NotNull public String getAttrId()
      The ID of the specified association between the service network and the VPC.
    • getAttrServiceNetworkArn

      @Stability(Stable) @NotNull public String getAttrServiceNetworkArn()
      The Amazon Resource Name (ARN) of the service network.
    • getAttrServiceNetworkId

      @Stability(Stable) @NotNull public String getAttrServiceNetworkId()
      The ID of the service network.
    • getAttrServiceNetworkName

      @Stability(Stable) @NotNull public String getAttrServiceNetworkName()
      The name of the service network.
    • getAttrStatus

      @Stability(Stable) @NotNull public String getAttrStatus()
      The status of the association.
    • getAttrVpcId

      @Stability(Stable) @NotNull public String getAttrVpcId()
      The ID of the VPC.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getSecurityGroupIds

      @Stability(Stable) @Nullable public List<String> getSecurityGroupIds()
      The IDs of the security groups.
    • setSecurityGroupIds

      @Stability(Stable) public void setSecurityGroupIds(@Nullable List<String> value)
      The IDs of the security groups.
    • getServiceNetworkIdentifier

      @Stability(Stable) @Nullable public String getServiceNetworkIdentifier()
      The ID or Amazon Resource Name (ARN) of the service network.
    • setServiceNetworkIdentifier

      @Stability(Stable) public void setServiceNetworkIdentifier(@Nullable String value)
      The ID or Amazon Resource Name (ARN) of the service network.
    • getTagsRaw

      @Stability(Stable) @Nullable public List<CfnTag> getTagsRaw()
      The tags for the association.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnTag> value)
      The tags for the association.
    • getVpcIdentifier

      @Stability(Stable) @Nullable public String getVpcIdentifier()
      The ID of the VPC.
    • setVpcIdentifier

      @Stability(Stable) public void setVpcIdentifier(@Nullable String value)
      The ID of the VPC.