@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-14T16:25:27.601Z") public class CrossAccountDestination extends Resource implements ILogSubscriptionDestination
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();
Modifier and Type | Class and Description |
---|---|
static class |
CrossAccountDestination.Builder
A fluent builder for
CrossAccountDestination . |
ILogSubscriptionDestination.Jsii$Default, ILogSubscriptionDestination.Jsii$Proxy
IResource.Jsii$Default
Modifier | Constructor and Description |
---|---|
protected |
CrossAccountDestination(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CrossAccountDestination(software.amazon.jsii.JsiiObjectRef objRef) |
|
CrossAccountDestination(software.constructs.Construct scope,
java.lang.String id,
CrossAccountDestinationProps props) |
Modifier and Type | Method and Description |
---|---|
void |
addToPolicy(PolicyStatement statement) |
LogSubscriptionDestinationConfig |
bind(Construct _scope,
ILogGroup _sourceLogGroup)
Return the properties required to send subscription events to this destination.
|
java.lang.String |
getDestinationArn()
The ARN of this CrossAccountDestination object.
|
java.lang.String |
getDestinationName()
The name of this CrossAccountDestination object.
|
PolicyDocument |
getPolicyDocument()
Policy object of this CrossAccountDestination object.
|
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResource
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getNode
protected CrossAccountDestination(software.amazon.jsii.JsiiObjectRef objRef)
protected CrossAccountDestination(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CrossAccountDestination(software.constructs.Construct scope, java.lang.String id, CrossAccountDestinationProps props)
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.public void addToPolicy(PolicyStatement statement)
statement
- This parameter is required.public LogSubscriptionDestinationConfig bind(Construct _scope, ILogGroup _sourceLogGroup)
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.
bind
in interface ILogSubscriptionDestination
_scope
- This parameter is required._sourceLogGroup
- This parameter is required.public java.lang.String getDestinationArn()
public java.lang.String getDestinationName()
public PolicyDocument getPolicyDocument()