fog 0.6.0 → 0.7.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.
- data/Gemfile.lock +11 -6
- data/changelog.txt +49 -0
- data/fog.gemspec +5 -4
- data/lib/fog.rb +1 -1
- data/lib/fog/aws/cloud_formation.rb +124 -0
- data/lib/fog/aws/elb.rb +4 -1
- data/lib/fog/aws/iam.rb +6 -0
- data/lib/fog/aws/parsers/cloud_formation/basic.rb +12 -0
- data/lib/fog/aws/parsers/cloud_formation/create_stack.rb +19 -0
- data/lib/fog/aws/parsers/cloud_formation/describe_stack_events.rb +31 -0
- data/lib/fog/aws/parsers/cloud_formation/describe_stack_resources.rb +31 -0
- data/lib/fog/aws/parsers/cloud_formation/describe_stacks.rb +72 -0
- data/lib/fog/aws/parsers/cloud_formation/get_template.rb +19 -0
- data/lib/fog/aws/parsers/cloud_formation/validate_template.rb +52 -0
- data/lib/fog/aws/parsers/iam/login_profile.rb +27 -0
- data/lib/fog/aws/parsers/iam/upload_server_certificate.rb +26 -0
- data/lib/fog/aws/parsers/rds/authorize_db_security_group_ingress.rb +38 -0
- data/lib/fog/aws/parsers/rds/create_db_instance.rb +34 -0
- data/lib/fog/aws/parsers/rds/create_db_instance_read_replica.rb +34 -0
- data/lib/fog/aws/parsers/rds/create_db_parameter_group.rb +35 -0
- data/lib/fog/aws/parsers/rds/create_db_security_group.rb +38 -0
- data/lib/fog/aws/parsers/rds/create_db_snapshot.rb +35 -0
- data/lib/fog/aws/parsers/rds/db_parser.rb +123 -0
- data/lib/fog/aws/parsers/rds/delete_db_instance.rb +35 -0
- data/lib/fog/aws/parsers/rds/delete_db_parameter_group.rb +27 -0
- data/lib/fog/aws/parsers/rds/delete_db_security_group.rb +33 -0
- data/lib/fog/aws/parsers/rds/delete_db_snapshot.rb +34 -0
- data/lib/fog/aws/parsers/rds/describe_db_instances.rb +36 -0
- data/lib/fog/aws/parsers/rds/describe_db_parameter_groups.rb +38 -0
- data/lib/fog/aws/parsers/rds/describe_db_parameters.rb +44 -0
- data/lib/fog/aws/parsers/rds/describe_db_security_groups.rb +39 -0
- data/lib/fog/aws/parsers/rds/describe_db_snapshots.rb +39 -0
- data/lib/fog/aws/parsers/rds/modify_db_instance.rb +34 -0
- data/lib/fog/aws/parsers/rds/modify_db_parameter_group.rb +28 -0
- data/lib/fog/aws/parsers/rds/reboot_db_instance.rb +35 -0
- data/lib/fog/aws/parsers/rds/restore_db_instance_from_db_snapshot.rb +34 -0
- data/lib/fog/aws/parsers/rds/restore_db_instance_to_point_in_time.rb +35 -0
- data/lib/fog/aws/parsers/rds/revoke_db_security_group_ingress.rb +39 -0
- data/lib/fog/aws/parsers/rds/security_group_parser.rb +39 -0
- data/lib/fog/aws/parsers/rds/snapshot_parser.rb +40 -0
- data/lib/fog/aws/rds.rb +161 -0
- data/lib/fog/aws/rds/models/parameter.rb +21 -0
- data/lib/fog/aws/rds/models/parameter_group.rb +36 -0
- data/lib/fog/aws/rds/models/parameter_groups.rb +27 -0
- data/lib/fog/aws/rds/models/parameters.rb +37 -0
- data/lib/fog/aws/rds/models/security_group.rb +73 -0
- data/lib/fog/aws/rds/models/security_groups.rb +43 -0
- data/lib/fog/aws/rds/models/server.rb +105 -0
- data/lib/fog/aws/rds/models/servers.rb +27 -0
- data/lib/fog/aws/rds/models/snapshot.rb +49 -0
- data/lib/fog/aws/rds/models/snapshots.rb +45 -0
- data/lib/fog/aws/requests/cloud_formation/create_stack.rb +71 -0
- data/lib/fog/aws/requests/cloud_formation/delete_stack.rb +30 -0
- data/lib/fog/aws/requests/cloud_formation/describe_stack_events.rb +44 -0
- data/lib/fog/aws/requests/cloud_formation/describe_stack_resources.rb +43 -0
- data/lib/fog/aws/requests/cloud_formation/describe_stacks.rb +42 -0
- data/lib/fog/aws/requests/cloud_formation/get_template.rb +32 -0
- data/lib/fog/aws/requests/cloud_formation/validate_template.rb +34 -0
- data/lib/fog/aws/requests/elb/create_load_balancer.rb +4 -0
- data/lib/fog/aws/requests/iam/create_login_profile.rb +36 -0
- data/lib/fog/aws/requests/iam/delete_login_profile.rb +31 -0
- data/lib/fog/aws/requests/iam/delete_server_certificate.rb +32 -0
- data/lib/fog/aws/requests/iam/get_login_profile.rb +35 -0
- data/lib/fog/aws/requests/iam/update_login_profile.rb +33 -0
- data/lib/fog/aws/requests/iam/upload_server_certificate.rb +45 -0
- data/lib/fog/aws/requests/rds/authorize_db_security_group_ingress.rb +43 -0
- data/lib/fog/aws/requests/rds/create_db_instance.rb +56 -0
- data/lib/fog/aws/requests/rds/create_db_instance_read_replica.rb +42 -0
- data/lib/fog/aws/requests/rds/create_db_parameter_group.rb +41 -0
- data/lib/fog/aws/requests/rds/create_db_security_group.rb +37 -0
- data/lib/fog/aws/requests/rds/create_db_snapshot.rb +36 -0
- data/lib/fog/aws/requests/rds/delete_db_instance.rb +40 -0
- data/lib/fog/aws/requests/rds/delete_db_parameter_group.rb +36 -0
- data/lib/fog/aws/requests/rds/delete_db_security_group.rb +36 -0
- data/lib/fog/aws/requests/rds/delete_db_snapshot.rb +36 -0
- data/lib/fog/aws/requests/rds/describe_db_instances.rb +42 -0
- data/lib/fog/aws/requests/rds/describe_db_parameter_groups.rb +45 -0
- data/lib/fog/aws/requests/rds/describe_db_parameters.rb +46 -0
- data/lib/fog/aws/requests/rds/describe_db_security_groups.rb +39 -0
- data/lib/fog/aws/requests/rds/describe_db_snapshots.rb +42 -0
- data/lib/fog/aws/requests/rds/modify_db_instance.rb +54 -0
- data/lib/fog/aws/requests/rds/modify_db_parameter_group.rb +55 -0
- data/lib/fog/aws/requests/rds/reboot_db_instance.rb +34 -0
- data/lib/fog/aws/requests/rds/restore_db_instance_from_db_snapshot.rb +34 -0
- data/lib/fog/aws/requests/rds/restore_db_instance_to_point_in_time.rb +35 -0
- data/lib/fog/aws/requests/rds/revoke_db_security_group_ingress.rb +44 -0
- data/lib/fog/aws/simpledb.rb +21 -7
- data/lib/fog/bin.rb +2 -1
- data/lib/fog/bin/aws.rb +8 -0
- data/lib/fog/bin/virtual_box.rb +52 -0
- data/lib/fog/cdn/aws.rb +9 -8
- data/lib/fog/cdn/rackspace.rb +6 -6
- data/lib/fog/cdn/requests/rackspace/post_container.rb +30 -0
- data/lib/fog/cdn/requests/rackspace/put_container.rb +1 -1
- data/lib/fog/compute.rb +6 -3
- data/lib/fog/compute/aws.rb +11 -7
- data/lib/fog/compute/bluebox.rb +5 -6
- data/lib/fog/compute/brightbox.rb +3 -0
- data/lib/fog/compute/go_grid.rb +5 -6
- data/lib/fog/compute/linode.rb +5 -6
- data/lib/fog/compute/models/aws/flavors.rb +19 -18
- data/lib/fog/compute/models/aws/server.rb +23 -0
- data/lib/fog/compute/models/aws/tag.rb +1 -1
- data/lib/fog/compute/models/brightbox/server.rb +7 -1
- data/lib/fog/compute/models/virtual_box/medium.rb +87 -0
- data/lib/fog/compute/models/virtual_box/medium_format.rb +34 -0
- data/lib/fog/compute/models/virtual_box/mediums.rb +32 -0
- data/lib/fog/compute/models/virtual_box/nat_engine.rb +65 -0
- data/lib/fog/compute/models/virtual_box/nat_redirect.rb +91 -0
- data/lib/fog/compute/models/virtual_box/nat_redirects.rb +41 -0
- data/lib/fog/compute/models/virtual_box/network_adapter.rb +82 -0
- data/lib/fog/compute/models/virtual_box/network_adapters.rb +42 -0
- data/lib/fog/compute/models/virtual_box/server.rb +241 -0
- data/lib/fog/compute/models/virtual_box/servers.rb +41 -0
- data/lib/fog/compute/models/virtual_box/storage_controller.rb +83 -0
- data/lib/fog/compute/models/virtual_box/storage_controllers.rb +38 -0
- data/lib/fog/compute/models/voxel/servers.rb +7 -6
- data/lib/fog/compute/new_servers.rb +5 -6
- data/lib/fog/compute/parsers/aws/monitor_unmonitor_instances.rb +35 -0
- data/lib/fog/compute/rackspace.rb +7 -7
- data/lib/fog/compute/requests/aws/delete_tags.rb +12 -9
- data/lib/fog/compute/requests/aws/monitor_instances.rb +52 -0
- data/lib/fog/compute/requests/aws/revoke_security_group_ingress.rb +24 -8
- data/lib/fog/compute/requests/aws/unmonitor_instances.rb +53 -0
- data/lib/fog/compute/requests/brightbox/activate_console_server.rb +20 -0
- data/lib/fog/compute/requests/brightbox/add_listeners_load_balancer.rb +20 -0
- data/lib/fog/compute/requests/brightbox/remove_listeners_load_balancer.rb +20 -0
- data/lib/fog/compute/slicehost.rb +5 -6
- data/lib/fog/compute/virtual_box.rb +48 -0
- data/lib/fog/compute/voxel.rb +30 -27
- data/lib/fog/core.rb +1 -0
- data/lib/fog/core/attributes.rb +3 -1
- data/lib/fog/core/collection.rb +2 -2
- data/lib/fog/core/credentials.rb +13 -3
- data/lib/fog/core/scp.rb +0 -4
- data/lib/fog/core/service.rb +0 -8
- data/lib/fog/core/ssh.rb +0 -4
- data/lib/fog/dns.rb +3 -3
- data/lib/fog/dns/aws.rb +8 -8
- data/lib/fog/dns/bluebox.rb +5 -7
- data/lib/fog/dns/dnsimple.rb +7 -7
- data/lib/fog/dns/linode.rb +5 -6
- data/lib/fog/dns/models/dnsimple/record.rb +11 -1
- data/lib/fog/dns/models/dnsimple/records.rb +7 -7
- data/lib/fog/dns/models/dnsimple/zones.rb +2 -1
- data/lib/fog/dns/requests/dnsimple/get_record.rb +34 -0
- data/lib/fog/dns/slicehost.rb +5 -6
- data/lib/fog/dns/zerigo.rb +5 -7
- data/lib/fog/providers.rb +2 -1
- data/lib/fog/providers/aws.rb +10 -8
- data/lib/fog/providers/virtual_box.rb +11 -0
- data/lib/fog/storage.rb +21 -0
- data/lib/fog/storage/aws.rb +16 -32
- data/lib/fog/storage/google.rb +6 -27
- data/lib/fog/storage/local.rb +7 -7
- data/lib/fog/storage/models/rackspace/directory.rb +1 -1
- data/lib/fog/storage/models/rackspace/file.rb +1 -0
- data/lib/fog/storage/rackspace.rb +5 -27
- data/lib/fog/storage/requests/aws/put_object.rb +2 -2
- data/lib/fog/storage/requests/aws/upload_part.rb +1 -1
- data/lib/fog/storage/requests/google/put_object.rb +2 -2
- data/lib/fog/storage/requests/rackspace/put_object.rb +1 -1
- data/tests/aws/requests/cloud_formation/stack_tests.rb +130 -0
- data/tests/aws/requests/iam/login_profile_tests.rb +64 -0
- data/tests/aws/requests/rds/helper.rb +169 -0
- data/tests/aws/requests/rds/instance_tests.rb +129 -0
- data/tests/aws/requests/rds/model_tests.rb +98 -0
- data/tests/aws/requests/rds/parameter_group_tests.rb +68 -0
- data/tests/aws/requests/rds/parameter_request_tests.rb +35 -0
- data/tests/compute/models/aws/server_monitor_tests.rb +47 -0
- data/tests/compute/models/server_tests.rb +7 -23
- data/tests/compute/parsers/aws/monitor_unmonitor_instances_tests.rb +49 -0
- data/tests/compute/requests/aws/security_group_tests.rb +69 -52
- data/tests/compute/requests/aws/tag_tests.rb +5 -5
- data/tests/compute/requests/brightbox/helper.rb +7 -6
- data/tests/compute/requests/brightbox/server_tests.rb +5 -0
- data/tests/compute/requests/voxel/server_tests.rb +2 -3
- data/tests/storage/requests/aws/bucket_tests.rb +10 -0
- metadata +148 -12
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
module Fog
|
|
2
|
+
module AWS
|
|
3
|
+
class CloudFormation
|
|
4
|
+
class Real
|
|
5
|
+
|
|
6
|
+
require 'fog/aws/parsers/cloud_formation/describe_stacks'
|
|
7
|
+
|
|
8
|
+
# Describe stacks
|
|
9
|
+
#
|
|
10
|
+
# ==== Parameters
|
|
11
|
+
# * options<~Hash>:
|
|
12
|
+
# * 'StackName'<~String>: name of the stack to describe
|
|
13
|
+
#
|
|
14
|
+
# ==== Returns
|
|
15
|
+
# * response<~Excon::Response>:
|
|
16
|
+
# * body<~Hash>:
|
|
17
|
+
# * 'Stacks'<~Array> - Matching stacks
|
|
18
|
+
# * stack<~Hash>:
|
|
19
|
+
# * 'StackName'<~String> -
|
|
20
|
+
# * 'StackId'<~String> -
|
|
21
|
+
# * 'CreationTime'<~String> -
|
|
22
|
+
# * 'StackStatus'<~String> -
|
|
23
|
+
# * 'DisableRollback'<~String> -
|
|
24
|
+
# * 'Outputs'<~Array> -
|
|
25
|
+
# * output<~Hash>:
|
|
26
|
+
# * 'OutputKey'<~String> -
|
|
27
|
+
# * 'OutputValue'<~String> -
|
|
28
|
+
#
|
|
29
|
+
# ==== See Also
|
|
30
|
+
# http://docs.amazonwebservices.com/AWSCloudFormation/latest/APIReference/API_DescribeStacks.html
|
|
31
|
+
#
|
|
32
|
+
def describe_stacks(options = {})
|
|
33
|
+
request({
|
|
34
|
+
'Action' => 'DescribeStacks',
|
|
35
|
+
:parser => Fog::Parsers::AWS::CloudFormation::DescribeStacks.new
|
|
36
|
+
}.merge!(options))
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
module Fog
|
|
2
|
+
module AWS
|
|
3
|
+
class CloudFormation
|
|
4
|
+
class Real
|
|
5
|
+
|
|
6
|
+
require 'fog/aws/parsers/cloud_formation/get_template'
|
|
7
|
+
|
|
8
|
+
# Describe stacks
|
|
9
|
+
#
|
|
10
|
+
# ==== Parameters
|
|
11
|
+
# * stack_name<~String> - stack name to get template from
|
|
12
|
+
#
|
|
13
|
+
# ==== Returns
|
|
14
|
+
# * response<~Excon::Response>:
|
|
15
|
+
# * body<~Hash>:
|
|
16
|
+
# * 'TemplateBody'<~String> - structure containing the template body (json)
|
|
17
|
+
#
|
|
18
|
+
# ==== See Also
|
|
19
|
+
# http://docs.amazonwebservices.com/AWSCloudFormation/latest/APIReference/API_GetTemplate.html
|
|
20
|
+
#
|
|
21
|
+
def get_template(stack_name)
|
|
22
|
+
request(
|
|
23
|
+
'Action' => 'GetTemplate',
|
|
24
|
+
'StackName' => stack_name,
|
|
25
|
+
:parser => Fog::Parsers::AWS::CloudFormation::GetTemplate.new
|
|
26
|
+
)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
module Fog
|
|
2
|
+
module AWS
|
|
3
|
+
class CloudFormation
|
|
4
|
+
class Real
|
|
5
|
+
|
|
6
|
+
require 'fog/aws/parsers/cloud_formation/validate_template'
|
|
7
|
+
|
|
8
|
+
# Describe stacks
|
|
9
|
+
#
|
|
10
|
+
# ==== Parameters
|
|
11
|
+
# * options<~Hash>:
|
|
12
|
+
# * 'TemplateBody'<~String> - template structure
|
|
13
|
+
# * 'TemplateURL'<~String> - template url
|
|
14
|
+
#
|
|
15
|
+
# ==== Returns
|
|
16
|
+
# * response<~Excon::Response>:
|
|
17
|
+
# * body<~Hash>:
|
|
18
|
+
# * 'Description'<~String> - description found within the template
|
|
19
|
+
# * 'Parameters'<~String> - list of template parameter structures
|
|
20
|
+
#
|
|
21
|
+
# ==== See Also
|
|
22
|
+
# http://docs.amazonwebservices.com/AWSCloudFormation/latest/APIReference/API_ValidateTemplate.html
|
|
23
|
+
#
|
|
24
|
+
def validate_template(options = {})
|
|
25
|
+
request({
|
|
26
|
+
'Action' => 'ValidateTemplate',
|
|
27
|
+
:parser => Fog::Parsers::AWS::CloudFormation::ValidateTemplate.new
|
|
28
|
+
}.merge!(options))
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -14,6 +14,7 @@ module Fog
|
|
|
14
14
|
# * 'Protocol'<~String> - Protocol to use. Either HTTP or TCP.
|
|
15
15
|
# * 'LoadBalancerPort'<~Integer> - The port that the ELB will listen to for outside traffic
|
|
16
16
|
# * 'InstancePort'<~Integer> - The port on the instance that the ELB will forward traffic to
|
|
17
|
+
# * 'SSLCertificateId'<~String> - ARN of the server certificate
|
|
17
18
|
# ==== Returns
|
|
18
19
|
# * response<~Excon::Response>:
|
|
19
20
|
# * body<~Hash>:
|
|
@@ -27,15 +28,18 @@ module Fog
|
|
|
27
28
|
listener_protocol = []
|
|
28
29
|
listener_lb_port = []
|
|
29
30
|
listener_instance_port = []
|
|
31
|
+
listener_ssl_certificate_id = []
|
|
30
32
|
listeners.each do |listener|
|
|
31
33
|
listener_protocol.push(listener['Protocol'])
|
|
32
34
|
listener_lb_port.push(listener['LoadBalancerPort'])
|
|
33
35
|
listener_instance_port.push(listener['InstancePort'])
|
|
36
|
+
listener_ssl_certificate_id.push(listener['SSLCertificateId'])
|
|
34
37
|
end
|
|
35
38
|
|
|
36
39
|
params.merge!(AWS.indexed_param('Listeners.member.%d.Protocol', listener_protocol))
|
|
37
40
|
params.merge!(AWS.indexed_param('Listeners.member.%d.LoadBalancerPort', listener_lb_port))
|
|
38
41
|
params.merge!(AWS.indexed_param('Listeners.member.%d.InstancePort', listener_instance_port))
|
|
42
|
+
params.merge!(AWS.indexed_param('Listeners.member.%d.SSLCertificateId', listener_ssl_certificate_id))
|
|
39
43
|
|
|
40
44
|
request({
|
|
41
45
|
'Action' => 'CreateLoadBalancer',
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
module Fog
|
|
2
|
+
module AWS
|
|
3
|
+
class IAM
|
|
4
|
+
class Real
|
|
5
|
+
|
|
6
|
+
require 'fog/aws/parsers/iam/login_profile'
|
|
7
|
+
|
|
8
|
+
# Creates a login profile for a user
|
|
9
|
+
#
|
|
10
|
+
# http://docs.amazonwebservices.com/IAM/latest/APIReference/API_CreateLoginProfile.html
|
|
11
|
+
# ==== Parameters
|
|
12
|
+
# * user_name<~String> - Name of user to create a login profile for
|
|
13
|
+
# * password<~String> - The new password for this user
|
|
14
|
+
#
|
|
15
|
+
# ==== Returns
|
|
16
|
+
# * response<~Excon::Response>:
|
|
17
|
+
# * body<~Hash>:
|
|
18
|
+
# * 'LoginProfile'<~Hash>
|
|
19
|
+
# * UserName<~String>
|
|
20
|
+
# * CreateDate
|
|
21
|
+
# * 'RequestId'<~String> - Id of the request
|
|
22
|
+
#
|
|
23
|
+
#
|
|
24
|
+
def create_login_profile(user_name, password)
|
|
25
|
+
request({
|
|
26
|
+
'Action' => 'CreateLoginProfile',
|
|
27
|
+
'UserName' => user_name,
|
|
28
|
+
'Password' => password,
|
|
29
|
+
:parser => Fog::Parsers::AWS::IAM::LoginProfile.new
|
|
30
|
+
})
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
module Fog
|
|
2
|
+
module AWS
|
|
3
|
+
class IAM
|
|
4
|
+
class Real
|
|
5
|
+
|
|
6
|
+
require 'fog/aws/parsers/iam/basic'
|
|
7
|
+
|
|
8
|
+
# Deletes a user's login profile
|
|
9
|
+
#
|
|
10
|
+
# http://docs.amazonwebservices.com/IAM/latest/APIReference/API_DeleteLoginProfile.html
|
|
11
|
+
# ==== Parameters
|
|
12
|
+
# * user_name<~String> - Name of user whose login profile you want to delete
|
|
13
|
+
#
|
|
14
|
+
# ==== Returns
|
|
15
|
+
# * response<~Excon::Response>:
|
|
16
|
+
# * body<~Hash>:
|
|
17
|
+
# * 'RequestId'<~String> - Id of the request
|
|
18
|
+
#
|
|
19
|
+
#
|
|
20
|
+
def delete_login_profile(user_name)
|
|
21
|
+
request({
|
|
22
|
+
'Action' => 'DeleteLoginProfile',
|
|
23
|
+
'UserName' => user_name,
|
|
24
|
+
:parser => Fog::Parsers::AWS::IAM::Basic.new
|
|
25
|
+
})
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
module Fog
|
|
2
|
+
module AWS
|
|
3
|
+
class IAM
|
|
4
|
+
class Real
|
|
5
|
+
|
|
6
|
+
require 'fog/aws/parsers/iam/basic'
|
|
7
|
+
|
|
8
|
+
# Deletes the specified server certificate.
|
|
9
|
+
#
|
|
10
|
+
# ==== Parameters
|
|
11
|
+
# * server_certificate_name<~String>: The name of the server certificate you want to delete.
|
|
12
|
+
#
|
|
13
|
+
# ==== Returns
|
|
14
|
+
# * response<~Excon::Response>:
|
|
15
|
+
# * body<~Hash>:
|
|
16
|
+
# * 'RequestId'<~String> - Id of the request
|
|
17
|
+
#
|
|
18
|
+
# ==== See Also
|
|
19
|
+
# http://docs.amazonwebservices.com/IAM/latest/APIReference/API_DeleteServerCertificate.html
|
|
20
|
+
#
|
|
21
|
+
def delete_server_certificate(server_certificate_name)
|
|
22
|
+
request({
|
|
23
|
+
'Action' => 'DeleteServerCertificate',
|
|
24
|
+
'ServerCertificateName' => server_certificate_name,
|
|
25
|
+
:parser => Fog::Parsers::AWS::IAM::Basic.new
|
|
26
|
+
})
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
module Fog
|
|
2
|
+
module AWS
|
|
3
|
+
class IAM
|
|
4
|
+
class Real
|
|
5
|
+
|
|
6
|
+
require 'fog/aws/parsers/iam/login_profile'
|
|
7
|
+
|
|
8
|
+
# Retrieves the login profile for a user
|
|
9
|
+
#
|
|
10
|
+
# http://docs.amazonwebservices.com/IAM/latest/APIReference/API_CreateLoginProfile.html
|
|
11
|
+
# ==== Parameters
|
|
12
|
+
# * user_name<~String> - Name of user to retrieve the login profile for
|
|
13
|
+
# * password<~String> - The new password for this user
|
|
14
|
+
#
|
|
15
|
+
# ==== Returns
|
|
16
|
+
# * response<~Excon::Response>:
|
|
17
|
+
# * body<~Hash>:
|
|
18
|
+
# * 'LoginProfile'<~Hash>
|
|
19
|
+
# * UserName<~String>
|
|
20
|
+
# * CreateDate
|
|
21
|
+
# * 'RequestId'<~String> - Id of the request
|
|
22
|
+
#
|
|
23
|
+
#
|
|
24
|
+
def get_login_profile(user_name)
|
|
25
|
+
request({
|
|
26
|
+
'Action' => 'GetLoginProfile',
|
|
27
|
+
'UserName' => user_name,
|
|
28
|
+
:parser => Fog::Parsers::AWS::IAM::LoginProfile.new
|
|
29
|
+
})
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
module Fog
|
|
2
|
+
module AWS
|
|
3
|
+
class IAM
|
|
4
|
+
class Real
|
|
5
|
+
|
|
6
|
+
require 'fog/aws/parsers/iam/basic'
|
|
7
|
+
|
|
8
|
+
# Updates a login profile for a user
|
|
9
|
+
#
|
|
10
|
+
# http://docs.amazonwebservices.com/IAM/latest/APIReference/API_UpdateLoginProfile.html
|
|
11
|
+
# ==== Parameters
|
|
12
|
+
# * user_name<~String> - Name of user to change the login profile for
|
|
13
|
+
# * password<~String> - The new password for this user
|
|
14
|
+
#
|
|
15
|
+
# ==== Returns
|
|
16
|
+
# * response<~Excon::Response>:
|
|
17
|
+
# * body<~Hash>:
|
|
18
|
+
# * 'RequestId'<~String> - Id of the request
|
|
19
|
+
#
|
|
20
|
+
#
|
|
21
|
+
def update_login_profile(user_name, password)
|
|
22
|
+
request({
|
|
23
|
+
'Action' => 'UpdateLoginProfile',
|
|
24
|
+
'UserName' => user_name,
|
|
25
|
+
'Password' => password,
|
|
26
|
+
:parser => Fog::Parsers::AWS::IAM::Basic.new
|
|
27
|
+
})
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
module Fog
|
|
2
|
+
module AWS
|
|
3
|
+
class IAM
|
|
4
|
+
class Real
|
|
5
|
+
|
|
6
|
+
require 'fog/aws/parsers/iam/upload_server_certificate'
|
|
7
|
+
|
|
8
|
+
# Uploads a server certificate entity for the AWS Account.
|
|
9
|
+
# Includes a public key certificate, a private key, and an optional certificate chain, which should all be PEM-encoded.
|
|
10
|
+
#
|
|
11
|
+
# ==== Parameters
|
|
12
|
+
# * certificate<~Hash>: The contents of the public key certificate in PEM-encoded format.
|
|
13
|
+
# * private_key<~Hash>: The contents of the private key in PEM-encoded format.
|
|
14
|
+
# * name<~Hash>: The name for the server certificate. Do not include the path in this value.
|
|
15
|
+
# * options<~Hash>:
|
|
16
|
+
# * 'CertificateChain'<~String> - The contents of the certificate chain. Typically a concatenation of the PEM-encoded public key certificates of the chain.
|
|
17
|
+
# * 'Path'<~String> - The path for the server certificate.
|
|
18
|
+
#
|
|
19
|
+
# ==== Returns
|
|
20
|
+
# * response<~Excon::Response>:
|
|
21
|
+
# * body<~Hash>:
|
|
22
|
+
# * 'UploadServerCertificateResult'<~Hash>:
|
|
23
|
+
# * 'CertificateId'<~String> -
|
|
24
|
+
# * 'UserName'<~String> -
|
|
25
|
+
# * 'CertificateBody'<~String> -
|
|
26
|
+
# * 'Status'<~String> -
|
|
27
|
+
# * 'RequestId'<~String> - Id of the request
|
|
28
|
+
#
|
|
29
|
+
# ==== See Also
|
|
30
|
+
# http://docs.amazonwebservices.com/IAM/latest/APIReference/index.html?API_UploadServerCertificate.html
|
|
31
|
+
#
|
|
32
|
+
def upload_server_certificate(certificate, private_key, name, options = {})
|
|
33
|
+
request({
|
|
34
|
+
'Action' => 'UploadServerCertificate',
|
|
35
|
+
'CertificateBody' => certificate,
|
|
36
|
+
'PrivateKey' => private_key,
|
|
37
|
+
'ServerCertificateName' => name,
|
|
38
|
+
:parser => Fog::Parsers::AWS::IAM::UploadServerCertificate.new
|
|
39
|
+
}.merge!(options))
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
module Fog
|
|
2
|
+
module AWS
|
|
3
|
+
class RDS
|
|
4
|
+
class Real
|
|
5
|
+
|
|
6
|
+
require 'fog/aws/parsers/rds/authorize_db_security_group_ingress'
|
|
7
|
+
|
|
8
|
+
# authorizes a db security group ingress
|
|
9
|
+
# http://docs.amazonwebservices.com/AmazonRDS/latest/APIReference/index.html?API_AuthorizeDBSecurityGroupIngress.html
|
|
10
|
+
# ==== Parameters
|
|
11
|
+
# * CIDRIP <~String> - The IP range to authorize
|
|
12
|
+
# * DBSecurityGroupName <~String> - The name for the DB Security Group.
|
|
13
|
+
# * EC2SecurityGroupName <~String> - Name of the EC2 Security Group to authorize.
|
|
14
|
+
# * EC2SecurityGroupOwnerId <~String> - AWS Account Number of the owner of the security group specified in the EC2SecurityGroupName parameter. The AWS Access Key ID is not an acceptable value.
|
|
15
|
+
# ==== Returns
|
|
16
|
+
# * response<~Excon::Response>:
|
|
17
|
+
# * body<~Hash>:
|
|
18
|
+
def authorize_db_security_group_ingress(name, opts={})
|
|
19
|
+
unless opts.key?('CIDRIP') || (opts.key?('EC2SecurityGroupName') && opts.key?('EC2SecurityGroupOwnerId'))
|
|
20
|
+
raise ArgumentError, 'Must specify CIDRIP, or both EC2SecurityGroupName and EC2SecurityGroupOwnerId'
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
request({
|
|
24
|
+
'Action' => 'AuthorizeDBSecurityGroupIngress',
|
|
25
|
+
:parser => Fog::Parsers::AWS::RDS::AuthorizeDBSecurityGroupIngress.new,
|
|
26
|
+
'DBSecurityGroupName' => name
|
|
27
|
+
}.merge(opts))
|
|
28
|
+
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
class Mock
|
|
34
|
+
|
|
35
|
+
def authorize_db_security_group_ingress(name, opts = {})
|
|
36
|
+
Fog::Mock.not_implemented
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
module Fog
|
|
2
|
+
module AWS
|
|
3
|
+
class RDS
|
|
4
|
+
class Real
|
|
5
|
+
|
|
6
|
+
require 'fog/aws/parsers/rds/create_db_instance'
|
|
7
|
+
|
|
8
|
+
# create a db instance
|
|
9
|
+
# http://docs.amazonwebservices.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html
|
|
10
|
+
# ==== Parameters
|
|
11
|
+
# * DBInstanceIdentifier <~String> - name of the db instance to modify
|
|
12
|
+
#
|
|
13
|
+
# * AllocatedStorage <~Integer> Storage space, in GB
|
|
14
|
+
# * AutoMinorVersionUpgrade <~Boolean> Indicates that minor version upgrades will be applied automatically to the DB Instance during the maintenance window
|
|
15
|
+
# * AvailabilityZone <~String> The availability zone to create the instance in
|
|
16
|
+
# * BackupRetentionPeriod <~Integer> 0-8 The number of days to retain automated backups.
|
|
17
|
+
# * DBInstanceClass <~String> The new compute and memory capacity of the DB Instance
|
|
18
|
+
# * DBName <~String> The name of the database to create when the DB Instance is created
|
|
19
|
+
# * DBParameterGroupName <~String> The name of the DB Parameter Group to apply to this DB Instance
|
|
20
|
+
# * DBSecurityGroups <~Array> A list of DB Security Groups to authorize on this DB Instance
|
|
21
|
+
# * Engine <~String> The name of the database engine to be used for this instance.
|
|
22
|
+
# * EngineVersion <~String> The version number of the database engine to use.
|
|
23
|
+
# * MasterUsername <~String> The db master user
|
|
24
|
+
# * MasterUserPassword <~String> The new password for the DB Instance master user
|
|
25
|
+
# * MultiAZ <~Boolean> Specifies if the DB Instance is a Multi-AZ deployment
|
|
26
|
+
# * Port <~Integer> The port number on which the database accepts connections.
|
|
27
|
+
# * PreferredBackupWindow <~String> The daily time range during which automated backups are created if automated backups are enabled
|
|
28
|
+
# * PreferredMaintenanceWindow <~String> The weekly time range (in UTC) during which system maintenance can occur, which may result in an outage
|
|
29
|
+
# ==== Returns
|
|
30
|
+
# * response<~Excon::Response>:
|
|
31
|
+
# * body<~Hash>:
|
|
32
|
+
def create_db_instance(db_name, options={})
|
|
33
|
+
|
|
34
|
+
if security_groups = options.delete('DBSecurityGroups')
|
|
35
|
+
options.merge!(AWS.indexed_param('DBSecurityGroups.member.%d', [*security_groups]))
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
request({
|
|
39
|
+
'Action' => 'CreateDBInstance',
|
|
40
|
+
'DBInstanceIdentifier' => db_name,
|
|
41
|
+
:parser => Fog::Parsers::AWS::RDS::CreateDBInstance.new,
|
|
42
|
+
}.merge(options))
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
class Mock
|
|
48
|
+
|
|
49
|
+
def create_db_instance(db_name, options={})
|
|
50
|
+
Fog::Mock.not_implemented
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|