Skip to content

describe_domain async

describe_domain(
    domain: DomainName,
    *,
    config_overrides: Optional[AsynccodeartifactClientConfig] = None,
    domain_owner: Optional[AccountId] = None,
) -> DescribeDomainResult

Returns a DomainDescription object that contains information about the requested domain.

Parameters:

  • domain (DomainName) –

    A string that specifies the name of the requested domain.

  • domain_owner (Optional[AccountId], default: None ) –

    The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.

Raises:

  • AccessDeniedException –

    The operation did not succeed because of an unauthorized access attempt.

  • InternalServerException –

    The operation did not succeed because of an error that occurred inside CodeArtifact.

  • ResourceNotFoundException –

    The operation did not succeed because the resource requested is not found in the service.

  • ThrottlingException –

    The operation did not succeed because too many requests are sent to the service.

  • ValidationException –

    The operation did not succeed because a parameter in the request was sent with an invalid value.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_codeartifact/_services/async_codeartifact.py
async def describe_domain(
    self,
    domain: "capo_codeartifact.types.domain_name.DomainName",
    *,
    config_overrides: Optional[AsynccodeartifactClientConfig] = None,
    domain_owner: Optional["capo_codeartifact.types.account_id.AccountId"] = None,
) -> "capo_codeartifact.types.describe_domain_result.DescribeDomainResult":
    """<p> Returns a <a href="https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_DomainDescription.html">DomainDescription</a> object that contains information about the requested domain. </p>

    Args:
        domain: <p> A string that specifies the name of the requested domain. </p>
        domain_owner: <p> The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. </p>

    Raises:
        capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
        capo_codeartifact.errors.internal_server_exception.InternalServerException: <p> The operation did not succeed because of an error that occurred inside CodeArtifact. </p>
        capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
        capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
        capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
        capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_codeartifact.types.describe_domain_request.DescribeDomainRequest]",
    ) -> AsyncOperationResponse[
        "capo_codeartifact.types.describe_domain_result.DescribeDomainResult"
    ]:
        import capo_codeartifact._operations.code_artifact_control_plane_service.describe_domain

        (
            output,
            http_response,
        ) = await capo_codeartifact._operations.code_artifact_control_plane_service.describe_domain.async_describe_domain(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeDomain")
    )
    input_: capo_codeartifact.types.describe_domain_request.DescribeDomainRequest = {
        "domain": domain
    }
    if domain_owner is not None:
        input_["domain_owner"] = domain_owner

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