1. Packages
  2. Volcengine
  3. API Docs
  4. nas
  5. PermissionGroup
Volcengine v0.0.26 published on Friday, Sep 13, 2024 by Volcengine

volcengine.nas.PermissionGroup

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.26 published on Friday, Sep 13, 2024 by Volcengine

    Provides a resource to manage nas permission group

    Example Usage

    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()
        {
            Description = "acctest1",
            PermissionGroupName = "acc-test1",
            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 = "No_all_squash",
                },
            },
        });
    
    });
    
    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 {
    		_, err := nas.NewPermissionGroup(ctx, "foo", &nas.PermissionGroupArgs{
    			Description:         pulumi.String("acctest1"),
    			PermissionGroupName: pulumi.String("acc-test1"),
    			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("No_all_squash"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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 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()        
                .description("acctest1")
                .permissionGroupName("acc-test1")
                .permissionRules(            
                    PermissionGroupPermissionRuleArgs.builder()
                        .cidrIp("*")
                        .rwMode("RW")
                        .useMode("All_squash")
                        .build(),
                    PermissionGroupPermissionRuleArgs.builder()
                        .cidrIp("192.168.0.0")
                        .rwMode("RO")
                        .useMode("No_all_squash")
                        .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    foo = volcengine.nas.PermissionGroup("foo",
        description="acctest1",
        permission_group_name="acc-test1",
        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="No_all_squash",
            ),
        ])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@volcengine/pulumi";
    
    const foo = new volcengine.nas.PermissionGroup("foo", {
        description: "acctest1",
        permissionGroupName: "acc-test1",
        permissionRules: [
            {
                cidrIp: "*",
                rwMode: "RW",
                useMode: "All_squash",
            },
            {
                cidrIp: "192.168.0.0",
                rwMode: "RO",
                useMode: "No_all_squash",
            },
        ],
    });
    
    resources:
      foo:
        type: volcengine:nas:PermissionGroup
        properties:
          description: acctest1
          permissionGroupName: acc-test1
          permissionRules:
            - cidrIp: '*'
              rwMode: RW
              useMode: All_squash
            - cidrIp: 192.168.0.0
              rwMode: RO
              useMode: No_all_squash
    

    Create PermissionGroup Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new PermissionGroup(name: string, args: PermissionGroupArgs, opts?: CustomResourceOptions);
    @overload
    def PermissionGroup(resource_name: str,
                        args: PermissionGroupArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def PermissionGroup(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        permission_group_name: Optional[str] = None,
                        description: Optional[str] = None,
                        permission_rules: Optional[Sequence[PermissionGroupPermissionRuleArgs]] = None)
    func NewPermissionGroup(ctx *Context, name string, args PermissionGroupArgs, opts ...ResourceOption) (*PermissionGroup, error)
    public PermissionGroup(string name, PermissionGroupArgs args, CustomResourceOptions? opts = null)
    public PermissionGroup(String name, PermissionGroupArgs args)
    public PermissionGroup(String name, PermissionGroupArgs args, CustomResourceOptions options)
    
    type: volcengine:nas:PermissionGroup
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args PermissionGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args PermissionGroupArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args PermissionGroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PermissionGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PermissionGroupArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var permissionGroupResource = new Volcengine.Nas.PermissionGroup("permissionGroupResource", new()
    {
        PermissionGroupName = "string",
        Description = "string",
        PermissionRules = new[]
        {
            new Volcengine.Nas.Inputs.PermissionGroupPermissionRuleArgs
            {
                CidrIp = "string",
                RwMode = "string",
                UseMode = "string",
            },
        },
    });
    
    example, err := nas.NewPermissionGroup(ctx, "permissionGroupResource", &nas.PermissionGroupArgs{
    	PermissionGroupName: pulumi.String("string"),
    	Description:         pulumi.String("string"),
    	PermissionRules: nas.PermissionGroupPermissionRuleArray{
    		&nas.PermissionGroupPermissionRuleArgs{
    			CidrIp:  pulumi.String("string"),
    			RwMode:  pulumi.String("string"),
    			UseMode: pulumi.String("string"),
    		},
    	},
    })
    
    var permissionGroupResource = new PermissionGroup("permissionGroupResource", PermissionGroupArgs.builder()
        .permissionGroupName("string")
        .description("string")
        .permissionRules(PermissionGroupPermissionRuleArgs.builder()
            .cidrIp("string")
            .rwMode("string")
            .useMode("string")
            .build())
        .build());
    
    permission_group_resource = volcengine.nas.PermissionGroup("permissionGroupResource",
        permission_group_name="string",
        description="string",
        permission_rules=[{
            "cidr_ip": "string",
            "rw_mode": "string",
            "use_mode": "string",
        }])
    
    const permissionGroupResource = new volcengine.nas.PermissionGroup("permissionGroupResource", {
        permissionGroupName: "string",
        description: "string",
        permissionRules: [{
            cidrIp: "string",
            rwMode: "string",
            useMode: "string",
        }],
    });
    
    type: volcengine:nas:PermissionGroup
    properties:
        description: string
        permissionGroupName: string
        permissionRules:
            - cidrIp: string
              rwMode: string
              useMode: string
    

    PermissionGroup Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The PermissionGroup resource accepts the following input properties:

    PermissionGroupName string
    The name of the permission group.
    Description string
    The description of the permission group.
    PermissionRules List<PermissionGroupPermissionRule>
    The list of permissions rules.
    PermissionGroupName string
    The name of the permission group.
    Description string
    The description of the permission group.
    PermissionRules []PermissionGroupPermissionRuleArgs
    The list of permissions rules.
    permissionGroupName String
    The name of the permission group.
    description String
    The description of the permission group.
    permissionRules List<PermissionGroupPermissionRule>
    The list of permissions rules.
    permissionGroupName string
    The name of the permission group.
    description string
    The description of the permission group.
    permissionRules PermissionGroupPermissionRule[]
    The list of permissions rules.
    permission_group_name str
    The name of the permission group.
    description str
    The description of the permission group.
    permission_rules Sequence[PermissionGroupPermissionRuleArgs]
    The list of permissions rules.
    permissionGroupName String
    The name of the permission group.
    description String
    The description of the permission group.
    permissionRules List<Property Map>
    The list of permissions rules.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the PermissionGroup resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    PermissionGroupId string
    The id of the permission group.
    Id string
    The provider-assigned unique ID for this managed resource.
    PermissionGroupId string
    The id of the permission group.
    id String
    The provider-assigned unique ID for this managed resource.
    permissionGroupId String
    The id of the permission group.
    id string
    The provider-assigned unique ID for this managed resource.
    permissionGroupId string
    The id of the permission group.
    id str
    The provider-assigned unique ID for this managed resource.
    permission_group_id str
    The id of the permission group.
    id String
    The provider-assigned unique ID for this managed resource.
    permissionGroupId String
    The id of the permission group.

    Look up Existing PermissionGroup Resource

    Get an existing PermissionGroup resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: PermissionGroupState, opts?: CustomResourceOptions): PermissionGroup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            permission_group_id: Optional[str] = None,
            permission_group_name: Optional[str] = None,
            permission_rules: Optional[Sequence[PermissionGroupPermissionRuleArgs]] = None) -> PermissionGroup
    func GetPermissionGroup(ctx *Context, name string, id IDInput, state *PermissionGroupState, opts ...ResourceOption) (*PermissionGroup, error)
    public static PermissionGroup Get(string name, Input<string> id, PermissionGroupState? state, CustomResourceOptions? opts = null)
    public static PermissionGroup get(String name, Output<String> id, PermissionGroupState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Description string
    The description of the permission group.
    PermissionGroupId string
    The id of the permission group.
    PermissionGroupName string
    The name of the permission group.
    PermissionRules List<PermissionGroupPermissionRule>
    The list of permissions rules.
    Description string
    The description of the permission group.
    PermissionGroupId string
    The id of the permission group.
    PermissionGroupName string
    The name of the permission group.
    PermissionRules []PermissionGroupPermissionRuleArgs
    The list of permissions rules.
    description String
    The description of the permission group.
    permissionGroupId String
    The id of the permission group.
    permissionGroupName String
    The name of the permission group.
    permissionRules List<PermissionGroupPermissionRule>
    The list of permissions rules.
    description string
    The description of the permission group.
    permissionGroupId string
    The id of the permission group.
    permissionGroupName string
    The name of the permission group.
    permissionRules PermissionGroupPermissionRule[]
    The list of permissions rules.
    description str
    The description of the permission group.
    permission_group_id str
    The id of the permission group.
    permission_group_name str
    The name of the permission group.
    permission_rules Sequence[PermissionGroupPermissionRuleArgs]
    The list of permissions rules.
    description String
    The description of the permission group.
    permissionGroupId String
    The id of the permission group.
    permissionGroupName String
    The name of the permission group.
    permissionRules List<Property Map>
    The list of permissions rules.

    Supporting Types

    PermissionGroupPermissionRule, PermissionGroupPermissionRuleArgs

    CidrIp string
    Client IP addresses that are allowed access.
    RwMode string
    Permission group read and write rules. The value description is as follows: RW: Allows reading and writing. RO: read-only mode.
    UseMode string
    Permission group user permissions. The value description is as follows: All_squash: All access users are mapped to anonymous users or user groups. No_all_squash: The access user is first matched with the local user, and then mapped to an anonymous user or user group after the match fails. Root_squash: Map the Root user as an anonymous user or user group. No_root_squash: The Root user maintains the Root account authority.
    CidrIp string
    Client IP addresses that are allowed access.
    RwMode string
    Permission group read and write rules. The value description is as follows: RW: Allows reading and writing. RO: read-only mode.
    UseMode string
    Permission group user permissions. The value description is as follows: All_squash: All access users are mapped to anonymous users or user groups. No_all_squash: The access user is first matched with the local user, and then mapped to an anonymous user or user group after the match fails. Root_squash: Map the Root user as an anonymous user or user group. No_root_squash: The Root user maintains the Root account authority.
    cidrIp String
    Client IP addresses that are allowed access.
    rwMode String
    Permission group read and write rules. The value description is as follows: RW: Allows reading and writing. RO: read-only mode.
    useMode String
    Permission group user permissions. The value description is as follows: All_squash: All access users are mapped to anonymous users or user groups. No_all_squash: The access user is first matched with the local user, and then mapped to an anonymous user or user group after the match fails. Root_squash: Map the Root user as an anonymous user or user group. No_root_squash: The Root user maintains the Root account authority.
    cidrIp string
    Client IP addresses that are allowed access.
    rwMode string
    Permission group read and write rules. The value description is as follows: RW: Allows reading and writing. RO: read-only mode.
    useMode string
    Permission group user permissions. The value description is as follows: All_squash: All access users are mapped to anonymous users or user groups. No_all_squash: The access user is first matched with the local user, and then mapped to an anonymous user or user group after the match fails. Root_squash: Map the Root user as an anonymous user or user group. No_root_squash: The Root user maintains the Root account authority.
    cidr_ip str
    Client IP addresses that are allowed access.
    rw_mode str
    Permission group read and write rules. The value description is as follows: RW: Allows reading and writing. RO: read-only mode.
    use_mode str
    Permission group user permissions. The value description is as follows: All_squash: All access users are mapped to anonymous users or user groups. No_all_squash: The access user is first matched with the local user, and then mapped to an anonymous user or user group after the match fails. Root_squash: Map the Root user as an anonymous user or user group. No_root_squash: The Root user maintains the Root account authority.
    cidrIp String
    Client IP addresses that are allowed access.
    rwMode String
    Permission group read and write rules. The value description is as follows: RW: Allows reading and writing. RO: read-only mode.
    useMode String
    Permission group user permissions. The value description is as follows: All_squash: All access users are mapped to anonymous users or user groups. No_all_squash: The access user is first matched with the local user, and then mapped to an anonymous user or user group after the match fails. Root_squash: Map the Root user as an anonymous user or user group. No_root_squash: The Root user maintains the Root account authority.

    Import

    Nas Permission Group can be imported using the id, e.g.

     $ pulumi import volcengine:nas/permissionGroup:PermissionGroup default pgroup-1f85db2c****
    

    To learn more about importing existing cloud resources, see Importing resources.

    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.26 published on Friday, Sep 13, 2024 by Volcengine