PUT
/
cloud
/
v1
/
ports
/
{project_id}
/
{region_id}
/
{port_id}
/
allow_address_pairs
Assign allowed address pairs for instance port
curl --request PUT \
  --url https://api.gcore.com/cloud/v1/ports/{project_id}/{region_id}/{port_id}/allow_address_pairs \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "allowed_address_pairs": [
    {
      "ip_address": "192.168.123.20",
      "mac_address": "00:16:3e:f2:87:16"
    },
    {
      "ip_address": "192.168.0.0/17",
      "mac_address": "00:16:3e:f2:87:89"
    }
  ],
  "instance_id": "bc688791-f1b0-44eb-97d4-07697294b1e1",
  "network_id": "351b0dd7-ca09-431c-be53-935db3785067",
  "port_id": "1f0ca628-a73b-42c0-bdac-7b10d023e097"
}'
{
  "allowed_address_pairs": [
    {
      "ip_address": "192.168.123.20",
      "mac_address": "00:16:3e:f2:87:16"
    },
    {
      "ip_address": "192.168.0.0/17",
      "mac_address": "00:16:3e:f2:87:89"
    }
  ],
  "instance_id": "bc688791-f1b0-44eb-97d4-07697294b1e1",
  "network_id": "351b0dd7-ca09-431c-be53-935db3785067",
  "port_id": "1f0ca628-a73b-42c0-bdac-7b10d023e097"
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Path Parameters

project_id
integer
required

Project ID

region_id
integer
required

Region ID

port_id
string
required

Port ID

Body

application/json
allowed_address_pairs
AllowedAddressPairsSerializer · object[]

A set of zero or more allowed port address pair and/or subnet masks

Maximum length: 10
Examples:
[
{
"ip_address": "192.168.123.20",
"mac_address": "00:16:3e:f2:87:16"
},
{
"ip_address": "192.168.0.0/17",
"mac_address": "00:16:3e:f2:87:89"
}
]
instance_id
string<uuid4> | null

The ID of the instance that uses this port

Examples:

"bc688791-f1b0-44eb-97d4-07697294b1e1"

network_id
string<uuid4> | null

The ID of the attached network

Examples:

"351b0dd7-ca09-431c-be53-935db3785067"

port_id
string<uuid4> | null

The ID of the port

Examples:

"1f0ca628-a73b-42c0-bdac-7b10d023e097"

Response

Instance port

allowed_address_pairs
AllowedAddressPairsSerializer · object[]

A set of zero or more allowed port address pair and/or subnet masks

Maximum length: 10
Examples:
[
{
"ip_address": "192.168.123.20",
"mac_address": "00:16:3e:f2:87:16"
},
{
"ip_address": "192.168.0.0/17",
"mac_address": "00:16:3e:f2:87:89"
}
]
instance_id
string<uuid4> | null

The ID of the instance that uses this port

Examples:

"bc688791-f1b0-44eb-97d4-07697294b1e1"

network_id
string<uuid4> | null

The ID of the attached network

Examples:

"351b0dd7-ca09-431c-be53-935db3785067"

port_id
string<uuid4> | null

The ID of the port

Examples:

"1f0ca628-a73b-42c0-bdac-7b10d023e097"