updateIdentitySource method

Future<UpdateIdentitySourceOutput> updateIdentitySource({
  1. required String identitySourceId,
  2. required String policyStoreId,
  3. required UpdateConfiguration updateConfiguration,
  4. String? principalEntityType,
})

Updates the specified identity source to use a new identity provider (IdP), or to change the mapping of identities from the IdP to a different principal entity type.

May throw ConflictException. May throw ResourceNotFoundException.

Parameter identitySourceId : Specifies the ID of the identity source that you want to update.

Parameter policyStoreId : Specifies the ID of the policy store that contains the identity source that you want to update.

To specify a policy store, use its ID or alias name. When using an alias name, prefix it with policy-store-alias/. For example:

  • ID: PSEXAMPLEabcdefg111111
  • Alias name: policy-store-alias/example-policy-store
To view aliases, use ListPolicyStoreAliases.

Parameter updateConfiguration : Specifies the details required to communicate with the identity provider (IdP) associated with this identity source.

Parameter principalEntityType : Specifies the data type of principals generated for identities authenticated by the identity source.

Implementation

Future<UpdateIdentitySourceOutput> updateIdentitySource({
  required String identitySourceId,
  required String policyStoreId,
  required UpdateConfiguration updateConfiguration,
  String? principalEntityType,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'VerifiedPermissions.UpdateIdentitySource'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'identitySourceId': identitySourceId,
      'policyStoreId': policyStoreId,
      'updateConfiguration': updateConfiguration,
      if (principalEntityType != null)
        'principalEntityType': principalEntityType,
    },
  );

  return UpdateIdentitySourceOutput.fromJson(jsonResponse.body);
}