bucket_versioning#

State module for managing AWS S3 bucket versioning configuration.

async idem_aws.states.aws.s3.bucket_versioning.present(hub, ctx, name: str, resource_id: str = None, *, bucket: str, mfa_delete: str = 'Disabled', status: str = 'Enabled') Dict[str, Any][source]#

Creates a versioning configuration for an S3 bucket resource.

Parameters:
  • name (str) – An Idem name of the resource.

  • resource_id (str, Optional) – The name of the S3 bucket in Amazon Web Services. It must be equal to the bucket parameter.

  • bucket (str) – The name of the S3 bucket in Amazon Web Services.

  • mfa_delete (str, Optional) – The versioning state of the bucket. Defaults to “Disabled”.

  • status (str, Optional) – Specifies whether MFA delete is enabled in the bucket versioning configuration. Defaults to “Enabled”.

Request Syntax:
[idem_test_aws_s3_bucket_versioning]:
  aws.s3.bucket_versioning.present:
    - name: 'string'
    - bucket: 'string'
    - mfa_delete: 'string'
    - status: 'string'
Returns:

dict[str, Any]

Examples

idem_test_aws_s3_bucket_versioning:
  aws.s3.bucket_versioning.present:
    - name: value
    - bucket: value
    - mfa_delete: 'Enabled'
    - status: 'Enabled'
async idem_aws.states.aws.s3.bucket_versioning.absent(hub, ctx, name: str, resource_id: str = None) Dict[str, Any][source]#

Suspends a versioning configuration for an S3 bucket resource.

Parameters:
  • name (str) – An Idem name of the resource.

  • resource_id (str, Optional) – The name of the S3 bucket in Amazon Web Services. Idem automatically considers this resource being absent if this field is not specified.

Returns:

dict[str, Any]

Examples

idem_test_aws_s3_bucket_versioning:
  aws.s3.bucket_versioning.absent:
    - name: value
    - resource_id: value
async idem_aws.states.aws.s3.bucket_versioning.describe(hub, ctx) Dict[str, Dict[str, Any]][source]#

Describe the resource in a way that can be recreated/managed with the corresponding “present” function.

Gets the versioning configuration for each S3 bucket under the given AWS account.

Returns:

dict[str, dict[str, Any]]

Examples

$ idem describe aws.s3.bucket_versioning