class Aws::S3Control::OutpostBucketARN
@api private
Attributes
bucket_name[R]
outpost_id[R]
Public Class Methods
new(options)
click to toggle source
Calls superclass method
# File lib/aws-sdk-s3control/arn/outpost_bucket_arn.rb, line 7 def initialize(options) super(options) @type, @outpost_id, @subtype, @bucket_name, @extra = @resource.split(/[:,\/]/) end
Public Instance Methods
host_url(region, _dualstack = false, custom_endpoint = nil)
click to toggle source
Outpost Bucket ARNs currently do not support dualstack
# File lib/aws-sdk-s3control/arn/outpost_bucket_arn.rb, line 67 def host_url(region, _dualstack = false, custom_endpoint = nil) if custom_endpoint custom_endpoint else "s3-outposts.#{region}.amazonaws.com" end end
input_member()
click to toggle source
After expanding this ARN, this value will be used to repopulate input so that URIs do not contain ARNs
# File lib/aws-sdk-s3control/arn/outpost_bucket_arn.rb, line 17 def input_member bucket_name end
support_dualstack?()
click to toggle source
# File lib/aws-sdk-s3control/arn/outpost_bucket_arn.rb, line 21 def support_dualstack? false end
support_fips?()
click to toggle source
# File lib/aws-sdk-s3control/arn/outpost_bucket_arn.rb, line 25 def support_fips? false end
validate_arn!()
click to toggle source
# File lib/aws-sdk-s3control/arn/outpost_bucket_arn.rb, line 29 def validate_arn! unless @service == 's3-outposts' raise ArgumentError, 'Must provide a valid S3 outposts bucket 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 != 'outpost' && @subtype != 'bucket' raise ArgumentError, 'Invalid ARN, resource format is not correct' end if @outpost_id.nil? || @outpost_id.empty? raise ArgumentError, 'Missing ARN outpost id.' end if @bucket_name.nil? || @bucket_name.empty? raise ArgumentError, 'Missing ARN accesspoint name.' end if @extra raise ArgumentError, 'ARN outpost bucket must be a single value.' end unless Seahorse::Util.host_label?(@outpost_id) raise ArgumentError, "#{@outpost_id} is not a valid host label." end unless Seahorse::Util.host_label?(@bucket_name) raise ArgumentError, "#{@bucket_name} is not a valid host label." end end