Set allocator metadata item

PUT /platform/infrastructure/allocators/{allocator_id}/metadata/{key}

Adds or updates a single item in the allocator metadata.

Path parameters

  • allocator_id string Required

    The allocator identifier.

  • key string Required

    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.

Body Required

The value of the metadata item to add or update

  • value string Required

    The metadata value

Responses

  • The allocator metadata was successfully changed (the updated JSON is returned)

    Hide response attributes Show response attributes object
    • key string Required

      The metadata field name

    • value string Required

      The metadata value

  • The value specified for the metadata tag is empty. (code: allocators.invalid_empty_metadata_item)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is allocators.invalid_empty_metadata_item.

    Hide response attribute Show response attribute object
    • errors array[object] Required

      A list of errors that occurred in the failing request

      Hide errors attributes Show errors attributes object
      • code string Required

        A structured code representing the error type that occurred

      • message string Required

        A human readable message describing the error that occurred

      • fields array[string]

        If the error can be tied to a specific field or fields in the user request, this lists those fields

    • 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)
    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Values are allocators.allocator_not_found or allocators.metadata_item_not_found.

    Hide response attribute Show response attribute object
    • errors array[object] Required

      A list of errors that occurred in the failing request

      Hide errors attributes Show errors attributes object
      • code string Required

        A structured code representing the error type that occurred

      • message string Required

        A human readable message describing the error that occurred

      • fields array[string]

        If the error can be tied to a specific field or fields in the user request, this lists those fields

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"
      ]
    }
  ]
}