fog-aws 3.5.2 → 3.19.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +485 -22
- data/LICENSE.md +1 -1
- data/README.md +117 -7
- data/fog-aws.gemspec +8 -8
- data/lib/fog/aws/compute.rb +6 -3
- data/lib/fog/aws/credential_fetcher.rb +75 -7
- data/lib/fog/aws/elasticache.rb +4 -2
- data/lib/fog/aws/elb.rb +1 -1
- data/lib/fog/aws/elbv2.rb +72 -0
- data/lib/fog/aws/kinesis.rb +23 -15
- data/lib/fog/aws/models/compute/flavors.rb +2563 -521
- data/lib/fog/aws/models/compute/security_group.rb +13 -5
- data/lib/fog/aws/models/compute/server.rb +6 -2
- data/lib/fog/aws/models/compute/servers.rb +2 -0
- data/lib/fog/aws/models/compute/snapshot.rb +7 -6
- data/lib/fog/aws/models/compute/vpc.rb +8 -2
- data/lib/fog/aws/models/storage/directories.rb +1 -0
- data/lib/fog/aws/models/storage/directory.rb +0 -1
- data/lib/fog/aws/models/storage/file.rb +164 -20
- data/lib/fog/aws/models/storage/files.rb +32 -2
- data/lib/fog/aws/parsers/compute/create_snapshot.rb +1 -1
- data/lib/fog/aws/parsers/compute/create_subnet.rb +33 -6
- data/lib/fog/aws/parsers/compute/describe_security_groups.rb +18 -4
- data/lib/fog/aws/parsers/compute/describe_subnets.rb +33 -6
- data/lib/fog/aws/parsers/dns/create_hosted_zone.rb +1 -1
- data/lib/fog/aws/parsers/dns/get_hosted_zone.rb +3 -3
- data/lib/fog/aws/parsers/dns/list_hosted_zones.rb +3 -1
- data/lib/fog/aws/parsers/elbv2/create_load_balancer.rb +88 -0
- data/lib/fog/aws/parsers/elbv2/describe_listeners.rb +110 -0
- data/lib/fog/aws/parsers/elbv2/describe_load_balancers.rb +88 -0
- data/lib/fog/aws/parsers/elbv2/describe_tags.rb +53 -0
- data/lib/fog/aws/parsers/elbv2/empty.rb +10 -0
- data/lib/fog/aws/parsers/iam/get_group_policy.rb +1 -1
- data/lib/fog/aws/parsers/iam/get_role_policy.rb +1 -1
- data/lib/fog/aws/parsers/iam/get_user_policy.rb +1 -1
- data/lib/fog/aws/parsers/iam/policy_version.rb +1 -1
- data/lib/fog/aws/parsers/storage/get_object_tagging.rb +33 -0
- data/lib/fog/aws/parsers/storage/upload_part_copy_object.rb +18 -0
- data/lib/fog/aws/parsers/sts/assume_role_with_web_identity.rb +1 -1
- data/lib/fog/aws/requests/compute/authorize_security_group_ingress.rb +15 -0
- data/lib/fog/aws/requests/compute/create_network_interface.rb +7 -4
- data/lib/fog/aws/requests/compute/create_subnet.rb +3 -3
- data/lib/fog/aws/requests/compute/create_vpc.rb +2 -2
- data/lib/fog/aws/requests/compute/describe_security_groups.rb +2 -0
- data/lib/fog/aws/requests/compute/request_spot_instances.rb +1 -1
- data/lib/fog/aws/requests/compute/run_instances.rb +64 -0
- data/lib/fog/aws/requests/compute/stop_instances.rb +11 -3
- data/lib/fog/aws/requests/elbv2/add_tags.rb +45 -0
- data/lib/fog/aws/requests/elbv2/create_load_balancer.rb +160 -0
- data/lib/fog/aws/requests/elbv2/describe_listeners.rb +38 -0
- data/lib/fog/aws/requests/elbv2/describe_load_balancers.rb +100 -0
- data/lib/fog/aws/requests/elbv2/describe_tags.rb +50 -0
- data/lib/fog/aws/requests/elbv2/remove_tags.rb +45 -0
- data/lib/fog/aws/requests/rds/add_tags_to_resource.rb +12 -10
- data/lib/fog/aws/requests/rds/list_tags_for_resource.rb +10 -7
- data/lib/fog/aws/requests/rds/remove_tags_from_resource.rb +9 -8
- data/lib/fog/aws/requests/storage/delete_multiple_objects.rb +18 -8
- data/lib/fog/aws/requests/storage/get_object.rb +1 -1
- data/lib/fog/aws/requests/storage/get_object_tagging.rb +41 -0
- data/lib/fog/aws/requests/storage/get_service.rb +1 -1
- data/lib/fog/aws/requests/storage/put_object_tagging.rb +42 -0
- data/lib/fog/aws/requests/storage/shared_mock_methods.rb +1 -0
- data/lib/fog/aws/requests/storage/sync_clock.rb +9 -1
- data/lib/fog/aws/requests/storage/upload_part_copy.rb +119 -0
- data/lib/fog/aws/requests/sts/assume_role_with_web_identity.rb +7 -6
- data/lib/fog/aws/storage.rb +56 -5
- data/lib/fog/aws/version.rb +1 -1
- data/lib/fog/aws.rb +7 -2
- metadata +35 -295
- data/.gitignore +0 -16
- data/.travis.yml +0 -53
- data/Gemfile +0 -14
- data/Rakefile +0 -14
- data/gemfiles/Gemfile-edge +0 -14
- data/gemfiles/Gemfile-ruby-2.0 +0 -7
- data/stale.yml +0 -17
- data/tests/credentials_tests.rb +0 -87
- data/tests/helper.rb +0 -29
- data/tests/helpers/collection_helper.rb +0 -90
- data/tests/helpers/compute/flavors_helper.rb +0 -28
- data/tests/helpers/compute/server_helper.rb +0 -23
- data/tests/helpers/compute/servers_helper.rb +0 -8
- data/tests/helpers/dns_helper.rb +0 -56
- data/tests/helpers/formats_helper.rb +0 -100
- data/tests/helpers/formats_helper_tests.rb +0 -107
- data/tests/helpers/mock_helper.rb +0 -109
- data/tests/helpers/model_helper.rb +0 -30
- data/tests/helpers/responds_to_helper.rb +0 -11
- data/tests/helpers/schema_validator_tests.rb +0 -104
- data/tests/helpers/succeeds_helper.rb +0 -9
- data/tests/lorem.txt +0 -1
- data/tests/models/auto_scaling/activities_tests.rb +0 -6
- data/tests/models/auto_scaling/configuration_test.rb +0 -13
- data/tests/models/auto_scaling/configurations_tests.rb +0 -11
- data/tests/models/auto_scaling/groups_test.rb +0 -27
- data/tests/models/auto_scaling/helper.rb +0 -0
- data/tests/models/auto_scaling/instance_tests.rb +0 -15
- data/tests/models/auto_scaling/instances_tests.rb +0 -6
- data/tests/models/beanstalk/application_tests.rb +0 -69
- data/tests/models/beanstalk/applications_tests.rb +0 -7
- data/tests/models/beanstalk/environment_tests.rb +0 -131
- data/tests/models/beanstalk/environments_tests.rb +0 -34
- data/tests/models/beanstalk/template_tests.rb +0 -47
- data/tests/models/beanstalk/templates_tests.rb +0 -62
- data/tests/models/beanstalk/version_tests.rb +0 -66
- data/tests/models/beanstalk/versions_tests.rb +0 -60
- data/tests/models/cdn/distribution_tests.rb +0 -15
- data/tests/models/cdn/distributions_tests.rb +0 -15
- data/tests/models/cdn/invalidation_tests.rb +0 -31
- data/tests/models/cdn/invalidations_tests.rb +0 -14
- data/tests/models/cdn/streaming_distribution_tests.rb +0 -15
- data/tests/models/cdn/streaming_distributions_tests.rb +0 -15
- data/tests/models/cloud_watch/alarm_data_tests.rb +0 -42
- data/tests/models/cloud_watch/alarm_history_tests.rb +0 -22
- data/tests/models/cloud_watch/metric_statistics_tests.rb +0 -51
- data/tests/models/cloud_watch/metrics_tests.rb +0 -32
- data/tests/models/compute/address_tests.rb +0 -43
- data/tests/models/compute/addresses_tests.rb +0 -5
- data/tests/models/compute/dhcp_option_tests.rb +0 -3
- data/tests/models/compute/dhcp_options_tests.rb +0 -3
- data/tests/models/compute/internet_gateway_tests.rb +0 -3
- data/tests/models/compute/internet_gateways_tests.rb +0 -3
- data/tests/models/compute/key_pair_tests.rb +0 -26
- data/tests/models/compute/key_pairs_tests.rb +0 -5
- data/tests/models/compute/network_acl_tests.rb +0 -109
- data/tests/models/compute/network_acls_tests.rb +0 -20
- data/tests/models/compute/network_interfaces_test.rb +0 -12
- data/tests/models/compute/security_group_tests.rb +0 -98
- data/tests/models/compute/security_groups_tests.rb +0 -5
- data/tests/models/compute/server_tests.rb +0 -94
- data/tests/models/compute/snapshot_tests.rb +0 -10
- data/tests/models/compute/snapshots_tests.rb +0 -10
- data/tests/models/compute/subnet_tests.rb +0 -13
- data/tests/models/compute/subnets_tests.rb +0 -5
- data/tests/models/compute/volume_tests.rb +0 -65
- data/tests/models/compute/volumes_tests.rb +0 -5
- data/tests/models/compute/vpc_tests.rb +0 -26
- data/tests/models/compute/vpcs_tests.rb +0 -19
- data/tests/models/data_pipeline/pipeline_tests.rb +0 -8
- data/tests/models/data_pipeline/pipelines_tests.rb +0 -8
- data/tests/models/dns/record_tests.rb +0 -33
- data/tests/models/dns/records_tests.rb +0 -41
- data/tests/models/dns/zone_tests.rb +0 -4
- data/tests/models/dns/zones_tests.rb +0 -4
- data/tests/models/efs/file_system_tests.rb +0 -12
- data/tests/models/efs/mount_target_tests.rb +0 -45
- data/tests/models/efs/mount_targets_tests.rb +0 -30
- data/tests/models/elasticache/cluster_tests.rb +0 -30
- data/tests/models/elasticache/parameter_groups_tests.rb +0 -15
- data/tests/models/elasticache/security_groups_tests.rb +0 -52
- data/tests/models/elasticache/subnet_groups_tests.rb +0 -43
- data/tests/models/elb/model_tests.rb +0 -360
- data/tests/models/elb/tagging_tests.rb +0 -15
- data/tests/models/glacier/model_tests.rb +0 -47
- data/tests/models/iam/access_keys_tests.rb +0 -53
- data/tests/models/iam/groups_tests.rb +0 -59
- data/tests/models/iam/instance_profile_tests.rb +0 -18
- data/tests/models/iam/managed_policies_tests.rb +0 -89
- data/tests/models/iam/policies_tests.rb +0 -57
- data/tests/models/iam/roles_tests.rb +0 -71
- data/tests/models/iam/users_tests.rb +0 -119
- data/tests/models/rds/cluster_tests.rb +0 -54
- data/tests/models/rds/clusters_tests.rb +0 -5
- data/tests/models/rds/event_subscription_tests.rb +0 -9
- data/tests/models/rds/event_subscriptions_tests.rb +0 -6
- data/tests/models/rds/helper.rb +0 -25
- data/tests/models/rds/instance_option_tests.rb +0 -14
- data/tests/models/rds/parameter_group_tests.rb +0 -24
- data/tests/models/rds/parameter_groups_tests.rb +0 -8
- data/tests/models/rds/security_group_tests.rb +0 -77
- data/tests/models/rds/security_groups_tests.rb +0 -5
- data/tests/models/rds/server_tests.rb +0 -131
- data/tests/models/rds/servers_tests.rb +0 -24
- data/tests/models/rds/snapshot_tests.rb +0 -12
- data/tests/models/rds/snapshots_tests.rb +0 -12
- data/tests/models/rds/tagging_tests.rb +0 -20
- data/tests/models/sns/topic_tests.rb +0 -15
- data/tests/models/sns/topics_tests.rb +0 -6
- data/tests/models/storage/directory_tests.rb +0 -91
- data/tests/models/storage/file_tests.rb +0 -129
- data/tests/models/storage/files_tests.rb +0 -58
- data/tests/models/storage/url_tests.rb +0 -25
- data/tests/models/storage/version_tests.rb +0 -52
- data/tests/models/storage/versions_tests.rb +0 -51
- data/tests/models/support/trusted_advisor_tests.rb +0 -25
- data/tests/parsers/compute/describe_images_tests.rb +0 -33
- data/tests/parsers/elb/describe_load_balancers.rb +0 -65
- data/tests/requests/auto_scaling/auto_scaling_tests.rb +0 -111
- data/tests/requests/auto_scaling/describe_types_tests.rb +0 -102
- data/tests/requests/auto_scaling/helper.rb +0 -229
- data/tests/requests/auto_scaling/model_tests.rb +0 -235
- data/tests/requests/auto_scaling/notification_configuration_tests.rb +0 -124
- data/tests/requests/auto_scaling/tag_tests.rb +0 -63
- data/tests/requests/beanstalk/application_tests.rb +0 -140
- data/tests/requests/beanstalk/solution_stack_tests.rb +0 -22
- data/tests/requests/cdn/cdn_tests.rb +0 -252
- data/tests/requests/cloud_formation/stack_tests.rb +0 -167
- data/tests/requests/cloud_watch/get_metric_statistics_tests.rb +0 -28
- data/tests/requests/cloud_watch/list_metrics_test.rb +0 -64
- data/tests/requests/cloud_watch/put_metric_data_tests.rb +0 -36
- data/tests/requests/compute/address_tests.rb +0 -144
- data/tests/requests/compute/assign_private_ip_tests.rb +0 -55
- data/tests/requests/compute/availability_zone_tests.rb +0 -25
- data/tests/requests/compute/client_tests.rb +0 -25
- data/tests/requests/compute/dhcp_options_tests.rb +0 -39
- data/tests/requests/compute/helper.rb +0 -27
- data/tests/requests/compute/image_tests.rb +0 -169
- data/tests/requests/compute/instance_attrib_tests.rb +0 -168
- data/tests/requests/compute/instance_tests.rb +0 -338
- data/tests/requests/compute/internet_gateway_tests.rb +0 -49
- data/tests/requests/compute/key_pair_tests.rb +0 -67
- data/tests/requests/compute/network_acl_tests.rb +0 -112
- data/tests/requests/compute/network_interface_tests.rb +0 -239
- data/tests/requests/compute/placement_group_tests.rb +0 -48
- data/tests/requests/compute/region_tests.rb +0 -52
- data/tests/requests/compute/route_tests.rb +0 -341
- data/tests/requests/compute/security_group_tests.rb +0 -446
- data/tests/requests/compute/snapshot_tests.rb +0 -77
- data/tests/requests/compute/spot_datafeed_subscription_tests.rb +0 -47
- data/tests/requests/compute/spot_instance_tests.rb +0 -55
- data/tests/requests/compute/spot_price_history_tests.rb +0 -23
- data/tests/requests/compute/subnet_tests.rb +0 -87
- data/tests/requests/compute/tag_tests.rb +0 -101
- data/tests/requests/compute/volume_tests.rb +0 -263
- data/tests/requests/compute/vpc_tests.rb +0 -216
- data/tests/requests/data_pipeline/helper.rb +0 -78
- data/tests/requests/data_pipeline/pipeline_tests.rb +0 -80
- data/tests/requests/dns/change_resource_record_sets_tests.rb +0 -34
- data/tests/requests/dns/dns_tests.rb +0 -240
- data/tests/requests/dns/health_check_tests.rb +0 -159
- data/tests/requests/dns/helper.rb +0 -21
- data/tests/requests/dynamodb/item_tests.rb +0 -137
- data/tests/requests/dynamodb/table_tests.rb +0 -99
- data/tests/requests/ecs/cluster_tests.rb +0 -112
- data/tests/requests/ecs/container_instance_tests.rb +0 -119
- data/tests/requests/ecs/helper.rb +0 -276
- data/tests/requests/ecs/sample_task_definition1.json +0 -56
- data/tests/requests/ecs/service_tests.rb +0 -132
- data/tests/requests/ecs/task_definitions_tests.rb +0 -97
- data/tests/requests/ecs/task_tests.rb +0 -145
- data/tests/requests/efs/file_system_tests.rb +0 -152
- data/tests/requests/efs/helper.rb +0 -44
- data/tests/requests/elasticache/cache_cluster_tests.rb +0 -137
- data/tests/requests/elasticache/describe_events.rb +0 -17
- data/tests/requests/elasticache/describe_reserved_cache_nodes.rb +0 -17
- data/tests/requests/elasticache/helper.rb +0 -103
- data/tests/requests/elasticache/parameter_group_tests.rb +0 -105
- data/tests/requests/elasticache/security_group_tests.rb +0 -108
- data/tests/requests/elasticache/subnet_group_tests.rb +0 -52
- data/tests/requests/elb/helper.rb +0 -91
- data/tests/requests/elb/listener_tests.rb +0 -68
- data/tests/requests/elb/load_balancer_tests.rb +0 -89
- data/tests/requests/elb/policy_tests.rb +0 -132
- data/tests/requests/emr/helper.rb +0 -167
- data/tests/requests/emr/instance_group_tests.rb +0 -106
- data/tests/requests/emr/job_flow_tests.rb +0 -88
- data/tests/requests/federation/get_signin_token_tests.rb +0 -11
- data/tests/requests/glacier/archive_tests.rb +0 -13
- data/tests/requests/glacier/multipart_upload_tests.rb +0 -29
- data/tests/requests/glacier/tree_hash_tests.rb +0 -91
- data/tests/requests/glacier/vault_tests.rb +0 -35
- data/tests/requests/iam/access_key_tests.rb +0 -53
- data/tests/requests/iam/account_policy_tests.rb +0 -20
- data/tests/requests/iam/account_tests.rb +0 -34
- data/tests/requests/iam/group_policy_tests.rb +0 -48
- data/tests/requests/iam/group_tests.rb +0 -44
- data/tests/requests/iam/helper.rb +0 -154
- data/tests/requests/iam/instance_profile_tests.rb +0 -44
- data/tests/requests/iam/login_profile_tests.rb +0 -62
- data/tests/requests/iam/managed_policy_tests.rb +0 -110
- data/tests/requests/iam/mfa_tests.rb +0 -23
- data/tests/requests/iam/role_tests.rb +0 -156
- data/tests/requests/iam/server_certificate_tests.rb +0 -130
- data/tests/requests/iam/user_policy_tests.rb +0 -45
- data/tests/requests/iam/user_tests.rb +0 -78
- data/tests/requests/iam/versioned_managed_policy_tests.rb +0 -105
- data/tests/requests/kinesis/helper.rb +0 -111
- data/tests/requests/kinesis/stream_tests.rb +0 -169
- data/tests/requests/kms/helper.rb +0 -27
- data/tests/requests/kms/key_tests.rb +0 -23
- data/tests/requests/lambda/function_sample_1.js +0 -9
- data/tests/requests/lambda/function_sample_2.js +0 -9
- data/tests/requests/lambda/function_tests.rb +0 -460
- data/tests/requests/lambda/helper.rb +0 -81
- data/tests/requests/rds/cluster_snapshot_tests.rb +0 -43
- data/tests/requests/rds/cluster_tests.rb +0 -37
- data/tests/requests/rds/db_engine_versions.rb +0 -7
- data/tests/requests/rds/db_snapshot_tests.rb +0 -62
- data/tests/requests/rds/describe_events.rb +0 -16
- data/tests/requests/rds/event_subscription_tests.rb +0 -30
- data/tests/requests/rds/helper.rb +0 -406
- data/tests/requests/rds/instance_option_tests.rb +0 -27
- data/tests/requests/rds/instance_tests.rb +0 -149
- data/tests/requests/rds/log_file_tests.rb +0 -19
- data/tests/requests/rds/parameter_group_tests.rb +0 -62
- data/tests/requests/rds/parameter_request_tests.rb +0 -32
- data/tests/requests/rds/security_group_tests.rb +0 -101
- data/tests/requests/rds/subnet_groups_tests.rb +0 -52
- data/tests/requests/rds/tagging_tests.rb +0 -78
- data/tests/requests/redshift/cluster_parameter_group_tests.rb +0 -76
- data/tests/requests/redshift/cluster_security_group_tests.rb +0 -42
- data/tests/requests/redshift/cluster_snapshot_tests.rb +0 -73
- data/tests/requests/redshift/cluster_tests.rb +0 -80
- data/tests/requests/ses/helper.rb +0 -9
- data/tests/requests/ses/verified_domain_identity_tests.rb +0 -16
- data/tests/requests/ses/verified_email_address_tests.rb +0 -27
- data/tests/requests/simpledb/attributes_tests.rb +0 -86
- data/tests/requests/simpledb/domain_tests.rb +0 -51
- data/tests/requests/simpledb/helper.rb +0 -10
- data/tests/requests/sns/helper.rb +0 -9
- data/tests/requests/sns/subscription_tests.rb +0 -86
- data/tests/requests/sns/topic_tests.rb +0 -53
- data/tests/requests/sqs/helper.rb +0 -9
- data/tests/requests/sqs/message_tests.rb +0 -51
- data/tests/requests/sqs/queue_tests.rb +0 -50
- data/tests/requests/storage/acl_utils_tests.rb +0 -209
- data/tests/requests/storage/bucket_tests.rb +0 -416
- data/tests/requests/storage/cors_utils_tests.rb +0 -108
- data/tests/requests/storage/delete_multiple_objects_tests.rb +0 -12
- data/tests/requests/storage/multipart_upload_tests.rb +0 -121
- data/tests/requests/storage/object_tests.rb +0 -262
- data/tests/requests/storage/versioning_tests.rb +0 -262
- data/tests/requests/sts/assume_role_tests.rb +0 -19
- data/tests/requests/sts/assume_role_with_saml_tests.rb +0 -18
- data/tests/requests/sts/assume_role_with_web_identity_tests.rb +0 -28
- data/tests/requests/sts/get_federation_token_tests.rb +0 -20
- data/tests/requests/sts/session_token_tests.rb +0 -16
- data/tests/requests/support/helper.rb +0 -43
- data/tests/requests/support/trusted_advisor_check_tests.rb +0 -16
- data/tests/signaturev4_tests.rb +0 -106
- data/tests/signed_params_tests.rb +0 -17
- data/tests/storage_tests.rb +0 -7
@@ -11,11 +11,12 @@ module Fog
|
|
11
11
|
# * response<~Excon::Response>:
|
12
12
|
# * body<~Hash>:
|
13
13
|
def remove_tags_from_resource(rds_id, keys)
|
14
|
+
resource_name = "arn:aws:rds:#{@region}:#{owner_id}:db:#{rds_id}"
|
15
|
+
%w[us-gov-west-1 us-gov-east-1].include?(@region) ? resource_name.insert(7, '-us-gov') : resource_name
|
14
16
|
request(
|
15
|
-
{ 'Action'
|
16
|
-
'ResourceName'
|
17
|
-
:parser
|
18
|
-
}.merge(Fog::AWS.indexed_param('TagKeys.member.%d', keys))
|
17
|
+
{ 'Action' => 'RemoveTagsFromResource',
|
18
|
+
'ResourceName' => resource_name,
|
19
|
+
:parser => Fog::Parsers::AWS::RDS::Base.new }.merge(Fog::AWS.indexed_param('TagKeys.member.%d', keys))
|
19
20
|
)
|
20
21
|
end
|
21
22
|
end
|
@@ -23,15 +24,15 @@ module Fog
|
|
23
24
|
class Mock
|
24
25
|
def remove_tags_from_resource(rds_id, keys)
|
25
26
|
response = Excon::Response.new
|
26
|
-
if server =
|
27
|
-
keys.each {|key|
|
27
|
+
if server = data[:servers][rds_id]
|
28
|
+
keys.each { |key| data[:tags][rds_id].delete key }
|
28
29
|
response.status = 200
|
29
30
|
response.body = {
|
30
|
-
|
31
|
+
'ResponseMetadata' => { 'RequestId' => Fog::AWS::Mock.request_id }
|
31
32
|
}
|
32
33
|
response
|
33
34
|
else
|
34
|
-
raise Fog::AWS::RDS::NotFound
|
35
|
+
raise Fog::AWS::RDS::NotFound, "DBInstance #{rds_id} not found"
|
35
36
|
end
|
36
37
|
end
|
37
38
|
end
|
@@ -36,13 +36,20 @@ module Fog
|
|
36
36
|
data << "<Quiet>true</Quiet>" if headers.delete(:quiet)
|
37
37
|
version_ids = headers.delete('versionId')
|
38
38
|
object_names.each do |object_name|
|
39
|
-
data << "<Object>"
|
40
|
-
data << "<Key>#{CGI.escapeHTML(object_name)}</Key>"
|
41
39
|
object_version = version_ids.nil? ? nil : version_ids[object_name]
|
42
40
|
if object_version
|
43
|
-
|
41
|
+
object_version = object_version.is_a?(String) ? [object_version] : object_version
|
42
|
+
object_version.each do |version_id|
|
43
|
+
data << "<Object>"
|
44
|
+
data << "<Key>#{CGI.escapeHTML(object_name)}</Key>"
|
45
|
+
data << "<VersionId>#{CGI.escapeHTML(version_id)}</VersionId>"
|
46
|
+
data << "</Object>"
|
47
|
+
end
|
48
|
+
else
|
49
|
+
data << "<Object>"
|
50
|
+
data << "<Key>#{CGI.escapeHTML(object_name)}</Key>"
|
51
|
+
data << "</Object>"
|
44
52
|
end
|
45
|
-
data << "</Object>"
|
46
53
|
end
|
47
54
|
data << "</Delete>"
|
48
55
|
|
@@ -72,10 +79,13 @@ module Fog
|
|
72
79
|
response.body = { 'DeleteResult' => [] }
|
73
80
|
version_ids = headers.delete('versionId')
|
74
81
|
object_names.each do |object_name|
|
75
|
-
object_version = version_ids.nil? ? nil : version_ids[object_name]
|
76
|
-
|
77
|
-
|
78
|
-
|
82
|
+
object_version = version_ids.nil? ? [nil] : version_ids[object_name]
|
83
|
+
object_version = object_version.is_a?(String) ? [object_version] : object_version
|
84
|
+
object_version.each do |version_id|
|
85
|
+
response.body['DeleteResult'] << delete_object_helper(bucket,
|
86
|
+
object_name,
|
87
|
+
version_id)
|
88
|
+
end
|
79
89
|
end
|
80
90
|
else
|
81
91
|
response.status = 404
|
@@ -0,0 +1,41 @@
|
|
1
|
+
module Fog
|
2
|
+
module AWS
|
3
|
+
class Storage
|
4
|
+
class Real
|
5
|
+
require 'fog/aws/parsers/storage/get_object_tagging'
|
6
|
+
|
7
|
+
# Get tags for an S3 object
|
8
|
+
#
|
9
|
+
# @param bucket_name [String] Name of bucket to read from
|
10
|
+
# @param object_name [String] Name of object to get tags for
|
11
|
+
#
|
12
|
+
# @return [Excon::Response] response:
|
13
|
+
# * body [Hash]:
|
14
|
+
# * ObjectTagging [Hash]:
|
15
|
+
# * Key [String] - tag key
|
16
|
+
# * Value [String] - tag value
|
17
|
+
# @see https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html
|
18
|
+
|
19
|
+
def get_object_tagging(bucket_name, object_name)
|
20
|
+
unless bucket_name
|
21
|
+
raise ArgumentError.new('bucket_name is required')
|
22
|
+
end
|
23
|
+
unless object_name
|
24
|
+
raise ArgumentError.new('object_name is required')
|
25
|
+
end
|
26
|
+
|
27
|
+
request({
|
28
|
+
:expects => 200,
|
29
|
+
:headers => {},
|
30
|
+
:bucket_name => bucket_name,
|
31
|
+
:object_name => object_name,
|
32
|
+
:idempotent => true,
|
33
|
+
:method => 'GET',
|
34
|
+
:parser => Fog::Parsers::AWS::Storage::GetObjectTagging.new,
|
35
|
+
:query => {'tagging' => nil}
|
36
|
+
})
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
module Fog
|
2
|
+
module AWS
|
3
|
+
class Storage
|
4
|
+
class Real
|
5
|
+
# Change tag set for an S3 object
|
6
|
+
#
|
7
|
+
# @param bucket_name [String] Name of bucket to modify object in
|
8
|
+
# @param object_name [String] Name of object to modify
|
9
|
+
#
|
10
|
+
# @param tags [Hash]:
|
11
|
+
# * Key [String]: tag key
|
12
|
+
# * Value [String]: tag value
|
13
|
+
#
|
14
|
+
# @see https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectTagging.html
|
15
|
+
|
16
|
+
def put_object_tagging(bucket_name, object_name, tags)
|
17
|
+
tagging = tags.map do |k,v|
|
18
|
+
"<Tag><Key>#{k}</Key><Value>#{v}</Value></Tag>"
|
19
|
+
end.join("\n")
|
20
|
+
data =
|
21
|
+
<<-DATA
|
22
|
+
<Tagging xmlns="http://doc.s3.amazonaws.com/2006-03-01" >
|
23
|
+
<TagSet>
|
24
|
+
#{tagging}
|
25
|
+
</TagSet>
|
26
|
+
</Tagging>
|
27
|
+
DATA
|
28
|
+
|
29
|
+
request({
|
30
|
+
:body => data,
|
31
|
+
:expects => 200,
|
32
|
+
:headers => {'Content-MD5' => Base64.encode64(OpenSSL::Digest::MD5.digest(data)).chomp!, 'Content-Type' => 'application/xml'},
|
33
|
+
:bucket_name => bucket_name,
|
34
|
+
:object_name => object_name,
|
35
|
+
:method => 'PUT',
|
36
|
+
:query => {'tagging' => nil}
|
37
|
+
})
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -6,12 +6,20 @@ module Fog
|
|
6
6
|
#
|
7
7
|
def sync_clock
|
8
8
|
response = begin
|
9
|
-
|
9
|
+
Excon.get(sync_clock_url)
|
10
10
|
rescue Excon::Errors::HTTPStatusError => error
|
11
11
|
error.response
|
12
12
|
end
|
13
13
|
Fog::Time.now = Time.parse(response.headers['Date'])
|
14
14
|
end
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def sync_clock_url
|
19
|
+
host = @acceleration ? region_to_host(@region) : @host
|
20
|
+
|
21
|
+
"#{@scheme}://#{host}"
|
22
|
+
end
|
15
23
|
end # Real
|
16
24
|
|
17
25
|
class Mock # :nodoc:all
|
@@ -0,0 +1,119 @@
|
|
1
|
+
module Fog
|
2
|
+
module AWS
|
3
|
+
class Storage
|
4
|
+
# From https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
|
5
|
+
ALLOWED_UPLOAD_PART_OPTIONS = %i(
|
6
|
+
x-amz-copy-source
|
7
|
+
x-amz-copy-source-if-match
|
8
|
+
x-amz-copy-source-if-modified-since
|
9
|
+
x-amz-copy-source-if-none-match
|
10
|
+
x-amz-copy-source-if-unmodified-since
|
11
|
+
x-amz-copy-source-range
|
12
|
+
x-amz-copy-source-server-side-encryption-customer-algorithm
|
13
|
+
x-amz-copy-source-server-side-encryption-customer-key
|
14
|
+
x-amz-copy-source-server-side-encryption-customer-key-MD5
|
15
|
+
x-amz-expected-bucket-owner
|
16
|
+
x-amz-request-payer
|
17
|
+
x-amz-server-side-encryption-customer-algorithm
|
18
|
+
x-amz-server-side-encryption-customer-key
|
19
|
+
x-amz-server-side-encryption-customer-key-MD5
|
20
|
+
x-amz-source-expected-bucket-owner
|
21
|
+
).freeze
|
22
|
+
|
23
|
+
class Real
|
24
|
+
require 'fog/aws/parsers/storage/upload_part_copy_object'
|
25
|
+
|
26
|
+
# Upload a part for a multipart copy
|
27
|
+
#
|
28
|
+
# @param target_bucket_name [String] Name of bucket to create copy in
|
29
|
+
# @param target_object_name [String] Name for new copy of object
|
30
|
+
# @param upload_id [String] Id of upload to add part to
|
31
|
+
# @param part_number [String] Index of part in upload
|
32
|
+
# @param options [Hash]:
|
33
|
+
# @option options [String] x-amz-metadata-directive Specifies whether to copy metadata from source or replace with data in request. Must be in ['COPY', 'REPLACE']
|
34
|
+
# @option options [String] x-amz-copy_source-if-match Copies object if its etag matches this value
|
35
|
+
# @option options [Time] x-amz-copy_source-if-modified_since Copies object it it has been modified since this time
|
36
|
+
# @option options [String] x-amz-copy_source-if-none-match Copies object if its etag does not match this value
|
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 Specifes the range of bytes to copy from the source object
|
39
|
+
#
|
40
|
+
# @return [Excon::Response]
|
41
|
+
# * body [Hash]:
|
42
|
+
# * ETag [String] - etag of new object
|
43
|
+
# * LastModified [Time] - date object was last modified
|
44
|
+
#
|
45
|
+
# @see https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
|
46
|
+
#
|
47
|
+
def upload_part_copy(target_bucket_name, target_object_name, upload_id, part_number, options = {})
|
48
|
+
headers = options
|
49
|
+
request({
|
50
|
+
:expects => 200,
|
51
|
+
:idempotent => true,
|
52
|
+
:headers => headers,
|
53
|
+
:bucket_name => target_bucket_name,
|
54
|
+
:object_name => target_object_name,
|
55
|
+
:method => 'PUT',
|
56
|
+
:query => {'uploadId' => upload_id, 'partNumber' => part_number},
|
57
|
+
:parser => Fog::Parsers::AWS::Storage::UploadPartCopyObject.new,
|
58
|
+
})
|
59
|
+
end
|
60
|
+
end # Real
|
61
|
+
|
62
|
+
class Mock # :nodoc:all
|
63
|
+
require 'fog/aws/requests/storage/shared_mock_methods'
|
64
|
+
include Fog::AWS::Storage::SharedMockMethods
|
65
|
+
|
66
|
+
def upload_part_copy(target_bucket_name, target_object_name, upload_id, part_number, options = {})
|
67
|
+
validate_options!(options)
|
68
|
+
|
69
|
+
copy_source = options['x-amz-copy-source']
|
70
|
+
copy_range = options['x-amz-copy-source-range']
|
71
|
+
|
72
|
+
raise 'No x-amz-copy-source header provided' unless copy_source
|
73
|
+
raise 'No x-amz-copy-source-range header provided' unless copy_range
|
74
|
+
|
75
|
+
source_bucket_name, source_object_name = copy_source.split('/', 2)
|
76
|
+
verify_mock_bucket_exists(source_bucket_name)
|
77
|
+
|
78
|
+
source_bucket = self.data[:buckets][source_bucket_name]
|
79
|
+
source_object = source_bucket && source_bucket[:objects][source_object_name] && source_bucket[:objects][source_object_name].first
|
80
|
+
upload_info = get_upload_info(target_bucket_name, upload_id)
|
81
|
+
|
82
|
+
response = Excon::Response.new
|
83
|
+
|
84
|
+
if source_object
|
85
|
+
start_pos, end_pos = byte_range(copy_range, source_object[:body].length)
|
86
|
+
upload_info[:parts][part_number] = source_object[:body][start_pos..end_pos]
|
87
|
+
|
88
|
+
response.status = 200
|
89
|
+
response.body = {
|
90
|
+
# just use the part number as the ETag, for simplicity
|
91
|
+
'ETag' => part_number.to_i,
|
92
|
+
'LastModified' => Time.parse(source_object['Last-Modified'])
|
93
|
+
}
|
94
|
+
response
|
95
|
+
else
|
96
|
+
response.status = 404
|
97
|
+
raise(Excon::Errors.status_error({:expects => 200}, response))
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
def byte_range(range, size)
|
102
|
+
matches = range.match(/bytes=(\d*)-(\d*)/)
|
103
|
+
|
104
|
+
return nil unless matches
|
105
|
+
|
106
|
+
end_pos = [matches[2].to_i, size].min
|
107
|
+
|
108
|
+
[matches[1].to_i, end_pos]
|
109
|
+
end
|
110
|
+
|
111
|
+
def validate_options!(options)
|
112
|
+
options.keys.each do |key|
|
113
|
+
raise "Invalid UploadPart option: #{key}" unless ::Fog::AWS::Storage::ALLOWED_UPLOAD_PART_OPTIONS.include?(key.to_sym)
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end # Mock
|
117
|
+
end # Storage
|
118
|
+
end # AWS
|
119
|
+
end # Fog
|
@@ -6,12 +6,13 @@ module Fog
|
|
6
6
|
|
7
7
|
def assume_role_with_web_identity(role_arn, web_identity_token, role_session_name, options={})
|
8
8
|
request_unsigned(
|
9
|
-
'Action'
|
10
|
-
'RoleArn'
|
11
|
-
'RoleSessionName'
|
12
|
-
'
|
13
|
-
|
14
|
-
:
|
9
|
+
'Action' => 'AssumeRoleWithWebIdentity',
|
10
|
+
'RoleArn' => role_arn,
|
11
|
+
'RoleSessionName' => role_session_name,
|
12
|
+
'WebIdentityToken' => web_identity_token,
|
13
|
+
'DurationSeconds' => options[:duration] || 3600,
|
14
|
+
:idempotent => true,
|
15
|
+
:parser => Fog::Parsers::AWS::STS::AssumeRoleWithWebIdentity.new
|
15
16
|
)
|
16
17
|
end
|
17
18
|
end
|
data/lib/fog/aws/storage.rb
CHANGED
@@ -14,6 +14,9 @@ module Fog
|
|
14
14
|
'https' => 443
|
15
15
|
}
|
16
16
|
|
17
|
+
MIN_MULTIPART_CHUNK_SIZE = 5242880
|
18
|
+
MAX_SINGLE_PUT_SIZE = 5368709120
|
19
|
+
|
17
20
|
VALID_QUERY_KEYS = %w[
|
18
21
|
acl
|
19
22
|
cors
|
@@ -43,7 +46,7 @@ module Fog
|
|
43
46
|
]
|
44
47
|
|
45
48
|
requires :aws_access_key_id, :aws_secret_access_key
|
46
|
-
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
|
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
|
47
50
|
|
48
51
|
secrets :aws_secret_access_key, :hmac
|
49
52
|
|
@@ -84,6 +87,7 @@ module Fog
|
|
84
87
|
request :get_object_http_url
|
85
88
|
request :get_object_https_url
|
86
89
|
request :get_object_url
|
90
|
+
request :get_object_tagging
|
87
91
|
request :get_request_payment
|
88
92
|
request :get_service
|
89
93
|
request :head_bucket
|
@@ -107,12 +111,26 @@ module Fog
|
|
107
111
|
request :put_object
|
108
112
|
request :put_object_acl
|
109
113
|
request :put_object_url
|
114
|
+
request :put_object_tagging
|
110
115
|
request :put_request_payment
|
111
116
|
request :sync_clock
|
112
117
|
request :upload_part
|
118
|
+
request :upload_part_copy
|
113
119
|
|
114
120
|
module Utils
|
115
121
|
attr_accessor :region
|
122
|
+
attr_accessor :disable_content_md5_validation
|
123
|
+
|
124
|
+
# Amazon S3 limits max chunk size that can be uploaded/copied in a single request to 5GB.
|
125
|
+
# Other S3-compatible storages (like, Ceph) do not have such limit.
|
126
|
+
# Ceph shows much better performance when file is copied as a whole, in a single request.
|
127
|
+
# fog-aws user can use these settings to configure chunk sizes.
|
128
|
+
# A non-positive value will tell fog-aws to use a single put/copy request regardless of file size.
|
129
|
+
#
|
130
|
+
# @return [Integer]
|
131
|
+
# @see https://docs.aws.amazon.com/AmazonS3/latest/userguide/copy-object.html
|
132
|
+
attr_reader :max_put_chunk_size
|
133
|
+
attr_reader :max_copy_chunk_size
|
116
134
|
|
117
135
|
def cdn
|
118
136
|
@cdn ||= Fog::AWS::CDN.new(
|
@@ -168,6 +186,12 @@ module Fog
|
|
168
186
|
params_to_url(params)
|
169
187
|
end
|
170
188
|
|
189
|
+
# @param value [int]
|
190
|
+
# @param description [str]
|
191
|
+
def validate_chunk_size(value, description)
|
192
|
+
raise "#{description} (#{value}) is less than minimum #{MIN_MULTIPART_CHUNK_SIZE}" unless value <= 0 || value >= MIN_MULTIPART_CHUNK_SIZE
|
193
|
+
end
|
194
|
+
|
171
195
|
private
|
172
196
|
|
173
197
|
def validate_signature_version!
|
@@ -176,6 +200,16 @@ module Fog
|
|
176
200
|
end
|
177
201
|
end
|
178
202
|
|
203
|
+
def init_max_put_chunk_size!(options = {})
|
204
|
+
@max_put_chunk_size = options.fetch(:max_put_chunk_size, MAX_SINGLE_PUT_SIZE)
|
205
|
+
validate_chunk_size(@max_put_chunk_size, 'max_put_chunk_size')
|
206
|
+
end
|
207
|
+
|
208
|
+
def init_max_copy_chunk_size!(options = {})
|
209
|
+
@max_copy_chunk_size = options.fetch(:max_copy_chunk_size, MAX_SINGLE_PUT_SIZE)
|
210
|
+
validate_chunk_size(@max_copy_chunk_size, 'max_copy_chunk_size')
|
211
|
+
end
|
212
|
+
|
179
213
|
def v4_signed_params_for_url(params, expires)
|
180
214
|
now = Fog::Time.now
|
181
215
|
|
@@ -225,7 +259,7 @@ module Fog
|
|
225
259
|
when %r{\Acn-.*}
|
226
260
|
"s3.#{region}.amazonaws.com.cn"
|
227
261
|
else
|
228
|
-
"s3
|
262
|
+
"s3.#{region}.amazonaws.com"
|
229
263
|
end
|
230
264
|
end
|
231
265
|
|
@@ -281,10 +315,10 @@ module Fog
|
|
281
315
|
path_style = params.fetch(:path_style, @path_style)
|
282
316
|
if !path_style
|
283
317
|
if COMPLIANT_BUCKET_NAMES !~ bucket_name
|
284
|
-
Fog::Logger.warning("fog: the specified s3 bucket name(#{bucket_name}) is not a valid dns name, which will negatively impact performance. For details see:
|
318
|
+
Fog::Logger.warning("fog: the specified s3 bucket name(#{bucket_name}) is not a valid dns name, which will negatively impact performance. For details see: https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html")
|
285
319
|
path_style = true
|
286
320
|
elsif scheme == 'https' && !path_style && bucket_name =~ /\./
|
287
|
-
Fog::Logger.warning("fog: the specified s3 bucket name(#{bucket_name}) contains a '.' so is not accessible over https as a virtual hosted bucket, which will negatively impact performance. For details see:
|
321
|
+
Fog::Logger.warning("fog: the specified s3 bucket name(#{bucket_name}) contains a '.' so is not accessible over https as a virtual hosted bucket, which will negatively impact performance. For details see: https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html")
|
288
322
|
path_style = true
|
289
323
|
end
|
290
324
|
end
|
@@ -295,6 +329,8 @@ module Fog
|
|
295
329
|
host = params.fetch(:cname, bucket_name)
|
296
330
|
elsif path_style
|
297
331
|
path = bucket_to_path bucket_name, path
|
332
|
+
elsif host.start_with?("#{bucket_name}.")
|
333
|
+
# no-op
|
298
334
|
else
|
299
335
|
host = [bucket_name, host].join('.')
|
300
336
|
end
|
@@ -447,6 +483,12 @@ module Fog
|
|
447
483
|
|
448
484
|
|
449
485
|
@path_style = options[:path_style] || false
|
486
|
+
|
487
|
+
init_max_put_chunk_size!(options)
|
488
|
+
init_max_copy_chunk_size!(options)
|
489
|
+
|
490
|
+
@disable_content_md5_validation = options[:disable_content_md5_validation] || false
|
491
|
+
|
450
492
|
@signature_version = options.fetch(:aws_signature_version, 4)
|
451
493
|
validate_signature_version!
|
452
494
|
setup_credentials(options)
|
@@ -461,6 +503,8 @@ module Fog
|
|
461
503
|
end
|
462
504
|
|
463
505
|
def setup_credentials(options)
|
506
|
+
@aws_credentials_refresh_threshold_seconds = options[:aws_credentials_refresh_threshold_seconds]
|
507
|
+
|
464
508
|
@aws_access_key_id = options[:aws_access_key_id]
|
465
509
|
@aws_secret_access_key = options[:aws_secret_access_key]
|
466
510
|
@aws_session_token = options[:aws_session_token]
|
@@ -502,7 +546,7 @@ module Fog
|
|
502
546
|
@use_iam_profile = options[:use_iam_profile]
|
503
547
|
@instrumentor = options[:instrumentor]
|
504
548
|
@instrumentor_name = options[:instrumentor_name] || 'fog.aws.storage'
|
505
|
-
@connection_options = options[:connection_options] || {}
|
549
|
+
@connection_options = options[:connection_options] || { retry_limit: 5, retry_interval: 1 }
|
506
550
|
@persistent = options.fetch(:persistent, false)
|
507
551
|
@acceleration = options.fetch(:acceleration, false)
|
508
552
|
@signature_version = options.fetch(:aws_signature_version, 4)
|
@@ -510,6 +554,11 @@ module Fog
|
|
510
554
|
validate_signature_version!
|
511
555
|
@path_style = options[:path_style] || false
|
512
556
|
|
557
|
+
init_max_put_chunk_size!(options)
|
558
|
+
init_max_copy_chunk_size!(options)
|
559
|
+
|
560
|
+
@disable_content_md5_validation = options[:disable_content_md5_validation] || false
|
561
|
+
|
513
562
|
@region = options[:region] || DEFAULT_REGION
|
514
563
|
|
515
564
|
if @endpoint = options[:endpoint]
|
@@ -535,6 +584,8 @@ module Fog
|
|
535
584
|
|
536
585
|
|
537
586
|
def setup_credentials(options)
|
587
|
+
@aws_credentials_refresh_threshold_seconds = options[:aws_credentials_refresh_threshold_seconds]
|
588
|
+
|
538
589
|
@aws_access_key_id = options[:aws_access_key_id]
|
539
590
|
@aws_secret_access_key = options[:aws_secret_access_key]
|
540
591
|
@aws_session_token = options[:aws_session_token]
|
data/lib/fog/aws/version.rb
CHANGED
data/lib/fog/aws.rb
CHANGED
@@ -26,6 +26,7 @@ module Fog
|
|
26
26
|
autoload :ECS, File.expand_path('../aws/ecs', __FILE__)
|
27
27
|
autoload :EFS, File.expand_path('../aws/efs', __FILE__)
|
28
28
|
autoload :ELB, File.expand_path('../aws/elb', __FILE__)
|
29
|
+
autoload :ELBV2, File.expand_path('../aws/elbv2', __FILE__)
|
29
30
|
autoload :EMR, File.expand_path('../aws/emr', __FILE__)
|
30
31
|
autoload :ElasticBeanstalk, File.expand_path('../aws/beanstalk', __FILE__)
|
31
32
|
autoload :Elasticache, File.expand_path('../aws/elasticache', __FILE__)
|
@@ -58,6 +59,7 @@ module Fog
|
|
58
59
|
service(:ecs, 'ECS')
|
59
60
|
service(:efs, 'EFS')
|
60
61
|
service(:elb, 'ELB')
|
62
|
+
service(:elbv2, 'ELBV2')
|
61
63
|
service(:emr, 'EMR')
|
62
64
|
service(:federation, 'Federation')
|
63
65
|
service(:glacier, 'Glacier')
|
@@ -218,19 +220,22 @@ module Fog
|
|
218
220
|
|
219
221
|
def self.regions
|
220
222
|
@regions ||= [
|
223
|
+
'af-south-1',
|
221
224
|
'ap-east-1',
|
222
225
|
'ap-northeast-1', 'ap-northeast-2', 'ap-northeast-3',
|
223
226
|
'ap-south-1',
|
224
|
-
'ap-southeast-1', 'ap-southeast-2',
|
227
|
+
'ap-southeast-1', 'ap-southeast-2', 'ap-southeast-3', 'ap-southeast-4',
|
225
228
|
'ca-central-1',
|
226
229
|
'cn-north-1',
|
227
230
|
'cn-northwest-1',
|
228
231
|
'eu-central-1',
|
229
232
|
'eu-north-1',
|
230
|
-
'eu-west-1', 'eu-west-2', 'eu-west-3',
|
233
|
+
'eu-west-1', 'eu-west-2', 'eu-west-3', 'eu-south-1', 'eu-south-2',
|
234
|
+
'me-south-1','me-central-1',
|
231
235
|
'us-east-1', 'us-east-2',
|
232
236
|
'us-west-1', 'us-west-2',
|
233
237
|
'sa-east-1',
|
238
|
+
'us-gov-east-1',
|
234
239
|
'us-gov-west-1'
|
235
240
|
]
|
236
241
|
end
|