PUT /deployments/{deployment_id}/tags

Sets the tags for a Deployment, replacing any existing tags.

Path parameters

  • deployment_id string Required

    Identifier for the Deployment

application/json

Body Required

The tags to set on the deployment.

  • tags array[object]

    Arbitrary user-defined metadata associated with this deployment

    Hide tags attributes Show tags attributes object

    The key-value pair.

    • key string Required

      The metadata field name

    • value string Required

      The metadata value

Responses

  • 200 application/json

    The deployment tags were successfully updated

    Hide response attribute Show response attribute object
    • tags array[object]

      Arbitrary user-defined metadata associated with this deployment

      Hide tags attributes Show tags attributes object

      The key-value pair.

      • key string Required

        The metadata field name

      • value string Required

        The metadata value

  • 400 application/json
    • The number of tags exceeds the maximum of 64 allowed per deployment. (code: deployments.too_many_tags)
    • A tag key exceeds the maximum of 32 characters or a tag value exceeds the maximum of 128 characters. (code: deployments.lengthy_key_or_value)
    Hide headers attribute Show headers attribute
    • x-cloud-error-codes string

      The error codes associated with the response

      Values are deployments.too_many_tags or deployments.lengthy_key_or_value.

    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

  • 404 application/json

    The Deployment specified by {deployment_id} cannot be found. (code: deployments.deployment_not_found)

    Hide headers attribute Show headers attribute
    • x-cloud-error-codes string

      The error codes associated with the response

      Value is deployments.deployment_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 /deployments/{deployment_id}/tags
curl \
 --request PUT 'https://api.elastic-cloud.com/api/v1/deployments/{deployment_id}/tags' \
 --header "Content-Type: application/json" \
 --data '{"tags":[{"key":"string","value":"string"}]}'