Skip to content

Commit

Permalink
feat(client-amp): This release updates Amazon Managed Service for Pro…
Browse files Browse the repository at this point in the history
…metheus APIs to support customer managed KMS keys.
  • Loading branch information
awstools committed Dec 21, 2023
1 parent d4176b5 commit 9a1b1c8
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 0 deletions.
2 changes: 2 additions & 0 deletions clients/client-amp/src/commands/CreateWorkspaceCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export interface CreateWorkspaceCommandOutput extends CreateWorkspaceResponse, _
* tags: { // TagMap
* "<keys>": "STRING_VALUE",
* },
* kmsKeyArn: "STRING_VALUE",
* };
* const command = new CreateWorkspaceCommand(input);
* const response = await client.send(command);
Expand All @@ -62,6 +63,7 @@ export interface CreateWorkspaceCommandOutput extends CreateWorkspaceResponse, _
* // tags: { // TagMap
* // "<keys>": "STRING_VALUE",
* // },
* // kmsKeyArn: "STRING_VALUE",
* // };
*
* ```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export interface DescribeWorkspaceCommandOutput extends DescribeWorkspaceRespons
* // tags: { // TagMap
* // "<keys>": "STRING_VALUE",
* // },
* // kmsKeyArn: "STRING_VALUE",
* // },
* // };
*
Expand Down
1 change: 1 addition & 0 deletions clients/client-amp/src/commands/ListWorkspacesCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export interface ListWorkspacesCommandOutput extends ListWorkspacesResponse, __M
* // tags: { // TagMap
* // "<keys>": "STRING_VALUE",
* // },
* // kmsKeyArn: "STRING_VALUE",
* // },
* // ],
* // nextToken: "STRING_VALUE",
Expand Down
24 changes: 24 additions & 0 deletions clients/client-amp/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1100,6 +1100,12 @@ export interface CreateWorkspaceRequest {
* Optional, user-provided tags for this workspace.
*/
tags?: Record<string, string>;

/**
* @public
* Optional, customer managed KMS key used to encrypt data for this workspace
*/
kmsKeyArn?: string;
}

/**
Expand Down Expand Up @@ -1174,6 +1180,12 @@ export interface CreateWorkspaceResponse {
* The tags of this workspace.
*/
tags?: Record<string, string>;

/**
* @public
* Customer managed KMS key ARN for this workspace
*/
kmsKeyArn?: string;
}

/**
Expand Down Expand Up @@ -1252,6 +1264,12 @@ export interface WorkspaceDescription {
* The tags of this workspace.
*/
tags?: Record<string, string>;

/**
* @public
* The customer managed KMS key of this workspace.
*/
kmsKeyArn?: string;
}

/**
Expand Down Expand Up @@ -1330,6 +1348,12 @@ export interface WorkspaceSummary {
* The tags of this workspace.
*/
tags?: Record<string, string>;

/**
* @public
* Customer managed KMS key ARN for this workspace
*/
kmsKeyArn?: string;
}

/**
Expand Down
4 changes: 4 additions & 0 deletions clients/client-amp/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ export const se_CreateWorkspaceCommand = async (
take(input, {
alias: [],
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
kmsKeyArn: [],
tags: (_) => _json(_),
})
);
Expand Down Expand Up @@ -936,6 +937,7 @@ export const de_CreateWorkspaceCommand = async (
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
const doc = take(data, {
arn: __expectString,
kmsKeyArn: __expectString,
status: _json,
tags: _json,
workspaceId: __expectString,
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down
38 changes: 38 additions & 0 deletions codegen/sdk-codegen/aws-models/amp.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down

0 comments on commit 9a1b1c8

Please sign in to comment.