fog-aws 3.5.2 → 3.6.6
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/.gitignore +1 -0
- data/CHANGELOG.md +82 -7
- data/LICENSE.md +1 -1
- data/README.md +39 -6
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/fog-aws.gemspec +3 -3
- data/lib/fog/aws.rb +6 -1
- data/lib/fog/aws/credential_fetcher.rb +27 -4
- 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 +1556 -134
- data/lib/fog/aws/models/compute/server.rb +4 -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/directory.rb +0 -1
- data/lib/fog/aws/models/storage/file.rb +3 -0
- 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_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/storage/get_object_tagging.rb +33 -0
- data/lib/fog/aws/parsers/sts/assume_role_with_web_identity.rb +1 -1
- data/lib/fog/aws/requests/compute/create_vpc.rb +2 -2
- data/lib/fog/aws/requests/compute/run_instances.rb +20 -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/storage/get_object_tagging.rb +41 -0
- data/lib/fog/aws/requests/storage/put_object_tagging.rb +42 -0
- data/lib/fog/aws/requests/sts/assume_role_with_web_identity.rb +7 -6
- data/lib/fog/aws/storage.rb +2 -0
- data/lib/fog/aws/version.rb +1 -1
- data/tests/credentials_tests.rb +20 -0
- data/tests/parsers/elbv2/create_load_balancer_tests.rb +48 -0
- data/tests/parsers/elbv2/describe_listeners_tests.rb +76 -0
- data/tests/parsers/elbv2/describe_load_balancers_tests.rb +54 -0
- data/tests/parsers/elbv2/describe_tags_tests.rb +35 -0
- data/tests/requests/compute/vpc_tests.rb +6 -0
- data/tests/requests/elbv2/helper.rb +66 -0
- data/tests/requests/elbv2/load_balancer_tests.rb +50 -0
- metadata +32 -9
@@ -14,6 +14,7 @@ module Fog
|
|
14
14
|
attribute :associate_public_ip, :aliases => 'associatePublicIP'
|
15
15
|
attribute :availability_zone, :aliases => 'availabilityZone'
|
16
16
|
attribute :block_device_mapping, :aliases => 'blockDeviceMapping'
|
17
|
+
attribute :hibernation_options, :aliases => 'hibernationOptions'
|
17
18
|
attribute :network_interfaces, :aliases => 'networkInterfaces'
|
18
19
|
attribute :client_token, :aliases => 'clientToken'
|
19
20
|
attribute :disable_api_termination, :aliases => 'disableApiTermination'
|
@@ -144,6 +145,7 @@ module Fog
|
|
144
145
|
|
145
146
|
options = {
|
146
147
|
'BlockDeviceMapping' => block_device_mapping,
|
148
|
+
'HibernationOptions' => hibernation_options,
|
147
149
|
'NetworkInterfaces' => network_interfaces,
|
148
150
|
'ClientToken' => client_token,
|
149
151
|
'DisableApiTermination' => disable_api_termination,
|
@@ -227,9 +229,9 @@ module Fog
|
|
227
229
|
true
|
228
230
|
end
|
229
231
|
|
230
|
-
def stop(
|
232
|
+
def stop(options = {})
|
231
233
|
requires :id
|
232
|
-
service.stop_instances(id,
|
234
|
+
service.stop_instances(id, options)
|
233
235
|
true
|
234
236
|
end
|
235
237
|
|
@@ -22,6 +22,7 @@ module Fog
|
|
22
22
|
# ami_launch_index=nil,
|
23
23
|
# availability_zone=nil,
|
24
24
|
# block_device_mapping=nil,
|
25
|
+
# hibernation_options=nil,
|
25
26
|
# network_interfaces=nil,
|
26
27
|
# client_token=nil,
|
27
28
|
# dns_name=nil,
|
@@ -119,6 +120,7 @@ module Fog
|
|
119
120
|
# ami_launch_index=0,
|
120
121
|
# availability_zone="us-east-1b",
|
121
122
|
# block_device_mapping=[],
|
123
|
+
# hibernation_options=[],
|
122
124
|
# client_token=nil,
|
123
125
|
# dns_name="ec2-25-2-474-44.compute-1.amazonaws.com",
|
124
126
|
# groups=["default"],
|
@@ -7,12 +7,13 @@ module Fog
|
|
7
7
|
attribute :description
|
8
8
|
attribute :encrypted
|
9
9
|
attribute :progress
|
10
|
-
attribute :created_at,
|
11
|
-
attribute :owner_id,
|
12
|
-
attribute :state,
|
13
|
-
attribute :tags,
|
14
|
-
attribute :volume_id,
|
15
|
-
attribute :volume_size,
|
10
|
+
attribute :created_at, :aliases => 'startTime'
|
11
|
+
attribute :owner_id, :aliases => 'ownerId'
|
12
|
+
attribute :state, :aliases => 'status'
|
13
|
+
attribute :tags, :aliases => 'tagSet'
|
14
|
+
attribute :volume_id, :aliases => 'volumeId'
|
15
|
+
attribute :volume_size, :aliases => 'volumeSize'
|
16
|
+
attribute :status_message, :aliases => 'statusMessage'
|
16
17
|
|
17
18
|
def destroy
|
18
19
|
requires :id
|
@@ -39,7 +39,7 @@ module Fog
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def is_default?
|
42
|
-
|
42
|
+
requires :is_default
|
43
43
|
is_default
|
44
44
|
end
|
45
45
|
|
@@ -106,7 +106,13 @@ module Fog
|
|
106
106
|
|
107
107
|
def save
|
108
108
|
requires :cidr_block
|
109
|
-
|
109
|
+
|
110
|
+
options = {
|
111
|
+
'AmazonProvidedIpv6CidrBlock' => amazon_provided_ipv_6_cidr_block,
|
112
|
+
'InstanceTenancy' => tenancy
|
113
|
+
}
|
114
|
+
|
115
|
+
data = service.create_vpc(cidr_block, options).body['vpcSet'].first
|
110
116
|
new_attributes = data.reject {|key,value| key == 'requestId'}
|
111
117
|
new_attributes = data.reject {|key,value| key == 'requestId' || key == 'tagSet' }
|
112
118
|
merge_attributes(new_attributes)
|
@@ -12,7 +12,6 @@ module Fog
|
|
12
12
|
identity :key, :aliases => ['Name', 'name']
|
13
13
|
|
14
14
|
attribute :creation_date, :aliases => 'CreationDate', :type => 'time'
|
15
|
-
attribute :location, :aliases => 'LocationConstraint', :type => 'string'
|
16
15
|
|
17
16
|
def acl=(new_acl)
|
18
17
|
unless VALID_ACLS.include?(new_acl)
|
@@ -25,6 +25,7 @@ module Fog
|
|
25
25
|
attribute :encryption_key, :aliases => 'x-amz-server-side-encryption-customer-key'
|
26
26
|
attribute :version, :aliases => 'x-amz-version-id'
|
27
27
|
attribute :kms_key_id, :aliases => 'x-amz-server-side-encryption-aws-kms-key-id'
|
28
|
+
attribute :tags, :aliases => 'x-amz-tagging'
|
28
29
|
|
29
30
|
# @note Chunk size to use for multipart uploads.
|
30
31
|
# Use small chunk sizes to minimize memory. E.g. 5242880 = 5mb
|
@@ -192,6 +193,7 @@ module Fog
|
|
192
193
|
# @option options [String] expires sets number of seconds before AWS Object expires.
|
193
194
|
# @option options [String] storage_class sets x-amz-storage-class HTTP header. Defaults to 'STANDARD'. Or, 'REDUCED_REDUNDANCY'
|
194
195
|
# @option options [String] encryption sets HTTP encryption header. Set to 'AES256' to encrypt files at rest on S3
|
196
|
+
# @option options [String] tags sets x-amz-tagging HTTP header. For example, 'Org-Id=1' or 'Org-Id=1&Service=MyService'
|
195
197
|
# @return [Boolean] true if no errors
|
196
198
|
#
|
197
199
|
def save(options = {})
|
@@ -208,6 +210,7 @@ module Fog
|
|
208
210
|
options['Expires'] = expires if expires
|
209
211
|
options.merge!(metadata)
|
210
212
|
options['x-amz-storage-class'] = storage_class if storage_class
|
213
|
+
options['x-amz-tagging'] = tags if tags
|
211
214
|
options.merge!(encryption_headers)
|
212
215
|
|
213
216
|
# With a single PUT operation you can upload objects up to 5 GB in size. Automatically set MP for larger objects.
|
@@ -5,7 +5,7 @@ module Fog
|
|
5
5
|
class CreateSnapshot < Fog::Parsers::Base
|
6
6
|
def end_element(name)
|
7
7
|
case name
|
8
|
-
when 'description', 'ownerId', 'progress', 'snapshotId', 'status', 'volumeId'
|
8
|
+
when 'description', 'ownerId', 'progress', 'snapshotId', 'status', 'volumeId', 'statusMessage'
|
9
9
|
@response[name] = value
|
10
10
|
when 'requestId'
|
11
11
|
@response[name] = value
|
@@ -7,6 +7,10 @@ module Fog
|
|
7
7
|
@subnet = { 'tagSet' => {} }
|
8
8
|
@response = { 'subnet' => [] }
|
9
9
|
@tag = {}
|
10
|
+
@ipv6_cidr_block_association = {}
|
11
|
+
@in_tag_set = false
|
12
|
+
@in_ipv6_cidr_block_association_set = false
|
13
|
+
@in_cidr_block_state = false
|
10
14
|
end
|
11
15
|
|
12
16
|
def start_element(name, attrs = [])
|
@@ -14,19 +18,42 @@ module Fog
|
|
14
18
|
case name
|
15
19
|
when 'tagSet'
|
16
20
|
@in_tag_set = true
|
21
|
+
when 'ipv6CidrBlockAssociationSet'
|
22
|
+
@in_ipv6_cidr_block_association_set = true
|
23
|
+
when 'ipv6CidrBlockState'
|
24
|
+
@in_cidr_block_state = true
|
17
25
|
end
|
18
26
|
end
|
19
27
|
|
20
28
|
def end_element(name)
|
21
29
|
if @in_tag_set
|
22
30
|
case name
|
31
|
+
when 'item'
|
32
|
+
@subnet['tagSet'][@tag['key']] = @tag['value']
|
33
|
+
@tag = {}
|
34
|
+
when 'key', 'value'
|
35
|
+
@tag[name] = value
|
36
|
+
when 'tagSet'
|
37
|
+
@in_tag_set = false
|
38
|
+
end
|
39
|
+
elsif @in_ipv6_cidr_block_association_set
|
40
|
+
if @in_cidr_block_state
|
41
|
+
case name
|
42
|
+
when 'state'
|
43
|
+
@ipv6_cidr_block_association['ipv6CidrBlockState'] = { name => value }
|
44
|
+
when 'ipv6CidrBlockState'
|
45
|
+
@in_cidr_block_state = false
|
46
|
+
end
|
47
|
+
else
|
48
|
+
case name
|
23
49
|
when 'item'
|
24
|
-
@subnet['
|
25
|
-
@
|
26
|
-
when '
|
27
|
-
@
|
28
|
-
when '
|
29
|
-
@
|
50
|
+
@subnet['ipv6CidrBlockAssociationSet'] = @ipv6_cidr_block_association
|
51
|
+
@ipv6_cidr_block_association = {}
|
52
|
+
when 'ipv6CidrBlock', 'associationId'
|
53
|
+
@ipv6_cidr_block_association[name] = value
|
54
|
+
when 'ipv6CidrBlockAssociationSet'
|
55
|
+
@in_ipv6_cidr_block_association_set = false
|
56
|
+
end
|
30
57
|
end
|
31
58
|
else
|
32
59
|
case name
|
@@ -7,6 +7,10 @@ module Fog
|
|
7
7
|
@subnet = { 'tagSet' => {} }
|
8
8
|
@response = { 'subnetSet' => [] }
|
9
9
|
@tag = {}
|
10
|
+
@ipv6_cidr_block_association = {}
|
11
|
+
@in_tag_set = false
|
12
|
+
@in_ipv6_cidr_block_association_set = false
|
13
|
+
@in_cidr_block_state = false
|
10
14
|
end
|
11
15
|
|
12
16
|
def start_element(name, attrs = [])
|
@@ -14,19 +18,42 @@ module Fog
|
|
14
18
|
case name
|
15
19
|
when 'tagSet'
|
16
20
|
@in_tag_set = true
|
21
|
+
when 'ipv6CidrBlockAssociationSet'
|
22
|
+
@in_ipv6_cidr_block_association_set = true
|
23
|
+
when 'ipv6CidrBlockState'
|
24
|
+
@in_cidr_block_state = true
|
17
25
|
end
|
18
26
|
end
|
19
27
|
|
20
28
|
def end_element(name)
|
21
29
|
if @in_tag_set
|
22
30
|
case name
|
31
|
+
when 'item'
|
32
|
+
@subnet['tagSet'][@tag['key']] = @tag['value']
|
33
|
+
@tag = {}
|
34
|
+
when 'key', 'value'
|
35
|
+
@tag[name] = value
|
36
|
+
when 'tagSet'
|
37
|
+
@in_tag_set = false
|
38
|
+
end
|
39
|
+
elsif @in_ipv6_cidr_block_association_set
|
40
|
+
if @in_cidr_block_state
|
41
|
+
case name
|
42
|
+
when 'state'
|
43
|
+
@ipv6_cidr_block_association['ipv6CidrBlockState'] = { name => value }
|
44
|
+
when 'ipv6CidrBlockState'
|
45
|
+
@in_cidr_block_state = false
|
46
|
+
end
|
47
|
+
else
|
48
|
+
case name
|
23
49
|
when 'item'
|
24
|
-
@subnet['
|
25
|
-
@
|
26
|
-
when '
|
27
|
-
@
|
28
|
-
when '
|
29
|
-
@
|
50
|
+
@subnet['ipv6CidrBlockAssociationSet'] = @ipv6_cidr_block_association
|
51
|
+
@ipv6_cidr_block_association = {}
|
52
|
+
when 'ipv6CidrBlock', 'associationId'
|
53
|
+
@ipv6_cidr_block_association[name] = value
|
54
|
+
when 'ipv6CidrBlockAssociationSet'
|
55
|
+
@in_ipv6_cidr_block_association_set = false
|
56
|
+
end
|
30
57
|
end
|
31
58
|
else
|
32
59
|
case name
|
@@ -16,7 +16,7 @@ module Fog
|
|
16
16
|
case name
|
17
17
|
when 'Id'
|
18
18
|
@hosted_zone[name] = value.sub('/hostedzone/', '')
|
19
|
-
when 'Name', 'CallerReference', 'Comment'
|
19
|
+
when 'Name', 'CallerReference', 'Comment', 'PrivateZone'
|
20
20
|
@hosted_zone[name]= value
|
21
21
|
when 'HostedZone'
|
22
22
|
@response['HostedZone'] = @hosted_zone
|
@@ -17,14 +17,14 @@ module Fog
|
|
17
17
|
case name
|
18
18
|
when 'Id'
|
19
19
|
@hosted_zone[name]= value.sub('/hostedzone/', '')
|
20
|
-
when 'Name', 'CallerReference', 'Comment', 'PrivateZone', 'Config'
|
20
|
+
when 'Name', 'CallerReference', 'Comment', 'PrivateZone', 'Config'
|
21
21
|
@hosted_zone[name]= value
|
22
|
+
when 'ResourceRecordSetCount'
|
23
|
+
@hosted_zone['ResourceRecordSetCount'] = value.to_i
|
22
24
|
when 'HostedZone'
|
23
25
|
@response['HostedZone'] = @hosted_zone
|
24
26
|
@hosted_zone = {}
|
25
27
|
@section = :name_servers
|
26
|
-
when 'ResourceRecordSetCount'
|
27
|
-
@response['ResourceRecordSetCount'] = value.to_i
|
28
28
|
end
|
29
29
|
elsif @section == :name_servers
|
30
30
|
case name
|
@@ -13,8 +13,10 @@ module Fog
|
|
13
13
|
case name
|
14
14
|
when 'Id'
|
15
15
|
@zone[name] = value.sub('/hostedzone/', '')
|
16
|
-
when 'Name', 'CallerReference', 'Comment'
|
16
|
+
when 'Name', 'CallerReference', 'Comment', 'PrivateZone'
|
17
17
|
@zone[name] = value
|
18
|
+
when 'ResourceRecordSetCount'
|
19
|
+
@zone['ResourceRecordSetCount'] = value.to_i
|
18
20
|
when 'HostedZone'
|
19
21
|
@hosted_zones << @zone
|
20
22
|
@zone = {}
|
@@ -0,0 +1,88 @@
|
|
1
|
+
module Fog
|
2
|
+
module Parsers
|
3
|
+
module AWS
|
4
|
+
module ELBV2
|
5
|
+
class CreateLoadBalancer < Fog::Parsers::Base
|
6
|
+
def reset
|
7
|
+
reset_load_balancer
|
8
|
+
reset_availability_zone
|
9
|
+
@load_balancer_addresses = {}
|
10
|
+
@state = {}
|
11
|
+
@results = { 'LoadBalancers' => [] }
|
12
|
+
@response = { 'CreateLoadBalancerResult' => {}, 'ResponseMetadata' => {} }
|
13
|
+
end
|
14
|
+
|
15
|
+
def reset_load_balancer
|
16
|
+
@load_balancer = { 'SecurityGroups' => [], 'AvailabilityZones' => [] }
|
17
|
+
end
|
18
|
+
|
19
|
+
def reset_availability_zone
|
20
|
+
@availability_zone = { 'LoadBalancerAddresses' => [] }
|
21
|
+
end
|
22
|
+
|
23
|
+
def start_element(name, attrs = [])
|
24
|
+
super
|
25
|
+
case name
|
26
|
+
when 'AvailabilityZones'
|
27
|
+
@in_availability_zones = true
|
28
|
+
when 'LoadBalancerAddresses'
|
29
|
+
@in_load_balancer_addresses = true
|
30
|
+
when 'SecurityGroups'
|
31
|
+
@in_security_groups = true
|
32
|
+
when 'State'
|
33
|
+
@in_state = true
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
def end_element(name)
|
38
|
+
case name
|
39
|
+
when 'member'
|
40
|
+
if @in_availability_zones && @in_load_balancer_addresses
|
41
|
+
@availability_zone['LoadBalancerAddresses'] << @load_balancer_addresses
|
42
|
+
elsif @in_availability_zones
|
43
|
+
@load_balancer['AvailabilityZones'] << @availability_zone
|
44
|
+
reset_availability_zone
|
45
|
+
elsif @in_security_groups
|
46
|
+
@load_balancer['SecurityGroups'] << value
|
47
|
+
else
|
48
|
+
@results['LoadBalancers'] << @load_balancer
|
49
|
+
reset_load_balancer
|
50
|
+
end
|
51
|
+
when 'SubnetId', 'ZoneName'
|
52
|
+
@availability_zone[name] = value
|
53
|
+
when 'IpAddress', 'AllocationId'
|
54
|
+
@load_balancer_addresses[name] = value
|
55
|
+
|
56
|
+
when 'CanonicalHostedZoneName', 'CanonicalHostedZoneNameID', 'LoadBalancerName', 'DNSName', 'Scheme', 'Type',
|
57
|
+
'LoadBalancerArn', 'IpAddressType', 'CanonicalHostedZoneId', 'VpcId'
|
58
|
+
@load_balancer[name] = value
|
59
|
+
when 'CreatedTime'
|
60
|
+
@load_balancer[name] = Time.parse(value)
|
61
|
+
|
62
|
+
when 'LoadBalancerAddresses'
|
63
|
+
@in_load_balancer_addresses = false
|
64
|
+
when 'AvailabilityZones'
|
65
|
+
@in_availability_zones = false
|
66
|
+
when 'SecurityGroups'
|
67
|
+
@in_security_groups = false
|
68
|
+
when 'State'
|
69
|
+
@in_state = false
|
70
|
+
@load_balancer[name] = @state
|
71
|
+
@state = {}
|
72
|
+
when 'Code'
|
73
|
+
@state[name] = value
|
74
|
+
|
75
|
+
when 'RequestId'
|
76
|
+
@response['ResponseMetadata'][name] = value
|
77
|
+
|
78
|
+
when 'NextMarker'
|
79
|
+
@results['NextMarker'] = value
|
80
|
+
when 'CreateLoadBalancerResponse'
|
81
|
+
@response['CreateLoadBalancerResult'] = @results
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
@@ -0,0 +1,110 @@
|
|
1
|
+
module Fog
|
2
|
+
module Parsers
|
3
|
+
module AWS
|
4
|
+
module ELBV2
|
5
|
+
class DescribeListeners < Fog::Parsers::Base
|
6
|
+
def reset
|
7
|
+
reset_listener
|
8
|
+
@default_action = {}
|
9
|
+
@certificate = {}
|
10
|
+
@config = {}
|
11
|
+
@target_groups = []
|
12
|
+
@target_group = {}
|
13
|
+
@target_group_stickiness_config = {}
|
14
|
+
@results = { 'Listeners' => [] }
|
15
|
+
@response = { 'DescribeListenersResult' => {}, 'ResponseMetadata' => {} }
|
16
|
+
end
|
17
|
+
|
18
|
+
def reset_listener
|
19
|
+
@listener= { 'DefaultActions' => [], 'Certificates' => [] }
|
20
|
+
end
|
21
|
+
|
22
|
+
def start_element(name, attrs = [])
|
23
|
+
super
|
24
|
+
case name
|
25
|
+
when 'DefaultActions'
|
26
|
+
@in_default_actions = true
|
27
|
+
when 'Certificates'
|
28
|
+
@in_certificates = true
|
29
|
+
when 'TargetGroups'
|
30
|
+
@in_target_groups = true
|
31
|
+
when 'TargetGroupStickinessConfig'
|
32
|
+
@in_target_group_stickiness_config = true
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def end_element(name)
|
37
|
+
if @in_default_actions
|
38
|
+
case name
|
39
|
+
when 'member'
|
40
|
+
if @in_target_groups
|
41
|
+
@target_groups << @target_group
|
42
|
+
@target_group = {}
|
43
|
+
else
|
44
|
+
@listener['DefaultActions'] << @default_action
|
45
|
+
@default_action = {}
|
46
|
+
end
|
47
|
+
when 'TargetGroupArn'
|
48
|
+
if @in_target_groups
|
49
|
+
@target_group[name] = value
|
50
|
+
else
|
51
|
+
@default_action[name] = value
|
52
|
+
end
|
53
|
+
when 'Weight'
|
54
|
+
@target_group[name] = value
|
55
|
+
when 'Type', 'Order'
|
56
|
+
@default_action[name] = value
|
57
|
+
when 'Path', 'Protocol', 'Port', 'Query', 'Host', 'StatusCode', 'ContentType',
|
58
|
+
'MessageBody', 'StatusCode'
|
59
|
+
@config[name] = value
|
60
|
+
when 'RedirectConfig', 'ForwardConfig', 'FixedResponseConfig'
|
61
|
+
@default_action[name] = @config
|
62
|
+
@config = {}
|
63
|
+
when 'DurationSeconds', 'Enabled'
|
64
|
+
@target_group_stickiness_config[name] = value
|
65
|
+
when 'DefaultActions'
|
66
|
+
@in_default_actions = false
|
67
|
+
when 'TargetGroupStickinessConfig'
|
68
|
+
if @in_target_group_stickiness_config
|
69
|
+
@config['TargetGroupStickinessConfig'] = @target_group_stickiness_config
|
70
|
+
@in_target_group_stickiness_config = false
|
71
|
+
@target_group_stickiness_config = {}
|
72
|
+
end
|
73
|
+
when 'TargetGroups'
|
74
|
+
@config['TargetGroups'] = @target_groups
|
75
|
+
@in_target_groups = false
|
76
|
+
@target_groups = []
|
77
|
+
end
|
78
|
+
else
|
79
|
+
case name
|
80
|
+
when 'member'
|
81
|
+
if @in_certificates
|
82
|
+
@listener['Certificates'] << @certificate
|
83
|
+
@certificate = {}
|
84
|
+
else
|
85
|
+
@results['Listeners'] << @listener
|
86
|
+
reset_listener
|
87
|
+
end
|
88
|
+
when 'LoadBalancerArn', 'Protocol', 'Port', 'ListenerArn', 'SslPolicy'
|
89
|
+
@listener[name] = value
|
90
|
+
when 'CertificateArn'
|
91
|
+
@certificate[name] = value
|
92
|
+
when 'Certificates'
|
93
|
+
@in_certificates = false
|
94
|
+
|
95
|
+
when 'RequestId'
|
96
|
+
@response['ResponseMetadata'][name] = value
|
97
|
+
|
98
|
+
when 'NextMarker'
|
99
|
+
@results['NextMarker'] = value
|
100
|
+
|
101
|
+
when 'DescribeListenersResponse'
|
102
|
+
@response['DescribeListenersResult'] = @results
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|