Skip to content

describe_conditional_forwarders async

describe_conditional_forwarders(
    directory_id: DirectoryId,
    *,
    config_overrides: Optional[AsyncDirectoryServiceClientConfig] = None,
    remote_domain_names: Optional[RemoteDomainNames] = None,
) -> DescribeConditionalForwardersResult

Obtains information about the conditional forwarders for this account.

If no input parameters are provided for RemoteDomainNames, this request describes all conditional forwarders for the specified directory ID.

Parameters:

  • directory_id (DirectoryId) –

    The directory ID for which to get the list of associated conditional forwarders.

  • remote_domain_names (Optional[RemoteDomainNames], default: None ) –

    The fully qualified domain names (FQDN) of the remote domains for which to get the list of associated conditional forwarders. If this member is null, all conditional forwarders are returned.

Raises:

Examples:

To describe conditional forwarders The following example obtains information about the conditional forwarders for a specified directory.

>>> await client.describe_conditional_forwarders(directory_id='d-92654abfed', remote_domain_names=['sales.example.com'])
Source code in docs_src/capo_directory_service/_services/async_directory_service.py
async def describe_conditional_forwarders(
    self,
    directory_id: "capo_directory_service.types.directory_id.DirectoryId",
    *,
    config_overrides: Optional[AsyncDirectoryServiceClientConfig] = None,
    remote_domain_names: Optional[
        "capo_directory_service.types.remote_domain_names.RemoteDomainNames"
    ] = None,
) -> "capo_directory_service.types.describe_conditional_forwarders_result.DescribeConditionalForwardersResult":
    """<p>Obtains information about the conditional forwarders for this account.</p> <p>If no input parameters are provided for RemoteDomainNames, this request describes all conditional forwarders for the specified directory ID.</p>

    Args:
        directory_id: <p>The directory ID for which to get the list of associated conditional forwarders.</p>
        remote_domain_names: <p>The fully qualified domain names (FQDN) of the remote domains for which to get the list of associated conditional forwarders. If this member is null, all conditional forwarders are returned.</p>

    Raises:
        capo_directory_service.errors.client_exception.ClientException: <p>A client exception has occurred.</p>
        capo_directory_service.errors.directory_unavailable_exception.DirectoryUnavailableException: <p>The specified directory is unavailable.</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 describe conditional forwarders
        The following example obtains information about the conditional forwarders for a specified directory.

        >>> await client.describe_conditional_forwarders(directory_id='d-92654abfed', remote_domain_names=['sales.example.com'])
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_directory_service.types.describe_conditional_forwarders_request.DescribeConditionalForwardersRequest]",
    ) -> AsyncOperationResponse[
        "capo_directory_service.types.describe_conditional_forwarders_result.DescribeConditionalForwardersResult"
    ]:
        import capo_directory_service._operations.directory_service_20150416.describe_conditional_forwarders

        (
            output,
            http_response,
        ) = await capo_directory_service._operations.directory_service_20150416.describe_conditional_forwarders.async_describe_conditional_forwarders(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeConditionalForwarders")
    )
    input_: capo_directory_service.types.describe_conditional_forwarders_request.DescribeConditionalForwardersRequest = {
        "directory_id": directory_id
    }
    if remote_domain_names is not None:
        input_["remote_domain_names"] = remote_domain_names

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