alicloud.eds.RamDirectory
Provides a ECD Ram Directory resource.
For information about ECD Ram Directory and how to use it, see What is Ram Directory.
NOTE: Available in v1.174.0+.
Example Usage
Basic Usage
using System.Collections.Generic;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var defaultZones = AliCloud.Eds.GetZones.Invoke();
var defaultNetworks = AliCloud.Vpc.GetNetworks.Invoke(new()
{
NameRegex = "default-NODELETING",
});
var defaultSwitches = AliCloud.Vpc.GetSwitches.Invoke(new()
{
VpcId = defaultNetworks.Apply(getNetworksResult => getNetworksResult.Ids[0]),
ZoneId = defaultZones.Apply(getZonesResult => getZonesResult.Ids[0]),
});
var defaultRamDirectory = new AliCloud.Eds.RamDirectory("defaultRamDirectory", new()
{
DesktopAccessType = "INTERNET",
EnableAdminAccess = true,
EnableInternetAccess = true,
RamDirectoryName = @var.Name,
VswitchIds = new[]
{
defaultSwitches.Apply(getSwitchesResult => getSwitchesResult.Ids[0]),
},
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/eds"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
defaultZones, err := eds.GetZones(ctx, nil, nil)
if err != nil {
return err
}
defaultNetworks, err := vpc.GetNetworks(ctx, &vpc.GetNetworksArgs{
NameRegex: pulumi.StringRef("default-NODELETING"),
}, nil)
if err != nil {
return err
}
defaultSwitches, err := vpc.GetSwitches(ctx, &vpc.GetSwitchesArgs{
VpcId: pulumi.StringRef(defaultNetworks.Ids[0]),
ZoneId: pulumi.StringRef(defaultZones.Ids[0]),
}, nil)
if err != nil {
return err
}
_, err = eds.NewRamDirectory(ctx, "defaultRamDirectory", &eds.RamDirectoryArgs{
DesktopAccessType: pulumi.String("INTERNET"),
EnableAdminAccess: pulumi.Bool(true),
EnableInternetAccess: pulumi.Bool(true),
RamDirectoryName: pulumi.Any(_var.Name),
VswitchIds: pulumi.StringArray{
*pulumi.String(defaultSwitches.Ids[0]),
},
})
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.alicloud.eds.EdsFunctions;
import com.pulumi.alicloud.eds.inputs.GetZonesArgs;
import com.pulumi.alicloud.vpc.VpcFunctions;
import com.pulumi.alicloud.vpc.inputs.GetNetworksArgs;
import com.pulumi.alicloud.vpc.inputs.GetSwitchesArgs;
import com.pulumi.alicloud.eds.RamDirectory;
import com.pulumi.alicloud.eds.RamDirectoryArgs;
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 defaultZones = EdsFunctions.getZones();
final var defaultNetworks = VpcFunctions.getNetworks(GetNetworksArgs.builder()
.nameRegex("default-NODELETING")
.build());
final var defaultSwitches = VpcFunctions.getSwitches(GetSwitchesArgs.builder()
.vpcId(defaultNetworks.applyValue(getNetworksResult -> getNetworksResult.ids()[0]))
.zoneId(defaultZones.applyValue(getZonesResult -> getZonesResult.ids()[0]))
.build());
var defaultRamDirectory = new RamDirectory("defaultRamDirectory", RamDirectoryArgs.builder()
.desktopAccessType("INTERNET")
.enableAdminAccess("true")
.enableInternetAccess("true")
.ramDirectoryName(var_.name())
.vswitchIds(defaultSwitches.applyValue(getSwitchesResult -> getSwitchesResult.ids()[0]))
.build());
}
}
import pulumi
import pulumi_alicloud as alicloud
default_zones = alicloud.eds.get_zones()
default_networks = alicloud.vpc.get_networks(name_regex="default-NODELETING")
default_switches = alicloud.vpc.get_switches(vpc_id=default_networks.ids[0],
zone_id=default_zones.ids[0])
default_ram_directory = alicloud.eds.RamDirectory("defaultRamDirectory",
desktop_access_type="INTERNET",
enable_admin_access=True,
enable_internet_access=True,
ram_directory_name=var["name"],
vswitch_ids=[default_switches.ids[0]])
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const defaultZones = alicloud.eds.getZones({});
const defaultNetworks = alicloud.vpc.getNetworks({
nameRegex: "default-NODELETING",
});
const defaultSwitches = Promise.all([defaultNetworks, defaultZones]).then(([defaultNetworks, defaultZones]) => alicloud.vpc.getSwitches({
vpcId: defaultNetworks.ids?.[0],
zoneId: defaultZones.ids?.[0],
}));
const defaultRamDirectory = new alicloud.eds.RamDirectory("defaultRamDirectory", {
desktopAccessType: "INTERNET",
enableAdminAccess: true,
enableInternetAccess: true,
ramDirectoryName: _var.name,
vswitchIds: [defaultSwitches.then(defaultSwitches => defaultSwitches.ids?.[0])],
});
resources:
defaultRamDirectory:
type: alicloud:eds:RamDirectory
properties:
desktopAccessType: INTERNET
enableAdminAccess: 'true'
enableInternetAccess: 'true'
ramDirectoryName: ${var.name}
vswitchIds:
- ${defaultSwitches.ids[0]}
variables:
defaultZones:
fn::invoke:
Function: alicloud:eds:getZones
Arguments: {}
defaultNetworks:
fn::invoke:
Function: alicloud:vpc:getNetworks
Arguments:
nameRegex: default-NODELETING
defaultSwitches:
fn::invoke:
Function: alicloud:vpc:getSwitches
Arguments:
vpcId: ${defaultNetworks.ids[0]}
zoneId: ${defaultZones.ids[0]}
Create RamDirectory Resource
new RamDirectory(name: string, args: RamDirectoryArgs, opts?: CustomResourceOptions);
@overload
def RamDirectory(resource_name: str,
opts: Optional[ResourceOptions] = None,
desktop_access_type: Optional[str] = None,
enable_admin_access: Optional[bool] = None,
enable_internet_access: Optional[bool] = None,
ram_directory_name: Optional[str] = None,
vswitch_ids: Optional[Sequence[str]] = None)
@overload
def RamDirectory(resource_name: str,
args: RamDirectoryArgs,
opts: Optional[ResourceOptions] = None)
func NewRamDirectory(ctx *Context, name string, args RamDirectoryArgs, opts ...ResourceOption) (*RamDirectory, error)
public RamDirectory(string name, RamDirectoryArgs args, CustomResourceOptions? opts = null)
public RamDirectory(String name, RamDirectoryArgs args)
public RamDirectory(String name, RamDirectoryArgs args, CustomResourceOptions options)
type: alicloud:eds:RamDirectory
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RamDirectoryArgs
- 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 RamDirectoryArgs
- 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 RamDirectoryArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RamDirectoryArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RamDirectoryArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
RamDirectory 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 RamDirectory resource accepts the following input properties:
- Ram
Directory stringName The name of the directory. The name must be 2 to 255 characters in length. It must start with a letter but cannot start with
http://
orhttps://
. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).- Vswitch
Ids List<string> List of VSwitch IDs in the directory.
- Desktop
Access stringType The desktop access type. Valid values:
VPC
,INTERNET
,ANY
.- Enable
Admin boolAccess Whether to enable public network access.
- Enable
Internet boolAccess Whether to grant local administrator rights to users who use cloud desktops.
- Ram
Directory stringName The name of the directory. The name must be 2 to 255 characters in length. It must start with a letter but cannot start with
http://
orhttps://
. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).- Vswitch
Ids []string List of VSwitch IDs in the directory.
- Desktop
Access stringType The desktop access type. Valid values:
VPC
,INTERNET
,ANY
.- Enable
Admin boolAccess Whether to enable public network access.
- Enable
Internet boolAccess Whether to grant local administrator rights to users who use cloud desktops.
- ram
Directory StringName The name of the directory. The name must be 2 to 255 characters in length. It must start with a letter but cannot start with
http://
orhttps://
. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).- vswitch
Ids List<String> List of VSwitch IDs in the directory.
- desktop
Access StringType The desktop access type. Valid values:
VPC
,INTERNET
,ANY
.- enable
Admin BooleanAccess Whether to enable public network access.
- enable
Internet BooleanAccess Whether to grant local administrator rights to users who use cloud desktops.
- ram
Directory stringName The name of the directory. The name must be 2 to 255 characters in length. It must start with a letter but cannot start with
http://
orhttps://
. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).- vswitch
Ids string[] List of VSwitch IDs in the directory.
- desktop
Access stringType The desktop access type. Valid values:
VPC
,INTERNET
,ANY
.- enable
Admin booleanAccess Whether to enable public network access.
- enable
Internet booleanAccess Whether to grant local administrator rights to users who use cloud desktops.
- ram_
directory_ strname The name of the directory. The name must be 2 to 255 characters in length. It must start with a letter but cannot start with
http://
orhttps://
. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).- vswitch_
ids Sequence[str] List of VSwitch IDs in the directory.
- desktop_
access_ strtype The desktop access type. Valid values:
VPC
,INTERNET
,ANY
.- enable_
admin_ boolaccess Whether to enable public network access.
- enable_
internet_ boolaccess Whether to grant local administrator rights to users who use cloud desktops.
- ram
Directory StringName The name of the directory. The name must be 2 to 255 characters in length. It must start with a letter but cannot start with
http://
orhttps://
. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).- vswitch
Ids List<String> List of VSwitch IDs in the directory.
- desktop
Access StringType The desktop access type. Valid values:
VPC
,INTERNET
,ANY
.- enable
Admin BooleanAccess Whether to enable public network access.
- enable
Internet BooleanAccess Whether to grant local administrator rights to users who use cloud desktops.
Outputs
All input properties are implicitly available as output properties. Additionally, the RamDirectory resource produces the following output properties:
Look up Existing RamDirectory Resource
Get an existing RamDirectory 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?: RamDirectoryState, opts?: CustomResourceOptions): RamDirectory
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
desktop_access_type: Optional[str] = None,
enable_admin_access: Optional[bool] = None,
enable_internet_access: Optional[bool] = None,
ram_directory_name: Optional[str] = None,
status: Optional[str] = None,
vswitch_ids: Optional[Sequence[str]] = None) -> RamDirectory
func GetRamDirectory(ctx *Context, name string, id IDInput, state *RamDirectoryState, opts ...ResourceOption) (*RamDirectory, error)
public static RamDirectory Get(string name, Input<string> id, RamDirectoryState? state, CustomResourceOptions? opts = null)
public static RamDirectory get(String name, Output<String> id, RamDirectoryState 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.
- Desktop
Access stringType The desktop access type. Valid values:
VPC
,INTERNET
,ANY
.- Enable
Admin boolAccess Whether to enable public network access.
- Enable
Internet boolAccess Whether to grant local administrator rights to users who use cloud desktops.
- Ram
Directory stringName The name of the directory. The name must be 2 to 255 characters in length. It must start with a letter but cannot start with
http://
orhttps://
. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).- Status string
The status of directory.
- Vswitch
Ids List<string> List of VSwitch IDs in the directory.
- Desktop
Access stringType The desktop access type. Valid values:
VPC
,INTERNET
,ANY
.- Enable
Admin boolAccess Whether to enable public network access.
- Enable
Internet boolAccess Whether to grant local administrator rights to users who use cloud desktops.
- Ram
Directory stringName The name of the directory. The name must be 2 to 255 characters in length. It must start with a letter but cannot start with
http://
orhttps://
. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).- Status string
The status of directory.
- Vswitch
Ids []string List of VSwitch IDs in the directory.
- desktop
Access StringType The desktop access type. Valid values:
VPC
,INTERNET
,ANY
.- enable
Admin BooleanAccess Whether to enable public network access.
- enable
Internet BooleanAccess Whether to grant local administrator rights to users who use cloud desktops.
- ram
Directory StringName The name of the directory. The name must be 2 to 255 characters in length. It must start with a letter but cannot start with
http://
orhttps://
. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).- status String
The status of directory.
- vswitch
Ids List<String> List of VSwitch IDs in the directory.
- desktop
Access stringType The desktop access type. Valid values:
VPC
,INTERNET
,ANY
.- enable
Admin booleanAccess Whether to enable public network access.
- enable
Internet booleanAccess Whether to grant local administrator rights to users who use cloud desktops.
- ram
Directory stringName The name of the directory. The name must be 2 to 255 characters in length. It must start with a letter but cannot start with
http://
orhttps://
. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).- status string
The status of directory.
- vswitch
Ids string[] List of VSwitch IDs in the directory.
- desktop_
access_ strtype The desktop access type. Valid values:
VPC
,INTERNET
,ANY
.- enable_
admin_ boolaccess Whether to enable public network access.
- enable_
internet_ boolaccess Whether to grant local administrator rights to users who use cloud desktops.
- ram_
directory_ strname The name of the directory. The name must be 2 to 255 characters in length. It must start with a letter but cannot start with
http://
orhttps://
. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).- status str
The status of directory.
- vswitch_
ids Sequence[str] List of VSwitch IDs in the directory.
- desktop
Access StringType The desktop access type. Valid values:
VPC
,INTERNET
,ANY
.- enable
Admin BooleanAccess Whether to enable public network access.
- enable
Internet BooleanAccess Whether to grant local administrator rights to users who use cloud desktops.
- ram
Directory StringName The name of the directory. The name must be 2 to 255 characters in length. It must start with a letter but cannot start with
http://
orhttps://
. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).- status String
The status of directory.
- vswitch
Ids List<String> List of VSwitch IDs in the directory.
Import
ECD Ram Directory can be imported using the id, e.g.
$ pulumi import alicloud:eds/ramDirectory:RamDirectory example <id>
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.