Skip to content

describe_lifecycle_configuration

describe_lifecycle_configuration(
    file_system_id: FileSystemId, *, config_overrides: Optional[EFSClientConfig] = None
) -> LifecycleConfigurationDescription

Returns the current LifecycleConfiguration object for the specified EFS file system. Lifecycle management uses the LifecycleConfiguration object to identify when to move files between storage classes. For a file system without a LifecycleConfiguration object, the call returns an empty array in the response.

This operation requires permissions for the elasticfilesystem:DescribeLifecycleConfiguration operation.

Parameters:

  • file_system_id (FileSystemId) –

    The ID of the file system whose LifecycleConfiguration object you want to retrieve (String).

Raises:

  • BadRequest –

    Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.

  • FileSystemNotFound –

    Returned if the specified FileSystemId value doesn't exist in the requester's Amazon Web Services account.

  • InternalServerError –

    Returned if an error occurred on the server side.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Examples:

To describe the lifecycle configuration for a file system This operation describes a file system's LifecycleConfiguration. EFS lifecycle management uses the LifecycleConfiguration object to identify which files to move to the EFS Infrequent Access (IA) storage class.

>>> client.describe_lifecycle_configuration(file_system_id='fs-01234567')
Source code in docs_src/capo_efs/_services/efs.py
def describe_lifecycle_configuration(
    self,
    file_system_id: "capo_efs.types.file_system_id.FileSystemId",
    *,
    config_overrides: Optional[EFSClientConfig] = None,
) -> "capo_efs.types.lifecycle_configuration_description.LifecycleConfigurationDescription":
    """<p>Returns the current <code>LifecycleConfiguration</code> object for the specified EFS file system. Lifecycle management uses the <code>LifecycleConfiguration</code> object to identify when to move files between storage classes. For a file system without a <code>LifecycleConfiguration</code> object, the call returns an empty array in the response.</p> <p>This operation requires permissions for the <code>elasticfilesystem:DescribeLifecycleConfiguration</code> operation.</p>

    Args:
        file_system_id: <p>The ID of the file system whose <code>LifecycleConfiguration</code> object you want to retrieve (String).</p>

    Raises:
        capo_efs.errors.bad_request.BadRequest: <p>Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.</p>
        capo_efs.errors.file_system_not_found.FileSystemNotFound: <p>Returned if the specified <code>FileSystemId</code> value doesn't exist in the requester's Amazon Web Services account.</p>
        capo_efs.errors.internal_server_error.InternalServerError: <p>Returned if an error occurred on the server side.</p>
        capo_efs.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To describe the lifecycle configuration for a file system
        This operation describes a file system's LifecycleConfiguration. EFS lifecycle management uses the LifecycleConfiguration object to identify which files to move to the EFS Infrequent Access (IA) storage class.

        >>> client.describe_lifecycle_configuration(file_system_id='fs-01234567')
    """

    def _handler(
        req: "OperationRequest[capo_efs.types.describe_lifecycle_configuration_request.DescribeLifecycleConfigurationRequest]",
    ) -> OperationResponse[
        "capo_efs.types.lifecycle_configuration_description.LifecycleConfigurationDescription"
    ]:
        import capo_efs._operations.magnolio_api_service_v20150201.describe_lifecycle_configuration

        output, http_response = (
            capo_efs._operations.magnolio_api_service_v20150201.describe_lifecycle_configuration.describe_lifecycle_configuration(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeLifecycleConfiguration")
    )
    input_: capo_efs.types.describe_lifecycle_configuration_request.DescribeLifecycleConfigurationRequest = {
        "file_system_id": file_system_id
    }

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