updateSAMLProvider method

Future<UpdateSAMLProviderResponse> updateSAMLProvider({
  1. required String sAMLProviderArn,
  2. String? addPrivateKey,
  3. AssertionEncryptionModeType? assertionEncryptionMode,
  4. String? removePrivateKey,
  5. String? sAMLMetadataDocument,
})

Updates the metadata document, SAML encryption settings, and private keys for an existing SAML provider. To rotate private keys, add your new private key and then remove the old key in a separate request.

May throw ConcurrentModificationException. May throw InvalidInputException. May throw LimitExceededException. May throw NoSuchEntityException. May throw ServiceFailureException.

Parameter sAMLProviderArn : The Amazon Resource Name (ARN) of the SAML provider to update.

For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference.

Parameter addPrivateKey : Specifies the new private key from your external identity provider. The private key must be a .pem file that uses AES-GCM or AES-CBC encryption algorithm to decrypt SAML assertions.

Parameter assertionEncryptionMode : Specifies the encryption setting for the SAML provider.

Parameter removePrivateKey : The Key ID of the private key to remove.

Parameter sAMLMetadataDocument : An XML document generated by an identity provider (IdP) that supports SAML 2.0. The document includes the issuer's name, expiration information, and keys that can be used to validate the SAML authentication response (assertions) that are received from the IdP. You must generate the metadata document using the identity management software that is used as your IdP.

Implementation

Future<UpdateSAMLProviderResponse> updateSAMLProvider({
  required String sAMLProviderArn,
  String? addPrivateKey,
  AssertionEncryptionModeType? assertionEncryptionMode,
  String? removePrivateKey,
  String? sAMLMetadataDocument,
}) async {
  final $request = <String, String>{
    'SAMLProviderArn': sAMLProviderArn,
    if (addPrivateKey != null) 'AddPrivateKey': addPrivateKey,
    if (assertionEncryptionMode != null)
      'AssertionEncryptionMode': assertionEncryptionMode.value,
    if (removePrivateKey != null) 'RemovePrivateKey': removePrivateKey,
    if (sAMLMetadataDocument != null)
      'SAMLMetadataDocument': sAMLMetadataDocument,
  };
  final $result = await _protocol.send(
    $request,
    action: 'UpdateSAMLProvider',
    version: '2010-05-08',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    resultWrapper: 'UpdateSAMLProviderResult',
  );
  return UpdateSAMLProviderResponse.fromXml($result);
}