1 | import * as iam from '@aws-cdk/aws-iam';
|
2 | import { Resource } from '@aws-cdk/core';
|
3 | import { Construct } from 'constructs';
|
4 | import { ILogGroup, SubscriptionFilterOptions } from './log-group';
|
5 | import { Construct as CoreConstruct } from '@aws-cdk/core';
|
6 | /**
|
7 | * Interface for classes that can be the destination of a log Subscription
|
8 | */
|
9 | export interface ILogSubscriptionDestination {
|
10 | /**
|
11 | * Return the properties required to send subscription events to this destination.
|
12 | *
|
13 | * If necessary, the destination can use the properties of the SubscriptionFilter
|
14 | * object itself to configure its permissions to allow the subscription to write
|
15 | * to it.
|
16 | *
|
17 | * The destination may reconfigure its own permissions in response to this
|
18 | * function call.
|
19 | */
|
20 | bind(scope: CoreConstruct, sourceLogGroup: ILogGroup): LogSubscriptionDestinationConfig;
|
21 | }
|
22 | /**
|
23 | * Properties returned by a Subscription destination
|
24 | */
|
25 | export interface LogSubscriptionDestinationConfig {
|
26 | /**
|
27 | * The ARN of the subscription's destination
|
28 | */
|
29 | readonly arn: string;
|
30 | /**
|
31 | * The role to assume to write log events to the destination
|
32 | *
|
33 | * @default No role assumed
|
34 | */
|
35 | readonly role?: iam.IRole;
|
36 | }
|
37 | /**
|
38 | * Properties for a SubscriptionFilter
|
39 | */
|
40 | export interface SubscriptionFilterProps extends SubscriptionFilterOptions {
|
41 | /**
|
42 | * The log group to create the subscription on.
|
43 | */
|
44 | readonly logGroup: ILogGroup;
|
45 | }
|
46 | /**
|
47 | * A new Subscription on a CloudWatch log group.
|
48 | */
|
49 | export declare class SubscriptionFilter extends Resource {
|
50 | constructor(scope: Construct, id: string, props: SubscriptionFilterProps);
|
51 | }
|