@aws-sdk/client-cloudwatch-logs 3.347.1 → 3.348.0
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/README.md +24 -0
- package/dist-cjs/CloudWatchLogs.js +6 -0
- package/dist-cjs/commands/DeleteAccountPolicyCommand.js +46 -0
- package/dist-cjs/commands/DescribeAccountPoliciesCommand.js +46 -0
- package/dist-cjs/commands/PutAccountPolicyCommand.js +46 -0
- package/dist-cjs/commands/index.js +3 -0
- package/dist-cjs/endpoint/ruleset.js +3 -3
- package/dist-cjs/models/models_0.js +10 -1
- package/dist-cjs/protocols/Aws_json1_1.js +147 -2
- package/dist-es/CloudWatchLogs.js +6 -0
- package/dist-es/commands/DeleteAccountPolicyCommand.js +42 -0
- package/dist-es/commands/DescribeAccountPoliciesCommand.js +42 -0
- package/dist-es/commands/PutAccountPolicyCommand.js +42 -0
- package/dist-es/commands/index.js +3 -0
- package/dist-es/endpoint/ruleset.js +3 -3
- package/dist-es/models/models_0.js +9 -0
- package/dist-es/protocols/Aws_json1_1.js +138 -0
- package/dist-types/CloudWatchLogs.d.ts +21 -0
- package/dist-types/CloudWatchLogsClient.d.ts +5 -2
- package/dist-types/commands/CreateLogGroupCommand.d.ts +1 -1
- package/dist-types/commands/DeleteAccountPolicyCommand.d.ts +86 -0
- package/dist-types/commands/DescribeAccountPoliciesCommand.d.ts +98 -0
- package/dist-types/commands/DescribeLogGroupsCommand.d.ts +3 -0
- package/dist-types/commands/FilterLogEventsCommand.d.ts +1 -1
- package/dist-types/commands/PutAccountPolicyCommand.d.ts +121 -0
- package/dist-types/commands/PutDataProtectionPolicyCommand.d.ts +6 -0
- package/dist-types/commands/PutLogEventsCommand.d.ts +3 -0
- package/dist-types/commands/PutSubscriptionFilterCommand.d.ts +2 -1
- package/dist-types/commands/StartQueryCommand.d.ts +2 -2
- package/dist-types/commands/index.d.ts +3 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +1 -1
- package/dist-types/models/models_0.d.ts +194 -11
- package/dist-types/protocols/Aws_json1_1.d.ts +27 -0
- package/dist-types/ts3.4/CloudWatchLogs.d.ts +51 -0
- package/dist-types/ts3.4/CloudWatchLogsClient.d.ts +18 -0
- package/dist-types/ts3.4/commands/DeleteAccountPolicyCommand.d.ts +34 -0
- package/dist-types/ts3.4/commands/DescribeAccountPoliciesCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/PutAccountPolicyCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/index.d.ts +3 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +1 -1
- package/dist-types/ts3.4/models/models_0.d.ts +43 -0
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +36 -0
- package/package.json +4 -4
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { de_DescribeAccountPoliciesCommand, se_DescribeAccountPoliciesCommand } from "../protocols/Aws_json1_1";
|
|
5
|
+
export { $Command };
|
|
6
|
+
export class DescribeAccountPoliciesCommand extends $Command {
|
|
7
|
+
static getEndpointParameterInstructions() {
|
|
8
|
+
return {
|
|
9
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
10
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
11
|
+
Region: { type: "builtInParams", name: "region" },
|
|
12
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
constructor(input) {
|
|
16
|
+
super();
|
|
17
|
+
this.input = input;
|
|
18
|
+
}
|
|
19
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
20
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
21
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, DescribeAccountPoliciesCommand.getEndpointParameterInstructions()));
|
|
22
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
23
|
+
const { logger } = configuration;
|
|
24
|
+
const clientName = "CloudWatchLogsClient";
|
|
25
|
+
const commandName = "DescribeAccountPoliciesCommand";
|
|
26
|
+
const handlerExecutionContext = {
|
|
27
|
+
logger,
|
|
28
|
+
clientName,
|
|
29
|
+
commandName,
|
|
30
|
+
inputFilterSensitiveLog: (_) => _,
|
|
31
|
+
outputFilterSensitiveLog: (_) => _,
|
|
32
|
+
};
|
|
33
|
+
const { requestHandler } = configuration;
|
|
34
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
35
|
+
}
|
|
36
|
+
serialize(input, context) {
|
|
37
|
+
return se_DescribeAccountPoliciesCommand(input, context);
|
|
38
|
+
}
|
|
39
|
+
deserialize(output, context) {
|
|
40
|
+
return de_DescribeAccountPoliciesCommand(output, context);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { de_PutAccountPolicyCommand, se_PutAccountPolicyCommand } from "../protocols/Aws_json1_1";
|
|
5
|
+
export { $Command };
|
|
6
|
+
export class PutAccountPolicyCommand extends $Command {
|
|
7
|
+
static getEndpointParameterInstructions() {
|
|
8
|
+
return {
|
|
9
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
10
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
11
|
+
Region: { type: "builtInParams", name: "region" },
|
|
12
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
constructor(input) {
|
|
16
|
+
super();
|
|
17
|
+
this.input = input;
|
|
18
|
+
}
|
|
19
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
20
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
21
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, PutAccountPolicyCommand.getEndpointParameterInstructions()));
|
|
22
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
23
|
+
const { logger } = configuration;
|
|
24
|
+
const clientName = "CloudWatchLogsClient";
|
|
25
|
+
const commandName = "PutAccountPolicyCommand";
|
|
26
|
+
const handlerExecutionContext = {
|
|
27
|
+
logger,
|
|
28
|
+
clientName,
|
|
29
|
+
commandName,
|
|
30
|
+
inputFilterSensitiveLog: (_) => _,
|
|
31
|
+
outputFilterSensitiveLog: (_) => _,
|
|
32
|
+
};
|
|
33
|
+
const { requestHandler } = configuration;
|
|
34
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
35
|
+
}
|
|
36
|
+
serialize(input, context) {
|
|
37
|
+
return se_PutAccountPolicyCommand(input, context);
|
|
38
|
+
}
|
|
39
|
+
deserialize(output, context) {
|
|
40
|
+
return de_PutAccountPolicyCommand(output, context);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -3,6 +3,7 @@ export * from "./CancelExportTaskCommand";
|
|
|
3
3
|
export * from "./CreateExportTaskCommand";
|
|
4
4
|
export * from "./CreateLogGroupCommand";
|
|
5
5
|
export * from "./CreateLogStreamCommand";
|
|
6
|
+
export * from "./DeleteAccountPolicyCommand";
|
|
6
7
|
export * from "./DeleteDataProtectionPolicyCommand";
|
|
7
8
|
export * from "./DeleteDestinationCommand";
|
|
8
9
|
export * from "./DeleteLogGroupCommand";
|
|
@@ -12,6 +13,7 @@ export * from "./DeleteQueryDefinitionCommand";
|
|
|
12
13
|
export * from "./DeleteResourcePolicyCommand";
|
|
13
14
|
export * from "./DeleteRetentionPolicyCommand";
|
|
14
15
|
export * from "./DeleteSubscriptionFilterCommand";
|
|
16
|
+
export * from "./DescribeAccountPoliciesCommand";
|
|
15
17
|
export * from "./DescribeDestinationsCommand";
|
|
16
18
|
export * from "./DescribeExportTasksCommand";
|
|
17
19
|
export * from "./DescribeLogGroupsCommand";
|
|
@@ -30,6 +32,7 @@ export * from "./GetLogRecordCommand";
|
|
|
30
32
|
export * from "./GetQueryResultsCommand";
|
|
31
33
|
export * from "./ListTagsForResourceCommand";
|
|
32
34
|
export * from "./ListTagsLogGroupCommand";
|
|
35
|
+
export * from "./PutAccountPolicyCommand";
|
|
33
36
|
export * from "./PutDataProtectionPolicyCommand";
|
|
34
37
|
export * from "./PutDestinationCommand";
|
|
35
38
|
export * from "./PutDestinationPolicyCommand";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const s = "
|
|
2
|
-
const a =
|
|
3
|
-
const _data = { version: "1.0", parameters: { Region:
|
|
1
|
+
const s = "required", t = "fn", u = "argv", v = "ref";
|
|
2
|
+
const a = "isSet", b = "tree", c = "error", d = "endpoint", e = "PartitionResult", f = "stringEquals", g = { [s]: false, "type": "String" }, h = { [s]: true, "default": false, "type": "Boolean" }, i = { [v]: "Endpoint" }, j = { [t]: "booleanEquals", [u]: [{ [v]: "UseFIPS" }, true] }, k = { [t]: "booleanEquals", [u]: [{ [v]: "UseDualStack" }, true] }, l = {}, m = { [v]: "Region" }, n = { [t]: "booleanEquals", [u]: [true, { [t]: "getAttr", [u]: [{ [v]: e }, "supportsFIPS"] }] }, o = { [t]: "booleanEquals", [u]: [true, { [t]: "getAttr", [u]: [{ [v]: e }, "supportsDualStack"] }] }, p = [j], q = [k], r = [m];
|
|
3
|
+
const _data = { version: "1.0", parameters: { Region: g, UseDualStack: h, UseFIPS: h, Endpoint: g }, rules: [{ conditions: [{ [t]: a, [u]: [i] }], type: b, rules: [{ conditions: p, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: c }, { type: b, rules: [{ conditions: q, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: c }, { endpoint: { url: i, properties: l, headers: l }, type: d }] }] }, { type: b, rules: [{ conditions: [{ [t]: a, [u]: r }], type: b, rules: [{ conditions: [{ [t]: "aws.partition", [u]: r, assign: e }], type: b, rules: [{ conditions: [j, k], type: b, rules: [{ conditions: [n, o], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://logs-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: l, headers: l }, type: d }] }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: c }] }, { conditions: p, type: b, rules: [{ conditions: [n], type: b, rules: [{ type: b, rules: [{ conditions: [{ [t]: f, [u]: [m, "us-gov-east-1"] }], endpoint: { url: "https://logs.us-gov-east-1.amazonaws.com", properties: l, headers: l }, type: d }, { conditions: [{ [t]: f, [u]: [m, "us-gov-west-1"] }], endpoint: { url: "https://logs.us-gov-west-1.amazonaws.com", properties: l, headers: l }, type: d }, { endpoint: { url: "https://logs-fips.{Region}.{PartitionResult#dnsSuffix}", properties: l, headers: l }, type: d }] }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: c }] }, { conditions: q, type: b, rules: [{ conditions: [o], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://logs.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: l, headers: l }, type: d }] }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: c }] }, { type: b, rules: [{ endpoint: { url: "https://logs.{Region}.{PartitionResult#dnsSuffix}", properties: l, headers: l }, type: d }] }] }] }, { error: "Invalid Configuration: Missing Region", type: c }] }] };
|
|
4
4
|
export const ruleSet = _data;
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { CloudWatchLogsServiceException as __BaseException } from "./CloudWatchLogsServiceException";
|
|
2
|
+
export const PolicyType = {
|
|
3
|
+
DATA_PROTECTION_POLICY: "DATA_PROTECTION_POLICY",
|
|
4
|
+
};
|
|
5
|
+
export const Scope = {
|
|
6
|
+
ALL: "ALL",
|
|
7
|
+
};
|
|
2
8
|
export class InvalidParameterException extends __BaseException {
|
|
3
9
|
constructor(opts) {
|
|
4
10
|
super({
|
|
@@ -110,6 +116,9 @@ export const ExportTaskStatusCode = {
|
|
|
110
116
|
PENDING_CANCEL: "PENDING_CANCEL",
|
|
111
117
|
RUNNING: "RUNNING",
|
|
112
118
|
};
|
|
119
|
+
export const InheritedProperty = {
|
|
120
|
+
ACCOUNT_DATA_PROTECTION: "ACCOUNT_DATA_PROTECTION",
|
|
121
|
+
};
|
|
113
122
|
export const OrderBy = {
|
|
114
123
|
LastEventTime: "LastEventTime",
|
|
115
124
|
LogStreamName: "LogStreamName",
|
|
@@ -32,6 +32,12 @@ export const se_CreateLogStreamCommand = async (input, context) => {
|
|
|
32
32
|
body = JSON.stringify(_json(input));
|
|
33
33
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
34
34
|
};
|
|
35
|
+
export const se_DeleteAccountPolicyCommand = async (input, context) => {
|
|
36
|
+
const headers = sharedHeaders("DeleteAccountPolicy");
|
|
37
|
+
let body;
|
|
38
|
+
body = JSON.stringify(_json(input));
|
|
39
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
40
|
+
};
|
|
35
41
|
export const se_DeleteDataProtectionPolicyCommand = async (input, context) => {
|
|
36
42
|
const headers = sharedHeaders("DeleteDataProtectionPolicy");
|
|
37
43
|
let body;
|
|
@@ -86,6 +92,12 @@ export const se_DeleteSubscriptionFilterCommand = async (input, context) => {
|
|
|
86
92
|
body = JSON.stringify(_json(input));
|
|
87
93
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
88
94
|
};
|
|
95
|
+
export const se_DescribeAccountPoliciesCommand = async (input, context) => {
|
|
96
|
+
const headers = sharedHeaders("DescribeAccountPolicies");
|
|
97
|
+
let body;
|
|
98
|
+
body = JSON.stringify(_json(input));
|
|
99
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
100
|
+
};
|
|
89
101
|
export const se_DescribeDestinationsCommand = async (input, context) => {
|
|
90
102
|
const headers = sharedHeaders("DescribeDestinations");
|
|
91
103
|
let body;
|
|
@@ -194,6 +206,12 @@ export const se_ListTagsLogGroupCommand = async (input, context) => {
|
|
|
194
206
|
body = JSON.stringify(_json(input));
|
|
195
207
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
196
208
|
};
|
|
209
|
+
export const se_PutAccountPolicyCommand = async (input, context) => {
|
|
210
|
+
const headers = sharedHeaders("PutAccountPolicy");
|
|
211
|
+
let body;
|
|
212
|
+
body = JSON.stringify(_json(input));
|
|
213
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
214
|
+
};
|
|
197
215
|
export const se_PutDataProtectionPolicyCommand = async (input, context) => {
|
|
198
216
|
const headers = sharedHeaders("PutDataProtectionPolicy");
|
|
199
217
|
let body;
|
|
@@ -492,6 +510,44 @@ const de_CreateLogStreamCommandError = async (output, context) => {
|
|
|
492
510
|
});
|
|
493
511
|
}
|
|
494
512
|
};
|
|
513
|
+
export const de_DeleteAccountPolicyCommand = async (output, context) => {
|
|
514
|
+
if (output.statusCode >= 300) {
|
|
515
|
+
return de_DeleteAccountPolicyCommandError(output, context);
|
|
516
|
+
}
|
|
517
|
+
await collectBody(output.body, context);
|
|
518
|
+
const response = {
|
|
519
|
+
$metadata: deserializeMetadata(output),
|
|
520
|
+
};
|
|
521
|
+
return response;
|
|
522
|
+
};
|
|
523
|
+
const de_DeleteAccountPolicyCommandError = async (output, context) => {
|
|
524
|
+
const parsedOutput = {
|
|
525
|
+
...output,
|
|
526
|
+
body: await parseErrorBody(output.body, context),
|
|
527
|
+
};
|
|
528
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
529
|
+
switch (errorCode) {
|
|
530
|
+
case "InvalidParameterException":
|
|
531
|
+
case "com.amazonaws.cloudwatchlogs#InvalidParameterException":
|
|
532
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
533
|
+
case "OperationAbortedException":
|
|
534
|
+
case "com.amazonaws.cloudwatchlogs#OperationAbortedException":
|
|
535
|
+
throw await de_OperationAbortedExceptionRes(parsedOutput, context);
|
|
536
|
+
case "ResourceNotFoundException":
|
|
537
|
+
case "com.amazonaws.cloudwatchlogs#ResourceNotFoundException":
|
|
538
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
539
|
+
case "ServiceUnavailableException":
|
|
540
|
+
case "com.amazonaws.cloudwatchlogs#ServiceUnavailableException":
|
|
541
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
542
|
+
default:
|
|
543
|
+
const parsedBody = parsedOutput.body;
|
|
544
|
+
return throwDefaultError({
|
|
545
|
+
output,
|
|
546
|
+
parsedBody,
|
|
547
|
+
errorCode,
|
|
548
|
+
});
|
|
549
|
+
}
|
|
550
|
+
};
|
|
495
551
|
export const de_DeleteDataProtectionPolicyCommand = async (output, context) => {
|
|
496
552
|
if (output.statusCode >= 300) {
|
|
497
553
|
return de_DeleteDataProtectionPolicyCommandError(output, context);
|
|
@@ -831,6 +887,47 @@ const de_DeleteSubscriptionFilterCommandError = async (output, context) => {
|
|
|
831
887
|
});
|
|
832
888
|
}
|
|
833
889
|
};
|
|
890
|
+
export const de_DescribeAccountPoliciesCommand = async (output, context) => {
|
|
891
|
+
if (output.statusCode >= 300) {
|
|
892
|
+
return de_DescribeAccountPoliciesCommandError(output, context);
|
|
893
|
+
}
|
|
894
|
+
const data = await parseBody(output.body, context);
|
|
895
|
+
let contents = {};
|
|
896
|
+
contents = _json(data);
|
|
897
|
+
const response = {
|
|
898
|
+
$metadata: deserializeMetadata(output),
|
|
899
|
+
...contents,
|
|
900
|
+
};
|
|
901
|
+
return response;
|
|
902
|
+
};
|
|
903
|
+
const de_DescribeAccountPoliciesCommandError = async (output, context) => {
|
|
904
|
+
const parsedOutput = {
|
|
905
|
+
...output,
|
|
906
|
+
body: await parseErrorBody(output.body, context),
|
|
907
|
+
};
|
|
908
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
909
|
+
switch (errorCode) {
|
|
910
|
+
case "InvalidParameterException":
|
|
911
|
+
case "com.amazonaws.cloudwatchlogs#InvalidParameterException":
|
|
912
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
913
|
+
case "OperationAbortedException":
|
|
914
|
+
case "com.amazonaws.cloudwatchlogs#OperationAbortedException":
|
|
915
|
+
throw await de_OperationAbortedExceptionRes(parsedOutput, context);
|
|
916
|
+
case "ResourceNotFoundException":
|
|
917
|
+
case "com.amazonaws.cloudwatchlogs#ResourceNotFoundException":
|
|
918
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
919
|
+
case "ServiceUnavailableException":
|
|
920
|
+
case "com.amazonaws.cloudwatchlogs#ServiceUnavailableException":
|
|
921
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
922
|
+
default:
|
|
923
|
+
const parsedBody = parsedOutput.body;
|
|
924
|
+
return throwDefaultError({
|
|
925
|
+
output,
|
|
926
|
+
parsedBody,
|
|
927
|
+
errorCode,
|
|
928
|
+
});
|
|
929
|
+
}
|
|
930
|
+
};
|
|
834
931
|
export const de_DescribeDestinationsCommand = async (output, context) => {
|
|
835
932
|
if (output.statusCode >= 300) {
|
|
836
933
|
return de_DescribeDestinationsCommandError(output, context);
|
|
@@ -1506,6 +1603,47 @@ const de_ListTagsLogGroupCommandError = async (output, context) => {
|
|
|
1506
1603
|
});
|
|
1507
1604
|
}
|
|
1508
1605
|
};
|
|
1606
|
+
export const de_PutAccountPolicyCommand = async (output, context) => {
|
|
1607
|
+
if (output.statusCode >= 300) {
|
|
1608
|
+
return de_PutAccountPolicyCommandError(output, context);
|
|
1609
|
+
}
|
|
1610
|
+
const data = await parseBody(output.body, context);
|
|
1611
|
+
let contents = {};
|
|
1612
|
+
contents = _json(data);
|
|
1613
|
+
const response = {
|
|
1614
|
+
$metadata: deserializeMetadata(output),
|
|
1615
|
+
...contents,
|
|
1616
|
+
};
|
|
1617
|
+
return response;
|
|
1618
|
+
};
|
|
1619
|
+
const de_PutAccountPolicyCommandError = async (output, context) => {
|
|
1620
|
+
const parsedOutput = {
|
|
1621
|
+
...output,
|
|
1622
|
+
body: await parseErrorBody(output.body, context),
|
|
1623
|
+
};
|
|
1624
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1625
|
+
switch (errorCode) {
|
|
1626
|
+
case "InvalidParameterException":
|
|
1627
|
+
case "com.amazonaws.cloudwatchlogs#InvalidParameterException":
|
|
1628
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1629
|
+
case "LimitExceededException":
|
|
1630
|
+
case "com.amazonaws.cloudwatchlogs#LimitExceededException":
|
|
1631
|
+
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
1632
|
+
case "OperationAbortedException":
|
|
1633
|
+
case "com.amazonaws.cloudwatchlogs#OperationAbortedException":
|
|
1634
|
+
throw await de_OperationAbortedExceptionRes(parsedOutput, context);
|
|
1635
|
+
case "ServiceUnavailableException":
|
|
1636
|
+
case "com.amazonaws.cloudwatchlogs#ServiceUnavailableException":
|
|
1637
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
1638
|
+
default:
|
|
1639
|
+
const parsedBody = parsedOutput.body;
|
|
1640
|
+
return throwDefaultError({
|
|
1641
|
+
output,
|
|
1642
|
+
parsedBody,
|
|
1643
|
+
errorCode,
|
|
1644
|
+
});
|
|
1645
|
+
}
|
|
1646
|
+
};
|
|
1509
1647
|
export const de_PutDataProtectionPolicyCommand = async (output, context) => {
|
|
1510
1648
|
if (output.statusCode >= 300) {
|
|
1511
1649
|
return de_PutDataProtectionPolicyCommandError(output, context);
|
|
@@ -5,6 +5,7 @@ import { CancelExportTaskCommandInput, CancelExportTaskCommandOutput } from "./c
|
|
|
5
5
|
import { CreateExportTaskCommandInput, CreateExportTaskCommandOutput } from "./commands/CreateExportTaskCommand";
|
|
6
6
|
import { CreateLogGroupCommandInput, CreateLogGroupCommandOutput } from "./commands/CreateLogGroupCommand";
|
|
7
7
|
import { CreateLogStreamCommandInput, CreateLogStreamCommandOutput } from "./commands/CreateLogStreamCommand";
|
|
8
|
+
import { DeleteAccountPolicyCommandInput, DeleteAccountPolicyCommandOutput } from "./commands/DeleteAccountPolicyCommand";
|
|
8
9
|
import { DeleteDataProtectionPolicyCommandInput, DeleteDataProtectionPolicyCommandOutput } from "./commands/DeleteDataProtectionPolicyCommand";
|
|
9
10
|
import { DeleteDestinationCommandInput, DeleteDestinationCommandOutput } from "./commands/DeleteDestinationCommand";
|
|
10
11
|
import { DeleteLogGroupCommandInput, DeleteLogGroupCommandOutput } from "./commands/DeleteLogGroupCommand";
|
|
@@ -14,6 +15,7 @@ import { DeleteQueryDefinitionCommandInput, DeleteQueryDefinitionCommandOutput }
|
|
|
14
15
|
import { DeleteResourcePolicyCommandInput, DeleteResourcePolicyCommandOutput } from "./commands/DeleteResourcePolicyCommand";
|
|
15
16
|
import { DeleteRetentionPolicyCommandInput, DeleteRetentionPolicyCommandOutput } from "./commands/DeleteRetentionPolicyCommand";
|
|
16
17
|
import { DeleteSubscriptionFilterCommandInput, DeleteSubscriptionFilterCommandOutput } from "./commands/DeleteSubscriptionFilterCommand";
|
|
18
|
+
import { DescribeAccountPoliciesCommandInput, DescribeAccountPoliciesCommandOutput } from "./commands/DescribeAccountPoliciesCommand";
|
|
17
19
|
import { DescribeDestinationsCommandInput, DescribeDestinationsCommandOutput } from "./commands/DescribeDestinationsCommand";
|
|
18
20
|
import { DescribeExportTasksCommandInput, DescribeExportTasksCommandOutput } from "./commands/DescribeExportTasksCommand";
|
|
19
21
|
import { DescribeLogGroupsCommandInput, DescribeLogGroupsCommandOutput } from "./commands/DescribeLogGroupsCommand";
|
|
@@ -32,6 +34,7 @@ import { GetLogRecordCommandInput, GetLogRecordCommandOutput } from "./commands/
|
|
|
32
34
|
import { GetQueryResultsCommandInput, GetQueryResultsCommandOutput } from "./commands/GetQueryResultsCommand";
|
|
33
35
|
import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
|
|
34
36
|
import { ListTagsLogGroupCommandInput, ListTagsLogGroupCommandOutput } from "./commands/ListTagsLogGroupCommand";
|
|
37
|
+
import { PutAccountPolicyCommandInput, PutAccountPolicyCommandOutput } from "./commands/PutAccountPolicyCommand";
|
|
35
38
|
import { PutDataProtectionPolicyCommandInput, PutDataProtectionPolicyCommandOutput } from "./commands/PutDataProtectionPolicyCommand";
|
|
36
39
|
import { PutDestinationCommandInput, PutDestinationCommandOutput } from "./commands/PutDestinationCommand";
|
|
37
40
|
import { PutDestinationPolicyCommandInput, PutDestinationPolicyCommandOutput } from "./commands/PutDestinationPolicyCommand";
|
|
@@ -79,6 +82,12 @@ export interface CloudWatchLogs {
|
|
|
79
82
|
createLogStream(args: CreateLogStreamCommandInput, options?: __HttpHandlerOptions): Promise<CreateLogStreamCommandOutput>;
|
|
80
83
|
createLogStream(args: CreateLogStreamCommandInput, cb: (err: any, data?: CreateLogStreamCommandOutput) => void): void;
|
|
81
84
|
createLogStream(args: CreateLogStreamCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateLogStreamCommandOutput) => void): void;
|
|
85
|
+
/**
|
|
86
|
+
* @see {@link DeleteAccountPolicyCommand}
|
|
87
|
+
*/
|
|
88
|
+
deleteAccountPolicy(args: DeleteAccountPolicyCommandInput, options?: __HttpHandlerOptions): Promise<DeleteAccountPolicyCommandOutput>;
|
|
89
|
+
deleteAccountPolicy(args: DeleteAccountPolicyCommandInput, cb: (err: any, data?: DeleteAccountPolicyCommandOutput) => void): void;
|
|
90
|
+
deleteAccountPolicy(args: DeleteAccountPolicyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteAccountPolicyCommandOutput) => void): void;
|
|
82
91
|
/**
|
|
83
92
|
* @see {@link DeleteDataProtectionPolicyCommand}
|
|
84
93
|
*/
|
|
@@ -133,6 +142,12 @@ export interface CloudWatchLogs {
|
|
|
133
142
|
deleteSubscriptionFilter(args: DeleteSubscriptionFilterCommandInput, options?: __HttpHandlerOptions): Promise<DeleteSubscriptionFilterCommandOutput>;
|
|
134
143
|
deleteSubscriptionFilter(args: DeleteSubscriptionFilterCommandInput, cb: (err: any, data?: DeleteSubscriptionFilterCommandOutput) => void): void;
|
|
135
144
|
deleteSubscriptionFilter(args: DeleteSubscriptionFilterCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteSubscriptionFilterCommandOutput) => void): void;
|
|
145
|
+
/**
|
|
146
|
+
* @see {@link DescribeAccountPoliciesCommand}
|
|
147
|
+
*/
|
|
148
|
+
describeAccountPolicies(args: DescribeAccountPoliciesCommandInput, options?: __HttpHandlerOptions): Promise<DescribeAccountPoliciesCommandOutput>;
|
|
149
|
+
describeAccountPolicies(args: DescribeAccountPoliciesCommandInput, cb: (err: any, data?: DescribeAccountPoliciesCommandOutput) => void): void;
|
|
150
|
+
describeAccountPolicies(args: DescribeAccountPoliciesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DescribeAccountPoliciesCommandOutput) => void): void;
|
|
136
151
|
/**
|
|
137
152
|
* @see {@link DescribeDestinationsCommand}
|
|
138
153
|
*/
|
|
@@ -241,6 +256,12 @@ export interface CloudWatchLogs {
|
|
|
241
256
|
listTagsLogGroup(args: ListTagsLogGroupCommandInput, options?: __HttpHandlerOptions): Promise<ListTagsLogGroupCommandOutput>;
|
|
242
257
|
listTagsLogGroup(args: ListTagsLogGroupCommandInput, cb: (err: any, data?: ListTagsLogGroupCommandOutput) => void): void;
|
|
243
258
|
listTagsLogGroup(args: ListTagsLogGroupCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListTagsLogGroupCommandOutput) => void): void;
|
|
259
|
+
/**
|
|
260
|
+
* @see {@link PutAccountPolicyCommand}
|
|
261
|
+
*/
|
|
262
|
+
putAccountPolicy(args: PutAccountPolicyCommandInput, options?: __HttpHandlerOptions): Promise<PutAccountPolicyCommandOutput>;
|
|
263
|
+
putAccountPolicy(args: PutAccountPolicyCommandInput, cb: (err: any, data?: PutAccountPolicyCommandOutput) => void): void;
|
|
264
|
+
putAccountPolicy(args: PutAccountPolicyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: PutAccountPolicyCommandOutput) => void): void;
|
|
244
265
|
/**
|
|
245
266
|
* @see {@link PutDataProtectionPolicyCommand}
|
|
246
267
|
*/
|
|
@@ -13,6 +13,7 @@ import { CancelExportTaskCommandInput, CancelExportTaskCommandOutput } from "./c
|
|
|
13
13
|
import { CreateExportTaskCommandInput, CreateExportTaskCommandOutput } from "./commands/CreateExportTaskCommand";
|
|
14
14
|
import { CreateLogGroupCommandInput, CreateLogGroupCommandOutput } from "./commands/CreateLogGroupCommand";
|
|
15
15
|
import { CreateLogStreamCommandInput, CreateLogStreamCommandOutput } from "./commands/CreateLogStreamCommand";
|
|
16
|
+
import { DeleteAccountPolicyCommandInput, DeleteAccountPolicyCommandOutput } from "./commands/DeleteAccountPolicyCommand";
|
|
16
17
|
import { DeleteDataProtectionPolicyCommandInput, DeleteDataProtectionPolicyCommandOutput } from "./commands/DeleteDataProtectionPolicyCommand";
|
|
17
18
|
import { DeleteDestinationCommandInput, DeleteDestinationCommandOutput } from "./commands/DeleteDestinationCommand";
|
|
18
19
|
import { DeleteLogGroupCommandInput, DeleteLogGroupCommandOutput } from "./commands/DeleteLogGroupCommand";
|
|
@@ -22,6 +23,7 @@ import { DeleteQueryDefinitionCommandInput, DeleteQueryDefinitionCommandOutput }
|
|
|
22
23
|
import { DeleteResourcePolicyCommandInput, DeleteResourcePolicyCommandOutput } from "./commands/DeleteResourcePolicyCommand";
|
|
23
24
|
import { DeleteRetentionPolicyCommandInput, DeleteRetentionPolicyCommandOutput } from "./commands/DeleteRetentionPolicyCommand";
|
|
24
25
|
import { DeleteSubscriptionFilterCommandInput, DeleteSubscriptionFilterCommandOutput } from "./commands/DeleteSubscriptionFilterCommand";
|
|
26
|
+
import { DescribeAccountPoliciesCommandInput, DescribeAccountPoliciesCommandOutput } from "./commands/DescribeAccountPoliciesCommand";
|
|
25
27
|
import { DescribeDestinationsCommandInput, DescribeDestinationsCommandOutput } from "./commands/DescribeDestinationsCommand";
|
|
26
28
|
import { DescribeExportTasksCommandInput, DescribeExportTasksCommandOutput } from "./commands/DescribeExportTasksCommand";
|
|
27
29
|
import { DescribeLogGroupsCommandInput, DescribeLogGroupsCommandOutput } from "./commands/DescribeLogGroupsCommand";
|
|
@@ -40,6 +42,7 @@ import { GetLogRecordCommandInput, GetLogRecordCommandOutput } from "./commands/
|
|
|
40
42
|
import { GetQueryResultsCommandInput, GetQueryResultsCommandOutput } from "./commands/GetQueryResultsCommand";
|
|
41
43
|
import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
|
|
42
44
|
import { ListTagsLogGroupCommandInput, ListTagsLogGroupCommandOutput } from "./commands/ListTagsLogGroupCommand";
|
|
45
|
+
import { PutAccountPolicyCommandInput, PutAccountPolicyCommandOutput } from "./commands/PutAccountPolicyCommand";
|
|
43
46
|
import { PutDataProtectionPolicyCommandInput, PutDataProtectionPolicyCommandOutput } from "./commands/PutDataProtectionPolicyCommand";
|
|
44
47
|
import { PutDestinationCommandInput, PutDestinationCommandOutput } from "./commands/PutDestinationCommand";
|
|
45
48
|
import { PutDestinationPolicyCommandInput, PutDestinationPolicyCommandOutput } from "./commands/PutDestinationPolicyCommand";
|
|
@@ -61,11 +64,11 @@ export { __Client };
|
|
|
61
64
|
/**
|
|
62
65
|
* @public
|
|
63
66
|
*/
|
|
64
|
-
export type ServiceInputTypes = AssociateKmsKeyCommandInput | CancelExportTaskCommandInput | CreateExportTaskCommandInput | CreateLogGroupCommandInput | CreateLogStreamCommandInput | DeleteDataProtectionPolicyCommandInput | DeleteDestinationCommandInput | DeleteLogGroupCommandInput | DeleteLogStreamCommandInput | DeleteMetricFilterCommandInput | DeleteQueryDefinitionCommandInput | DeleteResourcePolicyCommandInput | DeleteRetentionPolicyCommandInput | DeleteSubscriptionFilterCommandInput | DescribeDestinationsCommandInput | DescribeExportTasksCommandInput | DescribeLogGroupsCommandInput | DescribeLogStreamsCommandInput | DescribeMetricFiltersCommandInput | DescribeQueriesCommandInput | DescribeQueryDefinitionsCommandInput | DescribeResourcePoliciesCommandInput | DescribeSubscriptionFiltersCommandInput | DisassociateKmsKeyCommandInput | FilterLogEventsCommandInput | GetDataProtectionPolicyCommandInput | GetLogEventsCommandInput | GetLogGroupFieldsCommandInput | GetLogRecordCommandInput | GetQueryResultsCommandInput | ListTagsForResourceCommandInput | ListTagsLogGroupCommandInput | PutDataProtectionPolicyCommandInput | PutDestinationCommandInput | PutDestinationPolicyCommandInput | PutLogEventsCommandInput | PutMetricFilterCommandInput | PutQueryDefinitionCommandInput | PutResourcePolicyCommandInput | PutRetentionPolicyCommandInput | PutSubscriptionFilterCommandInput | StartQueryCommandInput | StopQueryCommandInput | TagLogGroupCommandInput | TagResourceCommandInput | TestMetricFilterCommandInput | UntagLogGroupCommandInput | UntagResourceCommandInput;
|
|
67
|
+
export type ServiceInputTypes = AssociateKmsKeyCommandInput | CancelExportTaskCommandInput | CreateExportTaskCommandInput | CreateLogGroupCommandInput | CreateLogStreamCommandInput | DeleteAccountPolicyCommandInput | DeleteDataProtectionPolicyCommandInput | DeleteDestinationCommandInput | DeleteLogGroupCommandInput | DeleteLogStreamCommandInput | DeleteMetricFilterCommandInput | DeleteQueryDefinitionCommandInput | DeleteResourcePolicyCommandInput | DeleteRetentionPolicyCommandInput | DeleteSubscriptionFilterCommandInput | DescribeAccountPoliciesCommandInput | DescribeDestinationsCommandInput | DescribeExportTasksCommandInput | DescribeLogGroupsCommandInput | DescribeLogStreamsCommandInput | DescribeMetricFiltersCommandInput | DescribeQueriesCommandInput | DescribeQueryDefinitionsCommandInput | DescribeResourcePoliciesCommandInput | DescribeSubscriptionFiltersCommandInput | DisassociateKmsKeyCommandInput | FilterLogEventsCommandInput | GetDataProtectionPolicyCommandInput | GetLogEventsCommandInput | GetLogGroupFieldsCommandInput | GetLogRecordCommandInput | GetQueryResultsCommandInput | ListTagsForResourceCommandInput | ListTagsLogGroupCommandInput | PutAccountPolicyCommandInput | PutDataProtectionPolicyCommandInput | PutDestinationCommandInput | PutDestinationPolicyCommandInput | PutLogEventsCommandInput | PutMetricFilterCommandInput | PutQueryDefinitionCommandInput | PutResourcePolicyCommandInput | PutRetentionPolicyCommandInput | PutSubscriptionFilterCommandInput | StartQueryCommandInput | StopQueryCommandInput | TagLogGroupCommandInput | TagResourceCommandInput | TestMetricFilterCommandInput | UntagLogGroupCommandInput | UntagResourceCommandInput;
|
|
65
68
|
/**
|
|
66
69
|
* @public
|
|
67
70
|
*/
|
|
68
|
-
export type ServiceOutputTypes = AssociateKmsKeyCommandOutput | CancelExportTaskCommandOutput | CreateExportTaskCommandOutput | CreateLogGroupCommandOutput | CreateLogStreamCommandOutput | DeleteDataProtectionPolicyCommandOutput | DeleteDestinationCommandOutput | DeleteLogGroupCommandOutput | DeleteLogStreamCommandOutput | DeleteMetricFilterCommandOutput | DeleteQueryDefinitionCommandOutput | DeleteResourcePolicyCommandOutput | DeleteRetentionPolicyCommandOutput | DeleteSubscriptionFilterCommandOutput | DescribeDestinationsCommandOutput | DescribeExportTasksCommandOutput | DescribeLogGroupsCommandOutput | DescribeLogStreamsCommandOutput | DescribeMetricFiltersCommandOutput | DescribeQueriesCommandOutput | DescribeQueryDefinitionsCommandOutput | DescribeResourcePoliciesCommandOutput | DescribeSubscriptionFiltersCommandOutput | DisassociateKmsKeyCommandOutput | FilterLogEventsCommandOutput | GetDataProtectionPolicyCommandOutput | GetLogEventsCommandOutput | GetLogGroupFieldsCommandOutput | GetLogRecordCommandOutput | GetQueryResultsCommandOutput | ListTagsForResourceCommandOutput | ListTagsLogGroupCommandOutput | PutDataProtectionPolicyCommandOutput | PutDestinationCommandOutput | PutDestinationPolicyCommandOutput | PutLogEventsCommandOutput | PutMetricFilterCommandOutput | PutQueryDefinitionCommandOutput | PutResourcePolicyCommandOutput | PutRetentionPolicyCommandOutput | PutSubscriptionFilterCommandOutput | StartQueryCommandOutput | StopQueryCommandOutput | TagLogGroupCommandOutput | TagResourceCommandOutput | TestMetricFilterCommandOutput | UntagLogGroupCommandOutput | UntagResourceCommandOutput;
|
|
71
|
+
export type ServiceOutputTypes = AssociateKmsKeyCommandOutput | CancelExportTaskCommandOutput | CreateExportTaskCommandOutput | CreateLogGroupCommandOutput | CreateLogStreamCommandOutput | DeleteAccountPolicyCommandOutput | DeleteDataProtectionPolicyCommandOutput | DeleteDestinationCommandOutput | DeleteLogGroupCommandOutput | DeleteLogStreamCommandOutput | DeleteMetricFilterCommandOutput | DeleteQueryDefinitionCommandOutput | DeleteResourcePolicyCommandOutput | DeleteRetentionPolicyCommandOutput | DeleteSubscriptionFilterCommandOutput | DescribeAccountPoliciesCommandOutput | DescribeDestinationsCommandOutput | DescribeExportTasksCommandOutput | DescribeLogGroupsCommandOutput | DescribeLogStreamsCommandOutput | DescribeMetricFiltersCommandOutput | DescribeQueriesCommandOutput | DescribeQueryDefinitionsCommandOutput | DescribeResourcePoliciesCommandOutput | DescribeSubscriptionFiltersCommandOutput | DisassociateKmsKeyCommandOutput | FilterLogEventsCommandOutput | GetDataProtectionPolicyCommandOutput | GetLogEventsCommandOutput | GetLogGroupFieldsCommandOutput | GetLogRecordCommandOutput | GetQueryResultsCommandOutput | ListTagsForResourceCommandOutput | ListTagsLogGroupCommandOutput | PutAccountPolicyCommandOutput | PutDataProtectionPolicyCommandOutput | PutDestinationCommandOutput | PutDestinationPolicyCommandOutput | PutLogEventsCommandOutput | PutMetricFilterCommandOutput | PutQueryDefinitionCommandOutput | PutResourcePolicyCommandOutput | PutRetentionPolicyCommandOutput | PutSubscriptionFilterCommandOutput | StartQueryCommandOutput | StopQueryCommandOutput | TagLogGroupCommandOutput | TagResourceCommandOutput | TestMetricFilterCommandOutput | UntagLogGroupCommandOutput | UntagResourceCommandOutput;
|
|
69
72
|
/**
|
|
70
73
|
* @public
|
|
71
74
|
*/
|
|
@@ -45,7 +45,7 @@ export interface CreateLogGroupCommandOutput extends __MetadataBearer {
|
|
|
45
45
|
* encrypted using the KMS key. This association is stored as long as the data
|
|
46
46
|
* encrypted with the KMS key is still within CloudWatch Logs. This enables
|
|
47
47
|
* CloudWatch Logs to decrypt this data whenever it is requested.</p>
|
|
48
|
-
* <p>If you attempt to associate a KMS key with the log group but the KMS
|
|
48
|
+
* <p>If you attempt to associate a KMS key with the log group but the KMS key does not exist or the KMS key is disabled, you receive an
|
|
49
49
|
* <code>InvalidParameterException</code> error. </p>
|
|
50
50
|
* <important>
|
|
51
51
|
* <p>CloudWatch Logs supports only symmetric KMS keys. Do not associate an
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint";
|
|
2
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
3
|
+
import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
|
|
4
|
+
import { CloudWatchLogsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchLogsClient";
|
|
5
|
+
import { DeleteAccountPolicyRequest } from "../models/models_0";
|
|
6
|
+
/**
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export { __MetadataBearer, $Command };
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*
|
|
13
|
+
* The input for {@link DeleteAccountPolicyCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface DeleteAccountPolicyCommandInput extends DeleteAccountPolicyRequest {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link DeleteAccountPolicyCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface DeleteAccountPolicyCommandOutput extends __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* @public
|
|
26
|
+
* <p>Deletes a CloudWatch Logs account policy.</p>
|
|
27
|
+
* <p>To use this operation, you must be signed on with the <code>logs:DeleteDataProtectionPolicy</code> and
|
|
28
|
+
* <code>logs:DeleteAccountPolicy</code> permissions.</p>
|
|
29
|
+
* @example
|
|
30
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
31
|
+
* ```javascript
|
|
32
|
+
* import { CloudWatchLogsClient, DeleteAccountPolicyCommand } from "@aws-sdk/client-cloudwatch-logs"; // ES Modules import
|
|
33
|
+
* // const { CloudWatchLogsClient, DeleteAccountPolicyCommand } = require("@aws-sdk/client-cloudwatch-logs"); // CommonJS import
|
|
34
|
+
* const client = new CloudWatchLogsClient(config);
|
|
35
|
+
* const input = { // DeleteAccountPolicyRequest
|
|
36
|
+
* policyName: "STRING_VALUE", // required
|
|
37
|
+
* policyType: "DATA_PROTECTION_POLICY", // required
|
|
38
|
+
* };
|
|
39
|
+
* const command = new DeleteAccountPolicyCommand(input);
|
|
40
|
+
* const response = await client.send(command);
|
|
41
|
+
* // {};
|
|
42
|
+
*
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* @param DeleteAccountPolicyCommandInput - {@link DeleteAccountPolicyCommandInput}
|
|
46
|
+
* @returns {@link DeleteAccountPolicyCommandOutput}
|
|
47
|
+
* @see {@link DeleteAccountPolicyCommandInput} for command's `input` shape.
|
|
48
|
+
* @see {@link DeleteAccountPolicyCommandOutput} for command's `response` shape.
|
|
49
|
+
* @see {@link CloudWatchLogsClientResolvedConfig | config} for CloudWatchLogsClient's `config` shape.
|
|
50
|
+
*
|
|
51
|
+
* @throws {@link InvalidParameterException} (client fault)
|
|
52
|
+
* <p>A parameter is specified incorrectly.</p>
|
|
53
|
+
*
|
|
54
|
+
* @throws {@link OperationAbortedException} (client fault)
|
|
55
|
+
* <p>Multiple concurrent requests to update the same resource were in conflict.</p>
|
|
56
|
+
*
|
|
57
|
+
* @throws {@link ResourceNotFoundException} (client fault)
|
|
58
|
+
* <p>The specified resource does not exist.</p>
|
|
59
|
+
*
|
|
60
|
+
* @throws {@link ServiceUnavailableException} (server fault)
|
|
61
|
+
* <p>The service cannot complete the request.</p>
|
|
62
|
+
*
|
|
63
|
+
* @throws {@link CloudWatchLogsServiceException}
|
|
64
|
+
* <p>Base exception class for all service exceptions from CloudWatchLogs service.</p>
|
|
65
|
+
*
|
|
66
|
+
*/
|
|
67
|
+
export declare class DeleteAccountPolicyCommand extends $Command<DeleteAccountPolicyCommandInput, DeleteAccountPolicyCommandOutput, CloudWatchLogsClientResolvedConfig> {
|
|
68
|
+
readonly input: DeleteAccountPolicyCommandInput;
|
|
69
|
+
static getEndpointParameterInstructions(): EndpointParameterInstructions;
|
|
70
|
+
/**
|
|
71
|
+
* @public
|
|
72
|
+
*/
|
|
73
|
+
constructor(input: DeleteAccountPolicyCommandInput);
|
|
74
|
+
/**
|
|
75
|
+
* @internal
|
|
76
|
+
*/
|
|
77
|
+
resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: CloudWatchLogsClientResolvedConfig, options?: __HttpHandlerOptions): Handler<DeleteAccountPolicyCommandInput, DeleteAccountPolicyCommandOutput>;
|
|
78
|
+
/**
|
|
79
|
+
* @internal
|
|
80
|
+
*/
|
|
81
|
+
private serialize;
|
|
82
|
+
/**
|
|
83
|
+
* @internal
|
|
84
|
+
*/
|
|
85
|
+
private deserialize;
|
|
86
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint";
|
|
2
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
3
|
+
import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
|
|
4
|
+
import { CloudWatchLogsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchLogsClient";
|
|
5
|
+
import { DescribeAccountPoliciesRequest, DescribeAccountPoliciesResponse } from "../models/models_0";
|
|
6
|
+
/**
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export { __MetadataBearer, $Command };
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*
|
|
13
|
+
* The input for {@link DescribeAccountPoliciesCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface DescribeAccountPoliciesCommandInput extends DescribeAccountPoliciesRequest {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link DescribeAccountPoliciesCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface DescribeAccountPoliciesCommandOutput extends DescribeAccountPoliciesResponse, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* @public
|
|
26
|
+
* <p>Returns a list of all CloudWatch Logs account policies in the account.</p>
|
|
27
|
+
* @example
|
|
28
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
29
|
+
* ```javascript
|
|
30
|
+
* import { CloudWatchLogsClient, DescribeAccountPoliciesCommand } from "@aws-sdk/client-cloudwatch-logs"; // ES Modules import
|
|
31
|
+
* // const { CloudWatchLogsClient, DescribeAccountPoliciesCommand } = require("@aws-sdk/client-cloudwatch-logs"); // CommonJS import
|
|
32
|
+
* const client = new CloudWatchLogsClient(config);
|
|
33
|
+
* const input = { // DescribeAccountPoliciesRequest
|
|
34
|
+
* policyType: "DATA_PROTECTION_POLICY", // required
|
|
35
|
+
* policyName: "STRING_VALUE",
|
|
36
|
+
* accountIdentifiers: [ // AccountIds
|
|
37
|
+
* "STRING_VALUE",
|
|
38
|
+
* ],
|
|
39
|
+
* };
|
|
40
|
+
* const command = new DescribeAccountPoliciesCommand(input);
|
|
41
|
+
* const response = await client.send(command);
|
|
42
|
+
* // { // DescribeAccountPoliciesResponse
|
|
43
|
+
* // accountPolicies: [ // AccountPolicies
|
|
44
|
+
* // { // AccountPolicy
|
|
45
|
+
* // policyName: "STRING_VALUE",
|
|
46
|
+
* // policyDocument: "STRING_VALUE",
|
|
47
|
+
* // lastUpdatedTime: Number("long"),
|
|
48
|
+
* // policyType: "DATA_PROTECTION_POLICY",
|
|
49
|
+
* // scope: "ALL",
|
|
50
|
+
* // accountId: "STRING_VALUE",
|
|
51
|
+
* // },
|
|
52
|
+
* // ],
|
|
53
|
+
* // };
|
|
54
|
+
*
|
|
55
|
+
* ```
|
|
56
|
+
*
|
|
57
|
+
* @param DescribeAccountPoliciesCommandInput - {@link DescribeAccountPoliciesCommandInput}
|
|
58
|
+
* @returns {@link DescribeAccountPoliciesCommandOutput}
|
|
59
|
+
* @see {@link DescribeAccountPoliciesCommandInput} for command's `input` shape.
|
|
60
|
+
* @see {@link DescribeAccountPoliciesCommandOutput} for command's `response` shape.
|
|
61
|
+
* @see {@link CloudWatchLogsClientResolvedConfig | config} for CloudWatchLogsClient's `config` shape.
|
|
62
|
+
*
|
|
63
|
+
* @throws {@link InvalidParameterException} (client fault)
|
|
64
|
+
* <p>A parameter is specified incorrectly.</p>
|
|
65
|
+
*
|
|
66
|
+
* @throws {@link OperationAbortedException} (client fault)
|
|
67
|
+
* <p>Multiple concurrent requests to update the same resource were in conflict.</p>
|
|
68
|
+
*
|
|
69
|
+
* @throws {@link ResourceNotFoundException} (client fault)
|
|
70
|
+
* <p>The specified resource does not exist.</p>
|
|
71
|
+
*
|
|
72
|
+
* @throws {@link ServiceUnavailableException} (server fault)
|
|
73
|
+
* <p>The service cannot complete the request.</p>
|
|
74
|
+
*
|
|
75
|
+
* @throws {@link CloudWatchLogsServiceException}
|
|
76
|
+
* <p>Base exception class for all service exceptions from CloudWatchLogs service.</p>
|
|
77
|
+
*
|
|
78
|
+
*/
|
|
79
|
+
export declare class DescribeAccountPoliciesCommand extends $Command<DescribeAccountPoliciesCommandInput, DescribeAccountPoliciesCommandOutput, CloudWatchLogsClientResolvedConfig> {
|
|
80
|
+
readonly input: DescribeAccountPoliciesCommandInput;
|
|
81
|
+
static getEndpointParameterInstructions(): EndpointParameterInstructions;
|
|
82
|
+
/**
|
|
83
|
+
* @public
|
|
84
|
+
*/
|
|
85
|
+
constructor(input: DescribeAccountPoliciesCommandInput);
|
|
86
|
+
/**
|
|
87
|
+
* @internal
|
|
88
|
+
*/
|
|
89
|
+
resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: CloudWatchLogsClientResolvedConfig, options?: __HttpHandlerOptions): Handler<DescribeAccountPoliciesCommandInput, DescribeAccountPoliciesCommandOutput>;
|
|
90
|
+
/**
|
|
91
|
+
* @internal
|
|
92
|
+
*/
|
|
93
|
+
private serialize;
|
|
94
|
+
/**
|
|
95
|
+
* @internal
|
|
96
|
+
*/
|
|
97
|
+
private deserialize;
|
|
98
|
+
}
|