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 | ManagedDynatrace for Government | 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}:9999/e/{your-environment-id}/api/config/v1/geographicRegions/ipAddressMappings |
Authentication
To execute this request, you need an access token with WriteConfig
scope.
To learn how to obtain and use it, see Tokens and authentication.
Parameters
Parameter | Type | Description | In | Required |
---|---|---|---|---|
body | IpAddressMappings | 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 | Required |
---|---|---|---|
ipAddressMappingRules | IpAddressMappingRule[] | A list of IP address mapping rules. Rules are evaluated from top to bottom; the first matching rule applies. | optional |
The IpAddressMappingRule
object
Configuration of the IP address mapping to the geographic location.
Element | Type | Description | Required |
---|---|---|---|
ipAddressMappingLocation | IpAddressMappingLocation | The location for an IP address mapping. | required |
ipAddressRange | IpAddressRange | The IP address or the IP address range to be mapped to the location. | required |
The IpAddressMappingLocation
object
The location for an IP address mapping.
Element | Type | Description | Required |
---|---|---|---|
city | string | The city name of the location. | optional |
countryCode | string | The country code of the location. To fetch the list of available country codes, use the GET all countries request. | required |
latitude | number | The latitude of the location in | optional |
longitude | number | The longitude of the location in | optional |
regionCode | string | The region code of the location. To fetch the list of available region codes, use the GET regions of the country request. | optional |
The IpAddressRange
object
The IP address or the IP address range to be mapped to the location.
Element | Type | Description | Required |
---|---|---|---|
address | string | The IP address to be mapped. For an IP address range, this is the from address. | required |
addressTo | string | The to address of the IP address range. | optional |
subnetMask | integer | The subnet mask of the IP address range. | optional |
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.
1{2 "ipAddressMappingRules": [3 {4 "ipAddressMappingLocation": {5 "city": "string",6 "countryCode": "string",7 "latitude": 1,8 "longitude": 1,9 "regionCode": "string"10 },11 "ipAddressRange": {12 "address": "string",13 "addressTo": "string",14 "subnetMask": 115 }16 }17 ]18}
Response
Response codes
Code | Type | Description |
---|---|---|
204 | - | Success. The configuration has been updated. Response doesn't have a body. |
400 | ErrorEnvelope | 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 | ManagedDynatrace for Government | 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}:9999/e/{your-environment-id}/api/config/v1/geographicRegions/ipAddressMappings/validator |
Authentication
To execute this request, you need an access token with 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 | ErrorEnvelope | Failed. The input is invalid |