arrow-left

All pages
1 of 1

Loading...

TargetGroupsApi

All URIs are relative to https://api.ionos.com/cloudapi/v6

Method
HTTP request
Description

DELETE /targetgroups/{targetGroupId}

Delete a Target Group by ID

GET /targetgroups/{targetGroupId}

Get a Target Group by ID

hashtag
targetGroupsDelete

targetGroupsDelete(targetGroupId, opts)

Delete a Target Group by ID

Deletes the target group specified by its ID.

hashtag
Examples

hashtag
Parameters

Name
Type
Description
Notes

hashtag
Return type

nil (empty response body)

hashtag
Authorization

Basic Authentication, Token Authentication

hashtag
HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

hashtag
targetgroupsFindByTargetGroupId

targetgroupsFindByTargetGroupId(targetGroupId, opts)

Get a Target Group by ID

Retrieves the properties of the target group specified by its ID.

hashtag
Examples

hashtag
Parameters

Name
Type
Description
Notes

hashtag
Return type

hashtag
Authorization

Basic Authentication, Token Authentication

hashtag
HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

hashtag
targetgroupsGet

targetgroupsGet(opts)

Get Target Groups

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.

hashtag
Examples

hashtag
Parameters

Name
Type
Description
Notes

hashtag
Return type

hashtag
Authorization

Basic Authentication, Token Authentication

hashtag
HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

hashtag
targetgroupsPatch

targetgroupsPatch(targetGroupId, targetGroupProperties, opts)

Partially Modify a Target Group by ID

Updates the properties of the target group specified by its ID.

hashtag
Examples

hashtag
Parameters

Name
Type
Description
Notes

hashtag
Return type

hashtag
Authorization

Basic Authentication, Token Authentication

hashtag
HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

hashtag
targetgroupsPost

targetgroupsPost(targetGroup, opts)

Create a Target Group

Creates a target group.

hashtag
Examples

hashtag
Parameters

Name
Type
Description
Notes

hashtag
Return type

hashtag
Authorization

Basic Authentication, Token Authentication

hashtag
HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

hashtag
targetgroupsPut

targetgroupsPut(targetGroupId, targetGroup, opts)

Modify a Target Group by ID

Modifies the properties of the target group specified by its ID.

hashtag
Examples

hashtag
Parameters

Name
Type
Description
Notes

hashtag
Return type

hashtag
Authorization

Basic Authentication, Token Authentication

hashtag
HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

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]

xContractNumber

number

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

[optional][default to undefined]

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]

xContractNumber

number

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

[optional][default to undefined]

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

[optional][default to undefined]

offset

number

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

number

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>.

[optional][default to 100]

Controls whether the response is pretty-printed (with indentations and new lines).

[optional][default to true]

depth

number

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&#39;s children are included. - depth=... and so on

[optional][default to 0]

xContractNumber

number

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

[optional][default to undefined]

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&#39;s children are included. - depth=... and so on

[optional][default to 0]

xContractNumber

number

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

[optional][default to undefined]

Controls whether the response is pretty-printed (with indentations and new lines).

[optional][default to true]

depth

number

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&#39;s children are included. - depth=... and so on

[optional][default to 0]

xContractNumber

number

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

[optional][default to undefined]

targetgroupsGet

GET /targetgroups

Get Target Groups

targetgroupsPatch

PATCH /targetgroups/{targetGroupId}

Partially Modify a Target Group by ID

targetgroupsPost

POST /targetgroups

Create a Target Group

targetgroupsPut

PUT /targetgroups/{targetGroupId}

Modify a Target Group by ID

targetGroupId

string

The unique ID of the target group.

[default to undefined]

pretty

boolean

Controls whether the response is pretty-printed (with indentations and new lines).

[optional][default to true]

depth

targetGroupId

string

The unique ID of the target group.

[default to undefined]

pretty

boolean

Controls whether the response is pretty-printed (with indentations and new lines).

[optional][default to true]

depth

pretty

boolean

Controls whether the response is pretty-printed (with indentations and new lines).

[optional][default to true]

depth

number

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&#39;s children are included. - depth=... and so on

[optional][default to 0]

xContractNumber

targetGroupId

string

The unique ID of the target group.

[default to undefined]

targetGroupProperties

TargetGroupProperties

The target group properties to be updated.

pretty

targetGroup

TargetGroup

The target group to create.

pretty

boolean

Controls whether the response is pretty-printed (with indentations and new lines).

[optional][default to true]

depth

targetGroupId

string

The unique ID of the target group.

[default to undefined]

targetGroup

TargetGroupPut

The modified target group.

pretty

TargetGroup
TargetGroups
TargetGroup
TargetGroup
TargetGroup
targetGroupsDelete
targetgroupsFindByTargetGroupId

number

number

number

boolean

number

boolean

const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.TargetGroupsApi(config);
// Delete a Target Group by ID
api_instance
  .targetGroupsDelete({
    targetGroupId: targetGroupId_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
        options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));
const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.TargetGroupsApi(config);
// Get a Target Group by ID
api_instance
  .targetgroupsFindByTargetGroupId({
    targetGroupId: targetGroupId_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
        options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));
const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.TargetGroupsApi(config);
var filterMap = new Map()
filterMap.set("<property_name>", "<property_value>")
// Get Target Groups
api_instance
  .targetgroupsGet({
    pretty: true,
    depth: 56,
    xContractNumber: 56,
    offset: 56,
    limit: 56
    orderBy: "<property_name>"
    maxResults: 2,
    filters: filterMap
    options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));
const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.TargetGroupsApi(config);
// Partially Modify a Target Group by ID
api_instance
  .targetgroupsPatch({
    targetGroupId: targetGroupId_example,
    targetGroupProperties: targetGroupProperties_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
        options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));
const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.TargetGroupsApi(config);
// Create a Target Group
api_instance
  .targetgroupsPost({
    targetGroup: targetGroup_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
        options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));
const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.TargetGroupsApi(config);
// Modify a Target Group by ID
api_instance
  .targetgroupsPut({
    targetGroupId: targetGroupId_example,
    targetGroup: targetGroup_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
        options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));