diff --git a/clients/client-cloudwatch-logs/README.md b/clients/client-cloudwatch-logs/README.md index f24ca3d7bd27..83af203704e6 100644 --- a/clients/client-cloudwatch-logs/README.md +++ b/clients/client-cloudwatch-logs/README.md @@ -356,6 +356,14 @@ DeleteIndexPolicy [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudwatch-logs/command/DeleteIndexPolicyCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cloudwatch-logs/Interface/DeleteIndexPolicyCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cloudwatch-logs/Interface/DeleteIndexPolicyCommandOutput/) + +
+ +DeleteIntegration + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudwatch-logs/command/DeleteIntegrationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cloudwatch-logs/Interface/DeleteIntegrationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cloudwatch-logs/Interface/DeleteIntegrationCommandOutput/) +
@@ -612,6 +620,14 @@ GetDeliverySource [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudwatch-logs/command/GetDeliverySourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cloudwatch-logs/Interface/GetDeliverySourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cloudwatch-logs/Interface/GetDeliverySourceCommandOutput/) +
+
+ +GetIntegration + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudwatch-logs/command/GetIntegrationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cloudwatch-logs/Interface/GetIntegrationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cloudwatch-logs/Interface/GetIntegrationCommandOutput/) +
@@ -668,6 +684,14 @@ ListAnomalies [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudwatch-logs/command/ListAnomaliesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cloudwatch-logs/Interface/ListAnomaliesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cloudwatch-logs/Interface/ListAnomaliesCommandOutput/) +
+
+ +ListIntegrations + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudwatch-logs/command/ListIntegrationsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cloudwatch-logs/Interface/ListIntegrationsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cloudwatch-logs/Interface/ListIntegrationsCommandOutput/) +
@@ -764,6 +788,14 @@ PutIndexPolicy [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudwatch-logs/command/PutIndexPolicyCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cloudwatch-logs/Interface/PutIndexPolicyCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cloudwatch-logs/Interface/PutIndexPolicyCommandOutput/) +
+
+ +PutIntegration + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudwatch-logs/command/PutIntegrationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cloudwatch-logs/Interface/PutIntegrationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cloudwatch-logs/Interface/PutIntegrationCommandOutput/) +
diff --git a/clients/client-cloudwatch-logs/src/CloudWatchLogs.ts b/clients/client-cloudwatch-logs/src/CloudWatchLogs.ts index cb7bde0364f6..dab6f2a3ba41 100644 --- a/clients/client-cloudwatch-logs/src/CloudWatchLogs.ts +++ b/clients/client-cloudwatch-logs/src/CloudWatchLogs.ts @@ -78,6 +78,11 @@ import { DeleteIndexPolicyCommandInput, DeleteIndexPolicyCommandOutput, } from "./commands/DeleteIndexPolicyCommand"; +import { + DeleteIntegrationCommand, + DeleteIntegrationCommandInput, + DeleteIntegrationCommandOutput, +} from "./commands/DeleteIntegrationCommand"; import { DeleteLogAnomalyDetectorCommand, DeleteLogAnomalyDetectorCommandInput, @@ -234,6 +239,11 @@ import { GetDeliverySourceCommandInput, GetDeliverySourceCommandOutput, } from "./commands/GetDeliverySourceCommand"; +import { + GetIntegrationCommand, + GetIntegrationCommandInput, + GetIntegrationCommandOutput, +} from "./commands/GetIntegrationCommand"; import { GetLogAnomalyDetectorCommand, GetLogAnomalyDetectorCommandInput, @@ -269,6 +279,11 @@ import { ListAnomaliesCommandInput, ListAnomaliesCommandOutput, } from "./commands/ListAnomaliesCommand"; +import { + ListIntegrationsCommand, + ListIntegrationsCommandInput, + ListIntegrationsCommandOutput, +} from "./commands/ListIntegrationsCommand"; import { ListLogAnomalyDetectorsCommand, ListLogAnomalyDetectorsCommandInput, @@ -329,6 +344,11 @@ import { PutIndexPolicyCommandInput, PutIndexPolicyCommandOutput, } from "./commands/PutIndexPolicyCommand"; +import { + PutIntegrationCommand, + PutIntegrationCommandInput, + PutIntegrationCommandOutput, +} from "./commands/PutIntegrationCommand"; import { PutLogEventsCommand, PutLogEventsCommandInput, @@ -425,6 +445,7 @@ const commands = { DeleteDeliverySourceCommand, DeleteDestinationCommand, DeleteIndexPolicyCommand, + DeleteIntegrationCommand, DeleteLogAnomalyDetectorCommand, DeleteLogGroupCommand, DeleteLogStreamCommand, @@ -457,6 +478,7 @@ const commands = { GetDeliveryDestinationCommand, GetDeliveryDestinationPolicyCommand, GetDeliverySourceCommand, + GetIntegrationCommand, GetLogAnomalyDetectorCommand, GetLogEventsCommand, GetLogGroupFieldsCommand, @@ -464,6 +486,7 @@ const commands = { GetQueryResultsCommand, GetTransformerCommand, ListAnomaliesCommand, + ListIntegrationsCommand, ListLogAnomalyDetectorsCommand, ListLogGroupsForQueryCommand, ListTagsForResourceCommand, @@ -476,6 +499,7 @@ const commands = { PutDestinationCommand, PutDestinationPolicyCommand, PutIndexPolicyCommand, + PutIntegrationCommand, PutLogEventsCommand, PutMetricFilterCommand, PutQueryDefinitionCommand, @@ -738,6 +762,23 @@ export interface CloudWatchLogs { cb: (err: any, data?: DeleteIndexPolicyCommandOutput) => void ): void; + /** + * @see {@link DeleteIntegrationCommand} + */ + deleteIntegration( + args: DeleteIntegrationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + deleteIntegration( + args: DeleteIntegrationCommandInput, + cb: (err: any, data?: DeleteIntegrationCommandOutput) => void + ): void; + deleteIntegration( + args: DeleteIntegrationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteIntegrationCommandOutput) => void + ): void; + /** * @see {@link DeleteLogAnomalyDetectorCommand} */ @@ -1279,6 +1320,20 @@ export interface CloudWatchLogs { cb: (err: any, data?: GetDeliverySourceCommandOutput) => void ): void; + /** + * @see {@link GetIntegrationCommand} + */ + getIntegration( + args: GetIntegrationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getIntegration(args: GetIntegrationCommandInput, cb: (err: any, data?: GetIntegrationCommandOutput) => void): void; + getIntegration( + args: GetIntegrationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetIntegrationCommandOutput) => void + ): void; + /** * @see {@link GetLogAnomalyDetectorCommand} */ @@ -1376,6 +1431,24 @@ export interface CloudWatchLogs { cb: (err: any, data?: ListAnomaliesCommandOutput) => void ): void; + /** + * @see {@link ListIntegrationsCommand} + */ + listIntegrations(): Promise; + listIntegrations( + args: ListIntegrationsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listIntegrations( + args: ListIntegrationsCommandInput, + cb: (err: any, data?: ListIntegrationsCommandOutput) => void + ): void; + listIntegrations( + args: ListIntegrationsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListIntegrationsCommandOutput) => void + ): void; + /** * @see {@link ListLogAnomalyDetectorsCommand} */ @@ -1575,6 +1648,20 @@ export interface CloudWatchLogs { cb: (err: any, data?: PutIndexPolicyCommandOutput) => void ): void; + /** + * @see {@link PutIntegrationCommand} + */ + putIntegration( + args: PutIntegrationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + putIntegration(args: PutIntegrationCommandInput, cb: (err: any, data?: PutIntegrationCommandOutput) => void): void; + putIntegration( + args: PutIntegrationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: PutIntegrationCommandOutput) => void + ): void; + /** * @see {@link PutLogEventsCommand} */ diff --git a/clients/client-cloudwatch-logs/src/CloudWatchLogsClient.ts b/clients/client-cloudwatch-logs/src/CloudWatchLogsClient.ts index 44dcb8239a69..989c00697051 100644 --- a/clients/client-cloudwatch-logs/src/CloudWatchLogsClient.ts +++ b/clients/client-cloudwatch-logs/src/CloudWatchLogsClient.ts @@ -92,6 +92,7 @@ import { } from "./commands/DeleteDeliverySourceCommand"; import { DeleteDestinationCommandInput, DeleteDestinationCommandOutput } from "./commands/DeleteDestinationCommand"; import { DeleteIndexPolicyCommandInput, DeleteIndexPolicyCommandOutput } from "./commands/DeleteIndexPolicyCommand"; +import { DeleteIntegrationCommandInput, DeleteIntegrationCommandOutput } from "./commands/DeleteIntegrationCommand"; import { DeleteLogAnomalyDetectorCommandInput, DeleteLogAnomalyDetectorCommandOutput, @@ -184,6 +185,7 @@ import { GetDeliveryDestinationPolicyCommandOutput, } from "./commands/GetDeliveryDestinationPolicyCommand"; import { GetDeliverySourceCommandInput, GetDeliverySourceCommandOutput } from "./commands/GetDeliverySourceCommand"; +import { GetIntegrationCommandInput, GetIntegrationCommandOutput } from "./commands/GetIntegrationCommand"; import { GetLogAnomalyDetectorCommandInput, GetLogAnomalyDetectorCommandOutput, @@ -194,6 +196,7 @@ import { GetLogRecordCommandInput, GetLogRecordCommandOutput } from "./commands/ import { GetQueryResultsCommandInput, GetQueryResultsCommandOutput } from "./commands/GetQueryResultsCommand"; import { GetTransformerCommandInput, GetTransformerCommandOutput } from "./commands/GetTransformerCommand"; import { ListAnomaliesCommandInput, ListAnomaliesCommandOutput } from "./commands/ListAnomaliesCommand"; +import { ListIntegrationsCommandInput, ListIntegrationsCommandOutput } from "./commands/ListIntegrationsCommand"; import { ListLogAnomalyDetectorsCommandInput, ListLogAnomalyDetectorsCommandOutput, @@ -227,6 +230,7 @@ import { PutDestinationPolicyCommandOutput, } from "./commands/PutDestinationPolicyCommand"; import { PutIndexPolicyCommandInput, PutIndexPolicyCommandOutput } from "./commands/PutIndexPolicyCommand"; +import { PutIntegrationCommandInput, PutIntegrationCommandOutput } from "./commands/PutIntegrationCommand"; import { PutLogEventsCommandInput, PutLogEventsCommandOutput } from "./commands/PutLogEventsCommand"; import { PutMetricFilterCommandInput, PutMetricFilterCommandOutput } from "./commands/PutMetricFilterCommand"; import { PutQueryDefinitionCommandInput, PutQueryDefinitionCommandOutput } from "./commands/PutQueryDefinitionCommand"; @@ -285,6 +289,7 @@ export type ServiceInputTypes = | DeleteDeliverySourceCommandInput | DeleteDestinationCommandInput | DeleteIndexPolicyCommandInput + | DeleteIntegrationCommandInput | DeleteLogAnomalyDetectorCommandInput | DeleteLogGroupCommandInput | DeleteLogStreamCommandInput @@ -317,6 +322,7 @@ export type ServiceInputTypes = | GetDeliveryDestinationCommandInput | GetDeliveryDestinationPolicyCommandInput | GetDeliverySourceCommandInput + | GetIntegrationCommandInput | GetLogAnomalyDetectorCommandInput | GetLogEventsCommandInput | GetLogGroupFieldsCommandInput @@ -324,6 +330,7 @@ export type ServiceInputTypes = | GetQueryResultsCommandInput | GetTransformerCommandInput | ListAnomaliesCommandInput + | ListIntegrationsCommandInput | ListLogAnomalyDetectorsCommandInput | ListLogGroupsForQueryCommandInput | ListTagsForResourceCommandInput @@ -336,6 +343,7 @@ export type ServiceInputTypes = | PutDestinationCommandInput | PutDestinationPolicyCommandInput | PutIndexPolicyCommandInput + | PutIntegrationCommandInput | PutLogEventsCommandInput | PutMetricFilterCommandInput | PutQueryDefinitionCommandInput @@ -375,6 +383,7 @@ export type ServiceOutputTypes = | DeleteDeliverySourceCommandOutput | DeleteDestinationCommandOutput | DeleteIndexPolicyCommandOutput + | DeleteIntegrationCommandOutput | DeleteLogAnomalyDetectorCommandOutput | DeleteLogGroupCommandOutput | DeleteLogStreamCommandOutput @@ -407,6 +416,7 @@ export type ServiceOutputTypes = | GetDeliveryDestinationCommandOutput | GetDeliveryDestinationPolicyCommandOutput | GetDeliverySourceCommandOutput + | GetIntegrationCommandOutput | GetLogAnomalyDetectorCommandOutput | GetLogEventsCommandOutput | GetLogGroupFieldsCommandOutput @@ -414,6 +424,7 @@ export type ServiceOutputTypes = | GetQueryResultsCommandOutput | GetTransformerCommandOutput | ListAnomaliesCommandOutput + | ListIntegrationsCommandOutput | ListLogAnomalyDetectorsCommandOutput | ListLogGroupsForQueryCommandOutput | ListTagsForResourceCommandOutput @@ -426,6 +437,7 @@ export type ServiceOutputTypes = | PutDestinationCommandOutput | PutDestinationPolicyCommandOutput | PutIndexPolicyCommandOutput + | PutIntegrationCommandOutput | PutLogEventsCommandOutput | PutMetricFilterCommandOutput | PutQueryDefinitionCommandOutput diff --git a/clients/client-cloudwatch-logs/src/commands/DeleteIntegrationCommand.ts b/clients/client-cloudwatch-logs/src/commands/DeleteIntegrationCommand.ts new file mode 100644 index 000000000000..7a2b1a230b9f --- /dev/null +++ b/clients/client-cloudwatch-logs/src/commands/DeleteIntegrationCommand.ts @@ -0,0 +1,107 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { CloudWatchLogsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchLogsClient"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { DeleteIntegrationRequest, DeleteIntegrationResponse } from "../models/models_0"; +import { de_DeleteIntegrationCommand, se_DeleteIntegrationCommand } from "../protocols/Aws_json1_1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link DeleteIntegrationCommand}. + */ +export interface DeleteIntegrationCommandInput extends DeleteIntegrationRequest {} +/** + * @public + * + * The output of {@link DeleteIntegrationCommand}. + */ +export interface DeleteIntegrationCommandOutput extends DeleteIntegrationResponse, __MetadataBearer {} + +/** + *

Deletes the integration between CloudWatch Logs and OpenSearch Service. If your integration has active vended logs dashboards, + * you must specify true for the force parameter, otherwise the operation will fail. If you delete the integration by + * setting force to true, + * all your vended logs dashboards powered by OpenSearch Service will be deleted and the data that was on them + * will no longer be accessible.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CloudWatchLogsClient, DeleteIntegrationCommand } from "@aws-sdk/client-cloudwatch-logs"; // ES Modules import + * // const { CloudWatchLogsClient, DeleteIntegrationCommand } = require("@aws-sdk/client-cloudwatch-logs"); // CommonJS import + * const client = new CloudWatchLogsClient(config); + * const input = { // DeleteIntegrationRequest + * integrationName: "STRING_VALUE", // required + * force: true || false, + * }; + * const command = new DeleteIntegrationCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param DeleteIntegrationCommandInput - {@link DeleteIntegrationCommandInput} + * @returns {@link DeleteIntegrationCommandOutput} + * @see {@link DeleteIntegrationCommandInput} for command's `input` shape. + * @see {@link DeleteIntegrationCommandOutput} for command's `response` shape. + * @see {@link CloudWatchLogsClientResolvedConfig | config} for CloudWatchLogsClient's `config` shape. + * + * @throws {@link InvalidParameterException} (client fault) + *

A parameter is specified incorrectly.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource does not exist.

+ * + * @throws {@link ServiceUnavailableException} (server fault) + *

The service cannot complete the request.

+ * + * @throws {@link ValidationException} (client fault) + *

One of the parameters for the request is not valid.

+ * + * @throws {@link CloudWatchLogsServiceException} + *

Base exception class for all service exceptions from CloudWatchLogs service.

+ * + * @public + */ +export class DeleteIntegrationCommand extends $Command + .classBuilder< + DeleteIntegrationCommandInput, + DeleteIntegrationCommandOutput, + CloudWatchLogsClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: CloudWatchLogsClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("Logs_20140328", "DeleteIntegration", {}) + .n("CloudWatchLogsClient", "DeleteIntegrationCommand") + .f(void 0, void 0) + .ser(se_DeleteIntegrationCommand) + .de(de_DeleteIntegrationCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: DeleteIntegrationRequest; + output: {}; + }; + sdk: { + input: DeleteIntegrationCommandInput; + output: DeleteIntegrationCommandOutput; + }; + }; +} diff --git a/clients/client-cloudwatch-logs/src/commands/DescribeQueriesCommand.ts b/clients/client-cloudwatch-logs/src/commands/DescribeQueriesCommand.ts index db7949f98549..5c83682a6d46 100644 --- a/clients/client-cloudwatch-logs/src/commands/DescribeQueriesCommand.ts +++ b/clients/client-cloudwatch-logs/src/commands/DescribeQueriesCommand.ts @@ -42,12 +42,14 @@ export interface DescribeQueriesCommandOutput extends DescribeQueriesResponse, _ * status: "Scheduled" || "Running" || "Complete" || "Failed" || "Cancelled" || "Timeout" || "Unknown", * maxResults: Number("int"), * nextToken: "STRING_VALUE", + * queryLanguage: "CWLI" || "SQL" || "PPL", * }; * const command = new DescribeQueriesCommand(input); * const response = await client.send(command); * // { // DescribeQueriesResponse * // queries: [ // QueryInfoList * // { // QueryInfo + * // queryLanguage: "CWLI" || "SQL" || "PPL", * // queryId: "STRING_VALUE", * // queryString: "STRING_VALUE", * // status: "Scheduled" || "Running" || "Complete" || "Failed" || "Cancelled" || "Timeout" || "Unknown", diff --git a/clients/client-cloudwatch-logs/src/commands/DescribeQueryDefinitionsCommand.ts b/clients/client-cloudwatch-logs/src/commands/DescribeQueryDefinitionsCommand.ts index f239bf414fdf..2a04a9ef4550 100644 --- a/clients/client-cloudwatch-logs/src/commands/DescribeQueryDefinitionsCommand.ts +++ b/clients/client-cloudwatch-logs/src/commands/DescribeQueryDefinitionsCommand.ts @@ -39,6 +39,7 @@ export interface DescribeQueryDefinitionsCommandOutput extends DescribeQueryDefi * // const { CloudWatchLogsClient, DescribeQueryDefinitionsCommand } = require("@aws-sdk/client-cloudwatch-logs"); // CommonJS import * const client = new CloudWatchLogsClient(config); * const input = { // DescribeQueryDefinitionsRequest + * queryLanguage: "CWLI" || "SQL" || "PPL", * queryDefinitionNamePrefix: "STRING_VALUE", * maxResults: Number("int"), * nextToken: "STRING_VALUE", @@ -48,6 +49,7 @@ export interface DescribeQueryDefinitionsCommandOutput extends DescribeQueryDefi * // { // DescribeQueryDefinitionsResponse * // queryDefinitions: [ // QueryDefinitionList * // { // QueryDefinition + * // queryLanguage: "CWLI" || "SQL" || "PPL", * // queryDefinitionId: "STRING_VALUE", * // name: "STRING_VALUE", * // queryString: "STRING_VALUE", diff --git a/clients/client-cloudwatch-logs/src/commands/GetIntegrationCommand.ts b/clients/client-cloudwatch-logs/src/commands/GetIntegrationCommand.ts new file mode 100644 index 000000000000..319d391e6513 --- /dev/null +++ b/clients/client-cloudwatch-logs/src/commands/GetIntegrationCommand.ts @@ -0,0 +1,157 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { CloudWatchLogsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchLogsClient"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { GetIntegrationRequest, GetIntegrationResponse } from "../models/models_0"; +import { de_GetIntegrationCommand, se_GetIntegrationCommand } from "../protocols/Aws_json1_1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link GetIntegrationCommand}. + */ +export interface GetIntegrationCommandInput extends GetIntegrationRequest {} +/** + * @public + * + * The output of {@link GetIntegrationCommand}. + */ +export interface GetIntegrationCommandOutput extends GetIntegrationResponse, __MetadataBearer {} + +/** + *

Returns information about one integration between CloudWatch Logs and OpenSearch Service.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CloudWatchLogsClient, GetIntegrationCommand } from "@aws-sdk/client-cloudwatch-logs"; // ES Modules import + * // const { CloudWatchLogsClient, GetIntegrationCommand } = require("@aws-sdk/client-cloudwatch-logs"); // CommonJS import + * const client = new CloudWatchLogsClient(config); + * const input = { // GetIntegrationRequest + * integrationName: "STRING_VALUE", // required + * }; + * const command = new GetIntegrationCommand(input); + * const response = await client.send(command); + * // { // GetIntegrationResponse + * // integrationName: "STRING_VALUE", + * // integrationType: "OPENSEARCH", + * // integrationStatus: "PROVISIONING" || "ACTIVE" || "FAILED", + * // integrationDetails: { // IntegrationDetails Union: only one key present + * // openSearchIntegrationDetails: { // OpenSearchIntegrationDetails + * // dataSource: { // OpenSearchDataSource + * // dataSourceName: "STRING_VALUE", + * // status: { // OpenSearchResourceStatus + * // status: "ACTIVE" || "NOT_FOUND" || "ERROR", + * // statusMessage: "STRING_VALUE", + * // }, + * // }, + * // application: { // OpenSearchApplication + * // applicationEndpoint: "STRING_VALUE", + * // applicationArn: "STRING_VALUE", + * // applicationId: "STRING_VALUE", + * // status: { + * // status: "ACTIVE" || "NOT_FOUND" || "ERROR", + * // statusMessage: "STRING_VALUE", + * // }, + * // }, + * // collection: { // OpenSearchCollection + * // collectionEndpoint: "STRING_VALUE", + * // collectionArn: "STRING_VALUE", + * // status: { + * // status: "ACTIVE" || "NOT_FOUND" || "ERROR", + * // statusMessage: "STRING_VALUE", + * // }, + * // }, + * // workspace: { // OpenSearchWorkspace + * // workspaceId: "STRING_VALUE", + * // status: { + * // status: "ACTIVE" || "NOT_FOUND" || "ERROR", + * // statusMessage: "STRING_VALUE", + * // }, + * // }, + * // encryptionPolicy: { // OpenSearchEncryptionPolicy + * // policyName: "STRING_VALUE", + * // status: { + * // status: "ACTIVE" || "NOT_FOUND" || "ERROR", + * // statusMessage: "STRING_VALUE", + * // }, + * // }, + * // networkPolicy: { // OpenSearchNetworkPolicy + * // policyName: "STRING_VALUE", + * // status: "", + * // }, + * // accessPolicy: { // OpenSearchDataAccessPolicy + * // policyName: "STRING_VALUE", + * // status: "", + * // }, + * // lifecyclePolicy: { // OpenSearchLifecyclePolicy + * // policyName: "STRING_VALUE", + * // status: "", + * // }, + * // }, + * // }, + * // }; + * + * ``` + * + * @param GetIntegrationCommandInput - {@link GetIntegrationCommandInput} + * @returns {@link GetIntegrationCommandOutput} + * @see {@link GetIntegrationCommandInput} for command's `input` shape. + * @see {@link GetIntegrationCommandOutput} for command's `response` shape. + * @see {@link CloudWatchLogsClientResolvedConfig | config} for CloudWatchLogsClient's `config` shape. + * + * @throws {@link InvalidParameterException} (client fault) + *

A parameter is specified incorrectly.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource does not exist.

+ * + * @throws {@link ServiceUnavailableException} (server fault) + *

The service cannot complete the request.

+ * + * @throws {@link CloudWatchLogsServiceException} + *

Base exception class for all service exceptions from CloudWatchLogs service.

+ * + * @public + */ +export class GetIntegrationCommand extends $Command + .classBuilder< + GetIntegrationCommandInput, + GetIntegrationCommandOutput, + CloudWatchLogsClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: CloudWatchLogsClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("Logs_20140328", "GetIntegration", {}) + .n("CloudWatchLogsClient", "GetIntegrationCommand") + .f(void 0, void 0) + .ser(se_GetIntegrationCommand) + .de(de_GetIntegrationCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: GetIntegrationRequest; + output: GetIntegrationResponse; + }; + sdk: { + input: GetIntegrationCommandInput; + output: GetIntegrationCommandOutput; + }; + }; +} diff --git a/clients/client-cloudwatch-logs/src/commands/GetQueryResultsCommand.ts b/clients/client-cloudwatch-logs/src/commands/GetQueryResultsCommand.ts index 7047ae6141db..44950a6198f8 100644 --- a/clients/client-cloudwatch-logs/src/commands/GetQueryResultsCommand.ts +++ b/clients/client-cloudwatch-logs/src/commands/GetQueryResultsCommand.ts @@ -54,6 +54,7 @@ export interface GetQueryResultsCommandOutput extends GetQueryResultsResponse, _ * const command = new GetQueryResultsCommand(input); * const response = await client.send(command); * // { // GetQueryResultsResponse + * // queryLanguage: "CWLI" || "SQL" || "PPL", * // results: [ // QueryResults * // [ // ResultRows * // { // ResultField diff --git a/clients/client-cloudwatch-logs/src/commands/ListIntegrationsCommand.ts b/clients/client-cloudwatch-logs/src/commands/ListIntegrationsCommand.ts new file mode 100644 index 000000000000..7f11a4070500 --- /dev/null +++ b/clients/client-cloudwatch-logs/src/commands/ListIntegrationsCommand.ts @@ -0,0 +1,107 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { CloudWatchLogsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchLogsClient"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { ListIntegrationsRequest, ListIntegrationsResponse } from "../models/models_0"; +import { de_ListIntegrationsCommand, se_ListIntegrationsCommand } from "../protocols/Aws_json1_1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link ListIntegrationsCommand}. + */ +export interface ListIntegrationsCommandInput extends ListIntegrationsRequest {} +/** + * @public + * + * The output of {@link ListIntegrationsCommand}. + */ +export interface ListIntegrationsCommandOutput extends ListIntegrationsResponse, __MetadataBearer {} + +/** + *

Returns a list of integrations between CloudWatch Logs and other services in this account. Currently, only one + * integration can be created in an account, and this integration must be with OpenSearch Service.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CloudWatchLogsClient, ListIntegrationsCommand } from "@aws-sdk/client-cloudwatch-logs"; // ES Modules import + * // const { CloudWatchLogsClient, ListIntegrationsCommand } = require("@aws-sdk/client-cloudwatch-logs"); // CommonJS import + * const client = new CloudWatchLogsClient(config); + * const input = { // ListIntegrationsRequest + * integrationNamePrefix: "STRING_VALUE", + * integrationType: "OPENSEARCH", + * integrationStatus: "PROVISIONING" || "ACTIVE" || "FAILED", + * }; + * const command = new ListIntegrationsCommand(input); + * const response = await client.send(command); + * // { // ListIntegrationsResponse + * // integrationSummaries: [ // IntegrationSummaries + * // { // IntegrationSummary + * // integrationName: "STRING_VALUE", + * // integrationType: "OPENSEARCH", + * // integrationStatus: "PROVISIONING" || "ACTIVE" || "FAILED", + * // }, + * // ], + * // }; + * + * ``` + * + * @param ListIntegrationsCommandInput - {@link ListIntegrationsCommandInput} + * @returns {@link ListIntegrationsCommandOutput} + * @see {@link ListIntegrationsCommandInput} for command's `input` shape. + * @see {@link ListIntegrationsCommandOutput} for command's `response` shape. + * @see {@link CloudWatchLogsClientResolvedConfig | config} for CloudWatchLogsClient's `config` shape. + * + * @throws {@link InvalidParameterException} (client fault) + *

A parameter is specified incorrectly.

+ * + * @throws {@link ServiceUnavailableException} (server fault) + *

The service cannot complete the request.

+ * + * @throws {@link CloudWatchLogsServiceException} + *

Base exception class for all service exceptions from CloudWatchLogs service.

+ * + * @public + */ +export class ListIntegrationsCommand extends $Command + .classBuilder< + ListIntegrationsCommandInput, + ListIntegrationsCommandOutput, + CloudWatchLogsClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: CloudWatchLogsClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("Logs_20140328", "ListIntegrations", {}) + .n("CloudWatchLogsClient", "ListIntegrationsCommand") + .f(void 0, void 0) + .ser(se_ListIntegrationsCommand) + .de(de_ListIntegrationsCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: ListIntegrationsRequest; + output: ListIntegrationsResponse; + }; + sdk: { + input: ListIntegrationsCommandInput; + output: ListIntegrationsCommandOutput; + }; + }; +} diff --git a/clients/client-cloudwatch-logs/src/commands/PutIntegrationCommand.ts b/clients/client-cloudwatch-logs/src/commands/PutIntegrationCommand.ts new file mode 100644 index 000000000000..104f857c530f --- /dev/null +++ b/clients/client-cloudwatch-logs/src/commands/PutIntegrationCommand.ts @@ -0,0 +1,122 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { CloudWatchLogsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchLogsClient"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { PutIntegrationRequest, PutIntegrationResponse } from "../models/models_0"; +import { de_PutIntegrationCommand, se_PutIntegrationCommand } from "../protocols/Aws_json1_1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link PutIntegrationCommand}. + */ +export interface PutIntegrationCommandInput extends PutIntegrationRequest {} +/** + * @public + * + * The output of {@link PutIntegrationCommand}. + */ +export interface PutIntegrationCommandOutput extends PutIntegrationResponse, __MetadataBearer {} + +/** + *

Creates an integration between CloudWatch Logs and another service in this account. Currently, only integrations with + * OpenSearch Service are supported, and currently you can have only one integration in your account.

+ *

Integrating with OpenSearch Service makes it possible for you to create curated vended logs dashboards, powered + * by OpenSearch Service analytics. For more information, see + * Vended log dashboards powered by Amazon OpenSearch Service.

+ *

You can use this operation only to create a new integration. You can't modify an existing integration.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CloudWatchLogsClient, PutIntegrationCommand } from "@aws-sdk/client-cloudwatch-logs"; // ES Modules import + * // const { CloudWatchLogsClient, PutIntegrationCommand } = require("@aws-sdk/client-cloudwatch-logs"); // CommonJS import + * const client = new CloudWatchLogsClient(config); + * const input = { // PutIntegrationRequest + * integrationName: "STRING_VALUE", // required + * resourceConfig: { // ResourceConfig Union: only one key present + * openSearchResourceConfig: { // OpenSearchResourceConfig + * kmsKeyArn: "STRING_VALUE", + * dataSourceRoleArn: "STRING_VALUE", // required + * dashboardViewerPrincipals: [ // DashboardViewerPrincipals // required + * "STRING_VALUE", + * ], + * applicationArn: "STRING_VALUE", + * retentionDays: Number("int"), // required + * }, + * }, + * integrationType: "OPENSEARCH", // required + * }; + * const command = new PutIntegrationCommand(input); + * const response = await client.send(command); + * // { // PutIntegrationResponse + * // integrationName: "STRING_VALUE", + * // integrationStatus: "PROVISIONING" || "ACTIVE" || "FAILED", + * // }; + * + * ``` + * + * @param PutIntegrationCommandInput - {@link PutIntegrationCommandInput} + * @returns {@link PutIntegrationCommandOutput} + * @see {@link PutIntegrationCommandInput} for command's `input` shape. + * @see {@link PutIntegrationCommandOutput} for command's `response` shape. + * @see {@link CloudWatchLogsClientResolvedConfig | config} for CloudWatchLogsClient's `config` shape. + * + * @throws {@link InvalidParameterException} (client fault) + *

A parameter is specified incorrectly.

+ * + * @throws {@link LimitExceededException} (client fault) + *

You have reached the maximum number of resources that can be created.

+ * + * @throws {@link ServiceUnavailableException} (server fault) + *

The service cannot complete the request.

+ * + * @throws {@link ValidationException} (client fault) + *

One of the parameters for the request is not valid.

+ * + * @throws {@link CloudWatchLogsServiceException} + *

Base exception class for all service exceptions from CloudWatchLogs service.

+ * + * @public + */ +export class PutIntegrationCommand extends $Command + .classBuilder< + PutIntegrationCommandInput, + PutIntegrationCommandOutput, + CloudWatchLogsClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: CloudWatchLogsClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("Logs_20140328", "PutIntegration", {}) + .n("CloudWatchLogsClient", "PutIntegrationCommand") + .f(void 0, void 0) + .ser(se_PutIntegrationCommand) + .de(de_PutIntegrationCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: PutIntegrationRequest; + output: PutIntegrationResponse; + }; + sdk: { + input: PutIntegrationCommandInput; + output: PutIntegrationCommandOutput; + }; + }; +} diff --git a/clients/client-cloudwatch-logs/src/commands/PutQueryDefinitionCommand.ts b/clients/client-cloudwatch-logs/src/commands/PutQueryDefinitionCommand.ts index 70808d481a71..dd6afd56a9b4 100644 --- a/clients/client-cloudwatch-logs/src/commands/PutQueryDefinitionCommand.ts +++ b/clients/client-cloudwatch-logs/src/commands/PutQueryDefinitionCommand.ts @@ -46,6 +46,7 @@ export interface PutQueryDefinitionCommandOutput extends PutQueryDefinitionRespo * // const { CloudWatchLogsClient, PutQueryDefinitionCommand } = require("@aws-sdk/client-cloudwatch-logs"); // CommonJS import * const client = new CloudWatchLogsClient(config); * const input = { // PutQueryDefinitionRequest + * queryLanguage: "CWLI" || "SQL" || "PPL", * name: "STRING_VALUE", // required * queryDefinitionId: "STRING_VALUE", * logGroupNames: [ // LogGroupNames diff --git a/clients/client-cloudwatch-logs/src/commands/StartQueryCommand.ts b/clients/client-cloudwatch-logs/src/commands/StartQueryCommand.ts index d8e3855ed2e0..e98e044854c3 100644 --- a/clients/client-cloudwatch-logs/src/commands/StartQueryCommand.ts +++ b/clients/client-cloudwatch-logs/src/commands/StartQueryCommand.ts @@ -74,6 +74,7 @@ export interface StartQueryCommandOutput extends StartQueryResponse, __MetadataB * // const { CloudWatchLogsClient, StartQueryCommand } = require("@aws-sdk/client-cloudwatch-logs"); // CommonJS import * const client = new CloudWatchLogsClient(config); * const input = { // StartQueryRequest + * queryLanguage: "CWLI" || "SQL" || "PPL", * logGroupName: "STRING_VALUE", * logGroupNames: [ // LogGroupNames * "STRING_VALUE", diff --git a/clients/client-cloudwatch-logs/src/commands/index.ts b/clients/client-cloudwatch-logs/src/commands/index.ts index 48d7e553b183..191489aaa311 100644 --- a/clients/client-cloudwatch-logs/src/commands/index.ts +++ b/clients/client-cloudwatch-logs/src/commands/index.ts @@ -14,6 +14,7 @@ export * from "./DeleteDeliveryDestinationPolicyCommand"; export * from "./DeleteDeliverySourceCommand"; export * from "./DeleteDestinationCommand"; export * from "./DeleteIndexPolicyCommand"; +export * from "./DeleteIntegrationCommand"; export * from "./DeleteLogAnomalyDetectorCommand"; export * from "./DeleteLogGroupCommand"; export * from "./DeleteLogStreamCommand"; @@ -46,6 +47,7 @@ export * from "./GetDeliveryCommand"; export * from "./GetDeliveryDestinationCommand"; export * from "./GetDeliveryDestinationPolicyCommand"; export * from "./GetDeliverySourceCommand"; +export * from "./GetIntegrationCommand"; export * from "./GetLogAnomalyDetectorCommand"; export * from "./GetLogEventsCommand"; export * from "./GetLogGroupFieldsCommand"; @@ -53,6 +55,7 @@ export * from "./GetLogRecordCommand"; export * from "./GetQueryResultsCommand"; export * from "./GetTransformerCommand"; export * from "./ListAnomaliesCommand"; +export * from "./ListIntegrationsCommand"; export * from "./ListLogAnomalyDetectorsCommand"; export * from "./ListLogGroupsForQueryCommand"; export * from "./ListTagsForResourceCommand"; @@ -65,6 +68,7 @@ export * from "./PutDeliverySourceCommand"; export * from "./PutDestinationCommand"; export * from "./PutDestinationPolicyCommand"; export * from "./PutIndexPolicyCommand"; +export * from "./PutIntegrationCommand"; export * from "./PutLogEventsCommand"; export * from "./PutMetricFilterCommand"; export * from "./PutQueryDefinitionCommand"; diff --git a/clients/client-cloudwatch-logs/src/models/models_0.ts b/clients/client-cloudwatch-logs/src/models/models_0.ts index 6a7c11f2fbab..c75b772373f5 100644 --- a/clients/client-cloudwatch-logs/src/models/models_0.ts +++ b/clients/client-cloudwatch-logs/src/models/models_0.ts @@ -1551,6 +1551,30 @@ export interface DeleteIndexPolicyRequest { */ export interface DeleteIndexPolicyResponse {} +/** + * @public + */ +export interface DeleteIntegrationRequest { + /** + *

The name of the integration to delete. To find the name of your integration, use + * ListIntegrations.

+ * @public + */ + integrationName: string | undefined; + + /** + *

Specify true to force the deletion of the integration even if vended logs dashboards currently exist.

+ *

The default is false.

+ * @public + */ + force?: boolean | undefined; +} + +/** + * @public + */ +export interface DeleteIntegrationResponse {} + /** *

This processor deletes entries from a log event. These entries are key-value pairs.

*

For more information about this processor including examples, see @@ -3102,6 +3126,21 @@ export interface DescribeMetricFiltersResponse { nextToken?: string | undefined; } +/** + * @public + * @enum + */ +export const QueryLanguage = { + CWLI: "CWLI", + PPL: "PPL", + SQL: "SQL", +} as const; + +/** + * @public + */ +export type QueryLanguage = (typeof QueryLanguage)[keyof typeof QueryLanguage]; + /** * @public * @enum @@ -3149,6 +3188,12 @@ export interface DescribeQueriesRequest { * @public */ nextToken?: string | undefined; + + /** + *

Limits the returned queries to only the queries that use the specified query language.

+ * @public + */ + queryLanguage?: QueryLanguage | undefined; } /** @@ -3156,6 +3201,13 @@ export interface DescribeQueriesRequest { * @public */ export interface QueryInfo { + /** + *

The query language used for this query. For more information about the query languages that CloudWatch Logs supports, + * see Supported query languages.

+ * @public + */ + queryLanguage?: QueryLanguage | undefined; + /** *

The unique ID number of this query.

* @public @@ -3209,6 +3261,13 @@ export interface DescribeQueriesResponse { * @public */ export interface DescribeQueryDefinitionsRequest { + /** + *

The query language used for this query. For more information about the query languages that CloudWatch Logs supports, + * see Supported query languages.

+ * @public + */ + queryLanguage?: QueryLanguage | undefined; + /** *

Use this parameter to filter your results to only the query definitions that have names that start with the prefix you specify.

* @public @@ -3233,6 +3292,13 @@ export interface DescribeQueryDefinitionsRequest { * @public */ export interface QueryDefinition { + /** + *

The query language used for this query. For more information about the query languages that CloudWatch Logs supports, + * see Supported query languages.

+ * @public + */ + queryLanguage?: QueryLanguage | undefined; + /** *

The unique ID of the query definition.

* @public @@ -3891,6 +3957,414 @@ export interface GetDeliverySourceResponse { deliverySource?: DeliverySource | undefined; } +/** + * @public + */ +export interface GetIntegrationRequest { + /** + *

The name of the integration that you want to find information about. To find the name of your integration, use + * ListIntegrations + *

+ * @public + */ + integrationName: string | undefined; +} + +/** + * @public + * @enum + */ +export const OpenSearchResourceStatusType = { + ACTIVE: "ACTIVE", + ERROR: "ERROR", + NOT_FOUND: "NOT_FOUND", +} as const; + +/** + * @public + */ +export type OpenSearchResourceStatusType = + (typeof OpenSearchResourceStatusType)[keyof typeof OpenSearchResourceStatusType]; + +/** + *

This structure contains information about the status of an OpenSearch Service resource.

+ * @public + */ +export interface OpenSearchResourceStatus { + /** + *

The current status of this resource.

+ * @public + */ + status?: OpenSearchResourceStatusType | undefined; + + /** + *

A message with additional information about the status of this resource.

+ * @public + */ + statusMessage?: string | undefined; +} + +/** + *

This structure contains information about the OpenSearch Service data access policy used for this integration. The access + * policy defines the access controls for the collection. This data access policy was automatically created as part of the integration setup. + * For more information about OpenSearch Service data access policies, see Data access control for Amazon OpenSearch Serverless in the OpenSearch Service Developer Guide.

+ * @public + */ +export interface OpenSearchDataAccessPolicy { + /** + *

The name of the data access policy.

+ * @public + */ + policyName?: string | undefined; + + /** + *

This structure contains information about the status of this OpenSearch Service resource.

+ * @public + */ + status?: OpenSearchResourceStatus | undefined; +} + +/** + *

This structure contains information about the OpenSearch Service application used for this integration. + * An OpenSearch Service application is the web application created by the integration with CloudWatch Logs. It hosts the vended logs dashboards.

+ * @public + */ +export interface OpenSearchApplication { + /** + *

The endpoint of the application.

+ * @public + */ + applicationEndpoint?: string | undefined; + + /** + *

The Amazon Resource Name (ARN) of the application.

+ * @public + */ + applicationArn?: string | undefined; + + /** + *

The ID of the application.

+ * @public + */ + applicationId?: string | undefined; + + /** + *

This structure contains information about the status of this OpenSearch Service resource.

+ * @public + */ + status?: OpenSearchResourceStatus | undefined; +} + +/** + *

This structure contains information about the OpenSearch Service collection used for this integration. + * An OpenSearch Service collection is a logical grouping of one or more indexes that represent an analytics workload. + * For more information, see Creating and managing OpenSearch Service Serverless collections.

+ * @public + */ +export interface OpenSearchCollection { + /** + *

The endpoint of the collection.

+ * @public + */ + collectionEndpoint?: string | undefined; + + /** + *

The ARN of the collection.

+ * @public + */ + collectionArn?: string | undefined; + + /** + *

This structure contains information about the status of this OpenSearch Service resource.

+ * @public + */ + status?: OpenSearchResourceStatus | undefined; +} + +/** + *

This structure contains information about the OpenSearch Service data source used for this integration. This data source was + * created as part of the integration setup. + * An OpenSearch Service data source defines the source and destination for OpenSearch Service queries. It includes the role required to execute queries and write to collections.

+ *

For more information about OpenSearch Service data sources , see Creating OpenSearch Service data source integrations with Amazon S3. + *

+ * @public + */ +export interface OpenSearchDataSource { + /** + *

The name of the OpenSearch Service data source.

+ * @public + */ + dataSourceName?: string | undefined; + + /** + *

This structure contains information about the status of this OpenSearch Service resource.

+ * @public + */ + status?: OpenSearchResourceStatus | undefined; +} + +/** + *

This structure contains information about the OpenSearch Service encryption policy used for this integration. The encryption policy was created + * automatically when you created the integration. For more information, see Encryption policies in the OpenSearch Service Developer Guide. + *

+ * @public + */ +export interface OpenSearchEncryptionPolicy { + /** + *

The name of the encryption policy.

+ * @public + */ + policyName?: string | undefined; + + /** + *

This structure contains information about the status of this OpenSearch Service resource.

+ * @public + */ + status?: OpenSearchResourceStatus | undefined; +} + +/** + *

This structure contains information about the OpenSearch Service data lifecycle policy used for this integration. The lifecycle policy + * determines the lifespan of the data in the collection. It was automatically created as part of the integration setup.

+ *

For more information, see Using data lifecycle policies with OpenSearch Service Serverless + * in the OpenSearch Service Developer Guide.

+ * @public + */ +export interface OpenSearchLifecyclePolicy { + /** + *

The name of the lifecycle policy.

+ * @public + */ + policyName?: string | undefined; + + /** + *

This structure contains information about the status of this OpenSearch Service resource.

+ * @public + */ + status?: OpenSearchResourceStatus | undefined; +} + +/** + *

This structure contains information about the OpenSearch Service network policy used for this integration. The network + * policy assigns network access settings to collections. + * For more information, see Network policies in the OpenSearch Service Developer Guide.

+ * @public + */ +export interface OpenSearchNetworkPolicy { + /** + *

The name of the network policy.

+ * @public + */ + policyName?: string | undefined; + + /** + *

This structure contains information about the status of this OpenSearch Service resource.

+ * @public + */ + status?: OpenSearchResourceStatus | undefined; +} + +/** + *

This structure contains information about the OpenSearch Service workspace used for this integration. + * An OpenSearch Service workspace is the collection of dashboards along with other OpenSearch Service tools. This workspace was created automatically as part of the integration setup. + * For more information, see Centralized OpenSearch user interface (Dashboards) with + * OpenSearch Service.

+ * @public + */ +export interface OpenSearchWorkspace { + /** + *

The ID of this workspace.

+ * @public + */ + workspaceId?: string | undefined; + + /** + *

This structure contains information about the status of an OpenSearch Service resource.

+ * @public + */ + status?: OpenSearchResourceStatus | undefined; +} + +/** + *

This structure contains complete information about one CloudWatch Logs integration. This structure + * is returned by a GetIntegration operation.

+ * @public + */ +export interface OpenSearchIntegrationDetails { + /** + *

This structure contains information about the OpenSearch Service data source used for this integration. This data source was + * created as part of the integration setup. + * An OpenSearch Service data source defines the source and destination for OpenSearch Service queries. It includes the role required to execute queries and write to collections.

+ *

For more information about OpenSearch Service data sources , see Creating OpenSearch Service data source integrations with Amazon S3. + *

+ * @public + */ + dataSource?: OpenSearchDataSource | undefined; + + /** + *

This structure contains information about the OpenSearch Service application used for this integration. + * An OpenSearch Service application is the web application that was created by the integration with CloudWatch Logs. It hosts the vended logs dashboards.

+ * @public + */ + application?: OpenSearchApplication | undefined; + + /** + *

This structure contains information about the OpenSearch Service collection used for this integration. This collection was + * created as part of the integration setup. + * An OpenSearch Service collection is a logical grouping of one or more indexes that represent an analytics workload. + * For more information, see Creating and managing OpenSearch Service Serverless collections.

+ * @public + */ + collection?: OpenSearchCollection | undefined; + + /** + *

This structure contains information about the OpenSearch Service workspace used for this integration. + * An OpenSearch Service workspace is the collection of dashboards along with other OpenSearch Service tools. This workspace was created automatically as part of the integration setup. + * For more information, see Centralized OpenSearch user interface (Dashboards) with + * OpenSearch Service.

+ * @public + */ + workspace?: OpenSearchWorkspace | undefined; + + /** + *

This structure contains information about the OpenSearch Service encryption policy used for this integration. The encryption policy was created + * automatically when you created the integration. For more information, see Encryption policies in the OpenSearch Service Developer Guide. + *

+ * @public + */ + encryptionPolicy?: OpenSearchEncryptionPolicy | undefined; + + /** + *

This structure contains information about the OpenSearch Service network policy used for this integration. The network + * policy assigns network access settings to collections. + * For more information, see Network policies in the OpenSearch Service Developer Guide.

+ * @public + */ + networkPolicy?: OpenSearchNetworkPolicy | undefined; + + /** + *

This structure contains information about the OpenSearch Service data access policy used for this integration. The access + * policy defines the access controls for the collection. This data access policy was automatically created as part of the integration setup. + * For more information about OpenSearch Service data access policies, see Data access control for Amazon OpenSearch Serverless in the OpenSearch Service Developer Guide.

+ * @public + */ + accessPolicy?: OpenSearchDataAccessPolicy | undefined; + + /** + *

This structure contains information about the OpenSearch Service data lifecycle policy used for this integration. The lifecycle policy + * determines the lifespan of the data in the collection. It was automatically created as part of the integration setup.

+ *

For more information, see Using data lifecycle policies with OpenSearch Service Serverless + * in the OpenSearch Service Developer Guide.

+ * @public + */ + lifecyclePolicy?: OpenSearchLifecyclePolicy | undefined; +} + +/** + *

This structure contains information about the integration configuration. For an integration + * with OpenSearch Service, this includes information about OpenSearch Service resources such as the collection, the workspace, + * and policies.

+ *

This structure + * is returned by a GetIntegration operation.

+ * @public + */ +export type IntegrationDetails = + | IntegrationDetails.OpenSearchIntegrationDetailsMember + | IntegrationDetails.$UnknownMember; + +/** + * @public + */ +export namespace IntegrationDetails { + /** + *

This structure contains complete information about one integration between CloudWatch Logs and + * OpenSearch Service.

+ * @public + */ + export interface OpenSearchIntegrationDetailsMember { + openSearchIntegrationDetails: OpenSearchIntegrationDetails; + $unknown?: never; + } + + /** + * @public + */ + export interface $UnknownMember { + openSearchIntegrationDetails?: never; + $unknown: [string, any]; + } + + export interface Visitor { + openSearchIntegrationDetails: (value: OpenSearchIntegrationDetails) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: IntegrationDetails, visitor: Visitor): T => { + if (value.openSearchIntegrationDetails !== undefined) + return visitor.openSearchIntegrationDetails(value.openSearchIntegrationDetails); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; +} + +/** + * @public + * @enum + */ +export const IntegrationStatus = { + ACTIVE: "ACTIVE", + FAILED: "FAILED", + PROVISIONING: "PROVISIONING", +} as const; + +/** + * @public + */ +export type IntegrationStatus = (typeof IntegrationStatus)[keyof typeof IntegrationStatus]; + +/** + * @public + * @enum + */ +export const IntegrationType = { + OPENSEARCH: "OPENSEARCH", +} as const; + +/** + * @public + */ +export type IntegrationType = (typeof IntegrationType)[keyof typeof IntegrationType]; + +/** + * @public + */ +export interface GetIntegrationResponse { + /** + *

The name of the integration.

+ * @public + */ + integrationName?: string | undefined; + + /** + *

The type of integration. Integrations with OpenSearch Service have the type OPENSEARCH.

+ * @public + */ + integrationType?: IntegrationType | undefined; + + /** + *

The current status of this integration.

+ * @public + */ + integrationStatus?: IntegrationStatus | undefined; + + /** + *

A structure that contains information about the integration configuration. For an integration + * with OpenSearch Service, this includes information about OpenSearch Service resources such as the collection, the workspace, + * and policies.

+ * @public + */ + integrationDetails?: IntegrationDetails | undefined; +} + /** * @public */ @@ -4304,6 +4778,13 @@ export interface QueryStatistics { * @public */ export interface GetQueryResultsResponse { + /** + *

The query language used for this query. For more information about the query languages that CloudWatch Logs supports, + * see Supported query languages.

+ * @public + */ + queryLanguage?: QueryLanguage | undefined; + /** *

The log events that matched the query criteria during the most recent time it ran.

*

The results value is an array of arrays. Each log event is one object in the @@ -5068,6 +5549,31 @@ export interface InputLogEvent { message: string | undefined; } +/** + *

This structure contains information about one CloudWatch Logs integration. This structure + * is returned by a ListIntegrations operation.

+ * @public + */ +export interface IntegrationSummary { + /** + *

The name of this integration.

+ * @public + */ + integrationName?: string | undefined; + + /** + *

The type of integration. Integrations with OpenSearch Service have the type OPENSEARCH.

+ * @public + */ + integrationType?: IntegrationType | undefined; + + /** + *

The current status of this integration.

+ * @public + */ + integrationStatus?: IntegrationStatus | undefined; +} + /** *

The sequence token is not valid. You can get the correct sequence token in * the expectedSequenceToken field in the InvalidSequenceTokenException @@ -5162,6 +5668,40 @@ export interface ListAnomaliesResponse { nextToken?: string | undefined; } +/** + * @public + */ +export interface ListIntegrationsRequest { + /** + *

To limit the results to integrations that start with a certain name prefix, specify that name prefix here.

+ * @public + */ + integrationNamePrefix?: string | undefined; + + /** + *

To limit the results to integrations of a certain type, specify that type here.

+ * @public + */ + integrationType?: IntegrationType | undefined; + + /** + *

To limit the results to integrations with a certain status, specify that status here.

+ * @public + */ + integrationStatus?: IntegrationStatus | undefined; +} + +/** + * @public + */ +export interface ListIntegrationsResponse { + /** + *

An array, where each object in the array contains information about one CloudWatch Logs integration in this account.

+ * @public + */ + integrationSummaries?: IntegrationSummary[] | undefined; +} + /** * @public */ @@ -5905,6 +6445,130 @@ export interface PutIndexPolicyResponse { indexPolicy?: IndexPolicy | undefined; } +/** + *

This structure contains configuration details about an integration between CloudWatch Logs and OpenSearch Service.

+ * @public + */ +export interface OpenSearchResourceConfig { + /** + *

To have the vended dashboard data encrypted with KMS instead of the CloudWatch Logs default + * encryption method, specify the ARN of the KMS key that you want to use.

+ * @public + */ + kmsKeyArn?: string | undefined; + + /** + *

Specify the ARN of an IAM role that CloudWatch Logs will use to create the integration. This role must have the permissions necessary to access the OpenSearch Service + * collection to be able to create the dashboards. For more information about the permissions needed, see Create an IAM role to access the OpenSearch Service collection in the CloudWatch Logs User Guide.

+ * @public + */ + dataSourceRoleArn: string | undefined; + + /** + *

Specify the ARNs of IAM roles and IAM users who you want to grant permission to for viewing the dashboards.

+ * + *

In addition to specifying these users here, you must also grant them the CloudWatchOpenSearchDashboardsAccess + * IAM policy. For more information, see

+ *
+ * @public + */ + dashboardViewerPrincipals: string[] | undefined; + + /** + *

If you want to use an existing OpenSearch Service application for your integration with OpenSearch Service, specify it here. If you + * omit this, a new application will be created.

+ * @public + */ + applicationArn?: string | undefined; + + /** + *

Specify how many days that you want the data derived by OpenSearch Service to be retained in the index that the dashboard refers to. + * This also sets the maximum time period that you can choose when viewing data in the dashboard. Choosing a longer time frame will incur additional costs.

+ * @public + */ + retentionDays: number | undefined; +} + +/** + *

This structure contains configuration details about an integration between CloudWatch Logs and another entity.

+ * @public + */ +export type ResourceConfig = ResourceConfig.OpenSearchResourceConfigMember | ResourceConfig.$UnknownMember; + +/** + * @public + */ +export namespace ResourceConfig { + /** + *

This structure contains configuration details about an integration between CloudWatch Logs and OpenSearch Service.

+ * @public + */ + export interface OpenSearchResourceConfigMember { + openSearchResourceConfig: OpenSearchResourceConfig; + $unknown?: never; + } + + /** + * @public + */ + export interface $UnknownMember { + openSearchResourceConfig?: never; + $unknown: [string, any]; + } + + export interface Visitor { + openSearchResourceConfig: (value: OpenSearchResourceConfig) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: ResourceConfig, visitor: Visitor): T => { + if (value.openSearchResourceConfig !== undefined) + return visitor.openSearchResourceConfig(value.openSearchResourceConfig); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; +} + +/** + * @public + */ +export interface PutIntegrationRequest { + /** + *

A name for the integration.

+ * @public + */ + integrationName: string | undefined; + + /** + *

A structure that contains configuration information for the integration that you are creating.

+ * @public + */ + resourceConfig: ResourceConfig | undefined; + + /** + *

The type of integration. Currently, the only supported type is OPENSEARCH.

+ * @public + */ + integrationType: IntegrationType | undefined; +} + +/** + * @public + */ +export interface PutIntegrationResponse { + /** + *

The name of the integration that you just created.

+ * @public + */ + integrationName?: string | undefined; + + /** + *

The status of the integration that you just created.

+ *

After you create an integration, it takes a few minutes to complete. During this time, you'll see the status as PROVISIONING.

+ * @public + */ + integrationStatus?: IntegrationStatus | undefined; +} + /** * @public */ @@ -6084,6 +6748,13 @@ export interface PutMetricFilterRequest { * @public */ export interface PutQueryDefinitionRequest { + /** + *

Specify the query language to use for this query. The options are Logs Insights QL, OpenSearch PPL, and OpenSearch SQL. For more information about the query languages that CloudWatch Logs supports, + * see Supported query languages.

+ * @public + */ + queryLanguage?: QueryLanguage | undefined; + /** *

A name for the query definition. If you are saving numerous query definitions, we * recommend that you name them. This way, you can find the ones you want by using the first part @@ -6104,8 +6775,9 @@ export interface PutQueryDefinitionRequest { queryDefinitionId?: string | undefined; /** - *

Use this parameter to include specific log groups as part of your query definition.

- *

If you are updating a query definition and you omit this parameter, then the updated + *

Use this parameter to include specific log groups as part of your query definition. If your query + * uses the OpenSearch Service query language, you specify the log group names inside the querystring instead of here.

+ *

If you are updating an existing query definition for the Logs Insights QL or OpenSearch Service PPL and you omit this parameter, then the updated * definition will contain no log groups.

* @public */ @@ -6589,14 +7261,33 @@ export class MalformedQueryException extends __BaseException { * @public */ export interface StartQueryRequest { + /** + *

Specify the query language to use for this query. The options are Logs Insights QL, OpenSearch PPL, and OpenSearch SQL. For more information about the query languages that CloudWatch Logs supports, + * see Supported query languages.

+ * @public + */ + queryLanguage?: QueryLanguage | undefined; + /** *

The log group on which to perform the query.

+ * + *

A StartQuery operation must include exactly one of the following + * parameters: logGroupName, logGroupNames, or + * logGroupIdentifiers. The exception is queries using the OpenSearch Service SQL query + * language, where you specify the log group names inside the querystring instead of here.

+ *
* @public */ logGroupName?: string | undefined; /** *

The list of log groups to be queried. You can include up to 50 log groups.

+ * + *

A StartQuery operation must include exactly one of the following + * parameters: logGroupName, logGroupNames, or + * logGroupIdentifiers. The exception is queries using the OpenSearch Service SQL query + * language, where you specify the log group names inside the querystring instead of here.

+ *
* @public */ logGroupNames?: string[] | undefined; @@ -6609,7 +7300,8 @@ export interface StartQueryRequest { *

If you specify an ARN, use the format * arn:aws:logs:region:account-id:log-group:log_group_name Don't include an * at the end.

*

A StartQuery operation must include exactly one of the following parameters: - * logGroupName, logGroupNames, or logGroupIdentifiers.

+ * logGroupName, logGroupNames, or logGroupIdentifiers. The exception is queries using the OpenSearch Service SQL query + * language, where you specify the log group names inside the querystring instead of here.

* @public */ logGroupIdentifiers?: string[] | undefined; diff --git a/clients/client-cloudwatch-logs/src/protocols/Aws_json1_1.ts b/clients/client-cloudwatch-logs/src/protocols/Aws_json1_1.ts index 2484e1ea7393..d4e0c564813f 100644 --- a/clients/client-cloudwatch-logs/src/protocols/Aws_json1_1.ts +++ b/clients/client-cloudwatch-logs/src/protocols/Aws_json1_1.ts @@ -59,6 +59,7 @@ import { } from "../commands/DeleteDeliverySourceCommand"; import { DeleteDestinationCommandInput, DeleteDestinationCommandOutput } from "../commands/DeleteDestinationCommand"; import { DeleteIndexPolicyCommandInput, DeleteIndexPolicyCommandOutput } from "../commands/DeleteIndexPolicyCommand"; +import { DeleteIntegrationCommandInput, DeleteIntegrationCommandOutput } from "../commands/DeleteIntegrationCommand"; import { DeleteLogAnomalyDetectorCommandInput, DeleteLogAnomalyDetectorCommandOutput, @@ -151,6 +152,7 @@ import { GetDeliveryDestinationPolicyCommandOutput, } from "../commands/GetDeliveryDestinationPolicyCommand"; import { GetDeliverySourceCommandInput, GetDeliverySourceCommandOutput } from "../commands/GetDeliverySourceCommand"; +import { GetIntegrationCommandInput, GetIntegrationCommandOutput } from "../commands/GetIntegrationCommand"; import { GetLogAnomalyDetectorCommandInput, GetLogAnomalyDetectorCommandOutput, @@ -161,6 +163,7 @@ import { GetLogRecordCommandInput, GetLogRecordCommandOutput } from "../commands import { GetQueryResultsCommandInput, GetQueryResultsCommandOutput } from "../commands/GetQueryResultsCommand"; import { GetTransformerCommandInput, GetTransformerCommandOutput } from "../commands/GetTransformerCommand"; import { ListAnomaliesCommandInput, ListAnomaliesCommandOutput } from "../commands/ListAnomaliesCommand"; +import { ListIntegrationsCommandInput, ListIntegrationsCommandOutput } from "../commands/ListIntegrationsCommand"; import { ListLogAnomalyDetectorsCommandInput, ListLogAnomalyDetectorsCommandOutput, @@ -194,6 +197,7 @@ import { PutDestinationPolicyCommandOutput, } from "../commands/PutDestinationPolicyCommand"; import { PutIndexPolicyCommandInput, PutIndexPolicyCommandOutput } from "../commands/PutIndexPolicyCommand"; +import { PutIntegrationCommandInput, PutIntegrationCommandOutput } from "../commands/PutIntegrationCommand"; import { PutLogEventsCommandInput, PutLogEventsCommandOutput } from "../commands/PutLogEventsCommand"; import { PutMetricFilterCommandInput, PutMetricFilterCommandOutput } from "../commands/PutMetricFilterCommand"; import { PutQueryDefinitionCommandInput, PutQueryDefinitionCommandOutput } from "../commands/PutQueryDefinitionCommand"; @@ -248,6 +252,7 @@ import { DeleteDeliverySourceRequest, DeleteDestinationRequest, DeleteIndexPolicyRequest, + DeleteIntegrationRequest, DeleteKeys, DeleteLogAnomalyDetectorRequest, DeleteLogGroupRequest, @@ -285,6 +290,7 @@ import { GetDeliveryDestinationRequest, GetDeliveryRequest, GetDeliverySourceRequest, + GetIntegrationRequest, GetLogAnomalyDetectorRequest, GetLogEventsRequest, GetLogGroupFieldsRequest, @@ -299,6 +305,7 @@ import { InvalidSequenceTokenException, LimitExceededException, ListAnomaliesRequest, + ListIntegrationsRequest, ListLogAnomalyDetectorsRequest, ListLogGroupsForQueryRequest, ListTagsForResourceRequest, @@ -312,6 +319,7 @@ import { MetricTransformation, MoveKeyEntry, MoveKeys, + OpenSearchResourceConfig, OperationAbortedException, ParseCloudfront, ParseJSON, @@ -329,6 +337,7 @@ import { PutDestinationPolicyRequest, PutDestinationRequest, PutIndexPolicyRequest, + PutIntegrationRequest, PutLogEventsRequest, PutMetricFilterRequest, PutQueryDefinitionRequest, @@ -340,6 +349,7 @@ import { RenameKeyEntry, RenameKeys, ResourceAlreadyExistsException, + ResourceConfig, ResourceNotFoundException, S3DeliveryConfiguration, ServiceQuotaExceededException, @@ -569,6 +579,19 @@ export const se_DeleteIndexPolicyCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_json1_1DeleteIntegrationCommand + */ +export const se_DeleteIntegrationCommand = async ( + input: DeleteIntegrationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("DeleteIntegration"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_json1_1DeleteLogAnomalyDetectorCommand */ @@ -985,6 +1008,19 @@ export const se_GetDeliverySourceCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_json1_1GetIntegrationCommand + */ +export const se_GetIntegrationCommand = async ( + input: GetIntegrationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("GetIntegration"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_json1_1GetLogAnomalyDetectorCommand */ @@ -1076,6 +1112,19 @@ export const se_ListAnomaliesCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_json1_1ListIntegrationsCommand + */ +export const se_ListIntegrationsCommand = async ( + input: ListIntegrationsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("ListIntegrations"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_json1_1ListLogAnomalyDetectorsCommand */ @@ -1232,6 +1281,19 @@ export const se_PutIndexPolicyCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_json1_1PutIntegrationCommand + */ +export const se_PutIntegrationCommand = async ( + input: PutIntegrationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("PutIntegration"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_json1_1PutLogEventsCommand */ @@ -1753,6 +1815,26 @@ export const de_DeleteIndexPolicyCommand = async ( return response; }; +/** + * deserializeAws_json1_1DeleteIntegrationCommand + */ +export const de_DeleteIntegrationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: DeleteIntegrationCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + /** * deserializeAws_json1_1DeleteLogAnomalyDetectorCommand */ @@ -2366,6 +2448,26 @@ export const de_GetDeliverySourceCommand = async ( return response; }; +/** + * deserializeAws_json1_1GetIntegrationCommand + */ +export const de_GetIntegrationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: GetIntegrationCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + /** * deserializeAws_json1_1GetLogAnomalyDetectorCommand */ @@ -2506,6 +2608,26 @@ export const de_ListAnomaliesCommand = async ( return response; }; +/** + * deserializeAws_json1_1ListIntegrationsCommand + */ +export const de_ListIntegrationsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: ListIntegrationsCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + /** * deserializeAws_json1_1ListLogAnomalyDetectorsCommand */ @@ -2743,6 +2865,26 @@ export const de_PutIndexPolicyCommand = async ( return response; }; +/** + * deserializeAws_json1_1PutIntegrationCommand + */ +export const de_PutIntegrationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: PutIntegrationCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + /** * deserializeAws_json1_1PutLogEventsCommand */ @@ -3555,6 +3697,8 @@ const de_SessionTimeoutExceptionRes = async ( // se_CSV omitted. +// se_DashboardViewerPrincipals omitted. + // se_DateTimeConverter omitted. // se_DeleteAccountPolicyRequest omitted. @@ -3573,6 +3717,8 @@ const de_SessionTimeoutExceptionRes = async ( // se_DeleteIndexPolicyRequest omitted. +// se_DeleteIntegrationRequest omitted. + // se_DeleteKeys omitted. // se_DeleteLogAnomalyDetectorRequest omitted. @@ -3657,6 +3803,8 @@ const de_SessionTimeoutExceptionRes = async ( // se_GetDeliverySourceRequest omitted. +// se_GetIntegrationRequest omitted. + // se_GetLogAnomalyDetectorRequest omitted. // se_GetLogEventsRequest omitted. @@ -3679,6 +3827,8 @@ const de_SessionTimeoutExceptionRes = async ( // se_ListAnomaliesRequest omitted. +// se_ListIntegrationsRequest omitted. + // se_ListLogAnomalyDetectorsRequest omitted. // se_ListLogGroupsForQueryRequest omitted. @@ -3734,6 +3884,8 @@ const se_MetricTransformations = (input: MetricTransformation[], context: __Serd // se_MoveKeys omitted. +// se_OpenSearchResourceConfig omitted. + // se_ParseCloudfront omitted. // se_ParseJSON omitted. @@ -3768,6 +3920,8 @@ const se_MetricTransformations = (input: MetricTransformation[], context: __Serd // se_PutIndexPolicyRequest omitted. +// se_PutIntegrationRequest omitted. + // se_PutLogEventsRequest omitted. /** @@ -3792,6 +3946,7 @@ const se_PutQueryDefinitionRequest = (input: PutQueryDefinitionRequest, context: logGroupNames: _json, name: [], queryDefinitionId: [], + queryLanguage: [], queryString: [], }); }; @@ -3812,6 +3967,8 @@ const se_PutQueryDefinitionRequest = (input: PutQueryDefinitionRequest, context: // se_RenameKeys omitted. +// se_ResourceConfig omitted. + // se_ResourceTypes omitted. // se_S3DeliveryConfiguration omitted. @@ -3932,6 +4089,8 @@ const se_PutQueryDefinitionRequest = (input: PutQueryDefinitionRequest, context: // de_DeleteIndexPolicyResponse omitted. +// de_DeleteIntegrationResponse omitted. + // de_DeleteKeys omitted. // de_DeleteQueryDefinitionResponse omitted. @@ -4030,6 +4189,8 @@ const de_DescribeMetricFiltersResponse = (output: any, context: __SerdeContext): // de_GetDeliverySourceResponse omitted. +// de_GetIntegrationResponse omitted. + // de_GetLogAnomalyDetectorResponse omitted. // de_GetLogEventsResponse omitted. @@ -4044,6 +4205,7 @@ const de_DescribeMetricFiltersResponse = (output: any, context: __SerdeContext): const de_GetQueryResultsResponse = (output: any, context: __SerdeContext): GetQueryResultsResponse => { return take(output, { encryptionKey: __expectString, + queryLanguage: __expectString, results: _json, statistics: (_: any) => de_QueryStatistics(_, context), status: __expectString, @@ -4064,6 +4226,12 @@ const de_GetQueryResultsResponse = (output: any, context: __SerdeContext): GetQu // de_InputLogStreamNames omitted. +// de_IntegrationDetails omitted. + +// de_IntegrationSummaries omitted. + +// de_IntegrationSummary omitted. + // de_InvalidOperationException omitted. // de_InvalidParameterException omitted. @@ -4074,6 +4242,8 @@ const de_GetQueryResultsResponse = (output: any, context: __SerdeContext): GetQu // de_ListAnomaliesResponse omitted. +// de_ListIntegrationsResponse omitted. + // de_ListLogAnomalyDetectorsResponse omitted. // de_ListLogGroupsForQueryResponse omitted. @@ -4188,6 +4358,26 @@ const de_MetricTransformations = (output: any, context: __SerdeContext): MetricT // de_MoveKeys omitted. +// de_OpenSearchApplication omitted. + +// de_OpenSearchCollection omitted. + +// de_OpenSearchDataAccessPolicy omitted. + +// de_OpenSearchDataSource omitted. + +// de_OpenSearchEncryptionPolicy omitted. + +// de_OpenSearchIntegrationDetails omitted. + +// de_OpenSearchLifecyclePolicy omitted. + +// de_OpenSearchNetworkPolicy omitted. + +// de_OpenSearchResourceStatus omitted. + +// de_OpenSearchWorkspace omitted. + // de_OperationAbortedException omitted. // de_OutputFormats omitted. @@ -4234,6 +4424,8 @@ const de_MetricTransformations = (output: any, context: __SerdeContext): MetricT // de_PutIndexPolicyResponse omitted. +// de_PutIntegrationResponse omitted. + // de_PutLogEventsResponse omitted. // de_PutQueryDefinitionResponse omitted. diff --git a/codegen/sdk-codegen/aws-models/cloudwatch-logs.json b/codegen/sdk-codegen/aws-models/cloudwatch-logs.json index be2d80081fff..88f81405049c 100644 --- a/codegen/sdk-codegen/aws-models/cloudwatch-logs.json +++ b/codegen/sdk-codegen/aws-models/cloudwatch-logs.json @@ -657,6 +657,15 @@ "smithy.api#pattern": "^\\S{36,128}$" } }, + "com.amazonaws.cloudwatchlogs#CollectionRetentionDays": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 1, + "max": 30 + } + } + }, "com.amazonaws.cloudwatchlogs#Column": { "type": "string", "traits": { @@ -1251,6 +1260,12 @@ "smithy.api#input": {} } }, + "com.amazonaws.cloudwatchlogs#DashboardViewerPrincipals": { + "type": "list", + "member": { + "target": "com.amazonaws.cloudwatchlogs#Arn" + } + }, "com.amazonaws.cloudwatchlogs#DataAlreadyAcceptedException": { "type": "structure", "members": { @@ -1723,6 +1738,61 @@ "smithy.api#output": {} } }, + "com.amazonaws.cloudwatchlogs#DeleteIntegration": { + "type": "operation", + "input": { + "target": "com.amazonaws.cloudwatchlogs#DeleteIntegrationRequest" + }, + "output": { + "target": "com.amazonaws.cloudwatchlogs#DeleteIntegrationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.cloudwatchlogs#InvalidParameterException" + }, + { + "target": "com.amazonaws.cloudwatchlogs#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.cloudwatchlogs#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.cloudwatchlogs#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes the integration between CloudWatch Logs and OpenSearch Service. If your integration has active vended logs dashboards, \n you must specify true for the force parameter, otherwise the operation will fail. If you delete the integration by \n setting force to true, \n all your vended logs dashboards powered by OpenSearch Service will be deleted and the data that was on them \n will no longer be accessible.

" + } + }, + "com.amazonaws.cloudwatchlogs#DeleteIntegrationRequest": { + "type": "structure", + "members": { + "integrationName": { + "target": "com.amazonaws.cloudwatchlogs#IntegrationName", + "traits": { + "smithy.api#documentation": "

The name of the integration to delete. To find the name of your integration, use \n ListIntegrations.

", + "smithy.api#required": {} + } + }, + "force": { + "target": "com.amazonaws.cloudwatchlogs#Force", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "

Specify true to force the deletion of the integration even if vended logs dashboards currently exist.

\n

The default is false.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.cloudwatchlogs#DeleteIntegrationResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.cloudwatchlogs#DeleteKeys": { "type": "structure", "members": { @@ -3442,6 +3512,12 @@ }, "nextToken": { "target": "com.amazonaws.cloudwatchlogs#NextToken" + }, + "queryLanguage": { + "target": "com.amazonaws.cloudwatchlogs#QueryLanguage", + "traits": { + "smithy.api#documentation": "

Limits the returned queries to only the queries that use the specified query language.

" + } } }, "traits": { @@ -3488,6 +3564,12 @@ "com.amazonaws.cloudwatchlogs#DescribeQueryDefinitionsRequest": { "type": "structure", "members": { + "queryLanguage": { + "target": "com.amazonaws.cloudwatchlogs#QueryLanguage", + "traits": { + "smithy.api#documentation": "

The query language used for this query. For more information about the query languages that CloudWatch Logs supports, \n see Supported query languages.

" + } + }, "queryDefinitionNamePrefix": { "target": "com.amazonaws.cloudwatchlogs#QueryDefinitionName", "traits": { @@ -4565,6 +4647,12 @@ } } }, + "com.amazonaws.cloudwatchlogs#Force": { + "type": "boolean", + "traits": { + "smithy.api#default": false + } + }, "com.amazonaws.cloudwatchlogs#ForceUpdate": { "type": "boolean" }, @@ -4870,6 +4958,76 @@ "smithy.api#output": {} } }, + "com.amazonaws.cloudwatchlogs#GetIntegration": { + "type": "operation", + "input": { + "target": "com.amazonaws.cloudwatchlogs#GetIntegrationRequest" + }, + "output": { + "target": "com.amazonaws.cloudwatchlogs#GetIntegrationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.cloudwatchlogs#InvalidParameterException" + }, + { + "target": "com.amazonaws.cloudwatchlogs#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.cloudwatchlogs#ServiceUnavailableException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns information about one integration between CloudWatch Logs and OpenSearch Service.

" + } + }, + "com.amazonaws.cloudwatchlogs#GetIntegrationRequest": { + "type": "structure", + "members": { + "integrationName": { + "target": "com.amazonaws.cloudwatchlogs#IntegrationName", + "traits": { + "smithy.api#documentation": "

The name of the integration that you want to find information about. To find the name of your integration, use \n ListIntegrations\n

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.cloudwatchlogs#GetIntegrationResponse": { + "type": "structure", + "members": { + "integrationName": { + "target": "com.amazonaws.cloudwatchlogs#IntegrationName", + "traits": { + "smithy.api#documentation": "

The name of the integration.

" + } + }, + "integrationType": { + "target": "com.amazonaws.cloudwatchlogs#IntegrationType", + "traits": { + "smithy.api#documentation": "

The type of integration. Integrations with OpenSearch Service have the type OPENSEARCH.

" + } + }, + "integrationStatus": { + "target": "com.amazonaws.cloudwatchlogs#IntegrationStatus", + "traits": { + "smithy.api#documentation": "

The current status of this integration.

" + } + }, + "integrationDetails": { + "target": "com.amazonaws.cloudwatchlogs#IntegrationDetails", + "traits": { + "smithy.api#documentation": "

A structure that contains information about the integration configuration. For an integration \n with OpenSearch Service, this includes information about OpenSearch Service resources such as the collection, the workspace, \n and policies.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.cloudwatchlogs#GetLogAnomalyDetector": { "type": "operation", "input": { @@ -5276,6 +5434,12 @@ "com.amazonaws.cloudwatchlogs#GetQueryResultsResponse": { "type": "structure", "members": { + "queryLanguage": { + "target": "com.amazonaws.cloudwatchlogs#QueryLanguage", + "traits": { + "smithy.api#documentation": "

The query language used for this query. For more information about the query languages that CloudWatch Logs supports, \n see Supported query languages.

" + } + }, "results": { "target": "com.amazonaws.cloudwatchlogs#QueryResults", "traits": { @@ -5558,6 +5722,114 @@ "smithy.api#default": 0 } }, + "com.amazonaws.cloudwatchlogs#IntegrationDetails": { + "type": "union", + "members": { + "openSearchIntegrationDetails": { + "target": "com.amazonaws.cloudwatchlogs#OpenSearchIntegrationDetails", + "traits": { + "smithy.api#documentation": "

This structure contains complete information about one integration between CloudWatch Logs and\n OpenSearch Service.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

This structure contains information about the integration configuration. For an integration \n with OpenSearch Service, this includes information about OpenSearch Service resources such as the collection, the workspace, \n and policies.

\n

This structure\n is returned by a GetIntegration operation.

" + } + }, + "com.amazonaws.cloudwatchlogs#IntegrationName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256 + }, + "smithy.api#pattern": "^[\\.\\-_/#A-Za-z0-9]+$" + } + }, + "com.amazonaws.cloudwatchlogs#IntegrationNamePrefix": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256 + }, + "smithy.api#pattern": "^[\\.\\-_/#A-Za-z0-9]+$" + } + }, + "com.amazonaws.cloudwatchlogs#IntegrationStatus": { + "type": "enum", + "members": { + "PROVISIONING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PROVISIONING" + } + }, + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVE" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + } + } + }, + "com.amazonaws.cloudwatchlogs#IntegrationStatusMessage": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1 + } + } + }, + "com.amazonaws.cloudwatchlogs#IntegrationSummaries": { + "type": "list", + "member": { + "target": "com.amazonaws.cloudwatchlogs#IntegrationSummary" + } + }, + "com.amazonaws.cloudwatchlogs#IntegrationSummary": { + "type": "structure", + "members": { + "integrationName": { + "target": "com.amazonaws.cloudwatchlogs#IntegrationName", + "traits": { + "smithy.api#documentation": "

The name of this integration.

" + } + }, + "integrationType": { + "target": "com.amazonaws.cloudwatchlogs#IntegrationType", + "traits": { + "smithy.api#documentation": "

The type of integration. Integrations with OpenSearch Service have the type OPENSEARCH.

" + } + }, + "integrationStatus": { + "target": "com.amazonaws.cloudwatchlogs#IntegrationStatus", + "traits": { + "smithy.api#documentation": "

The current status of this integration.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

This structure contains information about one CloudWatch Logs integration. This structure\n is returned by a ListIntegrations operation.

" + } + }, + "com.amazonaws.cloudwatchlogs#IntegrationType": { + "type": "enum", + "members": { + "OPENSEARCH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "OPENSEARCH" + } + } + } + }, "com.amazonaws.cloudwatchlogs#Interleaved": { "type": "boolean" }, @@ -5741,6 +6013,66 @@ "smithy.api#output": {} } }, + "com.amazonaws.cloudwatchlogs#ListIntegrations": { + "type": "operation", + "input": { + "target": "com.amazonaws.cloudwatchlogs#ListIntegrationsRequest" + }, + "output": { + "target": "com.amazonaws.cloudwatchlogs#ListIntegrationsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.cloudwatchlogs#InvalidParameterException" + }, + { + "target": "com.amazonaws.cloudwatchlogs#ServiceUnavailableException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns a list of integrations between CloudWatch Logs and other services in this account. Currently, only one\n integration can be created in an account, and this integration must be with OpenSearch Service.

" + } + }, + "com.amazonaws.cloudwatchlogs#ListIntegrationsRequest": { + "type": "structure", + "members": { + "integrationNamePrefix": { + "target": "com.amazonaws.cloudwatchlogs#IntegrationNamePrefix", + "traits": { + "smithy.api#documentation": "

To limit the results to integrations that start with a certain name prefix, specify that name prefix here.

" + } + }, + "integrationType": { + "target": "com.amazonaws.cloudwatchlogs#IntegrationType", + "traits": { + "smithy.api#documentation": "

To limit the results to integrations of a certain type, specify that type here.

" + } + }, + "integrationStatus": { + "target": "com.amazonaws.cloudwatchlogs#IntegrationStatus", + "traits": { + "smithy.api#documentation": "

To limit the results to integrations with a certain status, specify that status here.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.cloudwatchlogs#ListIntegrationsResponse": { + "type": "structure", + "members": { + "integrationSummaries": { + "target": "com.amazonaws.cloudwatchlogs#IntegrationSummaries", + "traits": { + "smithy.api#documentation": "

An array, where each object in the array contains information about one CloudWatch Logs integration in this account.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.cloudwatchlogs#ListLogAnomalyDetectors": { "type": "operation", "input": { @@ -6561,6 +6893,9 @@ { "target": "com.amazonaws.cloudwatchlogs#DeleteIndexPolicy" }, + { + "target": "com.amazonaws.cloudwatchlogs#DeleteIntegration" + }, { "target": "com.amazonaws.cloudwatchlogs#DeleteLogAnomalyDetector" }, @@ -6657,6 +6992,9 @@ { "target": "com.amazonaws.cloudwatchlogs#GetDeliverySource" }, + { + "target": "com.amazonaws.cloudwatchlogs#GetIntegration" + }, { "target": "com.amazonaws.cloudwatchlogs#GetLogAnomalyDetector" }, @@ -6678,6 +7016,9 @@ { "target": "com.amazonaws.cloudwatchlogs#ListAnomalies" }, + { + "target": "com.amazonaws.cloudwatchlogs#ListIntegrations" + }, { "target": "com.amazonaws.cloudwatchlogs#ListLogAnomalyDetectors" }, @@ -6714,6 +7055,9 @@ { "target": "com.amazonaws.cloudwatchlogs#PutIndexPolicy" }, + { + "target": "com.amazonaws.cloudwatchlogs#PutIntegration" + }, { "target": "com.amazonaws.cloudwatchlogs#PutLogEvents" }, @@ -8132,17 +8476,395 @@ } } }, - "com.amazonaws.cloudwatchlogs#OperationAbortedException": { + "com.amazonaws.cloudwatchlogs#OpenSearchApplication": { "type": "structure", "members": { - "message": { - "target": "com.amazonaws.cloudwatchlogs#Message" - } - }, - "traits": { - "smithy.api#documentation": "

Multiple concurrent requests to update the same resource were in conflict.

", - "smithy.api#error": "client" - } + "applicationEndpoint": { + "target": "com.amazonaws.cloudwatchlogs#OpenSearchApplicationEndpoint", + "traits": { + "smithy.api#documentation": "

The endpoint of the application.

" + } + }, + "applicationArn": { + "target": "com.amazonaws.cloudwatchlogs#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application.

" + } + }, + "applicationId": { + "target": "com.amazonaws.cloudwatchlogs#OpenSearchApplicationId", + "traits": { + "smithy.api#documentation": "

The ID of the application.

" + } + }, + "status": { + "target": "com.amazonaws.cloudwatchlogs#OpenSearchResourceStatus", + "traits": { + "smithy.api#documentation": "

This structure contains information about the status of this OpenSearch Service resource.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

This structure contains information about the OpenSearch Service application used for this integration.\n An OpenSearch Service application is the web application created by the integration with CloudWatch Logs. It hosts the vended logs dashboards.

" + } + }, + "com.amazonaws.cloudwatchlogs#OpenSearchApplicationEndpoint": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + }, + "smithy.api#pattern": "^https://[\\.\\-_/#:A-Za-z0-9]+\\.com$" + } + }, + "com.amazonaws.cloudwatchlogs#OpenSearchApplicationId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256 + }, + "smithy.api#pattern": "^[\\.\\-_/#A-Za-z0-9]+$" + } + }, + "com.amazonaws.cloudwatchlogs#OpenSearchCollection": { + "type": "structure", + "members": { + "collectionEndpoint": { + "target": "com.amazonaws.cloudwatchlogs#OpenSearchCollectionEndpoint", + "traits": { + "smithy.api#documentation": "

The endpoint of the collection.

" + } + }, + "collectionArn": { + "target": "com.amazonaws.cloudwatchlogs#Arn", + "traits": { + "smithy.api#documentation": "

The ARN of the collection.

" + } + }, + "status": { + "target": "com.amazonaws.cloudwatchlogs#OpenSearchResourceStatus", + "traits": { + "smithy.api#documentation": "

This structure contains information about the status of this OpenSearch Service resource.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

This structure contains information about the OpenSearch Service collection used for this integration.\n An OpenSearch Service collection is a logical grouping of one or more indexes that represent an analytics workload. \n For more information, see Creating and managing OpenSearch Service Serverless collections.

" + } + }, + "com.amazonaws.cloudwatchlogs#OpenSearchCollectionEndpoint": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + }, + "smithy.api#pattern": "^https://[\\.\\-_/#:A-Za-z0-9]+\\.com$" + } + }, + "com.amazonaws.cloudwatchlogs#OpenSearchDataAccessPolicy": { + "type": "structure", + "members": { + "policyName": { + "target": "com.amazonaws.cloudwatchlogs#OpenSearchPolicyName", + "traits": { + "smithy.api#documentation": "

The name of the data access policy.

" + } + }, + "status": { + "target": "com.amazonaws.cloudwatchlogs#OpenSearchResourceStatus", + "traits": { + "smithy.api#documentation": "

This structure contains information about the status of this OpenSearch Service resource.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

This structure contains information about the OpenSearch Service data access policy used for this integration. The access \n policy defines the access controls for the collection. This data access policy was automatically created as part of the integration setup.\n For more information about OpenSearch Service data access policies, see Data access control for Amazon OpenSearch Serverless in the OpenSearch Service Developer Guide.

" + } + }, + "com.amazonaws.cloudwatchlogs#OpenSearchDataSource": { + "type": "structure", + "members": { + "dataSourceName": { + "target": "com.amazonaws.cloudwatchlogs#OpenSearchDataSourceName", + "traits": { + "smithy.api#documentation": "

The name of the OpenSearch Service data source.

" + } + }, + "status": { + "target": "com.amazonaws.cloudwatchlogs#OpenSearchResourceStatus", + "traits": { + "smithy.api#documentation": "

This structure contains information about the status of this OpenSearch Service resource.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

This structure contains information about the OpenSearch Service data source used for this integration. This data source was \n created as part of the integration setup.\n An OpenSearch Service data source defines the source and destination for OpenSearch Service queries. It includes the role required to execute queries and write to collections.

\n

For more information about OpenSearch Service data sources , see Creating OpenSearch Service data source integrations with Amazon S3.\n

" + } + }, + "com.amazonaws.cloudwatchlogs#OpenSearchDataSourceName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256 + }, + "smithy.api#pattern": "^[\\.\\-_/#A-Za-z0-9]+$" + } + }, + "com.amazonaws.cloudwatchlogs#OpenSearchEncryptionPolicy": { + "type": "structure", + "members": { + "policyName": { + "target": "com.amazonaws.cloudwatchlogs#OpenSearchPolicyName", + "traits": { + "smithy.api#documentation": "

The name of the encryption policy.

" + } + }, + "status": { + "target": "com.amazonaws.cloudwatchlogs#OpenSearchResourceStatus", + "traits": { + "smithy.api#documentation": "

This structure contains information about the status of this OpenSearch Service resource.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

This structure contains information about the OpenSearch Service encryption policy used for this integration. The encryption policy was created\n automatically when you created the integration. For more information, see Encryption policies in the OpenSearch Service Developer Guide.\n

" + } + }, + "com.amazonaws.cloudwatchlogs#OpenSearchIntegrationDetails": { + "type": "structure", + "members": { + "dataSource": { + "target": "com.amazonaws.cloudwatchlogs#OpenSearchDataSource", + "traits": { + "smithy.api#documentation": "

This structure contains information about the OpenSearch Service data source used for this integration. This data source was \n created as part of the integration setup.\n An OpenSearch Service data source defines the source and destination for OpenSearch Service queries. It includes the role required to execute queries and write to collections.

\n

For more information about OpenSearch Service data sources , see Creating OpenSearch Service data source integrations with Amazon S3.\n

" + } + }, + "application": { + "target": "com.amazonaws.cloudwatchlogs#OpenSearchApplication", + "traits": { + "smithy.api#documentation": "

This structure contains information about the OpenSearch Service application used for this integration.\n An OpenSearch Service application is the web application that was created by the integration with CloudWatch Logs. It hosts the vended logs dashboards.

" + } + }, + "collection": { + "target": "com.amazonaws.cloudwatchlogs#OpenSearchCollection", + "traits": { + "smithy.api#documentation": "

This structure contains information about the OpenSearch Service collection used for this integration. This collection was \n created as part of the integration setup.\n An OpenSearch Service collection is a logical grouping of one or more indexes that represent an analytics workload. \n For more information, see Creating and managing OpenSearch Service Serverless collections.

" + } + }, + "workspace": { + "target": "com.amazonaws.cloudwatchlogs#OpenSearchWorkspace", + "traits": { + "smithy.api#documentation": "

This structure contains information about the OpenSearch Service workspace used for this integration.\n An OpenSearch Service workspace is the collection of dashboards along with other OpenSearch Service tools. This workspace was created automatically as part of the integration setup.\n For more information, see Centralized OpenSearch user interface (Dashboards) with \n OpenSearch Service.

" + } + }, + "encryptionPolicy": { + "target": "com.amazonaws.cloudwatchlogs#OpenSearchEncryptionPolicy", + "traits": { + "smithy.api#documentation": "

This structure contains information about the OpenSearch Service encryption policy used for this integration. The encryption policy was created\n automatically when you created the integration. For more information, see Encryption policies in the OpenSearch Service Developer Guide.\n

" + } + }, + "networkPolicy": { + "target": "com.amazonaws.cloudwatchlogs#OpenSearchNetworkPolicy", + "traits": { + "smithy.api#documentation": "

This structure contains information about the OpenSearch Service network policy used for this integration. The network \n policy assigns network access settings to collections. \n For more information, see Network policies in the OpenSearch Service Developer Guide.

" + } + }, + "accessPolicy": { + "target": "com.amazonaws.cloudwatchlogs#OpenSearchDataAccessPolicy", + "traits": { + "smithy.api#documentation": "

This structure contains information about the OpenSearch Service data access policy used for this integration. The access \n policy defines the access controls for the collection. This data access policy was automatically created as part of the integration setup.\n For more information about OpenSearch Service data access policies, see Data access control for Amazon OpenSearch Serverless in the OpenSearch Service Developer Guide.

" + } + }, + "lifecyclePolicy": { + "target": "com.amazonaws.cloudwatchlogs#OpenSearchLifecyclePolicy", + "traits": { + "smithy.api#documentation": "

This structure contains information about the OpenSearch Service data lifecycle policy used for this integration. The lifecycle policy\n determines the lifespan of the data in the collection. It was automatically created as part of the integration setup.

\n

For more information, see Using data lifecycle policies with OpenSearch Service Serverless \n in the OpenSearch Service Developer Guide.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

This structure contains complete information about one CloudWatch Logs integration. This structure\n is returned by a GetIntegration operation.

" + } + }, + "com.amazonaws.cloudwatchlogs#OpenSearchLifecyclePolicy": { + "type": "structure", + "members": { + "policyName": { + "target": "com.amazonaws.cloudwatchlogs#OpenSearchPolicyName", + "traits": { + "smithy.api#documentation": "

The name of the lifecycle policy.

" + } + }, + "status": { + "target": "com.amazonaws.cloudwatchlogs#OpenSearchResourceStatus", + "traits": { + "smithy.api#documentation": "

This structure contains information about the status of this OpenSearch Service resource.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

This structure contains information about the OpenSearch Service data lifecycle policy used for this integration. The lifecycle policy\n determines the lifespan of the data in the collection. It was automatically created as part of the integration setup.

\n

For more information, see Using data lifecycle policies with OpenSearch Service Serverless \n in the OpenSearch Service Developer Guide.

" + } + }, + "com.amazonaws.cloudwatchlogs#OpenSearchNetworkPolicy": { + "type": "structure", + "members": { + "policyName": { + "target": "com.amazonaws.cloudwatchlogs#OpenSearchPolicyName", + "traits": { + "smithy.api#documentation": "

The name of the network policy.

" + } + }, + "status": { + "target": "com.amazonaws.cloudwatchlogs#OpenSearchResourceStatus", + "traits": { + "smithy.api#documentation": "

This structure contains information about the status of this OpenSearch Service resource.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

This structure contains information about the OpenSearch Service network policy used for this integration. The network \n policy assigns network access settings to collections. \n For more information, see Network policies in the OpenSearch Service Developer Guide.

" + } + }, + "com.amazonaws.cloudwatchlogs#OpenSearchPolicyName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256 + }, + "smithy.api#pattern": "^[\\.\\-_/#A-Za-z0-9]+$" + } + }, + "com.amazonaws.cloudwatchlogs#OpenSearchResourceConfig": { + "type": "structure", + "members": { + "kmsKeyArn": { + "target": "com.amazonaws.cloudwatchlogs#Arn", + "traits": { + "smithy.api#documentation": "

To have the vended dashboard data encrypted with KMS instead of the CloudWatch Logs default \n encryption method, specify the ARN of the KMS key that you want to use.

" + } + }, + "dataSourceRoleArn": { + "target": "com.amazonaws.cloudwatchlogs#Arn", + "traits": { + "smithy.api#documentation": "

Specify the ARN of an IAM role that CloudWatch Logs will use to create the integration. This role must have the permissions necessary to access the OpenSearch Service\n collection to be able to create the dashboards. For more information about the permissions needed, see Create an IAM role to access the OpenSearch Service collection in the CloudWatch Logs User Guide.

", + "smithy.api#required": {} + } + }, + "dashboardViewerPrincipals": { + "target": "com.amazonaws.cloudwatchlogs#DashboardViewerPrincipals", + "traits": { + "smithy.api#documentation": "

Specify the ARNs of IAM roles and IAM users who you want to grant permission to for viewing the dashboards.

\n \n

In addition to specifying these users here, you must also grant them the CloudWatchOpenSearchDashboardsAccess \n IAM policy. For more information, see

\n
", + "smithy.api#required": {} + } + }, + "applicationArn": { + "target": "com.amazonaws.cloudwatchlogs#Arn", + "traits": { + "smithy.api#documentation": "

If you want to use an existing OpenSearch Service application for your integration with OpenSearch Service, specify it here. If you \n omit this, a new application will be created.

" + } + }, + "retentionDays": { + "target": "com.amazonaws.cloudwatchlogs#CollectionRetentionDays", + "traits": { + "smithy.api#documentation": "

Specify how many days that you want the data derived by OpenSearch Service to be retained in the index that the dashboard refers to. \n This also sets the maximum time period that you can choose when viewing data in the dashboard. Choosing a longer time frame will incur additional costs.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

This structure contains configuration details about an integration between CloudWatch Logs and OpenSearch Service.

" + } + }, + "com.amazonaws.cloudwatchlogs#OpenSearchResourceStatus": { + "type": "structure", + "members": { + "status": { + "target": "com.amazonaws.cloudwatchlogs#OpenSearchResourceStatusType", + "traits": { + "smithy.api#documentation": "

The current status of this resource.

" + } + }, + "statusMessage": { + "target": "com.amazonaws.cloudwatchlogs#IntegrationStatusMessage", + "traits": { + "smithy.api#documentation": "

A message with additional information about the status of this resource.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

This structure contains information about the status of an OpenSearch Service resource.

" + } + }, + "com.amazonaws.cloudwatchlogs#OpenSearchResourceStatusType": { + "type": "enum", + "members": { + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVE" + } + }, + "NOT_FOUND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NOT_FOUND" + } + }, + "ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ERROR" + } + } + } + }, + "com.amazonaws.cloudwatchlogs#OpenSearchWorkspace": { + "type": "structure", + "members": { + "workspaceId": { + "target": "com.amazonaws.cloudwatchlogs#OpenSearchWorkspaceId", + "traits": { + "smithy.api#documentation": "

The ID of this workspace.

" + } + }, + "status": { + "target": "com.amazonaws.cloudwatchlogs#OpenSearchResourceStatus", + "traits": { + "smithy.api#documentation": "

This structure contains information about the status of an OpenSearch Service resource.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

This structure contains information about the OpenSearch Service workspace used for this integration.\n An OpenSearch Service workspace is the collection of dashboards along with other OpenSearch Service tools. This workspace was created automatically as part of the integration setup.\n For more information, see Centralized OpenSearch user interface (Dashboards) with \n OpenSearch Service.

" + } + }, + "com.amazonaws.cloudwatchlogs#OpenSearchWorkspaceId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256 + }, + "smithy.api#pattern": "^[\\.\\-_/#A-Za-z0-9]+$" + } + }, + "com.amazonaws.cloudwatchlogs#OperationAbortedException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.cloudwatchlogs#Message" + } + }, + "traits": { + "smithy.api#documentation": "

Multiple concurrent requests to update the same resource were in conflict.

", + "smithy.api#error": "client" + } }, "com.amazonaws.cloudwatchlogs#OrderBy": { "type": "enum", @@ -9254,6 +9976,81 @@ "smithy.api#output": {} } }, + "com.amazonaws.cloudwatchlogs#PutIntegration": { + "type": "operation", + "input": { + "target": "com.amazonaws.cloudwatchlogs#PutIntegrationRequest" + }, + "output": { + "target": "com.amazonaws.cloudwatchlogs#PutIntegrationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.cloudwatchlogs#InvalidParameterException" + }, + { + "target": "com.amazonaws.cloudwatchlogs#LimitExceededException" + }, + { + "target": "com.amazonaws.cloudwatchlogs#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.cloudwatchlogs#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Creates an integration between CloudWatch Logs and another service in this account. Currently, only integrations with \n OpenSearch Service are supported, and currently you can have only one integration in your account.

\n

Integrating with OpenSearch Service makes it possible for you to create curated vended logs dashboards, powered \n by OpenSearch Service analytics. For more information, see \n Vended log dashboards powered by Amazon OpenSearch Service.

\n

You can use this operation only to create a new integration. You can't modify an existing integration.

" + } + }, + "com.amazonaws.cloudwatchlogs#PutIntegrationRequest": { + "type": "structure", + "members": { + "integrationName": { + "target": "com.amazonaws.cloudwatchlogs#IntegrationName", + "traits": { + "smithy.api#documentation": "

A name for the integration.

", + "smithy.api#required": {} + } + }, + "resourceConfig": { + "target": "com.amazonaws.cloudwatchlogs#ResourceConfig", + "traits": { + "smithy.api#documentation": "

A structure that contains configuration information for the integration that you are creating.

", + "smithy.api#required": {} + } + }, + "integrationType": { + "target": "com.amazonaws.cloudwatchlogs#IntegrationType", + "traits": { + "smithy.api#documentation": "

The type of integration. Currently, the only supported type is OPENSEARCH.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.cloudwatchlogs#PutIntegrationResponse": { + "type": "structure", + "members": { + "integrationName": { + "target": "com.amazonaws.cloudwatchlogs#IntegrationName", + "traits": { + "smithy.api#documentation": "

The name of the integration that you just created.

" + } + }, + "integrationStatus": { + "target": "com.amazonaws.cloudwatchlogs#IntegrationStatus", + "traits": { + "smithy.api#documentation": "

The status of the integration that you just created.

\n

After you create an integration, it takes a few minutes to complete. During this time, you'll see the status as PROVISIONING.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.cloudwatchlogs#PutLogEvents": { "type": "operation", "input": { @@ -9457,6 +10254,12 @@ "com.amazonaws.cloudwatchlogs#PutQueryDefinitionRequest": { "type": "structure", "members": { + "queryLanguage": { + "target": "com.amazonaws.cloudwatchlogs#QueryLanguage", + "traits": { + "smithy.api#documentation": "

Specify the query language to use for this query. The options are Logs Insights QL, OpenSearch PPL, and OpenSearch SQL. For more information about the query languages that CloudWatch Logs supports, \n see Supported query languages.

" + } + }, "name": { "target": "com.amazonaws.cloudwatchlogs#QueryDefinitionName", "traits": { @@ -9473,7 +10276,7 @@ "logGroupNames": { "target": "com.amazonaws.cloudwatchlogs#LogGroupNames", "traits": { - "smithy.api#documentation": "

Use this parameter to include specific log groups as part of your query definition.

\n

If you are updating a query definition and you omit this parameter, then the updated\n definition will contain no log groups.

" + "smithy.api#documentation": "

Use this parameter to include specific log groups as part of your query definition. If your query\n uses the OpenSearch Service query language, you specify the log group names inside the querystring instead of here.

\n

If you are updating an existing query definition for the Logs Insights QL or OpenSearch Service PPL and you omit this parameter, then the updated\n definition will contain no log groups.

" } }, "queryString": { @@ -9800,6 +10603,12 @@ "com.amazonaws.cloudwatchlogs#QueryDefinition": { "type": "structure", "members": { + "queryLanguage": { + "target": "com.amazonaws.cloudwatchlogs#QueryLanguage", + "traits": { + "smithy.api#documentation": "

The query language used for this query. For more information about the query languages that CloudWatch Logs supports, \n see Supported query languages.

" + } + }, "queryDefinitionId": { "target": "com.amazonaws.cloudwatchlogs#QueryId", "traits": { @@ -9871,6 +10680,12 @@ "com.amazonaws.cloudwatchlogs#QueryInfo": { "type": "structure", "members": { + "queryLanguage": { + "target": "com.amazonaws.cloudwatchlogs#QueryLanguage", + "traits": { + "smithy.api#documentation": "

The query language used for this query. For more information about the query languages that CloudWatch Logs supports, \n see Supported query languages.

" + } + }, "queryId": { "target": "com.amazonaws.cloudwatchlogs#QueryId", "traits": { @@ -9912,6 +10727,29 @@ "target": "com.amazonaws.cloudwatchlogs#QueryInfo" } }, + "com.amazonaws.cloudwatchlogs#QueryLanguage": { + "type": "enum", + "members": { + "CWLI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CWLI" + } + }, + "SQL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SQL" + } + }, + "PPL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PPL" + } + } + } + }, "com.amazonaws.cloudwatchlogs#QueryListMaxResults": { "type": "integer", "traits": { @@ -10207,6 +11045,20 @@ "target": "com.amazonaws.cloudwatchlogs#Arn" } }, + "com.amazonaws.cloudwatchlogs#ResourceConfig": { + "type": "union", + "members": { + "openSearchResourceConfig": { + "target": "com.amazonaws.cloudwatchlogs#OpenSearchResourceConfig", + "traits": { + "smithy.api#documentation": "

This structure contains configuration details about an integration between CloudWatch Logs and OpenSearch Service.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

This structure contains configuration details about an integration between CloudWatch Logs and another entity.

" + } + }, "com.amazonaws.cloudwatchlogs#ResourceIdentifier": { "type": "string", "traits": { @@ -10844,22 +11696,28 @@ "com.amazonaws.cloudwatchlogs#StartQueryRequest": { "type": "structure", "members": { + "queryLanguage": { + "target": "com.amazonaws.cloudwatchlogs#QueryLanguage", + "traits": { + "smithy.api#documentation": "

Specify the query language to use for this query. The options are Logs Insights QL, OpenSearch PPL, and OpenSearch SQL. For more information about the query languages that CloudWatch Logs supports, \n see Supported query languages.

" + } + }, "logGroupName": { "target": "com.amazonaws.cloudwatchlogs#LogGroupName", "traits": { - "smithy.api#documentation": "

The log group on which to perform the query.

" + "smithy.api#documentation": "

The log group on which to perform the query.

\n \n

A StartQuery operation must include exactly one of the following\n parameters: logGroupName, logGroupNames, or\n logGroupIdentifiers. The exception is queries using the OpenSearch Service SQL query\n language, where you specify the log group names inside the querystring instead of here.

\n
" } }, "logGroupNames": { "target": "com.amazonaws.cloudwatchlogs#LogGroupNames", "traits": { - "smithy.api#documentation": "

The list of log groups to be queried. You can include up to 50 log groups.

" + "smithy.api#documentation": "

The list of log groups to be queried. You can include up to 50 log groups.

\n \n

A StartQuery operation must include exactly one of the following\n parameters: logGroupName, logGroupNames, or\n logGroupIdentifiers. The exception is queries using the OpenSearch Service SQL query\n language, where you specify the log group names inside the querystring instead of here.

\n
" } }, "logGroupIdentifiers": { "target": "com.amazonaws.cloudwatchlogs#LogGroupIdentifiers", "traits": { - "smithy.api#documentation": "

The list of log groups to query. You can include up to 50 log groups.

\n

You can specify them by the log group name or ARN. If a log group that you're querying is\n in a source account and you're using a monitoring account, you must specify the ARN of the log\n group here. The query definition must also be defined in the monitoring account.

\n

If you specify an ARN, use the format\n arn:aws:logs:region:account-id:log-group:log_group_name Don't include an * at the end.

\n

A StartQuery operation must include exactly one of the following parameters:\n logGroupName, logGroupNames, or logGroupIdentifiers.

" + "smithy.api#documentation": "

The list of log groups to query. You can include up to 50 log groups.

\n

You can specify them by the log group name or ARN. If a log group that you're querying is\n in a source account and you're using a monitoring account, you must specify the ARN of the log\n group here. The query definition must also be defined in the monitoring account.

\n

If you specify an ARN, use the format\n arn:aws:logs:region:account-id:log-group:log_group_name Don't include an * at the end.

\n

A StartQuery operation must include exactly one of the following parameters:\n logGroupName, logGroupNames, or logGroupIdentifiers. The exception is queries using the OpenSearch Service SQL query\n language, where you specify the log group names inside the querystring instead of here.

" } }, "startTime": {