Class CrossAccountDestination
A new CloudWatch Logs Destination for use in cross-account scenarios.
Inherited Members
Namespace: Amazon.CDK.AWS.Logs
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CrossAccountDestination : Resource, IResource, ILogSubscriptionDestination
Syntax (vb)
Public Class CrossAccountDestination
Inherits Resource
Implements IResource, ILogSubscriptionDestination
Remarks
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-lib/aws-logs-destinations
package; if necessary, a
CrossAccountDestination
will be created automatically.
Resource: AWS::Logs::Destination
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.IAM;
using Amazon.CDK.AWS.Logs;
Role role;
var crossAccountDestination = new CrossAccountDestination(this, "MyCrossAccountDestination", new CrossAccountDestinationProps {
Role = role,
TargetArn = "targetArn",
// the properties below are optional
DestinationName = "destinationName"
});
Synopsis
Constructors
CrossAccountDestination(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CrossAccountDestination(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CrossAccountDestination(Construct, String, ICrossAccountDestinationProps) |
Properties
DestinationArn | The ARN of this CrossAccountDestination object. |
DestinationName | The name of this CrossAccountDestination object. |
PolicyDocument | Policy object of this CrossAccountDestination object. |
Methods
AddToPolicy(PolicyStatement) | |
Bind(Construct, ILogGroup) | Return the properties required to send subscription events to this destination. |
Constructors
CrossAccountDestination(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CrossAccountDestination(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CrossAccountDestination(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CrossAccountDestination(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CrossAccountDestination(Construct, String, ICrossAccountDestinationProps)
public CrossAccountDestination(Construct scope, string id, ICrossAccountDestinationProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props ICrossAccountDestinationProps
Properties
DestinationArn
The ARN of this CrossAccountDestination object.
public virtual string DestinationArn { get; }
Property Value
System.String
Remarks
Attribute: true
DestinationName
The name of this CrossAccountDestination object.
public virtual string DestinationName { get; }
Property Value
System.String
Remarks
Attribute: true
PolicyDocument
Policy object of this CrossAccountDestination object.
public virtual PolicyDocument PolicyDocument { get; }
Property Value
Methods
AddToPolicy(PolicyStatement)
Bind(Construct, ILogGroup)
Return the properties required to send subscription events to this destination.
public virtual ILogSubscriptionDestinationConfig Bind(Construct scope, ILogGroup sourceLogGroup)
Parameters
- scope Constructs.Construct
- sourceLogGroup ILogGroup
Returns
ILogSubscriptionDestinationConfig
Remarks
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.