createIdentityCenterApplication method

Future<CreateIdentityCenterApplicationResponse> createIdentityCenterApplication({
  1. required String instanceArn,
  2. required String name,
  3. String? clientToken,
})

Creates the WorkMail application in IAM Identity Center that can be used later in the WorkMail - IdC integration. For more information, see PutIdentityProviderConfiguration. This action does not affect the authentication settings for any WorkMail organizations.

May throw InvalidParameterException.

Parameter instanceArn : The Amazon Resource Name (ARN) of the instance.

Parameter name : The name of the IAM Identity Center application.

Parameter clientToken : The idempotency token associated with the request.

Implementation

Future<CreateIdentityCenterApplicationResponse>
    createIdentityCenterApplication({
  required String instanceArn,
  required String name,
  String? clientToken,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'WorkMailService.CreateIdentityCenterApplication'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'InstanceArn': instanceArn,
      'Name': name,
      'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
    },
  );

  return CreateIdentityCenterApplicationResponse.fromJson(jsonResponse.body);
}