Class: Aws::S3::Plugins::ARN Private

Inherits:
Seahorse::Client::Plugin
  • Object
show all
Defined in:
lib/aws-sdk-s3/plugins/arn.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

When an accesspoint ARN is provided for :bucket in S3 operations, this plugin resolves the request endpoint from the ARN when possible.

Defined Under Namespace

Classes: ARNHandler, UrlHandler

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.resolve_arn!(member_value, region, use_arn_region) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


143
144
145
146
147
148
149
150
151
152
153
154
# File 'lib/aws-sdk-s3/plugins/arn.rb', line 143

def resolve_arn!(member_value, region, use_arn_region)
  if Aws::ARNParser.arn?(member_value)
    arn = Aws::ARNParser.parse(member_value)
    s3_arn = resolve_arn_type!(arn)
    s3_arn.validate_arn!
    validate_region_config!(s3_arn, region, use_arn_region)
    region = s3_arn.region if use_arn_region && !region.include?('fips')
    [region, s3_arn]
  else
    [region]
  end
end

.resolve_url!(url, arn, region, fips = false, dualstack = false, has_custom_endpoint = false) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


157
158
159
160
161
162
# File 'lib/aws-sdk-s3/plugins/arn.rb', line 157

def resolve_url!(url, arn, region, fips = false, dualstack = false, has_custom_endpoint = false)
  custom_endpoint = url.host if has_custom_endpoint
  url.host = arn.host_url(region, fips, dualstack, custom_endpoint)
  url.path = url_path(url.path, arn)
  url
end

Instance Method Details

#add_handlers(handlers, _config) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

param validator is validate:50 endpoint is build:90 (populates the URI for the first time) endpoint pattern is build:10


42
43
44
45
# File 'lib/aws-sdk-s3/plugins/arn.rb', line 42

def add_handlers(handlers, _config)
  handlers.add(ARNHandler, step: :validate, priority: 75)
  handlers.add(UrlHandler)
end