Set allocator metadata item
Adds or updates a single item in the allocator metadata.
Path parameters
-
The allocator identifier.
-
The metadata item key.
Query parameters
-
version string
Checks for conflicts against the metadata version, then returns the value in the
x-cloud-resource-version
header.
Responses
-
The allocator metadata was successfully changed (the updated JSON is returned)
-
The value specified for the metadata tag is empty. (code:
allocators.invalid_empty_metadata_item
) -
- The allocator specified by {allocator_id} cannot be found. (code:
allocators.allocator_not_found
) - The metadata item specified by {key} cannot be found. (code:
allocators.metadata_item_not_found
)
- The allocator specified by {allocator_id} cannot be found. (code:
PUT
/platform/infrastructure/allocators/{allocator_id}/metadata/{key}
curl \
-X PUT https://{{hostname}}/api/v1/platform/infrastructure/allocators/{allocator_id}/metadata/{key} \
-d '{"value":"string"}'
Request examples
{
"value": "string"
}
Response examples (200)
[
{
"key": "string",
"value": "string"
}
]
Response examples (400)
# Headers
x-cloud-error-codes: allocators.invalid_empty_metadata_item
# Payload
{
"errors": [
{
"code": "string",
"message": "string",
"fields": [
"string"
]
}
]
}
Response examples (404)
# Headers
x-cloud-error-codes: allocators.allocator_not_found
# Payload
{
"errors": [
{
"code": "string",
"message": "string",
"fields": [
"string"
]
}
]
}