Module nas
This page documents the language specification for the alicloud package. If you're looking for help working with the inputs, outputs, or functions of alicloud resources in a Pulumi program, please see the resource documentation for examples and API reference.
This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the
pulumi/pulumi-alicloudrepo; however, if that doesn’t turn up anything, please consult the sourceterraform-providers/terraform-provider-alicloudrepo.
Resources
Functions
Others
- AccessGroupArgs
- AccessGroupState
- AccessRuleArgs
- AccessRuleState
- FileSystemArgs
- FileSystemState
- GetAccessGroupsArgs
- GetAccessGroupsResult
- GetAccessRulesArgs
- GetAccessRulesResult
- GetFileSystemsArgs
- GetFileSystemsResult
- GetMountTargetsArgs
- GetMountTargetsResult
- GetProtocolsArgs
- GetProtocolsResult
- MountTargetArgs
- MountTargetState
Resources
Resource AccessGroup
class AccessGroup extends CustomResourceProvides a Nas Access Group resource.
In NAS, the permission group acts as a whitelist that allows you to restrict file system access. You can allow specified IP addresses or CIDR blocks to access the file system, and assign different levels of access permission to different IP addresses or CIDR blocks by adding rules to the permission group.
NOTE: Available in v1.33.0+.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const foo = new alicloud.nas.AccessGroup("foo", {
description: "test_AccessG",
type: "Classic",
});constructor
new AccessGroup(name: string, args: AccessGroupArgs, opts?: pulumi.CustomResourceOptions)Create a AccessGroup resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AccessGroupState, opts?: pulumi.CustomResourceOptions): AccessGroupGet an existing AccessGroup resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is AccessGroupReturns true if the given object is an instance of AccessGroup. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property description
public description: pulumi.Output<string | undefined>;The Access Group description.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property name
public name: pulumi.Output<string>;A Name of one Access Group.
property type
public type: pulumi.Output<string>;A Type of one Access Group. Valid values: Vpc and Classic.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource AccessRule
class AccessRule extends CustomResourceProvides a Nas Access Rule resource.
When NAS is activated, the Default VPC Permission Group is automatically generated. It allows all IP addresses in a VPC to access the mount point with full permissions. Full permissions include Read/Write permission with no restriction on root users.
NOTE: Available in v1.34.0+.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const fooAccessGroup = new alicloud.nas.AccessGroup("foo", {
description: "tf-testAccNasConfig",
type: "Vpc",
});
const fooAccessRule = new alicloud.nas.AccessRule("foo", {
accessGroupName: fooAccessGroup.id,
priority: 2,
rwAccessType: "RDWR",
sourceCidrIp: "168.1.1.0/16",
userAccessType: "noSquash",
});constructor
new AccessRule(name: string, args: AccessRuleArgs, opts?: pulumi.CustomResourceOptions)Create a AccessRule resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AccessRuleState, opts?: pulumi.CustomResourceOptions): AccessRuleGet an existing AccessRule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is AccessRuleReturns true if the given object is an instance of AccessRule. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property accessGroupName
public accessGroupName: pulumi.Output<string>;Permission group name.
property accessRuleId
public accessRuleId: pulumi.Output<string>;The nas access rule ID.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property priority
public priority: pulumi.Output<number | undefined>;Priority level. Range: 1-100. Default value: 1.
property rwAccessType
public rwAccessType: pulumi.Output<string | undefined>;Read-write permission type: RDWR (default), RDONLY.
property sourceCidrIp
public sourceCidrIp: pulumi.Output<string>;Address or address segment.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
property userAccessType
public userAccessType: pulumi.Output<string | undefined>;User permission type: noSquash (default), root_squash, all_squash.
Resource FileSystem
class FileSystem extends CustomResourceProvides a Nas File System resource.
After activating NAS, you can create a file system and purchase a storage package for it in the NAS console. The NAS console also enables you to view the file system details and remove unnecessary file systems.
For information about NAS file system and how to use it, see Manage file systems
NOTE: Available in v1.33.0+.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const foo = new alicloud.nas.FileSystem("foo", {
description: "tf-testAccNasConfig",
protocolType: "NFS",
storageType: "Performance",
});constructor
new FileSystem(name: string, args: FileSystemArgs, opts?: pulumi.CustomResourceOptions)Create a FileSystem resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: FileSystemState, opts?: pulumi.CustomResourceOptions): FileSystemGet an existing FileSystem resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is FileSystemReturns true if the given object is an instance of FileSystem. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property description
public description: pulumi.Output<string | undefined>;The File System description.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property protocolType
public protocolType: pulumi.Output<string>;The Protocol Type of a File System. Valid values: NFS and SMB.
property storageType
public storageType: pulumi.Output<string>;The Storage Type of a File System. Valid values: Capacity and Performance.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource MountTarget
class MountTarget extends CustomResourceProvides a Nas Mount Target resource.
NOTE: Available in v1.34.0+.
NOTE: Currently this resource support create a mount point in a classic network only when current region is China mainland regions.
NOTE: You must grant NAS with specific RAM permissions when creating a classic mount targets, and it only can be achieved by creating a classic mount target mannually. See Add a mount point and Why do I need RAM permissions to create a mount point in a classic network.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const fooFileSystem = new alicloud.nas.FileSystem("foo", {
description: "tf-testAccNasConfigFs",
protocolType: "NFS",
storageType: "Performance",
});
const fooAccessGroup = new alicloud.nas.AccessGroup("foo", {
description: "tf-testAccNasConfig",
type: "Classic",
});
const bar = new alicloud.nas.AccessGroup("bar", {
description: "tf-testAccNasConfig-2",
type: "Classic",
});
const fooMountTarget = new alicloud.nas.MountTarget("foo", {
accessGroupName: fooAccessGroup.id,
fileSystemId: fooFileSystem.id,
});constructor
new MountTarget(name: string, args: MountTargetArgs, opts?: pulumi.CustomResourceOptions)Create a MountTarget resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: MountTargetState, opts?: pulumi.CustomResourceOptions): MountTargetGet an existing MountTarget resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is MountTargetReturns true if the given object is an instance of MountTarget. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property accessGroupName
public accessGroupName: pulumi.Output<string>;Permission group name.
property fileSystemId
public fileSystemId: pulumi.Output<string>;File system ID.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property status
public status: pulumi.Output<string>;Whether the MountTarget is active. An inactive MountTarget is inusable. Valid values are Active(default) and Inactive.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
property vswitchId
public vswitchId: pulumi.Output<string | undefined>;VSwitch ID.
Functions
Function getAccessGroups
getAccessGroups(args?: GetAccessGroupsArgs, opts?: pulumi.InvokeOptions): Promise<GetAccessGroupsResult>This data source provides user-available access groups. Use when you can create mount points
NOTE: Available in 1.35.0+
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ag = pulumi.output(alicloud.nas.getAccessGroups({
description: "tf-testAccAccessGroupsdatasource",
nameRegex: "^foo",
type: "Classic",
}, { async: true }));
export const alicloudNasAccessGroupsId = ag.groups[0].id;Function getAccessRules
getAccessRules(args: GetAccessRulesArgs, opts?: pulumi.InvokeOptions): Promise<GetAccessRulesResult>This data source provides AccessRule available to the user.
NOTE: Available in 1.35.0+
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const foo = pulumi.output(alicloud.nas.getAccessRules({
accessGroupName: "tf-testAccAccessGroupsdatasource",
rwAccess: "RDWR",
sourceCidrIp: "168.1.1.0/16",
userAccess: "noSquash",
}, { async: true }));
export const alicloudNasAccessRulesId = foo.rules[0].id;Function getFileSystems
getFileSystems(args?: GetFileSystemsArgs, opts?: pulumi.InvokeOptions): Promise<GetFileSystemsResult>This data source provides FileSystems available to the user.
NOTE: Available in 1.35.0+
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const fs = alicloud_nas_file_system_foo.description.apply(description => alicloud.nas.getFileSystems({
description: description,
protocolType: "NFS",
}, { async: true }));
export const alicloudNasFileSystemsId = fs.systems[0].id;Function getMountTargets
getMountTargets(args: GetMountTargetsArgs, opts?: pulumi.InvokeOptions): Promise<GetMountTargetsResult>This data source provides MountTargets available to the user.
NOTE: Available in 1.35.0+
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const mt = pulumi.output(alicloud.nas.getMountTargets({
accessGroupName: "tf-testAccNasConfig",
fileSystemId: "1a2sc4d",
}, { async: true }));
export const alicloudNasMountTargetsId = mt.targets[0].id;Function getProtocols
getProtocols(args: GetProtocolsArgs, opts?: pulumi.InvokeOptions): Promise<GetProtocolsResult>Provide a data source to retrieve the type of protocol used to create NAS file system.
NOTE: Available in 1.42.0
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const defaultProtocols = pulumi.output(alicloud.nas.getProtocols({
outputFile: "protocols.txt",
type: "Performance",
zoneId: "cn-beijing-e",
}, { async: true }));
export const nasProtocolsProtocol = defaultProtocols.protocols[0];Others
interface AccessGroupArgs
interface AccessGroupArgsThe set of arguments for constructing a AccessGroup resource.
property description
description?: pulumi.Input<string>;The Access Group description.
property name
name?: pulumi.Input<string>;A Name of one Access Group.
property type
type: pulumi.Input<string>;A Type of one Access Group. Valid values: Vpc and Classic.
interface AccessGroupState
interface AccessGroupStateInput properties used for looking up and filtering AccessGroup resources.
property description
description?: pulumi.Input<string>;The Access Group description.
property name
name?: pulumi.Input<string>;A Name of one Access Group.
property type
type?: pulumi.Input<string>;A Type of one Access Group. Valid values: Vpc and Classic.
interface AccessRuleArgs
interface AccessRuleArgsThe set of arguments for constructing a AccessRule resource.
property accessGroupName
accessGroupName: pulumi.Input<string>;Permission group name.
property priority
priority?: pulumi.Input<number>;Priority level. Range: 1-100. Default value: 1.
property rwAccessType
rwAccessType?: pulumi.Input<string>;Read-write permission type: RDWR (default), RDONLY.
property sourceCidrIp
sourceCidrIp: pulumi.Input<string>;Address or address segment.
property userAccessType
userAccessType?: pulumi.Input<string>;User permission type: noSquash (default), root_squash, all_squash.
interface AccessRuleState
interface AccessRuleStateInput properties used for looking up and filtering AccessRule resources.
property accessGroupName
accessGroupName?: pulumi.Input<string>;Permission group name.
property accessRuleId
accessRuleId?: pulumi.Input<string>;The nas access rule ID.
property priority
priority?: pulumi.Input<number>;Priority level. Range: 1-100. Default value: 1.
property rwAccessType
rwAccessType?: pulumi.Input<string>;Read-write permission type: RDWR (default), RDONLY.
property sourceCidrIp
sourceCidrIp?: pulumi.Input<string>;Address or address segment.
property userAccessType
userAccessType?: pulumi.Input<string>;User permission type: noSquash (default), root_squash, all_squash.
interface FileSystemArgs
interface FileSystemArgsThe set of arguments for constructing a FileSystem resource.
property description
description?: pulumi.Input<string>;The File System description.
property protocolType
protocolType: pulumi.Input<string>;The Protocol Type of a File System. Valid values: NFS and SMB.
property storageType
storageType: pulumi.Input<string>;The Storage Type of a File System. Valid values: Capacity and Performance.
interface FileSystemState
interface FileSystemStateInput properties used for looking up and filtering FileSystem resources.
property description
description?: pulumi.Input<string>;The File System description.
property protocolType
protocolType?: pulumi.Input<string>;The Protocol Type of a File System. Valid values: NFS and SMB.
property storageType
storageType?: pulumi.Input<string>;The Storage Type of a File System. Valid values: Capacity and Performance.
interface GetAccessGroupsArgs
interface GetAccessGroupsArgsA collection of arguments for invoking getAccessGroups.
property description
description?: undefined | string;Filter results by a specific Description.
property nameRegex
nameRegex?: undefined | string;A regex string to filter AccessGroups by name.
property outputFile
outputFile?: undefined | string;property type
type?: undefined | string;Filter results by a specific AccessGroupType.
interface GetAccessGroupsResult
interface GetAccessGroupsResultA collection of values returned by getAccessGroups.
property description
description?: undefined | string;Destription of the AccessGroup.
property groups
groups: GetAccessGroupsGroup[];A list of AccessGroups. Each element contains the following attributes:
property id
id: string;The provider-assigned unique ID for this managed resource.
property ids
ids: string[];A list of AccessGroup IDs, the value is set to names .
property nameRegex
nameRegex?: undefined | string;property names
names: string[];A list of AccessGroup names.
property outputFile
outputFile?: undefined | string;property type
type?: undefined | string;AccessGroupType of the AccessGroup.
interface GetAccessRulesArgs
interface GetAccessRulesArgsA collection of arguments for invoking getAccessRules.
property accessGroupName
accessGroupName: string;Filter results by a specific AccessGroupName.
property ids
ids?: string[];A list of rule IDs.
property outputFile
outputFile?: undefined | string;property rwAccess
rwAccess?: undefined | string;Filter results by a specific RWAccess.
property sourceCidrIp
sourceCidrIp?: undefined | string;Filter results by a specific SourceCidrIp.
property userAccess
userAccess?: undefined | string;Filter results by a specific UserAccess.
interface GetAccessRulesResult
interface GetAccessRulesResultA collection of values returned by getAccessRules.
property accessGroupName
accessGroupName: string;property id
id: string;The provider-assigned unique ID for this managed resource.
property ids
ids: string[];A list of rule IDs, Each element set to accessRuleId (Each element formats as <access_group_name>:<access rule id> before 1.53.0).
property outputFile
outputFile?: undefined | string;property rules
rules: GetAccessRulesRule[];A list of AccessRules. Each element contains the following attributes:
property rwAccess
rwAccess?: undefined | string;RWAccess of the AccessRule.
property sourceCidrIp
sourceCidrIp?: undefined | string;SourceCidrIp of the AccessRule.
property userAccess
userAccess?: undefined | string;UserAccess of the AccessRule
interface GetFileSystemsArgs
interface GetFileSystemsArgsA collection of arguments for invoking getFileSystems.
property descriptionRegex
descriptionRegex?: undefined | string;A regex string to filter the results by the :FileSystem description.
property ids
ids?: string[];A list of FileSystemId.
property outputFile
outputFile?: undefined | string;property protocolType
protocolType?: undefined | string;Filter results by a specific ProtocolType.
property storageType
storageType?: undefined | string;Filter results by a specific StorageType.
interface GetFileSystemsResult
interface GetFileSystemsResultA collection of values returned by getFileSystems.
property descriptionRegex
descriptionRegex?: undefined | string;property descriptions
descriptions: string[];A list of FileSystem descriptions.
property id
id: string;The provider-assigned unique ID for this managed resource.
property ids
ids: string[];A list of FileSystem Id.
property outputFile
outputFile?: undefined | string;property protocolType
protocolType?: undefined | string;ProtocolType block of the FileSystem
property storageType
storageType?: undefined | string;StorageType block of the FileSystem.
property systems
systems: GetFileSystemsSystem[];A list of VPCs. Each element contains the following attributes:
interface GetMountTargetsArgs
interface GetMountTargetsArgsA collection of arguments for invoking getMountTargets.
property accessGroupName
accessGroupName?: undefined | string;Filter results by a specific AccessGroupName.
property fileSystemId
fileSystemId: string;The ID of the FileSystem that owns the MountTarget.
property ids
ids?: string[];A list of MountTargetDomain.
property mountTargetDomain
mountTargetDomain?: undefined | string;Filter results by a specific MountTargetDomain.
property outputFile
outputFile?: undefined | string;property type
type?: undefined | string;Filter results by a specific NetworkType.
property vpcId
vpcId?: undefined | string;Filter results by a specific VpcId.
property vswitchId
vswitchId?: undefined | string;Filter results by a specific VSwitchId.
interface GetMountTargetsResult
interface GetMountTargetsResultA collection of values returned by getMountTargets.
property accessGroupName
accessGroupName?: undefined | string;AccessGroup of The MountTarget.
property fileSystemId
fileSystemId: string;property id
id: string;The provider-assigned unique ID for this managed resource.
property ids
ids: string[];A list of MountTargetDomain.
property mountTargetDomain
mountTargetDomain?: undefined | string;MountTargetDomain of the MountTarget.
* type- NetworkType of The MountTarget.
property outputFile
outputFile?: undefined | string;property targets
targets: GetMountTargetsTarget[];A list of MountTargetDomains. Each element contains the following attributes:
property type
type?: undefined | string;property vpcId
vpcId?: undefined | string;VpcId of The MountTarget.
property vswitchId
vswitchId?: undefined | string;VSwitchId of The MountTarget.
interface GetProtocolsArgs
interface GetProtocolsArgsA collection of arguments for invoking getProtocols.
property outputFile
outputFile?: undefined | string;property type
type: string;The file system type. Valid Values: Performance and Capacity.
property zoneId
zoneId?: undefined | string;String to filter results by zone id.
interface GetProtocolsResult
interface GetProtocolsResultA collection of values returned by getProtocols.
property id
id: string;The provider-assigned unique ID for this managed resource.
property outputFile
outputFile?: undefined | string;property protocols
protocols: string[];A list of supported protocol type..
property type
type: string;property zoneId
zoneId?: undefined | string;interface MountTargetArgs
interface MountTargetArgsThe set of arguments for constructing a MountTarget resource.
property accessGroupName
accessGroupName: pulumi.Input<string>;Permission group name.
property fileSystemId
fileSystemId: pulumi.Input<string>;File system ID.
property status
status?: pulumi.Input<string>;Whether the MountTarget is active. An inactive MountTarget is inusable. Valid values are Active(default) and Inactive.
property vswitchId
vswitchId?: pulumi.Input<string>;VSwitch ID.
interface MountTargetState
interface MountTargetStateInput properties used for looking up and filtering MountTarget resources.
property accessGroupName
accessGroupName?: pulumi.Input<string>;Permission group name.
property fileSystemId
fileSystemId?: pulumi.Input<string>;File system ID.
property status
status?: pulumi.Input<string>;Whether the MountTarget is active. An inactive MountTarget is inusable. Valid values are Active(default) and Inactive.
property vswitchId
vswitchId?: pulumi.Input<string>;VSwitch ID.