Gets detailed information about the specified lifecycle policy.
Parameters:
-
policy_id
(PolicyId)
–
The identifier of the lifecycle policy.
Raises:
Source code in docs_src/capo_dlm/_services/async_dlm.py
| async def get_lifecycle_policy(
self,
policy_id: "capo_dlm.types.policy_id.PolicyId",
*,
config_overrides: Optional[AsyncDLMClientConfig] = None,
) -> "capo_dlm.types.get_lifecycle_policy_response.GetLifecyclePolicyResponse":
"""<p>Gets detailed information about the specified lifecycle policy.</p>
Args:
policy_id: <p>The identifier of the lifecycle policy.</p>
Raises:
capo_dlm.errors.internal_server_exception.InternalServerException: <p>The service failed in an unexpected way.</p>
capo_dlm.errors.limit_exceeded_exception.LimitExceededException: <p>The request failed because a limit was exceeded.</p>
capo_dlm.errors.resource_not_found_exception.ResourceNotFoundException: <p>A requested resource was not found.</p>
capo_dlm.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_dlm.types.get_lifecycle_policy_request.GetLifecyclePolicyRequest]",
) -> AsyncOperationResponse[
"capo_dlm.types.get_lifecycle_policy_response.GetLifecyclePolicyResponse"
]:
import capo_dlm._operations.dlm_20180112.get_lifecycle_policy
(
output,
http_response,
) = await capo_dlm._operations.dlm_20180112.get_lifecycle_policy.async_get_lifecycle_policy(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetLifecyclePolicy")
)
input_: capo_dlm.types.get_lifecycle_policy_request.GetLifecyclePolicyRequest = {
"policy_id": policy_id
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|