Skip to content

describe_constraint async

describe_constraint(
    id: Id,
    *,
    config_overrides: Optional[AsyncServiceCatalogClientConfig] = None,
    accept_language: Optional[AcceptLanguage] = None,
) -> DescribeConstraintOutput

Gets information about the specified constraint.

Parameters:

  • accept_language (Optional[AcceptLanguage], default: None ) –

    The language code.

    • jp - Japanese

    • zh - Chinese

  • id (Id) –

    The identifier of the constraint.

Raises:

Source code in docs_src/capo_service_catalog/_services/async_service_catalog.py
async def describe_constraint(
    self,
    id: "capo_service_catalog.types.id.Id",
    *,
    config_overrides: Optional[AsyncServiceCatalogClientConfig] = None,
    accept_language: Optional[
        "capo_service_catalog.types.accept_language.AcceptLanguage"
    ] = None,
) -> (
    "capo_service_catalog.types.describe_constraint_output.DescribeConstraintOutput"
):
    """<p>Gets information about the specified constraint.</p>

    Args:
        accept_language: <p>The language code.</p> <ul> <li> <p> <code>jp</code> - Japanese</p> </li> <li> <p> <code>zh</code> - Chinese</p> </li> </ul>
        id: <p>The identifier of the constraint.</p>

    Raises:
        capo_service_catalog.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
        capo_service_catalog.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_service_catalog.types.describe_constraint_input.DescribeConstraintInput]",
    ) -> AsyncOperationResponse[
        "capo_service_catalog.types.describe_constraint_output.DescribeConstraintOutput"
    ]:
        import capo_service_catalog._operations.aws242_service_catalog_service.describe_constraint

        (
            output,
            http_response,
        ) = await capo_service_catalog._operations.aws242_service_catalog_service.describe_constraint.async_describe_constraint(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeConstraint")
    )
    input_: capo_service_catalog.types.describe_constraint_input.DescribeConstraintInput = {
        "id": id
    }
    if accept_language is not None:
        input_["accept_language"] = accept_language

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