1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. getZeroTrustAccessServiceTokens
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

cloudflare.getZeroTrustAccessServiceTokens

Explore with Pulumi AI

cloudflare logo
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const exampleZeroTrustAccessServiceTokens = cloudflare.getZeroTrustAccessServiceTokens({
        accountId: "account_id",
        zoneId: "zone_id",
        name: "name",
        search: "search",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_zero_trust_access_service_tokens = cloudflare.get_zero_trust_access_service_tokens(account_id="account_id",
        zone_id="zone_id",
        name="name",
        search="search")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudflare/sdk/v6/go/cloudflare"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudflare.LookupZeroTrustAccessServiceTokens(ctx, &cloudflare.LookupZeroTrustAccessServiceTokensArgs{
    			AccountId: pulumi.StringRef("account_id"),
    			ZoneId:    pulumi.StringRef("zone_id"),
    			Name:      pulumi.StringRef("name"),
    			Search:    pulumi.StringRef("search"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cloudflare = Pulumi.Cloudflare;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleZeroTrustAccessServiceTokens = Cloudflare.GetZeroTrustAccessServiceTokens.Invoke(new()
        {
            AccountId = "account_id",
            ZoneId = "zone_id",
            Name = "name",
            Search = "search",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.CloudflareFunctions;
    import com.pulumi.cloudflare.inputs.GetZeroTrustAccessServiceTokensArgs;
    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) {
            final var exampleZeroTrustAccessServiceTokens = CloudflareFunctions.getZeroTrustAccessServiceTokens(GetZeroTrustAccessServiceTokensArgs.builder()
                .accountId("account_id")
                .zoneId("zone_id")
                .name("name")
                .search("search")
                .build());
    
        }
    }
    
    variables:
      exampleZeroTrustAccessServiceTokens:
        fn::invoke:
          function: cloudflare:getZeroTrustAccessServiceTokens
          arguments:
            accountId: account_id
            zoneId: zone_id
            name: name
            search: search
    

    Using getZeroTrustAccessServiceTokens

    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 getZeroTrustAccessServiceTokens(args: GetZeroTrustAccessServiceTokensArgs, opts?: InvokeOptions): Promise<GetZeroTrustAccessServiceTokensResult>
    function getZeroTrustAccessServiceTokensOutput(args: GetZeroTrustAccessServiceTokensOutputArgs, opts?: InvokeOptions): Output<GetZeroTrustAccessServiceTokensResult>
    def get_zero_trust_access_service_tokens(account_id: Optional[str] = None,
                                             max_items: Optional[int] = None,
                                             name: Optional[str] = None,
                                             search: Optional[str] = None,
                                             zone_id: Optional[str] = None,
                                             opts: Optional[InvokeOptions] = None) -> GetZeroTrustAccessServiceTokensResult
    def get_zero_trust_access_service_tokens_output(account_id: Optional[pulumi.Input[str]] = None,
                                             max_items: Optional[pulumi.Input[int]] = None,
                                             name: Optional[pulumi.Input[str]] = None,
                                             search: Optional[pulumi.Input[str]] = None,
                                             zone_id: Optional[pulumi.Input[str]] = None,
                                             opts: Optional[InvokeOptions] = None) -> Output[GetZeroTrustAccessServiceTokensResult]
    func LookupZeroTrustAccessServiceTokens(ctx *Context, args *LookupZeroTrustAccessServiceTokensArgs, opts ...InvokeOption) (*LookupZeroTrustAccessServiceTokensResult, error)
    func LookupZeroTrustAccessServiceTokensOutput(ctx *Context, args *LookupZeroTrustAccessServiceTokensOutputArgs, opts ...InvokeOption) LookupZeroTrustAccessServiceTokensResultOutput

    > Note: This function is named LookupZeroTrustAccessServiceTokens in the Go SDK.

    public static class GetZeroTrustAccessServiceTokens 
    {
        public static Task<GetZeroTrustAccessServiceTokensResult> InvokeAsync(GetZeroTrustAccessServiceTokensArgs args, InvokeOptions? opts = null)
        public static Output<GetZeroTrustAccessServiceTokensResult> Invoke(GetZeroTrustAccessServiceTokensInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetZeroTrustAccessServiceTokensResult> getZeroTrustAccessServiceTokens(GetZeroTrustAccessServiceTokensArgs args, InvokeOptions options)
    public static Output<GetZeroTrustAccessServiceTokensResult> getZeroTrustAccessServiceTokens(GetZeroTrustAccessServiceTokensArgs args, InvokeOptions options)
    
    fn::invoke:
      function: cloudflare:index/getZeroTrustAccessServiceTokens:getZeroTrustAccessServiceTokens
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AccountId string
    The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
    MaxItems int
    Max items to fetch, default: 1000
    Name string
    The name of the service token.
    Search string
    Search for service tokens by other listed query parameters.
    ZoneId string
    The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
    AccountId string
    The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
    MaxItems int
    Max items to fetch, default: 1000
    Name string
    The name of the service token.
    Search string
    Search for service tokens by other listed query parameters.
    ZoneId string
    The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
    accountId String
    The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
    maxItems Integer
    Max items to fetch, default: 1000
    name String
    The name of the service token.
    search String
    Search for service tokens by other listed query parameters.
    zoneId String
    The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
    accountId string
    The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
    maxItems number
    Max items to fetch, default: 1000
    name string
    The name of the service token.
    search string
    Search for service tokens by other listed query parameters.
    zoneId string
    The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
    account_id str
    The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
    max_items int
    Max items to fetch, default: 1000
    name str
    The name of the service token.
    search str
    Search for service tokens by other listed query parameters.
    zone_id str
    The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
    accountId String
    The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
    maxItems Number
    Max items to fetch, default: 1000
    name String
    The name of the service token.
    search String
    Search for service tokens by other listed query parameters.
    zoneId String
    The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.

    getZeroTrustAccessServiceTokens Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Results List<GetZeroTrustAccessServiceTokensResult>
    The items returned by the data source
    AccountId string
    The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
    MaxItems int
    Max items to fetch, default: 1000
    Name string
    The name of the service token.
    Search string
    Search for service tokens by other listed query parameters.
    ZoneId string
    The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
    Id string
    The provider-assigned unique ID for this managed resource.
    Results []GetZeroTrustAccessServiceTokensResult
    The items returned by the data source
    AccountId string
    The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
    MaxItems int
    Max items to fetch, default: 1000
    Name string
    The name of the service token.
    Search string
    Search for service tokens by other listed query parameters.
    ZoneId string
    The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
    id String
    The provider-assigned unique ID for this managed resource.
    results List<GetZeroTrustAccessServiceTokensResult>
    The items returned by the data source
    accountId String
    The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
    maxItems Integer
    Max items to fetch, default: 1000
    name String
    The name of the service token.
    search String
    Search for service tokens by other listed query parameters.
    zoneId String
    The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
    id string
    The provider-assigned unique ID for this managed resource.
    results GetZeroTrustAccessServiceTokensResult[]
    The items returned by the data source
    accountId string
    The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
    maxItems number
    Max items to fetch, default: 1000
    name string
    The name of the service token.
    search string
    Search for service tokens by other listed query parameters.
    zoneId string
    The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
    id str
    The provider-assigned unique ID for this managed resource.
    results Sequence[GetZeroTrustAccessServiceTokensResult]
    The items returned by the data source
    account_id str
    The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
    max_items int
    Max items to fetch, default: 1000
    name str
    The name of the service token.
    search str
    Search for service tokens by other listed query parameters.
    zone_id str
    The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
    id String
    The provider-assigned unique ID for this managed resource.
    results List<Property Map>
    The items returned by the data source
    accountId String
    The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
    maxItems Number
    Max items to fetch, default: 1000
    name String
    The name of the service token.
    search String
    Search for service tokens by other listed query parameters.
    zoneId String
    The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.

    Supporting Types

    GetZeroTrustAccessServiceTokensResult

    ClientId string
    The Client ID for the service token. Access will check for this value in the CF-Access-Client-ID request header.
    CreatedAt string
    Duration string
    The duration for how long the service token will be valid. Must be in the format 300ms or 2h45m. Valid time units are: ns, us (or µs), ms, s, m, h. The default is 1 year in hours (8760h).
    ExpiresAt string
    Id string
    The ID of the service token.
    LastSeenAt string
    Name string
    The name of the service token.
    UpdatedAt string
    ClientId string
    The Client ID for the service token. Access will check for this value in the CF-Access-Client-ID request header.
    CreatedAt string
    Duration string
    The duration for how long the service token will be valid. Must be in the format 300ms or 2h45m. Valid time units are: ns, us (or µs), ms, s, m, h. The default is 1 year in hours (8760h).
    ExpiresAt string
    Id string
    The ID of the service token.
    LastSeenAt string
    Name string
    The name of the service token.
    UpdatedAt string
    clientId String
    The Client ID for the service token. Access will check for this value in the CF-Access-Client-ID request header.
    createdAt String
    duration String
    The duration for how long the service token will be valid. Must be in the format 300ms or 2h45m. Valid time units are: ns, us (or µs), ms, s, m, h. The default is 1 year in hours (8760h).
    expiresAt String
    id String
    The ID of the service token.
    lastSeenAt String
    name String
    The name of the service token.
    updatedAt String
    clientId string
    The Client ID for the service token. Access will check for this value in the CF-Access-Client-ID request header.
    createdAt string
    duration string
    The duration for how long the service token will be valid. Must be in the format 300ms or 2h45m. Valid time units are: ns, us (or µs), ms, s, m, h. The default is 1 year in hours (8760h).
    expiresAt string
    id string
    The ID of the service token.
    lastSeenAt string
    name string
    The name of the service token.
    updatedAt string
    client_id str
    The Client ID for the service token. Access will check for this value in the CF-Access-Client-ID request header.
    created_at str
    duration str
    The duration for how long the service token will be valid. Must be in the format 300ms or 2h45m. Valid time units are: ns, us (or µs), ms, s, m, h. The default is 1 year in hours (8760h).
    expires_at str
    id str
    The ID of the service token.
    last_seen_at str
    name str
    The name of the service token.
    updated_at str
    clientId String
    The Client ID for the service token. Access will check for this value in the CF-Access-Client-ID request header.
    createdAt String
    duration String
    The duration for how long the service token will be valid. Must be in the format 300ms or 2h45m. Valid time units are: ns, us (or µs), ms, s, m, h. The default is 1 year in hours (8760h).
    expiresAt String
    id String
    The ID of the service token.
    lastSeenAt String
    name String
    The name of the service token.
    updatedAt String

    Package Details

    Repository
    Cloudflare pulumi/pulumi-cloudflare
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudflare Terraform Provider.
    cloudflare logo
    Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi