1. Packages
  2. Packages
  3. Cloudflare Provider
  4. API Docs
  5. getUserGroup
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 Settings Read
    • Account Settings Write
    • SCIM Provisioning

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const exampleUserGroup = cloudflare.getUserGroup({
        accountId: "023e105f4ecef8ad9ca31a8372d0c353",
        userGroupId: "023e105f4ecef8ad9ca31a8372d0c353",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_user_group = cloudflare.get_user_group(account_id="023e105f4ecef8ad9ca31a8372d0c353",
        user_group_id="023e105f4ecef8ad9ca31a8372d0c353")
    
    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.GetUserGroup(ctx, &cloudflare.LookupUserGroupArgs{
    			AccountId:   "023e105f4ecef8ad9ca31a8372d0c353",
    			UserGroupId: pulumi.StringRef("023e105f4ecef8ad9ca31a8372d0c353"),
    		}, 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 exampleUserGroup = Cloudflare.Index.GetUserGroup.Invoke(new()
        {
            AccountId = "023e105f4ecef8ad9ca31a8372d0c353",
            UserGroupId = "023e105f4ecef8ad9ca31a8372d0c353",
        });
    
    });
    
    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.GetUserGroupArgs;
    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 exampleUserGroup = CloudflareFunctions.getUserGroup(GetUserGroupArgs.builder()
                .accountId("023e105f4ecef8ad9ca31a8372d0c353")
                .userGroupId("023e105f4ecef8ad9ca31a8372d0c353")
                .build());
    
        }
    }
    
    variables:
      exampleUserGroup:
        fn::invoke:
          function: cloudflare:getUserGroup
          arguments:
            accountId: 023e105f4ecef8ad9ca31a8372d0c353
            userGroupId: 023e105f4ecef8ad9ca31a8372d0c353
    

    Using getUserGroup

    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 getUserGroup(args: GetUserGroupArgs, opts?: InvokeOptions): Promise<GetUserGroupResult>
    function getUserGroupOutput(args: GetUserGroupOutputArgs, opts?: InvokeOptions): Output<GetUserGroupResult>
    def get_user_group(account_id: Optional[str] = None,
                       filter: Optional[GetUserGroupFilter] = None,
                       user_group_id: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetUserGroupResult
    def get_user_group_output(account_id: Optional[pulumi.Input[str]] = None,
                       filter: Optional[pulumi.Input[GetUserGroupFilterArgs]] = None,
                       user_group_id: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetUserGroupResult]
    func LookupUserGroup(ctx *Context, args *LookupUserGroupArgs, opts ...InvokeOption) (*LookupUserGroupResult, error)
    func LookupUserGroupOutput(ctx *Context, args *LookupUserGroupOutputArgs, opts ...InvokeOption) LookupUserGroupResultOutput

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

    public static class GetUserGroup 
    {
        public static Task<GetUserGroupResult> InvokeAsync(GetUserGroupArgs args, InvokeOptions? opts = null)
        public static Output<GetUserGroupResult> Invoke(GetUserGroupInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetUserGroupResult> getUserGroup(GetUserGroupArgs args, InvokeOptions options)
    public static Output<GetUserGroupResult> getUserGroup(GetUserGroupArgs args, InvokeOptions options)
    
    fn::invoke:
      function: cloudflare:index/getUserGroup:getUserGroup
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AccountId string
    Account identifier tag.
    Filter GetUserGroupFilter
    UserGroupId string
    User Group identifier tag.
    AccountId string
    Account identifier tag.
    Filter GetUserGroupFilter
    UserGroupId string
    User Group identifier tag.
    accountId String
    Account identifier tag.
    filter GetUserGroupFilter
    userGroupId String
    User Group identifier tag.
    accountId string
    Account identifier tag.
    filter GetUserGroupFilter
    userGroupId string
    User Group identifier tag.
    account_id str
    Account identifier tag.
    filter GetUserGroupFilter
    user_group_id str
    User Group identifier tag.
    accountId String
    Account identifier tag.
    filter Property Map
    userGroupId String
    User Group identifier tag.

    getUserGroup Result

    The following output properties are available:

    AccountId string
    Account identifier tag.
    CreatedOn string
    Timestamp for the creation of the user group
    Id string
    User Group identifier tag.
    ModifiedOn string
    Last time the user group was modified.
    Name string
    Name of the user group.
    Policies List<GetUserGroupPolicy>
    Policies attached to the User group
    Filter GetUserGroupFilter
    UserGroupId string
    User Group identifier tag.
    AccountId string
    Account identifier tag.
    CreatedOn string
    Timestamp for the creation of the user group
    Id string
    User Group identifier tag.
    ModifiedOn string
    Last time the user group was modified.
    Name string
    Name of the user group.
    Policies []GetUserGroupPolicy
    Policies attached to the User group
    Filter GetUserGroupFilter
    UserGroupId string
    User Group identifier tag.
    accountId String
    Account identifier tag.
    createdOn String
    Timestamp for the creation of the user group
    id String
    User Group identifier tag.
    modifiedOn String
    Last time the user group was modified.
    name String
    Name of the user group.
    policies List<GetUserGroupPolicy>
    Policies attached to the User group
    filter GetUserGroupFilter
    userGroupId String
    User Group identifier tag.
    accountId string
    Account identifier tag.
    createdOn string
    Timestamp for the creation of the user group
    id string
    User Group identifier tag.
    modifiedOn string
    Last time the user group was modified.
    name string
    Name of the user group.
    policies GetUserGroupPolicy[]
    Policies attached to the User group
    filter GetUserGroupFilter
    userGroupId string
    User Group identifier tag.
    account_id str
    Account identifier tag.
    created_on str
    Timestamp for the creation of the user group
    id str
    User Group identifier tag.
    modified_on str
    Last time the user group was modified.
    name str
    Name of the user group.
    policies Sequence[GetUserGroupPolicy]
    Policies attached to the User group
    filter GetUserGroupFilter
    user_group_id str
    User Group identifier tag.
    accountId String
    Account identifier tag.
    createdOn String
    Timestamp for the creation of the user group
    id String
    User Group identifier tag.
    modifiedOn String
    Last time the user group was modified.
    name String
    Name of the user group.
    policies List<Property Map>
    Policies attached to the User group
    filter Property Map
    userGroupId String
    User Group identifier tag.

    Supporting Types

    GetUserGroupFilter

    Direction string
    The sort order of returned user groups by name (ascending or descending). Available values: "asc", "desc".
    FuzzyName string
    A string used for searching for user groups containing that substring.
    Id string
    ID of the user group to be fetched.
    Name string
    Name of the user group to be fetched.
    Direction string
    The sort order of returned user groups by name (ascending or descending). Available values: "asc", "desc".
    FuzzyName string
    A string used for searching for user groups containing that substring.
    Id string
    ID of the user group to be fetched.
    Name string
    Name of the user group to be fetched.
    direction String
    The sort order of returned user groups by name (ascending or descending). Available values: "asc", "desc".
    fuzzyName String
    A string used for searching for user groups containing that substring.
    id String
    ID of the user group to be fetched.
    name String
    Name of the user group to be fetched.
    direction string
    The sort order of returned user groups by name (ascending or descending). Available values: "asc", "desc".
    fuzzyName string
    A string used for searching for user groups containing that substring.
    id string
    ID of the user group to be fetched.
    name string
    Name of the user group to be fetched.
    direction str
    The sort order of returned user groups by name (ascending or descending). Available values: "asc", "desc".
    fuzzy_name str
    A string used for searching for user groups containing that substring.
    id str
    ID of the user group to be fetched.
    name str
    Name of the user group to be fetched.
    direction String
    The sort order of returned user groups by name (ascending or descending). Available values: "asc", "desc".
    fuzzyName String
    A string used for searching for user groups containing that substring.
    id String
    ID of the user group to be fetched.
    name String
    Name of the user group to be fetched.

    GetUserGroupPolicy

    Access string
    Allow or deny operations against the resources. Available values: "allow", "deny".
    Id string
    Policy identifier.
    PermissionGroups List<GetUserGroupPolicyPermissionGroup>
    A set of permission groups that are specified to the policy.
    ResourceGroups List<GetUserGroupPolicyResourceGroup>
    A list of resource groups that the policy applies to.
    Access string
    Allow or deny operations against the resources. Available values: "allow", "deny".
    Id string
    Policy identifier.
    PermissionGroups []GetUserGroupPolicyPermissionGroup
    A set of permission groups that are specified to the policy.
    ResourceGroups []GetUserGroupPolicyResourceGroup
    A list of resource groups that the policy applies to.
    access String
    Allow or deny operations against the resources. Available values: "allow", "deny".
    id String
    Policy identifier.
    permissionGroups List<GetUserGroupPolicyPermissionGroup>
    A set of permission groups that are specified to the policy.
    resourceGroups List<GetUserGroupPolicyResourceGroup>
    A list of resource groups that the policy applies to.
    access string
    Allow or deny operations against the resources. Available values: "allow", "deny".
    id string
    Policy identifier.
    permissionGroups GetUserGroupPolicyPermissionGroup[]
    A set of permission groups that are specified to the policy.
    resourceGroups GetUserGroupPolicyResourceGroup[]
    A list of resource groups that the policy applies to.
    access str
    Allow or deny operations against the resources. Available values: "allow", "deny".
    id str
    Policy identifier.
    permission_groups Sequence[GetUserGroupPolicyPermissionGroup]
    A set of permission groups that are specified to the policy.
    resource_groups Sequence[GetUserGroupPolicyResourceGroup]
    A list of resource groups that the policy applies to.
    access String
    Allow or deny operations against the resources. Available values: "allow", "deny".
    id String
    Policy identifier.
    permissionGroups List<Property Map>
    A set of permission groups that are specified to the policy.
    resourceGroups List<Property Map>
    A list of resource groups that the policy applies to.

    GetUserGroupPolicyPermissionGroup

    Id string
    Identifier of the permission group.
    Meta GetUserGroupPolicyPermissionGroupMeta
    Attributes associated to the permission group.
    Name string
    Name of the permission group.
    Id string
    Identifier of the permission group.
    Meta GetUserGroupPolicyPermissionGroupMeta
    Attributes associated to the permission group.
    Name string
    Name of the permission group.
    id String
    Identifier of the permission group.
    meta GetUserGroupPolicyPermissionGroupMeta
    Attributes associated to the permission group.
    name String
    Name of the permission group.
    id string
    Identifier of the permission group.
    meta GetUserGroupPolicyPermissionGroupMeta
    Attributes associated to the permission group.
    name string
    Name of the permission group.
    id str
    Identifier of the permission group.
    meta GetUserGroupPolicyPermissionGroupMeta
    Attributes associated to the permission group.
    name str
    Name of the permission group.
    id String
    Identifier of the permission group.
    meta Property Map
    Attributes associated to the permission group.
    name String
    Name of the permission group.

    GetUserGroupPolicyPermissionGroupMeta

    Key string
    Value string
    Key string
    Value string
    key String
    value String
    key string
    value string
    key str
    value str
    key String
    value String

    GetUserGroupPolicyResourceGroup

    Id string
    Identifier of the resource group.
    Meta GetUserGroupPolicyResourceGroupMeta
    Attributes associated to the resource group.
    Name string
    Name of the resource group.
    Scopes List<GetUserGroupPolicyResourceGroupScope>
    The scope associated to the resource group
    Id string
    Identifier of the resource group.
    Meta GetUserGroupPolicyResourceGroupMeta
    Attributes associated to the resource group.
    Name string
    Name of the resource group.
    Scopes []GetUserGroupPolicyResourceGroupScope
    The scope associated to the resource group
    id String
    Identifier of the resource group.
    meta GetUserGroupPolicyResourceGroupMeta
    Attributes associated to the resource group.
    name String
    Name of the resource group.
    scopes List<GetUserGroupPolicyResourceGroupScope>
    The scope associated to the resource group
    id string
    Identifier of the resource group.
    meta GetUserGroupPolicyResourceGroupMeta
    Attributes associated to the resource group.
    name string
    Name of the resource group.
    scopes GetUserGroupPolicyResourceGroupScope[]
    The scope associated to the resource group
    id str
    Identifier of the resource group.
    meta GetUserGroupPolicyResourceGroupMeta
    Attributes associated to the resource group.
    name str
    Name of the resource group.
    scopes Sequence[GetUserGroupPolicyResourceGroupScope]
    The scope associated to the resource group
    id String
    Identifier of the resource group.
    meta Property Map
    Attributes associated to the resource group.
    name String
    Name of the resource group.
    scopes List<Property Map>
    The scope associated to the resource group

    GetUserGroupPolicyResourceGroupMeta

    Key string
    Value string
    Key string
    Value string
    key String
    value String
    key string
    value string
    key str
    value str
    key String
    value String

    GetUserGroupPolicyResourceGroupScope

    Key string
    This is a combination of pre-defined resource name and identifier (like Account ID etc.)
    Objects List<GetUserGroupPolicyResourceGroupScopeObject>
    A list of scope objects for additional context.
    Key string
    This is a combination of pre-defined resource name and identifier (like Account ID etc.)
    Objects []GetUserGroupPolicyResourceGroupScopeObject
    A list of scope objects for additional context.
    key String
    This is a combination of pre-defined resource name and identifier (like Account ID etc.)
    objects List<GetUserGroupPolicyResourceGroupScopeObject>
    A list of scope objects for additional context.
    key string
    This is a combination of pre-defined resource name and identifier (like Account ID etc.)
    objects GetUserGroupPolicyResourceGroupScopeObject[]
    A list of scope objects for additional context.
    key str
    This is a combination of pre-defined resource name and identifier (like Account ID etc.)
    objects Sequence[GetUserGroupPolicyResourceGroupScopeObject]
    A list of scope objects for additional context.
    key String
    This is a combination of pre-defined resource name and identifier (like Account ID etc.)
    objects List<Property Map>
    A list of scope objects for additional context.

    GetUserGroupPolicyResourceGroupScopeObject

    Key string
    This is a combination of pre-defined resource name and identifier (like Zone ID etc.)
    Key string
    This is a combination of pre-defined resource name and identifier (like Zone ID etc.)
    key String
    This is a combination of pre-defined resource name and identifier (like Zone ID etc.)
    key string
    This is a combination of pre-defined resource name and identifier (like Zone ID etc.)
    key str
    This is a combination of pre-defined resource name and identifier (like Zone ID etc.)
    key String
    This is a combination of pre-defined resource name and identifier (like Zone ID etc.)

    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.