update_parameter¶
- ParameterStoreApi.update_parameter(key, role_id, parameters_put_request_body, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Update a parameter value, description, or managers
Updates SSM (overwrite) and DynamoDB metadata for an existing parameter. ParameterType, Scope, and ParameterKey cannot change. User-scoped parameters need editor+; global parameters need a manager when a managers list exists.
- Parameters:
key (str) – Full stored ParameterKey, URL-decoded (for example /adp/amorphic/pstore/user/amp-db-host). This path value is used; ParameterKey in the body is ignored. (required)
role_id (str) – Amorphic role ID sent for authorization. Missing this header returns AUTH-1001. (required)
parameters_put_request_body (ParametersPutRequestBody) – (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 /parameters/{key}
Request¶
Update value and description
{
"ParameterValue": "analytics-db-v2.example.com",
"Description": "Updated analytics DB hostname"
}
Replace global ParameterManagers
{
"ParameterManagers": [
"jdoe",
"asmith"
]
}
Success (HTTP 200)¶
Parameter updated. Message is “Successfully updated parameter.”
Request / response example
{
"Message": "Successfully updated parameter."
}
Errors¶
Documented error codes: IPV-1002, IPV-1015, AUTH-1002, IPV-1078, RTE-1001.
HTTP 400
Parameter not found, value length invalid, unauthorized update, or invalid ParameterManagers list. Body is {“Message”: “<CODE> - <text>”}.
Parameter does not exist
{
"Message": "IPV-1002 - Invalid ParameterKey - /adp/amorphic/pstore/user/missing, resource not found."
}
ParameterValue length outside 1-4000
{
"Message": "IPV-1015 - Invalid parameter - ParameterValue, size must be between 1 and 4000 chars(inclusive)."
}
System-owned parameter
{
"Message": "AUTH-1002 - System-owned parameters cannot be modified."
}
ParameterManagers list emptied
{
"Message": "IPV-1078 - ParameterManagers list cannot be empty"
}
HTTP 500
Uncaught backend failure. Typical Message is “RTE-1001 - {exception}.”
Request / response example
{
"Message": "RTE-1001 - Could not complete the request. Please try again."
}