getWorkloadAccessToken method
Obtains a workload access token for agentic workloads not acting on behalf of a user.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw UnauthorizedException.
May throw ValidationException.
Parameter workloadName :
The unique identifier for the registered workload.
Implementation
Future<GetWorkloadAccessTokenResponse> getWorkloadAccessToken({
required String workloadName,
}) async {
final $payload = <String, dynamic>{
'workloadName': workloadName,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/identities/GetWorkloadAccessToken',
exceptionFnMap: _exceptionFns,
);
return GetWorkloadAccessTokenResponse.fromJson(response);
}