パスワード、インスタンス名、ホスト名、セキュリティグループメンバーシップ、MTU、インスタンスユーザーデータなど、ECS インスタンスの一部のプロパティを変更します。
操作説明
セキュリティ上の理由でロック済みのインスタンスはこの操作をサポートしていません。詳細については、「リソースセキュリティロックが API 呼び出しに与える影響」をご参照ください。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
ecs:ModifyInstanceAttribute |
update |
*Instance
SecurityGroup
|
|
なし |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| InstanceId |
string |
必須 |
インスタンス ID |
i-bp67acfmxazb4ph**** |
| Password |
string |
任意 |
インスタンスのパスワード。パスワードは 8~30 文字で、大文字、小文字、数字、特殊文字のうち少なくとも 3 種類を含む必要があります。次の特殊文字がサポートされています: ()`~!@#$%^&*-_+=|{}[]:;'<>,.?/ 。Windows インスタンスの場合、パスワードは転送スラッシュ (/) で始めることはできません。次の点にご注意ください:
説明
Password パラメーターを指定する場合は、パスワードの漏洩を防ぐために HTTPS を使用してリクエストを送信してください。 |
Test123456&$ |
| HostName |
string |
任意 |
オペレーティングシステムのホスト名。次の点にご注意ください:
ホスト名にはオペレーティングシステムごとに次の制限があります:
|
testHostName |
| InstanceName |
string |
任意 |
インスタンスの名前。名前は 2~128 文字で、大文字、小文字、または中国語の文字で始まる必要があり、 |
testInstanceName |
| Description |
string |
任意 |
インスタンスの説明。説明は 2~256 文字で、 |
testInstanceDescription |
| UserData |
string |
任意 |
インスタンスユーザーデータ。データを渡す前に Base64 エンコーディングすることをお勧めします。次の点にご注意ください:
説明
Base64 エンコーディング前の生データは 32 KB を超えることはできません。パスワードや非公開キーなどの機密情報をプレーンテキストで渡さないでください。機密情報を渡す必要がある場合は、情報を暗号化し、Base64 エンコーディングしてから、インスタンス内で同じ方法で復号してください。 |
ZWNobyBoZWxsbyBlY3Mh |
| Recyclable |
boolean |
任意 |
説明
このパラメーターは招待プレビュー中であり、一般公開されていません。 |
true |
| CreditSpecification |
string |
任意 |
バーストパフォーマンスインスタンスの実行中モード。有効な値:
バーストパフォーマンスインスタンスの実行中モードの詳細については、「バーストパフォーマンスインスタンスとは」をご参照ください。 |
Standard |
| DeletionProtection |
boolean |
任意 |
インスタンスのリリース保護属性。コンソールから、または DeleteInstance を呼び出してインスタンスをリリースできるかどうかを指定します。 説明
この属性は従量課金インスタンスにのみ適用され、手動解放操作のみを防止します。システムによるリリース操作には適用されません。 |
false |
| NetworkInterfaceQueueNumber |
integer |
任意 |
プライマリネットワークインターフェースコントローラー (NIC) のキュー数。次の点にご注意ください:
|
8 |
| SecurityGroupIds |
array |
任意 |
インスタンスが再割り当てされるセキュリティグループの ID。次の点にご注意ください:
説明
セキュリティグループの変更は変更後まもなくインスタンスに反映されますが、わずかな遅延が発生する場合があります。 |
sg-bp15ed6xe1yxeycg7o**** |
|
string |
任意 |
セキュリティグループの ID。 |
sg-bp15ed6xe1yxeycg7o**** |
|
| RemoteConnectionOptions |
object |
任意 |
説明
このパラメーターは招待プレビュー中であり、一般公開されていません。 |
|
| Password |
string |
任意 |
説明
このパラメーターは招待プレビュー中であり、一般公開されていません。 |
hide |
| Type |
string |
任意 |
説明
このパラメーターは招待プレビュー中であり、一般公開されていません。 |
hide |
| EnableJumboFrame |
boolean |
任意 |
インスタンス MTU のジャンボフレーム機能を有効にするかどうかを指定します。有効な値:
次の点にご注意ください:
|
false |
| CpuOptions.Core |
integer |
任意 |
CPU コア数。このパラメーターはカスタム値をサポートしておらず、デフォルト値のみを使用できます。 |
2 |
| CpuOptions.ThreadsPerCore |
integer |
任意 |
CPU コアあたりのスレッド数。ECS インスタンスの vCPU 数 = CpuOptions.Core 値 × CpuOptions.ThreadsPerCore 値。
|
2 |
| CpuOptions.TopologyType |
string |
任意 |
インスタンスの CPU トポロジータイプ。有効な値:
デフォルト値: なし。 次の点にご注意ください:
説明
一部のインスタンスファミリーのみがこのパラメーターをサポートしています。サポートされているインスタンスファミリーの情報については、「CPU トポロジー構造の表示と変更」をご参照ください。 |
DiscreteCoreToHTMapping |
| PrivateDnsNameOptions |
object |
任意 |
インスタンスの非公開ドメイン名構成。 非公開ドメイン名解決の詳細については、「ECS 非公開ドメイン名解決」をご参照ください。 |
|
| EnableInstanceIdDnsARecord |
boolean |
任意 |
インスタンス ID ベースのドメイン名から IPv4 アドレスへの DNS 解決を有効にするかどうかを指定します。有効な値:
デフォルト値: false。 |
false |
| EnableInstanceIdDnsAAAARecord |
boolean |
任意 |
インスタンス ID ベースのドメイン名から IPv6 アドレスへの DNS 解決を有効にするかどうかを指定します。有効な値:
デフォルト値: false。 |
false |
| EnableIpDnsARecord |
boolean |
任意 |
IP ベースのドメイン名から IPv4 アドレスへの DNS 解決を有効にするかどうかを指定します。有効な値:
デフォルト値: false。 |
false |
| EnableIpDnsPtrRecord |
boolean |
任意 |
IPv4 アドレスから IP ベースのドメイン名への逆引き DNS 解決を有効にするかどうかを指定します。有効な値:
デフォルト値: false。 |
false |
| HostnameType |
string |
任意 |
ホスト名タイプ。有効な値:
デフォルト値: Custom。 |
Custom |
| CpuOptions |
object |
任意 |
||
| NestedVirtualization |
string |
任意 |
説明
このパラメーターは招待プレビュー中であり、一般公開されていません。 |
enabled |
| EnableNetworkEncryption |
boolean |
任意 |
VPC ネットワークトラフィックを暗号化するかどうかを指定します。有効な値:
説明
このパラメーターは招待プレビュー中であり、一般公開されていません。 |
true |
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
|||
| RequestId |
string |
リクエスト ID |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
例
成功レスポンス
JSONJSON
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 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. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。