From 9a1b1c82ac95eec14f9ec372d94a683e8168bbed Mon Sep 17 00:00:00 2001 From: awstools Date: Thu, 21 Dec 2023 19:17:55 +0000 Subject: [PATCH] feat(client-amp): This release updates Amazon Managed Service for Prometheus APIs to support customer managed KMS keys. --- .../src/commands/CreateWorkspaceCommand.ts | 2 + .../src/commands/DescribeWorkspaceCommand.ts | 1 + .../src/commands/ListWorkspacesCommand.ts | 1 + clients/client-amp/src/models/models_0.ts | 24 ++++++++++++ .../client-amp/src/protocols/Aws_restJson1.ts | 4 ++ codegen/sdk-codegen/aws-models/amp.json | 38 +++++++++++++++++++ 6 files changed, 70 insertions(+) diff --git a/clients/client-amp/src/commands/CreateWorkspaceCommand.ts b/clients/client-amp/src/commands/CreateWorkspaceCommand.ts index 63a47dcf7d2a..9a678a79fdbe 100644 --- a/clients/client-amp/src/commands/CreateWorkspaceCommand.ts +++ b/clients/client-amp/src/commands/CreateWorkspaceCommand.ts @@ -50,6 +50,7 @@ export interface CreateWorkspaceCommandOutput extends CreateWorkspaceResponse, _ * tags: { // TagMap * "": "STRING_VALUE", * }, + * kmsKeyArn: "STRING_VALUE", * }; * const command = new CreateWorkspaceCommand(input); * const response = await client.send(command); @@ -62,6 +63,7 @@ export interface CreateWorkspaceCommandOutput extends CreateWorkspaceResponse, _ * // tags: { // TagMap * // "": "STRING_VALUE", * // }, + * // kmsKeyArn: "STRING_VALUE", * // }; * * ``` diff --git a/clients/client-amp/src/commands/DescribeWorkspaceCommand.ts b/clients/client-amp/src/commands/DescribeWorkspaceCommand.ts index d21ceb84a52e..66214b2256a6 100644 --- a/clients/client-amp/src/commands/DescribeWorkspaceCommand.ts +++ b/clients/client-amp/src/commands/DescribeWorkspaceCommand.ts @@ -62,6 +62,7 @@ export interface DescribeWorkspaceCommandOutput extends DescribeWorkspaceRespons * // tags: { // TagMap * // "": "STRING_VALUE", * // }, + * // kmsKeyArn: "STRING_VALUE", * // }, * // }; * diff --git a/clients/client-amp/src/commands/ListWorkspacesCommand.ts b/clients/client-amp/src/commands/ListWorkspacesCommand.ts index 5dff55e0277e..8ce5a724cf39 100644 --- a/clients/client-amp/src/commands/ListWorkspacesCommand.ts +++ b/clients/client-amp/src/commands/ListWorkspacesCommand.ts @@ -64,6 +64,7 @@ export interface ListWorkspacesCommandOutput extends ListWorkspacesResponse, __M * // tags: { // TagMap * // "": "STRING_VALUE", * // }, + * // kmsKeyArn: "STRING_VALUE", * // }, * // ], * // nextToken: "STRING_VALUE", diff --git a/clients/client-amp/src/models/models_0.ts b/clients/client-amp/src/models/models_0.ts index 72b6e16608b9..eb778336897e 100644 --- a/clients/client-amp/src/models/models_0.ts +++ b/clients/client-amp/src/models/models_0.ts @@ -1100,6 +1100,12 @@ export interface CreateWorkspaceRequest { * Optional, user-provided tags for this workspace. */ tags?: Record; + + /** + * @public + * Optional, customer managed KMS key used to encrypt data for this workspace + */ + kmsKeyArn?: string; } /** @@ -1174,6 +1180,12 @@ export interface CreateWorkspaceResponse { * The tags of this workspace. */ tags?: Record; + + /** + * @public + * Customer managed KMS key ARN for this workspace + */ + kmsKeyArn?: string; } /** @@ -1252,6 +1264,12 @@ export interface WorkspaceDescription { * The tags of this workspace. */ tags?: Record; + + /** + * @public + * The customer managed KMS key of this workspace. + */ + kmsKeyArn?: string; } /** @@ -1330,6 +1348,12 @@ export interface WorkspaceSummary { * The tags of this workspace. */ tags?: Record; + + /** + * @public + * Customer managed KMS key ARN for this workspace + */ + kmsKeyArn?: string; } /** diff --git a/clients/client-amp/src/protocols/Aws_restJson1.ts b/clients/client-amp/src/protocols/Aws_restJson1.ts index 0dd9c2165569..717f608ad542 100644 --- a/clients/client-amp/src/protocols/Aws_restJson1.ts +++ b/clients/client-amp/src/protocols/Aws_restJson1.ts @@ -242,6 +242,7 @@ export const se_CreateWorkspaceCommand = async ( take(input, { alias: [], clientToken: [true, (_) => _ ?? generateIdempotencyToken()], + kmsKeyArn: [], tags: (_) => _json(_), }) ); @@ -936,6 +937,7 @@ export const de_CreateWorkspaceCommand = async ( const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); const doc = take(data, { arn: __expectString, + kmsKeyArn: __expectString, status: _json, tags: _json, workspaceId: __expectString, @@ -2556,6 +2558,7 @@ const de_WorkspaceDescription = (output: any, context: __SerdeContext): Workspac alias: __expectString, arn: __expectString, createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + kmsKeyArn: __expectString, prometheusEndpoint: __expectString, status: _json, tags: _json, @@ -2573,6 +2576,7 @@ const de_WorkspaceSummary = (output: any, context: __SerdeContext): WorkspaceSum alias: __expectString, arn: __expectString, createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + kmsKeyArn: __expectString, status: _json, tags: _json, workspaceId: __expectString, diff --git a/codegen/sdk-codegen/aws-models/amp.json b/codegen/sdk-codegen/aws-models/amp.json index 01730a4d4cc0..9aaa83e9701e 100644 --- a/codegen/sdk-codegen/aws-models/amp.json +++ b/codegen/sdk-codegen/aws-models/amp.json @@ -1512,6 +1512,12 @@ "traits": { "smithy.api#documentation": "Optional, user-provided tags for this workspace." } + }, + "kmsKeyArn": { + "target": "com.amazonaws.amp#KmsKeyArn", + "traits": { + "smithy.api#documentation": "Optional, customer managed KMS key used to encrypt data for this workspace" + } } }, "traits": { @@ -1547,6 +1553,12 @@ "traits": { "smithy.api#documentation": "The tags of this workspace." } + }, + "kmsKeyArn": { + "target": "com.amazonaws.amp#KmsKeyArn", + "traits": { + "smithy.api#documentation": "Customer managed KMS key ARN for this workspace" + } } }, "traits": { @@ -2571,6 +2583,20 @@ "smithy.api#retryable": {} } }, + "com.amazonaws.amp#KmsKeyArn": { + "type": "string", + "traits": { + "aws.api#arnReference": { + "type": "AWS::KMS::Key" + }, + "smithy.api#documentation": "A KMS Key ARN.", + "smithy.api#length": { + "min": 20, + "max": 2048 + }, + "smithy.api#pattern": "^arn:aws:kms:[a-z0-9\\-]+:\\d+:key/[a-f0-9\\-]+$" + } + }, "com.amazonaws.amp#ListRuleGroupsNamespaces": { "type": "operation", "input": { @@ -4633,6 +4659,12 @@ "traits": { "smithy.api#documentation": "The tags of this workspace." } + }, + "kmsKeyArn": { + "target": "com.amazonaws.amp#KmsKeyArn", + "traits": { + "smithy.api#documentation": "The customer managed KMS key of this workspace." + } } }, "traits": { @@ -4745,6 +4777,12 @@ "traits": { "smithy.api#documentation": "The tags of this workspace." } + }, + "kmsKeyArn": { + "target": "com.amazonaws.amp#KmsKeyArn", + "traits": { + "smithy.api#documentation": "Customer managed KMS key ARN for this workspace" + } } }, "traits": {