Skip to content

update_directory_config async

update_directory_config(
    *,
    config_overrides: Optional[AsyncAppStreamClientConfig] = None,
    directory_name: Optional[DirectoryName] = None,
    organizational_unit_distinguished_names: Optional[
        OrganizationalUnitDistinguishedNamesList
    ] = None,
    service_account_credentials: Optional[ServiceAccountCredentials] = None,
    certificate_based_auth_properties: Optional[CertificateBasedAuthProperties] = None,
) -> UpdateDirectoryConfigResult

Updates the specified Directory Config object in WorkSpaces Applications. This object includes the configuration information required to join fleets and image builders to Microsoft Active Directory domains.

Parameters:

  • directory_name (Optional[DirectoryName], default: None ) –

    The name of the Directory Config object.

  • organizational_unit_distinguished_names (Optional[OrganizationalUnitDistinguishedNamesList], default: None ) –

    The distinguished names of the organizational units for computer accounts.

  • service_account_credentials (Optional[ServiceAccountCredentials], default: None ) –

    The credentials for the service account used by the fleet or image builder to connect to the directory.

  • certificate_based_auth_properties (Optional[CertificateBasedAuthProperties], default: None ) –

    The certificate-based authentication properties used to authenticate SAML 2.0 Identity Provider (IdP) user identities to Active Directory domain-joined streaming instances. Fallback is turned on by default when certificate-based authentication is Enabled . Fallback allows users to log in using their AD domain password if certificate-based authentication is unsuccessful, or to unlock a desktop lock screen. Enabled_no_directory_login_fallback enables certificate-based authentication, but does not allow users to log in using their AD domain password. Users will be disconnected to re-authenticate using certificates.

Raises:

Source code in docs_src/capo_appstream/_services/async_app_stream.py
async def update_directory_config(
    self,
    *,
    config_overrides: Optional[AsyncAppStreamClientConfig] = None,
    directory_name: Optional[
        "capo_appstream.types.directory_name.DirectoryName"
    ] = None,
    organizational_unit_distinguished_names: Optional[
        "capo_appstream.types.organizational_unit_distinguished_names_list.OrganizationalUnitDistinguishedNamesList"
    ] = None,
    service_account_credentials: Optional[
        "capo_appstream.types.service_account_credentials.ServiceAccountCredentials"
    ] = None,
    certificate_based_auth_properties: Optional[
        "capo_appstream.types.certificate_based_auth_properties.CertificateBasedAuthProperties"
    ] = None,
) -> "capo_appstream.types.update_directory_config_result.UpdateDirectoryConfigResult":
    """<p>Updates the specified Directory Config object in WorkSpaces Applications. This object includes the configuration information required to join fleets and image builders to Microsoft Active Directory domains.</p>

    Args:
        directory_name: <p>The name of the Directory Config object.</p>
        organizational_unit_distinguished_names: <p>The distinguished names of the organizational units for computer accounts.</p>
        service_account_credentials: <p>The credentials for the service account used by the fleet or image builder to connect to the directory.</p>
        certificate_based_auth_properties: <p>The certificate-based authentication properties used to authenticate SAML 2.0 Identity Provider (IdP) user identities to Active Directory domain-joined streaming instances. Fallback is turned on by default when certificate-based authentication is <b>Enabled</b> . Fallback allows users to log in using their AD domain password if certificate-based authentication is unsuccessful, or to unlock a desktop lock screen. <b>Enabled_no_directory_login_fallback</b> enables certificate-based authentication, but does not allow users to log in using their AD domain password. Users will be disconnected to re-authenticate using certificates.</p>

    Raises:
        capo_appstream.errors.concurrent_modification_exception.ConcurrentModificationException: <p>An API error occurred. Wait a few minutes and try again.</p>
        capo_appstream.errors.incompatible_image_exception.IncompatibleImageException: <p>The image can't be updated because it's not compatible for updates.</p>
        capo_appstream.errors.invalid_role_exception.InvalidRoleException: <p>The specified role is invalid.</p>
        capo_appstream.errors.operation_not_permitted_exception.OperationNotPermittedException: <p>The attempted operation is not permitted.</p>
        capo_appstream.errors.resource_in_use_exception.ResourceInUseException: <p>The specified resource is in use.</p>
        capo_appstream.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
        capo_appstream.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_appstream.types.update_directory_config_request.UpdateDirectoryConfigRequest]",
    ) -> AsyncOperationResponse[
        "capo_appstream.types.update_directory_config_result.UpdateDirectoryConfigResult"
    ]:
        import capo_appstream._operations.photon_admin_proxy_service.update_directory_config

        (
            output,
            http_response,
        ) = await capo_appstream._operations.photon_admin_proxy_service.update_directory_config.async_update_directory_config(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_appstream.types.update_directory_config_request.UpdateDirectoryConfigRequest",
    ) -> dict[str, Any]:
        import capo_appstream.types.update_directory_config_request

        return (
            capo_appstream.types.update_directory_config_request.redact_sensitive(
                input_
            )
        )

    def _redact_output(
        output: "capo_appstream.types.update_directory_config_result.UpdateDirectoryConfigResult",
    ) -> dict[str, Any]:
        import capo_appstream.types.update_directory_config_result

        return capo_appstream.types.update_directory_config_result.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "UpdateDirectoryConfig",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_appstream.types.update_directory_config_request.UpdateDirectoryConfigRequest = {}
    if directory_name is not None:
        input_["directory_name"] = directory_name
    if organizational_unit_distinguished_names is not None:
        input_["organizational_unit_distinguished_names"] = (
            organizational_unit_distinguished_names
        )
    if service_account_credentials is not None:
        input_["service_account_credentials"] = service_account_credentials
    if certificate_based_auth_properties is not None:
        input_["certificate_based_auth_properties"] = (
            certificate_based_auth_properties
        )

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