1. Packages
  2. Packages
  3. Cloudflare Provider
  4. API Docs
  5. getAccountApiTokenPermissionGroups
Viewing docs for Cloudflare v6.15.0
published on Saturday, May 2, 2026 by Pulumi
cloudflare logo
Viewing docs for Cloudflare v6.15.0
published on Saturday, May 2, 2026 by Pulumi

    Accepted Permissions

    • Account API Tokens Read
    • Account API Tokens Write

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const exampleAccountApiTokenPermissionGroups = cloudflare.getAccountApiTokenPermissionGroups({
        accountId: "023e105f4ecef8ad9ca31a8372d0c353",
        name: "Account%20Settings%20Write",
        scope: "com.cloudflare.api.account.zone",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_account_api_token_permission_groups = cloudflare.get_account_api_token_permission_groups(account_id="023e105f4ecef8ad9ca31a8372d0c353",
        name="Account%20Settings%20Write",
        scope="com.cloudflare.api.account.zone")
    
    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.GetAccountApiTokenPermissionGroups(ctx, &cloudflare.GetAccountApiTokenPermissionGroupsArgs{
    			AccountId: pulumi.StringRef("023e105f4ecef8ad9ca31a8372d0c353"),
    			Name:      pulumi.StringRef("Account%20Settings%20Write"),
    			Scope:     pulumi.StringRef("com.cloudflare.api.account.zone"),
    		}, 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 exampleAccountApiTokenPermissionGroups = Cloudflare.Index.GetAccountApiTokenPermissionGroups.Invoke(new()
        {
            AccountId = "023e105f4ecef8ad9ca31a8372d0c353",
            Name = "Account%20Settings%20Write",
            Scope = "com.cloudflare.api.account.zone",
        });
    
    });
    
    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.GetAccountApiTokenPermissionGroupsArgs;
    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 exampleAccountApiTokenPermissionGroups = CloudflareFunctions.getAccountApiTokenPermissionGroups(GetAccountApiTokenPermissionGroupsArgs.builder()
                .accountId("023e105f4ecef8ad9ca31a8372d0c353")
                .name("Account%20Settings%20Write")
                .scope("com.cloudflare.api.account.zone")
                .build());
    
        }
    }
    
    variables:
      exampleAccountApiTokenPermissionGroups:
        fn::invoke:
          function: cloudflare:getAccountApiTokenPermissionGroups
          arguments:
            accountId: 023e105f4ecef8ad9ca31a8372d0c353
            name: Account%20Settings%20Write
            scope: com.cloudflare.api.account.zone
    

    Using getAccountApiTokenPermissionGroups

    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 getAccountApiTokenPermissionGroups(args: GetAccountApiTokenPermissionGroupsArgs, opts?: InvokeOptions): Promise<GetAccountApiTokenPermissionGroupsResult>
    function getAccountApiTokenPermissionGroupsOutput(args: GetAccountApiTokenPermissionGroupsOutputArgs, opts?: InvokeOptions): Output<GetAccountApiTokenPermissionGroupsResult>
    def get_account_api_token_permission_groups(account_id: Optional[str] = None,
                                                name: Optional[str] = None,
                                                scope: Optional[str] = None,
                                                opts: Optional[InvokeOptions] = None) -> GetAccountApiTokenPermissionGroupsResult
    def get_account_api_token_permission_groups_output(account_id: pulumi.Input[Optional[str]] = None,
                                                name: pulumi.Input[Optional[str]] = None,
                                                scope: pulumi.Input[Optional[str]] = None,
                                                opts: Optional[InvokeOptions] = None) -> Output[GetAccountApiTokenPermissionGroupsResult]
    func GetAccountApiTokenPermissionGroups(ctx *Context, args *GetAccountApiTokenPermissionGroupsArgs, opts ...InvokeOption) (*GetAccountApiTokenPermissionGroupsResult, error)
    func GetAccountApiTokenPermissionGroupsOutput(ctx *Context, args *GetAccountApiTokenPermissionGroupsOutputArgs, opts ...InvokeOption) GetAccountApiTokenPermissionGroupsResultOutput

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

    public static class GetAccountApiTokenPermissionGroups 
    {
        public static Task<GetAccountApiTokenPermissionGroupsResult> InvokeAsync(GetAccountApiTokenPermissionGroupsArgs args, InvokeOptions? opts = null)
        public static Output<GetAccountApiTokenPermissionGroupsResult> Invoke(GetAccountApiTokenPermissionGroupsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAccountApiTokenPermissionGroupsResult> getAccountApiTokenPermissionGroups(GetAccountApiTokenPermissionGroupsArgs args, InvokeOptions options)
    public static Output<GetAccountApiTokenPermissionGroupsResult> getAccountApiTokenPermissionGroups(GetAccountApiTokenPermissionGroupsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: cloudflare:index/getAccountApiTokenPermissionGroups:getAccountApiTokenPermissionGroups
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AccountId string
    Account identifier tag.
    Name string
    Filter by the name of the permission group. The value must be URL-encoded.
    Scope string
    Filter by the scope of the permission group. The value must be URL-encoded.
    AccountId string
    Account identifier tag.
    Name string
    Filter by the name of the permission group. The value must be URL-encoded.
    Scope string
    Filter by the scope of the permission group. The value must be URL-encoded.
    accountId String
    Account identifier tag.
    name String
    Filter by the name of the permission group. The value must be URL-encoded.
    scope String
    Filter by the scope of the permission group. The value must be URL-encoded.
    accountId string
    Account identifier tag.
    name string
    Filter by the name of the permission group. The value must be URL-encoded.
    scope string
    Filter by the scope of the permission group. The value must be URL-encoded.
    account_id str
    Account identifier tag.
    name str
    Filter by the name of the permission group. The value must be URL-encoded.
    scope str
    Filter by the scope of the permission group. The value must be URL-encoded.
    accountId String
    Account identifier tag.
    name String
    Filter by the name of the permission group. The value must be URL-encoded.
    scope String
    Filter by the scope of the permission group. The value must be URL-encoded.

    getAccountApiTokenPermissionGroups Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    PermissionGroups List<GetAccountApiTokenPermissionGroupsPermissionGroup>
    AccountId string
    Account identifier tag.
    Name string
    Filter by the name of the permission group. The value must be URL-encoded.
    Scope string
    Filter by the scope of the permission group. The value must be URL-encoded.
    Id string
    The provider-assigned unique ID for this managed resource.
    PermissionGroups []GetAccountApiTokenPermissionGroupsPermissionGroup
    AccountId string
    Account identifier tag.
    Name string
    Filter by the name of the permission group. The value must be URL-encoded.
    Scope string
    Filter by the scope of the permission group. The value must be URL-encoded.
    id String
    The provider-assigned unique ID for this managed resource.
    permissionGroups List<GetAccountApiTokenPermissionGroupsPermissionGroup>
    accountId String
    Account identifier tag.
    name String
    Filter by the name of the permission group. The value must be URL-encoded.
    scope String
    Filter by the scope of the permission group. The value must be URL-encoded.
    id string
    The provider-assigned unique ID for this managed resource.
    permissionGroups GetAccountApiTokenPermissionGroupsPermissionGroup[]
    accountId string
    Account identifier tag.
    name string
    Filter by the name of the permission group. The value must be URL-encoded.
    scope string
    Filter by the scope of the permission group. The value must be URL-encoded.
    id str
    The provider-assigned unique ID for this managed resource.
    permission_groups Sequence[GetAccountApiTokenPermissionGroupsPermissionGroup]
    account_id str
    Account identifier tag.
    name str
    Filter by the name of the permission group. The value must be URL-encoded.
    scope str
    Filter by the scope of the permission group. The value must be URL-encoded.
    id String
    The provider-assigned unique ID for this managed resource.
    permissionGroups List<Property Map>
    accountId String
    Account identifier tag.
    name String
    Filter by the name of the permission group. The value must be URL-encoded.
    scope String
    Filter by the scope of the permission group. The value must be URL-encoded.

    Supporting Types

    GetAccountApiTokenPermissionGroupsPermissionGroup

    Id string
    Public ID.
    Name string
    Permission Group Name
    Scopes List<string>
    Resources to which the Permission Group is scoped
    Id string
    Public ID.
    Name string
    Permission Group Name
    Scopes []string
    Resources to which the Permission Group is scoped
    id String
    Public ID.
    name String
    Permission Group Name
    scopes List<String>
    Resources to which the Permission Group is scoped
    id string
    Public ID.
    name string
    Permission Group Name
    scopes string[]
    Resources to which the Permission Group is scoped
    id str
    Public ID.
    name str
    Permission Group Name
    scopes Sequence[str]
    Resources to which the Permission Group is scoped
    id String
    Public ID.
    name String
    Permission Group Name
    scopes List<String>
    Resources to which the Permission Group is scoped

    Package Details

    Repository
    Cloudflare pulumi/pulumi-cloudflare
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudflare Terraform Provider.
    cloudflare logo
    Viewing docs for Cloudflare v6.15.0
    published on Saturday, May 2, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.