bucket_encryption#

State module for managing AWS S3 bucket encryption.

async idem_aws.states.aws.s3.bucket_encryption.present(hub, ctx, name: str, resource_id: Optional[str] = None, *, bucket: str, server_side_encryption_configuration: ServerSideEncryptionConfiguration, timeout: Optional[Timeout] = None) Dict[str, Any][source]#

Creates an encryption 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.

  • server_side_encryption_configuration (dict) – The server-side-encryption configuration for the S3 bucket.

  • timeout (dict, Optional) –

    Timeout configuration for S3 bucket encryption configuration.

    • update (str):

      Timeout configuration for updating the S3 bucket encryption configuration.

      • delay (int, Optional):

        The amount of time in seconds to wait between attempts. Defaults to 4 seconds.

      • max_attempts (int, Optional):

        Maximum attempts of waiting for the update. Defaults to 30 attempts.

Request Syntax:
[idem_test_aws_s3_bucket_encryption]:
  aws.s3.bucket_encryption.present:
    - name: 'string'
    - bucket: 'string'
    - server_side_encryption_configuration: {'string': []}
Returns:

dict[str, Any]

Examples

idem_test_aws_s3_bucket_encryption:
  aws.s3.bucket_encryption.present:
    - name: value
    - bucket: value
    - server_side_encryption_configuration:
        Rules:
        - ApplyServerSideEncryptionByDefault:
            SSEAlgorithm: 'AES256'
            KMSMasterKeyID: 'string'
          BucketKeyEnabled: True
async idem_aws.states.aws.s3.bucket_encryption.absent(hub, ctx, name: str, resource_id: Optional[str] = None, timeout: Optional[Dict] = None) Dict[str, Any][source]#

Deletes an encryption configuration from 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.

  • timeout (dict, Optional) –

    Timeout configuration for S3 bucket encryption configuration.

    • delete (str):

      Timeout configuration for deleting the S3 bucket encryption configuration.

      • delay (int, Optional):

        The amount of time in seconds to wait between attempts. Defaults to 4 seconds.

      • max_attempts (int, Optional):

        Maximum attempts of waiting for the deletion. Defaults to 30 attempts.

Returns:

dict[str, Any]

Examples

idem_test_aws_s3_bucket_encryption:
  aws.s3.bucket_encryption.absent:
    - name: value
    - resource_id: value
async idem_aws.states.aws.s3.bucket_encryption.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 encryption configuration for each S3 bucket under the given AWS account.

Returns:

dict[str, dict[str, Any]]

Examples

$ idem describe aws.s3.bucket_encryption