Skip to content

describe_view

describe_view(
    instance_id: ViewsInstanceId,
    view_id: ViewId,
    *,
    config_overrides: Optional[ConnectClientConfig] = None,
) -> DescribeViewResponse

Retrieves the view for the specified Connect Customer instance and view identifier.

The view identifier can be supplied as a ViewId or ARN.

$SAVED needs to be supplied if a view is unpublished.

The view identifier can contain an optional qualifier, for example, :$SAVED, which is either an actual version number or an Connect Customer managed qualifier $SAVED | $LATEST. If it is not supplied, then $LATEST is assumed for customer managed views and an error is returned if there is no published content available. Version 1 is assumed for Amazon Web Services managed views.

Parameters:

  • instance_id (ViewsInstanceId) –

    The identifier of the Connect Customer instance. You can find the instanceId in the ARN of the instance.

  • view_id (ViewId) –

    The ViewId of the view. This must be an ARN for Amazon Web Services managed views.

Raises:

Source code in docs_src/capo_connect/_services/connect.py
def describe_view(
    self,
    instance_id: "capo_connect.types.views_instance_id.ViewsInstanceId",
    view_id: "capo_connect.types.view_id.ViewId",
    *,
    config_overrides: Optional[ConnectClientConfig] = None,
) -> "capo_connect.types.describe_view_response.DescribeViewResponse":
    """<p>Retrieves the view for the specified Connect Customer instance and view identifier.</p> <p>The view identifier can be supplied as a ViewId or ARN.</p> <p> <code>$SAVED</code> needs to be supplied if a view is unpublished.</p> <p>The view identifier can contain an optional qualifier, for example, <code><view-id>:$SAVED</code>, which is either an actual version number or an Connect Customer managed qualifier <code>$SAVED | $LATEST</code>. If it is not supplied, then <code>$LATEST</code> is assumed for customer managed views and an error is returned if there is no published content available. Version 1 is assumed for Amazon Web Services managed views.</p>

    Args:
        instance_id: <p>The identifier of the Connect Customer instance. You can find the instanceId in the ARN of the instance.</p>
        view_id: <p>The ViewId of the view. This must be an ARN for Amazon Web Services managed views.</p>

    Raises:
        capo_connect.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this action.</p>
        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_parameter_exception.InvalidParameterException: <p>One or more of the specified parameters are not valid.</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.too_many_requests_exception.TooManyRequestsException: <p>Displayed when rate-related API limits are exceeded.</p>
        capo_connect.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_connect.types.describe_view_request.DescribeViewRequest]",
    ) -> OperationResponse[
        "capo_connect.types.describe_view_response.DescribeViewResponse"
    ]:
        import capo_connect._operations.amazon_connect_service.describe_view

        output, http_response = (
            capo_connect._operations.amazon_connect_service.describe_view.describe_view(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

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

        return capo_connect.types.describe_view_response.redact_sensitive(output)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("DescribeView", redact_output=_redact_output),
    )
    input_: capo_connect.types.describe_view_request.DescribeViewRequest = {
        "instance_id": instance_id,
        "view_id": view_id,
    }

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