Skip to content

verify_trust

verify_trust(
    trust_id: TrustId,
    *,
    config_overrides: Optional[DirectoryServiceClientConfig] = None,
) -> VerifyTrustResult

Directory Service for Microsoft Active Directory allows you to configure and verify trust relationships.

This action verifies a trust relationship between your Managed Microsoft AD directory and an external domain.

Parameters:

  • trust_id (TrustId) –

    The unique Trust ID of the trust relationship to verify.

Raises:

Examples:

To verify a trust The following example verifies a trust relationship between your Microsoft AD in the AWS cloud and an external domain.

>>> client.verify_trust(trust_id='t-9267353df0')
Source code in docs_src/capo_directory_service/_services/directory_service.py
def verify_trust(
    self,
    trust_id: "capo_directory_service.types.trust_id.TrustId",
    *,
    config_overrides: Optional[DirectoryServiceClientConfig] = None,
) -> "capo_directory_service.types.verify_trust_result.VerifyTrustResult":
    """<p>Directory Service for Microsoft Active Directory allows you to configure and verify trust relationships.</p> <p>This action verifies a trust relationship between your Managed Microsoft AD directory and an external domain.</p>

    Args:
        trust_id: <p>The unique Trust ID of the trust relationship to verify.</p>

    Raises:
        capo_directory_service.errors.client_exception.ClientException: <p>A client exception has occurred.</p>
        capo_directory_service.errors.entity_does_not_exist_exception.EntityDoesNotExistException: <p>The specified entity could not be found.</p>
        capo_directory_service.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters are not valid.</p>
        capo_directory_service.errors.service_exception.ServiceException: <p>An exception has occurred in Directory Service.</p>
        capo_directory_service.errors.unsupported_operation_exception.UnsupportedOperationException: <p>The operation is not supported.</p>
        capo_directory_service.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To verify a trust
        The following example verifies a trust relationship between your Microsoft AD in the AWS cloud and an external domain.

        >>> client.verify_trust(trust_id='t-9267353df0')
    """

    def _handler(
        req: "OperationRequest[capo_directory_service.types.verify_trust_request.VerifyTrustRequest]",
    ) -> OperationResponse[
        "capo_directory_service.types.verify_trust_result.VerifyTrustResult"
    ]:
        import capo_directory_service._operations.directory_service_20150416.verify_trust

        output, http_response = (
            capo_directory_service._operations.directory_service_20150416.verify_trust.verify_trust(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("VerifyTrust")
    )
    input_: capo_directory_service.types.verify_trust_request.VerifyTrustRequest = {
        "trust_id": trust_id
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output