From b4200b092059f0ab337b492087de742ff3a316d0 Mon Sep 17 00:00:00 2001 From: awstools Date: Fri, 16 Aug 2024 18:14:22 +0000 Subject: [PATCH] feat(client-quicksight): Amazon QuickSight launches Customer Managed Key (CMK) encryption for Data Source metadata --- .../src/commands/CreateDataSourceCommand.ts | 3 + .../src/commands/CreateFolderCommand.ts | 3 +- .../src/commands/UpdateDataSourceCommand.ts | 3 + .../client-quicksight/src/models/models_2.ts | 84 ++++++------------ .../client-quicksight/src/models/models_3.ts | 87 ++++++++++++------- .../client-quicksight/src/models/models_4.ts | 32 ++++++- .../src/protocols/Aws_restJson1.ts | 25 ++++++ .../sdk-codegen/aws-models/quicksight.json | 25 ++++++ 8 files changed, 172 insertions(+), 90 deletions(-) diff --git a/clients/client-quicksight/src/commands/CreateDataSourceCommand.ts b/clients/client-quicksight/src/commands/CreateDataSourceCommand.ts index b915b96f638e..af142db25df8 100644 --- a/clients/client-quicksight/src/commands/CreateDataSourceCommand.ts +++ b/clients/client-quicksight/src/commands/CreateDataSourceCommand.ts @@ -367,6 +367,9 @@ export interface CreateDataSourceCommandOutput extends CreateDataSourceResponse, * @throws {@link ConflictException} (client fault) *

Updating or deleting a resource can cause an inconsistent state.

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

The customer managed key that is registered to your Amazon QuickSight account is unavailable.

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

An internal failure occurred.

* diff --git a/clients/client-quicksight/src/commands/CreateFolderCommand.ts b/clients/client-quicksight/src/commands/CreateFolderCommand.ts index 16694f15f5ba..acc339f0625f 100644 --- a/clients/client-quicksight/src/commands/CreateFolderCommand.ts +++ b/clients/client-quicksight/src/commands/CreateFolderCommand.ts @@ -5,8 +5,7 @@ import { Command as $Command } from "@smithy/smithy-client"; import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { commonParams } from "../endpoint/EndpointParameters"; -import { CreateFolderRequest } from "../models/models_2"; -import { CreateFolderResponse } from "../models/models_3"; +import { CreateFolderRequest, CreateFolderResponse } from "../models/models_3"; import { de_CreateFolderCommand, se_CreateFolderCommand } from "../protocols/Aws_restJson1"; import { QuickSightClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QuickSightClient"; diff --git a/clients/client-quicksight/src/commands/UpdateDataSourceCommand.ts b/clients/client-quicksight/src/commands/UpdateDataSourceCommand.ts index fff105707e35..fcfd71f94270 100644 --- a/clients/client-quicksight/src/commands/UpdateDataSourceCommand.ts +++ b/clients/client-quicksight/src/commands/UpdateDataSourceCommand.ts @@ -349,6 +349,9 @@ export interface UpdateDataSourceCommandOutput extends UpdateDataSourceResponse, * @throws {@link ConflictException} (client fault) *

Updating or deleting a resource can cause an inconsistent state.

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

The customer managed key that is registered to your Amazon QuickSight account is unavailable.

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

An internal failure occurred.

* diff --git a/clients/client-quicksight/src/models/models_2.ts b/clients/client-quicksight/src/models/models_2.ts index 870b7dec05b8..1271727d7db0 100644 --- a/clients/client-quicksight/src/models/models_2.ts +++ b/clients/client-quicksight/src/models/models_2.ts @@ -8735,6 +8735,34 @@ export interface CreateDataSourceResponse { Status?: number; } +/** + *

The customer managed key that is registered to your Amazon QuickSight account is unavailable.

+ * @public + */ +export class CustomerManagedKeyUnavailableException extends __BaseException { + readonly name: "CustomerManagedKeyUnavailableException" = "CustomerManagedKeyUnavailableException"; + readonly $fault: "client" = "client"; + Message?: string; + /** + *

The Amazon Web Services request ID for this operation.

+ * @public + */ + RequestId?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "CustomerManagedKeyUnavailableException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, CustomerManagedKeyUnavailableException.prototype); + this.Message = opts.Message; + this.RequestId = opts.RequestId; + } +} + /** * @public * @enum @@ -8763,62 +8791,6 @@ export const SharingModel = { */ export type SharingModel = (typeof SharingModel)[keyof typeof SharingModel]; -/** - * @public - */ -export interface CreateFolderRequest { - /** - *

The ID for the Amazon Web Services account where you want to create the folder.

- * @public - */ - AwsAccountId: string | undefined; - - /** - *

The ID of the folder.

- * @public - */ - FolderId: string | undefined; - - /** - *

The name of the folder.

- * @public - */ - Name?: string; - - /** - *

The type of folder. By default, folderType is SHARED.

- * @public - */ - FolderType?: FolderType; - - /** - *

The Amazon Resource Name (ARN) for the parent folder.

- *

- * ParentFolderArn can be null. An empty parentFolderArn creates a root-level folder.

- * @public - */ - ParentFolderArn?: string; - - /** - *

A structure that describes the principals and the resource-level permissions of a folder.

- *

To specify no permissions, omit Permissions.

- * @public - */ - Permissions?: ResourcePermission[]; - - /** - *

Tags for the folder.

- * @public - */ - Tags?: Tag[]; - - /** - *

An optional parameter that determines the sharing scope of the folder. The default value for this parameter is ACCOUNT.

- * @public - */ - SharingModel?: SharingModel; -} - /** * @internal */ diff --git a/clients/client-quicksight/src/models/models_3.ts b/clients/client-quicksight/src/models/models_3.ts index 212d012a8cb9..abef9d7ad338 100644 --- a/clients/client-quicksight/src/models/models_3.ts +++ b/clients/client-quicksight/src/models/models_3.ts @@ -94,6 +94,62 @@ import { import { QuickSightServiceException as __BaseException } from "./QuickSightServiceException"; +/** + * @public + */ +export interface CreateFolderRequest { + /** + *

The ID for the Amazon Web Services account where you want to create the folder.

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

The ID of the folder.

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

The name of the folder.

+ * @public + */ + Name?: string; + + /** + *

The type of folder. By default, folderType is SHARED.

+ * @public + */ + FolderType?: FolderType; + + /** + *

The Amazon Resource Name (ARN) for the parent folder.

+ *

+ * ParentFolderArn can be null. An empty parentFolderArn creates a root-level folder.

+ * @public + */ + ParentFolderArn?: string; + + /** + *

A structure that describes the principals and the resource-level permissions of a folder.

+ *

To specify no permissions, omit Permissions.

+ * @public + */ + Permissions?: ResourcePermission[]; + + /** + *

Tags for the folder.

+ * @public + */ + Tags?: Tag[]; + + /** + *

An optional parameter that determines the sharing scope of the folder. The default value for this parameter is ACCOUNT.

+ * @public + */ + SharingModel?: SharingModel; +} + /** * @public */ @@ -9241,37 +9297,6 @@ export const EmbeddingIdentityType = { */ export type EmbeddingIdentityType = (typeof EmbeddingIdentityType)[keyof typeof EmbeddingIdentityType]; -/** - *

An entry that appears when a KeyRegistration update to Amazon QuickSight fails.

- * @public - */ -export interface FailedKeyRegistrationEntry { - /** - *

The ARN of the KMS key that failed to update.

- * @public - */ - KeyArn?: string; - - /** - *

A message that provides information about why a FailedKeyRegistrationEntry error occurred.

- * @public - */ - Message: string | undefined; - - /** - *

The HTTP status of a FailedKeyRegistrationEntry error.

- * @public - */ - StatusCode: number | undefined; - - /** - *

A boolean that indicates whether a FailedKeyRegistrationEntry resulted from user error. If the value of this property is True, the error was caused by user error. If the value of this property is False, the error occurred on the backend. If your job continues fail and with a False - * SenderFault value, contact Amazon Web Services Support.

- * @public - */ - SenderFault: boolean | undefined; -} - /** * @internal */ diff --git a/clients/client-quicksight/src/models/models_4.ts b/clients/client-quicksight/src/models/models_4.ts index 865887b5d553..9b9972645b07 100644 --- a/clients/client-quicksight/src/models/models_4.ts +++ b/clients/client-quicksight/src/models/models_4.ts @@ -71,7 +71,6 @@ import { DataSourceSearchFilter, DataSourceSummary, EmbeddingIdentityType, - FailedKeyRegistrationEntry, Group, GroupMember, IdentityType, @@ -99,6 +98,37 @@ import { import { QuickSightServiceException as __BaseException } from "./QuickSightServiceException"; +/** + *

An entry that appears when a KeyRegistration update to Amazon QuickSight fails.

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

The ARN of the KMS key that failed to update.

+ * @public + */ + KeyArn?: string; + + /** + *

A message that provides information about why a FailedKeyRegistrationEntry error occurred.

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

The HTTP status of a FailedKeyRegistrationEntry error.

+ * @public + */ + StatusCode: number | undefined; + + /** + *

A boolean that indicates whether a FailedKeyRegistrationEntry resulted from user error. If the value of this property is True, the error was caused by user error. If the value of this property is False, the error occurred on the backend. If your job continues fail and with a False + * SenderFault value, contact Amazon Web Services Support.

+ * @public + */ + SenderFault: boolean | undefined; +} + /** * @public * @enum diff --git a/clients/client-quicksight/src/protocols/Aws_restJson1.ts b/clients/client-quicksight/src/protocols/Aws_restJson1.ts index 8a2ab6dcf9e5..4326657c1f46 100644 --- a/clients/client-quicksight/src/protocols/Aws_restJson1.ts +++ b/clients/client-quicksight/src/protocols/Aws_restJson1.ts @@ -1081,6 +1081,7 @@ import { ContributionAnalysisTimeRanges, CreateColumnsOperation, CredentialPair, + CustomerManagedKeyUnavailableException, CustomSql, DashboardPublishOptions, DashboardSourceEntity, @@ -9862,6 +9863,9 @@ const de_CommandError = async (output: __HttpResponse, context: __SerdeContext): case "UnsupportedUserEditionException": case "com.amazonaws.quicksight#UnsupportedUserEditionException": throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); + case "CustomerManagedKeyUnavailableException": + case "com.amazonaws.quicksight#CustomerManagedKeyUnavailableException": + throw await de_CustomerManagedKeyUnavailableExceptionRes(parsedOutput, context); case "ConcurrentUpdatingException": case "com.amazonaws.quicksight#ConcurrentUpdatingException": throw await de_ConcurrentUpdatingExceptionRes(parsedOutput, context); @@ -9957,6 +9961,27 @@ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContex return __decorateServiceException(exception, parsedOutput.body); }; +/** + * deserializeAws_restJson1CustomerManagedKeyUnavailableExceptionRes + */ +const de_CustomerManagedKeyUnavailableExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: any = map({}); + const data: any = parsedOutput.body; + const doc = take(data, { + Message: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); + const exception = new CustomerManagedKeyUnavailableException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + /** * deserializeAws_restJson1DomainNotWhitelistedExceptionRes */ diff --git a/codegen/sdk-codegen/aws-models/quicksight.json b/codegen/sdk-codegen/aws-models/quicksight.json index ca4b5bc3cbe3..ddc8a4cc8cc2 100644 --- a/codegen/sdk-codegen/aws-models/quicksight.json +++ b/codegen/sdk-codegen/aws-models/quicksight.json @@ -8237,6 +8237,9 @@ { "target": "com.amazonaws.quicksight#ConflictException" }, + { + "target": "com.amazonaws.quicksight#CustomerManagedKeyUnavailableException" + }, { "target": "com.amazonaws.quicksight#InternalFailureException" }, @@ -10995,6 +10998,25 @@ "smithy.api#documentation": "

The configuration of custom values for the destination parameter in DestinationParameterValueConfiguration.

" } }, + "com.amazonaws.quicksight#CustomerManagedKeyUnavailableException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.quicksight#String" + }, + "RequestId": { + "target": "com.amazonaws.quicksight#String", + "traits": { + "smithy.api#documentation": "

The Amazon Web Services request ID for this operation.

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

The customer managed key that is registered to your Amazon QuickSight account is unavailable.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, "com.amazonaws.quicksight#Dashboard": { "type": "structure", "members": { @@ -52022,6 +52044,9 @@ { "target": "com.amazonaws.quicksight#ConflictException" }, + { + "target": "com.amazonaws.quicksight#CustomerManagedKeyUnavailableException" + }, { "target": "com.amazonaws.quicksight#InternalFailureException" },