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/backup.py
| def describe_protected_resource(
self,
resource_arn: "capo_backup.types.arn.ARN",
*,
config_overrides: Optional[BackupClientConfig] = 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.
"""
def _handler(
req: "OperationRequest[capo_backup.types.describe_protected_resource_input.DescribeProtectedResourceInput]",
) -> OperationResponse[
"capo_backup.types.describe_protected_resource_output.DescribeProtectedResourceOutput"
]:
import capo_backup._operations.cryo_controller_user_manager.describe_protected_resource
output, http_response = (
capo_backup._operations.cryo_controller_user_manager.describe_protected_resource.describe_protected_resource(
req.options, req.input
)
)
return OperationResponse(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 = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|