update_system_whitelist_ips¶
- WhitelistIpsApi.update_system_whitelist_ips(role_id, update_system_whitelist_ips_request, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Update whitelisted IPs
Replaces CloudFront and regional WAF IP sets and SSM lists. Requires system-settings.manage. Returns IPV-1002 if whitelisting is disabled. At least one of IPV4Addresses or IPV6Addresses is required. IPv6 in the body returns IPV-1002 when IPv6 is not enabled.
- Parameters:
role_id (str) – Amorphic role ID the request is authorized against. Must be a role the user belongs to. Used for permission checks and audit logs. (required)
update_system_whitelist_ips_request (UpdateSystemWhitelistIpsRequest) – (required)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
- Returns:
Returns the result object.
Request and Response Examples¶
HTTP: PUT /system-whitelist-ips
Request¶
Replace IPv4 list
{
"IPV4Addresses": [
"203.0.113.10/32"
]
}
Success (HTTP 200)¶
Successfully updated Whitelisted IPs
Success
{
"Message": "Successfully updated whitelisted IPs."
}
Errors¶
Documented error codes: AUTH-1030, IPV-1002, IPV-1008, IPV-1015, RTE-1001, EMF-1001.
HTTP 400
AUTH-1030 missing system-settings.manage. IPV-1002 whitelisting or IPv6 disabled. IPV-1008 missing keys or empty list. IPV-1015 joined CSV longer than 4000 characters.
Missing address keys
{
"Message": "IPV-1008 - Invalid request body, missing key(s) - IPV4Addresses or IPV6Addresses"
}
IPv6 not enabled
{
"Message": "IPV-1002 - IP Address IPV6 is not enabled in this environment. Please only provide IPV4Addresses."
}
HTTP 500
Uncaught Exception is RTE-1001 via EMF-1001.
Uncaught Exception
{
"Message": "RTE-1001 - Internal error."
}