Class: Dedicated::Cluster
- Inherits:
-
Object
- Object
- Dedicated::Cluster
- Defined in:
- lib/ovh-api/api/dedicated/cluster.rb
Instance Method Summary collapse
- #availabilities_get(quantity:, memory: nil, plan_code: nil, server: nil, storage: nil, system_storage: nil) ⇒ Object
- #availabilities_raw_get(quantity:, exclude_regions: nil, memory: nil, plan_code: nil, regions: nil, server: nil, storage: nil, system_storage: nil) ⇒ Object
- #get(iam_tags: nil) ⇒ Object
-
#initialize(connection) ⇒ Cluster
constructor
A new instance of Cluster.
- #service_name_change_contact_post(service_name:, services_change_contact:) ⇒ Object
- #service_name_confirm_termination_post(service_name:, services_confirm_termination:) ⇒ Object
- #service_name_get(service_name:) ⇒ Object
- #service_name_service_infos_get(service_name:) ⇒ Object
- #service_name_service_infos_put(service_name:, services_service:) ⇒ Object
- #service_name_terminate_post(service_name:) ⇒ Object
Constructor Details
#initialize(connection) ⇒ Cluster
Returns a new instance of Cluster.
6 7 8 |
# File 'lib/ovh-api/api/dedicated/cluster.rb', line 6 def initialize(connection) @connection = connection end |
Instance Method Details
#availabilities_get(quantity:, memory: nil, plan_code: nil, server: nil, storage: nil, system_storage: nil) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/ovh-api/api/dedicated/cluster.rb', line 10 def availabilities_get(quantity:, memory: nil, plan_code: nil, server: nil, storage: nil, system_storage: nil) raise ArgumentError, 'quantity is required' if quantity.nil? @connection.call( :GET, '/dedicated/cluster/availabilities', type: nil, auth: [], query: { 'memory' => memory, 'planCode' => plan_code, 'quantity' => quantity, 'server' => server, 'storage' => storage, 'systemStorage' => system_storage } ) end |
#availabilities_raw_get(quantity:, exclude_regions: nil, memory: nil, plan_code: nil, regions: nil, server: nil, storage: nil, system_storage: nil) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/ovh-api/api/dedicated/cluster.rb', line 22 def availabilities_raw_get(quantity:, exclude_regions: nil, memory: nil, plan_code: nil, regions: nil, server: nil, storage: nil, system_storage: nil) raise ArgumentError, 'quantity is required' if quantity.nil? @connection.call( :GET, '/dedicated/cluster/availabilities/raw', type: nil, auth: [], query: { 'excludeRegions' => exclude_regions, 'memory' => memory, 'planCode' => plan_code, 'quantity' => quantity, 'regions' => regions, 'server' => server, 'storage' => storage, 'systemStorage' => system_storage } ) end |
#get(iam_tags: nil) ⇒ Object
34 35 36 37 38 39 40 41 42 |
# File 'lib/ovh-api/api/dedicated/cluster.rb', line 34 def get(iam_tags: nil) @connection.call( :GET, '/dedicated/cluster', type: nil, auth: [], query: { 'iamTags' => } ) end |
#service_name_change_contact_post(service_name:, services_change_contact:) ⇒ Object
44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/ovh-api/api/dedicated/cluster.rb', line 44 def service_name_change_contact_post(service_name:, services_change_contact:) raise ArgumentError, 'service_name is required' if service_name.nil? raise ArgumentError, 'services_change_contact is required' if services_change_contact.nil? @connection.call( :POST, '/dedicated/cluster/{serviceName}/changeContact' .gsub('{serviceName}', ERB::Util.url_encode(service_name.to_s)), type: nil, auth: [], body: services_change_contact ) end |
#service_name_confirm_termination_post(service_name:, services_confirm_termination:) ⇒ Object
58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/ovh-api/api/dedicated/cluster.rb', line 58 def service_name_confirm_termination_post(service_name:, services_confirm_termination:) raise ArgumentError, 'service_name is required' if service_name.nil? raise ArgumentError, 'services_confirm_termination is required' if services_confirm_termination.nil? @connection.call( :POST, '/dedicated/cluster/{serviceName}/confirmTermination' .gsub('{serviceName}', ERB::Util.url_encode(service_name.to_s)), type: nil, auth: [], body: services_confirm_termination ) end |
#service_name_get(service_name:) ⇒ Object
72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/ovh-api/api/dedicated/cluster.rb', line 72 def service_name_get(service_name:) raise ArgumentError, 'service_name is required' if service_name.nil? @connection.call( :GET, '/dedicated/cluster/{serviceName}' .gsub('{serviceName}', ERB::Util.url_encode(service_name.to_s)), type: nil, auth: [] ) end |
#service_name_service_infos_get(service_name:) ⇒ Object
84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/ovh-api/api/dedicated/cluster.rb', line 84 def service_name_service_infos_get(service_name:) raise ArgumentError, 'service_name is required' if service_name.nil? @connection.call( :GET, '/dedicated/cluster/{serviceName}/serviceInfos' .gsub('{serviceName}', ERB::Util.url_encode(service_name.to_s)), type: nil, auth: [] ) end |
#service_name_service_infos_put(service_name:, services_service:) ⇒ Object
96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/ovh-api/api/dedicated/cluster.rb', line 96 def service_name_service_infos_put(service_name:, services_service:) raise ArgumentError, 'service_name is required' if service_name.nil? raise ArgumentError, 'services_service is required' if services_service.nil? @connection.call( :PUT, '/dedicated/cluster/{serviceName}/serviceInfos' .gsub('{serviceName}', ERB::Util.url_encode(service_name.to_s)), type: nil, auth: [], body: services_service ) end |
#service_name_terminate_post(service_name:) ⇒ Object
110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/ovh-api/api/dedicated/cluster.rb', line 110 def service_name_terminate_post(service_name:) raise ArgumentError, 'service_name is required' if service_name.nil? @connection.call( :POST, '/dedicated/cluster/{serviceName}/terminate' .gsub('{serviceName}', ERB::Util.url_encode(service_name.to_s)), type: nil, auth: [] ) end |