1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. dfs
  5. AccessGroup
Alibaba Cloud v3.57.0 published on Saturday, Jun 15, 2024 by Pulumi

alicloud.dfs.AccessGroup

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.0 published on Saturday, Jun 15, 2024 by Pulumi

    Provides a DFS Access Group resource.

    For information about DFS Access Group and how to use it, see What is Access Group.

    NOTE: Available since v1.133.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    import * as random from "@pulumi/random";
    
    const _default = new random.index.Integer("default", {
        min: 10000,
        max: 99999,
    });
    const defaultAccessGroup = new alicloud.dfs.AccessGroup("default", {
        accessGroupName: `tf-example-${_default.result}`,
        networkType: "VPC",
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    import pulumi_random as random
    
    default = random.index.Integer("default",
        min=10000,
        max=99999)
    default_access_group = alicloud.dfs.AccessGroup("default",
        access_group_name=f"tf-example-{default['result']}",
        network_type="VPC")
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/dfs"
    	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
    			Min: 10000,
    			Max: 99999,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = dfs.NewAccessGroup(ctx, "default", &dfs.AccessGroupArgs{
    			AccessGroupName: pulumi.String(fmt.Sprintf("tf-example-%v", _default.Result)),
    			NetworkType:     pulumi.String("VPC"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    using Random = Pulumi.Random;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = new Random.Index.Integer("default", new()
        {
            Min = 10000,
            Max = 99999,
        });
    
        var defaultAccessGroup = new AliCloud.Dfs.AccessGroup("default", new()
        {
            AccessGroupName = $"tf-example-{@default.Result}",
            NetworkType = "VPC",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.random.integer;
    import com.pulumi.random.IntegerArgs;
    import com.pulumi.alicloud.dfs.AccessGroup;
    import com.pulumi.alicloud.dfs.AccessGroupArgs;
    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 default_ = new Integer("default", IntegerArgs.builder()
                .min(10000)
                .max(99999)
                .build());
    
            var defaultAccessGroup = new AccessGroup("defaultAccessGroup", AccessGroupArgs.builder()
                .accessGroupName(String.format("tf-example-%s", default_.result()))
                .networkType("VPC")
                .build());
    
        }
    }
    
    resources:
      default:
        type: random:integer
        properties:
          min: 10000
          max: 99999
      defaultAccessGroup:
        type: alicloud:dfs:AccessGroup
        name: default
        properties:
          accessGroupName: tf-example-${default.result}
          networkType: VPC
    

    Create AccessGroup Resource

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

    Constructor syntax

    new AccessGroup(name: string, args: AccessGroupArgs, opts?: CustomResourceOptions);
    @overload
    def AccessGroup(resource_name: str,
                    args: AccessGroupArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def AccessGroup(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    access_group_name: Optional[str] = None,
                    network_type: Optional[str] = None,
                    description: Optional[str] = None)
    func NewAccessGroup(ctx *Context, name string, args AccessGroupArgs, opts ...ResourceOption) (*AccessGroup, error)
    public AccessGroup(string name, AccessGroupArgs args, CustomResourceOptions? opts = null)
    public AccessGroup(String name, AccessGroupArgs args)
    public AccessGroup(String name, AccessGroupArgs args, CustomResourceOptions options)
    
    type: alicloud:dfs:AccessGroup
    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 AccessGroupArgs
    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 AccessGroupArgs
    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 AccessGroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AccessGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AccessGroupArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

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

    var accessGroupResource = new AliCloud.Dfs.AccessGroup("accessGroupResource", new()
    {
        AccessGroupName = "string",
        NetworkType = "string",
        Description = "string",
    });
    
    example, err := dfs.NewAccessGroup(ctx, "accessGroupResource", &dfs.AccessGroupArgs{
    	AccessGroupName: pulumi.String("string"),
    	NetworkType:     pulumi.String("string"),
    	Description:     pulumi.String("string"),
    })
    
    var accessGroupResource = new AccessGroup("accessGroupResource", AccessGroupArgs.builder()
        .accessGroupName("string")
        .networkType("string")
        .description("string")
        .build());
    
    access_group_resource = alicloud.dfs.AccessGroup("accessGroupResource",
        access_group_name="string",
        network_type="string",
        description="string")
    
    const accessGroupResource = new alicloud.dfs.AccessGroup("accessGroupResource", {
        accessGroupName: "string",
        networkType: "string",
        description: "string",
    });
    
    type: alicloud:dfs:AccessGroup
    properties:
        accessGroupName: string
        description: string
        networkType: string
    

    AccessGroup Resource Properties

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

    Inputs

    The AccessGroup resource accepts the following input properties:

    AccessGroupName string
    The permission group name. The naming rules are as follows: The length is 6~64 characters. Globally unique and cannot be an empty string. English letters are supported and can contain numbers, underscores (_), and dashes (-).
    NetworkType string
    The permission group type. Only VPC (VPC) is supported.
    Description string
    The permission group description. No more than 32 characters in length.
    AccessGroupName string
    The permission group name. The naming rules are as follows: The length is 6~64 characters. Globally unique and cannot be an empty string. English letters are supported and can contain numbers, underscores (_), and dashes (-).
    NetworkType string
    The permission group type. Only VPC (VPC) is supported.
    Description string
    The permission group description. No more than 32 characters in length.
    accessGroupName String
    The permission group name. The naming rules are as follows: The length is 6~64 characters. Globally unique and cannot be an empty string. English letters are supported and can contain numbers, underscores (_), and dashes (-).
    networkType String
    The permission group type. Only VPC (VPC) is supported.
    description String
    The permission group description. No more than 32 characters in length.
    accessGroupName string
    The permission group name. The naming rules are as follows: The length is 6~64 characters. Globally unique and cannot be an empty string. English letters are supported and can contain numbers, underscores (_), and dashes (-).
    networkType string
    The permission group type. Only VPC (VPC) is supported.
    description string
    The permission group description. No more than 32 characters in length.
    access_group_name str
    The permission group name. The naming rules are as follows: The length is 6~64 characters. Globally unique and cannot be an empty string. English letters are supported and can contain numbers, underscores (_), and dashes (-).
    network_type str
    The permission group type. Only VPC (VPC) is supported.
    description str
    The permission group description. No more than 32 characters in length.
    accessGroupName String
    The permission group name. The naming rules are as follows: The length is 6~64 characters. Globally unique and cannot be an empty string. English letters are supported and can contain numbers, underscores (_), and dashes (-).
    networkType String
    The permission group type. Only VPC (VPC) is supported.
    description String
    The permission group description. No more than 32 characters in length.

    Outputs

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

    CreateTime string
    The creation time of the permission group resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    CreateTime string
    The creation time of the permission group resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    createTime String
    The creation time of the permission group resource.
    id String
    The provider-assigned unique ID for this managed resource.
    createTime string
    The creation time of the permission group resource.
    id string
    The provider-assigned unique ID for this managed resource.
    create_time str
    The creation time of the permission group resource.
    id str
    The provider-assigned unique ID for this managed resource.
    createTime String
    The creation time of the permission group resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing AccessGroup Resource

    Get an existing AccessGroup 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?: AccessGroupState, opts?: CustomResourceOptions): AccessGroup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            access_group_name: Optional[str] = None,
            create_time: Optional[str] = None,
            description: Optional[str] = None,
            network_type: Optional[str] = None) -> AccessGroup
    func GetAccessGroup(ctx *Context, name string, id IDInput, state *AccessGroupState, opts ...ResourceOption) (*AccessGroup, error)
    public static AccessGroup Get(string name, Input<string> id, AccessGroupState? state, CustomResourceOptions? opts = null)
    public static AccessGroup get(String name, Output<String> id, AccessGroupState 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:
    AccessGroupName string
    The permission group name. The naming rules are as follows: The length is 6~64 characters. Globally unique and cannot be an empty string. English letters are supported and can contain numbers, underscores (_), and dashes (-).
    CreateTime string
    The creation time of the permission group resource.
    Description string
    The permission group description. No more than 32 characters in length.
    NetworkType string
    The permission group type. Only VPC (VPC) is supported.
    AccessGroupName string
    The permission group name. The naming rules are as follows: The length is 6~64 characters. Globally unique and cannot be an empty string. English letters are supported and can contain numbers, underscores (_), and dashes (-).
    CreateTime string
    The creation time of the permission group resource.
    Description string
    The permission group description. No more than 32 characters in length.
    NetworkType string
    The permission group type. Only VPC (VPC) is supported.
    accessGroupName String
    The permission group name. The naming rules are as follows: The length is 6~64 characters. Globally unique and cannot be an empty string. English letters are supported and can contain numbers, underscores (_), and dashes (-).
    createTime String
    The creation time of the permission group resource.
    description String
    The permission group description. No more than 32 characters in length.
    networkType String
    The permission group type. Only VPC (VPC) is supported.
    accessGroupName string
    The permission group name. The naming rules are as follows: The length is 6~64 characters. Globally unique and cannot be an empty string. English letters are supported and can contain numbers, underscores (_), and dashes (-).
    createTime string
    The creation time of the permission group resource.
    description string
    The permission group description. No more than 32 characters in length.
    networkType string
    The permission group type. Only VPC (VPC) is supported.
    access_group_name str
    The permission group name. The naming rules are as follows: The length is 6~64 characters. Globally unique and cannot be an empty string. English letters are supported and can contain numbers, underscores (_), and dashes (-).
    create_time str
    The creation time of the permission group resource.
    description str
    The permission group description. No more than 32 characters in length.
    network_type str
    The permission group type. Only VPC (VPC) is supported.
    accessGroupName String
    The permission group name. The naming rules are as follows: The length is 6~64 characters. Globally unique and cannot be an empty string. English letters are supported and can contain numbers, underscores (_), and dashes (-).
    createTime String
    The creation time of the permission group resource.
    description String
    The permission group description. No more than 32 characters in length.
    networkType String
    The permission group type. Only VPC (VPC) is supported.

    Import

    DFS Access Group can be imported using the id, e.g.

    $ pulumi import alicloud:dfs/accessGroup:AccessGroup example <id>
    

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

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.57.0 published on Saturday, Jun 15, 2024 by Pulumi