Skip to content

Commit 107033b

Browse files
author
awstools
committed
feat(client-cloudwatch-logs): Update to support new APIs for delivery of logs from AWS services.
1 parent 157b80b commit 107033b

13 files changed

+827
-41
lines changed

clients/client-cloudwatch-logs/README.md

+16
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,14 @@ DescribeAccountPolicies
420420

421421
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudwatch-logs/command/DescribeAccountPoliciesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cloudwatch-logs/Interface/DescribeAccountPoliciesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cloudwatch-logs/Interface/DescribeAccountPoliciesCommandOutput/)
422422

423+
</details>
424+
<details>
425+
<summary>
426+
DescribeConfigurationTemplates
427+
</summary>
428+
429+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudwatch-logs/command/DescribeConfigurationTemplatesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cloudwatch-logs/Interface/DescribeConfigurationTemplatesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cloudwatch-logs/Interface/DescribeConfigurationTemplatesCommandOutput/)
430+
423431
</details>
424432
<details>
425433
<summary>
@@ -820,6 +828,14 @@ UpdateAnomaly
820828

821829
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudwatch-logs/command/UpdateAnomalyCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cloudwatch-logs/Interface/UpdateAnomalyCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cloudwatch-logs/Interface/UpdateAnomalyCommandOutput/)
822830

831+
</details>
832+
<details>
833+
<summary>
834+
UpdateDeliveryConfiguration
835+
</summary>
836+
837+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudwatch-logs/command/UpdateDeliveryConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cloudwatch-logs/Interface/UpdateDeliveryConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cloudwatch-logs/Interface/UpdateDeliveryConfigurationCommandOutput/)
838+
823839
</details>
824840
<details>
825841
<summary>

clients/client-cloudwatch-logs/src/CloudWatchLogs.ts

+47
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,11 @@ import {
118118
DescribeAccountPoliciesCommandInput,
119119
DescribeAccountPoliciesCommandOutput,
120120
} from "./commands/DescribeAccountPoliciesCommand";
121+
import {
122+
DescribeConfigurationTemplatesCommand,
123+
DescribeConfigurationTemplatesCommandInput,
124+
DescribeConfigurationTemplatesCommandOutput,
125+
} from "./commands/DescribeConfigurationTemplatesCommand";
121126
import {
122127
DescribeDeliveriesCommand,
123128
DescribeDeliveriesCommandInput,
@@ -348,6 +353,11 @@ import {
348353
UpdateAnomalyCommandInput,
349354
UpdateAnomalyCommandOutput,
350355
} from "./commands/UpdateAnomalyCommand";
356+
import {
357+
UpdateDeliveryConfigurationCommand,
358+
UpdateDeliveryConfigurationCommandInput,
359+
UpdateDeliveryConfigurationCommandOutput,
360+
} from "./commands/UpdateDeliveryConfigurationCommand";
351361
import {
352362
UpdateLogAnomalyDetectorCommand,
353363
UpdateLogAnomalyDetectorCommandInput,
@@ -378,6 +388,7 @@ const commands = {
378388
DeleteRetentionPolicyCommand,
379389
DeleteSubscriptionFilterCommand,
380390
DescribeAccountPoliciesCommand,
391+
DescribeConfigurationTemplatesCommand,
381392
DescribeDeliveriesCommand,
382393
DescribeDeliveryDestinationsCommand,
383394
DescribeDeliverySourcesCommand,
@@ -428,6 +439,7 @@ const commands = {
428439
UntagLogGroupCommand,
429440
UntagResourceCommand,
430441
UpdateAnomalyCommand,
442+
UpdateDeliveryConfigurationCommand,
431443
UpdateLogAnomalyDetectorCommand,
432444
};
433445

@@ -803,6 +815,24 @@ export interface CloudWatchLogs {
803815
cb: (err: any, data?: DescribeAccountPoliciesCommandOutput) => void
804816
): void;
805817

818+
/**
819+
* @see {@link DescribeConfigurationTemplatesCommand}
820+
*/
821+
describeConfigurationTemplates(): Promise<DescribeConfigurationTemplatesCommandOutput>;
822+
describeConfigurationTemplates(
823+
args: DescribeConfigurationTemplatesCommandInput,
824+
options?: __HttpHandlerOptions
825+
): Promise<DescribeConfigurationTemplatesCommandOutput>;
826+
describeConfigurationTemplates(
827+
args: DescribeConfigurationTemplatesCommandInput,
828+
cb: (err: any, data?: DescribeConfigurationTemplatesCommandOutput) => void
829+
): void;
830+
describeConfigurationTemplates(
831+
args: DescribeConfigurationTemplatesCommandInput,
832+
options: __HttpHandlerOptions,
833+
cb: (err: any, data?: DescribeConfigurationTemplatesCommandOutput) => void
834+
): void;
835+
806836
/**
807837
* @see {@link DescribeDeliveriesCommand}
808838
*/
@@ -1577,6 +1607,23 @@ export interface CloudWatchLogs {
15771607
cb: (err: any, data?: UpdateAnomalyCommandOutput) => void
15781608
): void;
15791609

1610+
/**
1611+
* @see {@link UpdateDeliveryConfigurationCommand}
1612+
*/
1613+
updateDeliveryConfiguration(
1614+
args: UpdateDeliveryConfigurationCommandInput,
1615+
options?: __HttpHandlerOptions
1616+
): Promise<UpdateDeliveryConfigurationCommandOutput>;
1617+
updateDeliveryConfiguration(
1618+
args: UpdateDeliveryConfigurationCommandInput,
1619+
cb: (err: any, data?: UpdateDeliveryConfigurationCommandOutput) => void
1620+
): void;
1621+
updateDeliveryConfiguration(
1622+
args: UpdateDeliveryConfigurationCommandInput,
1623+
options: __HttpHandlerOptions,
1624+
cb: (err: any, data?: UpdateDeliveryConfigurationCommandOutput) => void
1625+
): void;
1626+
15801627
/**
15811628
* @see {@link UpdateLogAnomalyDetectorCommand}
15821629
*/

clients/client-cloudwatch-logs/src/CloudWatchLogsClient.ts

+12
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ import {
118118
DescribeAccountPoliciesCommandInput,
119119
DescribeAccountPoliciesCommandOutput,
120120
} from "./commands/DescribeAccountPoliciesCommand";
121+
import {
122+
DescribeConfigurationTemplatesCommandInput,
123+
DescribeConfigurationTemplatesCommandOutput,
124+
} from "./commands/DescribeConfigurationTemplatesCommand";
121125
import { DescribeDeliveriesCommandInput, DescribeDeliveriesCommandOutput } from "./commands/DescribeDeliveriesCommand";
122126
import {
123127
DescribeDeliveryDestinationsCommandInput,
@@ -225,6 +229,10 @@ import { TestMetricFilterCommandInput, TestMetricFilterCommandOutput } from "./c
225229
import { UntagLogGroupCommandInput, UntagLogGroupCommandOutput } from "./commands/UntagLogGroupCommand";
226230
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
227231
import { UpdateAnomalyCommandInput, UpdateAnomalyCommandOutput } from "./commands/UpdateAnomalyCommand";
232+
import {
233+
UpdateDeliveryConfigurationCommandInput,
234+
UpdateDeliveryConfigurationCommandOutput,
235+
} from "./commands/UpdateDeliveryConfigurationCommand";
228236
import {
229237
UpdateLogAnomalyDetectorCommandInput,
230238
UpdateLogAnomalyDetectorCommandOutput,
@@ -267,6 +275,7 @@ export type ServiceInputTypes =
267275
| DeleteRetentionPolicyCommandInput
268276
| DeleteSubscriptionFilterCommandInput
269277
| DescribeAccountPoliciesCommandInput
278+
| DescribeConfigurationTemplatesCommandInput
270279
| DescribeDeliveriesCommandInput
271280
| DescribeDeliveryDestinationsCommandInput
272281
| DescribeDeliverySourcesCommandInput
@@ -317,6 +326,7 @@ export type ServiceInputTypes =
317326
| UntagLogGroupCommandInput
318327
| UntagResourceCommandInput
319328
| UpdateAnomalyCommandInput
329+
| UpdateDeliveryConfigurationCommandInput
320330
| UpdateLogAnomalyDetectorCommandInput;
321331

322332
/**
@@ -346,6 +356,7 @@ export type ServiceOutputTypes =
346356
| DeleteRetentionPolicyCommandOutput
347357
| DeleteSubscriptionFilterCommandOutput
348358
| DescribeAccountPoliciesCommandOutput
359+
| DescribeConfigurationTemplatesCommandOutput
349360
| DescribeDeliveriesCommandOutput
350361
| DescribeDeliveryDestinationsCommandOutput
351362
| DescribeDeliverySourcesCommandOutput
@@ -396,6 +407,7 @@ export type ServiceOutputTypes =
396407
| UntagLogGroupCommandOutput
397408
| UntagResourceCommandOutput
398409
| UpdateAnomalyCommandOutput
410+
| UpdateDeliveryConfigurationCommandOutput
399411
| UpdateLogAnomalyDetectorCommandOutput;
400412

401413
/**

clients/client-cloudwatch-logs/src/commands/CreateDeliveryCommand.ts

+16
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,14 @@ export interface CreateDeliveryCommandOutput extends CreateDeliveryResponse, __M
7373
* const input = { // CreateDeliveryRequest
7474
* deliverySourceName: "STRING_VALUE", // required
7575
* deliveryDestinationArn: "STRING_VALUE", // required
76+
* recordFields: [ // RecordFields
77+
* "STRING_VALUE",
78+
* ],
79+
* fieldDelimiter: "STRING_VALUE",
80+
* s3DeliveryConfiguration: { // S3DeliveryConfiguration
81+
* suffixPath: "STRING_VALUE",
82+
* enableHiveCompatiblePath: true || false,
83+
* },
7684
* tags: { // Tags
7785
* "<keys>": "STRING_VALUE",
7886
* },
@@ -86,6 +94,14 @@ export interface CreateDeliveryCommandOutput extends CreateDeliveryResponse, __M
8694
* // deliverySourceName: "STRING_VALUE",
8795
* // deliveryDestinationArn: "STRING_VALUE",
8896
* // deliveryDestinationType: "S3" || "CWL" || "FH",
97+
* // recordFields: [ // RecordFields
98+
* // "STRING_VALUE",
99+
* // ],
100+
* // fieldDelimiter: "STRING_VALUE",
101+
* // s3DeliveryConfiguration: { // S3DeliveryConfiguration
102+
* // suffixPath: "STRING_VALUE",
103+
* // enableHiveCompatiblePath: true || false,
104+
* // },
89105
* // tags: { // Tags
90106
* // "<keys>": "STRING_VALUE",
91107
* // },
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
// smithy-typescript generated code
2+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { getSerdePlugin } from "@smithy/middleware-serde";
4+
import { Command as $Command } from "@smithy/smithy-client";
5+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
6+
7+
import { CloudWatchLogsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchLogsClient";
8+
import { commonParams } from "../endpoint/EndpointParameters";
9+
import { DescribeConfigurationTemplatesRequest, DescribeConfigurationTemplatesResponse } from "../models/models_0";
10+
import {
11+
de_DescribeConfigurationTemplatesCommand,
12+
se_DescribeConfigurationTemplatesCommand,
13+
} from "../protocols/Aws_json1_1";
14+
15+
/**
16+
* @public
17+
*/
18+
export type { __MetadataBearer };
19+
export { $Command };
20+
/**
21+
* @public
22+
*
23+
* The input for {@link DescribeConfigurationTemplatesCommand}.
24+
*/
25+
export interface DescribeConfigurationTemplatesCommandInput extends DescribeConfigurationTemplatesRequest {}
26+
/**
27+
* @public
28+
*
29+
* The output of {@link DescribeConfigurationTemplatesCommand}.
30+
*/
31+
export interface DescribeConfigurationTemplatesCommandOutput
32+
extends DescribeConfigurationTemplatesResponse,
33+
__MetadataBearer {}
34+
35+
/**
36+
* <p>Use this operation to return the valid and default values that are used when creating delivery sources, delivery destinations, and deliveries.
37+
* For more information about deliveries, see <a href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateDelivery.html">CreateDelivery</a>.</p>
38+
* @example
39+
* Use a bare-bones client and the command you need to make an API call.
40+
* ```javascript
41+
* import { CloudWatchLogsClient, DescribeConfigurationTemplatesCommand } from "@aws-sdk/client-cloudwatch-logs"; // ES Modules import
42+
* // const { CloudWatchLogsClient, DescribeConfigurationTemplatesCommand } = require("@aws-sdk/client-cloudwatch-logs"); // CommonJS import
43+
* const client = new CloudWatchLogsClient(config);
44+
* const input = { // DescribeConfigurationTemplatesRequest
45+
* service: "STRING_VALUE",
46+
* logTypes: [ // LogTypes
47+
* "STRING_VALUE",
48+
* ],
49+
* resourceTypes: [ // ResourceTypes
50+
* "STRING_VALUE",
51+
* ],
52+
* deliveryDestinationTypes: [ // DeliveryDestinationTypes
53+
* "S3" || "CWL" || "FH",
54+
* ],
55+
* nextToken: "STRING_VALUE",
56+
* limit: Number("int"),
57+
* };
58+
* const command = new DescribeConfigurationTemplatesCommand(input);
59+
* const response = await client.send(command);
60+
* // { // DescribeConfigurationTemplatesResponse
61+
* // configurationTemplates: [ // ConfigurationTemplates
62+
* // { // ConfigurationTemplate
63+
* // service: "STRING_VALUE",
64+
* // logType: "STRING_VALUE",
65+
* // resourceType: "STRING_VALUE",
66+
* // deliveryDestinationType: "S3" || "CWL" || "FH",
67+
* // defaultDeliveryConfigValues: { // ConfigurationTemplateDeliveryConfigValues
68+
* // recordFields: [ // RecordFields
69+
* // "STRING_VALUE",
70+
* // ],
71+
* // fieldDelimiter: "STRING_VALUE",
72+
* // s3DeliveryConfiguration: { // S3DeliveryConfiguration
73+
* // suffixPath: "STRING_VALUE",
74+
* // enableHiveCompatiblePath: true || false,
75+
* // },
76+
* // },
77+
* // allowedFields: [ // AllowedFields
78+
* // { // RecordField
79+
* // name: "STRING_VALUE",
80+
* // mandatory: true || false,
81+
* // },
82+
* // ],
83+
* // allowedOutputFormats: [ // OutputFormats
84+
* // "json" || "plain" || "w3c" || "raw" || "parquet",
85+
* // ],
86+
* // allowedActionForAllowVendedLogsDeliveryForResource: "STRING_VALUE",
87+
* // allowedFieldDelimiters: [ // AllowedFieldDelimiters
88+
* // "STRING_VALUE",
89+
* // ],
90+
* // allowedSuffixPathFields: [
91+
* // "STRING_VALUE",
92+
* // ],
93+
* // },
94+
* // ],
95+
* // nextToken: "STRING_VALUE",
96+
* // };
97+
*
98+
* ```
99+
*
100+
* @param DescribeConfigurationTemplatesCommandInput - {@link DescribeConfigurationTemplatesCommandInput}
101+
* @returns {@link DescribeConfigurationTemplatesCommandOutput}
102+
* @see {@link DescribeConfigurationTemplatesCommandInput} for command's `input` shape.
103+
* @see {@link DescribeConfigurationTemplatesCommandOutput} for command's `response` shape.
104+
* @see {@link CloudWatchLogsClientResolvedConfig | config} for CloudWatchLogsClient's `config` shape.
105+
*
106+
* @throws {@link ResourceNotFoundException} (client fault)
107+
* <p>The specified resource does not exist.</p>
108+
*
109+
* @throws {@link ServiceUnavailableException} (server fault)
110+
* <p>The service cannot complete the request.</p>
111+
*
112+
* @throws {@link ThrottlingException} (client fault)
113+
* <p>The request was throttled because of quota limits.</p>
114+
*
115+
* @throws {@link ValidationException} (client fault)
116+
* <p>One of the parameters for the request is not valid.</p>
117+
*
118+
* @throws {@link CloudWatchLogsServiceException}
119+
* <p>Base exception class for all service exceptions from CloudWatchLogs service.</p>
120+
*
121+
* @public
122+
*/
123+
export class DescribeConfigurationTemplatesCommand extends $Command
124+
.classBuilder<
125+
DescribeConfigurationTemplatesCommandInput,
126+
DescribeConfigurationTemplatesCommandOutput,
127+
CloudWatchLogsClientResolvedConfig,
128+
ServiceInputTypes,
129+
ServiceOutputTypes
130+
>()
131+
.ep({
132+
...commonParams,
133+
})
134+
.m(function (this: any, Command: any, cs: any, config: CloudWatchLogsClientResolvedConfig, o: any) {
135+
return [
136+
getSerdePlugin(config, this.serialize, this.deserialize),
137+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
138+
];
139+
})
140+
.s("Logs_20140328", "DescribeConfigurationTemplates", {})
141+
.n("CloudWatchLogsClient", "DescribeConfigurationTemplatesCommand")
142+
.f(void 0, void 0)
143+
.ser(se_DescribeConfigurationTemplatesCommand)
144+
.de(de_DescribeConfigurationTemplatesCommand)
145+
.build() {}

clients/client-cloudwatch-logs/src/commands/DescribeDeliveriesCommand.ts

+8
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,14 @@ export interface DescribeDeliveriesCommandOutput extends DescribeDeliveriesRespo
6262
* // deliverySourceName: "STRING_VALUE",
6363
* // deliveryDestinationArn: "STRING_VALUE",
6464
* // deliveryDestinationType: "S3" || "CWL" || "FH",
65+
* // recordFields: [ // RecordFields
66+
* // "STRING_VALUE",
67+
* // ],
68+
* // fieldDelimiter: "STRING_VALUE",
69+
* // s3DeliveryConfiguration: { // S3DeliveryConfiguration
70+
* // suffixPath: "STRING_VALUE",
71+
* // enableHiveCompatiblePath: true || false,
72+
* // },
6573
* // tags: { // Tags
6674
* // "<keys>": "STRING_VALUE",
6775
* // },

clients/client-cloudwatch-logs/src/commands/GetDeliveryCommand.ts

+8
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,14 @@ export interface GetDeliveryCommandOutput extends GetDeliveryResponse, __Metadat
6161
* // deliverySourceName: "STRING_VALUE",
6262
* // deliveryDestinationArn: "STRING_VALUE",
6363
* // deliveryDestinationType: "S3" || "CWL" || "FH",
64+
* // recordFields: [ // RecordFields
65+
* // "STRING_VALUE",
66+
* // ],
67+
* // fieldDelimiter: "STRING_VALUE",
68+
* // s3DeliveryConfiguration: { // S3DeliveryConfiguration
69+
* // suffixPath: "STRING_VALUE",
70+
* // enableHiveCompatiblePath: true || false,
71+
* // },
6472
* // tags: { // Tags
6573
* // "<keys>": "STRING_VALUE",
6674
* // },

0 commit comments

Comments
 (0)