Skip to content

Commit c3d2776

Browse files
author
awstools
committed
feat(client-redshift-serverless): Added GetIdentityCenterAuthToken API to retrieve encrypted authentication tokens for Identity Center integrated serverless workgroups. This API enables programmatic access to secure Identity Center tokens with proper error handling and parameter validation across supported SDK languages.
1 parent 14887fd commit c3d2776

File tree

11 files changed

+317
-2
lines changed

11 files changed

+317
-2
lines changed

clients/client-redshift-serverless/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,14 @@ GetEndpointAccess
378378

379379
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/redshift-serverless/command/GetEndpointAccessCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-redshift-serverless/Interface/GetEndpointAccessCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-redshift-serverless/Interface/GetEndpointAccessCommandOutput/)
380380

381+
</details>
382+
<details>
383+
<summary>
384+
GetIdentityCenterAuthToken
385+
</summary>
386+
387+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/redshift-serverless/command/GetIdentityCenterAuthTokenCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-redshift-serverless/Interface/GetIdentityCenterAuthTokenCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-redshift-serverless/Interface/GetIdentityCenterAuthTokenCommandOutput/)
388+
381389
</details>
382390
<details>
383391
<summary>

clients/client-redshift-serverless/src/RedshiftServerless.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,11 @@ import {
112112
GetEndpointAccessCommandInput,
113113
GetEndpointAccessCommandOutput,
114114
} from "./commands/GetEndpointAccessCommand";
115+
import {
116+
GetIdentityCenterAuthTokenCommand,
117+
GetIdentityCenterAuthTokenCommandInput,
118+
GetIdentityCenterAuthTokenCommandOutput,
119+
} from "./commands/GetIdentityCenterAuthTokenCommand";
115120
import {
116121
GetNamespaceCommand,
117122
GetNamespaceCommandInput,
@@ -331,6 +336,7 @@ const commands = {
331336
GetCredentialsCommand,
332337
GetCustomDomainAssociationCommand,
333338
GetEndpointAccessCommand,
339+
GetIdentityCenterAuthTokenCommand,
334340
GetNamespaceCommand,
335341
GetRecoveryPointCommand,
336342
GetReservationCommand,
@@ -730,6 +736,23 @@ export interface RedshiftServerless {
730736
cb: (err: any, data?: GetEndpointAccessCommandOutput) => void
731737
): void;
732738

739+
/**
740+
* @see {@link GetIdentityCenterAuthTokenCommand}
741+
*/
742+
getIdentityCenterAuthToken(
743+
args: GetIdentityCenterAuthTokenCommandInput,
744+
options?: __HttpHandlerOptions
745+
): Promise<GetIdentityCenterAuthTokenCommandOutput>;
746+
getIdentityCenterAuthToken(
747+
args: GetIdentityCenterAuthTokenCommandInput,
748+
cb: (err: any, data?: GetIdentityCenterAuthTokenCommandOutput) => void
749+
): void;
750+
getIdentityCenterAuthToken(
751+
args: GetIdentityCenterAuthTokenCommandInput,
752+
options: __HttpHandlerOptions,
753+
cb: (err: any, data?: GetIdentityCenterAuthTokenCommandOutput) => void
754+
): void;
755+
733756
/**
734757
* @see {@link GetNamespaceCommand}
735758
*/

clients/client-redshift-serverless/src/RedshiftServerlessClient.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,10 @@ import {
121121
GetCustomDomainAssociationCommandOutput,
122122
} from "./commands/GetCustomDomainAssociationCommand";
123123
import { GetEndpointAccessCommandInput, GetEndpointAccessCommandOutput } from "./commands/GetEndpointAccessCommand";
124+
import {
125+
GetIdentityCenterAuthTokenCommandInput,
126+
GetIdentityCenterAuthTokenCommandOutput,
127+
} from "./commands/GetIdentityCenterAuthTokenCommand";
124128
import { GetNamespaceCommandInput, GetNamespaceCommandOutput } from "./commands/GetNamespaceCommand";
125129
import { GetRecoveryPointCommandInput, GetRecoveryPointCommandOutput } from "./commands/GetRecoveryPointCommand";
126130
import { GetReservationCommandInput, GetReservationCommandOutput } from "./commands/GetReservationCommand";
@@ -254,6 +258,7 @@ export type ServiceInputTypes =
254258
| GetCredentialsCommandInput
255259
| GetCustomDomainAssociationCommandInput
256260
| GetEndpointAccessCommandInput
261+
| GetIdentityCenterAuthTokenCommandInput
257262
| GetNamespaceCommandInput
258263
| GetRecoveryPointCommandInput
259264
| GetReservationCommandInput
@@ -323,6 +328,7 @@ export type ServiceOutputTypes =
323328
| GetCredentialsCommandOutput
324329
| GetCustomDomainAssociationCommandOutput
325330
| GetEndpointAccessCommandOutput
331+
| GetIdentityCenterAuthTokenCommandOutput
326332
| GetNamespaceCommandOutput
327333
| GetRecoveryPointCommandOutput
328334
| GetReservationCommandOutput
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
// smithy-typescript generated code
2+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { Command as $Command } from "@smithy/smithy-client";
4+
import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
5+
6+
import { commonParams } from "../endpoint/EndpointParameters";
7+
import type { GetIdentityCenterAuthTokenRequest, GetIdentityCenterAuthTokenResponse } from "../models/models_0";
8+
import type {
9+
RedshiftServerlessClientResolvedConfig,
10+
ServiceInputTypes,
11+
ServiceOutputTypes,
12+
} from "../RedshiftServerlessClient";
13+
import { GetIdentityCenterAuthToken } from "../schemas/schemas_0";
14+
15+
/**
16+
* @public
17+
*/
18+
export type { __MetadataBearer };
19+
export { $Command };
20+
/**
21+
* @public
22+
*
23+
* The input for {@link GetIdentityCenterAuthTokenCommand}.
24+
*/
25+
export interface GetIdentityCenterAuthTokenCommandInput extends GetIdentityCenterAuthTokenRequest {}
26+
/**
27+
* @public
28+
*
29+
* The output of {@link GetIdentityCenterAuthTokenCommand}.
30+
*/
31+
export interface GetIdentityCenterAuthTokenCommandOutput extends GetIdentityCenterAuthTokenResponse, __MetadataBearer {}
32+
33+
/**
34+
* <p>Returns an Identity Center authentication token for accessing Amazon Redshift Serverless workgroups.</p> <p>The token provides secure access to data within the specified workgroups using Identity Center identity propagation. The token expires after a specified duration and must be refreshed for continued access.</p> <p>The Identity and Access Management (IAM) user or role that runs GetIdentityCenterAuthToken must have appropriate permissions to access the specified workgroups and Identity Center integration must be configured for the workgroups.</p>
35+
* @example
36+
* Use a bare-bones client and the command you need to make an API call.
37+
* ```javascript
38+
* import { RedshiftServerlessClient, GetIdentityCenterAuthTokenCommand } from "@aws-sdk/client-redshift-serverless"; // ES Modules import
39+
* // const { RedshiftServerlessClient, GetIdentityCenterAuthTokenCommand } = require("@aws-sdk/client-redshift-serverless"); // CommonJS import
40+
* // import type { RedshiftServerlessClientConfig } from "@aws-sdk/client-redshift-serverless";
41+
* const config = {}; // type is RedshiftServerlessClientConfig
42+
* const client = new RedshiftServerlessClient(config);
43+
* const input = { // GetIdentityCenterAuthTokenRequest
44+
* workgroupNames: [ // WorkgroupNameList // required
45+
* "STRING_VALUE",
46+
* ],
47+
* };
48+
* const command = new GetIdentityCenterAuthTokenCommand(input);
49+
* const response = await client.send(command);
50+
* // { // GetIdentityCenterAuthTokenResponse
51+
* // token: "STRING_VALUE",
52+
* // expirationTime: new Date("TIMESTAMP"),
53+
* // };
54+
*
55+
* ```
56+
*
57+
* @param GetIdentityCenterAuthTokenCommandInput - {@link GetIdentityCenterAuthTokenCommandInput}
58+
* @returns {@link GetIdentityCenterAuthTokenCommandOutput}
59+
* @see {@link GetIdentityCenterAuthTokenCommandInput} for command's `input` shape.
60+
* @see {@link GetIdentityCenterAuthTokenCommandOutput} for command's `response` shape.
61+
* @see {@link RedshiftServerlessClientResolvedConfig | config} for RedshiftServerlessClient's `config` shape.
62+
*
63+
* @throws {@link AccessDeniedException} (client fault)
64+
* <p>You do not have sufficient access to perform this action.</p>
65+
*
66+
* @throws {@link ConflictException} (client fault)
67+
* <p>The submitted action has conflicts.</p>
68+
*
69+
* @throws {@link DryRunException} (client fault)
70+
* <p>This exception is thrown when the request was successful, but dry run was enabled so no action was taken.</p>
71+
*
72+
* @throws {@link InternalServerException} (server fault)
73+
* <p>The request processing has failed because of an unknown error, exception or failure.</p>
74+
*
75+
* @throws {@link ResourceNotFoundException} (client fault)
76+
* <p>The resource could not be found.</p>
77+
*
78+
* @throws {@link ThrottlingException} (client fault)
79+
* <p>The request was denied due to request throttling.</p>
80+
*
81+
* @throws {@link ValidationException} (client fault)
82+
* <p>The input failed to satisfy the constraints specified by an Amazon Web Services service.</p>
83+
*
84+
* @throws {@link RedshiftServerlessServiceException}
85+
* <p>Base exception class for all service exceptions from RedshiftServerless service.</p>
86+
*
87+
*
88+
* @public
89+
*/
90+
export class GetIdentityCenterAuthTokenCommand extends $Command
91+
.classBuilder<
92+
GetIdentityCenterAuthTokenCommandInput,
93+
GetIdentityCenterAuthTokenCommandOutput,
94+
RedshiftServerlessClientResolvedConfig,
95+
ServiceInputTypes,
96+
ServiceOutputTypes
97+
>()
98+
.ep(commonParams)
99+
.m(function (this: any, Command: any, cs: any, config: RedshiftServerlessClientResolvedConfig, o: any) {
100+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
101+
})
102+
.s("RedshiftServerless", "GetIdentityCenterAuthToken", {})
103+
.n("RedshiftServerlessClient", "GetIdentityCenterAuthTokenCommand")
104+
.sc(GetIdentityCenterAuthToken)
105+
.build() {
106+
/** @internal type navigation helper, not in runtime. */
107+
protected declare static __types: {
108+
api: {
109+
input: GetIdentityCenterAuthTokenRequest;
110+
output: GetIdentityCenterAuthTokenResponse;
111+
};
112+
sdk: {
113+
input: GetIdentityCenterAuthTokenCommandInput;
114+
output: GetIdentityCenterAuthTokenCommandOutput;
115+
};
116+
};
117+
}

clients/client-redshift-serverless/src/commands/GetTrackCommand.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ export interface GetTrackCommandOutput extends GetTrackResponse, __MetadataBeare
7272
* @throws {@link ConflictException} (client fault)
7373
* <p>The submitted action has conflicts.</p>
7474
*
75+
* @throws {@link DryRunException} (client fault)
76+
* <p>This exception is thrown when the request was successful, but dry run was enabled so no action was taken.</p>
77+
*
7578
* @throws {@link InternalServerException} (server fault)
7679
* <p>The request processing has failed because of an unknown error, exception or failure.</p>
7780
*

clients/client-redshift-serverless/src/commands/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export * from "./DeleteWorkgroupCommand";
2121
export * from "./GetCredentialsCommand";
2222
export * from "./GetCustomDomainAssociationCommand";
2323
export * from "./GetEndpointAccessCommand";
24+
export * from "./GetIdentityCenterAuthTokenCommand";
2425
export * from "./GetNamespaceCommand";
2526
export * from "./GetRecoveryPointCommand";
2627
export * from "./GetReservationCommand";

clients/client-redshift-serverless/src/models/models_0.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1992,6 +1992,34 @@ export interface GetCustomDomainAssociationResponse {
19921992
customDomainCertificateExpiryTime?: Date | undefined;
19931993
}
19941994

1995+
/**
1996+
* @public
1997+
*/
1998+
export interface GetIdentityCenterAuthTokenRequest {
1999+
/**
2000+
* <p>A list of workgroup names for which to generate the Identity Center authentication token.</p> <p>Constraints:</p> <ul> <li> <p>Must contain between 1 and 20 workgroup names.</p> </li> <li> <p>Each workgroup name must be a valid Amazon Redshift Serverless workgroup identifier.</p> </li> <li> <p>All specified workgroups must have Identity Center integration enabled.</p> </li> </ul>
2001+
* @public
2002+
*/
2003+
workgroupNames: string[] | undefined;
2004+
}
2005+
2006+
/**
2007+
* @public
2008+
*/
2009+
export interface GetIdentityCenterAuthTokenResponse {
2010+
/**
2011+
* <p>The Identity Center authentication token that can be used to access data in the specified workgroups.</p> <p>This token contains the Identity Center identity information and is encrypted for secure transmission.</p>
2012+
* @public
2013+
*/
2014+
token?: string | undefined;
2015+
2016+
/**
2017+
* <p>The date and time when the Identity Center authentication token expires.</p> <p>After this time, a new token must be requested for continued access.</p>
2018+
* @public
2019+
*/
2020+
expirationTime?: Date | undefined;
2021+
}
2022+
19952023
/**
19962024
* @public
19972025
*/

clients/client-redshift-serverless/src/schemas/schemas_0.ts

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ const _DWRe = "DeleteWorkgroupResponse";
6868
const _E = "Endpoint";
6969
const _EA = "EndpointAccess";
7070
const _EAL = "EndpointAccessList";
71+
const _ET = "ExpirationTime";
7172
const _GC = "GetCredentials";
7273
const _GCDA = "GetCustomDomainAssociation";
7374
const _GCDAR = "GetCustomDomainAssociationRequest";
@@ -77,6 +78,9 @@ const _GCRe = "GetCredentialsResponse";
7778
const _GEA = "GetEndpointAccess";
7879
const _GEAR = "GetEndpointAccessRequest";
7980
const _GEARe = "GetEndpointAccessResponse";
81+
const _GICAT = "GetIdentityCenterAuthToken";
82+
const _GICATR = "GetIdentityCenterAuthTokenRequest";
83+
const _GICATRe = "GetIdentityCenterAuthTokenResponse";
8084
const _GN = "GetNamespace";
8185
const _GNR = "GetNamespaceRequest";
8286
const _GNRe = "GetNamespaceResponse";
@@ -199,7 +203,7 @@ const _SL = "SnapshotList";
199203
const _SQEE = "ServiceQuotaExceededException";
200204
const _ST = "ServerlessTrack";
201205
const _Sc = "Schedule";
202-
const _T = "Tag";
206+
const _T = "Token";
203207
const _TA = "TargetAction";
204208
const _TE = "ThrottlingException";
205209
const _TL = "TagList";
@@ -210,6 +214,7 @@ const _TRR = "TagResourceRequest";
210214
const _TRRa = "TagResourceResponse";
211215
const _TRS = "TableRestoreStatus";
212216
const _TRSL = "TableRestoreStatusList";
217+
const _Ta = "Tag";
213218
const _UCDA = "UpdateCustomDomainAssociation";
214219
const _UCDAR = "UpdateCustomDomainAssociationRequest";
215220
const _UCDARp = "UpdateCustomDomainAssociationResponse";
@@ -301,6 +306,7 @@ const _eS = "endpointStatus";
301306
const _eSTC = "estimatedSecondsToCompletion";
302307
const _eT = "endTime";
303308
const _eTIS = "elapsedTimeInSeconds";
309+
const _eTx = "expirationTime";
304310
const _eVR = "enhancedVpcRouting";
305311
const _en = "endpoint";
306312
const _ena = "enabled";
@@ -314,6 +320,7 @@ const _hQ = "httpQuery";
314320
const _iA = "ipv6Address";
315321
const _iAT = "ipAddressType";
316322
const _iR = "iamRoles";
323+
const _jN = "jsonName";
317324
const _k = "key";
318325
const _kKI = "kmsKeyId";
319326
const _l = "level";
@@ -416,6 +423,7 @@ const _tRS = "tableRestoreStatus";
416423
const _tRSa = "tableRestoreStatuses";
417424
const _tSIMB = "totalSizeInMegaBytes";
418425
const _tSN = "targetSchemaName";
426+
const _to = "token";
419427
const _tr = "track";
420428
const _tra = "tracks";
421429
const _uC = "upfrontCharge";
@@ -437,6 +445,7 @@ const _w = "workgroup";
437445
const _wA = "workgroupArn";
438446
const _wI = "workgroupId";
439447
const _wN = "workgroupName";
448+
const _wNo = "workgroupNames";
440449
const _wV = "workgroupVersion";
441450
const _wo = "workgroups";
442451
const n0 = "com.amazonaws.redshiftserverless";
@@ -651,6 +660,18 @@ export var GetCustomDomainAssociationResponse: StaticStructureSchema = [
651660
];
652661
export var GetEndpointAccessRequest: StaticStructureSchema = [3, n0, _GEAR, 0, [_eN], [0]];
653662
export var GetEndpointAccessResponse: StaticStructureSchema = [3, n0, _GEARe, 0, [_en], [() => EndpointAccess]];
663+
export var GetIdentityCenterAuthTokenRequest: StaticStructureSchema = [3, n0, _GICATR, 0, [_wNo], [64 | 0]];
664+
export var GetIdentityCenterAuthTokenResponse: StaticStructureSchema = [
665+
3,
666+
n0,
667+
_GICATRe,
668+
8,
669+
[_to, _eTx],
670+
[
671+
[0, { [_jN]: _T }],
672+
[5, { [_jN]: _ET }],
673+
],
674+
];
654675
export var GetNamespaceRequest: StaticStructureSchema = [3, n0, _GNR, 0, [_nN], [0]];
655676
export var GetNamespaceResponse: StaticStructureSchema = [3, n0, _GNRe, 0, [_n], [[() => Namespace, 0]]];
656677
export var GetRecoveryPointRequest: StaticStructureSchema = [3, n0, _GRPR, 0, [_rPI], [0]];
@@ -1061,7 +1082,7 @@ export var TableRestoreStatus: StaticStructureSchema = [
10611082
[_tRRI, _st, _m, _rT, _nN, _wN, _sN, _pIMB, _tDIMB, _sDN, _sSN, _sTN, _tDN, _tSN, _nTN, _rPI],
10621083
[0, 0, 0, 4, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0],
10631084
];
1064-
export var Tag: StaticStructureSchema = [3, n0, _T, 0, [_k, _v], [0, 0]];
1085+
export var Tag: StaticStructureSchema = [3, n0, _Ta, 0, [_k, _v], [0, 0]];
10651086
export var TagResourceRequest: StaticStructureSchema = [3, n0, _TRR, 0, [_rAe, _t], [0, () => TagList]];
10661087
export var TagResourceResponse: StaticStructureSchema = [3, n0, _TRRa, 0, [], []];
10671088
export var ThrottlingException: StaticErrorSchema = [-3, n0, _TE, { [_e]: _c, [_hE]: 429 }, [_co, _m], [0, 0]];
@@ -1269,6 +1290,7 @@ export var VpcIds = 64 | 0;
12691290
export var VpcSecurityGroupIdList = 64 | 0;
12701291
export var VpcSecurityGroupMembershipList: StaticListSchema = [1, n0, _VSGML, 0, () => VpcSecurityGroupMembership];
12711292
export var WorkgroupList: StaticListSchema = [1, n0, _WL, 0, () => Workgroup];
1293+
export var WorkgroupNameList = 64 | 0;
12721294
export var Schedule: StaticStructureSchema = [3, n0, _Sc, 0, [_at, _cr], [4, 0]];
12731295
export var TargetAction: StaticStructureSchema = [3, n0, _TA, 0, [_cS], [() => CreateSnapshotScheduleActionParameters]];
12741296
export var ConvertRecoveryPointToSnapshot: StaticOperationSchema = [
@@ -1447,6 +1469,14 @@ export var GetEndpointAccess: StaticOperationSchema = [
14471469
() => GetEndpointAccessRequest,
14481470
() => GetEndpointAccessResponse,
14491471
];
1472+
export var GetIdentityCenterAuthToken: StaticOperationSchema = [
1473+
9,
1474+
n0,
1475+
_GICAT,
1476+
0,
1477+
() => GetIdentityCenterAuthTokenRequest,
1478+
() => GetIdentityCenterAuthTokenResponse,
1479+
];
14501480
export var GetNamespace: StaticOperationSchema = [9, n0, _GN, 0, () => GetNamespaceRequest, () => GetNamespaceResponse];
14511481
export var GetRecoveryPoint: StaticOperationSchema = [
14521482
9,

clients/client-redshift-serverless/test/index-objects.spec.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import {
2424
GetCredentialsCommand,
2525
GetCustomDomainAssociationCommand,
2626
GetEndpointAccessCommand,
27+
GetIdentityCenterAuthTokenCommand,
2728
GetNamespaceCommand,
2829
GetRecoveryPointCommand,
2930
GetReservationCommand,
@@ -133,6 +134,7 @@ assert(typeof DeleteWorkgroupCommand === "function");
133134
assert(typeof GetCredentialsCommand === "function");
134135
assert(typeof GetCustomDomainAssociationCommand === "function");
135136
assert(typeof GetEndpointAccessCommand === "function");
137+
assert(typeof GetIdentityCenterAuthTokenCommand === "function");
136138
assert(typeof GetNamespaceCommand === "function");
137139
assert(typeof GetRecoveryPointCommand === "function");
138140
assert(typeof GetReservationCommand === "function");

0 commit comments

Comments
 (0)