Mengubah beberapa properti instans ECS, termasuk kata sandi, nama instans, hostname, keanggotaan grup keamanan, MTU, dan data pengguna instans.
Deskripsi operasi
Instans yang terkunci karena alasan keamanan tidak mendukung operasi ini. Untuk informasi selengkapnya, lihat Dampak kunci keamanan Sumber daya pada pemanggilan API.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:ModifyInstanceAttribute |
update |
*Instance
SecurityGroup
|
|
None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
ID instans. |
i-bp67acfmxazb4ph**** |
| Password |
string |
No |
Kata sandi instans. Kata sandi harus memiliki panjang 8 hingga 30 karakter dan harus mengandung setidaknya tiga dari jenis karakter berikut: huruf besar, huruf kecil, angka, dan karakter khusus. Karakter khusus berikut didukung: ()`~!@#$%^&*-_+=|{}[]:;'<>,.?/ . Untuk instans Windows, kata sandi tidak boleh diawali dengan garis miring (/). Perhatikan hal-hal berikut:
Catatan
Jika Anda menentukan parameter Password, gunakan HTTPS untuk mengirim permintaan guna menghindari kebocoran kata sandi. |
Test123456&$ |
| HostName |
string |
No |
Hostname sistem operasi. Perhatikan hal-hal berikut:
Hostname memiliki batas berikut untuk sistem operasi yang berbeda:
|
testHostName |
| InstanceName |
string |
No |
Nama instans. Nama harus memiliki panjang 2 hingga 128 karakter. Nama harus diawali dengan huruf besar, huruf kecil, atau karakter Tionghoa, dan tidak boleh diawali dengan |
testInstanceName |
| Description |
string |
No |
Deskripsi instans. Deskripsi harus memiliki panjang 2 hingga 256 karakter dan tidak boleh diawali dengan |
testInstanceDescription |
| UserData |
string |
No |
Data pengguna instans. Kami menyarankan Anda untuk mengodekan data dalam Base64 sebelum meneruskannya. Perhatikan hal-hal berikut:
Catatan
Sebelum pengodean Base64, data mentah tidak boleh melebihi 32 KB. Jangan meneruskan informasi sensitif seperti kata sandi dan kunci privat dalam teks biasa. Jika Anda harus meneruskan informasi sensitif, enkripsi informasi tersebut, kodekan dalam Base64, lalu dekripsi dengan cara yang sama di dalam instans. |
ZWNobyBoZWxsbyBlY3Mh |
| Recyclable |
boolean |
No |
Catatan
Parameter ini berada dalam pratinjau undangan dan tidak tersedia untuk publik. |
true |
| CreditSpecification |
string |
No |
Mode berjalan Instans burstable. Nilai valid:
Untuk informasi selengkapnya tentang mode berjalan Instans burstable, lihat What are burstable instances?. |
Standard |
| DeletionProtection |
boolean |
No |
Atribut perlindungan pelepasan instans. Apakah instans dapat dilepaskan dari konsol atau dengan memanggil DeleteInstance. Catatan
Atribut ini hanya berlaku untuk instans pay-as-you-go dan hanya mencegah operasi pelepasan manual. Atribut ini tidak berlaku untuk operasi pelepasan yang diinisialisasi sistem. |
false |
| NetworkInterfaceQueueNumber |
integer |
No |
Jumlah antrian untuk pengontrol antarmuka jaringan (NIC) utama. Perhatikan hal-hal berikut:
|
8 |
| SecurityGroupIds |
array |
No |
ID grup keamanan tempat instans ditetapkan ulang. Perhatikan hal-hal berikut:
Catatan
Perubahan pada grup keamanan berlaku pada instans sesaat setelah modifikasi, tetapi mungkin terjadi sedikit penundaan. |
sg-bp15ed6xe1yxeycg7o**** |
|
string |
No |
ID grup keamanan. |
sg-bp15ed6xe1yxeycg7o**** |
|
| RemoteConnectionOptions |
object |
No |
Catatan
Parameter ini berada dalam pratinjau undangan dan tidak tersedia untuk publik. |
|
| Password |
string |
No |
Catatan
Parameter ini berada dalam pratinjau undangan dan tidak tersedia untuk publik. |
hide |
| Type |
string |
No |
Catatan
Parameter ini berada dalam pratinjau undangan dan tidak tersedia untuk publik. |
hide |
| EnableJumboFrame |
boolean |
No |
Apakah akan mengaktifkan fitur Jumbo Frame untuk MTU instans. Nilai valid:
Perhatikan hal-hal berikut:
|
false |
| CpuOptions.Core |
integer |
No |
Jumlah inti CPU. Parameter ini tidak mendukung nilai kustom dan hanya dapat menggunakan nilai default. |
2 |
| CpuOptions.ThreadsPerCore |
integer |
No |
Jumlah thread per inti CPU. Jumlah vCPU instans ECS = nilai CpuOptions.Core × nilai CpuOptions.ThreadsPerCore.
|
2 |
| CpuOptions.TopologyType |
string |
No |
Tipe topologi CPU instans. Nilai valid:
Nilai default: none. Perhatikan hal-hal berikut:
Catatan
Hanya beberapa keluarga instans yang mendukung parameter ini. Untuk informasi tentang keluarga instans yang didukung, lihat Melihat dan mengubah struktur topologi CPU. |
DiscreteCoreToHTMapping |
| PrivateDnsNameOptions |
object |
No |
Konfigurasi nama domain privat instans. Untuk informasi selengkapnya tentang resolusi domain privat, lihat ECS private private domain resolution. |
|
| EnableInstanceIdDnsARecord |
boolean |
No |
Apakah akan mengaktifkan resolusi DNS dari nama domain berbasis ID instans ke alamat IPv4. Nilai valid:
Nilai default: false. |
false |
| EnableInstanceIdDnsAAAARecord |
boolean |
No |
Apakah akan mengaktifkan resolusi DNS dari nama domain berbasis ID instans ke alamat IPv6. Nilai valid:
Nilai default: false. |
false |
| EnableIpDnsARecord |
boolean |
No |
Apakah akan mengaktifkan resolusi DNS dari nama domain berbasis IP ke alamat IPv4. Nilai valid:
Nilai default: false. |
false |
| EnableIpDnsPtrRecord |
boolean |
No |
Apakah akan mengaktifkan resolusi DNS terbalik dari alamat IPv4 ke nama domain berbasis IP. Nilai valid:
Nilai default: false. |
false |
| HostnameType |
string |
No |
Tipe hostname. Nilai valid:
Nilai default: Custom. |
Custom |
| CpuOptions |
object |
No |
||
| NestedVirtualization |
string |
No |
Catatan
Parameter ini berada dalam pratinjau undangan dan tidak tersedia untuk publik. |
enabled |
| EnableNetworkEncryption |
boolean |
No |
Apakah akan mengaktifkan enkripsi lalu lintas jaringan VPC. Nilai valid:
Catatan
Parameter ini berada dalam pratinjau undangan dan tidak tersedia untuk publik. |
true |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
ID permintaan. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
Contoh
Respons sukses
JSONformat
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidInstanceName.Malformed | The specified parameter "InstanceName" is not valid. | |
| 400 | InvalidDescription.Malformed | The specified parameter "Description" is not valid. | |
| 400 | InvalidRemoteConnectionOptions.Password | The remote connection password is invalid. | |
| 400 | InvalidRemoteConnectionOptions.Type | The remote connection type is invalid. | |
| 400 | InstanceType.ValueNotSupported | The instance type not supported. | |
| 400 | OSType.ValueNotSupported | The OS type is not supported. | |
| 400 | InvalidHostPassword.Malformed | The specified parameter "Password" is not valid. | |
| 400 | InvalidHostName.Malformed | The specified parameter "HostName" is not valid. | |
| 400 | InvalidPassword.Malformed | The specified parameter "Password" is not valid. | |
| 400 | InvalidUserData.SizeExceeded | The specified parameter "UserData" exceeds the size. | |
| 400 | InvalidUserData.NotSupported | TThe specified parameter "UserData" only support the vpc and IoOptimized Instance. | |
| 400 | ImageNotSupportCloudInit | The specified image does not support cloud-init. | |
| 400 | ChargeTypeViolation | Pay-As-You-Go instances do not support this operation. | |
| 400 | InvalidParameter.RecycleBin | You do not have permission to set recyclable properties. | |
| 400 | InvalidParameter.CreditSpecification | The specified CreditSpecification is not supported in this region. | |
| 400 | InvalidInstanceStatus.CreditSpecRestricted | The current status of the resource does not support this operation. | |
| 400 | InvalidInstanceStatus.NotRunning | The current status of the resource is invalid, you can only do this operation when instance is running. | |
| 400 | InvalidNetworkType.NotSupported | The classic networkType does not support to modify security group | |
| 400 | InvalidOperation.EniCountExceeded | =The maximum number of eni in a enterprise security group is exceeded. | |
| 400 | JoinedGroupLimitExceed | %s | |
| 400 | InvalidParameter | The specified parameter is not valid. | |
| 400 | InvalidOperation.InvalidEcsState | %s | |
| 400 | InvalidParam.NotSupportJumboFrame | Not support jumbo frame. | |
| 400 | InvalidOperation.InstanceStatusNotSupport | The instance status is not support modify mtu config. | |
| 400 | InvalidOperation.InstanceStatusUnsupported | The specified instance status does not support modification of cpu topology type. | |
| 400 | InvalidParameter.CpuOptionsTopologyType | The specified parameter CpuOptions.TopologyType: %s is not valid. | |
| 400 | InvalidInstanceType.NotSupportCpuOptionsTopologyType | The specified instance type does not support CpuOptions.TopologyType: %s. | |
| 400 | InvalidAdditionalInfoPvdConfig.SizeExceeded | The specified parameter AdditionalInfo.PvdConfig exceeds the size. | |
| 400 | InvalidInstanceType.NotSupportHighDensityMode | The specified instance type does not support the use of the high density mode. | |
| 400 | InvalidStatus.StoppedRequired | The current state of the resource does not support this operation, it can only be operated in a stopped state. | |
| 400 | InvalidParameter.CpuOptionsTurboMode | The specified parameter TurboMode is not valid. | |
| 400 | InvalidInstanceType.EnableNVSUnsupported | The specified instance type does not support EnableNVS. | |
| 400 | InvalidInstanceType.EnableVISSTUnsupported | The specified instance type does not support EnableVISST. | |
| 400 | InvalidInstanceType.EnableVRDTUnsupported | The specified instance type does not support EnableVRDT. | |
| 400 | InvalidInstanceType.SingleCoreMaxModeUnsupported | The specified instance type does not support TurboMode: "SINGLE CORE MAX". | |
| 400 | InvalidInstanceType.GpuOptionsConfidentialComputingUnsupported | The specified instance type does not support the confidential computing mode. | |
| 400 | InvalidParameter.GpuOptionsConfidentialComputing | The specified parameter confidential computing mode is not valid. | |
| 400 | InvalidParameterAuthorized.GpuOptionsConfidentialComputing | The specified parameter confidential computing mode is unauthorized. | |
| 400 | InvalidParameter.CpuOptionsNestedVirtualization | The specified parameter CpuOptions.NestedVirtualization: %s is not valid. | |
| 400 | InvalidInstanceType.NotSupportCpuOptionsNestedVirtualization | The specified instance type does not support CpuOptions.NestedVirtualization: %s. | |
| 500 | InternalError | The request processing has failed due to some unknown error. | |
| 403 | IncorrectInstanceStatus | The current status of the resource does not support this operation. | |
| 403 | InstanceLockedForSecurity | The specified operation is denied as your instance is locked for security reasons. | |
| 403 | OperationDenied | The instance amount in the specified SecurityGroup reach its limit. | |
| 403 | InvalidUserData.Forbidden | User not authorized to input the parameter "UserData"please apply for permission "UserData" | |
| 403 | InvalidUserData.Base64FormatInvalid | The specified UserData is not valid | |
| 403 | InvalidChargeType.ValueNotSupported | Deletion protection is only valid for postPaid instance, not for prePaid or spot instance. | |
| 403 | InvalidUser.Unauthorized | The user is not authorized | |
| 403 | EnterpriseGroupLimited.MutliGroupType | The specified instance can not join multi SecurityGroup types. | |
| 403 | SecurityGroupInstanceLimitExceed | %s | |
| 403 | InstanceNotInSecurityGroup | The instance not in the group. | |
| 403 | InvalidOperation.InvalidRegion | %s | |
| 403 | InvalidOperation.ResourceManagedByCloudProduct | %s | |
| 403 | InvalidParameter.InvalidEniQueueNumber | %s | |
| 403 | InvalidOperation.MaxEniQueueNumberExceeded | %s | |
| 403 | InvalidOperation.ExceedInstanceTypeQueueNumber | %s | |
| 403 | InvalidOperation.InstanceTypeNotSupportHighPerformanceTrafficMode | %s | |
| 403 | InvalidParameter.InvalidQueuePairNumber | %s | |
| 403 | InvalidOperation.MaxEniQueuePairNumberExceed | %s | |
| 403 | InvalidOperation.EniQueuePairNumberOverflow | %s | |
| 403 | AclLimitExceed | %s | |
| 403 | InvalidInstanceType.CpuOptionsThreadsPerCoreUnsupported | The current instance type does not support setting or modifying the CpuOptions.ThreadsPerCore parameter. | |
| 403 | InvalidParameter.CpuOptionsCore | The specified parameter CpuOptions.Core is not valid. | |
| 403 | InvalidParameter.CpuOptionsThreadsPerCore | The specified parameter CpuOptions.ThreadsPerCore is not valid. | |
| 403 | InvalidOperation.UserNotSupportNetworkEncryption | User not support network encryption. | |
| 403 | InvalidOperation.InstanceTypeNotSupportNetworkEncryption | The specified instance type does not support network encryption. | |
| 404 | InvalidInstanceId.NotFound | The specified InstanceId does not exist. | |
| 404 | InvalidSecurityGroupId.NotFound | The specified SecurityGroupId does not exist. | |
| 404 | Credit.NotFound | The specified credit information does not exist. | |
| 404 | InvalidInstanceStatus.NeedRestart | The current status of the resource is invalid, you can only do this operation after instance is restarted. | |
| 404 | InvalidParameter.SecurityGroupIdRepeated | The specified security group ids has repeated. | |
| 404 | InvalidSecurityGroupType.NotSupportClassic | The specified SecurityGroupIds have classic group type. | |
| 404 | InvalidSecurityGroupVpc.NotBelongToOneVpc | The specified SecurityGroupIds are belong to different vpc. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.