createIdentitySource method
Creates a new identity source. For more information, see Identity Source in the Multi-party approval User Guide.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter identitySourceParameters :
A IdentitySourceParameters object. Contains details for the
resource that provides identities to the identity source. For example, an
IAM Identity Center instance.
Parameter clientToken :
Unique, case-sensitive identifier that you provide to ensure the
idempotency of the request. If not provided, the Amazon Web Services
populates this field.
When you make a mutating API request, the request typically returns a result before the operation's asynchronous workflows have completed. Operations might also time out or encounter other server issues before they complete, even though the request has already returned a result. This could make it difficult to determine whether the request succeeded or not, and could lead to multiple retries to ensure that the operation completes successfully. However, if the original request and the subsequent retries are successful, the operation is completed multiple times. This means that you might create more resources than you intended.
Idempotency ensures that an API request completes no more than one time. With an idempotent request, if the original request completes successfully, any subsequent retries complete successfully without performing any further actions.
Parameter tags :
Tag you want to attach to the identity source.
Implementation
Future<CreateIdentitySourceResponse> createIdentitySource({
required IdentitySourceParameters identitySourceParameters,
String? clientToken,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'IdentitySourceParameters': identitySourceParameters,
'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
if (tags != null) 'Tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/identity-sources',
exceptionFnMap: _exceptionFns,
);
return CreateIdentitySourceResponse.fromJson(response);
}