dots.v2.firewalls.byFirewall_id().tags.post()

Generated on 13 Nov 2026 from DoTs version v1.24.0

Usage

client.v2.firewalls.byFirewall_id(firewall_id).tags.post(body: TagsPostRequestBody, requestConfiguration?: RequestConfiguration<object>): Promise<void>

Description

To assign a tag representing a group of Droplets to a firewall, send a POST request to /v2/firewalls/{firewall_id}/tags. In the body of the request, there should be a tags attribute containing a list of tag names.

No response body will be sent back, but the response code will indicate success. Specifically, the response code will be a 204, which means that the action was successful with no returned body data.

Parameters

Path Parameters

firewall_id string required

Example: bb4b2611-3d72-467b-8602-280330ecd65c

A unique ID that can be used to identify and reference a firewall.

Request Body

tags array of strings or null required

Example: ["base-image", "prod"]

A flat array of tag names as strings to be applied to the resource. Tag names must exist in order to be referenced in a request.

Requires tag:create and tag:read scopes.

Request Sample

Show Request Sample
import { FetchRequestAdapter } from "@microsoft/kiota-http-fetchlibrary";
import {
    createDigitalOceanClient,
    DigitalOceanApiKeyAuthenticationProvider,
} from "@digitalocean/dots";

const authProvider = new DigitalOceanApiKeyAuthenticationProvider(process.env.DIGITALOCEAN_TOKEN!);
const adapter = new FetchRequestAdapter(authProvider);
const client = createDigitalOceanClient(adapter);

await client.v2.firewalls
    .byFirewall_id("bb4b2611-3d72-467b-8602-280330ecd65c").tags.post({
    tags: [
        "frontend",
    ],
});

More Information

See /v2/firewalls/{firewall_id}/tags in the API reference for additional detail on responses, headers, parameters, and more.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.