Class: QingCloud::SDK::KeyPairService
- Inherits:
-
Object
- Object
- QingCloud::SDK::KeyPairService
- Defined in:
- lib/qingcloud/sdk/service/key_pair.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
-
#properties ⇒ Object
Returns the value of attribute properties.
Instance Method Summary collapse
-
#attach_key_pairs(instances: [], keypairs: []) ⇒ Object
Documentation URL: docs.qingcloud.com/api/keypair/attach_key_pairs.html.
-
#create_key_pair(encrypt_method: '', keypair_name: '', mode: '', public_key: '') ⇒ Object
Documentation URL: docs.qingcloud.com/api/keypair/create_key_pairs.html.
-
#delete_key_pairs(keypairs: []) ⇒ Object
Documentation URL: docs.qingcloud.com/api/keypair/delete_key_pairs.html.
-
#describe_key_pairs(encrypt_method: '', instance_id: '', keypairs: [], limit: nil, offset: nil, search_word: '', tags: [], verbose: nil) ⇒ Object
Documentation URL: docs.qingcloud.com/api/keypair/describe_key_pairs.html.
-
#detach_key_pairs(instances: [], keypairs: []) ⇒ Object
Documentation URL: docs.qingcloud.com/api/keypair/detach_key_pairs.html.
-
#initialize(config, properties) ⇒ KeyPairService
constructor
A new instance of KeyPairService.
-
#modify_key_pair_attributes(description: '', keypair: '', keypair_name: '') ⇒ Object
Documentation URL: docs.qingcloud.com/api/keypair/modify_key_pair_attributes.html.
Constructor Details
#initialize(config, properties) ⇒ KeyPairService
Returns a new instance of KeyPairService.
24 25 26 27 |
# File 'lib/qingcloud/sdk/service/key_pair.rb', line 24 def initialize(config, properties) self.config = config self.properties = properties.deep_symbolize_keys end |
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
22 23 24 |
# File 'lib/qingcloud/sdk/service/key_pair.rb', line 22 def config @config end |
#properties ⇒ Object
Returns the value of attribute properties.
22 23 24 |
# File 'lib/qingcloud/sdk/service/key_pair.rb', line 22 def properties @properties end |
Instance Method Details
#attach_key_pairs(instances: [], keypairs: []) ⇒ Object
Documentation URL: docs.qingcloud.com/api/keypair/attach_key_pairs.html
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/qingcloud/sdk/service/key_pair.rb', line 30 def attach_key_pairs(instances: [], keypairs: []) input = { config: config, properties: properties, api_name: 'AttachKeyPairs', request_method: 'GET', request_params: { 'instances' => instances, 'keypairs' => keypairs, }, } attach_key_pairs_input_validate input request = Request.new input request.send end |
#create_key_pair(encrypt_method: '', keypair_name: '', mode: '', public_key: '') ⇒ Object
Documentation URL: docs.qingcloud.com/api/keypair/create_key_pairs.html
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/qingcloud/sdk/service/key_pair.rb', line 65 def create_key_pair(encrypt_method: '', keypair_name: '', mode: '', public_key: '') input = { config: config, properties: properties, api_name: 'CreateKeyPair', request_method: 'GET', request_params: { 'encrypt_method' => encrypt_method, # encrypt_method's available values: ssh-rsa, ssh-dss 'keypair_name' => keypair_name, 'mode' => mode, # mode's available values: system, user 'public_key' => public_key, }, } create_key_pair_input_validate input request = Request.new input request.send end |
#delete_key_pairs(keypairs: []) ⇒ Object
Documentation URL: docs.qingcloud.com/api/keypair/delete_key_pairs.html
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/qingcloud/sdk/service/key_pair.rb', line 116 def delete_key_pairs(keypairs: []) input = { config: config, properties: properties, api_name: 'DeleteKeyPairs', request_method: 'GET', request_params: { 'keypairs' => keypairs, }, } delete_key_pairs_input_validate input request = Request.new input request.send end |
#describe_key_pairs(encrypt_method: '', instance_id: '', keypairs: [], limit: nil, offset: nil, search_word: '', tags: [], verbose: nil) ⇒ Object
Documentation URL: docs.qingcloud.com/api/keypair/describe_key_pairs.html
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
# File 'lib/qingcloud/sdk/service/key_pair.rb', line 146 def describe_key_pairs(encrypt_method: '', instance_id: '', keypairs: [], limit: nil, offset: nil, search_word: '', tags: [], verbose: nil) input = { config: config, properties: properties, api_name: 'DescribeKeyPairs', request_method: 'GET', request_params: { 'encrypt_method' => encrypt_method, # encrypt_method's available values: ssh-rsa, ssh-dss 'instance_id' => instance_id, 'keypairs' => keypairs, 'limit' => limit, 'offset' => offset, 'search_word' => search_word, 'tags' => , 'verbose' => verbose, }, } describe_key_pairs_input_validate input request = Request.new input request.send end |
#detach_key_pairs(instances: [], keypairs: []) ⇒ Object
Documentation URL: docs.qingcloud.com/api/keypair/detach_key_pairs.html
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 |
# File 'lib/qingcloud/sdk/service/key_pair.rb', line 190 def detach_key_pairs(instances: [], keypairs: []) input = { config: config, properties: properties, api_name: 'DetachKeyPairs', request_method: 'GET', request_params: { 'instances' => instances, 'keypairs' => keypairs, }, } detach_key_pairs_input_validate input request = Request.new input request.send end |
#modify_key_pair_attributes(description: '', keypair: '', keypair_name: '') ⇒ Object
Documentation URL: docs.qingcloud.com/api/keypair/modify_key_pair_attributes.html
225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'lib/qingcloud/sdk/service/key_pair.rb', line 225 def modify_key_pair_attributes(description: '', keypair: '', keypair_name: '') input = { config: config, properties: properties, api_name: 'ModifyKeyPairAttributes', request_method: 'GET', request_params: { 'description' => description, 'keypair' => keypair, 'keypair_name' => keypair_name, }, } modify_key_pair_attributes_input_validate input request = Request.new input request.send end |