Class CfnCrossAccountAttachment

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.globalaccelerator.CfnCrossAccountAttachment
All Implemented Interfaces:
IInspectable, ITaggableV2, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-02T15:58:27.237Z") @Stability(Stable) public class CfnCrossAccountAttachment extends CfnResource implements IInspectable, ITaggableV2
Create a cross-account attachment in AWS Global Accelerator .

You create a cross-account attachment to specify the principals who have permission to work with resources in accelerators in their own account. You specify, in the same attachment, the resources that are shared.

A principal can be an AWS account number or the Amazon Resource Name (ARN) for an accelerator. For account numbers that are listed as principals, to work with a resource listed in the attachment, you must sign in to an account specified as a principal. Then, you can work with resources that are listed, with any of your accelerators. If an accelerator ARN is listed in the cross-account attachment as a principal, anyone with permission to make updates to the accelerator can work with resources that are listed in the attachment.

Specify each principal and resource separately. To specify two CIDR address pools, list them individually under Resources , and so on. For a command line operation, for example, you might use a statement like the following:

"Resources": [{"Cidr": "169.254.60.0/24"},{"Cidr": "169.254.59.0/24"}]

For more information, see Working with cross-account attachments and resources in AWS Global Accelerator in the AWS Global Accelerator Developer Guide .

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.globalaccelerator.*;
 CfnCrossAccountAttachment cfnCrossAccountAttachment = CfnCrossAccountAttachment.Builder.create(this, "MyCfnCrossAccountAttachment")
         .name("name")
         // the properties below are optional
         .principals(List.of("principals"))
         .resources(List.of(ResourceProperty.builder()
                 .endpointId("endpointId")
                 // the properties below are optional
                 .region("region")
                 .build()))
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .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

    • CfnCrossAccountAttachment

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

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

      @Stability(Stable) public CfnCrossAccountAttachment(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnCrossAccountAttachmentProps 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. 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.
    • getAttrAttachmentArn

      @Stability(Stable) @NotNull public String getAttrAttachmentArn()
      The Amazon Resource Name (ARN) of the cross-account attachment.
    • getCdkTagManager

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

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

      @Stability(Stable) @NotNull public String getName()
      The name of the cross-account attachment.
    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      The name of the cross-account attachment.
    • getPrincipals

      @Stability(Stable) @Nullable public List<String> getPrincipals()
      The principals included in the cross-account attachment.
    • setPrincipals

      @Stability(Stable) public void setPrincipals(@Nullable List<String> value)
      The principals included in the cross-account attachment.
    • getResources

      @Stability(Stable) @Nullable public Object getResources()
      The resources included in the cross-account attachment.
    • setResources

      @Stability(Stable) public void setResources(@Nullable IResolvable value)
      The resources included in the cross-account attachment.
    • setResources

      @Stability(Stable) public void setResources(@Nullable List<Object> value)
      The resources included in the cross-account attachment.
    • getTags

      @Stability(Stable) @Nullable public List<CfnTag> getTags()
      Add tags for a cross-account attachment.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)
      Add tags for a cross-account attachment.