Class CrossAccountDestination
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.logs.CrossAccountDestination
- All Implemented Interfaces:
IEnvironmentAware,IResource,ILogSubscriptionDestination,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.120.0 (build 192dc88)",
date="2025-12-05T22:26:39.890Z")
@Stability(Stable)
public class CrossAccountDestination
extends Resource
implements ILogSubscriptionDestination
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-lib/aws-logs-destinations package; if necessary, a
CrossAccountDestination will be created automatically.
Example:
// 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;
CrossAccountDestination crossAccountDestination = CrossAccountDestination.Builder.create(this, "MyCrossAccountDestination")
.role(roleRef)
.targetArn("targetArn")
// the properties below are optional
.destinationName("destinationName")
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCrossAccountDestination.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.logs.ILogSubscriptionDestination
ILogSubscriptionDestination.Jsii$Default, ILogSubscriptionDestination.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCrossAccountDestination(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCrossAccountDestination(software.amazon.jsii.JsiiObjectRef objRef) CrossAccountDestination(software.constructs.Construct scope, String id, CrossAccountDestinationProps props) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToPolicy(PolicyStatement statement) Return the properties required to send subscription events to this destination.The ARN of this CrossAccountDestination object.The name of this CrossAccountDestination object.Policy object of this CrossAccountDestination object.Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourceMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
PROPERTY_INJECTION_ID
Uniquely identifies this class.
-
-
Constructor Details
-
CrossAccountDestination
protected CrossAccountDestination(software.amazon.jsii.JsiiObjectRef objRef) -
CrossAccountDestination
protected CrossAccountDestination(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CrossAccountDestination
@Stability(Stable) public CrossAccountDestination(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CrossAccountDestinationProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props- This parameter is required.
-
-
Method Details
-
addToPolicy
- Parameters:
statement- This parameter is required.
-
bind
@Stability(Stable) @NotNull public LogSubscriptionDestinationConfig bind(@NotNull software.constructs.Construct _scope, @NotNull ILogGroup _sourceLogGroup) 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.
- Specified by:
bindin interfaceILogSubscriptionDestination- Parameters:
_scope- This parameter is required._sourceLogGroup- This parameter is required.
-
getDestinationArn
The ARN of this CrossAccountDestination object. -
getDestinationName
The name of this CrossAccountDestination object. -
getPolicyDocument
Policy object of this CrossAccountDestination object.
-