Skip to content

Commit

Permalink
feat(client-quicksight): Amazon QuickSight launches Customer Managed …
Browse files Browse the repository at this point in the history
…Key (CMK) encryption for Data Source metadata
  • Loading branch information
awstools committed Aug 16, 2024
1 parent cbc6a87 commit b4200b0
Show file tree
Hide file tree
Showing 8 changed files with 172 additions and 90 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,9 @@ export interface CreateDataSourceCommandOutput extends CreateDataSourceResponse,
* @throws {@link ConflictException} (client fault)
* <p>Updating or deleting a resource can cause an inconsistent state.</p>
*
* @throws {@link CustomerManagedKeyUnavailableException} (client fault)
* <p>The customer managed key that is registered to your Amazon QuickSight account is unavailable.</p>
*
* @throws {@link InternalFailureException} (server fault)
* <p>An internal failure occurred.</p>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,9 @@ export interface UpdateDataSourceCommandOutput extends UpdateDataSourceResponse,
* @throws {@link ConflictException} (client fault)
* <p>Updating or deleting a resource can cause an inconsistent state.</p>
*
* @throws {@link CustomerManagedKeyUnavailableException} (client fault)
* <p>The customer managed key that is registered to your Amazon QuickSight account is unavailable.</p>
*
* @throws {@link InternalFailureException} (server fault)
* <p>An internal failure occurred.</p>
*
Expand Down
84 changes: 28 additions & 56 deletions clients/client-quicksight/src/models/models_2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8735,6 +8735,34 @@ export interface CreateDataSourceResponse {
Status?: number;
}

/**
* <p>The customer managed key that is registered to your Amazon QuickSight account is unavailable.</p>
* @public
*/
export class CustomerManagedKeyUnavailableException extends __BaseException {
readonly name: "CustomerManagedKeyUnavailableException" = "CustomerManagedKeyUnavailableException";
readonly $fault: "client" = "client";
Message?: string;
/**
* <p>The Amazon Web Services request ID for this operation.</p>
* @public
*/
RequestId?: string;
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<CustomerManagedKeyUnavailableException, __BaseException>) {
super({
name: "CustomerManagedKeyUnavailableException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, CustomerManagedKeyUnavailableException.prototype);
this.Message = opts.Message;
this.RequestId = opts.RequestId;
}
}

/**
* @public
* @enum
Expand Down Expand Up @@ -8763,62 +8791,6 @@ export const SharingModel = {
*/
export type SharingModel = (typeof SharingModel)[keyof typeof SharingModel];

/**
* @public
*/
export interface CreateFolderRequest {
/**
* <p>The ID for the Amazon Web Services account where you want to create the folder.</p>
* @public
*/
AwsAccountId: string | undefined;

/**
* <p>The ID of the folder.</p>
* @public
*/
FolderId: string | undefined;

/**
* <p>The name of the folder.</p>
* @public
*/
Name?: string;

/**
* <p>The type of folder. By default, <code>folderType</code> is <code>SHARED</code>.</p>
* @public
*/
FolderType?: FolderType;

/**
* <p>The Amazon Resource Name (ARN) for the parent folder.</p>
* <p>
* <code>ParentFolderArn</code> can be null. An empty <code>parentFolderArn</code> creates a root-level folder.</p>
* @public
*/
ParentFolderArn?: string;

/**
* <p>A structure that describes the principals and the resource-level permissions of a folder.</p>
* <p>To specify no permissions, omit <code>Permissions</code>.</p>
* @public
*/
Permissions?: ResourcePermission[];

/**
* <p>Tags for the folder.</p>
* @public
*/
Tags?: Tag[];

/**
* <p>An optional parameter that determines the sharing scope of the folder. The default value for this parameter is <code>ACCOUNT</code>.</p>
* @public
*/
SharingModel?: SharingModel;
}

/**
* @internal
*/
Expand Down
87 changes: 56 additions & 31 deletions clients/client-quicksight/src/models/models_3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,62 @@ import {

import { QuickSightServiceException as __BaseException } from "./QuickSightServiceException";

/**
* @public
*/
export interface CreateFolderRequest {
/**
* <p>The ID for the Amazon Web Services account where you want to create the folder.</p>
* @public
*/
AwsAccountId: string | undefined;

/**
* <p>The ID of the folder.</p>
* @public
*/
FolderId: string | undefined;

/**
* <p>The name of the folder.</p>
* @public
*/
Name?: string;

/**
* <p>The type of folder. By default, <code>folderType</code> is <code>SHARED</code>.</p>
* @public
*/
FolderType?: FolderType;

/**
* <p>The Amazon Resource Name (ARN) for the parent folder.</p>
* <p>
* <code>ParentFolderArn</code> can be null. An empty <code>parentFolderArn</code> creates a root-level folder.</p>
* @public
*/
ParentFolderArn?: string;

/**
* <p>A structure that describes the principals and the resource-level permissions of a folder.</p>
* <p>To specify no permissions, omit <code>Permissions</code>.</p>
* @public
*/
Permissions?: ResourcePermission[];

/**
* <p>Tags for the folder.</p>
* @public
*/
Tags?: Tag[];

/**
* <p>An optional parameter that determines the sharing scope of the folder. The default value for this parameter is <code>ACCOUNT</code>.</p>
* @public
*/
SharingModel?: SharingModel;
}

/**
* @public
*/
Expand Down Expand Up @@ -9241,37 +9297,6 @@ export const EmbeddingIdentityType = {
*/
export type EmbeddingIdentityType = (typeof EmbeddingIdentityType)[keyof typeof EmbeddingIdentityType];

/**
* <p>An entry that appears when a <code>KeyRegistration</code> update to Amazon QuickSight fails.</p>
* @public
*/
export interface FailedKeyRegistrationEntry {
/**
* <p>The ARN of the KMS key that failed to update.</p>
* @public
*/
KeyArn?: string;

/**
* <p>A message that provides information about why a <code>FailedKeyRegistrationEntry</code> error occurred.</p>
* @public
*/
Message: string | undefined;

/**
* <p>The HTTP status of a <code>FailedKeyRegistrationEntry</code> error.</p>
* @public
*/
StatusCode: number | undefined;

/**
* <p>A boolean that indicates whether a <code>FailedKeyRegistrationEntry</code> resulted from user error. If the value of this property is <code>True</code>, the error was caused by user error. If the value of this property is <code>False</code>, the error occurred on the backend. If your job continues fail and with a <code>False</code>
* <code>SenderFault</code> value, contact Amazon Web Services Support.</p>
* @public
*/
SenderFault: boolean | undefined;
}

/**
* @internal
*/
Expand Down
32 changes: 31 additions & 1 deletion clients/client-quicksight/src/models/models_4.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ import {
DataSourceSearchFilter,
DataSourceSummary,
EmbeddingIdentityType,
FailedKeyRegistrationEntry,
Group,
GroupMember,
IdentityType,
Expand Down Expand Up @@ -99,6 +98,37 @@ import {

import { QuickSightServiceException as __BaseException } from "./QuickSightServiceException";

/**
* <p>An entry that appears when a <code>KeyRegistration</code> update to Amazon QuickSight fails.</p>
* @public
*/
export interface FailedKeyRegistrationEntry {
/**
* <p>The ARN of the KMS key that failed to update.</p>
* @public
*/
KeyArn?: string;

/**
* <p>A message that provides information about why a <code>FailedKeyRegistrationEntry</code> error occurred.</p>
* @public
*/
Message: string | undefined;

/**
* <p>The HTTP status of a <code>FailedKeyRegistrationEntry</code> error.</p>
* @public
*/
StatusCode: number | undefined;

/**
* <p>A boolean that indicates whether a <code>FailedKeyRegistrationEntry</code> resulted from user error. If the value of this property is <code>True</code>, the error was caused by user error. If the value of this property is <code>False</code>, the error occurred on the backend. If your job continues fail and with a <code>False</code>
* <code>SenderFault</code> value, contact Amazon Web Services Support.</p>
* @public
*/
SenderFault: boolean | undefined;
}

/**
* @public
* @enum
Expand Down
25 changes: 25 additions & 0 deletions clients/client-quicksight/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1081,6 +1081,7 @@ import {
ContributionAnalysisTimeRanges,
CreateColumnsOperation,
CredentialPair,
CustomerManagedKeyUnavailableException,
CustomSql,
DashboardPublishOptions,
DashboardSourceEntity,
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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<CustomerManagedKeyUnavailableException> => {
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
*/
Expand Down
25 changes: 25 additions & 0 deletions codegen/sdk-codegen/aws-models/quicksight.json
Original file line number Diff line number Diff line change
Expand Up @@ -8237,6 +8237,9 @@
{
"target": "com.amazonaws.quicksight#ConflictException"
},
{
"target": "com.amazonaws.quicksight#CustomerManagedKeyUnavailableException"
},
{
"target": "com.amazonaws.quicksight#InternalFailureException"
},
Expand Down Expand Up @@ -10995,6 +10998,25 @@
"smithy.api#documentation": "<p>The configuration of custom values for the destination parameter in <code>DestinationParameterValueConfiguration</code>.</p>"
}
},
"com.amazonaws.quicksight#CustomerManagedKeyUnavailableException": {
"type": "structure",
"members": {
"Message": {
"target": "com.amazonaws.quicksight#String"
},
"RequestId": {
"target": "com.amazonaws.quicksight#String",
"traits": {
"smithy.api#documentation": "<p>The Amazon Web Services request ID for this operation.</p>"
}
}
},
"traits": {
"smithy.api#documentation": "<p>The customer managed key that is registered to your Amazon QuickSight account is unavailable.</p>",
"smithy.api#error": "client",
"smithy.api#httpError": 400
}
},
"com.amazonaws.quicksight#Dashboard": {
"type": "structure",
"members": {
Expand Down Expand Up @@ -52022,6 +52044,9 @@
{
"target": "com.amazonaws.quicksight#ConflictException"
},
{
"target": "com.amazonaws.quicksight#CustomerManagedKeyUnavailableException"
},
{
"target": "com.amazonaws.quicksight#InternalFailureException"
},
Expand Down

0 comments on commit b4200b0

Please sign in to comment.