ionoscloud 5.0.0.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/DOCS.md +14618 -0
- data/Gemfile +9 -0
- data/README.md +55 -0
- data/Rakefile +10 -0
- data/git_push.sh +58 -0
- data/ionoscloud.gemspec +38 -0
- data/lib/ionoscloud.rb +181 -0
- data/lib/ionoscloud/api/_api.rb +96 -0
- data/lib/ionoscloud/api/backup_unit_api.rb +583 -0
- data/lib/ionoscloud/api/contract_api.rb +96 -0
- data/lib/ionoscloud/api/data_center_api.rb +532 -0
- data/lib/ionoscloud/api/image_api.rb +432 -0
- data/lib/ionoscloud/api/ip_blocks_api.rb +514 -0
- data/lib/ionoscloud/api/kubernetes_api.rb +1479 -0
- data/lib/ionoscloud/api/label_api.rb +2460 -0
- data/lib/ionoscloud/api/lan_api.rb +858 -0
- data/lib/ionoscloud/api/load_balancer_api.rb +950 -0
- data/lib/ionoscloud/api/location_api.rb +262 -0
- data/lib/ionoscloud/api/nic_api.rb +1222 -0
- data/lib/ionoscloud/api/private_cross_connect_api.rb +426 -0
- data/lib/ionoscloud/api/request_api.rb +283 -0
- data/lib/ionoscloud/api/server_api.rb +1679 -0
- data/lib/ionoscloud/api/snapshot_api.rb +432 -0
- data/lib/ionoscloud/api/user_management_api.rb +2495 -0
- data/lib/ionoscloud/api/volume_api.rb +763 -0
- data/lib/ionoscloud/api_client.rb +521 -0
- data/lib/ionoscloud/api_error.rb +57 -0
- data/lib/ionoscloud/configuration.rb +291 -0
- data/lib/ionoscloud/models/attached_volumes.rb +278 -0
- data/lib/ionoscloud/models/backup_unit.rb +294 -0
- data/lib/ionoscloud/models/backup_unit_properties.rb +242 -0
- data/lib/ionoscloud/models/backup_unit_sso.rb +217 -0
- data/lib/ionoscloud/models/backup_units.rb +283 -0
- data/lib/ionoscloud/models/balanced_nics.rb +278 -0
- data/lib/ionoscloud/models/cdroms.rb +278 -0
- data/lib/ionoscloud/models/connectable_datacenter.rb +234 -0
- data/lib/ionoscloud/models/contract.rb +231 -0
- data/lib/ionoscloud/models/contract_properties.rb +256 -0
- data/lib/ionoscloud/models/data_center_entities.rb +243 -0
- data/lib/ionoscloud/models/datacenter.rb +269 -0
- data/lib/ionoscloud/models/datacenter_element_metadata.rb +321 -0
- data/lib/ionoscloud/models/datacenter_properties.rb +296 -0
- data/lib/ionoscloud/models/datacenters.rb +278 -0
- data/lib/ionoscloud/models/error.rb +228 -0
- data/lib/ionoscloud/models/error_message.rb +227 -0
- data/lib/ionoscloud/models/firewall_rule.rb +260 -0
- data/lib/ionoscloud/models/firewall_rules.rb +278 -0
- data/lib/ionoscloud/models/firewallrule_properties.rb +468 -0
- data/lib/ionoscloud/models/group.rb +260 -0
- data/lib/ionoscloud/models/group_entities.rb +225 -0
- data/lib/ionoscloud/models/group_members.rb +249 -0
- data/lib/ionoscloud/models/group_properties.rb +307 -0
- data/lib/ionoscloud/models/group_share.rb +251 -0
- data/lib/ionoscloud/models/group_share_properties.rb +227 -0
- data/lib/ionoscloud/models/group_shares.rb +249 -0
- data/lib/ionoscloud/models/group_users.rb +250 -0
- data/lib/ionoscloud/models/groups.rb +249 -0
- data/lib/ionoscloud/models/image.rb +260 -0
- data/lib/ionoscloud/models/image_properties.rb +428 -0
- data/lib/ionoscloud/models/images.rb +249 -0
- data/lib/ionoscloud/models/info.rb +237 -0
- data/lib/ionoscloud/models/ip_block.rb +260 -0
- data/lib/ionoscloud/models/ip_block_properties.rb +271 -0
- data/lib/ionoscloud/models/ip_blocks.rb +249 -0
- data/lib/ionoscloud/models/ip_consumer.rb +270 -0
- data/lib/ionoscloud/models/ip_failover.rb +225 -0
- data/lib/ionoscloud/models/kubernetes_auto_scaling.rb +227 -0
- data/lib/ionoscloud/models/kubernetes_cluster.rb +303 -0
- data/lib/ionoscloud/models/kubernetes_cluster_entities.rb +216 -0
- data/lib/ionoscloud/models/kubernetes_cluster_properties.rb +265 -0
- data/lib/ionoscloud/models/kubernetes_cluster_properties_for_post_and_put.rb +241 -0
- data/lib/ionoscloud/models/kubernetes_clusters.rb +283 -0
- data/lib/ionoscloud/models/kubernetes_config.rb +285 -0
- data/lib/ionoscloud/models/kubernetes_config_properties.rb +217 -0
- data/lib/ionoscloud/models/kubernetes_maintenance_window.rb +261 -0
- data/lib/ionoscloud/models/kubernetes_node.rb +294 -0
- data/lib/ionoscloud/models/kubernetes_node_metadata.rb +291 -0
- data/lib/ionoscloud/models/kubernetes_node_pool.rb +294 -0
- data/lib/ionoscloud/models/kubernetes_node_pool_for_put.rb +294 -0
- data/lib/ionoscloud/models/kubernetes_node_pool_lan.rb +217 -0
- data/lib/ionoscloud/models/kubernetes_node_pool_properties.rb +476 -0
- data/lib/ionoscloud/models/kubernetes_node_pool_properties_for_post.rb +464 -0
- data/lib/ionoscloud/models/kubernetes_node_pool_properties_for_put.rb +464 -0
- data/lib/ionoscloud/models/kubernetes_node_pools.rb +283 -0
- data/lib/ionoscloud/models/kubernetes_node_properties.rb +252 -0
- data/lib/ionoscloud/models/kubernetes_nodes.rb +283 -0
- data/lib/ionoscloud/models/label.rb +294 -0
- data/lib/ionoscloud/models/label_properties.rb +257 -0
- data/lib/ionoscloud/models/label_resource.rb +294 -0
- data/lib/ionoscloud/models/label_resource_properties.rb +227 -0
- data/lib/ionoscloud/models/label_resources.rb +312 -0
- data/lib/ionoscloud/models/labels.rb +283 -0
- data/lib/ionoscloud/models/lan.rb +269 -0
- data/lib/ionoscloud/models/lan_entities.rb +216 -0
- data/lib/ionoscloud/models/lan_nics.rb +278 -0
- data/lib/ionoscloud/models/lan_post.rb +269 -0
- data/lib/ionoscloud/models/lan_properties.rb +249 -0
- data/lib/ionoscloud/models/lan_properties_post.rb +249 -0
- data/lib/ionoscloud/models/lans.rb +278 -0
- data/lib/ionoscloud/models/loadbalancer.rb +269 -0
- data/lib/ionoscloud/models/loadbalancer_entities.rb +216 -0
- data/lib/ionoscloud/models/loadbalancer_properties.rb +271 -0
- data/lib/ionoscloud/models/loadbalancers.rb +278 -0
- data/lib/ionoscloud/models/location.rb +260 -0
- data/lib/ionoscloud/models/location_properties.rb +263 -0
- data/lib/ionoscloud/models/locations.rb +249 -0
- data/lib/ionoscloud/models/nic.rb +269 -0
- data/lib/ionoscloud/models/nic_entities.rb +216 -0
- data/lib/ionoscloud/models/nic_properties.rb +284 -0
- data/lib/ionoscloud/models/nics.rb +278 -0
- data/lib/ionoscloud/models/no_state_meta_data.rb +277 -0
- data/lib/ionoscloud/models/pagination_links.rb +237 -0
- data/lib/ionoscloud/models/peer.rb +252 -0
- data/lib/ionoscloud/models/private_cross_connect.rb +260 -0
- data/lib/ionoscloud/models/private_cross_connect_properties.rb +251 -0
- data/lib/ionoscloud/models/private_cross_connects.rb +249 -0
- data/lib/ionoscloud/models/request.rb +260 -0
- data/lib/ionoscloud/models/request_metadata.rb +246 -0
- data/lib/ionoscloud/models/request_properties.rb +245 -0
- data/lib/ionoscloud/models/request_status.rb +246 -0
- data/lib/ionoscloud/models/request_status_metadata.rb +280 -0
- data/lib/ionoscloud/models/request_target.rb +259 -0
- data/lib/ionoscloud/models/requests.rb +293 -0
- data/lib/ionoscloud/models/resource.rb +265 -0
- data/lib/ionoscloud/models/resource_entities.rb +216 -0
- data/lib/ionoscloud/models/resource_groups.rb +250 -0
- data/lib/ionoscloud/models/resource_limits.rb +462 -0
- data/lib/ionoscloud/models/resource_properties.rb +227 -0
- data/lib/ionoscloud/models/resource_reference.rb +242 -0
- data/lib/ionoscloud/models/resources.rb +250 -0
- data/lib/ionoscloud/models/resources_users.rb +250 -0
- data/lib/ionoscloud/models/s3_key.rb +260 -0
- data/lib/ionoscloud/models/s3_key_metadata.rb +227 -0
- data/lib/ionoscloud/models/s3_key_properties.rb +227 -0
- data/lib/ionoscloud/models/s3_keys.rb +249 -0
- data/lib/ionoscloud/models/s3_object_storage_sso.rb +217 -0
- data/lib/ionoscloud/models/server.rb +269 -0
- data/lib/ionoscloud/models/server_entities.rb +234 -0
- data/lib/ionoscloud/models/server_properties.rb +341 -0
- data/lib/ionoscloud/models/servers.rb +278 -0
- data/lib/ionoscloud/models/snapshot.rb +260 -0
- data/lib/ionoscloud/models/snapshot_properties.rb +401 -0
- data/lib/ionoscloud/models/snapshots.rb +249 -0
- data/lib/ionoscloud/models/type.rb +59 -0
- data/lib/ionoscloud/models/user.rb +269 -0
- data/lib/ionoscloud/models/user_metadata.rb +237 -0
- data/lib/ionoscloud/models/user_properties.rb +297 -0
- data/lib/ionoscloud/models/users.rb +249 -0
- data/lib/ionoscloud/models/users_entities.rb +225 -0
- data/lib/ionoscloud/models/volume.rb +260 -0
- data/lib/ionoscloud/models/volume_properties.rb +463 -0
- data/lib/ionoscloud/models/volumes.rb +278 -0
- data/lib/ionoscloud/version.rb +15 -0
- data/spec/api/_api_spec.rb +49 -0
- data/spec/api/backup_unit_api_spec.rb +140 -0
- data/spec/api/contract_api_spec.rb +49 -0
- data/spec/api/data_center_api_spec.rb +128 -0
- data/spec/api/image_api_spec.rb +111 -0
- data/spec/api/ip_blocks_api_spec.rb +126 -0
- data/spec/api/kubernetes_api_spec.rb +306 -0
- data/spec/api/label_api_spec.rb +480 -0
- data/spec/api/lan_api_spec.rb +186 -0
- data/spec/api/load_balancer_api_spec.rb +203 -0
- data/spec/api/location_api_spec.rb +80 -0
- data/spec/api/nic_api_spec.rb +251 -0
- data/spec/api/private_cross_connect_api_spec.rb +110 -0
- data/spec/api/request_api_spec.rb +84 -0
- data/spec/api/server_api_spec.rb +337 -0
- data/spec/api/snapshot_api_spec.rb +111 -0
- data/spec/api/user_management_api_spec.rb +495 -0
- data/spec/api/volume_api_spec.rb +171 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/attached_volumes_spec.rb +70 -0
- data/spec/models/backup_unit_properties_spec.rb +46 -0
- data/spec/models/backup_unit_spec.rb +62 -0
- data/spec/models/backup_unit_sso_spec.rb +34 -0
- data/spec/models/backup_units_spec.rb +56 -0
- data/spec/models/balanced_nics_spec.rb +70 -0
- data/spec/models/cdroms_spec.rb +70 -0
- data/spec/models/connectable_datacenter_spec.rb +46 -0
- data/spec/models/contract_properties_spec.rb +58 -0
- data/spec/models/contract_spec.rb +40 -0
- data/spec/models/data_center_entities_spec.rb +52 -0
- data/spec/models/datacenter_element_metadata_spec.rb +80 -0
- data/spec/models/datacenter_properties_spec.rb +68 -0
- data/spec/models/datacenter_spec.rb +64 -0
- data/spec/models/datacenters_spec.rb +70 -0
- data/spec/models/error_message_spec.rb +40 -0
- data/spec/models/error_spec.rb +40 -0
- data/spec/models/firewall_rule_spec.rb +58 -0
- data/spec/models/firewall_rules_spec.rb +70 -0
- data/spec/models/firewallrule_properties_spec.rb +98 -0
- data/spec/models/group_entities_spec.rb +40 -0
- data/spec/models/group_members_spec.rb +52 -0
- data/spec/models/group_properties_spec.rb +88 -0
- data/spec/models/group_share_properties_spec.rb +40 -0
- data/spec/models/group_share_spec.rb +52 -0
- data/spec/models/group_shares_spec.rb +52 -0
- data/spec/models/group_spec.rb +58 -0
- data/spec/models/group_users_spec.rb +52 -0
- data/spec/models/groups_spec.rb +52 -0
- data/spec/models/image_properties_spec.rb +138 -0
- data/spec/models/image_spec.rb +58 -0
- data/spec/models/images_spec.rb +52 -0
- data/spec/models/info_spec.rb +46 -0
- data/spec/models/ip_block_properties_spec.rb +58 -0
- data/spec/models/ip_block_spec.rb +58 -0
- data/spec/models/ip_blocks_spec.rb +52 -0
- data/spec/models/ip_consumer_spec.rb +70 -0
- data/spec/models/ip_failover_spec.rb +40 -0
- data/spec/models/kubernetes_auto_scaling_spec.rb +40 -0
- data/spec/models/kubernetes_cluster_entities_spec.rb +34 -0
- data/spec/models/kubernetes_cluster_properties_for_post_and_put_spec.rb +46 -0
- data/spec/models/kubernetes_cluster_properties_spec.rb +58 -0
- data/spec/models/kubernetes_cluster_spec.rb +68 -0
- data/spec/models/kubernetes_clusters_spec.rb +56 -0
- data/spec/models/kubernetes_config_properties_spec.rb +34 -0
- data/spec/models/kubernetes_config_spec.rb +56 -0
- data/spec/models/kubernetes_maintenance_window_spec.rb +44 -0
- data/spec/models/kubernetes_node_metadata_spec.rb +62 -0
- data/spec/models/kubernetes_node_pool_for_put_spec.rb +62 -0
- data/spec/models/kubernetes_node_pool_lan_spec.rb +34 -0
- data/spec/models/kubernetes_node_pool_properties_for_post_spec.rb +132 -0
- data/spec/models/kubernetes_node_pool_properties_for_put_spec.rb +132 -0
- data/spec/models/kubernetes_node_pool_properties_spec.rb +138 -0
- data/spec/models/kubernetes_node_pool_spec.rb +62 -0
- data/spec/models/kubernetes_node_pools_spec.rb +56 -0
- data/spec/models/kubernetes_node_properties_spec.rb +46 -0
- data/spec/models/kubernetes_node_spec.rb +62 -0
- data/spec/models/kubernetes_nodes_spec.rb +56 -0
- data/spec/models/label_properties_spec.rb +58 -0
- data/spec/models/label_resource_properties_spec.rb +40 -0
- data/spec/models/label_resource_spec.rb +62 -0
- data/spec/models/label_resources_spec.rb +74 -0
- data/spec/models/label_spec.rb +62 -0
- data/spec/models/labels_spec.rb +56 -0
- data/spec/models/lan_entities_spec.rb +34 -0
- data/spec/models/lan_nics_spec.rb +70 -0
- data/spec/models/lan_post_spec.rb +64 -0
- data/spec/models/lan_properties_post_spec.rb +52 -0
- data/spec/models/lan_properties_spec.rb +52 -0
- data/spec/models/lan_spec.rb +64 -0
- data/spec/models/lans_spec.rb +70 -0
- data/spec/models/loadbalancer_entities_spec.rb +34 -0
- data/spec/models/loadbalancer_properties_spec.rb +50 -0
- data/spec/models/loadbalancer_spec.rb +64 -0
- data/spec/models/loadbalancers_spec.rb +70 -0
- data/spec/models/location_properties_spec.rb +50 -0
- data/spec/models/location_spec.rb +58 -0
- data/spec/models/locations_spec.rb +52 -0
- data/spec/models/nic_entities_spec.rb +34 -0
- data/spec/models/nic_properties_spec.rb +70 -0
- data/spec/models/nic_spec.rb +64 -0
- data/spec/models/nics_spec.rb +70 -0
- data/spec/models/no_state_meta_data_spec.rb +70 -0
- data/spec/models/pagination_links_spec.rb +46 -0
- data/spec/models/peer_spec.rb +58 -0
- data/spec/models/private_cross_connect_properties_spec.rb +52 -0
- data/spec/models/private_cross_connect_spec.rb +58 -0
- data/spec/models/private_cross_connects_spec.rb +52 -0
- data/spec/models/request_metadata_spec.rb +52 -0
- data/spec/models/request_properties_spec.rb +52 -0
- data/spec/models/request_spec.rb +58 -0
- data/spec/models/request_status_metadata_spec.rb +56 -0
- data/spec/models/request_status_spec.rb +52 -0
- data/spec/models/request_target_spec.rb +44 -0
- data/spec/models/requests_spec.rb +70 -0
- data/spec/models/resource_entities_spec.rb +34 -0
- data/spec/models/resource_groups_spec.rb +52 -0
- data/spec/models/resource_limits_spec.rb +130 -0
- data/spec/models/resource_properties_spec.rb +40 -0
- data/spec/models/resource_reference_spec.rb +46 -0
- data/spec/models/resource_spec.rb +64 -0
- data/spec/models/resources_spec.rb +52 -0
- data/spec/models/resources_users_spec.rb +52 -0
- data/spec/models/s3_key_metadata_spec.rb +40 -0
- data/spec/models/s3_key_properties_spec.rb +40 -0
- data/spec/models/s3_key_spec.rb +58 -0
- data/spec/models/s3_keys_spec.rb +52 -0
- data/spec/models/s3_object_storage_sso_spec.rb +34 -0
- data/spec/models/server_entities_spec.rb +46 -0
- data/spec/models/server_properties_spec.rb +84 -0
- data/spec/models/server_spec.rb +64 -0
- data/spec/models/servers_spec.rb +70 -0
- data/spec/models/snapshot_properties_spec.rb +128 -0
- data/spec/models/snapshot_spec.rb +58 -0
- data/spec/models/snapshots_spec.rb +52 -0
- data/spec/models/type_spec.rb +28 -0
- data/spec/models/user_metadata_spec.rb +46 -0
- data/spec/models/user_properties_spec.rb +82 -0
- data/spec/models/user_spec.rb +64 -0
- data/spec/models/users_entities_spec.rb +40 -0
- data/spec/models/users_spec.rb +52 -0
- data/spec/models/volume_properties_spec.rb +152 -0
- data/spec/models/volume_spec.rb +58 -0
- data/spec/models/volumes_spec.rb +70 -0
- data/spec/spec_helper.rb +111 -0
- metadata +532 -0
@@ -0,0 +1,2460 @@
|
|
1
|
+
=begin
|
2
|
+
#CLOUD API
|
3
|
+
|
4
|
+
#An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API. The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 5.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.0.1-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module Ionoscloud
|
16
|
+
class LabelApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Delete a Label from Data Center
|
23
|
+
# This will remove a label from the data center.
|
24
|
+
# @param datacenter_id [String] The unique ID of the Data Center
|
25
|
+
# @param key [String] The key of the Label
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
|
28
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
|
29
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
30
|
+
# @return [Object]
|
31
|
+
def datacenters_labels_delete(datacenter_id, key, opts = {})
|
32
|
+
data, _status_code, _headers = datacenters_labels_delete_with_http_info(datacenter_id, key, opts)
|
33
|
+
data
|
34
|
+
end
|
35
|
+
|
36
|
+
# Delete a Label from Data Center
|
37
|
+
# This will remove a label from the data center.
|
38
|
+
# @param datacenter_id [String] The unique ID of the Data Center
|
39
|
+
# @param key [String] The key of the Label
|
40
|
+
# @param [Hash] opts the optional parameters
|
41
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
|
42
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
|
43
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
44
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
45
|
+
def datacenters_labels_delete_with_http_info(datacenter_id, key, opts = {})
|
46
|
+
if @api_client.config.debugging
|
47
|
+
@api_client.config.logger.debug 'Calling API: LabelApi.datacenters_labels_delete ...'
|
48
|
+
end
|
49
|
+
# verify the required parameter 'datacenter_id' is set
|
50
|
+
if @api_client.config.client_side_validation && datacenter_id.nil?
|
51
|
+
fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling LabelApi.datacenters_labels_delete"
|
52
|
+
end
|
53
|
+
# verify the required parameter 'key' is set
|
54
|
+
if @api_client.config.client_side_validation && key.nil?
|
55
|
+
fail ArgumentError, "Missing the required parameter 'key' when calling LabelApi.datacenters_labels_delete"
|
56
|
+
end
|
57
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
58
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_labels_delete, must be smaller than or equal to 10.'
|
59
|
+
end
|
60
|
+
|
61
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
62
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_labels_delete, must be greater than or equal to 0.'
|
63
|
+
end
|
64
|
+
|
65
|
+
# resource path
|
66
|
+
local_var_path = '/datacenters/{datacenterId}/labels/{key}'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'key' + '}', CGI.escape(key.to_s))
|
67
|
+
|
68
|
+
# query parameters
|
69
|
+
query_params = opts[:query_params] || {}
|
70
|
+
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
71
|
+
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
72
|
+
|
73
|
+
# header parameters
|
74
|
+
header_params = opts[:header_params] || {}
|
75
|
+
# HTTP header 'Accept' (if needed)
|
76
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
77
|
+
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
78
|
+
|
79
|
+
# form parameters
|
80
|
+
form_params = opts[:form_params] || {}
|
81
|
+
|
82
|
+
# http body (model)
|
83
|
+
post_body = opts[:debug_body]
|
84
|
+
|
85
|
+
# return_type
|
86
|
+
return_type = opts[:debug_return_type] || 'Object'
|
87
|
+
|
88
|
+
# auth_names
|
89
|
+
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
90
|
+
|
91
|
+
new_options = opts.merge(
|
92
|
+
:operation => :"LabelApi.datacenters_labels_delete",
|
93
|
+
:header_params => header_params,
|
94
|
+
:query_params => query_params,
|
95
|
+
:form_params => form_params,
|
96
|
+
:body => post_body,
|
97
|
+
:auth_names => auth_names,
|
98
|
+
:return_type => return_type
|
99
|
+
)
|
100
|
+
|
101
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
102
|
+
if @api_client.config.debugging
|
103
|
+
@api_client.config.logger.debug "API called: LabelApi#datacenters_labels_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
104
|
+
end
|
105
|
+
return data, status_code, headers
|
106
|
+
end
|
107
|
+
|
108
|
+
# Retrieve a Label of Data Center
|
109
|
+
# This will retrieve the properties of a associated label to a data center.
|
110
|
+
# @param datacenter_id [String] The unique ID of the Data Center
|
111
|
+
# @param key [String] The key of the Label
|
112
|
+
# @param [Hash] opts the optional parameters
|
113
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
|
114
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
|
115
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
116
|
+
# @return [LabelResource]
|
117
|
+
def datacenters_labels_find_by_key(datacenter_id, key, opts = {})
|
118
|
+
data, _status_code, _headers = datacenters_labels_find_by_key_with_http_info(datacenter_id, key, opts)
|
119
|
+
data
|
120
|
+
end
|
121
|
+
|
122
|
+
# Retrieve a Label of Data Center
|
123
|
+
# This will retrieve the properties of a associated label to a data center.
|
124
|
+
# @param datacenter_id [String] The unique ID of the Data Center
|
125
|
+
# @param key [String] The key of the Label
|
126
|
+
# @param [Hash] opts the optional parameters
|
127
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
|
128
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
|
129
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
130
|
+
# @return [Array<(LabelResource, Integer, Hash)>] LabelResource data, response status code and response headers
|
131
|
+
def datacenters_labels_find_by_key_with_http_info(datacenter_id, key, opts = {})
|
132
|
+
if @api_client.config.debugging
|
133
|
+
@api_client.config.logger.debug 'Calling API: LabelApi.datacenters_labels_find_by_key ...'
|
134
|
+
end
|
135
|
+
# verify the required parameter 'datacenter_id' is set
|
136
|
+
if @api_client.config.client_side_validation && datacenter_id.nil?
|
137
|
+
fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling LabelApi.datacenters_labels_find_by_key"
|
138
|
+
end
|
139
|
+
# verify the required parameter 'key' is set
|
140
|
+
if @api_client.config.client_side_validation && key.nil?
|
141
|
+
fail ArgumentError, "Missing the required parameter 'key' when calling LabelApi.datacenters_labels_find_by_key"
|
142
|
+
end
|
143
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
144
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_labels_find_by_key, must be smaller than or equal to 10.'
|
145
|
+
end
|
146
|
+
|
147
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
148
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_labels_find_by_key, must be greater than or equal to 0.'
|
149
|
+
end
|
150
|
+
|
151
|
+
# resource path
|
152
|
+
local_var_path = '/datacenters/{datacenterId}/labels/{key}'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'key' + '}', CGI.escape(key.to_s))
|
153
|
+
|
154
|
+
# query parameters
|
155
|
+
query_params = opts[:query_params] || {}
|
156
|
+
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
157
|
+
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
158
|
+
|
159
|
+
# header parameters
|
160
|
+
header_params = opts[:header_params] || {}
|
161
|
+
# HTTP header 'Accept' (if needed)
|
162
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
163
|
+
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
164
|
+
|
165
|
+
# form parameters
|
166
|
+
form_params = opts[:form_params] || {}
|
167
|
+
|
168
|
+
# http body (model)
|
169
|
+
post_body = opts[:debug_body]
|
170
|
+
|
171
|
+
# return_type
|
172
|
+
return_type = opts[:debug_return_type] || 'LabelResource'
|
173
|
+
|
174
|
+
# auth_names
|
175
|
+
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
176
|
+
|
177
|
+
new_options = opts.merge(
|
178
|
+
:operation => :"LabelApi.datacenters_labels_find_by_key",
|
179
|
+
:header_params => header_params,
|
180
|
+
:query_params => query_params,
|
181
|
+
:form_params => form_params,
|
182
|
+
:body => post_body,
|
183
|
+
:auth_names => auth_names,
|
184
|
+
:return_type => return_type
|
185
|
+
)
|
186
|
+
|
187
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
188
|
+
if @api_client.config.debugging
|
189
|
+
@api_client.config.logger.debug "API called: LabelApi#datacenters_labels_find_by_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
190
|
+
end
|
191
|
+
return data, status_code, headers
|
192
|
+
end
|
193
|
+
|
194
|
+
# List all Data Center Labels
|
195
|
+
# You can retrieve a list of all labels associated with a data center
|
196
|
+
# @param datacenter_id [String] The unique ID of the Data Center
|
197
|
+
# @param [Hash] opts the optional parameters
|
198
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
|
199
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
|
200
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
201
|
+
# @option opts [Integer] :offset the first element (of the total list of elements) to include in the response (use together with <code>limit</code> for pagination) (default to 0)
|
202
|
+
# @option opts [Integer] :limit the maximum number of elements to return (use together with <code>offset</code> for pagination) (default to 1000)
|
203
|
+
# @return [LabelResources]
|
204
|
+
def datacenters_labels_get(datacenter_id, opts = {})
|
205
|
+
data, _status_code, _headers = datacenters_labels_get_with_http_info(datacenter_id, opts)
|
206
|
+
data
|
207
|
+
end
|
208
|
+
|
209
|
+
# List all Data Center Labels
|
210
|
+
# You can retrieve a list of all labels associated with a data center
|
211
|
+
# @param datacenter_id [String] The unique ID of the Data Center
|
212
|
+
# @param [Hash] opts the optional parameters
|
213
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
|
214
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
|
215
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
216
|
+
# @option opts [Integer] :offset the first element (of the total list of elements) to include in the response (use together with <code>limit</code> for pagination)
|
217
|
+
# @option opts [Integer] :limit the maximum number of elements to return (use together with <code>offset</code> for pagination)
|
218
|
+
# @return [Array<(LabelResources, Integer, Hash)>] LabelResources data, response status code and response headers
|
219
|
+
def datacenters_labels_get_with_http_info(datacenter_id, opts = {})
|
220
|
+
if @api_client.config.debugging
|
221
|
+
@api_client.config.logger.debug 'Calling API: LabelApi.datacenters_labels_get ...'
|
222
|
+
end
|
223
|
+
# verify the required parameter 'datacenter_id' is set
|
224
|
+
if @api_client.config.client_side_validation && datacenter_id.nil?
|
225
|
+
fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling LabelApi.datacenters_labels_get"
|
226
|
+
end
|
227
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
228
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_labels_get, must be smaller than or equal to 10.'
|
229
|
+
end
|
230
|
+
|
231
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
232
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_labels_get, must be greater than or equal to 0.'
|
233
|
+
end
|
234
|
+
|
235
|
+
if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
|
236
|
+
fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling LabelApi.datacenters_labels_get, must be greater than or equal to 0.'
|
237
|
+
end
|
238
|
+
|
239
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 10000
|
240
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling LabelApi.datacenters_labels_get, must be smaller than or equal to 10000.'
|
241
|
+
end
|
242
|
+
|
243
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
244
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling LabelApi.datacenters_labels_get, must be greater than or equal to 1.'
|
245
|
+
end
|
246
|
+
|
247
|
+
# resource path
|
248
|
+
local_var_path = '/datacenters/{datacenterId}/labels'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s))
|
249
|
+
|
250
|
+
# query parameters
|
251
|
+
query_params = opts[:query_params] || {}
|
252
|
+
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
253
|
+
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
254
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
255
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
256
|
+
|
257
|
+
# header parameters
|
258
|
+
header_params = opts[:header_params] || {}
|
259
|
+
# HTTP header 'Accept' (if needed)
|
260
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
261
|
+
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
262
|
+
|
263
|
+
# form parameters
|
264
|
+
form_params = opts[:form_params] || {}
|
265
|
+
|
266
|
+
# http body (model)
|
267
|
+
post_body = opts[:debug_body]
|
268
|
+
|
269
|
+
# return_type
|
270
|
+
return_type = opts[:debug_return_type] || 'LabelResources'
|
271
|
+
|
272
|
+
# auth_names
|
273
|
+
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
274
|
+
|
275
|
+
new_options = opts.merge(
|
276
|
+
:operation => :"LabelApi.datacenters_labels_get",
|
277
|
+
:header_params => header_params,
|
278
|
+
:query_params => query_params,
|
279
|
+
:form_params => form_params,
|
280
|
+
:body => post_body,
|
281
|
+
:auth_names => auth_names,
|
282
|
+
:return_type => return_type
|
283
|
+
)
|
284
|
+
|
285
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
286
|
+
if @api_client.config.debugging
|
287
|
+
@api_client.config.logger.debug "API called: LabelApi#datacenters_labels_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
288
|
+
end
|
289
|
+
return data, status_code, headers
|
290
|
+
end
|
291
|
+
|
292
|
+
# Add a Label to Data Center
|
293
|
+
# This will add a label to the data center.
|
294
|
+
# @param datacenter_id [String] The unique ID of the Data Center
|
295
|
+
# @param label [LabelResource] Label to be added
|
296
|
+
# @param [Hash] opts the optional parameters
|
297
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
|
298
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
|
299
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
300
|
+
# @return [LabelResource]
|
301
|
+
def datacenters_labels_post(datacenter_id, label, opts = {})
|
302
|
+
data, _status_code, _headers = datacenters_labels_post_with_http_info(datacenter_id, label, opts)
|
303
|
+
data
|
304
|
+
end
|
305
|
+
|
306
|
+
# Add a Label to Data Center
|
307
|
+
# This will add a label to the data center.
|
308
|
+
# @param datacenter_id [String] The unique ID of the Data Center
|
309
|
+
# @param label [LabelResource] Label to be added
|
310
|
+
# @param [Hash] opts the optional parameters
|
311
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
|
312
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
|
313
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
314
|
+
# @return [Array<(LabelResource, Integer, Hash)>] LabelResource data, response status code and response headers
|
315
|
+
def datacenters_labels_post_with_http_info(datacenter_id, label, opts = {})
|
316
|
+
if @api_client.config.debugging
|
317
|
+
@api_client.config.logger.debug 'Calling API: LabelApi.datacenters_labels_post ...'
|
318
|
+
end
|
319
|
+
# verify the required parameter 'datacenter_id' is set
|
320
|
+
if @api_client.config.client_side_validation && datacenter_id.nil?
|
321
|
+
fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling LabelApi.datacenters_labels_post"
|
322
|
+
end
|
323
|
+
# verify the required parameter 'label' is set
|
324
|
+
if @api_client.config.client_side_validation && label.nil?
|
325
|
+
fail ArgumentError, "Missing the required parameter 'label' when calling LabelApi.datacenters_labels_post"
|
326
|
+
end
|
327
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
328
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_labels_post, must be smaller than or equal to 10.'
|
329
|
+
end
|
330
|
+
|
331
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
332
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_labels_post, must be greater than or equal to 0.'
|
333
|
+
end
|
334
|
+
|
335
|
+
# resource path
|
336
|
+
local_var_path = '/datacenters/{datacenterId}/labels'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s))
|
337
|
+
|
338
|
+
# query parameters
|
339
|
+
query_params = opts[:query_params] || {}
|
340
|
+
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
341
|
+
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
342
|
+
|
343
|
+
# header parameters
|
344
|
+
header_params = opts[:header_params] || {}
|
345
|
+
# HTTP header 'Accept' (if needed)
|
346
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
347
|
+
# HTTP header 'Content-Type'
|
348
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
349
|
+
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
350
|
+
|
351
|
+
# form parameters
|
352
|
+
form_params = opts[:form_params] || {}
|
353
|
+
|
354
|
+
# http body (model)
|
355
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(label)
|
356
|
+
|
357
|
+
# return_type
|
358
|
+
return_type = opts[:debug_return_type] || 'LabelResource'
|
359
|
+
|
360
|
+
# auth_names
|
361
|
+
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
362
|
+
|
363
|
+
new_options = opts.merge(
|
364
|
+
:operation => :"LabelApi.datacenters_labels_post",
|
365
|
+
:header_params => header_params,
|
366
|
+
:query_params => query_params,
|
367
|
+
:form_params => form_params,
|
368
|
+
:body => post_body,
|
369
|
+
:auth_names => auth_names,
|
370
|
+
:return_type => return_type
|
371
|
+
)
|
372
|
+
|
373
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
374
|
+
if @api_client.config.debugging
|
375
|
+
@api_client.config.logger.debug "API called: LabelApi#datacenters_labels_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
376
|
+
end
|
377
|
+
return data, status_code, headers
|
378
|
+
end
|
379
|
+
|
380
|
+
# Modify a Label of Data Center
|
381
|
+
# This will modify the value of the label on a data center.
|
382
|
+
# @param datacenter_id [String] The unique ID of the Data Center
|
383
|
+
# @param key [String] The key of the Label
|
384
|
+
# @param label [LabelResource] Modified Label
|
385
|
+
# @param [Hash] opts the optional parameters
|
386
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
|
387
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
|
388
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
389
|
+
# @return [LabelResource]
|
390
|
+
def datacenters_labels_put(datacenter_id, key, label, opts = {})
|
391
|
+
data, _status_code, _headers = datacenters_labels_put_with_http_info(datacenter_id, key, label, opts)
|
392
|
+
data
|
393
|
+
end
|
394
|
+
|
395
|
+
# Modify a Label of Data Center
|
396
|
+
# This will modify the value of the label on a data center.
|
397
|
+
# @param datacenter_id [String] The unique ID of the Data Center
|
398
|
+
# @param key [String] The key of the Label
|
399
|
+
# @param label [LabelResource] Modified Label
|
400
|
+
# @param [Hash] opts the optional parameters
|
401
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
|
402
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
|
403
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
404
|
+
# @return [Array<(LabelResource, Integer, Hash)>] LabelResource data, response status code and response headers
|
405
|
+
def datacenters_labels_put_with_http_info(datacenter_id, key, label, opts = {})
|
406
|
+
if @api_client.config.debugging
|
407
|
+
@api_client.config.logger.debug 'Calling API: LabelApi.datacenters_labels_put ...'
|
408
|
+
end
|
409
|
+
# verify the required parameter 'datacenter_id' is set
|
410
|
+
if @api_client.config.client_side_validation && datacenter_id.nil?
|
411
|
+
fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling LabelApi.datacenters_labels_put"
|
412
|
+
end
|
413
|
+
# verify the required parameter 'key' is set
|
414
|
+
if @api_client.config.client_side_validation && key.nil?
|
415
|
+
fail ArgumentError, "Missing the required parameter 'key' when calling LabelApi.datacenters_labels_put"
|
416
|
+
end
|
417
|
+
# verify the required parameter 'label' is set
|
418
|
+
if @api_client.config.client_side_validation && label.nil?
|
419
|
+
fail ArgumentError, "Missing the required parameter 'label' when calling LabelApi.datacenters_labels_put"
|
420
|
+
end
|
421
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
422
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_labels_put, must be smaller than or equal to 10.'
|
423
|
+
end
|
424
|
+
|
425
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
426
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_labels_put, must be greater than or equal to 0.'
|
427
|
+
end
|
428
|
+
|
429
|
+
# resource path
|
430
|
+
local_var_path = '/datacenters/{datacenterId}/labels/{key}'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'key' + '}', CGI.escape(key.to_s))
|
431
|
+
|
432
|
+
# query parameters
|
433
|
+
query_params = opts[:query_params] || {}
|
434
|
+
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
435
|
+
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
436
|
+
|
437
|
+
# header parameters
|
438
|
+
header_params = opts[:header_params] || {}
|
439
|
+
# HTTP header 'Accept' (if needed)
|
440
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
441
|
+
# HTTP header 'Content-Type'
|
442
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
443
|
+
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
444
|
+
|
445
|
+
# form parameters
|
446
|
+
form_params = opts[:form_params] || {}
|
447
|
+
|
448
|
+
# http body (model)
|
449
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(label)
|
450
|
+
|
451
|
+
# return_type
|
452
|
+
return_type = opts[:debug_return_type] || 'LabelResource'
|
453
|
+
|
454
|
+
# auth_names
|
455
|
+
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
456
|
+
|
457
|
+
new_options = opts.merge(
|
458
|
+
:operation => :"LabelApi.datacenters_labels_put",
|
459
|
+
:header_params => header_params,
|
460
|
+
:query_params => query_params,
|
461
|
+
:form_params => form_params,
|
462
|
+
:body => post_body,
|
463
|
+
:auth_names => auth_names,
|
464
|
+
:return_type => return_type
|
465
|
+
)
|
466
|
+
|
467
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
468
|
+
if @api_client.config.debugging
|
469
|
+
@api_client.config.logger.debug "API called: LabelApi#datacenters_labels_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
470
|
+
end
|
471
|
+
return data, status_code, headers
|
472
|
+
end
|
473
|
+
|
474
|
+
# Delete a Label from Server
|
475
|
+
# This will remove a label from the server.
|
476
|
+
# @param datacenter_id [String] The unique ID of the Datacenter
|
477
|
+
# @param server_id [String] The unique ID of the Server
|
478
|
+
# @param key [String] The key of the Label
|
479
|
+
# @param [Hash] opts the optional parameters
|
480
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
|
481
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
|
482
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
483
|
+
# @return [Object]
|
484
|
+
def datacenters_servers_labels_delete(datacenter_id, server_id, key, opts = {})
|
485
|
+
data, _status_code, _headers = datacenters_servers_labels_delete_with_http_info(datacenter_id, server_id, key, opts)
|
486
|
+
data
|
487
|
+
end
|
488
|
+
|
489
|
+
# Delete a Label from Server
|
490
|
+
# This will remove a label from the server.
|
491
|
+
# @param datacenter_id [String] The unique ID of the Datacenter
|
492
|
+
# @param server_id [String] The unique ID of the Server
|
493
|
+
# @param key [String] The key of the Label
|
494
|
+
# @param [Hash] opts the optional parameters
|
495
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
|
496
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
|
497
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
498
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
499
|
+
def datacenters_servers_labels_delete_with_http_info(datacenter_id, server_id, key, opts = {})
|
500
|
+
if @api_client.config.debugging
|
501
|
+
@api_client.config.logger.debug 'Calling API: LabelApi.datacenters_servers_labels_delete ...'
|
502
|
+
end
|
503
|
+
# verify the required parameter 'datacenter_id' is set
|
504
|
+
if @api_client.config.client_side_validation && datacenter_id.nil?
|
505
|
+
fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling LabelApi.datacenters_servers_labels_delete"
|
506
|
+
end
|
507
|
+
# verify the required parameter 'server_id' is set
|
508
|
+
if @api_client.config.client_side_validation && server_id.nil?
|
509
|
+
fail ArgumentError, "Missing the required parameter 'server_id' when calling LabelApi.datacenters_servers_labels_delete"
|
510
|
+
end
|
511
|
+
# verify the required parameter 'key' is set
|
512
|
+
if @api_client.config.client_side_validation && key.nil?
|
513
|
+
fail ArgumentError, "Missing the required parameter 'key' when calling LabelApi.datacenters_servers_labels_delete"
|
514
|
+
end
|
515
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
516
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_servers_labels_delete, must be smaller than or equal to 10.'
|
517
|
+
end
|
518
|
+
|
519
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
520
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_servers_labels_delete, must be greater than or equal to 0.'
|
521
|
+
end
|
522
|
+
|
523
|
+
# resource path
|
524
|
+
local_var_path = '/datacenters/{datacenterId}/servers/{serverId}/labels/{key}'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)).sub('{' + 'key' + '}', CGI.escape(key.to_s))
|
525
|
+
|
526
|
+
# query parameters
|
527
|
+
query_params = opts[:query_params] || {}
|
528
|
+
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
529
|
+
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
530
|
+
|
531
|
+
# header parameters
|
532
|
+
header_params = opts[:header_params] || {}
|
533
|
+
# HTTP header 'Accept' (if needed)
|
534
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
535
|
+
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
536
|
+
|
537
|
+
# form parameters
|
538
|
+
form_params = opts[:form_params] || {}
|
539
|
+
|
540
|
+
# http body (model)
|
541
|
+
post_body = opts[:debug_body]
|
542
|
+
|
543
|
+
# return_type
|
544
|
+
return_type = opts[:debug_return_type] || 'Object'
|
545
|
+
|
546
|
+
# auth_names
|
547
|
+
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
548
|
+
|
549
|
+
new_options = opts.merge(
|
550
|
+
:operation => :"LabelApi.datacenters_servers_labels_delete",
|
551
|
+
:header_params => header_params,
|
552
|
+
:query_params => query_params,
|
553
|
+
:form_params => form_params,
|
554
|
+
:body => post_body,
|
555
|
+
:auth_names => auth_names,
|
556
|
+
:return_type => return_type
|
557
|
+
)
|
558
|
+
|
559
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
560
|
+
if @api_client.config.debugging
|
561
|
+
@api_client.config.logger.debug "API called: LabelApi#datacenters_servers_labels_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
562
|
+
end
|
563
|
+
return data, status_code, headers
|
564
|
+
end
|
565
|
+
|
566
|
+
# Retrieve a Label of Server
|
567
|
+
# This will retrieve the properties of a associated label to a server.
|
568
|
+
# @param datacenter_id [String] The unique ID of the Datacenter
|
569
|
+
# @param server_id [String] The unique ID of the Server
|
570
|
+
# @param key [String] The key of the Label
|
571
|
+
# @param [Hash] opts the optional parameters
|
572
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
|
573
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
|
574
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
575
|
+
# @return [LabelResource]
|
576
|
+
def datacenters_servers_labels_find_by_key(datacenter_id, server_id, key, opts = {})
|
577
|
+
data, _status_code, _headers = datacenters_servers_labels_find_by_key_with_http_info(datacenter_id, server_id, key, opts)
|
578
|
+
data
|
579
|
+
end
|
580
|
+
|
581
|
+
# Retrieve a Label of Server
|
582
|
+
# This will retrieve the properties of a associated label to a server.
|
583
|
+
# @param datacenter_id [String] The unique ID of the Datacenter
|
584
|
+
# @param server_id [String] The unique ID of the Server
|
585
|
+
# @param key [String] The key of the Label
|
586
|
+
# @param [Hash] opts the optional parameters
|
587
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
|
588
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
|
589
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
590
|
+
# @return [Array<(LabelResource, Integer, Hash)>] LabelResource data, response status code and response headers
|
591
|
+
def datacenters_servers_labels_find_by_key_with_http_info(datacenter_id, server_id, key, opts = {})
|
592
|
+
if @api_client.config.debugging
|
593
|
+
@api_client.config.logger.debug 'Calling API: LabelApi.datacenters_servers_labels_find_by_key ...'
|
594
|
+
end
|
595
|
+
# verify the required parameter 'datacenter_id' is set
|
596
|
+
if @api_client.config.client_side_validation && datacenter_id.nil?
|
597
|
+
fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling LabelApi.datacenters_servers_labels_find_by_key"
|
598
|
+
end
|
599
|
+
# verify the required parameter 'server_id' is set
|
600
|
+
if @api_client.config.client_side_validation && server_id.nil?
|
601
|
+
fail ArgumentError, "Missing the required parameter 'server_id' when calling LabelApi.datacenters_servers_labels_find_by_key"
|
602
|
+
end
|
603
|
+
# verify the required parameter 'key' is set
|
604
|
+
if @api_client.config.client_side_validation && key.nil?
|
605
|
+
fail ArgumentError, "Missing the required parameter 'key' when calling LabelApi.datacenters_servers_labels_find_by_key"
|
606
|
+
end
|
607
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
608
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_servers_labels_find_by_key, must be smaller than or equal to 10.'
|
609
|
+
end
|
610
|
+
|
611
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
612
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_servers_labels_find_by_key, must be greater than or equal to 0.'
|
613
|
+
end
|
614
|
+
|
615
|
+
# resource path
|
616
|
+
local_var_path = '/datacenters/{datacenterId}/servers/{serverId}/labels/{key}'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)).sub('{' + 'key' + '}', CGI.escape(key.to_s))
|
617
|
+
|
618
|
+
# query parameters
|
619
|
+
query_params = opts[:query_params] || {}
|
620
|
+
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
621
|
+
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
622
|
+
|
623
|
+
# header parameters
|
624
|
+
header_params = opts[:header_params] || {}
|
625
|
+
# HTTP header 'Accept' (if needed)
|
626
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
627
|
+
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
628
|
+
|
629
|
+
# form parameters
|
630
|
+
form_params = opts[:form_params] || {}
|
631
|
+
|
632
|
+
# http body (model)
|
633
|
+
post_body = opts[:debug_body]
|
634
|
+
|
635
|
+
# return_type
|
636
|
+
return_type = opts[:debug_return_type] || 'LabelResource'
|
637
|
+
|
638
|
+
# auth_names
|
639
|
+
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
640
|
+
|
641
|
+
new_options = opts.merge(
|
642
|
+
:operation => :"LabelApi.datacenters_servers_labels_find_by_key",
|
643
|
+
:header_params => header_params,
|
644
|
+
:query_params => query_params,
|
645
|
+
:form_params => form_params,
|
646
|
+
:body => post_body,
|
647
|
+
:auth_names => auth_names,
|
648
|
+
:return_type => return_type
|
649
|
+
)
|
650
|
+
|
651
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
652
|
+
if @api_client.config.debugging
|
653
|
+
@api_client.config.logger.debug "API called: LabelApi#datacenters_servers_labels_find_by_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
654
|
+
end
|
655
|
+
return data, status_code, headers
|
656
|
+
end
|
657
|
+
|
658
|
+
# List all Server Labels
|
659
|
+
# You can retrieve a list of all labels associated with a server
|
660
|
+
# @param datacenter_id [String] The unique ID of the Datacenter
|
661
|
+
# @param server_id [String] The unique ID of the Server
|
662
|
+
# @param [Hash] opts the optional parameters
|
663
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
|
664
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
|
665
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
666
|
+
# @option opts [Integer] :offset the first element (of the total list of elements) to include in the response (use together with <code>limit</code> for pagination) (default to 0)
|
667
|
+
# @option opts [Integer] :limit the maximum number of elements to return (use together with <code>offset</code> for pagination) (default to 1000)
|
668
|
+
# @return [LabelResources]
|
669
|
+
def datacenters_servers_labels_get(datacenter_id, server_id, opts = {})
|
670
|
+
data, _status_code, _headers = datacenters_servers_labels_get_with_http_info(datacenter_id, server_id, opts)
|
671
|
+
data
|
672
|
+
end
|
673
|
+
|
674
|
+
# List all Server Labels
|
675
|
+
# You can retrieve a list of all labels associated with a server
|
676
|
+
# @param datacenter_id [String] The unique ID of the Datacenter
|
677
|
+
# @param server_id [String] The unique ID of the Server
|
678
|
+
# @param [Hash] opts the optional parameters
|
679
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
|
680
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
|
681
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
682
|
+
# @option opts [Integer] :offset the first element (of the total list of elements) to include in the response (use together with <code>limit</code> for pagination)
|
683
|
+
# @option opts [Integer] :limit the maximum number of elements to return (use together with <code>offset</code> for pagination)
|
684
|
+
# @return [Array<(LabelResources, Integer, Hash)>] LabelResources data, response status code and response headers
|
685
|
+
def datacenters_servers_labels_get_with_http_info(datacenter_id, server_id, opts = {})
|
686
|
+
if @api_client.config.debugging
|
687
|
+
@api_client.config.logger.debug 'Calling API: LabelApi.datacenters_servers_labels_get ...'
|
688
|
+
end
|
689
|
+
# verify the required parameter 'datacenter_id' is set
|
690
|
+
if @api_client.config.client_side_validation && datacenter_id.nil?
|
691
|
+
fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling LabelApi.datacenters_servers_labels_get"
|
692
|
+
end
|
693
|
+
# verify the required parameter 'server_id' is set
|
694
|
+
if @api_client.config.client_side_validation && server_id.nil?
|
695
|
+
fail ArgumentError, "Missing the required parameter 'server_id' when calling LabelApi.datacenters_servers_labels_get"
|
696
|
+
end
|
697
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
698
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_servers_labels_get, must be smaller than or equal to 10.'
|
699
|
+
end
|
700
|
+
|
701
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
702
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_servers_labels_get, must be greater than or equal to 0.'
|
703
|
+
end
|
704
|
+
|
705
|
+
if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
|
706
|
+
fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling LabelApi.datacenters_servers_labels_get, must be greater than or equal to 0.'
|
707
|
+
end
|
708
|
+
|
709
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 10000
|
710
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling LabelApi.datacenters_servers_labels_get, must be smaller than or equal to 10000.'
|
711
|
+
end
|
712
|
+
|
713
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
714
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling LabelApi.datacenters_servers_labels_get, must be greater than or equal to 1.'
|
715
|
+
end
|
716
|
+
|
717
|
+
# resource path
|
718
|
+
local_var_path = '/datacenters/{datacenterId}/servers/{serverId}/labels'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s))
|
719
|
+
|
720
|
+
# query parameters
|
721
|
+
query_params = opts[:query_params] || {}
|
722
|
+
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
723
|
+
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
724
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
725
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
726
|
+
|
727
|
+
# header parameters
|
728
|
+
header_params = opts[:header_params] || {}
|
729
|
+
# HTTP header 'Accept' (if needed)
|
730
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
731
|
+
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
732
|
+
|
733
|
+
# form parameters
|
734
|
+
form_params = opts[:form_params] || {}
|
735
|
+
|
736
|
+
# http body (model)
|
737
|
+
post_body = opts[:debug_body]
|
738
|
+
|
739
|
+
# return_type
|
740
|
+
return_type = opts[:debug_return_type] || 'LabelResources'
|
741
|
+
|
742
|
+
# auth_names
|
743
|
+
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
744
|
+
|
745
|
+
new_options = opts.merge(
|
746
|
+
:operation => :"LabelApi.datacenters_servers_labels_get",
|
747
|
+
:header_params => header_params,
|
748
|
+
:query_params => query_params,
|
749
|
+
:form_params => form_params,
|
750
|
+
:body => post_body,
|
751
|
+
:auth_names => auth_names,
|
752
|
+
:return_type => return_type
|
753
|
+
)
|
754
|
+
|
755
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
756
|
+
if @api_client.config.debugging
|
757
|
+
@api_client.config.logger.debug "API called: LabelApi#datacenters_servers_labels_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
758
|
+
end
|
759
|
+
return data, status_code, headers
|
760
|
+
end
|
761
|
+
|
762
|
+
# Add a Label to Server
|
763
|
+
# This will add a label to the server.
|
764
|
+
# @param datacenter_id [String] The unique ID of the Datacenter
|
765
|
+
# @param server_id [String] The unique ID of the Server
|
766
|
+
# @param label [LabelResource] Label to be added
|
767
|
+
# @param [Hash] opts the optional parameters
|
768
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
|
769
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
|
770
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
771
|
+
# @return [LabelResource]
|
772
|
+
def datacenters_servers_labels_post(datacenter_id, server_id, label, opts = {})
|
773
|
+
data, _status_code, _headers = datacenters_servers_labels_post_with_http_info(datacenter_id, server_id, label, opts)
|
774
|
+
data
|
775
|
+
end
|
776
|
+
|
777
|
+
# Add a Label to Server
|
778
|
+
# This will add a label to the server.
|
779
|
+
# @param datacenter_id [String] The unique ID of the Datacenter
|
780
|
+
# @param server_id [String] The unique ID of the Server
|
781
|
+
# @param label [LabelResource] Label to be added
|
782
|
+
# @param [Hash] opts the optional parameters
|
783
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
|
784
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
|
785
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
786
|
+
# @return [Array<(LabelResource, Integer, Hash)>] LabelResource data, response status code and response headers
|
787
|
+
def datacenters_servers_labels_post_with_http_info(datacenter_id, server_id, label, opts = {})
|
788
|
+
if @api_client.config.debugging
|
789
|
+
@api_client.config.logger.debug 'Calling API: LabelApi.datacenters_servers_labels_post ...'
|
790
|
+
end
|
791
|
+
# verify the required parameter 'datacenter_id' is set
|
792
|
+
if @api_client.config.client_side_validation && datacenter_id.nil?
|
793
|
+
fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling LabelApi.datacenters_servers_labels_post"
|
794
|
+
end
|
795
|
+
# verify the required parameter 'server_id' is set
|
796
|
+
if @api_client.config.client_side_validation && server_id.nil?
|
797
|
+
fail ArgumentError, "Missing the required parameter 'server_id' when calling LabelApi.datacenters_servers_labels_post"
|
798
|
+
end
|
799
|
+
# verify the required parameter 'label' is set
|
800
|
+
if @api_client.config.client_side_validation && label.nil?
|
801
|
+
fail ArgumentError, "Missing the required parameter 'label' when calling LabelApi.datacenters_servers_labels_post"
|
802
|
+
end
|
803
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
804
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_servers_labels_post, must be smaller than or equal to 10.'
|
805
|
+
end
|
806
|
+
|
807
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
808
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_servers_labels_post, must be greater than or equal to 0.'
|
809
|
+
end
|
810
|
+
|
811
|
+
# resource path
|
812
|
+
local_var_path = '/datacenters/{datacenterId}/servers/{serverId}/labels'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s))
|
813
|
+
|
814
|
+
# query parameters
|
815
|
+
query_params = opts[:query_params] || {}
|
816
|
+
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
817
|
+
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
818
|
+
|
819
|
+
# header parameters
|
820
|
+
header_params = opts[:header_params] || {}
|
821
|
+
# HTTP header 'Accept' (if needed)
|
822
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
823
|
+
# HTTP header 'Content-Type'
|
824
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
825
|
+
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
826
|
+
|
827
|
+
# form parameters
|
828
|
+
form_params = opts[:form_params] || {}
|
829
|
+
|
830
|
+
# http body (model)
|
831
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(label)
|
832
|
+
|
833
|
+
# return_type
|
834
|
+
return_type = opts[:debug_return_type] || 'LabelResource'
|
835
|
+
|
836
|
+
# auth_names
|
837
|
+
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
838
|
+
|
839
|
+
new_options = opts.merge(
|
840
|
+
:operation => :"LabelApi.datacenters_servers_labels_post",
|
841
|
+
:header_params => header_params,
|
842
|
+
:query_params => query_params,
|
843
|
+
:form_params => form_params,
|
844
|
+
:body => post_body,
|
845
|
+
:auth_names => auth_names,
|
846
|
+
:return_type => return_type
|
847
|
+
)
|
848
|
+
|
849
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
850
|
+
if @api_client.config.debugging
|
851
|
+
@api_client.config.logger.debug "API called: LabelApi#datacenters_servers_labels_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
852
|
+
end
|
853
|
+
return data, status_code, headers
|
854
|
+
end
|
855
|
+
|
856
|
+
# Modify a Label of Server
|
857
|
+
# This will modify the value of the label on a server.
|
858
|
+
# @param datacenter_id [String] The unique ID of the Datacenter
|
859
|
+
# @param server_id [String] The unique ID of the Server
|
860
|
+
# @param key [String] The key of the Label
|
861
|
+
# @param label [LabelResource] Modified Label
|
862
|
+
# @param [Hash] opts the optional parameters
|
863
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
|
864
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
|
865
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
866
|
+
# @return [LabelResource]
|
867
|
+
def datacenters_servers_labels_put(datacenter_id, server_id, key, label, opts = {})
|
868
|
+
data, _status_code, _headers = datacenters_servers_labels_put_with_http_info(datacenter_id, server_id, key, label, opts)
|
869
|
+
data
|
870
|
+
end
|
871
|
+
|
872
|
+
# Modify a Label of Server
|
873
|
+
# This will modify the value of the label on a server.
|
874
|
+
# @param datacenter_id [String] The unique ID of the Datacenter
|
875
|
+
# @param server_id [String] The unique ID of the Server
|
876
|
+
# @param key [String] The key of the Label
|
877
|
+
# @param label [LabelResource] Modified Label
|
878
|
+
# @param [Hash] opts the optional parameters
|
879
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
|
880
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
|
881
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
882
|
+
# @return [Array<(LabelResource, Integer, Hash)>] LabelResource data, response status code and response headers
|
883
|
+
def datacenters_servers_labels_put_with_http_info(datacenter_id, server_id, key, label, opts = {})
|
884
|
+
if @api_client.config.debugging
|
885
|
+
@api_client.config.logger.debug 'Calling API: LabelApi.datacenters_servers_labels_put ...'
|
886
|
+
end
|
887
|
+
# verify the required parameter 'datacenter_id' is set
|
888
|
+
if @api_client.config.client_side_validation && datacenter_id.nil?
|
889
|
+
fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling LabelApi.datacenters_servers_labels_put"
|
890
|
+
end
|
891
|
+
# verify the required parameter 'server_id' is set
|
892
|
+
if @api_client.config.client_side_validation && server_id.nil?
|
893
|
+
fail ArgumentError, "Missing the required parameter 'server_id' when calling LabelApi.datacenters_servers_labels_put"
|
894
|
+
end
|
895
|
+
# verify the required parameter 'key' is set
|
896
|
+
if @api_client.config.client_side_validation && key.nil?
|
897
|
+
fail ArgumentError, "Missing the required parameter 'key' when calling LabelApi.datacenters_servers_labels_put"
|
898
|
+
end
|
899
|
+
# verify the required parameter 'label' is set
|
900
|
+
if @api_client.config.client_side_validation && label.nil?
|
901
|
+
fail ArgumentError, "Missing the required parameter 'label' when calling LabelApi.datacenters_servers_labels_put"
|
902
|
+
end
|
903
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
904
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_servers_labels_put, must be smaller than or equal to 10.'
|
905
|
+
end
|
906
|
+
|
907
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
908
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_servers_labels_put, must be greater than or equal to 0.'
|
909
|
+
end
|
910
|
+
|
911
|
+
# resource path
|
912
|
+
local_var_path = '/datacenters/{datacenterId}/servers/{serverId}/labels/{key}'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)).sub('{' + 'key' + '}', CGI.escape(key.to_s))
|
913
|
+
|
914
|
+
# query parameters
|
915
|
+
query_params = opts[:query_params] || {}
|
916
|
+
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
917
|
+
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
918
|
+
|
919
|
+
# header parameters
|
920
|
+
header_params = opts[:header_params] || {}
|
921
|
+
# HTTP header 'Accept' (if needed)
|
922
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
923
|
+
# HTTP header 'Content-Type'
|
924
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
925
|
+
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
926
|
+
|
927
|
+
# form parameters
|
928
|
+
form_params = opts[:form_params] || {}
|
929
|
+
|
930
|
+
# http body (model)
|
931
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(label)
|
932
|
+
|
933
|
+
# return_type
|
934
|
+
return_type = opts[:debug_return_type] || 'LabelResource'
|
935
|
+
|
936
|
+
# auth_names
|
937
|
+
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
938
|
+
|
939
|
+
new_options = opts.merge(
|
940
|
+
:operation => :"LabelApi.datacenters_servers_labels_put",
|
941
|
+
:header_params => header_params,
|
942
|
+
:query_params => query_params,
|
943
|
+
:form_params => form_params,
|
944
|
+
:body => post_body,
|
945
|
+
:auth_names => auth_names,
|
946
|
+
:return_type => return_type
|
947
|
+
)
|
948
|
+
|
949
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
950
|
+
if @api_client.config.debugging
|
951
|
+
@api_client.config.logger.debug "API called: LabelApi#datacenters_servers_labels_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
952
|
+
end
|
953
|
+
return data, status_code, headers
|
954
|
+
end
|
955
|
+
|
956
|
+
# Delete a Label from Volume
|
957
|
+
# This will remove a label from the volume.
|
958
|
+
# @param datacenter_id [String] The unique ID of the Datacenter
|
959
|
+
# @param volume_id [String] The unique ID of the Volume
|
960
|
+
# @param key [String] The key of the Label
|
961
|
+
# @param [Hash] opts the optional parameters
|
962
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
|
963
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
|
964
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
965
|
+
# @return [Object]
|
966
|
+
def datacenters_volumes_labels_delete(datacenter_id, volume_id, key, opts = {})
|
967
|
+
data, _status_code, _headers = datacenters_volumes_labels_delete_with_http_info(datacenter_id, volume_id, key, opts)
|
968
|
+
data
|
969
|
+
end
|
970
|
+
|
971
|
+
# Delete a Label from Volume
|
972
|
+
# This will remove a label from the volume.
|
973
|
+
# @param datacenter_id [String] The unique ID of the Datacenter
|
974
|
+
# @param volume_id [String] The unique ID of the Volume
|
975
|
+
# @param key [String] The key of the Label
|
976
|
+
# @param [Hash] opts the optional parameters
|
977
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
|
978
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
|
979
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
980
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
981
|
+
def datacenters_volumes_labels_delete_with_http_info(datacenter_id, volume_id, key, opts = {})
|
982
|
+
if @api_client.config.debugging
|
983
|
+
@api_client.config.logger.debug 'Calling API: LabelApi.datacenters_volumes_labels_delete ...'
|
984
|
+
end
|
985
|
+
# verify the required parameter 'datacenter_id' is set
|
986
|
+
if @api_client.config.client_side_validation && datacenter_id.nil?
|
987
|
+
fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling LabelApi.datacenters_volumes_labels_delete"
|
988
|
+
end
|
989
|
+
# verify the required parameter 'volume_id' is set
|
990
|
+
if @api_client.config.client_side_validation && volume_id.nil?
|
991
|
+
fail ArgumentError, "Missing the required parameter 'volume_id' when calling LabelApi.datacenters_volumes_labels_delete"
|
992
|
+
end
|
993
|
+
# verify the required parameter 'key' is set
|
994
|
+
if @api_client.config.client_side_validation && key.nil?
|
995
|
+
fail ArgumentError, "Missing the required parameter 'key' when calling LabelApi.datacenters_volumes_labels_delete"
|
996
|
+
end
|
997
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
998
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_volumes_labels_delete, must be smaller than or equal to 10.'
|
999
|
+
end
|
1000
|
+
|
1001
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
1002
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_volumes_labels_delete, must be greater than or equal to 0.'
|
1003
|
+
end
|
1004
|
+
|
1005
|
+
# resource path
|
1006
|
+
local_var_path = '/datacenters/{datacenterId}/volumes/{volumeId}/labels/{key}'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'volumeId' + '}', CGI.escape(volume_id.to_s)).sub('{' + 'key' + '}', CGI.escape(key.to_s))
|
1007
|
+
|
1008
|
+
# query parameters
|
1009
|
+
query_params = opts[:query_params] || {}
|
1010
|
+
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
1011
|
+
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
1012
|
+
|
1013
|
+
# header parameters
|
1014
|
+
header_params = opts[:header_params] || {}
|
1015
|
+
# HTTP header 'Accept' (if needed)
|
1016
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1017
|
+
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
1018
|
+
|
1019
|
+
# form parameters
|
1020
|
+
form_params = opts[:form_params] || {}
|
1021
|
+
|
1022
|
+
# http body (model)
|
1023
|
+
post_body = opts[:debug_body]
|
1024
|
+
|
1025
|
+
# return_type
|
1026
|
+
return_type = opts[:debug_return_type] || 'Object'
|
1027
|
+
|
1028
|
+
# auth_names
|
1029
|
+
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
1030
|
+
|
1031
|
+
new_options = opts.merge(
|
1032
|
+
:operation => :"LabelApi.datacenters_volumes_labels_delete",
|
1033
|
+
:header_params => header_params,
|
1034
|
+
:query_params => query_params,
|
1035
|
+
:form_params => form_params,
|
1036
|
+
:body => post_body,
|
1037
|
+
:auth_names => auth_names,
|
1038
|
+
:return_type => return_type
|
1039
|
+
)
|
1040
|
+
|
1041
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
1042
|
+
if @api_client.config.debugging
|
1043
|
+
@api_client.config.logger.debug "API called: LabelApi#datacenters_volumes_labels_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1044
|
+
end
|
1045
|
+
return data, status_code, headers
|
1046
|
+
end
|
1047
|
+
|
1048
|
+
# Retrieve a Label of Volume
|
1049
|
+
# This will retrieve the properties of a associated label to a volume.
|
1050
|
+
# @param datacenter_id [String] The unique ID of the Datacenter
|
1051
|
+
# @param volume_id [String] The unique ID of the Volume
|
1052
|
+
# @param key [String] The key of the Label
|
1053
|
+
# @param [Hash] opts the optional parameters
|
1054
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
|
1055
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
|
1056
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
1057
|
+
# @return [LabelResource]
|
1058
|
+
def datacenters_volumes_labels_find_by_key(datacenter_id, volume_id, key, opts = {})
|
1059
|
+
data, _status_code, _headers = datacenters_volumes_labels_find_by_key_with_http_info(datacenter_id, volume_id, key, opts)
|
1060
|
+
data
|
1061
|
+
end
|
1062
|
+
|
1063
|
+
# Retrieve a Label of Volume
|
1064
|
+
# This will retrieve the properties of a associated label to a volume.
|
1065
|
+
# @param datacenter_id [String] The unique ID of the Datacenter
|
1066
|
+
# @param volume_id [String] The unique ID of the Volume
|
1067
|
+
# @param key [String] The key of the Label
|
1068
|
+
# @param [Hash] opts the optional parameters
|
1069
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
|
1070
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
|
1071
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
1072
|
+
# @return [Array<(LabelResource, Integer, Hash)>] LabelResource data, response status code and response headers
|
1073
|
+
def datacenters_volumes_labels_find_by_key_with_http_info(datacenter_id, volume_id, key, opts = {})
|
1074
|
+
if @api_client.config.debugging
|
1075
|
+
@api_client.config.logger.debug 'Calling API: LabelApi.datacenters_volumes_labels_find_by_key ...'
|
1076
|
+
end
|
1077
|
+
# verify the required parameter 'datacenter_id' is set
|
1078
|
+
if @api_client.config.client_side_validation && datacenter_id.nil?
|
1079
|
+
fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling LabelApi.datacenters_volumes_labels_find_by_key"
|
1080
|
+
end
|
1081
|
+
# verify the required parameter 'volume_id' is set
|
1082
|
+
if @api_client.config.client_side_validation && volume_id.nil?
|
1083
|
+
fail ArgumentError, "Missing the required parameter 'volume_id' when calling LabelApi.datacenters_volumes_labels_find_by_key"
|
1084
|
+
end
|
1085
|
+
# verify the required parameter 'key' is set
|
1086
|
+
if @api_client.config.client_side_validation && key.nil?
|
1087
|
+
fail ArgumentError, "Missing the required parameter 'key' when calling LabelApi.datacenters_volumes_labels_find_by_key"
|
1088
|
+
end
|
1089
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
1090
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_volumes_labels_find_by_key, must be smaller than or equal to 10.'
|
1091
|
+
end
|
1092
|
+
|
1093
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
1094
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_volumes_labels_find_by_key, must be greater than or equal to 0.'
|
1095
|
+
end
|
1096
|
+
|
1097
|
+
# resource path
|
1098
|
+
local_var_path = '/datacenters/{datacenterId}/volumes/{volumeId}/labels/{key}'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'volumeId' + '}', CGI.escape(volume_id.to_s)).sub('{' + 'key' + '}', CGI.escape(key.to_s))
|
1099
|
+
|
1100
|
+
# query parameters
|
1101
|
+
query_params = opts[:query_params] || {}
|
1102
|
+
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
1103
|
+
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
1104
|
+
|
1105
|
+
# header parameters
|
1106
|
+
header_params = opts[:header_params] || {}
|
1107
|
+
# HTTP header 'Accept' (if needed)
|
1108
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1109
|
+
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
1110
|
+
|
1111
|
+
# form parameters
|
1112
|
+
form_params = opts[:form_params] || {}
|
1113
|
+
|
1114
|
+
# http body (model)
|
1115
|
+
post_body = opts[:debug_body]
|
1116
|
+
|
1117
|
+
# return_type
|
1118
|
+
return_type = opts[:debug_return_type] || 'LabelResource'
|
1119
|
+
|
1120
|
+
# auth_names
|
1121
|
+
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
1122
|
+
|
1123
|
+
new_options = opts.merge(
|
1124
|
+
:operation => :"LabelApi.datacenters_volumes_labels_find_by_key",
|
1125
|
+
:header_params => header_params,
|
1126
|
+
:query_params => query_params,
|
1127
|
+
:form_params => form_params,
|
1128
|
+
:body => post_body,
|
1129
|
+
:auth_names => auth_names,
|
1130
|
+
:return_type => return_type
|
1131
|
+
)
|
1132
|
+
|
1133
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1134
|
+
if @api_client.config.debugging
|
1135
|
+
@api_client.config.logger.debug "API called: LabelApi#datacenters_volumes_labels_find_by_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1136
|
+
end
|
1137
|
+
return data, status_code, headers
|
1138
|
+
end
|
1139
|
+
|
1140
|
+
# List all Volume Labels
|
1141
|
+
# You can retrieve a list of all labels associated with a volume
|
1142
|
+
# @param datacenter_id [String] The unique ID of the Datacenter
|
1143
|
+
# @param volume_id [String] The unique ID of the Volume
|
1144
|
+
# @param [Hash] opts the optional parameters
|
1145
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
|
1146
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
|
1147
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
1148
|
+
# @option opts [Integer] :offset the first element (of the total list of elements) to include in the response (use together with <code>limit</code> for pagination) (default to 0)
|
1149
|
+
# @option opts [Integer] :limit the maximum number of elements to return (use together with <code>offset</code> for pagination) (default to 1000)
|
1150
|
+
# @return [LabelResources]
|
1151
|
+
def datacenters_volumes_labels_get(datacenter_id, volume_id, opts = {})
|
1152
|
+
data, _status_code, _headers = datacenters_volumes_labels_get_with_http_info(datacenter_id, volume_id, opts)
|
1153
|
+
data
|
1154
|
+
end
|
1155
|
+
|
1156
|
+
# List all Volume Labels
|
1157
|
+
# You can retrieve a list of all labels associated with a volume
|
1158
|
+
# @param datacenter_id [String] The unique ID of the Datacenter
|
1159
|
+
# @param volume_id [String] The unique ID of the Volume
|
1160
|
+
# @param [Hash] opts the optional parameters
|
1161
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
|
1162
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
|
1163
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
1164
|
+
# @option opts [Integer] :offset the first element (of the total list of elements) to include in the response (use together with <code>limit</code> for pagination)
|
1165
|
+
# @option opts [Integer] :limit the maximum number of elements to return (use together with <code>offset</code> for pagination)
|
1166
|
+
# @return [Array<(LabelResources, Integer, Hash)>] LabelResources data, response status code and response headers
|
1167
|
+
def datacenters_volumes_labels_get_with_http_info(datacenter_id, volume_id, opts = {})
|
1168
|
+
if @api_client.config.debugging
|
1169
|
+
@api_client.config.logger.debug 'Calling API: LabelApi.datacenters_volumes_labels_get ...'
|
1170
|
+
end
|
1171
|
+
# verify the required parameter 'datacenter_id' is set
|
1172
|
+
if @api_client.config.client_side_validation && datacenter_id.nil?
|
1173
|
+
fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling LabelApi.datacenters_volumes_labels_get"
|
1174
|
+
end
|
1175
|
+
# verify the required parameter 'volume_id' is set
|
1176
|
+
if @api_client.config.client_side_validation && volume_id.nil?
|
1177
|
+
fail ArgumentError, "Missing the required parameter 'volume_id' when calling LabelApi.datacenters_volumes_labels_get"
|
1178
|
+
end
|
1179
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
1180
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_volumes_labels_get, must be smaller than or equal to 10.'
|
1181
|
+
end
|
1182
|
+
|
1183
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
1184
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_volumes_labels_get, must be greater than or equal to 0.'
|
1185
|
+
end
|
1186
|
+
|
1187
|
+
if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
|
1188
|
+
fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling LabelApi.datacenters_volumes_labels_get, must be greater than or equal to 0.'
|
1189
|
+
end
|
1190
|
+
|
1191
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 10000
|
1192
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling LabelApi.datacenters_volumes_labels_get, must be smaller than or equal to 10000.'
|
1193
|
+
end
|
1194
|
+
|
1195
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
1196
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling LabelApi.datacenters_volumes_labels_get, must be greater than or equal to 1.'
|
1197
|
+
end
|
1198
|
+
|
1199
|
+
# resource path
|
1200
|
+
local_var_path = '/datacenters/{datacenterId}/volumes/{volumeId}/labels'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'volumeId' + '}', CGI.escape(volume_id.to_s))
|
1201
|
+
|
1202
|
+
# query parameters
|
1203
|
+
query_params = opts[:query_params] || {}
|
1204
|
+
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
1205
|
+
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
1206
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
1207
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
1208
|
+
|
1209
|
+
# header parameters
|
1210
|
+
header_params = opts[:header_params] || {}
|
1211
|
+
# HTTP header 'Accept' (if needed)
|
1212
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1213
|
+
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
1214
|
+
|
1215
|
+
# form parameters
|
1216
|
+
form_params = opts[:form_params] || {}
|
1217
|
+
|
1218
|
+
# http body (model)
|
1219
|
+
post_body = opts[:debug_body]
|
1220
|
+
|
1221
|
+
# return_type
|
1222
|
+
return_type = opts[:debug_return_type] || 'LabelResources'
|
1223
|
+
|
1224
|
+
# auth_names
|
1225
|
+
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
1226
|
+
|
1227
|
+
new_options = opts.merge(
|
1228
|
+
:operation => :"LabelApi.datacenters_volumes_labels_get",
|
1229
|
+
:header_params => header_params,
|
1230
|
+
:query_params => query_params,
|
1231
|
+
:form_params => form_params,
|
1232
|
+
:body => post_body,
|
1233
|
+
:auth_names => auth_names,
|
1234
|
+
:return_type => return_type
|
1235
|
+
)
|
1236
|
+
|
1237
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1238
|
+
if @api_client.config.debugging
|
1239
|
+
@api_client.config.logger.debug "API called: LabelApi#datacenters_volumes_labels_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1240
|
+
end
|
1241
|
+
return data, status_code, headers
|
1242
|
+
end
|
1243
|
+
|
1244
|
+
# Add a Label to Volume
|
1245
|
+
# This will add a label to the volume.
|
1246
|
+
# @param datacenter_id [String] The unique ID of the Datacenter
|
1247
|
+
# @param volume_id [String] The unique ID of the Volume
|
1248
|
+
# @param label [LabelResource] Label to be added
|
1249
|
+
# @param [Hash] opts the optional parameters
|
1250
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
|
1251
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
|
1252
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
1253
|
+
# @return [LabelResource]
|
1254
|
+
def datacenters_volumes_labels_post(datacenter_id, volume_id, label, opts = {})
|
1255
|
+
data, _status_code, _headers = datacenters_volumes_labels_post_with_http_info(datacenter_id, volume_id, label, opts)
|
1256
|
+
data
|
1257
|
+
end
|
1258
|
+
|
1259
|
+
# Add a Label to Volume
|
1260
|
+
# This will add a label to the volume.
|
1261
|
+
# @param datacenter_id [String] The unique ID of the Datacenter
|
1262
|
+
# @param volume_id [String] The unique ID of the Volume
|
1263
|
+
# @param label [LabelResource] Label to be added
|
1264
|
+
# @param [Hash] opts the optional parameters
|
1265
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
|
1266
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
|
1267
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
1268
|
+
# @return [Array<(LabelResource, Integer, Hash)>] LabelResource data, response status code and response headers
|
1269
|
+
def datacenters_volumes_labels_post_with_http_info(datacenter_id, volume_id, label, opts = {})
|
1270
|
+
if @api_client.config.debugging
|
1271
|
+
@api_client.config.logger.debug 'Calling API: LabelApi.datacenters_volumes_labels_post ...'
|
1272
|
+
end
|
1273
|
+
# verify the required parameter 'datacenter_id' is set
|
1274
|
+
if @api_client.config.client_side_validation && datacenter_id.nil?
|
1275
|
+
fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling LabelApi.datacenters_volumes_labels_post"
|
1276
|
+
end
|
1277
|
+
# verify the required parameter 'volume_id' is set
|
1278
|
+
if @api_client.config.client_side_validation && volume_id.nil?
|
1279
|
+
fail ArgumentError, "Missing the required parameter 'volume_id' when calling LabelApi.datacenters_volumes_labels_post"
|
1280
|
+
end
|
1281
|
+
# verify the required parameter 'label' is set
|
1282
|
+
if @api_client.config.client_side_validation && label.nil?
|
1283
|
+
fail ArgumentError, "Missing the required parameter 'label' when calling LabelApi.datacenters_volumes_labels_post"
|
1284
|
+
end
|
1285
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
1286
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_volumes_labels_post, must be smaller than or equal to 10.'
|
1287
|
+
end
|
1288
|
+
|
1289
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
1290
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_volumes_labels_post, must be greater than or equal to 0.'
|
1291
|
+
end
|
1292
|
+
|
1293
|
+
# resource path
|
1294
|
+
local_var_path = '/datacenters/{datacenterId}/volumes/{volumeId}/labels'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'volumeId' + '}', CGI.escape(volume_id.to_s))
|
1295
|
+
|
1296
|
+
# query parameters
|
1297
|
+
query_params = opts[:query_params] || {}
|
1298
|
+
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
1299
|
+
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
1300
|
+
|
1301
|
+
# header parameters
|
1302
|
+
header_params = opts[:header_params] || {}
|
1303
|
+
# HTTP header 'Accept' (if needed)
|
1304
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1305
|
+
# HTTP header 'Content-Type'
|
1306
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1307
|
+
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
1308
|
+
|
1309
|
+
# form parameters
|
1310
|
+
form_params = opts[:form_params] || {}
|
1311
|
+
|
1312
|
+
# http body (model)
|
1313
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(label)
|
1314
|
+
|
1315
|
+
# return_type
|
1316
|
+
return_type = opts[:debug_return_type] || 'LabelResource'
|
1317
|
+
|
1318
|
+
# auth_names
|
1319
|
+
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
1320
|
+
|
1321
|
+
new_options = opts.merge(
|
1322
|
+
:operation => :"LabelApi.datacenters_volumes_labels_post",
|
1323
|
+
:header_params => header_params,
|
1324
|
+
:query_params => query_params,
|
1325
|
+
:form_params => form_params,
|
1326
|
+
:body => post_body,
|
1327
|
+
:auth_names => auth_names,
|
1328
|
+
:return_type => return_type
|
1329
|
+
)
|
1330
|
+
|
1331
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
1332
|
+
if @api_client.config.debugging
|
1333
|
+
@api_client.config.logger.debug "API called: LabelApi#datacenters_volumes_labels_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1334
|
+
end
|
1335
|
+
return data, status_code, headers
|
1336
|
+
end
|
1337
|
+
|
1338
|
+
# Modify a Label of Volume
|
1339
|
+
# This will modify the value of the label on a volume.
|
1340
|
+
# @param datacenter_id [String] The unique ID of the Datacenter
|
1341
|
+
# @param volume_id [String] The unique ID of the Volume
|
1342
|
+
# @param key [String] The key of the Label
|
1343
|
+
# @param label [LabelResource] Modified Label
|
1344
|
+
# @param [Hash] opts the optional parameters
|
1345
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
|
1346
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
|
1347
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
1348
|
+
# @return [LabelResource]
|
1349
|
+
def datacenters_volumes_labels_put(datacenter_id, volume_id, key, label, opts = {})
|
1350
|
+
data, _status_code, _headers = datacenters_volumes_labels_put_with_http_info(datacenter_id, volume_id, key, label, opts)
|
1351
|
+
data
|
1352
|
+
end
|
1353
|
+
|
1354
|
+
# Modify a Label of Volume
|
1355
|
+
# This will modify the value of the label on a volume.
|
1356
|
+
# @param datacenter_id [String] The unique ID of the Datacenter
|
1357
|
+
# @param volume_id [String] The unique ID of the Volume
|
1358
|
+
# @param key [String] The key of the Label
|
1359
|
+
# @param label [LabelResource] Modified Label
|
1360
|
+
# @param [Hash] opts the optional parameters
|
1361
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
|
1362
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
|
1363
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
1364
|
+
# @return [Array<(LabelResource, Integer, Hash)>] LabelResource data, response status code and response headers
|
1365
|
+
def datacenters_volumes_labels_put_with_http_info(datacenter_id, volume_id, key, label, opts = {})
|
1366
|
+
if @api_client.config.debugging
|
1367
|
+
@api_client.config.logger.debug 'Calling API: LabelApi.datacenters_volumes_labels_put ...'
|
1368
|
+
end
|
1369
|
+
# verify the required parameter 'datacenter_id' is set
|
1370
|
+
if @api_client.config.client_side_validation && datacenter_id.nil?
|
1371
|
+
fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling LabelApi.datacenters_volumes_labels_put"
|
1372
|
+
end
|
1373
|
+
# verify the required parameter 'volume_id' is set
|
1374
|
+
if @api_client.config.client_side_validation && volume_id.nil?
|
1375
|
+
fail ArgumentError, "Missing the required parameter 'volume_id' when calling LabelApi.datacenters_volumes_labels_put"
|
1376
|
+
end
|
1377
|
+
# verify the required parameter 'key' is set
|
1378
|
+
if @api_client.config.client_side_validation && key.nil?
|
1379
|
+
fail ArgumentError, "Missing the required parameter 'key' when calling LabelApi.datacenters_volumes_labels_put"
|
1380
|
+
end
|
1381
|
+
# verify the required parameter 'label' is set
|
1382
|
+
if @api_client.config.client_side_validation && label.nil?
|
1383
|
+
fail ArgumentError, "Missing the required parameter 'label' when calling LabelApi.datacenters_volumes_labels_put"
|
1384
|
+
end
|
1385
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
1386
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_volumes_labels_put, must be smaller than or equal to 10.'
|
1387
|
+
end
|
1388
|
+
|
1389
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
1390
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_volumes_labels_put, must be greater than or equal to 0.'
|
1391
|
+
end
|
1392
|
+
|
1393
|
+
# resource path
|
1394
|
+
local_var_path = '/datacenters/{datacenterId}/volumes/{volumeId}/labels/{key}'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'volumeId' + '}', CGI.escape(volume_id.to_s)).sub('{' + 'key' + '}', CGI.escape(key.to_s))
|
1395
|
+
|
1396
|
+
# query parameters
|
1397
|
+
query_params = opts[:query_params] || {}
|
1398
|
+
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
1399
|
+
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
1400
|
+
|
1401
|
+
# header parameters
|
1402
|
+
header_params = opts[:header_params] || {}
|
1403
|
+
# HTTP header 'Accept' (if needed)
|
1404
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1405
|
+
# HTTP header 'Content-Type'
|
1406
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1407
|
+
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
1408
|
+
|
1409
|
+
# form parameters
|
1410
|
+
form_params = opts[:form_params] || {}
|
1411
|
+
|
1412
|
+
# http body (model)
|
1413
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(label)
|
1414
|
+
|
1415
|
+
# return_type
|
1416
|
+
return_type = opts[:debug_return_type] || 'LabelResource'
|
1417
|
+
|
1418
|
+
# auth_names
|
1419
|
+
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
1420
|
+
|
1421
|
+
new_options = opts.merge(
|
1422
|
+
:operation => :"LabelApi.datacenters_volumes_labels_put",
|
1423
|
+
:header_params => header_params,
|
1424
|
+
:query_params => query_params,
|
1425
|
+
:form_params => form_params,
|
1426
|
+
:body => post_body,
|
1427
|
+
:auth_names => auth_names,
|
1428
|
+
:return_type => return_type
|
1429
|
+
)
|
1430
|
+
|
1431
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
1432
|
+
if @api_client.config.debugging
|
1433
|
+
@api_client.config.logger.debug "API called: LabelApi#datacenters_volumes_labels_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1434
|
+
end
|
1435
|
+
return data, status_code, headers
|
1436
|
+
end
|
1437
|
+
|
1438
|
+
# Delete a Label from IP Block
|
1439
|
+
# This will remove a label from the Ip Block.
|
1440
|
+
# @param ipblock_id [String] The unique ID of the Ip Block
|
1441
|
+
# @param key [String] The key of the Label
|
1442
|
+
# @param [Hash] opts the optional parameters
|
1443
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
|
1444
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
|
1445
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
1446
|
+
# @return [Object]
|
1447
|
+
def ipblocks_labels_delete(ipblock_id, key, opts = {})
|
1448
|
+
data, _status_code, _headers = ipblocks_labels_delete_with_http_info(ipblock_id, key, opts)
|
1449
|
+
data
|
1450
|
+
end
|
1451
|
+
|
1452
|
+
# Delete a Label from IP Block
|
1453
|
+
# This will remove a label from the Ip Block.
|
1454
|
+
# @param ipblock_id [String] The unique ID of the Ip Block
|
1455
|
+
# @param key [String] The key of the Label
|
1456
|
+
# @param [Hash] opts the optional parameters
|
1457
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
|
1458
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
|
1459
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
1460
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
1461
|
+
def ipblocks_labels_delete_with_http_info(ipblock_id, key, opts = {})
|
1462
|
+
if @api_client.config.debugging
|
1463
|
+
@api_client.config.logger.debug 'Calling API: LabelApi.ipblocks_labels_delete ...'
|
1464
|
+
end
|
1465
|
+
# verify the required parameter 'ipblock_id' is set
|
1466
|
+
if @api_client.config.client_side_validation && ipblock_id.nil?
|
1467
|
+
fail ArgumentError, "Missing the required parameter 'ipblock_id' when calling LabelApi.ipblocks_labels_delete"
|
1468
|
+
end
|
1469
|
+
# verify the required parameter 'key' is set
|
1470
|
+
if @api_client.config.client_side_validation && key.nil?
|
1471
|
+
fail ArgumentError, "Missing the required parameter 'key' when calling LabelApi.ipblocks_labels_delete"
|
1472
|
+
end
|
1473
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
1474
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.ipblocks_labels_delete, must be smaller than or equal to 10.'
|
1475
|
+
end
|
1476
|
+
|
1477
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
1478
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.ipblocks_labels_delete, must be greater than or equal to 0.'
|
1479
|
+
end
|
1480
|
+
|
1481
|
+
# resource path
|
1482
|
+
local_var_path = '/ipblocks/{ipblockId}/labels/{key}'.sub('{' + 'ipblockId' + '}', CGI.escape(ipblock_id.to_s)).sub('{' + 'key' + '}', CGI.escape(key.to_s))
|
1483
|
+
|
1484
|
+
# query parameters
|
1485
|
+
query_params = opts[:query_params] || {}
|
1486
|
+
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
1487
|
+
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
1488
|
+
|
1489
|
+
# header parameters
|
1490
|
+
header_params = opts[:header_params] || {}
|
1491
|
+
# HTTP header 'Accept' (if needed)
|
1492
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1493
|
+
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
1494
|
+
|
1495
|
+
# form parameters
|
1496
|
+
form_params = opts[:form_params] || {}
|
1497
|
+
|
1498
|
+
# http body (model)
|
1499
|
+
post_body = opts[:debug_body]
|
1500
|
+
|
1501
|
+
# return_type
|
1502
|
+
return_type = opts[:debug_return_type] || 'Object'
|
1503
|
+
|
1504
|
+
# auth_names
|
1505
|
+
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
1506
|
+
|
1507
|
+
new_options = opts.merge(
|
1508
|
+
:operation => :"LabelApi.ipblocks_labels_delete",
|
1509
|
+
:header_params => header_params,
|
1510
|
+
:query_params => query_params,
|
1511
|
+
:form_params => form_params,
|
1512
|
+
:body => post_body,
|
1513
|
+
:auth_names => auth_names,
|
1514
|
+
:return_type => return_type
|
1515
|
+
)
|
1516
|
+
|
1517
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
1518
|
+
if @api_client.config.debugging
|
1519
|
+
@api_client.config.logger.debug "API called: LabelApi#ipblocks_labels_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1520
|
+
end
|
1521
|
+
return data, status_code, headers
|
1522
|
+
end
|
1523
|
+
|
1524
|
+
# Retrieve a Label of IP Block
|
1525
|
+
# This will retrieve the properties of a associated label to a Ip Block.
|
1526
|
+
# @param ipblock_id [String] The unique ID of the Ip Block
|
1527
|
+
# @param key [String] The key of the Label
|
1528
|
+
# @param [Hash] opts the optional parameters
|
1529
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
|
1530
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
|
1531
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
1532
|
+
# @return [LabelResource]
|
1533
|
+
def ipblocks_labels_find_by_key(ipblock_id, key, opts = {})
|
1534
|
+
data, _status_code, _headers = ipblocks_labels_find_by_key_with_http_info(ipblock_id, key, opts)
|
1535
|
+
data
|
1536
|
+
end
|
1537
|
+
|
1538
|
+
# Retrieve a Label of IP Block
|
1539
|
+
# This will retrieve the properties of a associated label to a Ip Block.
|
1540
|
+
# @param ipblock_id [String] The unique ID of the Ip Block
|
1541
|
+
# @param key [String] The key of the Label
|
1542
|
+
# @param [Hash] opts the optional parameters
|
1543
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
|
1544
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
|
1545
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
1546
|
+
# @return [Array<(LabelResource, Integer, Hash)>] LabelResource data, response status code and response headers
|
1547
|
+
def ipblocks_labels_find_by_key_with_http_info(ipblock_id, key, opts = {})
|
1548
|
+
if @api_client.config.debugging
|
1549
|
+
@api_client.config.logger.debug 'Calling API: LabelApi.ipblocks_labels_find_by_key ...'
|
1550
|
+
end
|
1551
|
+
# verify the required parameter 'ipblock_id' is set
|
1552
|
+
if @api_client.config.client_side_validation && ipblock_id.nil?
|
1553
|
+
fail ArgumentError, "Missing the required parameter 'ipblock_id' when calling LabelApi.ipblocks_labels_find_by_key"
|
1554
|
+
end
|
1555
|
+
# verify the required parameter 'key' is set
|
1556
|
+
if @api_client.config.client_side_validation && key.nil?
|
1557
|
+
fail ArgumentError, "Missing the required parameter 'key' when calling LabelApi.ipblocks_labels_find_by_key"
|
1558
|
+
end
|
1559
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
1560
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.ipblocks_labels_find_by_key, must be smaller than or equal to 10.'
|
1561
|
+
end
|
1562
|
+
|
1563
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
1564
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.ipblocks_labels_find_by_key, must be greater than or equal to 0.'
|
1565
|
+
end
|
1566
|
+
|
1567
|
+
# resource path
|
1568
|
+
local_var_path = '/ipblocks/{ipblockId}/labels/{key}'.sub('{' + 'ipblockId' + '}', CGI.escape(ipblock_id.to_s)).sub('{' + 'key' + '}', CGI.escape(key.to_s))
|
1569
|
+
|
1570
|
+
# query parameters
|
1571
|
+
query_params = opts[:query_params] || {}
|
1572
|
+
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
1573
|
+
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
1574
|
+
|
1575
|
+
# header parameters
|
1576
|
+
header_params = opts[:header_params] || {}
|
1577
|
+
# HTTP header 'Accept' (if needed)
|
1578
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1579
|
+
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
1580
|
+
|
1581
|
+
# form parameters
|
1582
|
+
form_params = opts[:form_params] || {}
|
1583
|
+
|
1584
|
+
# http body (model)
|
1585
|
+
post_body = opts[:debug_body]
|
1586
|
+
|
1587
|
+
# return_type
|
1588
|
+
return_type = opts[:debug_return_type] || 'LabelResource'
|
1589
|
+
|
1590
|
+
# auth_names
|
1591
|
+
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
1592
|
+
|
1593
|
+
new_options = opts.merge(
|
1594
|
+
:operation => :"LabelApi.ipblocks_labels_find_by_key",
|
1595
|
+
:header_params => header_params,
|
1596
|
+
:query_params => query_params,
|
1597
|
+
:form_params => form_params,
|
1598
|
+
:body => post_body,
|
1599
|
+
:auth_names => auth_names,
|
1600
|
+
:return_type => return_type
|
1601
|
+
)
|
1602
|
+
|
1603
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1604
|
+
if @api_client.config.debugging
|
1605
|
+
@api_client.config.logger.debug "API called: LabelApi#ipblocks_labels_find_by_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1606
|
+
end
|
1607
|
+
return data, status_code, headers
|
1608
|
+
end
|
1609
|
+
|
1610
|
+
# List all Ip Block Labels
|
1611
|
+
# You can retrieve a list of all labels associated with a IP Block
|
1612
|
+
# @param ipblock_id [String] The unique ID of the Ip Block
|
1613
|
+
# @param [Hash] opts the optional parameters
|
1614
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
|
1615
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
|
1616
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
1617
|
+
# @return [LabelResources]
|
1618
|
+
def ipblocks_labels_get(ipblock_id, opts = {})
|
1619
|
+
data, _status_code, _headers = ipblocks_labels_get_with_http_info(ipblock_id, opts)
|
1620
|
+
data
|
1621
|
+
end
|
1622
|
+
|
1623
|
+
# List all Ip Block Labels
|
1624
|
+
# You can retrieve a list of all labels associated with a IP Block
|
1625
|
+
# @param ipblock_id [String] The unique ID of the Ip Block
|
1626
|
+
# @param [Hash] opts the optional parameters
|
1627
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
|
1628
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
|
1629
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
1630
|
+
# @return [Array<(LabelResources, Integer, Hash)>] LabelResources data, response status code and response headers
|
1631
|
+
def ipblocks_labels_get_with_http_info(ipblock_id, opts = {})
|
1632
|
+
if @api_client.config.debugging
|
1633
|
+
@api_client.config.logger.debug 'Calling API: LabelApi.ipblocks_labels_get ...'
|
1634
|
+
end
|
1635
|
+
# verify the required parameter 'ipblock_id' is set
|
1636
|
+
if @api_client.config.client_side_validation && ipblock_id.nil?
|
1637
|
+
fail ArgumentError, "Missing the required parameter 'ipblock_id' when calling LabelApi.ipblocks_labels_get"
|
1638
|
+
end
|
1639
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
1640
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.ipblocks_labels_get, must be smaller than or equal to 10.'
|
1641
|
+
end
|
1642
|
+
|
1643
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
1644
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.ipblocks_labels_get, must be greater than or equal to 0.'
|
1645
|
+
end
|
1646
|
+
|
1647
|
+
# resource path
|
1648
|
+
local_var_path = '/ipblocks/{ipblockId}/labels'.sub('{' + 'ipblockId' + '}', CGI.escape(ipblock_id.to_s))
|
1649
|
+
|
1650
|
+
# query parameters
|
1651
|
+
query_params = opts[:query_params] || {}
|
1652
|
+
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
1653
|
+
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
1654
|
+
|
1655
|
+
# header parameters
|
1656
|
+
header_params = opts[:header_params] || {}
|
1657
|
+
# HTTP header 'Accept' (if needed)
|
1658
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1659
|
+
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
1660
|
+
|
1661
|
+
# form parameters
|
1662
|
+
form_params = opts[:form_params] || {}
|
1663
|
+
|
1664
|
+
# http body (model)
|
1665
|
+
post_body = opts[:debug_body]
|
1666
|
+
|
1667
|
+
# return_type
|
1668
|
+
return_type = opts[:debug_return_type] || 'LabelResources'
|
1669
|
+
|
1670
|
+
# auth_names
|
1671
|
+
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
1672
|
+
|
1673
|
+
new_options = opts.merge(
|
1674
|
+
:operation => :"LabelApi.ipblocks_labels_get",
|
1675
|
+
:header_params => header_params,
|
1676
|
+
:query_params => query_params,
|
1677
|
+
:form_params => form_params,
|
1678
|
+
:body => post_body,
|
1679
|
+
:auth_names => auth_names,
|
1680
|
+
:return_type => return_type
|
1681
|
+
)
|
1682
|
+
|
1683
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1684
|
+
if @api_client.config.debugging
|
1685
|
+
@api_client.config.logger.debug "API called: LabelApi#ipblocks_labels_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1686
|
+
end
|
1687
|
+
return data, status_code, headers
|
1688
|
+
end
|
1689
|
+
|
1690
|
+
# Add a Label to IP Block
|
1691
|
+
# This will add a label to the Ip Block.
|
1692
|
+
# @param ipblock_id [String] The unique ID of the Ip Block
|
1693
|
+
# @param label [LabelResource] Label to be added
|
1694
|
+
# @param [Hash] opts the optional parameters
|
1695
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
|
1696
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
|
1697
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
1698
|
+
# @return [LabelResource]
|
1699
|
+
def ipblocks_labels_post(ipblock_id, label, opts = {})
|
1700
|
+
data, _status_code, _headers = ipblocks_labels_post_with_http_info(ipblock_id, label, opts)
|
1701
|
+
data
|
1702
|
+
end
|
1703
|
+
|
1704
|
+
# Add a Label to IP Block
|
1705
|
+
# This will add a label to the Ip Block.
|
1706
|
+
# @param ipblock_id [String] The unique ID of the Ip Block
|
1707
|
+
# @param label [LabelResource] Label to be added
|
1708
|
+
# @param [Hash] opts the optional parameters
|
1709
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
|
1710
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
|
1711
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
1712
|
+
# @return [Array<(LabelResource, Integer, Hash)>] LabelResource data, response status code and response headers
|
1713
|
+
def ipblocks_labels_post_with_http_info(ipblock_id, label, opts = {})
|
1714
|
+
if @api_client.config.debugging
|
1715
|
+
@api_client.config.logger.debug 'Calling API: LabelApi.ipblocks_labels_post ...'
|
1716
|
+
end
|
1717
|
+
# verify the required parameter 'ipblock_id' is set
|
1718
|
+
if @api_client.config.client_side_validation && ipblock_id.nil?
|
1719
|
+
fail ArgumentError, "Missing the required parameter 'ipblock_id' when calling LabelApi.ipblocks_labels_post"
|
1720
|
+
end
|
1721
|
+
# verify the required parameter 'label' is set
|
1722
|
+
if @api_client.config.client_side_validation && label.nil?
|
1723
|
+
fail ArgumentError, "Missing the required parameter 'label' when calling LabelApi.ipblocks_labels_post"
|
1724
|
+
end
|
1725
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
1726
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.ipblocks_labels_post, must be smaller than or equal to 10.'
|
1727
|
+
end
|
1728
|
+
|
1729
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
1730
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.ipblocks_labels_post, must be greater than or equal to 0.'
|
1731
|
+
end
|
1732
|
+
|
1733
|
+
# resource path
|
1734
|
+
local_var_path = '/ipblocks/{ipblockId}/labels'.sub('{' + 'ipblockId' + '}', CGI.escape(ipblock_id.to_s))
|
1735
|
+
|
1736
|
+
# query parameters
|
1737
|
+
query_params = opts[:query_params] || {}
|
1738
|
+
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
1739
|
+
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
1740
|
+
|
1741
|
+
# header parameters
|
1742
|
+
header_params = opts[:header_params] || {}
|
1743
|
+
# HTTP header 'Accept' (if needed)
|
1744
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1745
|
+
# HTTP header 'Content-Type'
|
1746
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1747
|
+
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
1748
|
+
|
1749
|
+
# form parameters
|
1750
|
+
form_params = opts[:form_params] || {}
|
1751
|
+
|
1752
|
+
# http body (model)
|
1753
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(label)
|
1754
|
+
|
1755
|
+
# return_type
|
1756
|
+
return_type = opts[:debug_return_type] || 'LabelResource'
|
1757
|
+
|
1758
|
+
# auth_names
|
1759
|
+
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
1760
|
+
|
1761
|
+
new_options = opts.merge(
|
1762
|
+
:operation => :"LabelApi.ipblocks_labels_post",
|
1763
|
+
:header_params => header_params,
|
1764
|
+
:query_params => query_params,
|
1765
|
+
:form_params => form_params,
|
1766
|
+
:body => post_body,
|
1767
|
+
:auth_names => auth_names,
|
1768
|
+
:return_type => return_type
|
1769
|
+
)
|
1770
|
+
|
1771
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
1772
|
+
if @api_client.config.debugging
|
1773
|
+
@api_client.config.logger.debug "API called: LabelApi#ipblocks_labels_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1774
|
+
end
|
1775
|
+
return data, status_code, headers
|
1776
|
+
end
|
1777
|
+
|
1778
|
+
# Modify a Label of IP Block
|
1779
|
+
# This will modify the value of the label on a Ip Block.
|
1780
|
+
# @param ipblock_id [String] The unique ID of the Ip Block
|
1781
|
+
# @param key [String] The key of the Label
|
1782
|
+
# @param label [LabelResource] Modified Label
|
1783
|
+
# @param [Hash] opts the optional parameters
|
1784
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
|
1785
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
|
1786
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
1787
|
+
# @return [LabelResource]
|
1788
|
+
def ipblocks_labels_put(ipblock_id, key, label, opts = {})
|
1789
|
+
data, _status_code, _headers = ipblocks_labels_put_with_http_info(ipblock_id, key, label, opts)
|
1790
|
+
data
|
1791
|
+
end
|
1792
|
+
|
1793
|
+
# Modify a Label of IP Block
|
1794
|
+
# This will modify the value of the label on a Ip Block.
|
1795
|
+
# @param ipblock_id [String] The unique ID of the Ip Block
|
1796
|
+
# @param key [String] The key of the Label
|
1797
|
+
# @param label [LabelResource] Modified Label
|
1798
|
+
# @param [Hash] opts the optional parameters
|
1799
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
|
1800
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
|
1801
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
1802
|
+
# @return [Array<(LabelResource, Integer, Hash)>] LabelResource data, response status code and response headers
|
1803
|
+
def ipblocks_labels_put_with_http_info(ipblock_id, key, label, opts = {})
|
1804
|
+
if @api_client.config.debugging
|
1805
|
+
@api_client.config.logger.debug 'Calling API: LabelApi.ipblocks_labels_put ...'
|
1806
|
+
end
|
1807
|
+
# verify the required parameter 'ipblock_id' is set
|
1808
|
+
if @api_client.config.client_side_validation && ipblock_id.nil?
|
1809
|
+
fail ArgumentError, "Missing the required parameter 'ipblock_id' when calling LabelApi.ipblocks_labels_put"
|
1810
|
+
end
|
1811
|
+
# verify the required parameter 'key' is set
|
1812
|
+
if @api_client.config.client_side_validation && key.nil?
|
1813
|
+
fail ArgumentError, "Missing the required parameter 'key' when calling LabelApi.ipblocks_labels_put"
|
1814
|
+
end
|
1815
|
+
# verify the required parameter 'label' is set
|
1816
|
+
if @api_client.config.client_side_validation && label.nil?
|
1817
|
+
fail ArgumentError, "Missing the required parameter 'label' when calling LabelApi.ipblocks_labels_put"
|
1818
|
+
end
|
1819
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
1820
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.ipblocks_labels_put, must be smaller than or equal to 10.'
|
1821
|
+
end
|
1822
|
+
|
1823
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
1824
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.ipblocks_labels_put, must be greater than or equal to 0.'
|
1825
|
+
end
|
1826
|
+
|
1827
|
+
# resource path
|
1828
|
+
local_var_path = '/ipblocks/{ipblockId}/labels/{key}'.sub('{' + 'ipblockId' + '}', CGI.escape(ipblock_id.to_s)).sub('{' + 'key' + '}', CGI.escape(key.to_s))
|
1829
|
+
|
1830
|
+
# query parameters
|
1831
|
+
query_params = opts[:query_params] || {}
|
1832
|
+
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
1833
|
+
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
1834
|
+
|
1835
|
+
# header parameters
|
1836
|
+
header_params = opts[:header_params] || {}
|
1837
|
+
# HTTP header 'Accept' (if needed)
|
1838
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1839
|
+
# HTTP header 'Content-Type'
|
1840
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1841
|
+
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
1842
|
+
|
1843
|
+
# form parameters
|
1844
|
+
form_params = opts[:form_params] || {}
|
1845
|
+
|
1846
|
+
# http body (model)
|
1847
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(label)
|
1848
|
+
|
1849
|
+
# return_type
|
1850
|
+
return_type = opts[:debug_return_type] || 'LabelResource'
|
1851
|
+
|
1852
|
+
# auth_names
|
1853
|
+
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
1854
|
+
|
1855
|
+
new_options = opts.merge(
|
1856
|
+
:operation => :"LabelApi.ipblocks_labels_put",
|
1857
|
+
:header_params => header_params,
|
1858
|
+
:query_params => query_params,
|
1859
|
+
:form_params => form_params,
|
1860
|
+
:body => post_body,
|
1861
|
+
:auth_names => auth_names,
|
1862
|
+
:return_type => return_type
|
1863
|
+
)
|
1864
|
+
|
1865
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
1866
|
+
if @api_client.config.debugging
|
1867
|
+
@api_client.config.logger.debug "API called: LabelApi#ipblocks_labels_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1868
|
+
end
|
1869
|
+
return data, status_code, headers
|
1870
|
+
end
|
1871
|
+
|
1872
|
+
# Returns the label by its URN.
|
1873
|
+
# You can retrieve the details of a specific label using its URN. A URN is for uniqueness of a Label and composed using urn:label:<resource_type>:<resource_uuid>:<key>
|
1874
|
+
# @param labelurn [String] The URN representing the unique ID of the label. A URN is for uniqueness of a Label and composed using urn:label:<resource_type>:<resource_uuid>:<key>
|
1875
|
+
# @param [Hash] opts the optional parameters
|
1876
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
|
1877
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
|
1878
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
1879
|
+
# @return [Label]
|
1880
|
+
def labels_find_by_urn(labelurn, opts = {})
|
1881
|
+
data, _status_code, _headers = labels_find_by_urn_with_http_info(labelurn, opts)
|
1882
|
+
data
|
1883
|
+
end
|
1884
|
+
|
1885
|
+
# Returns the label by its URN.
|
1886
|
+
# You can retrieve the details of a specific label using its URN. A URN is for uniqueness of a Label and composed using urn:label:<resource_type>:<resource_uuid>:<key>
|
1887
|
+
# @param labelurn [String] The URN representing the unique ID of the label. A URN is for uniqueness of a Label and composed using urn:label:<resource_type>:<resource_uuid>:<key>
|
1888
|
+
# @param [Hash] opts the optional parameters
|
1889
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
|
1890
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
|
1891
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
1892
|
+
# @return [Array<(Label, Integer, Hash)>] Label data, response status code and response headers
|
1893
|
+
def labels_find_by_urn_with_http_info(labelurn, opts = {})
|
1894
|
+
if @api_client.config.debugging
|
1895
|
+
@api_client.config.logger.debug 'Calling API: LabelApi.labels_find_by_urn ...'
|
1896
|
+
end
|
1897
|
+
# verify the required parameter 'labelurn' is set
|
1898
|
+
if @api_client.config.client_side_validation && labelurn.nil?
|
1899
|
+
fail ArgumentError, "Missing the required parameter 'labelurn' when calling LabelApi.labels_find_by_urn"
|
1900
|
+
end
|
1901
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
1902
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.labels_find_by_urn, must be smaller than or equal to 10.'
|
1903
|
+
end
|
1904
|
+
|
1905
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
1906
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.labels_find_by_urn, must be greater than or equal to 0.'
|
1907
|
+
end
|
1908
|
+
|
1909
|
+
# resource path
|
1910
|
+
local_var_path = '/labels/{labelurn}'.sub('{' + 'labelurn' + '}', CGI.escape(labelurn.to_s))
|
1911
|
+
|
1912
|
+
# query parameters
|
1913
|
+
query_params = opts[:query_params] || {}
|
1914
|
+
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
1915
|
+
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
1916
|
+
|
1917
|
+
# header parameters
|
1918
|
+
header_params = opts[:header_params] || {}
|
1919
|
+
# HTTP header 'Accept' (if needed)
|
1920
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1921
|
+
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
1922
|
+
|
1923
|
+
# form parameters
|
1924
|
+
form_params = opts[:form_params] || {}
|
1925
|
+
|
1926
|
+
# http body (model)
|
1927
|
+
post_body = opts[:debug_body]
|
1928
|
+
|
1929
|
+
# return_type
|
1930
|
+
return_type = opts[:debug_return_type] || 'Label'
|
1931
|
+
|
1932
|
+
# auth_names
|
1933
|
+
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
1934
|
+
|
1935
|
+
new_options = opts.merge(
|
1936
|
+
:operation => :"LabelApi.labels_find_by_urn",
|
1937
|
+
:header_params => header_params,
|
1938
|
+
:query_params => query_params,
|
1939
|
+
:form_params => form_params,
|
1940
|
+
:body => post_body,
|
1941
|
+
:auth_names => auth_names,
|
1942
|
+
:return_type => return_type
|
1943
|
+
)
|
1944
|
+
|
1945
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1946
|
+
if @api_client.config.debugging
|
1947
|
+
@api_client.config.logger.debug "API called: LabelApi#labels_find_by_urn\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1948
|
+
end
|
1949
|
+
return data, status_code, headers
|
1950
|
+
end
|
1951
|
+
|
1952
|
+
# List Labels
|
1953
|
+
# You can retrieve a complete list of labels that you have access to.
|
1954
|
+
# @param [Hash] opts the optional parameters
|
1955
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
|
1956
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
|
1957
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
1958
|
+
# @return [Labels]
|
1959
|
+
def labels_get(opts = {})
|
1960
|
+
data, _status_code, _headers = labels_get_with_http_info(opts)
|
1961
|
+
data
|
1962
|
+
end
|
1963
|
+
|
1964
|
+
# List Labels
|
1965
|
+
# You can retrieve a complete list of labels that you have access to.
|
1966
|
+
# @param [Hash] opts the optional parameters
|
1967
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
|
1968
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
|
1969
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
1970
|
+
# @return [Array<(Labels, Integer, Hash)>] Labels data, response status code and response headers
|
1971
|
+
def labels_get_with_http_info(opts = {})
|
1972
|
+
if @api_client.config.debugging
|
1973
|
+
@api_client.config.logger.debug 'Calling API: LabelApi.labels_get ...'
|
1974
|
+
end
|
1975
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
1976
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.labels_get, must be smaller than or equal to 10.'
|
1977
|
+
end
|
1978
|
+
|
1979
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
1980
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.labels_get, must be greater than or equal to 0.'
|
1981
|
+
end
|
1982
|
+
|
1983
|
+
# resource path
|
1984
|
+
local_var_path = '/labels'
|
1985
|
+
|
1986
|
+
# query parameters
|
1987
|
+
query_params = opts[:query_params] || {}
|
1988
|
+
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
1989
|
+
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
1990
|
+
|
1991
|
+
# header parameters
|
1992
|
+
header_params = opts[:header_params] || {}
|
1993
|
+
# HTTP header 'Accept' (if needed)
|
1994
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1995
|
+
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
1996
|
+
|
1997
|
+
# form parameters
|
1998
|
+
form_params = opts[:form_params] || {}
|
1999
|
+
|
2000
|
+
# http body (model)
|
2001
|
+
post_body = opts[:debug_body]
|
2002
|
+
|
2003
|
+
# return_type
|
2004
|
+
return_type = opts[:debug_return_type] || 'Labels'
|
2005
|
+
|
2006
|
+
# auth_names
|
2007
|
+
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
2008
|
+
|
2009
|
+
new_options = opts.merge(
|
2010
|
+
:operation => :"LabelApi.labels_get",
|
2011
|
+
:header_params => header_params,
|
2012
|
+
:query_params => query_params,
|
2013
|
+
:form_params => form_params,
|
2014
|
+
:body => post_body,
|
2015
|
+
:auth_names => auth_names,
|
2016
|
+
:return_type => return_type
|
2017
|
+
)
|
2018
|
+
|
2019
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
2020
|
+
if @api_client.config.debugging
|
2021
|
+
@api_client.config.logger.debug "API called: LabelApi#labels_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2022
|
+
end
|
2023
|
+
return data, status_code, headers
|
2024
|
+
end
|
2025
|
+
|
2026
|
+
# Delete a Label from Snapshot
|
2027
|
+
# This will remove a label from the snapshot.
|
2028
|
+
# @param snapshot_id [String] The unique ID of the Snapshot
|
2029
|
+
# @param key [String] The key of the Label
|
2030
|
+
# @param [Hash] opts the optional parameters
|
2031
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
|
2032
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
|
2033
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
2034
|
+
# @return [Object]
|
2035
|
+
def snapshots_labels_delete(snapshot_id, key, opts = {})
|
2036
|
+
data, _status_code, _headers = snapshots_labels_delete_with_http_info(snapshot_id, key, opts)
|
2037
|
+
data
|
2038
|
+
end
|
2039
|
+
|
2040
|
+
# Delete a Label from Snapshot
|
2041
|
+
# This will remove a label from the snapshot.
|
2042
|
+
# @param snapshot_id [String] The unique ID of the Snapshot
|
2043
|
+
# @param key [String] The key of the Label
|
2044
|
+
# @param [Hash] opts the optional parameters
|
2045
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
|
2046
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
|
2047
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
2048
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
2049
|
+
def snapshots_labels_delete_with_http_info(snapshot_id, key, opts = {})
|
2050
|
+
if @api_client.config.debugging
|
2051
|
+
@api_client.config.logger.debug 'Calling API: LabelApi.snapshots_labels_delete ...'
|
2052
|
+
end
|
2053
|
+
# verify the required parameter 'snapshot_id' is set
|
2054
|
+
if @api_client.config.client_side_validation && snapshot_id.nil?
|
2055
|
+
fail ArgumentError, "Missing the required parameter 'snapshot_id' when calling LabelApi.snapshots_labels_delete"
|
2056
|
+
end
|
2057
|
+
# verify the required parameter 'key' is set
|
2058
|
+
if @api_client.config.client_side_validation && key.nil?
|
2059
|
+
fail ArgumentError, "Missing the required parameter 'key' when calling LabelApi.snapshots_labels_delete"
|
2060
|
+
end
|
2061
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
2062
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.snapshots_labels_delete, must be smaller than or equal to 10.'
|
2063
|
+
end
|
2064
|
+
|
2065
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
2066
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.snapshots_labels_delete, must be greater than or equal to 0.'
|
2067
|
+
end
|
2068
|
+
|
2069
|
+
# resource path
|
2070
|
+
local_var_path = '/snapshots/{snapshotId}/labels/{key}'.sub('{' + 'snapshotId' + '}', CGI.escape(snapshot_id.to_s)).sub('{' + 'key' + '}', CGI.escape(key.to_s))
|
2071
|
+
|
2072
|
+
# query parameters
|
2073
|
+
query_params = opts[:query_params] || {}
|
2074
|
+
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
2075
|
+
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
2076
|
+
|
2077
|
+
# header parameters
|
2078
|
+
header_params = opts[:header_params] || {}
|
2079
|
+
# HTTP header 'Accept' (if needed)
|
2080
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
2081
|
+
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
2082
|
+
|
2083
|
+
# form parameters
|
2084
|
+
form_params = opts[:form_params] || {}
|
2085
|
+
|
2086
|
+
# http body (model)
|
2087
|
+
post_body = opts[:debug_body]
|
2088
|
+
|
2089
|
+
# return_type
|
2090
|
+
return_type = opts[:debug_return_type] || 'Object'
|
2091
|
+
|
2092
|
+
# auth_names
|
2093
|
+
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
2094
|
+
|
2095
|
+
new_options = opts.merge(
|
2096
|
+
:operation => :"LabelApi.snapshots_labels_delete",
|
2097
|
+
:header_params => header_params,
|
2098
|
+
:query_params => query_params,
|
2099
|
+
:form_params => form_params,
|
2100
|
+
:body => post_body,
|
2101
|
+
:auth_names => auth_names,
|
2102
|
+
:return_type => return_type
|
2103
|
+
)
|
2104
|
+
|
2105
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
2106
|
+
if @api_client.config.debugging
|
2107
|
+
@api_client.config.logger.debug "API called: LabelApi#snapshots_labels_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2108
|
+
end
|
2109
|
+
return data, status_code, headers
|
2110
|
+
end
|
2111
|
+
|
2112
|
+
# Retrieve a Label of Snapshot
|
2113
|
+
# This will retrieve the properties of a associated label to a snapshot.
|
2114
|
+
# @param snapshot_id [String] The unique ID of the Snapshot
|
2115
|
+
# @param key [String] The key of the Label
|
2116
|
+
# @param [Hash] opts the optional parameters
|
2117
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
|
2118
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
|
2119
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
2120
|
+
# @return [LabelResource]
|
2121
|
+
def snapshots_labels_find_by_key(snapshot_id, key, opts = {})
|
2122
|
+
data, _status_code, _headers = snapshots_labels_find_by_key_with_http_info(snapshot_id, key, opts)
|
2123
|
+
data
|
2124
|
+
end
|
2125
|
+
|
2126
|
+
# Retrieve a Label of Snapshot
|
2127
|
+
# This will retrieve the properties of a associated label to a snapshot.
|
2128
|
+
# @param snapshot_id [String] The unique ID of the Snapshot
|
2129
|
+
# @param key [String] The key of the Label
|
2130
|
+
# @param [Hash] opts the optional parameters
|
2131
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
|
2132
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
|
2133
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
2134
|
+
# @return [Array<(LabelResource, Integer, Hash)>] LabelResource data, response status code and response headers
|
2135
|
+
def snapshots_labels_find_by_key_with_http_info(snapshot_id, key, opts = {})
|
2136
|
+
if @api_client.config.debugging
|
2137
|
+
@api_client.config.logger.debug 'Calling API: LabelApi.snapshots_labels_find_by_key ...'
|
2138
|
+
end
|
2139
|
+
# verify the required parameter 'snapshot_id' is set
|
2140
|
+
if @api_client.config.client_side_validation && snapshot_id.nil?
|
2141
|
+
fail ArgumentError, "Missing the required parameter 'snapshot_id' when calling LabelApi.snapshots_labels_find_by_key"
|
2142
|
+
end
|
2143
|
+
# verify the required parameter 'key' is set
|
2144
|
+
if @api_client.config.client_side_validation && key.nil?
|
2145
|
+
fail ArgumentError, "Missing the required parameter 'key' when calling LabelApi.snapshots_labels_find_by_key"
|
2146
|
+
end
|
2147
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
2148
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.snapshots_labels_find_by_key, must be smaller than or equal to 10.'
|
2149
|
+
end
|
2150
|
+
|
2151
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
2152
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.snapshots_labels_find_by_key, must be greater than or equal to 0.'
|
2153
|
+
end
|
2154
|
+
|
2155
|
+
# resource path
|
2156
|
+
local_var_path = '/snapshots/{snapshotId}/labels/{key}'.sub('{' + 'snapshotId' + '}', CGI.escape(snapshot_id.to_s)).sub('{' + 'key' + '}', CGI.escape(key.to_s))
|
2157
|
+
|
2158
|
+
# query parameters
|
2159
|
+
query_params = opts[:query_params] || {}
|
2160
|
+
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
2161
|
+
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
2162
|
+
|
2163
|
+
# header parameters
|
2164
|
+
header_params = opts[:header_params] || {}
|
2165
|
+
# HTTP header 'Accept' (if needed)
|
2166
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
2167
|
+
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
2168
|
+
|
2169
|
+
# form parameters
|
2170
|
+
form_params = opts[:form_params] || {}
|
2171
|
+
|
2172
|
+
# http body (model)
|
2173
|
+
post_body = opts[:debug_body]
|
2174
|
+
|
2175
|
+
# return_type
|
2176
|
+
return_type = opts[:debug_return_type] || 'LabelResource'
|
2177
|
+
|
2178
|
+
# auth_names
|
2179
|
+
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
2180
|
+
|
2181
|
+
new_options = opts.merge(
|
2182
|
+
:operation => :"LabelApi.snapshots_labels_find_by_key",
|
2183
|
+
:header_params => header_params,
|
2184
|
+
:query_params => query_params,
|
2185
|
+
:form_params => form_params,
|
2186
|
+
:body => post_body,
|
2187
|
+
:auth_names => auth_names,
|
2188
|
+
:return_type => return_type
|
2189
|
+
)
|
2190
|
+
|
2191
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
2192
|
+
if @api_client.config.debugging
|
2193
|
+
@api_client.config.logger.debug "API called: LabelApi#snapshots_labels_find_by_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2194
|
+
end
|
2195
|
+
return data, status_code, headers
|
2196
|
+
end
|
2197
|
+
|
2198
|
+
# List all Snapshot Labels
|
2199
|
+
# You can retrieve a list of all labels associated with a snapshot
|
2200
|
+
# @param snapshot_id [String] The unique ID of the Snapshot
|
2201
|
+
# @param [Hash] opts the optional parameters
|
2202
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
|
2203
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
|
2204
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
2205
|
+
# @return [LabelResources]
|
2206
|
+
def snapshots_labels_get(snapshot_id, opts = {})
|
2207
|
+
data, _status_code, _headers = snapshots_labels_get_with_http_info(snapshot_id, opts)
|
2208
|
+
data
|
2209
|
+
end
|
2210
|
+
|
2211
|
+
# List all Snapshot Labels
|
2212
|
+
# You can retrieve a list of all labels associated with a snapshot
|
2213
|
+
# @param snapshot_id [String] The unique ID of the Snapshot
|
2214
|
+
# @param [Hash] opts the optional parameters
|
2215
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
|
2216
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
|
2217
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
2218
|
+
# @return [Array<(LabelResources, Integer, Hash)>] LabelResources data, response status code and response headers
|
2219
|
+
def snapshots_labels_get_with_http_info(snapshot_id, opts = {})
|
2220
|
+
if @api_client.config.debugging
|
2221
|
+
@api_client.config.logger.debug 'Calling API: LabelApi.snapshots_labels_get ...'
|
2222
|
+
end
|
2223
|
+
# verify the required parameter 'snapshot_id' is set
|
2224
|
+
if @api_client.config.client_side_validation && snapshot_id.nil?
|
2225
|
+
fail ArgumentError, "Missing the required parameter 'snapshot_id' when calling LabelApi.snapshots_labels_get"
|
2226
|
+
end
|
2227
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
2228
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.snapshots_labels_get, must be smaller than or equal to 10.'
|
2229
|
+
end
|
2230
|
+
|
2231
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
2232
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.snapshots_labels_get, must be greater than or equal to 0.'
|
2233
|
+
end
|
2234
|
+
|
2235
|
+
# resource path
|
2236
|
+
local_var_path = '/snapshots/{snapshotId}/labels'.sub('{' + 'snapshotId' + '}', CGI.escape(snapshot_id.to_s))
|
2237
|
+
|
2238
|
+
# query parameters
|
2239
|
+
query_params = opts[:query_params] || {}
|
2240
|
+
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
2241
|
+
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
2242
|
+
|
2243
|
+
# header parameters
|
2244
|
+
header_params = opts[:header_params] || {}
|
2245
|
+
# HTTP header 'Accept' (if needed)
|
2246
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
2247
|
+
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
2248
|
+
|
2249
|
+
# form parameters
|
2250
|
+
form_params = opts[:form_params] || {}
|
2251
|
+
|
2252
|
+
# http body (model)
|
2253
|
+
post_body = opts[:debug_body]
|
2254
|
+
|
2255
|
+
# return_type
|
2256
|
+
return_type = opts[:debug_return_type] || 'LabelResources'
|
2257
|
+
|
2258
|
+
# auth_names
|
2259
|
+
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
2260
|
+
|
2261
|
+
new_options = opts.merge(
|
2262
|
+
:operation => :"LabelApi.snapshots_labels_get",
|
2263
|
+
:header_params => header_params,
|
2264
|
+
:query_params => query_params,
|
2265
|
+
:form_params => form_params,
|
2266
|
+
:body => post_body,
|
2267
|
+
:auth_names => auth_names,
|
2268
|
+
:return_type => return_type
|
2269
|
+
)
|
2270
|
+
|
2271
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
2272
|
+
if @api_client.config.debugging
|
2273
|
+
@api_client.config.logger.debug "API called: LabelApi#snapshots_labels_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2274
|
+
end
|
2275
|
+
return data, status_code, headers
|
2276
|
+
end
|
2277
|
+
|
2278
|
+
# Add a Label to Snapshot
|
2279
|
+
# This will add a label to the snapshot.
|
2280
|
+
# @param snapshot_id [String] The unique ID of the Snapshot
|
2281
|
+
# @param label [LabelResource] Label to be added
|
2282
|
+
# @param [Hash] opts the optional parameters
|
2283
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
|
2284
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
|
2285
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
2286
|
+
# @return [LabelResource]
|
2287
|
+
def snapshots_labels_post(snapshot_id, label, opts = {})
|
2288
|
+
data, _status_code, _headers = snapshots_labels_post_with_http_info(snapshot_id, label, opts)
|
2289
|
+
data
|
2290
|
+
end
|
2291
|
+
|
2292
|
+
# Add a Label to Snapshot
|
2293
|
+
# This will add a label to the snapshot.
|
2294
|
+
# @param snapshot_id [String] The unique ID of the Snapshot
|
2295
|
+
# @param label [LabelResource] Label to be added
|
2296
|
+
# @param [Hash] opts the optional parameters
|
2297
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
|
2298
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
|
2299
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
2300
|
+
# @return [Array<(LabelResource, Integer, Hash)>] LabelResource data, response status code and response headers
|
2301
|
+
def snapshots_labels_post_with_http_info(snapshot_id, label, opts = {})
|
2302
|
+
if @api_client.config.debugging
|
2303
|
+
@api_client.config.logger.debug 'Calling API: LabelApi.snapshots_labels_post ...'
|
2304
|
+
end
|
2305
|
+
# verify the required parameter 'snapshot_id' is set
|
2306
|
+
if @api_client.config.client_side_validation && snapshot_id.nil?
|
2307
|
+
fail ArgumentError, "Missing the required parameter 'snapshot_id' when calling LabelApi.snapshots_labels_post"
|
2308
|
+
end
|
2309
|
+
# verify the required parameter 'label' is set
|
2310
|
+
if @api_client.config.client_side_validation && label.nil?
|
2311
|
+
fail ArgumentError, "Missing the required parameter 'label' when calling LabelApi.snapshots_labels_post"
|
2312
|
+
end
|
2313
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
2314
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.snapshots_labels_post, must be smaller than or equal to 10.'
|
2315
|
+
end
|
2316
|
+
|
2317
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
2318
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.snapshots_labels_post, must be greater than or equal to 0.'
|
2319
|
+
end
|
2320
|
+
|
2321
|
+
# resource path
|
2322
|
+
local_var_path = '/snapshots/{snapshotId}/labels'.sub('{' + 'snapshotId' + '}', CGI.escape(snapshot_id.to_s))
|
2323
|
+
|
2324
|
+
# query parameters
|
2325
|
+
query_params = opts[:query_params] || {}
|
2326
|
+
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
2327
|
+
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
2328
|
+
|
2329
|
+
# header parameters
|
2330
|
+
header_params = opts[:header_params] || {}
|
2331
|
+
# HTTP header 'Accept' (if needed)
|
2332
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
2333
|
+
# HTTP header 'Content-Type'
|
2334
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
2335
|
+
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
2336
|
+
|
2337
|
+
# form parameters
|
2338
|
+
form_params = opts[:form_params] || {}
|
2339
|
+
|
2340
|
+
# http body (model)
|
2341
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(label)
|
2342
|
+
|
2343
|
+
# return_type
|
2344
|
+
return_type = opts[:debug_return_type] || 'LabelResource'
|
2345
|
+
|
2346
|
+
# auth_names
|
2347
|
+
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
2348
|
+
|
2349
|
+
new_options = opts.merge(
|
2350
|
+
:operation => :"LabelApi.snapshots_labels_post",
|
2351
|
+
:header_params => header_params,
|
2352
|
+
:query_params => query_params,
|
2353
|
+
:form_params => form_params,
|
2354
|
+
:body => post_body,
|
2355
|
+
:auth_names => auth_names,
|
2356
|
+
:return_type => return_type
|
2357
|
+
)
|
2358
|
+
|
2359
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
2360
|
+
if @api_client.config.debugging
|
2361
|
+
@api_client.config.logger.debug "API called: LabelApi#snapshots_labels_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2362
|
+
end
|
2363
|
+
return data, status_code, headers
|
2364
|
+
end
|
2365
|
+
|
2366
|
+
# Modify a Label of Snapshot
|
2367
|
+
# This will modify the value of the label on a snapshot.
|
2368
|
+
# @param snapshot_id [String] The unique ID of the Snapshot
|
2369
|
+
# @param key [String] The key of the Label
|
2370
|
+
# @param label [LabelResource] Modified Label
|
2371
|
+
# @param [Hash] opts the optional parameters
|
2372
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
|
2373
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
|
2374
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
2375
|
+
# @return [LabelResource]
|
2376
|
+
def snapshots_labels_put(snapshot_id, key, label, opts = {})
|
2377
|
+
data, _status_code, _headers = snapshots_labels_put_with_http_info(snapshot_id, key, label, opts)
|
2378
|
+
data
|
2379
|
+
end
|
2380
|
+
|
2381
|
+
# Modify a Label of Snapshot
|
2382
|
+
# This will modify the value of the label on a snapshot.
|
2383
|
+
# @param snapshot_id [String] The unique ID of the Snapshot
|
2384
|
+
# @param key [String] The key of the Label
|
2385
|
+
# @param label [LabelResource] Modified Label
|
2386
|
+
# @param [Hash] opts the optional parameters
|
2387
|
+
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
|
2388
|
+
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
|
2389
|
+
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
2390
|
+
# @return [Array<(LabelResource, Integer, Hash)>] LabelResource data, response status code and response headers
|
2391
|
+
def snapshots_labels_put_with_http_info(snapshot_id, key, label, opts = {})
|
2392
|
+
if @api_client.config.debugging
|
2393
|
+
@api_client.config.logger.debug 'Calling API: LabelApi.snapshots_labels_put ...'
|
2394
|
+
end
|
2395
|
+
# verify the required parameter 'snapshot_id' is set
|
2396
|
+
if @api_client.config.client_side_validation && snapshot_id.nil?
|
2397
|
+
fail ArgumentError, "Missing the required parameter 'snapshot_id' when calling LabelApi.snapshots_labels_put"
|
2398
|
+
end
|
2399
|
+
# verify the required parameter 'key' is set
|
2400
|
+
if @api_client.config.client_side_validation && key.nil?
|
2401
|
+
fail ArgumentError, "Missing the required parameter 'key' when calling LabelApi.snapshots_labels_put"
|
2402
|
+
end
|
2403
|
+
# verify the required parameter 'label' is set
|
2404
|
+
if @api_client.config.client_side_validation && label.nil?
|
2405
|
+
fail ArgumentError, "Missing the required parameter 'label' when calling LabelApi.snapshots_labels_put"
|
2406
|
+
end
|
2407
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
2408
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.snapshots_labels_put, must be smaller than or equal to 10.'
|
2409
|
+
end
|
2410
|
+
|
2411
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
2412
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.snapshots_labels_put, must be greater than or equal to 0.'
|
2413
|
+
end
|
2414
|
+
|
2415
|
+
# resource path
|
2416
|
+
local_var_path = '/snapshots/{snapshotId}/labels/{key}'.sub('{' + 'snapshotId' + '}', CGI.escape(snapshot_id.to_s)).sub('{' + 'key' + '}', CGI.escape(key.to_s))
|
2417
|
+
|
2418
|
+
# query parameters
|
2419
|
+
query_params = opts[:query_params] || {}
|
2420
|
+
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
2421
|
+
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
2422
|
+
|
2423
|
+
# header parameters
|
2424
|
+
header_params = opts[:header_params] || {}
|
2425
|
+
# HTTP header 'Accept' (if needed)
|
2426
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
2427
|
+
# HTTP header 'Content-Type'
|
2428
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
2429
|
+
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
2430
|
+
|
2431
|
+
# form parameters
|
2432
|
+
form_params = opts[:form_params] || {}
|
2433
|
+
|
2434
|
+
# http body (model)
|
2435
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(label)
|
2436
|
+
|
2437
|
+
# return_type
|
2438
|
+
return_type = opts[:debug_return_type] || 'LabelResource'
|
2439
|
+
|
2440
|
+
# auth_names
|
2441
|
+
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
2442
|
+
|
2443
|
+
new_options = opts.merge(
|
2444
|
+
:operation => :"LabelApi.snapshots_labels_put",
|
2445
|
+
:header_params => header_params,
|
2446
|
+
:query_params => query_params,
|
2447
|
+
:form_params => form_params,
|
2448
|
+
:body => post_body,
|
2449
|
+
:auth_names => auth_names,
|
2450
|
+
:return_type => return_type
|
2451
|
+
)
|
2452
|
+
|
2453
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
2454
|
+
if @api_client.config.debugging
|
2455
|
+
@api_client.config.logger.debug "API called: LabelApi#snapshots_labels_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2456
|
+
end
|
2457
|
+
return data, status_code, headers
|
2458
|
+
end
|
2459
|
+
end
|
2460
|
+
end
|