1. Packages
  2. Volcengine
  3. API Docs
  4. nas
  5. getPermissionGroups
Volcengine v0.0.31 published on Monday, May 12, 2025 by Volcengine

volcengine.nas.getPermissionGroups

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.31 published on Monday, May 12, 2025 by Volcengine

    Use this data source to query detailed information of nas permission groups

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@pulumi/volcengine";
    import * as volcengine from "@volcengine/pulumi";
    
    const foo = new volcengine.nas.PermissionGroup("foo", {
        permissionGroupName: "acc-test",
        description: "acctest",
        permissionRules: [
            {
                cidrIp: "*",
                rwMode: "RW",
                useMode: "All_squash",
            },
            {
                cidrIp: "192.168.0.0",
                rwMode: "RO",
                useMode: "All_squash",
            },
        ],
    });
    const default = volcengine.nas.getPermissionGroupsOutput({
        filters: [{
            key: "PermissionGroupId",
            value: foo.id,
        }],
    });
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    foo = volcengine.nas.PermissionGroup("foo",
        permission_group_name="acc-test",
        description="acctest",
        permission_rules=[
            volcengine.nas.PermissionGroupPermissionRuleArgs(
                cidr_ip="*",
                rw_mode="RW",
                use_mode="All_squash",
            ),
            volcengine.nas.PermissionGroupPermissionRuleArgs(
                cidr_ip="192.168.0.0",
                rw_mode="RO",
                use_mode="All_squash",
            ),
        ])
    default = volcengine.nas.get_permission_groups_output(filters=[volcengine.nas.GetPermissionGroupsFilterArgs(
        key="PermissionGroupId",
        value=foo.id,
    )])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/nas"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		foo, err := nas.NewPermissionGroup(ctx, "foo", &nas.PermissionGroupArgs{
    			PermissionGroupName: pulumi.String("acc-test"),
    			Description:         pulumi.String("acctest"),
    			PermissionRules: nas.PermissionGroupPermissionRuleArray{
    				&nas.PermissionGroupPermissionRuleArgs{
    					CidrIp:  pulumi.String("*"),
    					RwMode:  pulumi.String("RW"),
    					UseMode: pulumi.String("All_squash"),
    				},
    				&nas.PermissionGroupPermissionRuleArgs{
    					CidrIp:  pulumi.String("192.168.0.0"),
    					RwMode:  pulumi.String("RO"),
    					UseMode: pulumi.String("All_squash"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_ = nas.GetPermissionGroupsOutput(ctx, nas.GetPermissionGroupsOutputArgs{
    			Filters: nas.GetPermissionGroupsFilterArray{
    				&nas.GetPermissionGroupsFilterArgs{
    					Key:   pulumi.String("PermissionGroupId"),
    					Value: foo.ID(),
    				},
    			},
    		}, nil)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = Pulumi.Volcengine;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = new Volcengine.Nas.PermissionGroup("foo", new()
        {
            PermissionGroupName = "acc-test",
            Description = "acctest",
            PermissionRules = new[]
            {
                new Volcengine.Nas.Inputs.PermissionGroupPermissionRuleArgs
                {
                    CidrIp = "*",
                    RwMode = "RW",
                    UseMode = "All_squash",
                },
                new Volcengine.Nas.Inputs.PermissionGroupPermissionRuleArgs
                {
                    CidrIp = "192.168.0.0",
                    RwMode = "RO",
                    UseMode = "All_squash",
                },
            },
        });
    
        var @default = Volcengine.Nas.GetPermissionGroups.Invoke(new()
        {
            Filters = new[]
            {
                new Volcengine.Nas.Inputs.GetPermissionGroupsFilterInputArgs
                {
                    Key = "PermissionGroupId",
                    Value = foo.Id,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.nas.PermissionGroup;
    import com.pulumi.volcengine.nas.PermissionGroupArgs;
    import com.pulumi.volcengine.nas.inputs.PermissionGroupPermissionRuleArgs;
    import com.pulumi.volcengine.nas.NasFunctions;
    import com.pulumi.volcengine.nas.inputs.GetPermissionGroupsArgs;
    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 foo = new PermissionGroup("foo", PermissionGroupArgs.builder()        
                .permissionGroupName("acc-test")
                .description("acctest")
                .permissionRules(            
                    PermissionGroupPermissionRuleArgs.builder()
                        .cidrIp("*")
                        .rwMode("RW")
                        .useMode("All_squash")
                        .build(),
                    PermissionGroupPermissionRuleArgs.builder()
                        .cidrIp("192.168.0.0")
                        .rwMode("RO")
                        .useMode("All_squash")
                        .build())
                .build());
    
            final var default = NasFunctions.getPermissionGroups(GetPermissionGroupsArgs.builder()
                .filters(GetPermissionGroupsFilterArgs.builder()
                    .key("PermissionGroupId")
                    .value(foo.id())
                    .build())
                .build());
    
        }
    }
    
    resources:
      foo:
        type: volcengine:nas:PermissionGroup
        properties:
          permissionGroupName: acc-test
          description: acctest
          permissionRules:
            - cidrIp: '*'
              rwMode: RW
              useMode: All_squash
            - cidrIp: 192.168.0.0
              rwMode: RO
              useMode: All_squash
    variables:
      default:
        fn::invoke:
          Function: volcengine:nas:getPermissionGroups
          Arguments:
            filters:
              - key: PermissionGroupId
                value: ${foo.id}
    

    Using getPermissionGroups

    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 getPermissionGroups(args: GetPermissionGroupsArgs, opts?: InvokeOptions): Promise<GetPermissionGroupsResult>
    function getPermissionGroupsOutput(args: GetPermissionGroupsOutputArgs, opts?: InvokeOptions): Output<GetPermissionGroupsResult>
    def get_permission_groups(filters: Optional[Sequence[GetPermissionGroupsFilter]] = None,
                              output_file: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetPermissionGroupsResult
    def get_permission_groups_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetPermissionGroupsFilterArgs]]]] = None,
                              output_file: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetPermissionGroupsResult]
    func GetPermissionGroups(ctx *Context, args *GetPermissionGroupsArgs, opts ...InvokeOption) (*GetPermissionGroupsResult, error)
    func GetPermissionGroupsOutput(ctx *Context, args *GetPermissionGroupsOutputArgs, opts ...InvokeOption) GetPermissionGroupsResultOutput

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

    public static class GetPermissionGroups 
    {
        public static Task<GetPermissionGroupsResult> InvokeAsync(GetPermissionGroupsArgs args, InvokeOptions? opts = null)
        public static Output<GetPermissionGroupsResult> Invoke(GetPermissionGroupsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPermissionGroupsResult> getPermissionGroups(GetPermissionGroupsArgs args, InvokeOptions options)
    public static Output<GetPermissionGroupsResult> getPermissionGroups(GetPermissionGroupsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: volcengine:nas/getPermissionGroups:getPermissionGroups
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Filters List<GetPermissionGroupsFilter>
    Filter permission groups for specified characteristics.
    OutputFile string
    File name where to save data source results.
    Filters []GetPermissionGroupsFilter
    Filter permission groups for specified characteristics.
    OutputFile string
    File name where to save data source results.
    filters List<GetPermissionGroupsFilter>
    Filter permission groups for specified characteristics.
    outputFile String
    File name where to save data source results.
    filters GetPermissionGroupsFilter[]
    Filter permission groups for specified characteristics.
    outputFile string
    File name where to save data source results.
    filters Sequence[GetPermissionGroupsFilter]
    Filter permission groups for specified characteristics.
    output_file str
    File name where to save data source results.
    filters List<Property Map>
    Filter permission groups for specified characteristics.
    outputFile String
    File name where to save data source results.

    getPermissionGroups Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    PermissionGroups List<GetPermissionGroupsPermissionGroup>
    The list of permissions groups.
    TotalCount int
    The total count of nas permission groups query.
    Filters List<GetPermissionGroupsFilter>
    OutputFile string
    Id string
    The provider-assigned unique ID for this managed resource.
    PermissionGroups []GetPermissionGroupsPermissionGroup
    The list of permissions groups.
    TotalCount int
    The total count of nas permission groups query.
    Filters []GetPermissionGroupsFilter
    OutputFile string
    id String
    The provider-assigned unique ID for this managed resource.
    permissionGroups List<GetPermissionGroupsPermissionGroup>
    The list of permissions groups.
    totalCount Integer
    The total count of nas permission groups query.
    filters List<GetPermissionGroupsFilter>
    outputFile String
    id string
    The provider-assigned unique ID for this managed resource.
    permissionGroups GetPermissionGroupsPermissionGroup[]
    The list of permissions groups.
    totalCount number
    The total count of nas permission groups query.
    filters GetPermissionGroupsFilter[]
    outputFile string
    id str
    The provider-assigned unique ID for this managed resource.
    permission_groups Sequence[GetPermissionGroupsPermissionGroup]
    The list of permissions groups.
    total_count int
    The total count of nas permission groups query.
    filters Sequence[GetPermissionGroupsFilter]
    output_file str
    id String
    The provider-assigned unique ID for this managed resource.
    permissionGroups List<Property Map>
    The list of permissions groups.
    totalCount Number
    The total count of nas permission groups query.
    filters List<Property Map>
    outputFile String

    Supporting Types

    GetPermissionGroupsFilter

    Key string
    Filters permission groups for specified characteristics based on attributes. The parameters that support filtering are as follows: PermissionGroupName, PermissionGroupId.
    Value string
    The value of the filter item.
    Key string
    Filters permission groups for specified characteristics based on attributes. The parameters that support filtering are as follows: PermissionGroupName, PermissionGroupId.
    Value string
    The value of the filter item.
    key String
    Filters permission groups for specified characteristics based on attributes. The parameters that support filtering are as follows: PermissionGroupName, PermissionGroupId.
    value String
    The value of the filter item.
    key string
    Filters permission groups for specified characteristics based on attributes. The parameters that support filtering are as follows: PermissionGroupName, PermissionGroupId.
    value string
    The value of the filter item.
    key str
    Filters permission groups for specified characteristics based on attributes. The parameters that support filtering are as follows: PermissionGroupName, PermissionGroupId.
    value str
    The value of the filter item.
    key String
    Filters permission groups for specified characteristics based on attributes. The parameters that support filtering are as follows: PermissionGroupName, PermissionGroupId.
    value String
    The value of the filter item.

    GetPermissionGroupsPermissionGroup

    CreateTime string
    The creation time of the permission group.
    Description string
    The description of the permission group.
    FileSystemCount int
    The number of the file system.
    FileSystemType string
    The file system type of the permission group.
    MountPoints List<GetPermissionGroupsPermissionGroupMountPoint>
    The list of the mount point.
    PermissionGroupId string
    The id of the permission group.
    PermissionGroupName string
    The name of the permission group.
    PermissionRuleCount int
    The number of the permission rule.
    PermissionRules List<GetPermissionGroupsPermissionGroupPermissionRule>
    The list of permissions rules.
    CreateTime string
    The creation time of the permission group.
    Description string
    The description of the permission group.
    FileSystemCount int
    The number of the file system.
    FileSystemType string
    The file system type of the permission group.
    MountPoints []GetPermissionGroupsPermissionGroupMountPoint
    The list of the mount point.
    PermissionGroupId string
    The id of the permission group.
    PermissionGroupName string
    The name of the permission group.
    PermissionRuleCount int
    The number of the permission rule.
    PermissionRules []GetPermissionGroupsPermissionGroupPermissionRule
    The list of permissions rules.
    createTime String
    The creation time of the permission group.
    description String
    The description of the permission group.
    fileSystemCount Integer
    The number of the file system.
    fileSystemType String
    The file system type of the permission group.
    mountPoints List<GetPermissionGroupsPermissionGroupMountPoint>
    The list of the mount point.
    permissionGroupId String
    The id of the permission group.
    permissionGroupName String
    The name of the permission group.
    permissionRuleCount Integer
    The number of the permission rule.
    permissionRules List<GetPermissionGroupsPermissionGroupPermissionRule>
    The list of permissions rules.
    createTime string
    The creation time of the permission group.
    description string
    The description of the permission group.
    fileSystemCount number
    The number of the file system.
    fileSystemType string
    The file system type of the permission group.
    mountPoints GetPermissionGroupsPermissionGroupMountPoint[]
    The list of the mount point.
    permissionGroupId string
    The id of the permission group.
    permissionGroupName string
    The name of the permission group.
    permissionRuleCount number
    The number of the permission rule.
    permissionRules GetPermissionGroupsPermissionGroupPermissionRule[]
    The list of permissions rules.
    create_time str
    The creation time of the permission group.
    description str
    The description of the permission group.
    file_system_count int
    The number of the file system.
    file_system_type str
    The file system type of the permission group.
    mount_points Sequence[GetPermissionGroupsPermissionGroupMountPoint]
    The list of the mount point.
    permission_group_id str
    The id of the permission group.
    permission_group_name str
    The name of the permission group.
    permission_rule_count int
    The number of the permission rule.
    permission_rules Sequence[GetPermissionGroupsPermissionGroupPermissionRule]
    The list of permissions rules.
    createTime String
    The creation time of the permission group.
    description String
    The description of the permission group.
    fileSystemCount Number
    The number of the file system.
    fileSystemType String
    The file system type of the permission group.
    mountPoints List<Property Map>
    The list of the mount point.
    permissionGroupId String
    The id of the permission group.
    permissionGroupName String
    The name of the permission group.
    permissionRuleCount Number
    The number of the permission rule.
    permissionRules List<Property Map>
    The list of permissions rules.

    GetPermissionGroupsPermissionGroupMountPoint

    FileSystemId string
    The id of the file system.
    MountPointId string
    The id of the mount point.
    MountPointName string
    The name of the mount point.
    FileSystemId string
    The id of the file system.
    MountPointId string
    The id of the mount point.
    MountPointName string
    The name of the mount point.
    fileSystemId String
    The id of the file system.
    mountPointId String
    The id of the mount point.
    mountPointName String
    The name of the mount point.
    fileSystemId string
    The id of the file system.
    mountPointId string
    The id of the mount point.
    mountPointName string
    The name of the mount point.
    file_system_id str
    The id of the file system.
    mount_point_id str
    The id of the mount point.
    mount_point_name str
    The name of the mount point.
    fileSystemId String
    The id of the file system.
    mountPointId String
    The id of the mount point.
    mountPointName String
    The name of the mount point.

    GetPermissionGroupsPermissionGroupPermissionRule

    CidrIp string
    Client IP addresses that are allowed access.
    PermissionRuleId string
    The id of the permission rule.
    RwMode string
    Permission group read and write rules.
    UserMode string
    Permission group user permissions.
    CidrIp string
    Client IP addresses that are allowed access.
    PermissionRuleId string
    The id of the permission rule.
    RwMode string
    Permission group read and write rules.
    UserMode string
    Permission group user permissions.
    cidrIp String
    Client IP addresses that are allowed access.
    permissionRuleId String
    The id of the permission rule.
    rwMode String
    Permission group read and write rules.
    userMode String
    Permission group user permissions.
    cidrIp string
    Client IP addresses that are allowed access.
    permissionRuleId string
    The id of the permission rule.
    rwMode string
    Permission group read and write rules.
    userMode string
    Permission group user permissions.
    cidr_ip str
    Client IP addresses that are allowed access.
    permission_rule_id str
    The id of the permission rule.
    rw_mode str
    Permission group read and write rules.
    user_mode str
    Permission group user permissions.
    cidrIp String
    Client IP addresses that are allowed access.
    permissionRuleId String
    The id of the permission rule.
    rwMode String
    Permission group read and write rules.
    userMode String
    Permission group user permissions.

    Package Details

    Repository
    volcengine volcengine/pulumi-volcengine
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.31 published on Monday, May 12, 2025 by Volcengine