Skip to content

Desktops

This class encapsulates and extends the ROS resource type ALIYUN::ECD::Desktops, which is used to create one or more cloud desktops.

Initializers

import ros_cdk_ecd
ros_cdk_ecd.Desktops(
  scope: Construct,
  id: str,
  bundle_id: typing.Union[str, IResolvable],
  office_site_id: typing.Union[str, IResolvable],
  policy_group_id: typing.Union[str, IResolvable],
  amount: typing.Union[typing.Union[int, float], IResolvable] = None,
  auto_pay: typing.Union[bool, IResolvable] = None,
  auto_renew: typing.Union[bool, IResolvable] = None,
  charge_type: typing.Union[str, IResolvable] = None,
  desktop_name: typing.Union[str, IResolvable] = None,
  desktop_name_suffix: typing.Union[bool, IResolvable] = None,
  directory_id: typing.Union[str, IResolvable] = None,
  end_user_id: typing.Union[typing.List[typing.Any], IResolvable] = None,
  group_id: typing.Union[str, IResolvable] = None,
  hostname: typing.Union[str, IResolvable] = None,
  period: typing.Union[typing.Union[int, float], IResolvable] = None,
  period_unit: typing.Union[str, IResolvable] = None,
  promotion_id: typing.Union[str, IResolvable] = None,
  tags: typing.List[TagsProperty] = None,
  user_assign_mode: typing.Union[str, IResolvable] = None,
  user_name: typing.Union[str, IResolvable] = None,
  volume_encryption_enabled: typing.Union[bool, IResolvable] = None,
  volume_encryption_key: typing.Union[str, IResolvable] = None,
  vpc_id: typing.Union[str, IResolvable] = None,
  enable_resource_property_constraint: bool = None
)
Name Type Description
scope ros_cdk_core.Construct No description.
id str No description.
bundle_id typing.Union[str, ros_cdk_core.IResolvable] Property bundleId: The ID of the cloud desktop template.
office_site_id typing.Union[str, ros_cdk_core.IResolvable] Property officeSiteId: The ID of the workspace.
policy_group_id typing.Union[str, ros_cdk_core.IResolvable] Property policyGroupId: The ID of the policy.
amount typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property amount: The number of cloud desktops that you want to create.
auto_pay typing.Union[bool, ros_cdk_core.IResolvable] Property autoPay: Specifies whether to enable automatic payment.
auto_renew typing.Union[bool, ros_cdk_core.IResolvable] Property autoRenew: Specifies whether to enable auto-renewal for the cloud desktop.
charge_type typing.Union[str, ros_cdk_core.IResolvable] Property chargeType: The billing method of the cloud desktop.
desktop_name typing.Union[str, ros_cdk_core.IResolvable] Property desktopName: The name of the cloud desktop.
desktop_name_suffix typing.Union[bool, ros_cdk_core.IResolvable] Property desktopNameSuffix: Specifies whether to automatically add a suffix to the cloud desktop name when you create multiple cloud desktops at a time.
directory_id typing.Union[str, ros_cdk_core.IResolvable] Property directoryId: This parameter is not open for use.
end_user_id typing.Union[typing.List[typing.Any], ros_cdk_core.IResolvable] Property endUserId: The user ID that authorizes the use of the cloud desktop, 1~100 can be set.
group_id typing.Union[str, ros_cdk_core.IResolvable] Property groupId: desktop group ID。 Note that the desktop group function is currently in the invitation test.
hostname typing.Union[str, ros_cdk_core.IResolvable] Property hostname: The custom hostname that you specify for the cloud desktop.
period typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property period: The subscription duration.
period_unit typing.Union[str, ros_cdk_core.IResolvable] Property periodUnit: The unit of the subscription duration.
promotion_id typing.Union[str, ros_cdk_core.IResolvable] Property promotionId: promotion id.
tags typing.List[TagsProperty] Property tags: The list of desktops tags in the form of key\/value pairs.
user_assign_mode typing.Union[str, ros_cdk_core.IResolvable] Property userAssignMode: The assignment mode of the cloud desktop.
user_name typing.Union[str, ros_cdk_core.IResolvable] Property userName: This parameter is not open for use.
volume_encryption_enabled typing.Union[bool, ros_cdk_core.IResolvable] Property volumeEncryptionEnabled: Whether to enable disk encryption.
volume_encryption_key typing.Union[str, ros_cdk_core.IResolvable] Property volumeEncryptionKey: The key ID of the KMS used when disk encryption is enabled.
vpc_id typing.Union[str, ros_cdk_core.IResolvable] Property vpcId: This parameter is not open for use.
enable_resource_property_constraint bool No description.

scopeRequired

  • Type: ros_cdk_core.Construct

idRequired

  • Type: str

bundle_idRequired

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property bundleId: The ID of the cloud desktop template.


office_site_idRequired

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property officeSiteId: The ID of the workspace.


policy_group_idRequired

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property policyGroupId: The ID of the policy.


amountOptional

  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

Property amount: The number of cloud desktops that you want to create.

Valid values: 1 to 300. Default value: 1.


auto_payOptional

  • Type: typing.Union[bool, ros_cdk_core.IResolvable]

Property autoPay: Specifies whether to enable automatic payment.

Valid values: true: enables automatic payment. You must make sure that your Alibaba Cloud account has sufficient balance. If your Alibaba Cloud account does not have sufficient balance, abnormal orders are generated. false: disables automatic payment. In this case, an order is generated, and no payment is automatically made. You can log on to the EDS console and complete the payment based on the order ID on the Orders page. Default value: true.


auto_renewOptional

  • Type: typing.Union[bool, ros_cdk_core.IResolvable]

Property autoRenew: Specifies whether to enable auto-renewal for the cloud desktop.

This parameter takes effect only when the ChargeType parameter is set to PrePaid. Valid values: true: enables auto-renewal. The renewal duration is the same as the subscription duration that you specified for the Period parameter when you purchased the cloud desktop. false: does not enable auto-renewal. Default value: false.


charge_typeOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property chargeType: The billing method of the cloud desktop.

Valid values: PostPaid: pay-as-you-go PrePaid: subscription Default value: PostPaid.


desktop_nameOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property desktopName: The name of the cloud desktop.


desktop_name_suffixOptional

  • Type: typing.Union[bool, ros_cdk_core.IResolvable]

Property desktopNameSuffix: Specifies whether to automatically add a suffix to the cloud desktop name when you create multiple cloud desktops at a time.

True: automatically adds a suffix. False: does not add a suffix.


directory_idOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property directoryId: This parameter is not open for use.


end_user_idOptional

  • Type: typing.Union[typing.List[typing.Any], ros_cdk_core.IResolvable]

Property endUserId: The user ID that authorizes the use of the cloud desktop, 1~100 can be set.

During the same period, only one user can use the desktop. If EndUserId is not set, the created cloud desktop will not be assigned to any user.


group_idOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property groupId: desktop group ID。 Note that the desktop group function is currently in the invitation test.

If you want to experience it, please submit a work order application.


hostnameOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property hostname: The custom hostname that you specify for the cloud desktop.

You can only specify the hostname of a Windows cloud desktop in the workspace of the enterprise AD account type. The hostname must meet the following requirements: The hostname must be 2 to 15 characters in length. The hostname can contain letters, digits, and hyphens (-). It cannot start or end with a hyphen (-), contain consecutive hyphens (-), or contain only digits. If you create multiple cloud desktops, you can specify the names of the cloud desktops in the name_prefix[begin_number,bits]name_suffix format. For example, if you set Hostname to ecd--1,4-test, the hostname of the first cloud desktop is ecd-0001-test and the hostname of the second cloud desktop is ecd-0002-test. The rest may be deduced by analogy. name_prefix: the prefix of the hostname. [begin_number,bits]: the ordered numbers in the hostname. begin_number: the start number. Valid values: 0 to 999999. Default value: 0. bits: the digit. Valid values: 1 to 6. Default value: 6. name_suffix: the suffix of the hostname.


periodOptional

  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

Property period: The subscription duration.

The unit of the value is specified by the PeriodUnit parameter. This parameter takes effect and is required only when the ChargeType parameter is set to PrePaid. If PeriodUnit is month, the valid range is 1, 2, 3, 6, 12, 24, 36, 48,60 If periodUnit is year, the valid range is 1 to 5


period_unitOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property periodUnit: The unit of the subscription duration.

Valid values: Month Year Default value: Month.


promotion_idOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property promotionId: promotion id.


tagsOptional

Property tags: The list of desktops tags in the form of key\/value pairs.

You can define a maximum of 20 tags for each desktops.


user_assign_modeOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property userAssignMode: The assignment mode of the cloud desktop.

Default value: ALL. ALL: If you specify the EndUserId parameter, the cloud desktops that you create are assigned to each regular user that you specify. PER_USER: If you specify the EndUserId parameter, the cloud desktops that you create are evenly assigned to all regular users that you specify. In this case, you must make sure that the value of the Amount parameter can be divided by the N value of the EndUserId.N parameter that you specify. Note If you do not specify the EndUserId parameter, the cloud desktop that you create is not assigned to regular users.


user_nameOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property userName: This parameter is not open for use.


volume_encryption_enabledOptional

  • Type: typing.Union[bool, ros_cdk_core.IResolvable]

Property volumeEncryptionEnabled: Whether to enable disk encryption.


volume_encryption_keyOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property volumeEncryptionKey: The key ID of the KMS used when disk encryption is enabled.

It can be obtained through the ListKeys interface.


vpc_idOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property vpcId: This parameter is not open for use.


enable_resource_property_constraintOptional

  • Type: bool

Methods

Name Description
to_string Returns a string representation of this construct.
synthesize Allows this construct to emit artifacts into the cloud assembly during synthesis.
add_condition No description.
add_count No description.
add_dependency No description.
add_resource_desc No description.
apply_removal_policy No description.
get_att No description.
set_metadata No description.

to_string

def to_string() -> str

Returns a string representation of this construct.

synthesize

def synthesize(
  session: ISynthesisSession
) -> None

Allows this construct to emit artifacts into the cloud assembly during synthesis.

This method is usually implemented by framework-level constructs such as Stack and Asset as they participate in synthesizing the cloud assembly.

sessionRequired

  • Type: ros_cdk_core.ISynthesisSession

The synthesis session.


add_condition

def add_condition(
  condition: RosCondition
) -> None

conditionRequired

  • Type: ros_cdk_core.RosCondition

add_count

def add_count(
  count: typing.Union[typing.Union[int, float], IResolvable]
) -> None

countRequired

  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

add_dependency

def add_dependency(
  resource: Resource
) -> None

resourceRequired

  • Type: ros_cdk_core.Resource

add_resource_desc

def add_resource_desc(
  desc: str
) -> None

descRequired

  • Type: str

apply_removal_policy

def apply_removal_policy(
  policy: RemovalPolicy
) -> None

policyRequired

  • Type: ros_cdk_core.RemovalPolicy

get_att

def get_att(
  name: str
) -> IResolvable

nameRequired

  • Type: str

set_metadata

def set_metadata(
  key: str,
  value: typing.Any
) -> None

keyRequired

  • Type: str

valueRequired

  • Type: typing.Any

Static Functions

Name Description
is_construct Return whether the given object is a Construct.

is_construct

import ros_cdk_ecd
ros_cdk_ecd.Desktops.is_construct(
  x: typing.Any
)

Return whether the given object is a Construct.

xRequired

  • Type: typing.Any

Properties

Name Type Description
node ros_cdk_core.ConstructNode The construct tree node associated with this construct.
ref str No description.
stack ros_cdk_core.Stack The stack in which this resource is defined.
resource ros_cdk_core.RosResource No description.
attr_desktop_id ros_cdk_core.IResolvable Attribute DesktopId: The ID of the cloud desktop.
attr_order_id ros_cdk_core.IResolvable Attribute OrderId: The ID of the order.

nodeRequired

node: ConstructNode
  • Type: ros_cdk_core.ConstructNode

The construct tree node associated with this construct.


refRequired

ref: str
  • Type: str

stackRequired

stack: Stack
  • Type: ros_cdk_core.Stack

The stack in which this resource is defined.


resourceOptional

resource: RosResource
  • Type: ros_cdk_core.RosResource

attr_desktop_idRequired

attr_desktop_id: IResolvable
  • Type: ros_cdk_core.IResolvable

Attribute DesktopId: The ID of the cloud desktop.

If multiple cloud desktops are created in a call, the IDs of the cloud desktops are returned.


attr_order_idRequired

attr_order_id: IResolvable
  • Type: ros_cdk_core.IResolvable

Attribute OrderId: The ID of the order.

Note This parameter is returned only when the ChargeType parameter is set to PrePaid.