Skip to content

describe_instance async

describe_instance(
    instance_id: InstanceId,
    *,
    config_overrides: Optional[AsyncConnectClientConfig] = None,
) -> DescribeInstanceResponse

This API is in preview release for Connect Customer and is subject to change.

Returns the current state of the specified instance identifier. It tracks the instance while it is being created and returns an error status, if applicable.

If an instance is not created successfully, the instance status reason field returns details relevant to the reason. The instance in a failed state is returned only for 24 hours after the CreateInstance API was invoked.

Parameters:

  • instance_id (InstanceId) –

    The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

Raises:

Source code in docs_src/capo_connect/_services/async_connect.py
async def describe_instance(
    self,
    instance_id: "capo_connect.types.instance_id.InstanceId",
    *,
    config_overrides: Optional[AsyncConnectClientConfig] = None,
) -> "capo_connect.types.describe_instance_response.DescribeInstanceResponse":
    """<p>This API is in preview release for Connect Customer and is subject to change.</p> <p>Returns the current state of the specified instance identifier. It tracks the instance while it is being created and returns an error status, if applicable. </p> <p>If an instance is not created successfully, the instance status reason field returns details relevant to the reason. The instance in a failed state is returned only for 24 hours after the CreateInstance API was invoked.</p>

    Args:
        instance_id: <p>The identifier of the Connect Customer instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>

    Raises:
        capo_connect.errors.internal_service_exception.InternalServiceException: <p>Request processing failed because of an error or failure with the service.</p>
        capo_connect.errors.invalid_request_exception.InvalidRequestException: <p>The request is not valid.</p>
        capo_connect.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
        capo_connect.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_connect.types.describe_instance_request.DescribeInstanceRequest]",
    ) -> AsyncOperationResponse[
        "capo_connect.types.describe_instance_response.DescribeInstanceResponse"
    ]:
        import capo_connect._operations.amazon_connect_service.describe_instance

        (
            output,
            http_response,
        ) = await capo_connect._operations.amazon_connect_service.describe_instance.async_describe_instance(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_connect.types.describe_instance_response.DescribeInstanceResponse",
    ) -> dict[str, Any]:
        import capo_connect.types.describe_instance_response

        return capo_connect.types.describe_instance_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("DescribeInstance", redact_output=_redact_output),
    )
    input_: capo_connect.types.describe_instance_request.DescribeInstanceRequest = {
        "instance_id": instance_id
    }

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