Class CfnCrossAccountAttachment
- All Implemented Interfaces:
IInspectable,ICrossAccountAttachmentRef,IEnvironmentAware,ITaggableV2,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
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()
.cidr("cidr")
.endpointId("endpointId")
.region("region")
.build()))
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnCrossAccountAttachment.static interfaceA resource is one of the following: the ARN for an AWS resource that is supported by AWS Global Accelerator to be added as an endpoint, or a CIDR range that specifies a bring your own IP (BYOIP) address pool.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.globalaccelerator.ICrossAccountAttachmentRef
ICrossAccountAttachmentRef.Jsii$Default, ICrossAccountAttachmentRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggableV2
ITaggableV2.Jsii$Default, ITaggableV2.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnCrossAccountAttachment(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnCrossAccountAttachment(software.amazon.jsii.JsiiObjectRef objRef) CfnCrossAccountAttachment(software.constructs.Construct scope, String id, CfnCrossAccountAttachmentProps props) Create a newAWS::GlobalAccelerator::CrossAccountAttachment. -
Method Summary
Modifier and TypeMethodDescriptionThe Amazon Resource Name (ARN) of the cross-account attachment.Tag Manager which manages the tags for this resource.A reference to a CrossAccountAttachment resource.getName()The name of the cross-account attachment.The principals included in the cross-account attachment.The resources included in the cross-account attachment.getTags()Add tags for a cross-account attachment.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanChecks whether the given object is a CfnCrossAccountAttachment.renderProperties(Map<String, Object> props) voidThe name of the cross-account attachment.voidsetPrincipals(List<String> value) The principals included in the cross-account attachment.voidsetResources(List<Object> value) The resources included in the cross-account attachment.voidsetResources(IResolvable value) The resources included in the cross-account attachment.voidAdd tags for a cross-account attachment.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
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) Create a newAWS::GlobalAccelerator::CrossAccountAttachment.- 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
-
isCfnCrossAccountAttachment
Checks whether the given object is a CfnCrossAccountAttachment.- Parameters:
x- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- 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:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrAttachmentArn
The Amazon Resource Name (ARN) of the cross-account attachment. -
getCdkTagManager
Tag Manager which manages the tags for this resource.- Specified by:
getCdkTagManagerin interfaceITaggableV2
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getCrossAccountAttachmentRef
A reference to a CrossAccountAttachment resource.- Specified by:
getCrossAccountAttachmentRefin interfaceICrossAccountAttachmentRef
-
getName
The name of the cross-account attachment. -
setName
The name of the cross-account attachment. -
getPrincipals
The principals included in the cross-account attachment. -
setPrincipals
The principals included in the cross-account attachment. -
getResources
The resources included in the cross-account attachment.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnCrossAccountAttachment.ResourceProperty> -
setResources
The resources included in the cross-account attachment. -
setResources
The resources included in the cross-account attachment. -
getTags
Add tags for a cross-account attachment. -
setTags
Add tags for a cross-account attachment.
-