Method: Aws::Lightsail::Client#get_buckets

Defined in:
lib/aws-sdk-lightsail/client.rb

#get_buckets(params = {}) ⇒ Types::GetBucketsResult

Returns information about one or more Amazon Lightsail buckets. The information returned includes the synchronization status of the Amazon Simple Storage Service (Amazon S3) account-level block public access feature for your Lightsail buckets.

For more information about buckets, see [Buckets in Amazon Lightsail] in the *Amazon Lightsail Developer Guide*.

[1]: lightsail.aws.amazon.com/ls/docs/en_us/articles/buckets-in-amazon-lightsail

Examples:

Request syntax with placeholder values


resp = client.get_buckets({
  bucket_name: "BucketName",
  page_token: "string",
  include_connected_resources: false,
})

Response structure


resp.buckets #=> Array
resp.buckets[0].resource_type #=> String
resp.buckets[0].access_rules.get_object #=> String, one of "public", "private"
resp.buckets[0].access_rules.allow_public_overrides #=> Boolean
resp.buckets[0].arn #=> String
resp.buckets[0].bundle_id #=> String
resp.buckets[0].created_at #=> Time
resp.buckets[0].url #=> String
resp.buckets[0].location.availability_zone #=> String
resp.buckets[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2", "eu-north-1"
resp.buckets[0].name #=> String
resp.buckets[0].support_code #=> String
resp.buckets[0].tags #=> Array
resp.buckets[0].tags[0].key #=> String
resp.buckets[0].tags[0].value #=> String
resp.buckets[0].object_versioning #=> String
resp.buckets[0].able_to_update_bundle #=> Boolean
resp.buckets[0].readonly_access_accounts #=> Array
resp.buckets[0].readonly_access_accounts[0] #=> String
resp.buckets[0].resources_receiving_access #=> Array
resp.buckets[0].resources_receiving_access[0].name #=> String
resp.buckets[0].resources_receiving_access[0].resource_type #=> String
resp.buckets[0].state.code #=> String
resp.buckets[0].state.message #=> String
resp.buckets[0].access_log_config.enabled #=> Boolean
resp.buckets[0].access_log_config.destination #=> String
resp.buckets[0].access_log_config.prefix #=> String
resp.next_page_token #=> String
resp..status #=> String, one of "InSync", "Failed", "NeverSynced", "Defaulted"
resp..last_synced_at #=> Time
resp..message #=> String, one of "DEFAULTED_FOR_SLR_MISSING", "SYNC_ON_HOLD", "DEFAULTED_FOR_SLR_MISSING_ON_HOLD", "Unknown"
resp..bpa_impacts_lightsail #=> Boolean

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :bucket_name (String)

    The name of the bucket for which to return information.

    When omitted, the response includes all of your buckets in the Amazon Web Services Region where the request is made.

  • :page_token (String)

    The token to advance to the next page of results from your request.

    To get a page token, perform an initial ‘GetBuckets` request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.

  • :include_connected_resources (Boolean)

    A Boolean value that indicates whether to include Lightsail instances that were given access to the bucket using the

    SetResourceAccessForBucket][1

    action.

    [1]: docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_SetResourceAccessForBucket.html

Returns:

See Also:



5936
5937
5938
5939
# File 'lib/aws-sdk-lightsail/client.rb', line 5936

def get_buckets(params = {}, options = {})
  req = build_request(:get_buckets, params)
  req.send_request(options)
end