Skip to content

get_lifecycle_policy

get_lifecycle_policy(
    policy_id: PolicyId, *, config_overrides: Optional[DLMClientConfig] = None
) -> GetLifecyclePolicyResponse

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/dlm.py
def get_lifecycle_policy(
    self,
    policy_id: "capo_dlm.types.policy_id.PolicyId",
    *,
    config_overrides: Optional[DLMClientConfig] = 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.
    """

    def _handler(
        req: "OperationRequest[capo_dlm.types.get_lifecycle_policy_request.GetLifecyclePolicyRequest]",
    ) -> OperationResponse[
        "capo_dlm.types.get_lifecycle_policy_response.GetLifecyclePolicyResponse"
    ]:
        import capo_dlm._operations.dlm_20180112.get_lifecycle_policy

        output, http_response = (
            capo_dlm._operations.dlm_20180112.get_lifecycle_policy.get_lifecycle_policy(
                req.options, req.input
            )
        )
        return OperationResponse(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 = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output