Skip to content

modify_saml_properties async

modify_saml_properties(
    resource_id: DirectoryId,
    *,
    config_overrides: Optional[AsyncWorkSpacesClientConfig] = None,
    saml_properties: Optional[SamlProperties] = None,
    properties_to_delete: Optional[DeletableSamlPropertiesList] = None,
) -> ModifySamlPropertiesResult

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.

Parameters:

  • resource_id (DirectoryId) –

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

  • saml_properties (Optional[SamlProperties], default: None ) –

    The properties for configuring SAML 2.0 authentication.

  • properties_to_delete (Optional[DeletableSamlPropertiesList], default: None ) –

    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.

Raises:

Source code in docs_src/capo_workspaces/_services/async_work_spaces.py
async def modify_saml_properties(
    self,
    resource_id: "capo_workspaces.types.directory_id.DirectoryId",
    *,
    config_overrides: Optional[AsyncWorkSpacesClientConfig] = None,
    saml_properties: Optional[
        "capo_workspaces.types.saml_properties.SamlProperties"
    ] = None,
    properties_to_delete: Optional[
        "capo_workspaces.types.deletable_saml_properties_list.DeletableSamlPropertiesList"
    ] = None,
) -> (
    "capo_workspaces.types.modify_saml_properties_result.ModifySamlPropertiesResult"
):
    """<p>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.</p>

    Args:
        resource_id: <p>The directory identifier for which you want to configure SAML properties.</p>
        saml_properties: <p>The properties for configuring SAML 2.0 authentication.</p>
        properties_to_delete: <p>The SAML properties to delete as part of your request.</p> <p>Specify one of the following options:</p> <ul> <li> <p> <code>SAML_PROPERTIES_USER_ACCESS_URL</code> to delete the user access URL.</p> </li> <li> <p> <code>SAML_PROPERTIES_RELAY_STATE_PARAMETER_NAME</code> to delete the relay state parameter name.</p> </li> </ul>

    Raises:
        capo_workspaces.errors.access_denied_exception.AccessDeniedException: <p>The user is not authorized to access a resource.</p>
        capo_workspaces.errors.invalid_parameter_values_exception.InvalidParameterValuesException: <p>One or more parameter values are not valid.</p>
        capo_workspaces.errors.operation_not_supported_exception.OperationNotSupportedException: <p>This operation is not supported.</p>
        capo_workspaces.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource could not be found.</p>
        capo_workspaces.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_workspaces.types.modify_saml_properties_request.ModifySamlPropertiesRequest]",
    ) -> AsyncOperationResponse[
        "capo_workspaces.types.modify_saml_properties_result.ModifySamlPropertiesResult"
    ]:
        import capo_workspaces._operations.workspaces_service.modify_saml_properties

        (
            output,
            http_response,
        ) = await capo_workspaces._operations.workspaces_service.modify_saml_properties.async_modify_saml_properties(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ModifySamlProperties")
    )
    input_: capo_workspaces.types.modify_saml_properties_request.ModifySamlPropertiesRequest = {
        "resource_id": resource_id
    }
    if saml_properties is not None:
        input_["saml_properties"] = saml_properties
    if properties_to_delete is not None:
        input_["properties_to_delete"] = properties_to_delete

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output