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 com.aliyun.ros.cdk.ecd.Desktops;
Desktops.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
    .bundleId(java.lang.String)
    .bundleId(IResolvable)
    .officeSiteId(java.lang.String)
    .officeSiteId(IResolvable)
    .policyGroupId(java.lang.String)
    .policyGroupId(IResolvable)
//  .amount(java.lang.Number)
//  .amount(IResolvable)
//  .autoPay(java.lang.Boolean)
//  .autoPay(IResolvable)
//  .autoRenew(java.lang.Boolean)
//  .autoRenew(IResolvable)
//  .chargeType(java.lang.String)
//  .chargeType(IResolvable)
//  .desktopName(java.lang.String)
//  .desktopName(IResolvable)
//  .desktopNameSuffix(java.lang.Boolean)
//  .desktopNameSuffix(IResolvable)
//  .directoryId(java.lang.String)
//  .directoryId(IResolvable)
//  .endUserId(java.util.List<java.lang.Object>)
//  .endUserId(IResolvable)
//  .groupId(java.lang.String)
//  .groupId(IResolvable)
//  .hostname(java.lang.String)
//  .hostname(IResolvable)
//  .period(java.lang.Number)
//  .period(IResolvable)
//  .periodUnit(java.lang.String)
//  .periodUnit(IResolvable)
//  .promotionId(java.lang.String)
//  .promotionId(IResolvable)
//  .tags(java.util.List<TagsProperty>)
//  .userAssignMode(java.lang.String)
//  .userAssignMode(IResolvable)
//  .userName(java.lang.String)
//  .userName(IResolvable)
//  .volumeEncryptionEnabled(java.lang.Boolean)
//  .volumeEncryptionEnabled(IResolvable)
//  .volumeEncryptionKey(java.lang.String)
//  .volumeEncryptionKey(IResolvable)
//  .vpcId(java.lang.String)
//  .vpcId(IResolvable)
    .build();
Name Type Description
scope com.aliyun.ros.cdk.core.Construct No description.
id java.lang.String No description.
enableResourcePropertyConstraint java.lang.Boolean No description.
bundleId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property bundleId: The ID of the cloud desktop template.
officeSiteId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property officeSiteId: The ID of the workspace.
policyGroupId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property policyGroupId: The ID of the policy.
amount java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property amount: The number of cloud desktops that you want to create.
autoPay java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property autoPay: Specifies whether to enable automatic payment.
autoRenew java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property autoRenew: Specifies whether to enable auto-renewal for the cloud desktop.
chargeType java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property chargeType: The billing method of the cloud desktop.
desktopName java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property desktopName: The name of the cloud desktop.
desktopNameSuffix java.lang.Boolean OR com.aliyun.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.
directoryId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property directoryId: This parameter is not open for use.
endUserId java.util.List OR com.aliyun.ros.cdk.core.IResolvable Property endUserId: The user ID that authorizes the use of the cloud desktop, 1~100 can be set.
groupId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property groupId: desktop group ID。 Note that the desktop group function is currently in the invitation test.
hostname java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property hostname: The custom hostname that you specify for the cloud desktop.
period java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property period: The subscription duration.
periodUnit java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property periodUnit: The unit of the subscription duration.
promotionId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property promotionId: promotion id.
tags java.util.List<TagsProperty> Property tags: The list of desktops tags in the form of key\/value pairs.
userAssignMode java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property userAssignMode: The assignment mode of the cloud desktop.
userName java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property userName: This parameter is not open for use.
volumeEncryptionEnabled java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property volumeEncryptionEnabled: Whether to enable disk encryption.
volumeEncryptionKey java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property volumeEncryptionKey: The key ID of the KMS used when disk encryption is enabled.
vpcId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property vpcId: This parameter is not open for use.

scopeRequired

  • Type: com.aliyun.ros.cdk.core.Construct

idRequired

  • Type: java.lang.String

enableResourcePropertyConstraintOptional

  • Type: java.lang.Boolean

bundleIdRequired

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property bundleId: The ID of the cloud desktop template.


officeSiteIdRequired

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property officeSiteId: The ID of the workspace.


policyGroupIdRequired

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property policyGroupId: The ID of the policy.


amountOptional

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

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

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


autoPayOptional

  • Type: java.lang.Boolean OR com.aliyun.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.


autoRenewOptional

  • Type: java.lang.Boolean OR com.aliyun.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.


chargeTypeOptional

  • Type: java.lang.String OR com.aliyun.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.


desktopNameOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property desktopName: The name of the cloud desktop.


desktopNameSuffixOptional

  • Type: java.lang.Boolean OR com.aliyun.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.


directoryIdOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property directoryId: This parameter is not open for use.


endUserIdOptional

  • Type: java.util.List OR com.aliyun.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.


groupIdOptional

  • Type: java.lang.String OR com.aliyun.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: java.lang.String OR com.aliyun.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: java.lang.Number OR com.aliyun.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


periodUnitOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property periodUnit: The unit of the subscription duration.

Valid values: Month Year Default value: Month.


promotionIdOptional

  • Type: java.lang.String OR com.aliyun.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.


userAssignModeOptional

  • Type: java.lang.String OR com.aliyun.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.


userNameOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property userName: This parameter is not open for use.


volumeEncryptionEnabledOptional

  • Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable

Property volumeEncryptionEnabled: Whether to enable disk encryption.


volumeEncryptionKeyOptional

  • Type: java.lang.String OR com.aliyun.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.


vpcIdOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property vpcId: This parameter is not open for use.


Methods

Name Description
toString Returns a string representation of this construct.
synthesize Allows this construct to emit artifacts into the cloud assembly during synthesis.
addCondition No description.
addCount No description.
addDependency No description.
addResourceDesc No description.
applyRemovalPolicy No description.
getAtt No description.
setMetadata No description.

toString

public java.lang.String toString()

Returns a string representation of this construct.

synthesize

public void synthesize(ISynthesisSession session)

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: com.aliyun.ros.cdk.core.ISynthesisSession

The synthesis session.


addCondition

public void addCondition(RosCondition condition)

conditionRequired

  • Type: com.aliyun.ros.cdk.core.RosCondition

addCount

public void addCount(java.lang.Number OR IResolvable count)

countRequired

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

addDependency

public void addDependency(Resource resource)

resourceRequired

  • Type: com.aliyun.ros.cdk.core.Resource

addResourceDesc

public void addResourceDesc(java.lang.String desc)

descRequired

  • Type: java.lang.String

applyRemovalPolicy

public void applyRemovalPolicy(RemovalPolicy policy)

policyRequired

  • Type: com.aliyun.ros.cdk.core.RemovalPolicy

getAtt

public IResolvable getAtt(java.lang.String name)

nameRequired

  • Type: java.lang.String

setMetadata

public void setMetadata(java.lang.String key, java.lang.Object value)

keyRequired

  • Type: java.lang.String

valueRequired

  • Type: java.lang.Object

Static Functions

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

isConstruct

import com.aliyun.ros.cdk.ecd.Desktops;
Desktops.isConstruct(java.lang.Object x)

Return whether the given object is a Construct.

xRequired

  • Type: java.lang.Object

Properties

Name Type Description
node com.aliyun.ros.cdk.core.ConstructNode The construct tree node associated with this construct.
ref java.lang.String No description.
stack com.aliyun.ros.cdk.core.Stack The stack in which this resource is defined.
resource com.aliyun.ros.cdk.core.RosResource No description.
attrDesktopId com.aliyun.ros.cdk.core.IResolvable Attribute DesktopId: The ID of the cloud desktop.
attrOrderId com.aliyun.ros.cdk.core.IResolvable Attribute OrderId: The ID of the order.

nodeRequired

public ConstructNode getNode();
  • Type: com.aliyun.ros.cdk.core.ConstructNode

The construct tree node associated with this construct.


refRequired

public java.lang.String getRef();
  • Type: java.lang.String

stackRequired

public Stack getStack();
  • Type: com.aliyun.ros.cdk.core.Stack

The stack in which this resource is defined.


resourceOptional

public RosResource getResource();
  • Type: com.aliyun.ros.cdk.core.RosResource

attrDesktopIdRequired

public IResolvable getAttrDesktopId();
  • Type: com.aliyun.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.


attrOrderIdRequired

public IResolvable getAttrOrderId();
  • Type: com.aliyun.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.