1. Docs
  2. Reference
  3. REST API Docs
  4. Stack Tags

Stack Tags

    Stack Tags are key-value metadata attached to Pulumi stacks. They can be used for organization, filtering, and to store additional information about your stacks.

    Add Stack Tag

    POST /api/stacks/{orgName}/{projectName}/{stackName}/tags

    Creates a new tag on the specified stack. Tags are key-value metadata pairs that can be used for organization, filtering, and storing additional information about stacks. The request body must include both a tag name and value. Returns 400 if the tag name is invalid or the tag already exists. Built-in tags (such as those automatically set by the Pulumi CLI) follow specific naming conventions.

    Request Parameters

    • orgName string path required
      The organization name
    • projectName string path required
      The project name
    • stackName string path required
      The stack name

    Request Body

    Schema: StackTag
    • name enum required
      The tag key, which must conform to the stack tag naming rules.
      Values: pulumi:project, pulumi:runtime, pulumi:description, pulumi:template, vcs:owner, vcs:repo, vcs:kind, vcs:root
    • value string required
      The tag value associated with this key.

    Responses

    204 No Content
    Errors: 400 Invalid tag name or tag already exists.

    Update Stack Tags

    PATCH /api/stacks/{orgName}/{projectName}/{stackName}/tags

    Replaces all tags on the specified stack with the tags provided in the request body. This is a wholesale replacement operation: any existing tags not included in the request will be removed. The request body is a JSON map of tag name-value pairs. Returns 400 if the operation would change the project name tag or if any tags are invalid.

    Request Parameters

    • orgName string path required
      The organization name
    • projectName string path required
      The project name
    • stackName string path required
      The stack name

    Request Body

    Responses

    204 No Content
    Errors: 400 Cannot change project's name or tags are invalid

    Update Stack Tag

    PATCH /api/stacks/{orgName}/{projectName}/{stackName}/tags/{tagName}

    Updates the value of an existing tag on the specified stack. The tag is identified by its name in the URL path. Built-in tags (those automatically managed by the Pulumi CLI, such as project name tags) cannot be updated and will return a 400 error. Returns 404 if the specified tag does not exist on the stack.

    Request Parameters

    • orgName string path required
      The organization name
    • projectName string path required
      The project name
    • stackName string path required
      The stack name
    • tagName string path required
      The tag name

    Request Body

    Schema: StackTag
    • name enum required
      The tag key, which must conform to the stack tag naming rules.
      Values: pulumi:project, pulumi:runtime, pulumi:description, pulumi:template, vcs:owner, vcs:repo, vcs:kind, vcs:root
    • value string required
      The tag value associated with this key.

    Responses

    204 No Content
    Errors: 400 built-in tags cannot be updated or invalid tag name 404 tag not found

    Delete Stack Tag

    DELETE /api/stacks/{orgName}/{projectName}/{stackName}/tags/{tagName}

    Removes a specific tag from the stack, identified by the tag name in the URL path. Built-in tags (those automatically managed by the Pulumi CLI) cannot be deleted and will return a 400 error. Returns 404 if the specified tag does not exist on the stack. Returns 204 with no content on success.

    Request Parameters

    • orgName string path required
      The organization name
    • projectName string path required
      The project name
    • stackName string path required
      The stack name
    • tagName string path required
      The tag name

    Responses

    204 No Content
    Errors: 400 built-in tags cannot be deleted 404 Tag not found