MediaStore / Client / put_lifecycle_policy

put_lifecycle_policy#

MediaStore.Client.put_lifecycle_policy(**kwargs)#

Writes an object lifecycle policy to a container. If the container already has an object lifecycle policy, the service replaces the existing policy with the new policy. It takes up to 20 minutes for the change to take effect.

For information about how to construct an object lifecycle policy, see Components of an Object Lifecycle Policy.

See also: AWS API Documentation

Request Syntax

response = client.put_lifecycle_policy(
    ContainerName='string',
    LifecyclePolicy='string'
)
Parameters:
  • ContainerName (string) –

    [REQUIRED]

    The name of the container that you want to assign the object lifecycle policy to.

  • LifecyclePolicy (string) –

    [REQUIRED]

    The object lifecycle policy to apply to the container.

Return type:

dict

Returns:

Response Syntax

{}

Response Structure

  • (dict) –

Exceptions

  • MediaStore.Client.exceptions.ContainerInUseException

  • MediaStore.Client.exceptions.ContainerNotFoundException

  • MediaStore.Client.exceptions.InternalServerError