alicloud.eds.NasFileSystem
Explore with Pulumi AI
Provides a ECD Nas File System resource.
For information about ECD Nas File System and how to use it, see What is Nas File System.
NOTE: Available since v1.141.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
import * as random from "@pulumi/random";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const _default = new random.index.Integer("default", {
min: 10000,
max: 99999,
});
const defaultSimpleOfficeSite = new alicloud.eds.SimpleOfficeSite("default", {
cidrBlock: "172.16.0.0/12",
enableAdminAccess: false,
desktopAccessType: "Internet",
officeSiteName: `${name}-${_default.result}`,
});
const example = new alicloud.eds.NasFileSystem("example", {
nasFileSystemName: name,
officeSiteId: defaultSimpleOfficeSite.id,
description: name,
});
import pulumi
import pulumi_alicloud as alicloud
import pulumi_random as random
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
default = random.index.Integer("default",
min=10000,
max=99999)
default_simple_office_site = alicloud.eds.SimpleOfficeSite("default",
cidr_block="172.16.0.0/12",
enable_admin_access=False,
desktop_access_type="Internet",
office_site_name=f"{name}-{default['result']}")
example = alicloud.eds.NasFileSystem("example",
nas_file_system_name=name,
office_site_id=default_simple_office_site.id,
description=name)
package main
import (
"fmt"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/eds"
"github.com/pulumi/pulumi-random/sdk/v4/go/random"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "terraform-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
Min: 10000,
Max: 99999,
})
if err != nil {
return err
}
defaultSimpleOfficeSite, err := eds.NewSimpleOfficeSite(ctx, "default", &eds.SimpleOfficeSiteArgs{
CidrBlock: pulumi.String("172.16.0.0/12"),
EnableAdminAccess: pulumi.Bool(false),
DesktopAccessType: pulumi.String("Internet"),
OfficeSiteName: pulumi.Sprintf("%v-%v", name, _default.Result),
})
if err != nil {
return err
}
_, err = eds.NewNasFileSystem(ctx, "example", &eds.NasFileSystemArgs{
NasFileSystemName: pulumi.String(name),
OfficeSiteId: defaultSimpleOfficeSite.ID(),
Description: pulumi.String(name),
})
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 config = new Config();
var name = config.Get("name") ?? "terraform-example";
var @default = new Random.Index.Integer("default", new()
{
Min = 10000,
Max = 99999,
});
var defaultSimpleOfficeSite = new AliCloud.Eds.SimpleOfficeSite("default", new()
{
CidrBlock = "172.16.0.0/12",
EnableAdminAccess = false,
DesktopAccessType = "Internet",
OfficeSiteName = $"{name}-{@default.Result}",
});
var example = new AliCloud.Eds.NasFileSystem("example", new()
{
NasFileSystemName = name,
OfficeSiteId = defaultSimpleOfficeSite.Id,
Description = name,
});
});
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.eds.SimpleOfficeSite;
import com.pulumi.alicloud.eds.SimpleOfficeSiteArgs;
import com.pulumi.alicloud.eds.NasFileSystem;
import com.pulumi.alicloud.eds.NasFileSystemArgs;
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 config = ctx.config();
final var name = config.get("name").orElse("terraform-example");
var default_ = new Integer("default", IntegerArgs.builder()
.min(10000)
.max(99999)
.build());
var defaultSimpleOfficeSite = new SimpleOfficeSite("defaultSimpleOfficeSite", SimpleOfficeSiteArgs.builder()
.cidrBlock("172.16.0.0/12")
.enableAdminAccess(false)
.desktopAccessType("Internet")
.officeSiteName(String.format("%s-%s", name,default_.result()))
.build());
var example = new NasFileSystem("example", NasFileSystemArgs.builder()
.nasFileSystemName(name)
.officeSiteId(defaultSimpleOfficeSite.id())
.description(name)
.build());
}
}
configuration:
name:
type: string
default: terraform-example
resources:
default:
type: random:integer
properties:
min: 10000
max: 99999
defaultSimpleOfficeSite:
type: alicloud:eds:SimpleOfficeSite
name: default
properties:
cidrBlock: 172.16.0.0/12
enableAdminAccess: false
desktopAccessType: Internet
officeSiteName: ${name}-${default.result}
example:
type: alicloud:eds:NasFileSystem
properties:
nasFileSystemName: ${name}
officeSiteId: ${defaultSimpleOfficeSite.id}
description: ${name}
Create NasFileSystem Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NasFileSystem(name: string, args: NasFileSystemArgs, opts?: CustomResourceOptions);
@overload
def NasFileSystem(resource_name: str,
args: NasFileSystemArgs,
opts: Optional[ResourceOptions] = None)
@overload
def NasFileSystem(resource_name: str,
opts: Optional[ResourceOptions] = None,
office_site_id: Optional[str] = None,
description: Optional[str] = None,
file_system_id: Optional[str] = None,
mount_target_domain: Optional[str] = None,
nas_file_system_name: Optional[str] = None,
reset: Optional[bool] = None)
func NewNasFileSystem(ctx *Context, name string, args NasFileSystemArgs, opts ...ResourceOption) (*NasFileSystem, error)
public NasFileSystem(string name, NasFileSystemArgs args, CustomResourceOptions? opts = null)
public NasFileSystem(String name, NasFileSystemArgs args)
public NasFileSystem(String name, NasFileSystemArgs args, CustomResourceOptions options)
type: alicloud:eds:NasFileSystem
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 NasFileSystemArgs
- 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 NasFileSystemArgs
- 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 NasFileSystemArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NasFileSystemArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NasFileSystemArgs
- 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 nasFileSystemResource = new AliCloud.Eds.NasFileSystem("nasFileSystemResource", new()
{
OfficeSiteId = "string",
Description = "string",
FileSystemId = "string",
MountTargetDomain = "string",
NasFileSystemName = "string",
Reset = false,
});
example, err := eds.NewNasFileSystem(ctx, "nasFileSystemResource", &eds.NasFileSystemArgs{
OfficeSiteId: pulumi.String("string"),
Description: pulumi.String("string"),
FileSystemId: pulumi.String("string"),
MountTargetDomain: pulumi.String("string"),
NasFileSystemName: pulumi.String("string"),
Reset: pulumi.Bool(false),
})
var nasFileSystemResource = new NasFileSystem("nasFileSystemResource", NasFileSystemArgs.builder()
.officeSiteId("string")
.description("string")
.fileSystemId("string")
.mountTargetDomain("string")
.nasFileSystemName("string")
.reset(false)
.build());
nas_file_system_resource = alicloud.eds.NasFileSystem("nasFileSystemResource",
office_site_id="string",
description="string",
file_system_id="string",
mount_target_domain="string",
nas_file_system_name="string",
reset=False)
const nasFileSystemResource = new alicloud.eds.NasFileSystem("nasFileSystemResource", {
officeSiteId: "string",
description: "string",
fileSystemId: "string",
mountTargetDomain: "string",
nasFileSystemName: "string",
reset: false,
});
type: alicloud:eds:NasFileSystem
properties:
description: string
fileSystemId: string
mountTargetDomain: string
nasFileSystemName: string
officeSiteId: string
reset: false
NasFileSystem 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 NasFileSystem resource accepts the following input properties:
- Office
Site stringId - The ID of office site.
- Description string
- The description of nas file system.
- File
System stringId - The filesystem id of nas file system.
- Mount
Target stringDomain - The domain of mount target.
- Nas
File stringSystem Name - The name of nas file system.
- Reset bool
- The mount point is in an inactive state, reset the mount point of the NAS file system. Default to
false
.
- Office
Site stringId - The ID of office site.
- Description string
- The description of nas file system.
- File
System stringId - The filesystem id of nas file system.
- Mount
Target stringDomain - The domain of mount target.
- Nas
File stringSystem Name - The name of nas file system.
- Reset bool
- The mount point is in an inactive state, reset the mount point of the NAS file system. Default to
false
.
- office
Site StringId - The ID of office site.
- description String
- The description of nas file system.
- file
System StringId - The filesystem id of nas file system.
- mount
Target StringDomain - The domain of mount target.
- nas
File StringSystem Name - The name of nas file system.
- reset Boolean
- The mount point is in an inactive state, reset the mount point of the NAS file system. Default to
false
.
- office
Site stringId - The ID of office site.
- description string
- The description of nas file system.
- file
System stringId - The filesystem id of nas file system.
- mount
Target stringDomain - The domain of mount target.
- nas
File stringSystem Name - The name of nas file system.
- reset boolean
- The mount point is in an inactive state, reset the mount point of the NAS file system. Default to
false
.
- office_
site_ strid - The ID of office site.
- description str
- The description of nas file system.
- file_
system_ strid - The filesystem id of nas file system.
- mount_
target_ strdomain - The domain of mount target.
- nas_
file_ strsystem_ name - The name of nas file system.
- reset bool
- The mount point is in an inactive state, reset the mount point of the NAS file system. Default to
false
.
- office
Site StringId - The ID of office site.
- description String
- The description of nas file system.
- file
System StringId - The filesystem id of nas file system.
- mount
Target StringDomain - The domain of mount target.
- nas
File StringSystem Name - The name of nas file system.
- reset Boolean
- The mount point is in an inactive state, reset the mount point of the NAS file system. Default to
false
.
Outputs
All input properties are implicitly available as output properties. Additionally, the NasFileSystem resource produces the following output properties:
Look up Existing NasFileSystem Resource
Get an existing NasFileSystem 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?: NasFileSystemState, opts?: CustomResourceOptions): NasFileSystem
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
file_system_id: Optional[str] = None,
mount_target_domain: Optional[str] = None,
nas_file_system_name: Optional[str] = None,
office_site_id: Optional[str] = None,
reset: Optional[bool] = None,
status: Optional[str] = None) -> NasFileSystem
func GetNasFileSystem(ctx *Context, name string, id IDInput, state *NasFileSystemState, opts ...ResourceOption) (*NasFileSystem, error)
public static NasFileSystem Get(string name, Input<string> id, NasFileSystemState? state, CustomResourceOptions? opts = null)
public static NasFileSystem get(String name, Output<String> id, NasFileSystemState 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.
- Description string
- The description of nas file system.
- File
System stringId - The filesystem id of nas file system.
- Mount
Target stringDomain - The domain of mount target.
- Nas
File stringSystem Name - The name of nas file system.
- Office
Site stringId - The ID of office site.
- Reset bool
- The mount point is in an inactive state, reset the mount point of the NAS file system. Default to
false
. - Status string
- The status of nas file system. Valid values:
Pending
,Running
,Stopped
,Deleting
,Deleted
,Invalid
.
- Description string
- The description of nas file system.
- File
System stringId - The filesystem id of nas file system.
- Mount
Target stringDomain - The domain of mount target.
- Nas
File stringSystem Name - The name of nas file system.
- Office
Site stringId - The ID of office site.
- Reset bool
- The mount point is in an inactive state, reset the mount point of the NAS file system. Default to
false
. - Status string
- The status of nas file system. Valid values:
Pending
,Running
,Stopped
,Deleting
,Deleted
,Invalid
.
- description String
- The description of nas file system.
- file
System StringId - The filesystem id of nas file system.
- mount
Target StringDomain - The domain of mount target.
- nas
File StringSystem Name - The name of nas file system.
- office
Site StringId - The ID of office site.
- reset Boolean
- The mount point is in an inactive state, reset the mount point of the NAS file system. Default to
false
. - status String
- The status of nas file system. Valid values:
Pending
,Running
,Stopped
,Deleting
,Deleted
,Invalid
.
- description string
- The description of nas file system.
- file
System stringId - The filesystem id of nas file system.
- mount
Target stringDomain - The domain of mount target.
- nas
File stringSystem Name - The name of nas file system.
- office
Site stringId - The ID of office site.
- reset boolean
- The mount point is in an inactive state, reset the mount point of the NAS file system. Default to
false
. - status string
- The status of nas file system. Valid values:
Pending
,Running
,Stopped
,Deleting
,Deleted
,Invalid
.
- description str
- The description of nas file system.
- file_
system_ strid - The filesystem id of nas file system.
- mount_
target_ strdomain - The domain of mount target.
- nas_
file_ strsystem_ name - The name of nas file system.
- office_
site_ strid - The ID of office site.
- reset bool
- The mount point is in an inactive state, reset the mount point of the NAS file system. Default to
false
. - status str
- The status of nas file system. Valid values:
Pending
,Running
,Stopped
,Deleting
,Deleted
,Invalid
.
- description String
- The description of nas file system.
- file
System StringId - The filesystem id of nas file system.
- mount
Target StringDomain - The domain of mount target.
- nas
File StringSystem Name - The name of nas file system.
- office
Site StringId - The ID of office site.
- reset Boolean
- The mount point is in an inactive state, reset the mount point of the NAS file system. Default to
false
. - status String
- The status of nas file system. Valid values:
Pending
,Running
,Stopped
,Deleting
,Deleted
,Invalid
.
Import
ECD Nas File System can be imported using the id, e.g.
$ pulumi import alicloud:eds/nasFileSystem:NasFileSystem 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.