Skip to content
v2.278.0

CrossAccountDestinationProps Struct ​

Properties for a CrossAccountDestination.

Example ​

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
# 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
// 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();
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"
};
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 ​

destinationNameoptionalstringdestination_nameoptionalstrdestinationNameoptionalStringDestinationNameoptionalstringDestinationNameoptional*string #
The name of the log destination.

Default: Automatically generated

roleIRoleRefroleIRoleRefroleIRoleRefRoleIRoleRefRoleIRoleRef required #
The role to assume that grants permissions to write to 'target'.

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

targetArnstringtarget_arnstrtargetArnStringTargetArnstringTargetArn*string required #
The log destination target's ARN.