# CrossAccountDestinationProps

Properties for a CrossAccountDestination.

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

- Source: [`aws-logs/lib/cross-account-destination.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-logs/lib/cross-account-destination.ts#L15)
- Type last changed: v2.224.0 · 13 Nov 2025

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_logs as logs } from 'aws-cdk-lib';
import { aws_iam as interfaces_iam } from 'aws-cdk-lib/interfaces';

declare const roleRef: interfaces_iam.IRoleRef;
const crossAccountDestinationProps: logs.CrossAccountDestinationProps = {
  role: roleRef,
  targetArn: 'targetArn',

  // the properties below are optional
  destinationName: 'destinationName',
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_logs as logs
from aws_cdk.interfaces import aws_iam as interfaces_iam

# role_ref: interfaces_iam.IRoleRef

cross_account_destination_props = logs.CrossAccountDestinationProps(
    role=role_ref,
    target_arn="targetArn",

    # the properties below are optional
    destination_name="destinationName"
)
```

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.logs.*;
import software.amazon.awscdk.interfaces.iam.*;

IRoleRef roleRef;

CrossAccountDestinationProps crossAccountDestinationProps = CrossAccountDestinationProps.builder()
        .role(roleRef)
        .targetArn("targetArn")

        // the properties below are optional
        .destinationName("destinationName")
        .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.Logs;
using Amazon.CDK.Interfaces.IAM;

IRoleRef roleRef;

var crossAccountDestinationProps = new CrossAccountDestinationProps {
    Role = roleRef,
    TargetArn = "targetArn",

    // the properties below are optional
    DestinationName = "destinationName"
};
```

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"
import "github.com/aws/aws-cdk-go/awscdk"

var roleRef IRoleRef

crossAccountDestinationProps := &CrossAccountDestinationProps{
	Role: roleRef,
	TargetArn: jsii.String("targetArn"),

	// the properties below are optional
	DestinationName: jsii.String("destinationName"),
}
```

## Properties

- `destinationName`: string — The name of the log destination.

  **Default:** Automatically generated

- `role`: [IRoleRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_iam.IRoleRef.html) (required) — The role to assume that grants permissions to write to 'target'.

  The role must be assumable by 'logs.{REGION}.amazonaws.com'.

- `targetArn`: string (required) — The log destination target's ARN.
