Class: Aws::S3::AccessPointARN Private
- Inherits:
-
ARN
- Object
- ARN
- Aws::S3::AccessPointARN
- Defined in:
- lib/aws-sdk-s3/arn/access_point_arn.rb
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.
Instance Attribute Summary collapse
- #access_point_name ⇒ Object readonly private
Instance Method Summary collapse
- #host_url(region, dualstack = false, custom_endpoint = nil) ⇒ Object private
-
#initialize(options) ⇒ AccessPointARN
constructor
private
A new instance of AccessPointARN.
- #support_dualstack? ⇒ Boolean private
- #support_fips? ⇒ Boolean private
- #validate_arn! ⇒ Object private
Constructor Details
#initialize(options) ⇒ AccessPointARN
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.
Returns a new instance of AccessPointARN.
7 8 9 10 |
# File 'lib/aws-sdk-s3/arn/access_point_arn.rb', line 7 def initialize() super() @type, @access_point_name, @extra = @resource.split(/[:,\/]/) end |
Instance Attribute Details
#access_point_name ⇒ Object (readonly)
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.
12 13 14 |
# File 'lib/aws-sdk-s3/arn/access_point_arn.rb', line 12 def access_point_name @access_point_name end |
Instance Method Details
#host_url(region, dualstack = false, custom_endpoint = nil) ⇒ 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.
55 56 57 58 59 60 61 62 63 |
# File 'lib/aws-sdk-s3/arn/access_point_arn.rb', line 55 def host_url(region, dualstack = false, custom_endpoint = nil) pfx = "#{@access_point_name}-#{@account_id}" if custom_endpoint "#{pfx}.#{custom_endpoint}" else sfx = Aws::Partitions::EndpointProvider.dns_suffix_for(region) "#{pfx}.s3-accesspoint#{'.dualstack' if dualstack}.#{region}.#{sfx}" end end |
#support_dualstack? ⇒ Boolean
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.
14 15 16 |
# File 'lib/aws-sdk-s3/arn/access_point_arn.rb', line 14 def support_dualstack? true end |
#support_fips? ⇒ Boolean
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.
18 19 20 |
# File 'lib/aws-sdk-s3/arn/access_point_arn.rb', line 18 def support_fips? true end |
#validate_arn! ⇒ 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.
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/aws-sdk-s3/arn/access_point_arn.rb', line 22 def validate_arn! unless @service == 's3' raise ArgumentError, 'Must provide a valid S3 accesspoint ARN.' end if @region.empty? || @account_id.empty? raise ArgumentError, 'S3 accesspoint ARNs must contain both a region '\ 'and an account id.' end if @type != 'accesspoint' raise ArgumentError, 'Invalid ARN, resource format is not correct' end if @access_point_name.nil? || @access_point_name.empty? raise ArgumentError, 'Missing ARN accesspoint name.' end if @extra raise ArgumentError, 'ARN accesspoint resource must be a single value.' end unless Seahorse::Util.host_label?( "#{@access_point_name}-#{@account_id}" ) raise ArgumentError, "#{@access_point_name}-#{@account_id} is not a valid "\ 'host label.' end end |