Skip to content

describe_protected_resource async

describe_protected_resource(
    resource_arn: ARN, *, config_overrides: Optional[AsyncBackupClientConfig] = None
) -> DescribeProtectedResourceOutput

Returns information about a saved resource, including the last time it was backed up, its Amazon Resource Name (ARN), and the Amazon Web Services service type of the saved resource.

Parameters:

  • resource_arn (ARN) –

    An Amazon Resource Name (ARN) that uniquely identifies a resource. The format of the ARN depends on the resource type.

Raises:

Source code in docs_src/capo_backup/_services/async_backup.py
async def describe_protected_resource(
    self,
    resource_arn: "capo_backup.types.arn.ARN",
    *,
    config_overrides: Optional[AsyncBackupClientConfig] = None,
) -> "capo_backup.types.describe_protected_resource_output.DescribeProtectedResourceOutput":
    """<p>Returns information about a saved resource, including the last time it was backed up, its Amazon Resource Name (ARN), and the Amazon Web Services service type of the saved resource.</p>

    Args:
        resource_arn: <p>An Amazon Resource Name (ARN) that uniquely identifies a resource. The format of the ARN depends on the resource type.</p>

    Raises:
        capo_backup.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
        capo_backup.errors.missing_parameter_value_exception.MissingParameterValueException: <p>Indicates that a required parameter is missing.</p>
        capo_backup.errors.resource_not_found_exception.ResourceNotFoundException: <p>A resource that is required for the action doesn't exist.</p>
        capo_backup.errors.service_unavailable_exception.ServiceUnavailableException: <p>The request failed due to a temporary failure of the server.</p>
        capo_backup.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_backup.types.describe_protected_resource_input.DescribeProtectedResourceInput]",
    ) -> AsyncOperationResponse[
        "capo_backup.types.describe_protected_resource_output.DescribeProtectedResourceOutput"
    ]:
        import capo_backup._operations.cryo_controller_user_manager.describe_protected_resource

        (
            output,
            http_response,
        ) = await capo_backup._operations.cryo_controller_user_manager.describe_protected_resource.async_describe_protected_resource(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeProtectedResource")
    )
    input_: capo_backup.types.describe_protected_resource_input.DescribeProtectedResourceInput = {
        "resource_arn": resource_arn
    }

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