Skip to content
v2.278.0

CfnCrossAccountAttachmentProps Struct ​

Properties for defining a CfnCrossAccountAttachment.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_globalaccelerator as globalaccelerator } from 'aws-cdk-lib';
const cfnCrossAccountAttachmentProps: globalaccelerator.CfnCrossAccountAttachmentProps = {
  name: 'name',

  // the properties below are optional
  principals: ['principals'],
  resources: [{
    cidr: 'cidr',
    endpointId: 'endpointId',
    region: 'region',
  }],
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_globalaccelerator as globalaccelerator

cfn_cross_account_attachment_props = globalaccelerator.CfnCrossAccountAttachmentProps(
    name="name",

    # the properties below are optional
    principals=["principals"],
    resources=[globalaccelerator.CfnCrossAccountAttachment.ResourceProperty(
        cidr="cidr",
        endpoint_id="endpointId",
        region="region"
    )],
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
java
// 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.*;

CfnCrossAccountAttachmentProps cfnCrossAccountAttachmentProps = CfnCrossAccountAttachmentProps.builder()
        .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();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.GlobalAccelerator;

var cfnCrossAccountAttachmentProps = new CfnCrossAccountAttachmentProps {
    Name = "name",

    // the properties below are optional
    Principals = new [] { "principals" },
    Resources = new [] { new ResourceProperty {
        Cidr = "cidr",
        EndpointId = "endpointId",
        Region = "region"
    } },
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnCrossAccountAttachmentProps := &CfnCrossAccountAttachmentProps{
	Name: jsii.String("name"),

	// the properties below are optional
	Principals: []*string{
		jsii.String("principals"),
	},
	Resources: []interface{}{
		&ResourceProperty{
			Cidr: jsii.String("cidr"),
			EndpointId: jsii.String("endpointId"),
			Region: jsii.String("region"),
		},
	},
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}

Properties ​

namestringnamestrnameStringNamestringName*string required #
The name of the cross-account attachment.
principalsoptionalstring[]principalsoptionaltyping.List[str]principalsoptionalList<String>Principalsoptionalstring[]Principalsoptional*[]*string #
The principals included in the cross-account attachment.
resourcesoptionalIResolvable | IResolvable | CfnCrossAccountAttachment.ResourceProperty[]resourcesoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ResourceProperty]]]resourcesoptionalIResolvableResourcesoptionalIResolvableResourcesoptionalinterface{} #
The resources included in the cross-account attachment.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #
Add tags for a cross-account attachment.

For more information, see Tagging in AWS Global Accelerator in the AWS Global Accelerator Developer Guide .