1 | import { IResource, RemovalPolicy, Resource } from '@aws-cdk/core';
|
2 | import { Construct } from 'constructs';
|
3 | import { ILogGroup } from './log-group';
|
4 | export interface ILogStream extends IResource {
|
5 | /**
|
6 | * The name of this log stream
|
7 | * @attribute
|
8 | */
|
9 | readonly logStreamName: string;
|
10 | }
|
11 | /**
|
12 | * Properties for a LogStream
|
13 | */
|
14 | export interface LogStreamProps {
|
15 | /**
|
16 | * The log group to create a log stream for.
|
17 | */
|
18 | readonly logGroup: ILogGroup;
|
19 | /**
|
20 | * The name of the log stream to create.
|
21 | *
|
22 | * The name must be unique within the log group.
|
23 | *
|
24 | * @default Automatically generated
|
25 | */
|
26 | readonly logStreamName?: string;
|
27 | /**
|
28 | * Determine what happens when the log stream resource is removed from the
|
29 | * app.
|
30 | *
|
31 | * Normally you want to retain the log stream so you can diagnose issues from
|
32 | * logs even after a deployment that no longer includes the log stream.
|
33 | *
|
34 | * The date-based retention policy of your log group will age out the logs
|
35 | * after a certain time.
|
36 | *
|
37 | * @default RemovalPolicy.Retain
|
38 | */
|
39 | readonly removalPolicy?: RemovalPolicy;
|
40 | }
|
41 | /**
|
42 | * Define a Log Stream in a Log Group
|
43 | */
|
44 | export declare class LogStream extends Resource implements ILogStream {
|
45 | /**
|
46 | * Import an existing LogGroup
|
47 | */
|
48 | static fromLogStreamName(scope: Construct, id: string, logStreamName: string): ILogStream;
|
49 | /**
|
50 | * The name of this log stream
|
51 | */
|
52 | readonly logStreamName: string;
|
53 | constructor(scope: Construct, id: string, props: LogStreamProps);
|
54 | }
|