CrossAccountDestination

class aws_cdk.aws_logs.CrossAccountDestination(scope, id, *, role, target_arn, destination_name=None)

Bases: aws_cdk.core.Resource

A new CloudWatch Logs Destination for use in cross-account scenarios.

CrossAccountDestinations are used to subscribe a Kinesis stream in a different account to a CloudWatch Subscription.

Consumers will hardly ever need to use this class. Instead, directly subscribe a Kinesis stream using the integration class in the @aws-cdk/aws-logs-destinations package; if necessary, a CrossAccountDestination will be created automatically.

resource: :resource:: AWS::Logs::Destination

__init__(scope, id, *, role, target_arn, destination_name=None)
Parameters
  • scope (Construct) –

  • id (str) –

  • props

  • role (IRole) – The role to assume that grants permissions to write to ‘target’. The role must be assumable by ‘logs.{REGION}.amazonaws.com’.

  • target_arn (str) – The log destination target’s ARN.

  • destination_name (Optional[str]) – The name of the log destination. Default: Automatically generated

Return type

None

Methods

add_to_policy(statement)
Parameters

statement (PolicyStatement) –

Return type

None

bind(_scope, _source_log_group)

Return the properties required to send subscription events to this destination.

If necessary, the destination can use the properties of the SubscriptionFilter object itself to configure its permissions to allow the subscription to write to it.

The destination may reconfigure its own permissions in response to this function call.

Parameters
Return type

LogSubscriptionDestinationConfig

to_string()

Returns a string representation of this construct.

Return type

str

Attributes

destination_arn

The ARN of this CrossAccountDestination object.

attribute: :attribute:: true

Return type

str

destination_name

The name of this CrossAccountDestination object.

attribute: :attribute:: true

Return type

str

node

Construct tree node which offers APIs for interacting with the construct tree.

Return type

ConstructNode

policy_document

Policy object of this CrossAccountDestination object.

Return type

PolicyDocument

stack

The stack in which this resource is defined.

Return type

Stack

Static Methods

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters

x (Any) –

Return type

bool