getIdentityCenterAuthToken method
Returns an Identity Center authentication token for accessing Amazon Redshift Serverless workgroups.
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.
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.
May throw AccessDeniedException.
May throw ConflictException.
May throw DryRunException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter workgroupNames :
A list of workgroup names for which to generate the Identity Center
authentication token.
Constraints:
- Must contain between 1 and 20 workgroup names.
- Each workgroup name must be a valid Amazon Redshift Serverless workgroup identifier.
- All specified workgroups must have Identity Center integration enabled.
Implementation
Future<GetIdentityCenterAuthTokenResponse> getIdentityCenterAuthToken({
required List<String> workgroupNames,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'RedshiftServerless.GetIdentityCenterAuthToken'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'workgroupNames': workgroupNames,
},
);
return GetIdentityCenterAuthTokenResponse.fromJson(jsonResponse.body);
}