# CfnCrossAccountAttachmentProps

Properties for defining a `CfnCrossAccountAttachment`.

Used as props by: [CfnCrossAccountAttachment](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_globalaccelerator.CfnCrossAccountAttachment.html)

- Source: Generated at build time
- Type last changed: v2.138.0 · 18 Apr 2024

## Example

TypeScript:

```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:

```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:

```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();
```

C# / .NET:

```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"
    } }
};
```

Golang:

```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

- `name`: string (required) — The name of the cross-account attachment.

- `principals`: string[] — The principals included in the cross-account attachment.

- `resources`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnCrossAccountAttachment.ResourceProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_globalaccelerator.CfnCrossAccountAttachment.ResourceProperty.html)[] — The resources included in the cross-account attachment.

- `tags`: [CfnTag](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — Add tags for a cross-account attachment.

  For more information, see [Tagging in AWS Global Accelerator](https://docs.aws.amazon.com/global-accelerator/latest/dg/tagging-in-global-accelerator.html) in the *AWS Global Accelerator Developer Guide* .
