modifySamlProperties method

Future<void> modifySamlProperties({
  1. required String resourceId,
  2. List<DeletableSamlProperty>? propertiesToDelete,
  3. SamlProperties? samlProperties,
})

Modifies multiple properties related to SAML 2.0 authentication, including the enablement status, user access URL, and relay state parameter name that are used for configuring federation with an SAML 2.0 identity provider.

May throw AccessDeniedException. May throw InvalidParameterValuesException. May throw OperationNotSupportedException. May throw ResourceNotFoundException.

Parameter resourceId : The directory identifier for which you want to configure SAML properties.

Parameter propertiesToDelete : The SAML properties to delete as part of your request.

Specify one of the following options:

  • SAML_PROPERTIES_USER_ACCESS_URL to delete the user access URL.
  • SAML_PROPERTIES_RELAY_STATE_PARAMETER_NAME to delete the relay state parameter name.

Parameter samlProperties : The properties for configuring SAML 2.0 authentication.

Implementation

Future<void> modifySamlProperties({
  required String resourceId,
  List<DeletableSamlProperty>? propertiesToDelete,
  SamlProperties? samlProperties,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'WorkspacesService.ModifySamlProperties'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ResourceId': resourceId,
      if (propertiesToDelete != null)
        'PropertiesToDelete': propertiesToDelete.map((e) => e.value).toList(),
      if (samlProperties != null) 'SamlProperties': samlProperties,
    },
  );
}