Skip to content

Commit b6c4746

Browse files
author
awstools
committed
feat(client-sso-admin): Add support for encryption at rest with Customer Managed KMS Key in AWS IAM Identity Center
1 parent d5e4492 commit b6c4746

File tree

5 files changed

+209
-4
lines changed

5 files changed

+209
-4
lines changed

clients/client-sso-admin/src/commands/DescribeInstanceCommand.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,14 @@ export interface DescribeInstanceCommandOutput extends DescribeInstanceResponse,
4848
* // OwnerAccountId: "STRING_VALUE",
4949
* // Name: "STRING_VALUE",
5050
* // CreatedDate: new Date("TIMESTAMP"),
51-
* // Status: "CREATE_IN_PROGRESS" || "DELETE_IN_PROGRESS" || "ACTIVE",
51+
* // Status: "CREATE_IN_PROGRESS" || "CREATE_FAILED" || "DELETE_IN_PROGRESS" || "ACTIVE",
52+
* // StatusReason: "STRING_VALUE",
53+
* // EncryptionConfigurationDetails: { // EncryptionConfigurationDetails
54+
* // KeyType: "AWS_OWNED_KMS_KEY" || "CUSTOMER_MANAGED_KEY",
55+
* // KmsKeyArn: "STRING_VALUE",
56+
* // EncryptionStatus: "UPDATING" || "ENABLED" || "UPDATE_FAILED",
57+
* // EncryptionStatusReason: "STRING_VALUE",
58+
* // },
5259
* // };
5360
*
5461
* ```

clients/client-sso-admin/src/commands/ListInstancesCommand.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ export interface ListInstancesCommandOutput extends ListInstancesResponse, __Met
5151
* // OwnerAccountId: "STRING_VALUE",
5252
* // Name: "STRING_VALUE",
5353
* // CreatedDate: new Date("TIMESTAMP"),
54-
* // Status: "CREATE_IN_PROGRESS" || "DELETE_IN_PROGRESS" || "ACTIVE",
54+
* // Status: "CREATE_IN_PROGRESS" || "CREATE_FAILED" || "DELETE_IN_PROGRESS" || "ACTIVE",
55+
* // StatusReason: "STRING_VALUE",
5556
* // },
5657
* // ],
5758
* // NextToken: "STRING_VALUE",

clients/client-sso-admin/src/commands/UpdateInstanceCommand.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,12 @@ export interface UpdateInstanceCommandOutput extends UpdateInstanceResponse, __M
3838
* const config = {}; // type is SSOAdminClientConfig
3939
* const client = new SSOAdminClient(config);
4040
* const input = { // UpdateInstanceRequest
41-
* Name: "STRING_VALUE", // required
41+
* Name: "STRING_VALUE",
4242
* InstanceArn: "STRING_VALUE", // required
43+
* EncryptionConfiguration: { // EncryptionConfiguration
44+
* KeyType: "AWS_OWNED_KMS_KEY" || "CUSTOMER_MANAGED_KEY", // required
45+
* KmsKeyArn: "STRING_VALUE",
46+
* },
4347
* };
4448
* const command = new UpdateInstanceCommand(input);
4549
* const response = await client.send(command);
@@ -62,6 +66,9 @@ export interface UpdateInstanceCommandOutput extends UpdateInstanceResponse, __M
6266
* @throws {@link InternalServerException} (server fault)
6367
* <p>The request processing has failed because of an unknown error, exception, or failure with an internal server.</p>
6468
*
69+
* @throws {@link ResourceNotFoundException} (client fault)
70+
* <p>Indicates that a requested resource is not found.</p>
71+
*
6572
* @throws {@link ThrottlingException} (client fault)
6673
* <p>Indicates that the principal has crossed the throttling limits of the API operations.</p>
6774
*

clients/client-sso-admin/src/models/models_0.ts

Lines changed: 183 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,20 @@ export interface AccessControlAttribute {
3535
Value: AccessControlAttributeValue | undefined;
3636
}
3737

38+
/**
39+
* @public
40+
* @enum
41+
*/
42+
export const AccessDeniedExceptionReason = {
43+
KMS_ACCESS_DENIED_EXCEPTION: "KMS_AccessDeniedException",
44+
} as const;
45+
46+
/**
47+
* @public
48+
*/
49+
export type AccessDeniedExceptionReason =
50+
(typeof AccessDeniedExceptionReason)[keyof typeof AccessDeniedExceptionReason];
51+
3852
/**
3953
* <p>You do not have sufficient access to perform this action.</p>
4054
* @public
@@ -43,6 +57,11 @@ export class AccessDeniedException extends __BaseException {
4357
readonly name: "AccessDeniedException" = "AccessDeniedException";
4458
readonly $fault: "client" = "client";
4559
Message?: string | undefined;
60+
/**
61+
* <p>The reason for the access denied exception.</p>
62+
* @public
63+
*/
64+
Reason?: AccessDeniedExceptionReason | undefined;
4665
/**
4766
* @internal
4867
*/
@@ -54,6 +73,7 @@ export class AccessDeniedException extends __BaseException {
5473
});
5574
Object.setPrototypeOf(this, AccessDeniedException.prototype);
5675
this.Message = opts.Message;
76+
this.Reason = opts.Reason;
5777
}
5878
}
5979

@@ -442,6 +462,20 @@ export class InternalServerException extends __BaseException {
442462
}
443463
}
444464

465+
/**
466+
* @public
467+
* @enum
468+
*/
469+
export const ResourceNotFoundExceptionReason = {
470+
KMS_NOT_FOUND_EXCEPTION: "KMS_NotFoundException",
471+
} as const;
472+
473+
/**
474+
* @public
475+
*/
476+
export type ResourceNotFoundExceptionReason =
477+
(typeof ResourceNotFoundExceptionReason)[keyof typeof ResourceNotFoundExceptionReason];
478+
445479
/**
446480
* <p>Indicates that a requested resource is not found.</p>
447481
* @public
@@ -450,6 +484,11 @@ export class ResourceNotFoundException extends __BaseException {
450484
readonly name: "ResourceNotFoundException" = "ResourceNotFoundException";
451485
readonly $fault: "client" = "client";
452486
Message?: string | undefined;
487+
/**
488+
* <p>The reason for the resource not found exception.</p>
489+
* @public
490+
*/
491+
Reason?: ResourceNotFoundExceptionReason | undefined;
453492
/**
454493
* @internal
455494
*/
@@ -461,9 +500,23 @@ export class ResourceNotFoundException extends __BaseException {
461500
});
462501
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
463502
this.Message = opts.Message;
503+
this.Reason = opts.Reason;
464504
}
465505
}
466506

507+
/**
508+
* @public
509+
* @enum
510+
*/
511+
export const ThrottlingExceptionReason = {
512+
KMS_THROTTLING_EXCEPTION: "KMS_ThrottlingException",
513+
} as const;
514+
515+
/**
516+
* @public
517+
*/
518+
export type ThrottlingExceptionReason = (typeof ThrottlingExceptionReason)[keyof typeof ThrottlingExceptionReason];
519+
467520
/**
468521
* <p>Indicates that the principal has crossed the throttling limits of the API operations.</p>
469522
* @public
@@ -472,6 +525,11 @@ export class ThrottlingException extends __BaseException {
472525
readonly name: "ThrottlingException" = "ThrottlingException";
473526
readonly $fault: "client" = "client";
474527
Message?: string | undefined;
528+
/**
529+
* <p>The reason for the throttling exception.</p>
530+
* @public
531+
*/
532+
Reason?: ThrottlingExceptionReason | undefined;
475533
/**
476534
* @internal
477535
*/
@@ -483,9 +541,25 @@ export class ThrottlingException extends __BaseException {
483541
});
484542
Object.setPrototypeOf(this, ThrottlingException.prototype);
485543
this.Message = opts.Message;
544+
this.Reason = opts.Reason;
486545
}
487546
}
488547

548+
/**
549+
* @public
550+
* @enum
551+
*/
552+
export const ValidationExceptionReason = {
553+
KMS_DISABLED_EXCEPTION: "KMS_DisabledException",
554+
KMS_INVALID_KEY_USAGE_EXCEPTION: "KMS_InvalidKeyUsageException",
555+
KMS_INVALID_STATE_EXCEPTION: "KMS_InvalidStateException",
556+
} as const;
557+
558+
/**
559+
* @public
560+
*/
561+
export type ValidationExceptionReason = (typeof ValidationExceptionReason)[keyof typeof ValidationExceptionReason];
562+
489563
/**
490564
* <p>The request failed because it contains a syntax error.</p>
491565
* @public
@@ -494,6 +568,11 @@ export class ValidationException extends __BaseException {
494568
readonly name: "ValidationException" = "ValidationException";
495569
readonly $fault: "client" = "client";
496570
Message?: string | undefined;
571+
/**
572+
* <p>The reason for the validation exception.</p>
573+
* @public
574+
*/
575+
Reason?: ValidationExceptionReason | undefined;
497576
/**
498577
* @internal
499578
*/
@@ -505,6 +584,7 @@ export class ValidationException extends __BaseException {
505584
});
506585
Object.setPrototypeOf(this, ValidationException.prototype);
507586
this.Message = opts.Message;
587+
this.Reason = opts.Reason;
508588
}
509589
}
510590

@@ -2252,12 +2332,72 @@ export interface DescribeInstanceRequest {
22522332
InstanceArn: string | undefined;
22532333
}
22542334

2335+
/**
2336+
* @public
2337+
* @enum
2338+
*/
2339+
export const KmsKeyStatus = {
2340+
ENABLED: "ENABLED",
2341+
UPDATE_FAILED: "UPDATE_FAILED",
2342+
UPDATING: "UPDATING",
2343+
} as const;
2344+
2345+
/**
2346+
* @public
2347+
*/
2348+
export type KmsKeyStatus = (typeof KmsKeyStatus)[keyof typeof KmsKeyStatus];
2349+
2350+
/**
2351+
* @public
2352+
* @enum
2353+
*/
2354+
export const KmsKeyType = {
2355+
AWS_OWNED_KMS_KEY: "AWS_OWNED_KMS_KEY",
2356+
CUSTOMER_MANAGED_KEY: "CUSTOMER_MANAGED_KEY",
2357+
} as const;
2358+
2359+
/**
2360+
* @public
2361+
*/
2362+
export type KmsKeyType = (typeof KmsKeyType)[keyof typeof KmsKeyType];
2363+
2364+
/**
2365+
* <p>The encryption configuration of your IAM Identity Center instance, including the key type, KMS key ARN, and current encryption status. </p>
2366+
* @public
2367+
*/
2368+
export interface EncryptionConfigurationDetails {
2369+
/**
2370+
* <p>The type of KMS key used for encryption.</p>
2371+
* @public
2372+
*/
2373+
KeyType?: KmsKeyType | undefined;
2374+
2375+
/**
2376+
* <p>The ARN of the KMS key currently used to encrypt data in your IAM Identity Center instance. </p>
2377+
* @public
2378+
*/
2379+
KmsKeyArn?: string | undefined;
2380+
2381+
/**
2382+
* <p>The current status of encryption configuration.</p>
2383+
* @public
2384+
*/
2385+
EncryptionStatus?: KmsKeyStatus | undefined;
2386+
2387+
/**
2388+
* <p>Provides additional context about the current encryption status. This field is particularly useful when the encryption status is UPDATE_FAILED. When encryption configuration update fails, this field contains information about the cause, which may include KMS key access issues, key not found errors, invalid key configuration, key in an invalid state, or a disabled key. </p>
2389+
* @public
2390+
*/
2391+
EncryptionStatusReason?: string | undefined;
2392+
}
2393+
22552394
/**
22562395
* @public
22572396
* @enum
22582397
*/
22592398
export const InstanceStatus = {
22602399
ACTIVE: "ACTIVE",
2400+
CREATE_FAILED: "CREATE_FAILED",
22612401
CREATE_IN_PROGRESS: "CREATE_IN_PROGRESS",
22622402
DELETE_IN_PROGRESS: "DELETE_IN_PROGRESS",
22632403
} as const;
@@ -2306,6 +2446,18 @@ export interface DescribeInstanceResponse {
23062446
* @public
23072447
*/
23082448
Status?: InstanceStatus | undefined;
2449+
2450+
/**
2451+
* <p>Provides additional context about the current status of the IAM Identity Center instance. This field is particularly useful when an instance is in a non-ACTIVE state, such as CREATE_FAILED. When an instance fails to create or update, this field contains information about the cause, which may include issues with KMS key configuration, permission problems with the specified KMS key, or service-related errors. </p>
2452+
* @public
2453+
*/
2454+
StatusReason?: string | undefined;
2455+
2456+
/**
2457+
* <p>Contains the encryption configuration for your IAM Identity Center instance, including the encryption status, KMS key type, and KMS key ARN.</p>
2458+
* @public
2459+
*/
2460+
EncryptionConfigurationDetails?: EncryptionConfigurationDetails | undefined;
23092461
}
23102462

23112463
/**
@@ -2552,6 +2704,24 @@ export interface DetachManagedPolicyFromPermissionSetRequest {
25522704
*/
25532705
export interface DetachManagedPolicyFromPermissionSetResponse {}
25542706

2707+
/**
2708+
* <p> A structure that specifies the KMS key type and KMS key ARN used to encrypt data in your IAM Identity Center instance.</p>
2709+
* @public
2710+
*/
2711+
export interface EncryptionConfiguration {
2712+
/**
2713+
* <p>The type of KMS key used for encryption.</p>
2714+
* @public
2715+
*/
2716+
KeyType: KmsKeyType | undefined;
2717+
2718+
/**
2719+
* <p>The ARN of the KMS key used to encrypt data. Required when KeyType is CUSTOMER_MANAGED_KEY. Cannot be specified when KeyType is AWS_OWNED_KMS_KEY.</p>
2720+
* @public
2721+
*/
2722+
KmsKeyArn?: string | undefined;
2723+
}
2724+
25552725
/**
25562726
* @public
25572727
*/
@@ -2725,6 +2895,12 @@ export interface InstanceMetadata {
27252895
* @public
27262896
*/
27272897
Status?: InstanceStatus | undefined;
2898+
2899+
/**
2900+
* <p>Provides additional context about the current status of the IAM Identity Center instance. This field is particularly useful when an instance is in a non-ACTIVE state, such as CREATE_FAILED. When an instance creation fails, this field contains information about the cause, which may include issues with KMS key configuration or insufficient permissions. </p>
2901+
* @public
2902+
*/
2903+
StatusReason?: string | undefined;
27282904
}
27292905

27302906
/**
@@ -3913,13 +4089,19 @@ export interface UpdateInstanceRequest {
39134089
* <p>Updates the instance name.</p>
39144090
* @public
39154091
*/
3916-
Name: string | undefined;
4092+
Name?: string | undefined;
39174093

39184094
/**
39194095
* <p>The ARN of the instance of IAM Identity Center under which the operation will run. For more information about ARNs, see <a href="/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces</a> in the <i>Amazon Web Services General Reference</i>.</p>
39204096
* @public
39214097
*/
39224098
InstanceArn: string | undefined;
4099+
4100+
/**
4101+
* <p>Specifies the encryption configuration for your IAM Identity Center instance. You can use this to configure customer managed KMS keys (CMK) or Amazon Web Services owned KMS keys for encrypting your instance data.</p>
4102+
* @public
4103+
*/
4104+
EncryptionConfiguration?: EncryptionConfiguration | undefined;
39234105
}
39244106

39254107
/**

0 commit comments

Comments
 (0)