getResourceApiKey method
Retrieves the API key associated with an API key credential provider.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw UnauthorizedException.
May throw ValidationException.
Parameter resourceCredentialProviderName :
The credential provider name for the resource from which you are
retrieving the API key.
Parameter workloadIdentityToken :
The identity token of the workload from which you want to retrieve the API
key.
Implementation
Future<GetResourceApiKeyResponse> getResourceApiKey({
required String resourceCredentialProviderName,
required String workloadIdentityToken,
}) async {
final $payload = <String, dynamic>{
'resourceCredentialProviderName': resourceCredentialProviderName,
'workloadIdentityToken': workloadIdentityToken,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/identities/api-key',
exceptionFnMap: _exceptionFns,
);
return GetResourceApiKeyResponse.fromJson(response);
}