Import network mapping from YAML file. Note: A YAML file use spaces as indentation, tabs are not allowed. Example of input file:
name: `mapping_rule_1`
mapping:
- tags:
- `tag_name_1`
cidr4:
- 127.0.2.0/24
- tags:
- `tag_name_2`
- `tag_name_3`
cidr4:
- 128.0.1.0/24
- 128.0.2.0/24
- 128.0.3.0/24
cidr6:
- ac:20::0/64
---
name: `mapping_rule_2`
mapping:
- tags:
- `my_network`
cidr4:
- 129.0.2.0/24
cidr6:
- ac:20::0/64
Example of request:
curl --location --request POST 'https://api.gcore.com/dns/v2/network-mappings/import' \
--header 'Authorization: Bearer ...' \
--header 'Content-Type: text/plain' \
--data-raw 'name: `mapping_rule_1`
mapping:
- tags:
- `tag_name_1`
cidr4:
- 127.0.2.0/24
- tags:
- `tag_name_2`
- `tag_name_3`
cidr4:
- 128.0.1.0/24
- 128.0.2.0/24
- 128.0.3.0/24
cidr6:
- aa:10::/64
---
name: `mapping_rule_2`
mapping:
- tags:
- `my_network`
cidr4:
- 129.0.2.0/24
cidr6:
- ac:20::0/64'
API key for authentication. Make sure to include the word apikey
, followed by a single space and then your token.
Example: apikey 1234$abcdef
ImportNetworkMappingResponse
The response is of type object
.