IP address mapping rules - PUT configuration
Updates the configuration of mapping between IP addresses and geographic regions.
The request consumes an application/json
payload.
PUT | Managed | https://{your-domain}/e/{your-environment-id}/api/config/v1/geographicRegions/ipAddressMappings |
SaaS | https://{your-environment-id}.live.dynatrace.com/api/config/v1/geographicRegions/ipAddressMappings | |
Environment ActiveGate | https://{your-activegate-domain}/e/{your-environment-id}/api/config/v1/geographicRegions/ipAddressMappings |
Authentication
To execute this request, you need an access token with Write configuration (WriteConfig
) scope. To learn how to obtain and use it, see Tokens and authentication.
Parameters
Parameter | Type | Description | In | Required |
---|---|---|---|---|
body | Ip | The JSON body of the request. Contains the configuration of the IP address mapping. | body | optional |
Request body objects
The IpAddressMappings
object
Configuration of the IP address mappings to geographic locations.
Element | Type | Description |
---|---|---|
ipAddressMappingRules | Ip | A list of IP address mapping rules. Rules are evaluated from top to bottom; the first matching rule applies. Can be |
The IpAddressMappingRule
object
Configuration of the IP address mapping to the geographic location.
Element | Type | Description |
---|---|---|
ipAddressMappingLocation | Ip | The location for an IP address mapping. |
ipAddressRange | Ip | The IP address or the IP address range to be mapped to the location. |
The IpAddressMappingLocation
object
The location for an IP address mapping.
Element | Type | Description |
---|---|---|
countryCode | string | The country code of the location. Use the alpha-2 code of the ISO 3166-2 standard, (for example, |
city | string | The city name of the location. Can be |
regionCode | string | The region code of the location. For the USA or Canada use ISO 3166-2 state codes without For the rest of the world use FIPS 10-4 codes without country prefix. Can be |
latitude | number | The latitude of the location in Can be |
longitude | number | The longitude of the location in Can be |
The IpAddressRange
object
The IP address or the IP address range to be mapped to the location.
Element | Type | Description |
---|---|---|
subnetMask | integer | The subnet mask of the IP address range. Can be |
address | string | The IP address to be mapped. For an IP address range, this is the from address. |
addressTo | string | The to address of the IP address range. Can be |
Request body JSON model
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{
"ipAddressMappingRules": [
{
"ipAddressMappingLocation": {
"countryCode": "string",
"city": "string",
"regionCode": "string",
"latitude": 1,
"longitude": 1
},
"ipAddressRange": {
"subnetMask": 1,
"address": "string",
"addressTo": "string"
}
}
]
}
Response
Response codes
Code | Type | Description |
---|---|---|
204 | - | Success. The configuration has been updated. Response doesn't have a body. |
400 | Error | Failed. The input is invalid |
Validate payload
We recommend that you validate the payload before submitting it with an actual request. A response code of 204 indicates a valid payload.
The request consumes an application/json
payload.
POST | Managed | https://{your-domain}/e/{your-environment-id}/api/config/v1/geographicRegions/ipAddressMappings/validator |
SaaS | https://{your-environment-id}.live.dynatrace.com/api/config/v1/geographicRegions/ipAddressMappings/validator | |
Environment ActiveGate | https://{your-activegate-domain}/e/{your-environment-id}/api/config/v1/geographicRegions/ipAddressMappings/validator |
Authentication
To execute this request, you need an access token with Write configuration (WriteConfig
) scope. To learn how to obtain and use it, see Tokens and authentication.
Response
Response codes
Code | Type | Description |
---|---|---|
204 | - | Success. The submitted configuration is valid. Response doesn't have a body. |
400 | Error | Failed. The input is invalid |