S3 / Client / list_buckets

list_buckets#

S3.Client.list_buckets(**kwargs)#

Returns a list of all buckets owned by the authenticated sender of the request.

See also: AWS API Documentation

Request Syntax

response = client.list_buckets(
    IBMServiceInstanceId='string'
)
Parameters:

IBMServiceInstanceId (string) – The owning storage account. All buckets owned by this storage account are returned.

Return type:

dict

Returns:

Response Syntax

{
    'Buckets': [
        {
            'Name': 'string',
            'CreationDate': datetime(2015, 1, 1),
            'CreationTemplateId': 'string',
            'LocationConstraint': 'au-syd-onerate_active'|'ca-tor-onerate_active'|'br-sao-onerate_active'|'jp-osa-onerate_active'|'jp-tok-onerate_active'|'us-standard'|'us-vault'|'us-cold'|'us-flex'|'us-east-standard'|'us-east-vault'|'us-east-cold'|'us-east-flex'|'us-east-onerate_active'|'us-south-standard'|'us-south-vault'|'us-south-cold'|'us-south-flex'|'us-south-onerate_active'|'eu-standard'|'eu-vault'|'eu-cold'|'eu-flex'|'eu-gb-standard'|'eu-gb-vault'|'eu-gb-cold'|'eu-gb-flex'|'eu-gb-onerate_active'|'eu-de-standard'|'eu-de-vault'|'eu-de-cold'|'eu-de-flex'|'eu-de-onerate_active'|'ap-standard'|'ap-vault'|'ap-cold'|'ap-flex'|'ams03-standard'|'ams03-vault'|'ams03-cold'|'ams03-flex'|'ams03-onerate_active'|'che01-standard'|'che01-vault'|'che01-cold'|'che01-flex'|'che01-onerate_active'|'mel01-standard'|'mel01-vault'|'mel01-cold'|'mel01-flex'|'mil01-onerate_active'|'mon01-onerate_active'|'osl01-standard'|'osl01-vault'|'osl01-cold'|'osl01-flex'|'par01-onerate_active'|'sao01-standard'|'sao01-vault'|'sao01-cold'|'sao01-flex'|'sjc04-onerate_active'|'sng01-onerate_active'|'tor01-standard'|'tor01-vault'|'tor01-cold'|'tor01-flex'
        },
    ],
    'Owner': {
        'DisplayName': 'string',
        'ID': 'string'
    }
}

Response Structure

  • (dict) –

    • Buckets (list) –

      The list of buckets owned by the requester.

      • (dict) –

        In terms of implementation, a Bucket is a resource.

        • Name (string) –

          The name of the bucket.

        • CreationDate (datetime) –

          Date the bucket was created. This date can change when making changes to your bucket, such as editing its bucket policy.

        • CreationTemplateId (string) – The template identifier applied at bucket creation. IBM COS returns this field only if a template was used.

        • LocationConstraint (string) – Specifies the region where the bucket will be created. If you don’t specify a region, the bucket will be created in US Standard.

    • Owner (dict) –

      The owner of the buckets listed.

      • DisplayName (string) –

        Container for the display name of the owner.

      • ID (string) –

        Container for the ID of the owner.