Amazon Simple Storage Service

2019/10/31 - Amazon Simple Storage Service - 3 updated api methods

Changes  Update s3 client to latest version

GetBucketInventoryConfiguration (updated) Link ¶
Changes (response)
{'InventoryConfiguration': {'OptionalFields': {'IntelligentTieringAccessTier'}}}

Returns an inventory configuration (identified by the inventory ID) from the bucket.

See also: AWS API Documentation

Request Syntax

client.get_bucket_inventory_configuration(
    Bucket='string',
    Id='string'
)
type Bucket:

string

param Bucket:

[REQUIRED]

The name of the bucket containing the inventory configuration to retrieve.

type Id:

string

param Id:

[REQUIRED]

The ID used to identify the inventory configuration.

rtype:

dict

returns:

Response Syntax

{
    'InventoryConfiguration': {
        'Destination': {
            'S3BucketDestination': {
                'AccountId': 'string',
                'Bucket': 'string',
                'Format': 'CSV'|'ORC'|'Parquet',
                'Prefix': 'string',
                'Encryption': {
                    'SSES3': {},
                    'SSEKMS': {
                        'KeyId': 'string'
                    }
                }
            }
        },
        'IsEnabled': True|False,
        'Filter': {
            'Prefix': 'string'
        },
        'Id': 'string',
        'IncludedObjectVersions': 'All'|'Current',
        'OptionalFields': [
            'Size'|'LastModifiedDate'|'StorageClass'|'ETag'|'IsMultipartUploaded'|'ReplicationStatus'|'EncryptionStatus'|'ObjectLockRetainUntilDate'|'ObjectLockMode'|'ObjectLockLegalHoldStatus'|'IntelligentTieringAccessTier',
        ],
        'Schedule': {
            'Frequency': 'Daily'|'Weekly'
        }
    }
}

Response Structure

  • (dict) --

    • InventoryConfiguration (dict) --

      Specifies the inventory configuration.

      • Destination (dict) --

        Contains information about where to publish the inventory results.

        • S3BucketDestination (dict) --

          Contains the bucket name, file format, bucket owner (optional), and prefix (optional) where inventory results are published.

          • AccountId (string) --

            The ID of the account that owns the destination bucket.

          • Bucket (string) --

            The Amazon resource name (ARN) of the bucket where inventory results will be published.

          • Format (string) --

            Specifies the output format of the inventory results.

          • Prefix (string) --

            The prefix that is prepended to all inventory results.

          • Encryption (dict) --

            Contains the type of server-side encryption used to encrypt the inventory results.

            • SSES3 (dict) --

              Specifies the use of SSE-S3 to encrypt delivered Inventory reports.

            • SSEKMS (dict) --

              Specifies the use of SSE-KMS to encrypt delivered Inventory reports.

              • KeyId (string) --

                Specifies the ID of the AWS Key Management Service (KMS) master encryption key to use for encrypting Inventory reports.

      • IsEnabled (boolean) --

        Specifies whether the inventory is enabled or disabled. If set to True, an inventory list is generated. If set to False, no inventory list is generated.

      • Filter (dict) --

        Specifies an inventory filter. The inventory only includes objects that meet the filter's criteria.

        • Prefix (string) --

          The prefix that an object must have to be included in the inventory results.

      • Id (string) --

        The ID used to identify the inventory configuration.

      • IncludedObjectVersions (string) --

        Object versions to include in the inventory list. If set to All, the list includes all the object versions, which adds the version-related fields VersionId, IsLatest, and DeleteMarker to the list. If set to Current, the list does not contain these version-related fields.

      • OptionalFields (list) --

        Contains the optional fields that are included in the inventory results.

        • (string) --

      • Schedule (dict) --

        Specifies the schedule for generating inventory results.

        • Frequency (string) --

          Specifies how frequently inventory results are produced.

ListBucketInventoryConfigurations (updated) Link ¶
Changes (response)
{'InventoryConfigurationList': {'OptionalFields': {'IntelligentTieringAccessTier'}}}

Returns a list of inventory configurations for the bucket.

See also: AWS API Documentation

Request Syntax

client.list_bucket_inventory_configurations(
    Bucket='string',
    ContinuationToken='string'
)
type Bucket:

string

param Bucket:

[REQUIRED]

The name of the bucket containing the inventory configurations to retrieve.

type ContinuationToken:

string

param ContinuationToken:

The marker used to continue an inventory configuration listing that has been truncated. Use the NextContinuationToken from a previously truncated list response to continue the listing. The continuation token is an opaque value that Amazon S3 understands.

rtype:

dict

returns:

Response Syntax

{
    'ContinuationToken': 'string',
    'InventoryConfigurationList': [
        {
            'Destination': {
                'S3BucketDestination': {
                    'AccountId': 'string',
                    'Bucket': 'string',
                    'Format': 'CSV'|'ORC'|'Parquet',
                    'Prefix': 'string',
                    'Encryption': {
                        'SSES3': {},
                        'SSEKMS': {
                            'KeyId': 'string'
                        }
                    }
                }
            },
            'IsEnabled': True|False,
            'Filter': {
                'Prefix': 'string'
            },
            'Id': 'string',
            'IncludedObjectVersions': 'All'|'Current',
            'OptionalFields': [
                'Size'|'LastModifiedDate'|'StorageClass'|'ETag'|'IsMultipartUploaded'|'ReplicationStatus'|'EncryptionStatus'|'ObjectLockRetainUntilDate'|'ObjectLockMode'|'ObjectLockLegalHoldStatus'|'IntelligentTieringAccessTier',
            ],
            'Schedule': {
                'Frequency': 'Daily'|'Weekly'
            }
        },
    ],
    'IsTruncated': True|False,
    'NextContinuationToken': 'string'
}

Response Structure

  • (dict) --

    • ContinuationToken (string) --

      If sent in the request, the marker that is used as a starting point for this inventory configuration list response.

    • InventoryConfigurationList (list) --

      The list of inventory configurations for a bucket.

      • (dict) --

        Specifies the inventory configuration for an Amazon S3 bucket. For more information, see GET Bucket inventory in the Amazon Simple Storage Service API Reference.

        • Destination (dict) --

          Contains information about where to publish the inventory results.

          • S3BucketDestination (dict) --

            Contains the bucket name, file format, bucket owner (optional), and prefix (optional) where inventory results are published.

            • AccountId (string) --

              The ID of the account that owns the destination bucket.

            • Bucket (string) --

              The Amazon resource name (ARN) of the bucket where inventory results will be published.

            • Format (string) --

              Specifies the output format of the inventory results.

            • Prefix (string) --

              The prefix that is prepended to all inventory results.

            • Encryption (dict) --

              Contains the type of server-side encryption used to encrypt the inventory results.

              • SSES3 (dict) --

                Specifies the use of SSE-S3 to encrypt delivered Inventory reports.

              • SSEKMS (dict) --

                Specifies the use of SSE-KMS to encrypt delivered Inventory reports.

                • KeyId (string) --

                  Specifies the ID of the AWS Key Management Service (KMS) master encryption key to use for encrypting Inventory reports.

        • IsEnabled (boolean) --

          Specifies whether the inventory is enabled or disabled. If set to True, an inventory list is generated. If set to False, no inventory list is generated.

        • Filter (dict) --

          Specifies an inventory filter. The inventory only includes objects that meet the filter's criteria.

          • Prefix (string) --

            The prefix that an object must have to be included in the inventory results.

        • Id (string) --

          The ID used to identify the inventory configuration.

        • IncludedObjectVersions (string) --

          Object versions to include in the inventory list. If set to All, the list includes all the object versions, which adds the version-related fields VersionId, IsLatest, and DeleteMarker to the list. If set to Current, the list does not contain these version-related fields.

        • OptionalFields (list) --

          Contains the optional fields that are included in the inventory results.

          • (string) --

        • Schedule (dict) --

          Specifies the schedule for generating inventory results.

          • Frequency (string) --

            Specifies how frequently inventory results are produced.

    • IsTruncated (boolean) --

      Indicates whether the returned list of inventory configurations is truncated in this response. A value of true indicates that the list is truncated.

    • NextContinuationToken (string) --

      The marker used to continue this inventory configuration listing. Use the NextContinuationToken from this response to continue the listing in a subsequent request. The continuation token is an opaque value that Amazon S3 understands.

PutBucketInventoryConfiguration (updated) Link ¶
Changes (request)
{'InventoryConfiguration': {'OptionalFields': {'IntelligentTieringAccessTier'}}}

Adds an inventory configuration (identified by the inventory ID) from the bucket.

See also: AWS API Documentation

Request Syntax

client.put_bucket_inventory_configuration(
    Bucket='string',
    Id='string',
    InventoryConfiguration={
        'Destination': {
            'S3BucketDestination': {
                'AccountId': 'string',
                'Bucket': 'string',
                'Format': 'CSV'|'ORC'|'Parquet',
                'Prefix': 'string',
                'Encryption': {
                    'SSES3': {}
                    ,
                    'SSEKMS': {
                        'KeyId': 'string'
                    }
                }
            }
        },
        'IsEnabled': True|False,
        'Filter': {
            'Prefix': 'string'
        },
        'Id': 'string',
        'IncludedObjectVersions': 'All'|'Current',
        'OptionalFields': [
            'Size'|'LastModifiedDate'|'StorageClass'|'ETag'|'IsMultipartUploaded'|'ReplicationStatus'|'EncryptionStatus'|'ObjectLockRetainUntilDate'|'ObjectLockMode'|'ObjectLockLegalHoldStatus'|'IntelligentTieringAccessTier',
        ],
        'Schedule': {
            'Frequency': 'Daily'|'Weekly'
        }
    }
)
type Bucket:

string

param Bucket:

[REQUIRED]

The name of the bucket where the inventory configuration will be stored.

type Id:

string

param Id:

[REQUIRED]

The ID used to identify the inventory configuration.

type InventoryConfiguration:

dict

param InventoryConfiguration:

[REQUIRED]

Specifies the inventory configuration.

  • Destination (dict) -- [REQUIRED]

    Contains information about where to publish the inventory results.

    • S3BucketDestination (dict) -- [REQUIRED]

      Contains the bucket name, file format, bucket owner (optional), and prefix (optional) where inventory results are published.

      • AccountId (string) --

        The ID of the account that owns the destination bucket.

      • Bucket (string) -- [REQUIRED]

        The Amazon resource name (ARN) of the bucket where inventory results will be published.

      • Format (string) -- [REQUIRED]

        Specifies the output format of the inventory results.

      • Prefix (string) --

        The prefix that is prepended to all inventory results.

      • Encryption (dict) --

        Contains the type of server-side encryption used to encrypt the inventory results.

        • SSES3 (dict) --

          Specifies the use of SSE-S3 to encrypt delivered Inventory reports.

        • SSEKMS (dict) --

          Specifies the use of SSE-KMS to encrypt delivered Inventory reports.

          • KeyId (string) -- [REQUIRED]

            Specifies the ID of the AWS Key Management Service (KMS) master encryption key to use for encrypting Inventory reports.

  • IsEnabled (boolean) -- [REQUIRED]

    Specifies whether the inventory is enabled or disabled. If set to True, an inventory list is generated. If set to False, no inventory list is generated.

  • Filter (dict) --

    Specifies an inventory filter. The inventory only includes objects that meet the filter's criteria.

    • Prefix (string) -- [REQUIRED]

      The prefix that an object must have to be included in the inventory results.

  • Id (string) -- [REQUIRED]

    The ID used to identify the inventory configuration.

  • IncludedObjectVersions (string) -- [REQUIRED]

    Object versions to include in the inventory list. If set to All, the list includes all the object versions, which adds the version-related fields VersionId, IsLatest, and DeleteMarker to the list. If set to Current, the list does not contain these version-related fields.

  • OptionalFields (list) --

    Contains the optional fields that are included in the inventory results.

    • (string) --

  • Schedule (dict) -- [REQUIRED]

    Specifies the schedule for generating inventory results.

    • Frequency (string) -- [REQUIRED]

      Specifies how frequently inventory results are produced.

returns:

None