Viewing docs for Fastly v12.0.0
published on Monday, Apr 20, 2026 by Pulumi
published on Monday, Apr 20, 2026 by Pulumi
Viewing docs for Fastly v12.0.0
published on Monday, Apr 20, 2026 by Pulumi
published on Monday, Apr 20, 2026 by Pulumi
Use this data source to list API Security operation tags for a Fastly service.
Example 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",
}],
});
// Optional: create a tag so the data source returns a predictable result
const example = new fastly.ApiSecurityOperationTag("example", {
serviceId: svc1.id,
name: "example-tag",
description: "Example tag",
});
const tags = fastly.getApiSecurityOperationTagsOutput({
serviceId: svc1.id,
});
export const apiSecurityOperationTags = tags.apply(tags => tags.tags);
export const apiSecurityOperationTagsTotal = tags.apply(tags => tags.total);
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",
}])
# Optional: create a tag so the data source returns a predictable result
example = fastly.ApiSecurityOperationTag("example",
service_id=svc1.id,
name="example-tag",
description="Example tag")
tags = fastly.get_api_security_operation_tags_output(service_id=svc1.id)
pulumi.export("apiSecurityOperationTags", tags.tags)
pulumi.export("apiSecurityOperationTagsTotal", tags.total)
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
}
// Optional: create a tag so the data source returns a predictable result
_, err = fastly.NewApiSecurityOperationTag(ctx, "example", &fastly.ApiSecurityOperationTagArgs{
ServiceId: svc1.ID(),
Name: pulumi.String("example-tag"),
Description: pulumi.String("Example tag"),
})
if err != nil {
return err
}
tags := fastly.GetApiSecurityOperationTagsOutput(ctx, fastly.GetApiSecurityOperationTagsOutputArgs{
ServiceId: svc1.ID(),
}, nil)
ctx.Export("apiSecurityOperationTags", tags.ApplyT(func(tags fastly.GetApiSecurityOperationTagsResult) ([]fastly.GetApiSecurityOperationTagsTag, error) {
return []fastly.GetApiSecurityOperationTagsTag(tags.Tags), nil
}).([]fastly.GetApiSecurityOperationTagsTagOutput))
ctx.Export("apiSecurityOperationTagsTotal", tags.ApplyT(func(tags fastly.GetApiSecurityOperationTagsResult) (*int, error) {
return &tags.Total, nil
}).(pulumi.IntPtrOutput))
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",
},
},
});
// Optional: create a tag so the data source returns a predictable result
var example = new Fastly.Index.ApiSecurityOperationTag("example", new()
{
ServiceId = svc1.Id,
Name = "example-tag",
Description = "Example tag",
});
var tags = Fastly.Index.GetApiSecurityOperationTags.Invoke(new()
{
ServiceId = svc1.Id,
});
return new Dictionary<string, object?>
{
["apiSecurityOperationTags"] = tags.Apply(getApiSecurityOperationTagsResult => getApiSecurityOperationTagsResult.Tags),
["apiSecurityOperationTagsTotal"] = tags.Apply(getApiSecurityOperationTagsResult => getApiSecurityOperationTagsResult.Total),
};
});
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 com.pulumi.fastly.FastlyFunctions;
import com.pulumi.fastly.inputs.GetApiSecurityOperationTagsArgs;
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());
// Optional: create a tag so the data source returns a predictable result
var example = new ApiSecurityOperationTag("example", ApiSecurityOperationTagArgs.builder()
.serviceId(svc1.id())
.name("example-tag")
.description("Example tag")
.build());
final var tags = FastlyFunctions.getApiSecurityOperationTags(GetApiSecurityOperationTagsArgs.builder()
.serviceId(svc1.id())
.build());
ctx.export("apiSecurityOperationTags", tags.applyValue(_tags -> _tags.tags()));
ctx.export("apiSecurityOperationTagsTotal", tags.applyValue(_tags -> _tags.total()));
}
}
resources:
svc1:
type: fastly:ServiceVcl
properties:
name: test-svc-1-example
forceDestroy: true
backends:
- address: example.com
name: tf-test-backend-1
# Optional: create a tag so the data source returns a predictable result
example:
type: fastly:ApiSecurityOperationTag
properties:
serviceId: ${svc1.id}
name: example-tag
description: Example tag
variables:
tags:
fn::invoke:
function: fastly:getApiSecurityOperationTags
arguments:
serviceId: ${svc1.id}
outputs:
apiSecurityOperationTags: ${tags.tags}
apiSecurityOperationTagsTotal: ${tags.total}
Using getApiSecurityOperationTags
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getApiSecurityOperationTags(args: GetApiSecurityOperationTagsArgs, opts?: InvokeOptions): Promise<GetApiSecurityOperationTagsResult>
function getApiSecurityOperationTagsOutput(args: GetApiSecurityOperationTagsOutputArgs, opts?: InvokeOptions): Output<GetApiSecurityOperationTagsResult>def get_api_security_operation_tags(service_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetApiSecurityOperationTagsResult
def get_api_security_operation_tags_output(service_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetApiSecurityOperationTagsResult]func GetApiSecurityOperationTags(ctx *Context, args *GetApiSecurityOperationTagsArgs, opts ...InvokeOption) (*GetApiSecurityOperationTagsResult, error)
func GetApiSecurityOperationTagsOutput(ctx *Context, args *GetApiSecurityOperationTagsOutputArgs, opts ...InvokeOption) GetApiSecurityOperationTagsResultOutput> Note: This function is named GetApiSecurityOperationTags in the Go SDK.
public static class GetApiSecurityOperationTags
{
public static Task<GetApiSecurityOperationTagsResult> InvokeAsync(GetApiSecurityOperationTagsArgs args, InvokeOptions? opts = null)
public static Output<GetApiSecurityOperationTagsResult> Invoke(GetApiSecurityOperationTagsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetApiSecurityOperationTagsResult> getApiSecurityOperationTags(GetApiSecurityOperationTagsArgs args, InvokeOptions options)
public static Output<GetApiSecurityOperationTagsResult> getApiSecurityOperationTags(GetApiSecurityOperationTagsArgs args, InvokeOptions options)
fn::invoke:
function: fastly:index/getApiSecurityOperationTags:getApiSecurityOperationTags
arguments:
# arguments dictionaryThe following arguments are supported:
- Service
Id string - Service ID.
- Service
Id string - Service ID.
- service
Id String - Service ID.
- service
Id string - Service ID.
- service_
id str - Service ID.
- service
Id String - Service ID.
getApiSecurityOperationTags Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Service
Id string - Service ID.
-
List<Get
Api Security Operation Tags Tag> - Operation tags.
- Total int
- Total number of matching results, as returned by the API.
- Id string
- The provider-assigned unique ID for this managed resource.
- Service
Id string - Service ID.
-
[]Get
Api Security Operation Tags Tag - Operation tags.
- Total int
- Total number of matching results, as returned by the API.
- id String
- The provider-assigned unique ID for this managed resource.
- service
Id String - Service ID.
-
List<Get
Api Security Operation Tags Tag> - Operation tags.
- total Integer
- Total number of matching results, as returned by the API.
- id string
- The provider-assigned unique ID for this managed resource.
- service
Id string - Service ID.
-
Get
Api Security Operation Tags Tag[] - Operation tags.
- total number
- Total number of matching results, as returned by the API.
- id str
- The provider-assigned unique ID for this managed resource.
- service_
id str - Service ID.
-
Sequence[Get
Api Security Operation Tags Tag] - Operation tags.
- total int
- Total number of matching results, as returned by the API.
- id String
- The provider-assigned unique ID for this managed resource.
- service
Id String - Service ID.
- List<Property Map>
- Operation tags.
- total Number
- Total number of matching results, as returned by the API.
Supporting Types
GetApiSecurityOperationTagsTag
- Created
At string - Created timestamp (when present).
- Description string
- Tag description (when present).
- Id string
- Tag ID.
- Name string
- Tag name.
- Operation
Count int - Number of operations associated with this tag (when present).
- Updated
At string - Updated timestamp (when present).
- Created
At string - Created timestamp (when present).
- Description string
- Tag description (when present).
- Id string
- Tag ID.
- Name string
- Tag name.
- Operation
Count int - Number of operations associated with this tag (when present).
- Updated
At string - Updated timestamp (when present).
- created
At String - Created timestamp (when present).
- description String
- Tag description (when present).
- id String
- Tag ID.
- name String
- Tag name.
- operation
Count Integer - Number of operations associated with this tag (when present).
- updated
At String - Updated timestamp (when present).
- created
At string - Created timestamp (when present).
- description string
- Tag description (when present).
- id string
- Tag ID.
- name string
- Tag name.
- operation
Count number - Number of operations associated with this tag (when present).
- updated
At string - Updated timestamp (when present).
- created_
at str - Created timestamp (when present).
- description str
- Tag description (when present).
- id str
- Tag ID.
- name str
- Tag name.
- operation_
count int - Number of operations associated with this tag (when present).
- updated_
at str - Updated timestamp (when present).
- created
At String - Created timestamp (when present).
- description String
- Tag description (when present).
- id String
- Tag ID.
- name String
- Tag name.
- operation
Count Number - Number of operations associated with this tag (when present).
- updated
At String - Updated timestamp (when present).
Package Details
- Repository
- Fastly pulumi/pulumi-fastly
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
fastlyTerraform Provider.
Viewing docs for Fastly v12.0.0
published on Monday, Apr 20, 2026 by Pulumi
published on Monday, Apr 20, 2026 by Pulumi
