Class CrossAccountDestination

All Implemented Interfaces:
IConstruct, IDependable, IResource, ILogSubscriptionDestination,, 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.


 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 Role role;
 CrossAccountDestination crossAccountDestination = CrossAccountDestination.Builder.create(this, "MyCrossAccountDestination")
         // the properties below are optional
  • Constructor Details

    • CrossAccountDestination

      protected CrossAccountDestination( objRef)
    • CrossAccountDestination

      protected CrossAccountDestination( initializationMode)
    • CrossAccountDestination

      @Stability(Stable) public CrossAccountDestination(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CrossAccountDestinationProps props)
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.
  • Method Details

    • addToPolicy

      @Stability(Stable) public void addToPolicy(@NotNull PolicyStatement statement)
      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 interface ILogSubscriptionDestination
      _scope - This parameter is required.
      _sourceLogGroup - This parameter is required.
    • getDestinationArn

      @Stability(Stable) @NotNull public String getDestinationArn()
      The ARN of this CrossAccountDestination object.
    • getDestinationName

      @Stability(Stable) @NotNull public String getDestinationName()
      The name of this CrossAccountDestination object.
    • getPolicyDocument

      @Stability(Stable) @NotNull public PolicyDocument getPolicyDocument()
      Policy object of this CrossAccountDestination object.