Updates the properties of a DSW instance.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
paidsw:UpdatePostPaidInstance |
update |
*All Resource
|
None | None |
Request syntax
PUT /api/v2/instances/{InstanceId} HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The instance ID. For more information, see ListInstances. |
dsw-730xxxxxxxxxx |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The instance properties to update. |
|
| InstanceName |
string |
No |
The instance name. The name must meet the following requirements:
|
training_data |
| EcsSpec |
string |
No |
The ECS instance type. For more information, see ListEcsSpecs. |
ecs.c6.large |
| ImageId |
string |
No |
The image ID. For more information, see ListImages. |
image-05cefd0be2exxxx |
| ImageUrl |
string |
No |
The image URL. For more information, see ListImages. |
registry.cn-shanghai.aliyuncs.com/pai_product/tensorflow:py36_cpu_tf1.12_ubuntu |
| UserVpc |
object |
No |
The user VPC configuration. |
|
| VpcId |
string |
No |
The VPC ID. |
vpc-xxxxx |
| VSwitchId |
string |
No |
The vSwitch ID. |
vsw-xxxxx |
| SecurityGroupId |
string |
No |
The security group ID. |
sg-xxxxxx |
| ExtendedCIDRs |
array |
No |
The extended CIDR blocks.
|
["192.168.0.1/24", "192.168.1.1/24"] |
|
string |
No |
The extended CIDR block. |
"172.16.19.0/24","172.16.2.0/24","172.16.12.0/24" |
|
| DefaultRoute |
string |
No |
The default route. Valid values:
|
eth0 |
| ForwardInfos |
array |
No |
The instance port mapping configuration. |
|
| ForwardInfo |
No |
A ForwardInfo object. |
||
| BandwidthLimit |
BandwidthLimit |
No |
||
| Accessibility |
string |
No |
The visibility of the instance. Valid values:
|
PRIVATE |
| Datasets |
array<object> |
No |
The list of datasets. |
|
|
object |
No |
A dataset object. |
||
| DatasetId |
string |
No |
The dataset ID. If the dataset is read-only, you cannot change the access mode to read-write using MountAccess. For more information, see ListDatasets. You cannot specify this parameter if you specify Uri. |
d-vsqjvs****rp5l206u |
| DatasetVersion |
string |
No |
The dataset version. You must specify this parameter together with DatasetId. If you do not specify this parameter, the default value v1 is used. |
v1 |
| Uri |
string |
No |
The URI of a directory in Service Catalog for direct mounting. This parameter is mutually exclusive with DatasetId. The URI formats for different storage types are as follows:
|
oss://bucket-name.oss-cn-shanghai-internal.aliyuncs.com/data/path/ |
| MountPath |
string |
No |
The mount path of the dataset. |
/mnt/data |
| MountAccess |
string |
No |
The read and write permissions for the mounted dataset. If the dataset is read-only, you cannot set the permissions to read-write. Valid values:
|
RW |
| Options |
string |
No |
The custom properties for mounting the dataset. This parameter is supported only for OSS. You cannot specify OptionType when you use this parameter. For more information, see DSW mount configurations. |
{ "fs.oss.download.thread.concurrency": "10", "fs.oss.upload.thread.concurrency": "10", "fs.jindo.args": "-oattr_timeout=3 -oentry_timeout=0 -onegative_timeout=0 -oauto_cache -ono_symlink" } |
OptionType
deprecated
|
string |
No |
The mount type. You cannot specify Options when you use this parameter. This parameter is deprecated. Use the Options parameter instead. |
ReadOnly |
| Dynamic |
boolean |
No |
Specifies whether to enable dynamic mounting. The default value is false.
|
false |
| DisassociateDatasets |
boolean |
No |
Specifies whether to delete the associated datasets.
|
false |
| DisassociateVpc |
boolean |
No |
Specifies whether to delete the associated user VPC. |
false |
| DisassociateForwardInfos |
boolean |
No |
Specifies whether to delete the associated port forwarding information. |
false |
| RequestedResource |
object |
No |
The resource configuration. |
{"CPU":"4","Memory":"8Gi","SharedMemory":"4Gi","GPU":"1","GPUType":"Tesla-V100-16G"} |
| CPU |
string |
No |
The number of CPU cores. |
32 |
| Memory |
string |
No |
The memory size in GB. |
32 |
| SharedMemory |
string |
No |
The shared memory size in GB. |
32 |
| GPU |
string |
No |
The number of GPUs. |
4 |
| GPUType |
string |
No |
The GPU card type. |
v100 |
| WorkspaceSource |
string |
No |
The storage for the working directory. You can mount a disk or a dataset from Datasets to the /mnt/workspace working directory. OSS datasets and dynamically mounted datasets are not supported. You can specify one of the following values:
If you leave this parameter empty:
|
/mnt/data |
| UserId |
string |
No |
The ID of the user who uses the instance. |
16122********** |
| CloudDisks |
array<object> |
No |
The list of disks. |
[] |
|
object |
No |
|||
| Capacity |
string |
No |
If you set Resource Type to Public Resources, or if you set Resource Quota to subscription general computing resources (CPU cores ≥ 2 and memory ≥ 4 GB, or with a GPU configured): Each instance includes a 100 GiB free system disk for persistent storage. If the instance is stopped for more than 15 days, the content on the disk is deleted. You can scale out the disk. The scale-out price is subject to the price displayed on the console. Warning
If you need durable storage, configure dataset mounting or add an OSS, NAS, or CPFS path in Storage Path Mounting. |
100Gi |
| SubType |
string |
No |
The disk type:
|
rootfs |
| Priority |
integer |
No |
The priority. When resources are allocated to instances, instances with higher priorities are given precedence. Valid values: 1 to 9.
|
1 |
| Driver |
string |
No |
The NVIDIA driver configuration. |
535.54.03 |
| DisassociateDriver |
boolean |
No |
Specifies whether to delete the NVIDIA driver configuration. |
false |
| CredentialConfig | CredentialConfig |
No |
The credential configuration. |
|
| DisassociateCredential |
boolean |
No |
Specifies whether to delete the injected credential information. |
false |
| Affinity |
object |
No |
The affinity configuration. |
|
| CPU |
object |
No |
The CPU affinity configuration. This is supported only for subscription general computing instances. |
|
| Enable |
boolean |
No |
Specifies whether to enable CPU affinity.
|
true |
| ImageAuth |
string |
No |
The Base64-encoded username and password for the user's private image. The password part is hidden. |
**** |
| DynamicMount | DynamicMount |
No |
The dynamic mount configuration. |
|
| EnvironmentVariables |
object |
No |
The environment variables to inject into the DSW instance. Warning The environment variables that you specify may overwrite the preset system environment variables. |
{ "ENABLE_TRAIN": "true", "ENABLE_DEBUG":"false", "INSTANCE_ENV":"prod" } |
| DisassociateEnvironmentVariables |
boolean |
No |
Deletes the user-specified environment variables. |
false |
| UserCommand |
object |
No |
The user-defined execution command. |
|
| OnStart |
object |
No |
A custom command that runs every time the instance starts. It runs after the instance environment is initialized but before services such as JupyterLab and code-server start. |
|
| Content |
string |
No |
The content of the custom startup command. |
apt update && echo initialized |
| DisassociateUserCommand |
boolean |
No |
Deletes the user-specified custom command. |
false |
| OversoldType |
string |
No |
The type of idle resources. |
ForceQuotaOverSold:只使用闲时资源 AcceptQuotaOverSold:可接受闲时资源 ForbiddenQuotaOverSold:使用保障资源 |
| DisassociateSpot |
boolean |
No |
||
| SpotSpec |
object |
No |
||
| SpotStrategy |
string |
No |
SpotWithPriceLimit |
|
| SpotPriceLimit |
string |
No |
0.12 |
|
| SpotDuration |
string |
No |
0 |
|
| SpotDiscountLimit |
string |
No |
0.1 |
|
| DisassociateAssignNode |
boolean |
No |
||
| AssignNodeSpec |
object |
No |
||
| NodeNames |
string |
No |
node-a |
|
| AntiAffinityNodeNames |
string |
No |
node-b |
|
| StartInstance |
boolean |
No |
||
| DisassociateMigrationOptions |
boolean |
No |
||
| MigrationOptions |
object |
No |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The execution result. |
||
| RequestId |
string |
The request ID. |
E7D55162-4489-1619-AAF5-3F97D5FCA948 |
| Success |
boolean |
Indicates whether the request was successful. Valid values:
|
true |
| Message |
string |
A message that describes the result. |
"XXX" |
| Code |
string |
The status code. Valid values:
|
null |
| HttpStatusCode |
integer |
The HTTP status code. Valid values:
|
null |
| InstanceId |
string |
The instance ID. |
dsw-730xxxxxxxxxx |
Examples
Success response
JSON format
{
"RequestId": "E7D55162-4489-1619-AAF5-3F97D5FCA948",
"Success": true,
"Message": "\"XXX\"",
"Code": "null",
"HttpStatusCode": 0,
"InstanceId": "dsw-730xxxxxxxxxx"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.