1. Packages
  2. Fastly Provider
  3. API Docs
  4. ApiSecurityOperationTag
Viewing docs for Fastly v12.0.0
published on Monday, Apr 20, 2026 by Pulumi
fastly logo
Viewing docs for Fastly v12.0.0
published on Monday, Apr 20, 2026 by Pulumi

    Manages an API Security operation tag for a Fastly service. Operation tags can be used to group and organize operations.

    Example Usage

    Basic usage:

    import * as pulumi from "@pulumi/pulumi";
    import * as fastly from "@pulumi/fastly";
    
    const svc1 = new fastly.ServiceVcl("svc1", {
        name: "test-svc-1-example",
        forceDestroy: true,
        backends: [{
            address: "example.com",
            name: "tf-test-backend-1",
        }],
    });
    const example = new fastly.ApiSecurityOperationTag("example", {
        serviceId: svc1.id,
        name: "production",
        description: "Tag for production endpoints",
    });
    
    import pulumi
    import pulumi_fastly as fastly
    
    svc1 = fastly.ServiceVcl("svc1",
        name="test-svc-1-example",
        force_destroy=True,
        backends=[{
            "address": "example.com",
            "name": "tf-test-backend-1",
        }])
    example = fastly.ApiSecurityOperationTag("example",
        service_id=svc1.id,
        name="production",
        description="Tag for production endpoints")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-fastly/sdk/v12/go/fastly"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		svc1, err := fastly.NewServiceVcl(ctx, "svc1", &fastly.ServiceVclArgs{
    			Name:         pulumi.String("test-svc-1-example"),
    			ForceDestroy: pulumi.Bool(true),
    			Backends: fastly.ServiceVclBackendArray{
    				&fastly.ServiceVclBackendArgs{
    					Address: pulumi.String("example.com"),
    					Name:    pulumi.String("tf-test-backend-1"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = fastly.NewApiSecurityOperationTag(ctx, "example", &fastly.ApiSecurityOperationTagArgs{
    			ServiceId:   svc1.ID(),
    			Name:        pulumi.String("production"),
    			Description: pulumi.String("Tag for production endpoints"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Fastly = Pulumi.Fastly;
    
    return await Deployment.RunAsync(() => 
    {
        var svc1 = new Fastly.Index.ServiceVcl("svc1", new()
        {
            Name = "test-svc-1-example",
            ForceDestroy = true,
            Backends = new[]
            {
                new Fastly.Inputs.ServiceVclBackendArgs
                {
                    Address = "example.com",
                    Name = "tf-test-backend-1",
                },
            },
        });
    
        var example = new Fastly.Index.ApiSecurityOperationTag("example", new()
        {
            ServiceId = svc1.Id,
            Name = "production",
            Description = "Tag for production endpoints",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.fastly.ServiceVcl;
    import com.pulumi.fastly.ServiceVclArgs;
    import com.pulumi.fastly.inputs.ServiceVclBackendArgs;
    import com.pulumi.fastly.ApiSecurityOperationTag;
    import com.pulumi.fastly.ApiSecurityOperationTagArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var svc1 = new ServiceVcl("svc1", ServiceVclArgs.builder()
                .name("test-svc-1-example")
                .forceDestroy(true)
                .backends(ServiceVclBackendArgs.builder()
                    .address("example.com")
                    .name("tf-test-backend-1")
                    .build())
                .build());
    
            var example = new ApiSecurityOperationTag("example", ApiSecurityOperationTagArgs.builder()
                .serviceId(svc1.id())
                .name("production")
                .description("Tag for production endpoints")
                .build());
    
        }
    }
    
    resources:
      svc1:
        type: fastly:ServiceVcl
        properties:
          name: test-svc-1-example
          forceDestroy: true
          backends:
            - address: example.com
              name: tf-test-backend-1
      example:
        type: fastly:ApiSecurityOperationTag
        properties:
          serviceId: ${svc1.id}
          name: production
          description: Tag for production endpoints
    

    Create ApiSecurityOperationTag Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ApiSecurityOperationTag(name: string, args: ApiSecurityOperationTagArgs, opts?: CustomResourceOptions);
    @overload
    def ApiSecurityOperationTag(resource_name: str,
                                args: ApiSecurityOperationTagArgs,
                                opts: Optional[ResourceOptions] = None)
    
    @overload
    def ApiSecurityOperationTag(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                service_id: Optional[str] = None,
                                description: Optional[str] = None,
                                name: Optional[str] = None)
    func NewApiSecurityOperationTag(ctx *Context, name string, args ApiSecurityOperationTagArgs, opts ...ResourceOption) (*ApiSecurityOperationTag, error)
    public ApiSecurityOperationTag(string name, ApiSecurityOperationTagArgs args, CustomResourceOptions? opts = null)
    public ApiSecurityOperationTag(String name, ApiSecurityOperationTagArgs args)
    public ApiSecurityOperationTag(String name, ApiSecurityOperationTagArgs args, CustomResourceOptions options)
    
    type: fastly:ApiSecurityOperationTag
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ApiSecurityOperationTagArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ApiSecurityOperationTagArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ApiSecurityOperationTagArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ApiSecurityOperationTagArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ApiSecurityOperationTagArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var apiSecurityOperationTagResource = new Fastly.ApiSecurityOperationTag("apiSecurityOperationTagResource", new()
    {
        ServiceId = "string",
        Description = "string",
        Name = "string",
    });
    
    example, err := fastly.NewApiSecurityOperationTag(ctx, "apiSecurityOperationTagResource", &fastly.ApiSecurityOperationTagArgs{
    	ServiceId:   pulumi.String("string"),
    	Description: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    })
    
    var apiSecurityOperationTagResource = new ApiSecurityOperationTag("apiSecurityOperationTagResource", ApiSecurityOperationTagArgs.builder()
        .serviceId("string")
        .description("string")
        .name("string")
        .build());
    
    api_security_operation_tag_resource = fastly.ApiSecurityOperationTag("apiSecurityOperationTagResource",
        service_id="string",
        description="string",
        name="string")
    
    const apiSecurityOperationTagResource = new fastly.ApiSecurityOperationTag("apiSecurityOperationTagResource", {
        serviceId: "string",
        description: "string",
        name: "string",
    });
    
    type: fastly:ApiSecurityOperationTag
    properties:
        description: string
        name: string
        serviceId: string
    

    ApiSecurityOperationTag Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The ApiSecurityOperationTag resource accepts the following input properties:

    ServiceId string
    Service ID the tag belongs to. To import, use: \n\n/\n\n.
    Description string
    The description of the operation tag.
    Name string
    The name of the operation tag.
    ServiceId string
    Service ID the tag belongs to. To import, use: \n\n/\n\n.
    Description string
    The description of the operation tag.
    Name string
    The name of the operation tag.
    serviceId String
    Service ID the tag belongs to. To import, use: \n\n/\n\n.
    description String
    The description of the operation tag.
    name String
    The name of the operation tag.
    serviceId string
    Service ID the tag belongs to. To import, use: \n\n/\n\n.
    description string
    The description of the operation tag.
    name string
    The name of the operation tag.
    service_id str
    Service ID the tag belongs to. To import, use: \n\n/\n\n.
    description str
    The description of the operation tag.
    name str
    The name of the operation tag.
    serviceId String
    Service ID the tag belongs to. To import, use: \n\n/\n\n.
    description String
    The description of the operation tag.
    name String
    The name of the operation tag.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ApiSecurityOperationTag resource produces the following output properties:

    CreatedAt string
    Created timestamp (when present).
    Id string
    The provider-assigned unique ID for this managed resource.
    OperationCount int
    Number of operations associated with this tag (when present).
    TagId string
    The tag ID.
    UpdatedAt string
    Updated timestamp (when present).
    CreatedAt string
    Created timestamp (when present).
    Id string
    The provider-assigned unique ID for this managed resource.
    OperationCount int
    Number of operations associated with this tag (when present).
    TagId string
    The tag ID.
    UpdatedAt string
    Updated timestamp (when present).
    createdAt String
    Created timestamp (when present).
    id String
    The provider-assigned unique ID for this managed resource.
    operationCount Integer
    Number of operations associated with this tag (when present).
    tagId String
    The tag ID.
    updatedAt String
    Updated timestamp (when present).
    createdAt string
    Created timestamp (when present).
    id string
    The provider-assigned unique ID for this managed resource.
    operationCount number
    Number of operations associated with this tag (when present).
    tagId string
    The tag ID.
    updatedAt string
    Updated timestamp (when present).
    created_at str
    Created timestamp (when present).
    id str
    The provider-assigned unique ID for this managed resource.
    operation_count int
    Number of operations associated with this tag (when present).
    tag_id str
    The tag ID.
    updated_at str
    Updated timestamp (when present).
    createdAt String
    Created timestamp (when present).
    id String
    The provider-assigned unique ID for this managed resource.
    operationCount Number
    Number of operations associated with this tag (when present).
    tagId String
    The tag ID.
    updatedAt String
    Updated timestamp (when present).

    Look up Existing ApiSecurityOperationTag Resource

    Get an existing ApiSecurityOperationTag resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ApiSecurityOperationTagState, opts?: CustomResourceOptions): ApiSecurityOperationTag
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created_at: Optional[str] = None,
            description: Optional[str] = None,
            name: Optional[str] = None,
            operation_count: Optional[int] = None,
            service_id: Optional[str] = None,
            tag_id: Optional[str] = None,
            updated_at: Optional[str] = None) -> ApiSecurityOperationTag
    func GetApiSecurityOperationTag(ctx *Context, name string, id IDInput, state *ApiSecurityOperationTagState, opts ...ResourceOption) (*ApiSecurityOperationTag, error)
    public static ApiSecurityOperationTag Get(string name, Input<string> id, ApiSecurityOperationTagState? state, CustomResourceOptions? opts = null)
    public static ApiSecurityOperationTag get(String name, Output<String> id, ApiSecurityOperationTagState state, CustomResourceOptions options)
    resources:  _:    type: fastly:ApiSecurityOperationTag    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    CreatedAt string
    Created timestamp (when present).
    Description string
    The description of the operation tag.
    Name string
    The name of the operation tag.
    OperationCount int
    Number of operations associated with this tag (when present).
    ServiceId string
    Service ID the tag belongs to. To import, use: \n\n/\n\n.
    TagId string
    The tag ID.
    UpdatedAt string
    Updated timestamp (when present).
    CreatedAt string
    Created timestamp (when present).
    Description string
    The description of the operation tag.
    Name string
    The name of the operation tag.
    OperationCount int
    Number of operations associated with this tag (when present).
    ServiceId string
    Service ID the tag belongs to. To import, use: \n\n/\n\n.
    TagId string
    The tag ID.
    UpdatedAt string
    Updated timestamp (when present).
    createdAt String
    Created timestamp (when present).
    description String
    The description of the operation tag.
    name String
    The name of the operation tag.
    operationCount Integer
    Number of operations associated with this tag (when present).
    serviceId String
    Service ID the tag belongs to. To import, use: \n\n/\n\n.
    tagId String
    The tag ID.
    updatedAt String
    Updated timestamp (when present).
    createdAt string
    Created timestamp (when present).
    description string
    The description of the operation tag.
    name string
    The name of the operation tag.
    operationCount number
    Number of operations associated with this tag (when present).
    serviceId string
    Service ID the tag belongs to. To import, use: \n\n/\n\n.
    tagId string
    The tag ID.
    updatedAt string
    Updated timestamp (when present).
    created_at str
    Created timestamp (when present).
    description str
    The description of the operation tag.
    name str
    The name of the operation tag.
    operation_count int
    Number of operations associated with this tag (when present).
    service_id str
    Service ID the tag belongs to. To import, use: \n\n/\n\n.
    tag_id str
    The tag ID.
    updated_at str
    Updated timestamp (when present).
    createdAt String
    Created timestamp (when present).
    description String
    The description of the operation tag.
    name String
    The name of the operation tag.
    operationCount Number
    Number of operations associated with this tag (when present).
    serviceId String
    Service ID the tag belongs to. To import, use: \n\n/\n\n.
    tagId String
    The tag ID.
    updatedAt String
    Updated timestamp (when present).

    Import

    API Security operation tags can be imported using a composite ID of the form <service_id>/<tag_id>, e.g.

    $ pulumi import fastly:index/apiSecurityOperationTag:ApiSecurityOperationTag example <service_id>/<tag_id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Fastly pulumi/pulumi-fastly
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the fastly Terraform Provider.
    fastly logo
    Viewing docs for Fastly v12.0.0
    published on Monday, Apr 20, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.