fog-aws 3.19.0 → 3.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +26 -1231
- data/README.md +1 -1
- data/fog-aws.gemspec +7 -4
- data/lib/fog/aws/auto_scaling.rb +1 -1
- data/lib/fog/aws/beanstalk.rb +1 -1
- data/lib/fog/aws/cdn.rb +1 -1
- data/lib/fog/aws/cloud_formation.rb +1 -1
- data/lib/fog/aws/cloud_watch.rb +1 -1
- data/lib/fog/aws/compute.rb +1 -1
- data/lib/fog/aws/credential_fetcher.rb +16 -2
- data/lib/fog/aws/data_pipeline.rb +1 -1
- data/lib/fog/aws/dns.rb +1 -1
- data/lib/fog/aws/dynamodb.rb +1 -1
- data/lib/fog/aws/ecs.rb +1 -1
- data/lib/fog/aws/elasticache.rb +2 -2
- data/lib/fog/aws/elb.rb +1 -1
- data/lib/fog/aws/elbv2.rb +1 -1
- data/lib/fog/aws/emr.rb +1 -1
- data/lib/fog/aws/glacier.rb +1 -1
- data/lib/fog/aws/iam.rb +1 -1
- data/lib/fog/aws/kinesis.rb +1 -1
- data/lib/fog/aws/kms.rb +6 -2
- data/lib/fog/aws/lambda.rb +1 -1
- data/lib/fog/aws/models/compute/dhcp_option.rb +1 -1
- data/lib/fog/aws/models/compute/flavors.rb +2008 -778
- data/lib/fog/aws/models/compute/network_interfaces.rb +1 -1
- data/lib/fog/aws/models/elasticache/cluster.rb +1 -1
- data/lib/fog/aws/models/storage/file.rb +4 -3
- data/lib/fog/aws/models/storage/files.rb +3 -2
- data/lib/fog/aws/parsers/compute/describe_instance_status.rb +5 -3
- data/lib/fog/aws/parsers/iam/list_server_certificates.rb +1 -1
- data/lib/fog/aws/parsers/kms/describe_key.rb +2 -2
- data/lib/fog/aws/parsers/kms/get_public_key.rb +30 -0
- data/lib/fog/aws/parsers/kms/schedule_key_deletion.rb +28 -0
- data/lib/fog/aws/parsers/kms/sign.rb +24 -0
- data/lib/fog/aws/parsers/rds/db_cluster_parser.rb +1 -1
- data/lib/fog/aws/parsers/rds/db_parser.rb +1 -1
- data/lib/fog/aws/parsers/rds/modify_db_subnet_group.rb +1 -1
- data/lib/fog/aws/parsers/redshift/cluster_subnet_group_parser.rb +1 -1
- data/lib/fog/aws/parsers/storage/list_objects_v2.rb +66 -0
- data/lib/fog/aws/rds.rb +1 -1
- data/lib/fog/aws/redshift.rb +1 -1
- data/lib/fog/aws/requests/auto_scaling/attach_load_balancer_target_groups.rb +1 -1
- data/lib/fog/aws/requests/auto_scaling/describe_scaling_activities.rb +1 -1
- data/lib/fog/aws/requests/auto_scaling/put_scheduled_update_group_action.rb +1 -1
- data/lib/fog/aws/requests/cloud_formation/create_change_set.rb +1 -1
- data/lib/fog/aws/requests/cloud_formation/create_stack.rb +1 -1
- data/lib/fog/aws/requests/cloud_formation/get_template_summary.rb +1 -1
- data/lib/fog/aws/requests/cloud_formation/update_stack.rb +1 -1
- data/lib/fog/aws/requests/cloud_watch/list_metrics.rb +1 -1
- data/lib/fog/aws/requests/compute/authorize_security_group_egress.rb +1 -1
- data/lib/fog/aws/requests/compute/authorize_security_group_ingress.rb +1 -1
- data/lib/fog/aws/requests/compute/create_network_interface.rb +1 -1
- data/lib/fog/aws/requests/compute/create_vpc.rb +1 -1
- data/lib/fog/aws/requests/compute/describe_network_interfaces.rb +2 -2
- data/lib/fog/aws/requests/compute/modify_network_interface_attribute.rb +1 -1
- data/lib/fog/aws/requests/compute/modify_volume.rb +1 -1
- data/lib/fog/aws/requests/compute/revoke_security_group_egress.rb +1 -1
- data/lib/fog/aws/requests/compute/revoke_security_group_ingress.rb +1 -1
- data/lib/fog/aws/requests/compute/run_instances.rb +2 -2
- data/lib/fog/aws/requests/data_pipeline/deactivate_pipeline.rb +1 -1
- data/lib/fog/aws/requests/ecs/list_task_definitions.rb +1 -1
- data/lib/fog/aws/requests/efs/create_file_system.rb +1 -1
- data/lib/fog/aws/requests/elasticache/authorize_cache_security_group_ingress.rb +1 -1
- data/lib/fog/aws/requests/elasticache/create_cache_cluster.rb +2 -2
- data/lib/fog/aws/requests/elasticache/describe_engine_default_parameters.rb +1 -1
- data/lib/fog/aws/requests/elb/delete_load_balancer_listeners.rb +1 -1
- data/lib/fog/aws/requests/elbv2/describe_tags.rb +2 -2
- data/lib/fog/aws/requests/glacier/initiate_job.rb +1 -1
- data/lib/fog/aws/requests/glacier/initiate_multipart_upload.rb +1 -1
- data/lib/fog/aws/requests/kinesis/list_streams.rb +1 -1
- data/lib/fog/aws/requests/kms/create_key.rb +74 -36
- data/lib/fog/aws/requests/kms/get_public_key.rb +35 -0
- data/lib/fog/aws/requests/kms/list_keys.rb +3 -4
- data/lib/fog/aws/requests/kms/schedule_key_deletion.rb +37 -0
- data/lib/fog/aws/requests/kms/sign.rb +62 -0
- data/lib/fog/aws/requests/rds/authorize_db_security_group_ingress.rb +2 -2
- data/lib/fog/aws/requests/rds/create_db_cluster.rb +1 -1
- data/lib/fog/aws/requests/rds/describe_db_snapshots.rb +1 -1
- data/lib/fog/aws/requests/rds/modify_db_instance.rb +1 -1
- data/lib/fog/aws/requests/rds/modify_db_parameter_group.rb +1 -1
- data/lib/fog/aws/requests/ses/send_raw_email.rb +1 -1
- data/lib/fog/aws/requests/sqs/change_message_visibility.rb +1 -1
- data/lib/fog/aws/requests/sqs/delete_message.rb +1 -1
- data/lib/fog/aws/requests/storage/copy_object.rb +2 -1
- data/lib/fog/aws/requests/storage/get_bucket.rb +2 -2
- data/lib/fog/aws/requests/storage/get_bucket_object_versions.rb +2 -2
- data/lib/fog/aws/requests/storage/list_objects_v2.rb +129 -0
- data/lib/fog/aws/requests/storage/list_parts.rb +1 -1
- data/lib/fog/aws/requests/storage/post_object_restore.rb +24 -4
- data/lib/fog/aws/requests/storage/put_bucket.rb +0 -4
- data/lib/fog/aws/requests/storage/put_bucket_lifecycle.rb +1 -1
- data/lib/fog/aws/requests/storage/put_bucket_notification.rb +1 -1
- data/lib/fog/aws/requests/storage/put_object.rb +1 -1
- data/lib/fog/aws/requests/storage/sync_clock.rb +1 -1
- data/lib/fog/aws/requests/storage/upload_part_copy.rb +1 -1
- data/lib/fog/aws/ses.rb +20 -17
- data/lib/fog/aws/signaturev4.rb +1 -1
- data/lib/fog/aws/simpledb.rb +1 -1
- data/lib/fog/aws/sns.rb +1 -1
- data/lib/fog/aws/sqs.rb +1 -1
- data/lib/fog/aws/storage.rb +33 -9
- data/lib/fog/aws/support.rb +1 -1
- data/lib/fog/aws/version.rb +1 -1
- data/lib/fog/aws.rb +4 -1
- metadata +37 -11
@@ -6,7 +6,9 @@ module Fog
|
|
6
6
|
#
|
7
7
|
# @param bucket_name [String] Name of bucket containing object
|
8
8
|
# @param object_name [String] Name of object to restore
|
9
|
-
# @
|
9
|
+
# @param options [Hash] Optional parameters
|
10
|
+
# @option options [Integer] :days Number of days to restore object for. Defaults to 100000 (a very long time)
|
11
|
+
# @option options [String] :tier Glacier retrieval tier. Can be 'Standard', 'Bulk', or 'Expedited'
|
10
12
|
#
|
11
13
|
# @return [Excon::Response] response:
|
12
14
|
# * status [Integer] 200 (OK) Object is previously restored
|
@@ -15,11 +17,24 @@ module Fog
|
|
15
17
|
#
|
16
18
|
# @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectPOSTrestore.html
|
17
19
|
#
|
18
|
-
def post_object_restore(bucket_name, object_name,
|
20
|
+
def post_object_restore(bucket_name, object_name, options = {})
|
19
21
|
raise ArgumentError.new('bucket_name is required') unless bucket_name
|
20
22
|
raise ArgumentError.new('object_name is required') unless object_name
|
21
23
|
|
22
|
-
|
24
|
+
unless options.is_a?(Hash)
|
25
|
+
Fog::Logger.deprecation("post_object_restore with a bare days parameter is deprecated, use post_object_restore(bucket_name, object_name, :days => days) instead [light_black](#{caller.first})[/]")
|
26
|
+
options = { :days => options }
|
27
|
+
end
|
28
|
+
|
29
|
+
days = options[:days] || 100000
|
30
|
+
tier = options[:tier]
|
31
|
+
|
32
|
+
data = '<RestoreRequest xmlns="http://s3.amazonaws.com/doc/2006-03-01/">'
|
33
|
+
data += '<Days>' + days.to_s + '</Days>'
|
34
|
+
if tier
|
35
|
+
data += '<GlacierJobParameters><Tier>' + tier + '</Tier></GlacierJobParameters>'
|
36
|
+
end
|
37
|
+
data += '</RestoreRequest>'
|
23
38
|
|
24
39
|
headers = {}
|
25
40
|
headers['Content-MD5'] = Base64.encode64(OpenSSL::Digest::MD5.digest(data)).strip
|
@@ -39,7 +54,12 @@ module Fog
|
|
39
54
|
end
|
40
55
|
|
41
56
|
class Mock # :nodoc:all
|
42
|
-
def post_object_restore(bucket_name, object_name,
|
57
|
+
def post_object_restore(bucket_name, object_name, options = {})
|
58
|
+
unless options.is_a?(Hash)
|
59
|
+
Fog::Logger.deprecation("post_object_restore with a bare days parameter is deprecated, use post_object_restore(bucket_name, object_name, :days => days) instead [light_black](#{caller.first})[/]")
|
60
|
+
options = { :days => options }
|
61
|
+
end
|
62
|
+
|
43
63
|
response = get_object(bucket_name, object_name)
|
44
64
|
response.body = nil
|
45
65
|
response
|
@@ -61,10 +61,6 @@ DATA
|
|
61
61
|
end
|
62
62
|
if !self.data[:buckets][bucket_name]
|
63
63
|
self.data[:buckets][bucket_name] = bucket
|
64
|
-
elsif self.region != 'us-east-1'
|
65
|
-
response.status = 409
|
66
|
-
Fog::Logger.warning "Your region '#{self.region}' does not match the default region 'us-east-1'"
|
67
|
-
raise(Excon::Errors.status_error({:expects => 201}, response))
|
68
64
|
end
|
69
65
|
response
|
70
66
|
end
|
@@ -47,7 +47,7 @@ module Fog
|
|
47
47
|
if rule['NoncurrentVersionExpiration']['NoncurrentDays']
|
48
48
|
NoncurrentVersionExpiration { NoncurrentDays rule['NoncurrentVersionExpiration']['NoncurrentDays'] }
|
49
49
|
elsif rule['NoncurrentVersionExpiration']['Date']
|
50
|
-
|
50
|
+
NoncurrentVersionExpiration {
|
51
51
|
if Date rule['NoncurrentVersionExpiration']['Date'].is_a?(Time)
|
52
52
|
rule['NoncurrentVersionExpiration']['Date'].utc.iso8601
|
53
53
|
else
|
@@ -5,7 +5,7 @@ module Fog
|
|
5
5
|
# Change notification configuration for an S3 bucket
|
6
6
|
#
|
7
7
|
# @param bucket_name [String] name of bucket to set notification configuration for
|
8
|
-
# *
|
8
|
+
# * notifications [Hash]:
|
9
9
|
# * Topics [Array] SNS topic configurations for the notification
|
10
10
|
# * ID [String] Unique identifier for the configuration
|
11
11
|
# * Topic [String] Amazon SNS topic ARN to which Amazon S3 will publish a message when it detects events of specified type
|
@@ -16,7 +16,7 @@ module Fog
|
|
16
16
|
# @option options Content-Type [String] Standard MIME type describing contents (defaults to MIME::Types.of.first)
|
17
17
|
# @option options Expires [String] Cache expiry
|
18
18
|
# @option options x-amz-acl [String] Permissions, must be in ['private', 'public-read', 'public-read-write', 'authenticated-read']
|
19
|
-
# @option options x-amz-storage-class [String] Default is 'STANDARD', set to 'REDUCED_REDUNDANCY' for non-critical,
|
19
|
+
# @option options x-amz-storage-class [String] Default is 'STANDARD', set to 'REDUCED_REDUNDANCY' for non-critical, reproducible data
|
20
20
|
# @option options x-amz-meta-#{name} Headers to be returned with object, note total size of request without body must be less than 8 KB. Each name, value pair must conform to US-ASCII.
|
21
21
|
# @option options x-amz-server-side-encryption [String] Sets HTTP header for server-side encryption. Set to 'AES256' for SSE-S3 and SSE-C. Set to 'aws:kms' for SSE-KMS
|
22
22
|
# @option options x-amz-server-side-encryption-customer-algorithm [String] Algorithm to use to when encrypting the object for SSE-C.
|
@@ -35,7 +35,7 @@ module Fog
|
|
35
35
|
# @option options [Time] x-amz-copy_source-if-modified_since Copies object it it has been modified since this time
|
36
36
|
# @option options [String] x-amz-copy_source-if-none-match Copies object if its etag does not match this value
|
37
37
|
# @option options [Time] x-amz-copy_source-if-unmodified-since Copies object it it has not been modified since this time
|
38
|
-
# @option options [Time] x-amz-copy-source-range
|
38
|
+
# @option options [Time] x-amz-copy-source-range Specifies the range of bytes to copy from the source object
|
39
39
|
#
|
40
40
|
# @return [Excon::Response]
|
41
41
|
# * body [Hash]:
|
data/lib/fog/aws/ses.rb
CHANGED
@@ -7,7 +7,7 @@ module Fog
|
|
7
7
|
class MessageRejected < Fog::Errors::Error; end
|
8
8
|
|
9
9
|
requires :aws_access_key_id, :aws_secret_access_key
|
10
|
-
recognizes :region, :host, :path, :port, :scheme, :persistent, :use_iam_profile, :aws_session_token, :aws_credentials_expire_at, :instrumentor, :instrumentor_name
|
10
|
+
recognizes :region, :host, :path, :port, :scheme, :persistent, :use_iam_profile, :aws_session_token, :aws_credentials_expire_at, :instrumentor, :instrumentor_name, :sts_endpoint
|
11
11
|
|
12
12
|
request_path 'fog/aws/requests/ses'
|
13
13
|
request :delete_verified_email_address
|
@@ -48,18 +48,21 @@ module Fog
|
|
48
48
|
def initialize(options={})
|
49
49
|
|
50
50
|
@use_iam_profile = options[:use_iam_profile]
|
51
|
-
setup_credentials(options)
|
52
51
|
|
53
52
|
@instrumentor = options[:instrumentor]
|
54
53
|
@instrumentor_name = options[:instrumentor_name] || 'fog.aws.ses'
|
55
54
|
@connection_options = options[:connection_options] || {}
|
56
55
|
options[:region] ||= 'us-east-1'
|
56
|
+
@region = options[:region]
|
57
|
+
|
57
58
|
@host = options[:host] || "email.#{options[:region]}.amazonaws.com"
|
58
59
|
@path = options[:path] || '/'
|
59
60
|
@persistent = options[:persistent] || false
|
60
61
|
@port = options[:port] || 443
|
61
62
|
@scheme = options[:scheme] || 'https'
|
62
63
|
@connection = Fog::XML::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options)
|
64
|
+
|
65
|
+
setup_credentials(options)
|
63
66
|
end
|
64
67
|
|
65
68
|
def reload
|
@@ -74,7 +77,7 @@ module Fog
|
|
74
77
|
@aws_session_token = options[:aws_session_token]
|
75
78
|
@aws_credentials_expire_at = options[:aws_credentials_expire_at]
|
76
79
|
|
77
|
-
@
|
80
|
+
@signer = Fog::AWS::SignatureV4.new(@aws_access_key_id, @aws_secret_access_key, @region, 'ses')
|
78
81
|
end
|
79
82
|
|
80
83
|
def request(params)
|
@@ -87,20 +90,20 @@ module Fog
|
|
87
90
|
'Content-Type' => 'application/x-www-form-urlencoded',
|
88
91
|
'Date' => Fog::Time.now.to_date_header,
|
89
92
|
}
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
93
|
+
|
94
|
+
body, headers = AWS.signed_params_v4(
|
95
|
+
params,
|
96
|
+
{ 'Content-Type' => 'application/x-www-form-urlencoded' },
|
97
|
+
{
|
98
|
+
:method => 'POST',
|
99
|
+
:aws_session_token => @aws_session_token,
|
100
|
+
:signer => @signer,
|
101
|
+
:host => @host,
|
102
|
+
:path => @path,
|
103
|
+
:port => @port,
|
104
|
+
:version => '2010-12-01'
|
105
|
+
}
|
106
|
+
)
|
104
107
|
|
105
108
|
if @instrumentor
|
106
109
|
@instrumentor.instrument("#{@instrumentor_name}.request", params) do
|
data/lib/fog/aws/signaturev4.rb
CHANGED
data/lib/fog/aws/simpledb.rb
CHANGED
@@ -4,7 +4,7 @@ module Fog
|
|
4
4
|
extend Fog::AWS::CredentialFetcher::ServiceMethods
|
5
5
|
|
6
6
|
requires :aws_access_key_id, :aws_secret_access_key
|
7
|
-
recognizes :host, :nil_string, :path, :port, :scheme, :persistent, :region, :aws_session_token, :use_iam_profile, :aws_credentials_expire_at, :instrumentor, :instrumentor_name
|
7
|
+
recognizes :host, :nil_string, :path, :port, :scheme, :persistent, :region, :aws_session_token, :use_iam_profile, :aws_credentials_expire_at, :instrumentor, :instrumentor_name, :sts_endpoint
|
8
8
|
|
9
9
|
request_path 'fog/aws/requests/simpledb'
|
10
10
|
request :batch_put_attributes
|
data/lib/fog/aws/sns.rb
CHANGED
@@ -4,7 +4,7 @@ module Fog
|
|
4
4
|
extend Fog::AWS::CredentialFetcher::ServiceMethods
|
5
5
|
|
6
6
|
requires :aws_access_key_id, :aws_secret_access_key
|
7
|
-
recognizes :host, :path, :port, :scheme, :persistent, :region, :use_iam_profile, :aws_session_token, :aws_credentials_expire_at, :instrumentor, :instrumentor_name
|
7
|
+
recognizes :host, :path, :port, :scheme, :persistent, :region, :use_iam_profile, :aws_session_token, :aws_credentials_expire_at, :instrumentor, :instrumentor_name, :sts_endpoint
|
8
8
|
|
9
9
|
request_path 'fog/aws/requests/sns'
|
10
10
|
request :add_permission
|
data/lib/fog/aws/sqs.rb
CHANGED
@@ -4,7 +4,7 @@ module Fog
|
|
4
4
|
extend Fog::AWS::CredentialFetcher::ServiceMethods
|
5
5
|
|
6
6
|
requires :aws_access_key_id, :aws_secret_access_key
|
7
|
-
recognizes :region, :host, :path, :port, :scheme, :persistent, :aws_session_token, :use_iam_profile, :aws_credentials_expire_at, :instrumentor, :instrumentor_name
|
7
|
+
recognizes :region, :host, :path, :port, :scheme, :persistent, :aws_session_token, :use_iam_profile, :aws_credentials_expire_at, :instrumentor, :instrumentor_name, :sts_endpoint
|
8
8
|
|
9
9
|
request_path 'fog/aws/requests/sqs'
|
10
10
|
request :change_message_visibility
|
data/lib/fog/aws/storage.rb
CHANGED
@@ -7,6 +7,8 @@ module Fog
|
|
7
7
|
|
8
8
|
DEFAULT_REGION = 'us-east-1'
|
9
9
|
ACCELERATION_HOST = 's3-accelerate.amazonaws.com'
|
10
|
+
AWS_FIPS_REGIONS = %w(us-east-1 us-east-2 us-west-1 us-west-2 us-gov-east-1 us-gov-west-1 ca-central-1 ca-west-1).freeze
|
11
|
+
AWS_GOVCLOUD_REGIONS = %w(us-gov-east-1 us-gov-west-1).freeze
|
10
12
|
|
11
13
|
DEFAULT_SCHEME = 'https'
|
12
14
|
DEFAULT_SCHEME_PORT = {
|
@@ -14,14 +16,22 @@ module Fog
|
|
14
16
|
'https' => 443
|
15
17
|
}
|
16
18
|
|
19
|
+
DEFAULT_CONNECTION_OPTIONS = {
|
20
|
+
retry_limit: 5,
|
21
|
+
retry_interval: 1
|
22
|
+
}
|
23
|
+
|
17
24
|
MIN_MULTIPART_CHUNK_SIZE = 5242880
|
18
25
|
MAX_SINGLE_PUT_SIZE = 5368709120
|
19
26
|
|
20
27
|
VALID_QUERY_KEYS = %w[
|
21
28
|
acl
|
29
|
+
continuation-token
|
22
30
|
cors
|
23
31
|
delete
|
32
|
+
fetch-owner
|
24
33
|
lifecycle
|
34
|
+
list-type
|
25
35
|
location
|
26
36
|
logging
|
27
37
|
notification
|
@@ -35,6 +45,7 @@ module Fog
|
|
35
45
|
response-content-type
|
36
46
|
response-expires
|
37
47
|
restore
|
48
|
+
start-after
|
38
49
|
tagging
|
39
50
|
torrent
|
40
51
|
uploadId
|
@@ -46,7 +57,7 @@ module Fog
|
|
46
57
|
]
|
47
58
|
|
48
59
|
requires :aws_access_key_id, :aws_secret_access_key
|
49
|
-
recognizes :endpoint, :region, :host, :port, :scheme, :persistent, :use_iam_profile, :aws_session_token, :aws_credentials_expire_at, :path_style, :acceleration, :instrumentor, :instrumentor_name, :aws_signature_version, :enable_signature_v4_streaming, :virtual_host, :cname, :max_put_chunk_size, :max_copy_chunk_size, :aws_credentials_refresh_threshold_seconds, :disable_content_md5_validation
|
60
|
+
recognizes :endpoint, :region, :host, :port, :scheme, :persistent, :use_iam_profile, :aws_session_token, :aws_credentials_expire_at, :path_style, :acceleration, :instrumentor, :instrumentor_name, :aws_signature_version, :enable_signature_v4_streaming, :virtual_host, :cname, :max_put_chunk_size, :max_copy_chunk_size, :aws_credentials_refresh_threshold_seconds, :disable_content_md5_validation, :sts_endpoint
|
50
61
|
|
51
62
|
secrets :aws_secret_access_key, :hmac
|
52
63
|
|
@@ -95,6 +106,7 @@ module Fog
|
|
95
106
|
request :head_object_url
|
96
107
|
request :initiate_multipart_upload
|
97
108
|
request :list_multipart_uploads
|
109
|
+
request :list_objects_v2
|
98
110
|
request :list_parts
|
99
111
|
request :post_object_hidden_fields
|
100
112
|
request :post_object_restore
|
@@ -253,13 +265,17 @@ module Fog
|
|
253
265
|
end
|
254
266
|
|
255
267
|
def region_to_host(region=nil)
|
256
|
-
|
257
|
-
|
258
|
-
's3.amazonaws.com'
|
259
|
-
when %r{\Acn-.*}
|
260
|
-
"s3.#{region}.amazonaws.com.cn"
|
268
|
+
if ENV['AWS_USE_FIPS_ENDPOINT'] == 'true' && AWS_FIPS_REGIONS.include?(region)
|
269
|
+
"s3-fips.#{region}.amazonaws.com" # https://aws.amazon.com/compliance/fips/
|
261
270
|
else
|
262
|
-
|
271
|
+
case region.to_s
|
272
|
+
when DEFAULT_REGION, ''
|
273
|
+
's3.amazonaws.com'
|
274
|
+
when %r{\Acn-.*}
|
275
|
+
"s3.#{region}.amazonaws.com.cn"
|
276
|
+
else
|
277
|
+
"s3.#{region}.amazonaws.com"
|
278
|
+
end
|
263
279
|
end
|
264
280
|
end
|
265
281
|
|
@@ -546,11 +562,12 @@ module Fog
|
|
546
562
|
@use_iam_profile = options[:use_iam_profile]
|
547
563
|
@instrumentor = options[:instrumentor]
|
548
564
|
@instrumentor_name = options[:instrumentor_name] || 'fog.aws.storage'
|
549
|
-
@connection_options
|
565
|
+
@connection_options =
|
566
|
+
DEFAULT_CONNECTION_OPTIONS.merge(options[:connection_options] || {})
|
550
567
|
@persistent = options.fetch(:persistent, false)
|
551
568
|
@acceleration = options.fetch(:acceleration, false)
|
552
569
|
@signature_version = options.fetch(:aws_signature_version, 4)
|
553
|
-
@enable_signature_v4_streaming = options.fetch(:enable_signature_v4_streaming,
|
570
|
+
@enable_signature_v4_streaming = options.fetch(:enable_signature_v4_streaming, false)
|
554
571
|
validate_signature_version!
|
555
572
|
@path_style = options[:path_style] || false
|
556
573
|
|
@@ -572,6 +589,13 @@ module Fog
|
|
572
589
|
@port = options[:port] || DEFAULT_SCHEME_PORT[@scheme]
|
573
590
|
end
|
574
591
|
|
592
|
+
# GovCloud doesn't support S3 Transfer Acceleration https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-s3.html
|
593
|
+
# S3 Transfer Acceleration doesn't support FIPS endpoints. When both fog_aws_accelerate=true and AWS_USE_FIPS_ENDPOINT=true, don't use Accelerate.
|
594
|
+
if @acceleration && (AWS_GOVCLOUD_REGIONS.include?(@region) || ENV['AWS_USE_FIPS_ENDPOINT'] == 'true')
|
595
|
+
Fog::Logger.warning("fog: S3 Transfer Acceleration is not available in GovCloud regions or when AWS_USE_FIPS_ENDPOINT=true. Disabling acceleration.")
|
596
|
+
@acceleration = false
|
597
|
+
end
|
598
|
+
|
575
599
|
@host = ACCELERATION_HOST if @acceleration
|
576
600
|
setup_credentials(options)
|
577
601
|
end
|
data/lib/fog/aws/support.rb
CHANGED
@@ -4,7 +4,7 @@ module Fog
|
|
4
4
|
extend Fog::AWS::CredentialFetcher::ServiceMethods
|
5
5
|
|
6
6
|
requires :aws_access_key_id, :aws_secret_access_key
|
7
|
-
recognizes :host, :path, :port, :scheme, :instrumentor, :instrumentor_name, :region, :persistent, :aws_session_token
|
7
|
+
recognizes :host, :path, :port, :scheme, :instrumentor, :instrumentor_name, :region, :persistent, :aws_session_token, :aws_credentials_expire_at, :sts_endpoint
|
8
8
|
|
9
9
|
model_path 'fog/aws/models/support'
|
10
10
|
request_path 'fog/aws/requests/support'
|
data/lib/fog/aws/version.rb
CHANGED
data/lib/fog/aws.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'base64'
|
1
2
|
require 'fog/core'
|
2
3
|
require 'fog/xml'
|
3
4
|
require 'fog/json'
|
@@ -226,12 +227,14 @@ module Fog
|
|
226
227
|
'ap-south-1',
|
227
228
|
'ap-southeast-1', 'ap-southeast-2', 'ap-southeast-3', 'ap-southeast-4',
|
228
229
|
'ca-central-1',
|
230
|
+
'ca-west-1',
|
229
231
|
'cn-north-1',
|
230
232
|
'cn-northwest-1',
|
231
233
|
'eu-central-1',
|
232
234
|
'eu-north-1',
|
233
235
|
'eu-west-1', 'eu-west-2', 'eu-west-3', 'eu-south-1', 'eu-south-2',
|
234
|
-
'
|
236
|
+
'il-central-1',
|
237
|
+
'me-south-1', 'me-central-1',
|
235
238
|
'us-east-1', 'us-east-2',
|
236
239
|
'us-west-1', 'us-west-2',
|
237
240
|
'sa-east-1',
|
metadata
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fog-aws
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.33.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Lane
|
8
8
|
- Wesley Beary
|
9
|
-
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: bundler
|
@@ -59,14 +58,14 @@ dependencies:
|
|
59
58
|
requirements:
|
60
59
|
- - "~>"
|
61
60
|
- !ruby/object:Gem::Version
|
62
|
-
version:
|
61
|
+
version: 3.0.0
|
63
62
|
type: :development
|
64
63
|
prerelease: false
|
65
64
|
version_requirements: !ruby/object:Gem::Requirement
|
66
65
|
requirements:
|
67
66
|
- - "~>"
|
68
67
|
- !ruby/object:Gem::Version
|
69
|
-
version:
|
68
|
+
version: 3.0.0
|
70
69
|
- !ruby/object:Gem::Dependency
|
71
70
|
name: shindo
|
72
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -81,20 +80,40 @@ dependencies:
|
|
81
80
|
- - "~>"
|
82
81
|
- !ruby/object:Gem::Version
|
83
82
|
version: '0.3'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: base64
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0.2'
|
90
|
+
- - "<"
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: '0.4'
|
93
|
+
type: :runtime
|
94
|
+
prerelease: false
|
95
|
+
version_requirements: !ruby/object:Gem::Requirement
|
96
|
+
requirements:
|
97
|
+
- - ">="
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: '0.2'
|
100
|
+
- - "<"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '0.4'
|
84
103
|
- !ruby/object:Gem::Dependency
|
85
104
|
name: fog-core
|
86
105
|
requirement: !ruby/object:Gem::Requirement
|
87
106
|
requirements:
|
88
107
|
- - "~>"
|
89
108
|
- !ruby/object:Gem::Version
|
90
|
-
version: '2.
|
109
|
+
version: '2.6'
|
91
110
|
type: :runtime
|
92
111
|
prerelease: false
|
93
112
|
version_requirements: !ruby/object:Gem::Requirement
|
94
113
|
requirements:
|
95
114
|
- - "~>"
|
96
115
|
- !ruby/object:Gem::Version
|
97
|
-
version: '2.
|
116
|
+
version: '2.6'
|
98
117
|
- !ruby/object:Gem::Dependency
|
99
118
|
name: fog-json
|
100
119
|
requirement: !ruby/object:Gem::Requirement
|
@@ -600,7 +619,10 @@ files:
|
|
600
619
|
- lib/fog/aws/parsers/iam/upload_server_certificate.rb
|
601
620
|
- lib/fog/aws/parsers/iam/upload_signing_certificate.rb
|
602
621
|
- lib/fog/aws/parsers/kms/describe_key.rb
|
622
|
+
- lib/fog/aws/parsers/kms/get_public_key.rb
|
603
623
|
- lib/fog/aws/parsers/kms/list_keys.rb
|
624
|
+
- lib/fog/aws/parsers/kms/schedule_key_deletion.rb
|
625
|
+
- lib/fog/aws/parsers/kms/sign.rb
|
604
626
|
- lib/fog/aws/parsers/lambda/base.rb
|
605
627
|
- lib/fog/aws/parsers/rds/authorize_db_security_group_ingress.rb
|
606
628
|
- lib/fog/aws/parsers/rds/base.rb
|
@@ -731,6 +753,7 @@ files:
|
|
731
753
|
- lib/fog/aws/parsers/storage/get_service.rb
|
732
754
|
- lib/fog/aws/parsers/storage/initiate_multipart_upload.rb
|
733
755
|
- lib/fog/aws/parsers/storage/list_multipart_uploads.rb
|
756
|
+
- lib/fog/aws/parsers/storage/list_objects_v2.rb
|
734
757
|
- lib/fog/aws/parsers/storage/list_parts.rb
|
735
758
|
- lib/fog/aws/parsers/storage/upload_part_copy_object.rb
|
736
759
|
- lib/fog/aws/parsers/sts/assume_role.rb
|
@@ -1222,7 +1245,10 @@ files:
|
|
1222
1245
|
- lib/fog/aws/requests/kinesis/split_shard.rb
|
1223
1246
|
- lib/fog/aws/requests/kms/create_key.rb
|
1224
1247
|
- lib/fog/aws/requests/kms/describe_key.rb
|
1248
|
+
- lib/fog/aws/requests/kms/get_public_key.rb
|
1225
1249
|
- lib/fog/aws/requests/kms/list_keys.rb
|
1250
|
+
- lib/fog/aws/requests/kms/schedule_key_deletion.rb
|
1251
|
+
- lib/fog/aws/requests/kms/sign.rb
|
1226
1252
|
- lib/fog/aws/requests/lambda/add_permission.rb
|
1227
1253
|
- lib/fog/aws/requests/lambda/create_event_source_mapping.rb
|
1228
1254
|
- lib/fog/aws/requests/lambda/create_function.rb
|
@@ -1400,6 +1426,7 @@ files:
|
|
1400
1426
|
- lib/fog/aws/requests/storage/head_object_url.rb
|
1401
1427
|
- lib/fog/aws/requests/storage/initiate_multipart_upload.rb
|
1402
1428
|
- lib/fog/aws/requests/storage/list_multipart_uploads.rb
|
1429
|
+
- lib/fog/aws/requests/storage/list_objects_v2.rb
|
1403
1430
|
- lib/fog/aws/requests/storage/list_parts.rb
|
1404
1431
|
- lib/fog/aws/requests/storage/post_object_hidden_fields.rb
|
1405
1432
|
- lib/fog/aws/requests/storage/post_object_restore.rb
|
@@ -1442,8 +1469,8 @@ files:
|
|
1442
1469
|
homepage: https://github.com/fog/fog-aws
|
1443
1470
|
licenses:
|
1444
1471
|
- MIT
|
1445
|
-
metadata:
|
1446
|
-
|
1472
|
+
metadata:
|
1473
|
+
changelog_uri: https://github.com/fog/fog-aws/blob/master/CHANGELOG.md
|
1447
1474
|
rdoc_options: []
|
1448
1475
|
require_paths:
|
1449
1476
|
- lib
|
@@ -1458,8 +1485,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1458
1485
|
- !ruby/object:Gem::Version
|
1459
1486
|
version: '0'
|
1460
1487
|
requirements: []
|
1461
|
-
rubygems_version: 3.
|
1462
|
-
signing_key:
|
1488
|
+
rubygems_version: 3.7.1
|
1463
1489
|
specification_version: 4
|
1464
1490
|
summary: Module for the 'fog' gem to support Amazon Web Services.
|
1465
1491
|
test_files: []
|