Class CrossAccountDestination
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.core.Construct
software.amazon.awscdk.core.Resource
software.amazon.awscdk.services.logs.CrossAccountDestination
- All Implemented Interfaces:
IConstruct
,IDependable
,IResource
,ILogSubscriptionDestination
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:38.095Z")
@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/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.iam.*; import software.amazon.awscdk.services.logs.*; Role role; CrossAccountDestination crossAccountDestination = CrossAccountDestination.Builder.create(this, "MyCrossAccountDestination") .role(role) .targetArn("targetArn") // the properties below are optional .destinationName("destinationName") .build();
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A fluent builder forCrossAccountDestination
.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.logs.ILogSubscriptionDestination
ILogSubscriptionDestination.Jsii$Default, ILogSubscriptionDestination.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IResource
IResource.Jsii$Default
-
Constructor Summary
ModifierConstructorDescriptionprotected
CrossAccountDestination
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CrossAccountDestination
(software.amazon.jsii.JsiiObjectRef objRef) CrossAccountDestination
(software.constructs.Construct scope, String id, CrossAccountDestinationProps props) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addToPolicy
(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.core.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResource
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.constructs.Construct
toString
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.awscdk.core.IConstruct
getNode
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
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 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:
bind
in 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.
-