blogwright-core 0.4.0-beta.2 → 0.4.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aws/logs.d.ts +6 -0
- package/dist/aws/logs.js +15 -0
- package/package.json +1 -1
package/dist/aws/logs.d.ts
CHANGED
|
@@ -35,6 +35,12 @@ export declare class LogsClient {
|
|
|
35
35
|
constructor(client: SigningClient);
|
|
36
36
|
private call;
|
|
37
37
|
ensureLogGroup(name: string, tags?: ResourceTags): Promise<void>;
|
|
38
|
+
/**
|
|
39
|
+
* Create a log stream inside a log group, treating an existing stream as success.
|
|
40
|
+
* `CreateLogStream` takes no tags, so this carries none: a stream is tagged only
|
|
41
|
+
* through the group that holds it.
|
|
42
|
+
*/
|
|
43
|
+
ensureLogStream(logGroupName: string, logStreamName: string): Promise<void>;
|
|
38
44
|
putRetentionPolicy(name: string, retentionInDays: number): Promise<void>;
|
|
39
45
|
logGroupExists(name: string): Promise<boolean>;
|
|
40
46
|
deleteLogGroup(name: string): Promise<void>;
|
package/dist/aws/logs.js
CHANGED
|
@@ -33,6 +33,21 @@ export class LogsClient {
|
|
|
33
33
|
throw err;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Create a log stream inside a log group, treating an existing stream as success.
|
|
38
|
+
* `CreateLogStream` takes no tags, so this carries none: a stream is tagged only
|
|
39
|
+
* through the group that holds it.
|
|
40
|
+
*/
|
|
41
|
+
async ensureLogStream(logGroupName, logStreamName) {
|
|
42
|
+
try {
|
|
43
|
+
await this.call('CreateLogStream', { logGroupName, logStreamName });
|
|
44
|
+
}
|
|
45
|
+
catch (err) {
|
|
46
|
+
if (err instanceof AwsError && err.isAlreadyExists)
|
|
47
|
+
return;
|
|
48
|
+
throw err;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
36
51
|
async putRetentionPolicy(name, retentionInDays) {
|
|
37
52
|
await this.call('PutRetentionPolicy', { logGroupName: name, retentionInDays });
|
|
38
53
|
}
|