require'time'require'ionoscloud'# setup authorizationIonoscloud.configure do|config|# Configure HTTP basic authorization: Basic Authentication config.username ='YOUR USERNAME' config.password ='YOUR PASSWORD'# Configure API key authorization: Token Authentication config.api_key['Authorization'] ='YOUR API KEY'# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)# config.api_key_prefix['Authorization'] = 'Bearer'endapi_instance =Ionoscloud::TargetGroupsApi.newtarget_group_id ='target_group_id_example'# String | The unique ID of the target group.opts = { pretty: true,# Boolean | Controls whether the response is pretty-printed (with indentations and new lines). depth: 56, # Integer | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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
x_contract_number: 56# Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.}begin# Delete a Target Group by ID api_instance.target_groups_delete(target_group_id, opts)rescueIonoscloud::ApiError=> eputs"Error when calling TargetGroupsApi->target_groups_delete: #{e}"end
Using the target_groups_delete_with_http_info variant
This returns an Array which contains the response data (nil in this case), status code and headers.
begin# Delete a Target Group by ID data, status_code, headers = api_instance.target_groups_delete_with_http_info(target_group_id, opts)p status_code # => 2xxp headers # => { ... }p data # => nilrescueIonoscloud::ApiError=> eputs"Error when calling TargetGroupsApi->target_groups_delete_with_http_info: #{e}"end
Parameters
Name
Type
Description
Notes
target_group_id
String
The unique ID of the target group.
pretty
Boolean
Controls whether the response is pretty-printed (with indentations and new lines).
[optional][default to true]
depth
Integer
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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
[optional][default to 0]
x_contract_number
Integer
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
Retrieves the properties of the target group specified by its ID.
Examples
require'time'require'ionoscloud'# setup authorizationIonoscloud.configure do|config|# Configure HTTP basic authorization: Basic Authentication config.username ='YOUR USERNAME' config.password ='YOUR PASSWORD'# Configure API key authorization: Token Authentication config.api_key['Authorization'] ='YOUR API KEY'# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)# config.api_key_prefix['Authorization'] = 'Bearer'endapi_instance =Ionoscloud::TargetGroupsApi.newtarget_group_id ='target_group_id_example'# String | The unique ID of the target group.opts = { pretty: true,# Boolean | Controls whether the response is pretty-printed (with indentations and new lines). depth: 56, # Integer | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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
x_contract_number: 56# Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.}begin# Get a Target Group by ID result = api_instance.targetgroups_find_by_target_group_id(target_group_id, opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling TargetGroupsApi->targetgroups_find_by_target_group_id: #{e}"end
Using the targetgroups_find_by_target_group_id_with_http_info variant
This returns an Array which contains the response data, status code and headers.
begin# Get a Target Group by ID data, status_code, headers = api_instance.targetgroups_find_by_target_group_id_with_http_info(target_group_id, opts)p status_code # => 2xxp headers # => { ... }p data # => <TargetGroup>rescueIonoscloud::ApiError=> eputs"Error when calling TargetGroupsApi->targetgroups_find_by_target_group_id_with_http_info: #{e}"end
Parameters
Name
Type
Description
Notes
target_group_id
String
The unique ID of the target group.
pretty
Boolean
Controls whether the response is pretty-printed (with indentations and new lines).
[optional][default to true]
depth
Integer
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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
[optional][default to 0]
x_contract_number
Integer
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
Lists target groups. A target group is a set of one or more registered targets. You must specify an IP address, a port number, and a weight for each target. Any object with an IP address in your VDC can be a target, for example, a VM, another load balancer, etc. You can register a target with multiple target groups.
Examples
require'time'require'ionoscloud'# setup authorizationIonoscloud.configure do|config|# Configure HTTP basic authorization: Basic Authentication config.username ='YOUR USERNAME' config.password ='YOUR PASSWORD'# Configure API key authorization: Token Authentication config.api_key['Authorization'] ='YOUR API KEY'# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)# config.api_key_prefix['Authorization'] = 'Bearer'endapi_instance =Ionoscloud::TargetGroupsApi.newopts = { pretty: true,# Boolean | Controls whether the response is pretty-printed (with indentations and new lines). depth: 56, # Integer | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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
x_contract_number: 56,# Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. offset: 56,# Integer | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). limit: 56# Integer | The maximum number of elements to return (used together with <b><i>offset</i></b> for pagination). It must not exceed <b><i>200</i></b>.}begin# Get Target Groups result = api_instance.targetgroups_get(opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling TargetGroupsApi->targetgroups_get: #{e}"end
Using the targetgroups_get_with_http_info variant
This returns an Array which contains the response data, status code and headers.
begin# Get Target Groups data, status_code, headers = api_instance.targetgroups_get_with_http_info(opts)p status_code # => 2xxp headers # => { ... }p data # => <TargetGroups>rescueIonoscloud::ApiError=> eputs"Error when calling TargetGroupsApi->targetgroups_get_with_http_info: #{e}"end
Parameters
Name
Type
Description
Notes
pretty
Boolean
Controls whether the response is pretty-printed (with indentations and new lines).
[optional][default to true]
depth
Integer
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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
[optional][default to 0]
x_contract_number
Integer
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
[optional]
offset
Integer
The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination).
[optional][default to 0]
limit
Integer
The maximum number of elements to return (used together with <b><i>offset</i></b> for pagination). It must not exceed <b><i>200</i></b>.
Updates the properties of the target group specified by its ID.
Examples
require'time'require'ionoscloud'# setup authorizationIonoscloud.configure do|config|# Configure HTTP basic authorization: Basic Authentication config.username ='YOUR USERNAME' config.password ='YOUR PASSWORD'# Configure API key authorization: Token Authentication config.api_key['Authorization'] ='YOUR API KEY'# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)# config.api_key_prefix['Authorization'] = 'Bearer'endapi_instance =Ionoscloud::TargetGroupsApi.newtarget_group_id ='target_group_id_example'# String | The unique ID of the target group.target_group_properties =Ionoscloud::TargetGroupProperties.new({algorithm: 'ROUND_ROBIN', name: 'My target group', protocol: 'HTTP'}) # TargetGroupProperties | The target group properties to be updated.opts = { pretty: true,# Boolean | Controls whether the response is pretty-printed (with indentations and new lines). depth: 56, # Integer | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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
x_contract_number: 56# Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.}begin# Partially Modify a Target Group by ID result = api_instance.targetgroups_patch(target_group_id, target_group_properties, opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling TargetGroupsApi->targetgroups_patch: #{e}"end
Using the targetgroups_patch_with_http_info variant
This returns an Array which contains the response data, status code and headers.
Controls whether the response is pretty-printed (with indentations and new lines).
[optional][default to true]
depth
Integer
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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
[optional][default to 0]
x_contract_number
Integer
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
require'time'require'ionoscloud'# setup authorizationIonoscloud.configure do|config|# Configure HTTP basic authorization: Basic Authentication config.username ='YOUR USERNAME' config.password ='YOUR PASSWORD'# Configure API key authorization: Token Authentication config.api_key['Authorization'] ='YOUR API KEY'# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)# config.api_key_prefix['Authorization'] = 'Bearer'endapi_instance =Ionoscloud::TargetGroupsApi.newtarget_group =Ionoscloud::TargetGroup.new({properties: Ionoscloud::TargetGroupProperties.new({algorithm: 'ROUND_ROBIN', name: 'My target group', protocol: 'HTTP'})}) # TargetGroup | The target group to create.opts = { pretty: true,# Boolean | Controls whether the response is pretty-printed (with indentations and new lines). depth: 56, # Integer | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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
x_contract_number: 56# Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.}begin# Create a Target Group result = api_instance.targetgroups_post(target_group, opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling TargetGroupsApi->targetgroups_post: #{e}"end
Using the targetgroups_post_with_http_info variant
This returns an Array which contains the response data, status code and headers.
Controls whether the response is pretty-printed (with indentations and new lines).
[optional][default to true]
depth
Integer
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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
[optional][default to 0]
x_contract_number
Integer
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
Modifies the properties of the target group specified by its ID.
Examples
require'time'require'ionoscloud'# setup authorizationIonoscloud.configure do|config|# Configure HTTP basic authorization: Basic Authentication config.username ='YOUR USERNAME' config.password ='YOUR PASSWORD'# Configure API key authorization: Token Authentication config.api_key['Authorization'] ='YOUR API KEY'# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)# config.api_key_prefix['Authorization'] = 'Bearer'endapi_instance =Ionoscloud::TargetGroupsApi.newtarget_group_id ='target_group_id_example'# String | The unique ID of the target group.target_group =Ionoscloud::TargetGroupPut.new({properties: Ionoscloud::TargetGroupProperties.new({algorithm: 'ROUND_ROBIN', name: 'My target group', protocol: 'HTTP'})}) # TargetGroupPut | The modified target group.opts = { pretty: true,# Boolean | Controls whether the response is pretty-printed (with indentations and new lines). depth: 56, # Integer | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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
x_contract_number: 56# Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.}begin# Modify a Target Group by ID result = api_instance.targetgroups_put(target_group_id, target_group, opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling TargetGroupsApi->targetgroups_put: #{e}"end
Using the targetgroups_put_with_http_info variant
This returns an Array which contains the response data, status code and headers.
Controls whether the response is pretty-printed (with indentations and new lines).
[optional][default to true]
depth
Integer
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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
[optional][default to 0]
x_contract_number
Integer
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.