// This file is auto-generated, don't edit it import * as $dara from '@darabonba/typescript'; import OpenApi from '@alicloud/openapi-core'; import { OpenApiUtil, $OpenApiUtil }from '@alicloud/openapi-core'; import * as $_model from './models/model'; export * from './models/model'; export default class Client extends OpenApi { constructor(config: $OpenApiUtil.Config) { super(config); this._endpointRule = "regional"; this._endpointMap = { 'cn-hangzhou': "ecs-cn-hangzhou.aliyuncs.com", 'cn-shanghai-finance-1': "ecs-cn-hangzhou.aliyuncs.com", 'cn-shenzhen-finance-1': "ecs-cn-hangzhou.aliyuncs.com", 'cn-north-2-gov-1': "ecs.aliyuncs.com", 'ap-northeast-2-pop': "ecs.aliyuncs.com", 'cn-beijing-finance-pop': "ecs.aliyuncs.com", 'cn-beijing-gov-1': "ecs.aliyuncs.com", 'cn-beijing-nu16-b01': "ecs-cn-hangzhou.aliyuncs.com", 'cn-edge-1': "ecs.cn-qingdao-nebula.aliyuncs.com", 'cn-fujian': "ecs-cn-hangzhou.aliyuncs.com", 'cn-haidian-cm12-c01': "ecs-cn-hangzhou.aliyuncs.com", 'cn-hangzhou-bj-b01': "ecs-cn-hangzhou.aliyuncs.com", 'cn-hangzhou-finance': "ecs.aliyuncs.com", 'cn-hangzhou-internal-prod-1': "ecs-cn-hangzhou.aliyuncs.com", 'cn-hangzhou-internal-test-1': "ecs-cn-hangzhou.aliyuncs.com", 'cn-hangzhou-internal-test-2': "ecs-cn-hangzhou.aliyuncs.com", 'cn-hangzhou-internal-test-3': "ecs-cn-hangzhou.aliyuncs.com", 'cn-hangzhou-test-306': "ecs-cn-hangzhou.aliyuncs.com", 'cn-hongkong-finance-pop': "ecs.aliyuncs.com", 'cn-huhehaote-nebula-1': "ecs.cn-qingdao-nebula.aliyuncs.com", 'cn-shanghai-et15-b01': "ecs-cn-hangzhou.aliyuncs.com", 'cn-shanghai-et2-b01': "ecs-cn-hangzhou.aliyuncs.com", 'cn-shanghai-inner': "ecs.aliyuncs.com", 'cn-shanghai-internal-test-1': "ecs-cn-hangzhou.aliyuncs.com", 'cn-shenzhen-inner': "ecs.aliyuncs.com", 'cn-shenzhen-st4-d01': "ecs-cn-hangzhou.aliyuncs.com", 'cn-shenzhen-su18-b01': "ecs-cn-hangzhou.aliyuncs.com", 'cn-wuhan': "ecs.aliyuncs.com", 'cn-yushanfang': "ecs.aliyuncs.com", 'cn-zhangbei': "ecs.aliyuncs.com", 'cn-zhangbei-na61-b01': "ecs-cn-hangzhou.aliyuncs.com", 'cn-zhangjiakou-na62-a01': "ecs.cn-zhangjiakou.aliyuncs.com", 'cn-zhengzhou-nebula-1': "ecs.cn-qingdao-nebula.aliyuncs.com", 'eu-west-1-oxs': "ecs.cn-shenzhen-cloudstone.aliyuncs.com", 'rus-west-1-pop': "ecs.aliyuncs.com", }; this.checkConfig(config); this._endpoint = this.getEndpoint("ecs", this._regionId, this._endpointRule, this._network, this._suffix, this._endpointMap, this._endpoint); } getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: {[key: string ]: string}, endpoint: string): string { if (!$dara.isNull(endpoint)) { return endpoint; } if (!$dara.isNull(endpointMap) && !$dara.isNull(endpointMap[regionId])) { return endpointMap[regionId]; } return OpenApiUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix); } /** * dubbo * * @param request - AcceptInquiredSystemEventRequest * @param runtime - runtime options for this request RuntimeOptions * @returns AcceptInquiredSystemEventResponse */ async acceptInquiredSystemEventWithOptions(request: $_model.AcceptInquiredSystemEventRequest, runtime: $dara.RuntimeOptions): Promise<$_model.AcceptInquiredSystemEventResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.choice)) { query["Choice"] = request.choice; } if (!$dara.isNull(request.eventId)) { query["EventId"] = request.eventId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "AcceptInquiredSystemEvent", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.AcceptInquiredSystemEventResponse>(await this.callApi(params, req, runtime), new $_model.AcceptInquiredSystemEventResponse({})); } /** * dubbo * * @param request - AcceptInquiredSystemEventRequest * @returns AcceptInquiredSystemEventResponse */ async acceptInquiredSystemEvent(request: $_model.AcceptInquiredSystemEventRequest): Promise<$_model.AcceptInquiredSystemEventResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.acceptInquiredSystemEventWithOptions(request, runtime); } /** * ActivateRouterInterface * * @deprecated OpenAPI ActivateRouterInterface is deprecated, please use Vpc::2016-04-28::ActivateRouterInterface instead. * * @param request - ActivateRouterInterfaceRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ActivateRouterInterfaceResponse */ async activateRouterInterfaceWithOptions(request: $_model.ActivateRouterInterfaceRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ActivateRouterInterfaceResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.routerInterfaceId)) { query["RouterInterfaceId"] = request.routerInterfaceId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ActivateRouterInterface", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ActivateRouterInterfaceResponse>(await this.callApi(params, req, runtime), new $_model.ActivateRouterInterfaceResponse({})); } /** * ActivateRouterInterface * * @deprecated OpenAPI ActivateRouterInterface is deprecated, please use Vpc::2016-04-28::ActivateRouterInterface instead. * * @param request - ActivateRouterInterfaceRequest * @returns ActivateRouterInterfaceResponse */ // Deprecated async activateRouterInterface(request: $_model.ActivateRouterInterfaceRequest): Promise<$_model.ActivateRouterInterfaceResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.activateRouterInterfaceWithOptions(request, runtime); } /** * AddBandwidthPackageIps * * @deprecated OpenAPI AddBandwidthPackageIps is deprecated * * @param request - AddBandwidthPackageIpsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns AddBandwidthPackageIpsResponse */ async addBandwidthPackageIpsWithOptions(request: $_model.AddBandwidthPackageIpsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.AddBandwidthPackageIpsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.bandwidthPackageId)) { query["BandwidthPackageId"] = request.bandwidthPackageId; } if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.ipCount)) { query["IpCount"] = request.ipCount; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "AddBandwidthPackageIps", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.AddBandwidthPackageIpsResponse>(await this.callApi(params, req, runtime), new $_model.AddBandwidthPackageIpsResponse({})); } /** * AddBandwidthPackageIps * * @deprecated OpenAPI AddBandwidthPackageIps is deprecated * * @param request - AddBandwidthPackageIpsRequest * @returns AddBandwidthPackageIpsResponse */ // Deprecated async addBandwidthPackageIps(request: $_model.AddBandwidthPackageIpsRequest): Promise<$_model.AddBandwidthPackageIpsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.addBandwidthPackageIpsWithOptions(request, runtime); } /** * Adds tags to Elastic Compute Service (ECS) resources, or overwrites tags of ECS resources. You can add tags to ECS resources such as instances, disks, snapshots, images, and security groups for easy management. * * @remarks * When you call this operation, take note of the following items: * * Up to 20 tags can be added to each ECS resource. * * `Tag.N.Key` must match `Tag.N.Value` based on the value of N. * * If you add a tag that has the same key (`Tag.N.Key`) as an existing tag on the specified resource, the new tag value (`Tag.N.Value`) overwrites the original tag value. * * @deprecated OpenAPI AddTags is deprecated, please use Ecs::2014-05-26::TagResources instead. * * @param request - AddTagsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns AddTagsResponse */ async addTagsWithOptions(request: $_model.AddTagsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.AddTagsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceId)) { query["ResourceId"] = request.resourceId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.resourceType)) { query["ResourceType"] = request.resourceType; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "AddTags", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.AddTagsResponse>(await this.callApi(params, req, runtime), new $_model.AddTagsResponse({})); } /** * Adds tags to Elastic Compute Service (ECS) resources, or overwrites tags of ECS resources. You can add tags to ECS resources such as instances, disks, snapshots, images, and security groups for easy management. * * @remarks * When you call this operation, take note of the following items: * * Up to 20 tags can be added to each ECS resource. * * `Tag.N.Key` must match `Tag.N.Value` based on the value of N. * * If you add a tag that has the same key (`Tag.N.Key`) as an existing tag on the specified resource, the new tag value (`Tag.N.Value`) overwrites the original tag value. * * @deprecated OpenAPI AddTags is deprecated, please use Ecs::2014-05-26::TagResources instead. * * @param request - AddTagsRequest * @returns AddTagsResponse */ // Deprecated async addTags(request: $_model.AddTagsRequest): Promise<$_model.AddTagsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.addTagsWithOptions(request, runtime); } /** * Creates pay-as-you-go or subscription dedicated hosts. A dedicated host is a physical server dedicated to a single tenant. You can create Elastic Compute Service (ECS) instances on a dedicated host and view the attributes of a dedicated host. * * @remarks * Before you create a dedicated host, you can call the [DescribeAvailableResource](https://help.aliyun.com/document_detail/66186.html) operation to query the resources available in a specific region or zone. * We recommend that you understand the billing methods of resources before you create a dedicated host. You are charged for resources used by the created dedicated host. For more information, see [Billing overview](https://help.aliyun.com/document_detail/68978.html). * * You can create up to 100 pay-as-you-go or subscription dedicated hosts at a time. * * After a dedicated host is created, you can use the returned dedicated host ID as the value of a request parameter to call the [DescribeDedicatedHosts](https://help.aliyun.com/document_detail/134242.html) operation to query the state of the dedicated host. * * After you submit a request to create a dedicated host, an error is returned if a specific parameter is invalid or if the requested resources are insufficient. For more information about error causes, see the "Error codes" section of this topic. * * After a dedicated host is created, you can call the [ModifyInstanceDeployment](https://help.aliyun.com/document_detail/134248.html) operation to migrate ECS instances from a shared host to the dedicated host. You can also migrate ECS instances from another dedicated host to the created dedicated host. * * @param request - AllocateDedicatedHostsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns AllocateDedicatedHostsResponse */ async allocateDedicatedHostsWithOptions(request: $_model.AllocateDedicatedHostsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.AllocateDedicatedHostsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.actionOnMaintenance)) { query["ActionOnMaintenance"] = request.actionOnMaintenance; } if (!$dara.isNull(request.autoPlacement)) { query["AutoPlacement"] = request.autoPlacement; } if (!$dara.isNull(request.autoReleaseTime)) { query["AutoReleaseTime"] = request.autoReleaseTime; } if (!$dara.isNull(request.autoRenew)) { query["AutoRenew"] = request.autoRenew; } if (!$dara.isNull(request.autoRenewPeriod)) { query["AutoRenewPeriod"] = request.autoRenewPeriod; } if (!$dara.isNull(request.chargeType)) { query["ChargeType"] = request.chargeType; } if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.cpuOverCommitRatio)) { query["CpuOverCommitRatio"] = request.cpuOverCommitRatio; } if (!$dara.isNull(request.dedicatedHostClusterId)) { query["DedicatedHostClusterId"] = request.dedicatedHostClusterId; } if (!$dara.isNull(request.dedicatedHostName)) { query["DedicatedHostName"] = request.dedicatedHostName; } if (!$dara.isNull(request.dedicatedHostType)) { query["DedicatedHostType"] = request.dedicatedHostType; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.minQuantity)) { query["MinQuantity"] = request.minQuantity; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.period)) { query["Period"] = request.period; } if (!$dara.isNull(request.periodUnit)) { query["PeriodUnit"] = request.periodUnit; } if (!$dara.isNull(request.quantity)) { query["Quantity"] = request.quantity; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } if (!$dara.isNull(request.zoneId)) { query["ZoneId"] = request.zoneId; } if (!$dara.isNull(request.networkAttributes)) { query["NetworkAttributes"] = request.networkAttributes; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "AllocateDedicatedHosts", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.AllocateDedicatedHostsResponse>(await this.callApi(params, req, runtime), new $_model.AllocateDedicatedHostsResponse({})); } /** * Creates pay-as-you-go or subscription dedicated hosts. A dedicated host is a physical server dedicated to a single tenant. You can create Elastic Compute Service (ECS) instances on a dedicated host and view the attributes of a dedicated host. * * @remarks * Before you create a dedicated host, you can call the [DescribeAvailableResource](https://help.aliyun.com/document_detail/66186.html) operation to query the resources available in a specific region or zone. * We recommend that you understand the billing methods of resources before you create a dedicated host. You are charged for resources used by the created dedicated host. For more information, see [Billing overview](https://help.aliyun.com/document_detail/68978.html). * * You can create up to 100 pay-as-you-go or subscription dedicated hosts at a time. * * After a dedicated host is created, you can use the returned dedicated host ID as the value of a request parameter to call the [DescribeDedicatedHosts](https://help.aliyun.com/document_detail/134242.html) operation to query the state of the dedicated host. * * After you submit a request to create a dedicated host, an error is returned if a specific parameter is invalid or if the requested resources are insufficient. For more information about error causes, see the "Error codes" section of this topic. * * After a dedicated host is created, you can call the [ModifyInstanceDeployment](https://help.aliyun.com/document_detail/134248.html) operation to migrate ECS instances from a shared host to the dedicated host. You can also migrate ECS instances from another dedicated host to the created dedicated host. * * @param request - AllocateDedicatedHostsRequest * @returns AllocateDedicatedHostsResponse */ async allocateDedicatedHosts(request: $_model.AllocateDedicatedHostsRequest): Promise<$_model.AllocateDedicatedHostsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.allocateDedicatedHostsWithOptions(request, runtime); } /** * AllocateEipAddress * * @remarks * > This operation has been upgraded. We recommend that you do not use it. For information about the new version of this operation, see [AllocateEipAddress](https://help.aliyun.com/document_detail/120192.html). * * @deprecated OpenAPI AllocateEipAddress is deprecated, please use Vpc::2016-04-28::AllocateEipAddress instead. * * @param request - AllocateEipAddressRequest * @param runtime - runtime options for this request RuntimeOptions * @returns AllocateEipAddressResponse */ async allocateEipAddressWithOptions(request: $_model.AllocateEipAddressRequest, runtime: $dara.RuntimeOptions): Promise<$_model.AllocateEipAddressResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.activityId)) { query["ActivityId"] = request.activityId; } if (!$dara.isNull(request.bandwidth)) { query["Bandwidth"] = request.bandwidth; } if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.ISP)) { query["ISP"] = request.ISP; } if (!$dara.isNull(request.internetChargeType)) { query["InternetChargeType"] = request.internetChargeType; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "AllocateEipAddress", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.AllocateEipAddressResponse>(await this.callApi(params, req, runtime), new $_model.AllocateEipAddressResponse({})); } /** * AllocateEipAddress * * @remarks * > This operation has been upgraded. We recommend that you do not use it. For information about the new version of this operation, see [AllocateEipAddress](https://help.aliyun.com/document_detail/120192.html). * * @deprecated OpenAPI AllocateEipAddress is deprecated, please use Vpc::2016-04-28::AllocateEipAddress instead. * * @param request - AllocateEipAddressRequest * @returns AllocateEipAddressResponse */ // Deprecated async allocateEipAddress(request: $_model.AllocateEipAddressRequest): Promise<$_model.AllocateEipAddressResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.allocateEipAddressWithOptions(request, runtime); } /** * Assigns a static public IP address (also called system-assigned public IP address or auto-assigned public IP address) to an Elastic Compute Service (ECS) instance. * * @remarks * ### [](#)Precautions * * The ECS instance to which you want to assign a static public IP address must be in the **Running** (`Running`) or **Stopped** (`Stopped`) state. * * If `OperationLocks` in the response of the DescribeInstances operation contains `"LockReason" : "security"` for an ECS instance, the instance is [locked for security reasons](https://help.aliyun.com/document_detail/25695.html) and cannot be assigned a static public IP address. * * When you call the AllocatePublicIpAddress operation for an ECS instance, make sure that the public bandwidth of the instance is greater than 0 Mbit/s. You can call the [ModifyInstanceNetworkSpec](https://help.aliyun.com/document_detail/2679879.html) operation to change the public bandwidth. * ### [](#)Considerations * * Only users in the whitelist can specify `IpAddress` in the AllocatePublicIpAddress operation. If the public bandwidth of your ECS instance is greater than 0 Mbit/s, you can specify the ID of the instance (`InstanceId`) to randomly assign a static public IP address to the instance. If the public bandwidth of your ECS instance is 0 Mbit/s, you must call the [ModifyInstanceNetworkSpec](https://help.aliyun.com/document_detail/2679879.html) operation to increase the public bandwidth of the instance before you call the AllocatePublicIpAddress operation. * * You can assign only one static public IP address to an ECS instance. If the instance already has a static public IP address, the static public IP address is returned for the `IpAddress` response parameter. * * After you assign a static public IP address to an ECS instance, you must restart the instance ([RebootInstance](https://help.aliyun.com/document_detail/25502.html)) or start the instance ([StartInstance](https://help.aliyun.com/document_detail/25500.html)) for the public IP address to take effect. * If an ECS instance resides in a virtual private cloud (VPC), you can assign a static public IP address to the instance or associate an elastic IP address (EIP) with the instance. For more information, see [AssociateEipAddress](https://help.aliyun.com/document_detail/2518064.html). * * @param request - AllocatePublicIpAddressRequest * @param runtime - runtime options for this request RuntimeOptions * @returns AllocatePublicIpAddressResponse */ async allocatePublicIpAddressWithOptions(request: $_model.AllocatePublicIpAddressRequest, runtime: $dara.RuntimeOptions): Promise<$_model.AllocatePublicIpAddressResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.ipAddress)) { query["IpAddress"] = request.ipAddress; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.vlanId)) { query["VlanId"] = request.vlanId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "AllocatePublicIpAddress", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.AllocatePublicIpAddressResponse>(await this.callApi(params, req, runtime), new $_model.AllocatePublicIpAddressResponse({})); } /** * Assigns a static public IP address (also called system-assigned public IP address or auto-assigned public IP address) to an Elastic Compute Service (ECS) instance. * * @remarks * ### [](#)Precautions * * The ECS instance to which you want to assign a static public IP address must be in the **Running** (`Running`) or **Stopped** (`Stopped`) state. * * If `OperationLocks` in the response of the DescribeInstances operation contains `"LockReason" : "security"` for an ECS instance, the instance is [locked for security reasons](https://help.aliyun.com/document_detail/25695.html) and cannot be assigned a static public IP address. * * When you call the AllocatePublicIpAddress operation for an ECS instance, make sure that the public bandwidth of the instance is greater than 0 Mbit/s. You can call the [ModifyInstanceNetworkSpec](https://help.aliyun.com/document_detail/2679879.html) operation to change the public bandwidth. * ### [](#)Considerations * * Only users in the whitelist can specify `IpAddress` in the AllocatePublicIpAddress operation. If the public bandwidth of your ECS instance is greater than 0 Mbit/s, you can specify the ID of the instance (`InstanceId`) to randomly assign a static public IP address to the instance. If the public bandwidth of your ECS instance is 0 Mbit/s, you must call the [ModifyInstanceNetworkSpec](https://help.aliyun.com/document_detail/2679879.html) operation to increase the public bandwidth of the instance before you call the AllocatePublicIpAddress operation. * * You can assign only one static public IP address to an ECS instance. If the instance already has a static public IP address, the static public IP address is returned for the `IpAddress` response parameter. * * After you assign a static public IP address to an ECS instance, you must restart the instance ([RebootInstance](https://help.aliyun.com/document_detail/25502.html)) or start the instance ([StartInstance](https://help.aliyun.com/document_detail/25500.html)) for the public IP address to take effect. * If an ECS instance resides in a virtual private cloud (VPC), you can assign a static public IP address to the instance or associate an elastic IP address (EIP) with the instance. For more information, see [AssociateEipAddress](https://help.aliyun.com/document_detail/2518064.html). * * @param request - AllocatePublicIpAddressRequest * @returns AllocatePublicIpAddressResponse */ async allocatePublicIpAddress(request: $_model.AllocatePublicIpAddressRequest): Promise<$_model.AllocatePublicIpAddressResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.allocatePublicIpAddressWithOptions(request, runtime); } /** * Applies an automatic snapshot policy to one or more cloud disks. You can call this operation to replace the automatic snapshot policy of a cloud disk. * * @remarks * ## [](#)Usage notes * When you call this operation, note that: * * You can apply only one automatic snapshot policy to each disk. * * You can apply a single automatic snapshot policy to multiple disks. * Feature changes: * By default, only one policy can be applied to a single disk. After the feature is upgraded, a maximum of 10 automatic snapshot policies can be applied to a single disk at the same time to meet the backup requirements of multiple scenarios. * If you need to apply for a whitelist to upgrade the feature, [submit a ticket](https://smartservice.console.aliyun.com/service/create-ticket). * After you upgrade the feature, take note of the following: * * Each cloud disk supports up to 10 automatic snapshot policies. * * If the target cloud disk already has an automatic snapshot policy applied, calling this operation will add to the existing policy rather than replace it. * > To avoid unexpected fees, cancel the automatic snapshot policies that you no longer need. * * @param request - ApplyAutoSnapshotPolicyRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ApplyAutoSnapshotPolicyResponse */ async applyAutoSnapshotPolicyWithOptions(request: $_model.ApplyAutoSnapshotPolicyRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ApplyAutoSnapshotPolicyResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.autoSnapshotPolicyId)) { query["autoSnapshotPolicyId"] = request.autoSnapshotPolicyId; } if (!$dara.isNull(request.diskIds)) { query["diskIds"] = request.diskIds; } if (!$dara.isNull(request.regionId)) { query["regionId"] = request.regionId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ApplyAutoSnapshotPolicy", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ApplyAutoSnapshotPolicyResponse>(await this.callApi(params, req, runtime), new $_model.ApplyAutoSnapshotPolicyResponse({})); } /** * Applies an automatic snapshot policy to one or more cloud disks. You can call this operation to replace the automatic snapshot policy of a cloud disk. * * @remarks * ## [](#)Usage notes * When you call this operation, note that: * * You can apply only one automatic snapshot policy to each disk. * * You can apply a single automatic snapshot policy to multiple disks. * Feature changes: * By default, only one policy can be applied to a single disk. After the feature is upgraded, a maximum of 10 automatic snapshot policies can be applied to a single disk at the same time to meet the backup requirements of multiple scenarios. * If you need to apply for a whitelist to upgrade the feature, [submit a ticket](https://smartservice.console.aliyun.com/service/create-ticket). * After you upgrade the feature, take note of the following: * * Each cloud disk supports up to 10 automatic snapshot policies. * * If the target cloud disk already has an automatic snapshot policy applied, calling this operation will add to the existing policy rather than replace it. * > To avoid unexpected fees, cancel the automatic snapshot policies that you no longer need. * * @param request - ApplyAutoSnapshotPolicyRequest * @returns ApplyAutoSnapshotPolicyResponse */ async applyAutoSnapshotPolicy(request: $_model.ApplyAutoSnapshotPolicyRequest): Promise<$_model.ApplyAutoSnapshotPolicyResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.applyAutoSnapshotPolicyWithOptions(request, runtime); } /** * Assigns one or more IPv6 addresses to an elastic network interface (ENI). * * @remarks * ## [](#)Usage notes * You can specify IPv6 addresses in the CIDR block of the vSwitch to which the ENI is connected. You can also specify the number of IPv6 addresses that the system assigns to the ENI. Take note of the following items: * * IPv6 must be enabled on the vSwitch to which the ENI is connected. For more information, see [Enable IPv6 for a vSwitch](https://help.aliyun.com/document_detail/98923.html). * * The ENI must be in the Available (Available) or InUse (InUse) state. * * If you want to assign IPv6 addresses to a primary ENI, make sure that the Elastic Compute Service (ECS) instance to which the ENI is attached is in the Running (Running) or Stopped (Stopped) state. * * The maximum number of IPv6 addresses that can be assigned to an ENI varies based on the instance type of the instance to which the ENI is attached. * * If the ENI is in the Available (Available) state, up to 10 IPv6 addresses can be assigned to the ENI. * * If the ENI is attached to an ECS instance, the maximum number of IPv6 addresses that can be assigned to the ENI varies based on the instance type. For more information, see [Overview of instance families](https://help.aliyun.com/document_detail/25378.html). * * After the operation is called, you can obtain the IPv6 addresses that are assigned to the ENI from the response. * * @param request - AssignIpv6AddressesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns AssignIpv6AddressesResponse */ async assignIpv6AddressesWithOptions(request: $_model.AssignIpv6AddressesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.AssignIpv6AddressesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.ipv6Address)) { query["Ipv6Address"] = request.ipv6Address; } if (!$dara.isNull(request.ipv6AddressCount)) { query["Ipv6AddressCount"] = request.ipv6AddressCount; } if (!$dara.isNull(request.ipv6Prefix)) { query["Ipv6Prefix"] = request.ipv6Prefix; } if (!$dara.isNull(request.ipv6PrefixCount)) { query["Ipv6PrefixCount"] = request.ipv6PrefixCount; } if (!$dara.isNull(request.networkInterfaceId)) { query["NetworkInterfaceId"] = request.networkInterfaceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "AssignIpv6Addresses", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.AssignIpv6AddressesResponse>(await this.callApi(params, req, runtime), new $_model.AssignIpv6AddressesResponse({})); } /** * Assigns one or more IPv6 addresses to an elastic network interface (ENI). * * @remarks * ## [](#)Usage notes * You can specify IPv6 addresses in the CIDR block of the vSwitch to which the ENI is connected. You can also specify the number of IPv6 addresses that the system assigns to the ENI. Take note of the following items: * * IPv6 must be enabled on the vSwitch to which the ENI is connected. For more information, see [Enable IPv6 for a vSwitch](https://help.aliyun.com/document_detail/98923.html). * * The ENI must be in the Available (Available) or InUse (InUse) state. * * If you want to assign IPv6 addresses to a primary ENI, make sure that the Elastic Compute Service (ECS) instance to which the ENI is attached is in the Running (Running) or Stopped (Stopped) state. * * The maximum number of IPv6 addresses that can be assigned to an ENI varies based on the instance type of the instance to which the ENI is attached. * * If the ENI is in the Available (Available) state, up to 10 IPv6 addresses can be assigned to the ENI. * * If the ENI is attached to an ECS instance, the maximum number of IPv6 addresses that can be assigned to the ENI varies based on the instance type. For more information, see [Overview of instance families](https://help.aliyun.com/document_detail/25378.html). * * After the operation is called, you can obtain the IPv6 addresses that are assigned to the ENI from the response. * * @param request - AssignIpv6AddressesRequest * @returns AssignIpv6AddressesResponse */ async assignIpv6Addresses(request: $_model.AssignIpv6AddressesRequest): Promise<$_model.AssignIpv6AddressesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.assignIpv6AddressesWithOptions(request, runtime); } /** * Assigns secondary private IP addresses to an elastic network interface (ENI). You can specify available private IP addresses within the CIDR block of the vSwitch that is connected to the ENI. Alternatively, you can specify the number of private IP addresses that are automatically assigned from the CIDR block of the vSwitch to the ENI. * * @remarks * ## [](#)Usage notes * * The ENI to which you want to assign IP prefixes must be in the Available (Available) or InUse (InUse) state. * * When you assign private IP addresses to a primary ENI, the Elastic Compute Service (ECS) instance to which the ENI is attached must be in the Running (Running) or Stopped (Stopped) state. * * When an ENI is in the Available state, you can assign up to 49 secondary private IP addresses to the ENI. When an ENI is attached to an instance, the number of secondary private IP addresses that can be assigned to the ENI varies based on the instance type. For more information, see [Overview of instance families](https://help.aliyun.com/document_detail/25378.html). * * After the operation is called, you can obtain the assigned secondary private IP addresses from the response. * * @param request - AssignPrivateIpAddressesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns AssignPrivateIpAddressesResponse */ async assignPrivateIpAddressesWithOptions(request: $_model.AssignPrivateIpAddressesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.AssignPrivateIpAddressesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.ipv4Prefix)) { query["Ipv4Prefix"] = request.ipv4Prefix; } if (!$dara.isNull(request.ipv4PrefixCount)) { query["Ipv4PrefixCount"] = request.ipv4PrefixCount; } if (!$dara.isNull(request.networkInterfaceId)) { query["NetworkInterfaceId"] = request.networkInterfaceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.privateIpAddress)) { query["PrivateIpAddress"] = request.privateIpAddress; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.secondaryPrivateIpAddressCount)) { query["SecondaryPrivateIpAddressCount"] = request.secondaryPrivateIpAddressCount; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "AssignPrivateIpAddresses", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.AssignPrivateIpAddressesResponse>(await this.callApi(params, req, runtime), new $_model.AssignPrivateIpAddressesResponse({})); } /** * Assigns secondary private IP addresses to an elastic network interface (ENI). You can specify available private IP addresses within the CIDR block of the vSwitch that is connected to the ENI. Alternatively, you can specify the number of private IP addresses that are automatically assigned from the CIDR block of the vSwitch to the ENI. * * @remarks * ## [](#)Usage notes * * The ENI to which you want to assign IP prefixes must be in the Available (Available) or InUse (InUse) state. * * When you assign private IP addresses to a primary ENI, the Elastic Compute Service (ECS) instance to which the ENI is attached must be in the Running (Running) or Stopped (Stopped) state. * * When an ENI is in the Available state, you can assign up to 49 secondary private IP addresses to the ENI. When an ENI is attached to an instance, the number of secondary private IP addresses that can be assigned to the ENI varies based on the instance type. For more information, see [Overview of instance families](https://help.aliyun.com/document_detail/25378.html). * * After the operation is called, you can obtain the assigned secondary private IP addresses from the response. * * @param request - AssignPrivateIpAddressesRequest * @returns AssignPrivateIpAddressesResponse */ async assignPrivateIpAddresses(request: $_model.AssignPrivateIpAddressesRequest): Promise<$_model.AssignPrivateIpAddressesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.assignPrivateIpAddressesWithOptions(request, runtime); } /** * AssociateEipAddress * * @deprecated OpenAPI AssociateEipAddress is deprecated, please use Vpc::2016-04-28::AssociateEipAddress instead. * * @param request - AssociateEipAddressRequest * @param runtime - runtime options for this request RuntimeOptions * @returns AssociateEipAddressResponse */ async associateEipAddressWithOptions(request: $_model.AssociateEipAddressRequest, runtime: $dara.RuntimeOptions): Promise<$_model.AssociateEipAddressResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.allocationId)) { query["AllocationId"] = request.allocationId; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.instanceType)) { query["InstanceType"] = request.instanceType; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "AssociateEipAddress", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.AssociateEipAddressResponse>(await this.callApi(params, req, runtime), new $_model.AssociateEipAddressResponse({})); } /** * AssociateEipAddress * * @deprecated OpenAPI AssociateEipAddress is deprecated, please use Vpc::2016-04-28::AssociateEipAddress instead. * * @param request - AssociateEipAddressRequest * @returns AssociateEipAddressResponse */ // Deprecated async associateEipAddress(request: $_model.AssociateEipAddressRequest): Promise<$_model.AssociateEipAddressResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.associateEipAddressWithOptions(request, runtime); } /** * AssociateHaVip * * @deprecated OpenAPI AssociateHaVip is deprecated, please use Vpc::2016-04-28::AssociateHaVip instead. * * @param request - AssociateHaVipRequest * @param runtime - runtime options for this request RuntimeOptions * @returns AssociateHaVipResponse */ async associateHaVipWithOptions(request: $_model.AssociateHaVipRequest, runtime: $dara.RuntimeOptions): Promise<$_model.AssociateHaVipResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.haVipId)) { query["HaVipId"] = request.haVipId; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "AssociateHaVip", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.AssociateHaVipResponse>(await this.callApi(params, req, runtime), new $_model.AssociateHaVipResponse({})); } /** * AssociateHaVip * * @deprecated OpenAPI AssociateHaVip is deprecated, please use Vpc::2016-04-28::AssociateHaVip instead. * * @param request - AssociateHaVipRequest * @returns AssociateHaVipResponse */ // Deprecated async associateHaVip(request: $_model.AssociateHaVipRequest): Promise<$_model.AssociateHaVipResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.associateHaVipWithOptions(request, runtime); } /** * Links an instance that is deployed in the classic network to a virtual private cloud (VPC) by establishing a ClassicLink connection between the instance and the VPC. This way, the instance can communicate with cloud resources in the VPC over the internal network. * * @remarks * When you call this operation, take note of the following items: * * The instance that you want to connect to a VPC must be in the **Running** or **Stopped** state. * * The ClassicLink feature must be enabled for the destination VPC. For more information, see [Create a ClassicLink connection](https://help.aliyun.com/document_detail/65413.html). * * The instance and the VPC must reside in the same region. * * @param request - AttachClassicLinkVpcRequest * @param runtime - runtime options for this request RuntimeOptions * @returns AttachClassicLinkVpcResponse */ async attachClassicLinkVpcWithOptions(request: $_model.AttachClassicLinkVpcRequest, runtime: $dara.RuntimeOptions): Promise<$_model.AttachClassicLinkVpcResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.vpcId)) { query["VpcId"] = request.vpcId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "AttachClassicLinkVpc", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.AttachClassicLinkVpcResponse>(await this.callApi(params, req, runtime), new $_model.AttachClassicLinkVpcResponse({})); } /** * Links an instance that is deployed in the classic network to a virtual private cloud (VPC) by establishing a ClassicLink connection between the instance and the VPC. This way, the instance can communicate with cloud resources in the VPC over the internal network. * * @remarks * When you call this operation, take note of the following items: * * The instance that you want to connect to a VPC must be in the **Running** or **Stopped** state. * * The ClassicLink feature must be enabled for the destination VPC. For more information, see [Create a ClassicLink connection](https://help.aliyun.com/document_detail/65413.html). * * The instance and the VPC must reside in the same region. * * @param request - AttachClassicLinkVpcRequest * @returns AttachClassicLinkVpcResponse */ async attachClassicLinkVpc(request: $_model.AttachClassicLinkVpcRequest): Promise<$_model.AttachClassicLinkVpcResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.attachClassicLinkVpcWithOptions(request, runtime); } /** * Attaches a pay-as-you-go data disk or a system disk to an Elastic Compute Service (ECS) instance. * * @remarks * Take note of the following items: * * The ECS instance and the disk must reside in the same zone. * * The disk must be in the **Unattached** (`Available`) state. * * When you attach the disk as a data disk to an ECS instance, take note of the following items: * * The ECS instance must be in the **Running** (`Running`) or **Stopped** (`Stopped`) state. * * If the disk was separately purchased, the billing method of the disk must be pay-as-you-go. * * If the disk is a system disk that was detached from an ECS instance, no limits apply to the billing method of the disk. * * If the disk is an elastic ephemeral disk that was detached from an ECS instance, the disk can be attached only to the instance. * * When you attach the disk as the system disk to an ECS instance, take note of the following items: * * The ECS instance must be the original instance from which the system disk was detached. * * The ECS instance must be in the **Stopped** (`Stopped`) state. * * You must configure logon credentials for the ECS instance. * * The disk cannot be an elastic ephemeral disk. * * For more information about how to attach a system disk, see [Detach or attach a system disk](https://help.aliyun.com/document_detail/146752.html). * * If the response contains `{"OperationLocks": {"LockReason" : "security"}}` when you query information about an ECS instance, the instance is locked for security reasons. No operations are allowed on the instance. * * @param request - AttachDiskRequest * @param runtime - runtime options for this request RuntimeOptions * @returns AttachDiskResponse */ async attachDiskWithOptions(request: $_model.AttachDiskRequest, runtime: $dara.RuntimeOptions): Promise<$_model.AttachDiskResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.bootable)) { query["Bootable"] = request.bootable; } if (!$dara.isNull(request.deleteWithInstance)) { query["DeleteWithInstance"] = request.deleteWithInstance; } if (!$dara.isNull(request.device)) { query["Device"] = request.device; } if (!$dara.isNull(request.diskId)) { query["DiskId"] = request.diskId; } if (!$dara.isNull(request.force)) { query["Force"] = request.force; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.keyPairName)) { query["KeyPairName"] = request.keyPairName; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.password)) { query["Password"] = request.password; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "AttachDisk", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.AttachDiskResponse>(await this.callApi(params, req, runtime), new $_model.AttachDiskResponse({})); } /** * Attaches a pay-as-you-go data disk or a system disk to an Elastic Compute Service (ECS) instance. * * @remarks * Take note of the following items: * * The ECS instance and the disk must reside in the same zone. * * The disk must be in the **Unattached** (`Available`) state. * * When you attach the disk as a data disk to an ECS instance, take note of the following items: * * The ECS instance must be in the **Running** (`Running`) or **Stopped** (`Stopped`) state. * * If the disk was separately purchased, the billing method of the disk must be pay-as-you-go. * * If the disk is a system disk that was detached from an ECS instance, no limits apply to the billing method of the disk. * * If the disk is an elastic ephemeral disk that was detached from an ECS instance, the disk can be attached only to the instance. * * When you attach the disk as the system disk to an ECS instance, take note of the following items: * * The ECS instance must be the original instance from which the system disk was detached. * * The ECS instance must be in the **Stopped** (`Stopped`) state. * * You must configure logon credentials for the ECS instance. * * The disk cannot be an elastic ephemeral disk. * * For more information about how to attach a system disk, see [Detach or attach a system disk](https://help.aliyun.com/document_detail/146752.html). * * If the response contains `{"OperationLocks": {"LockReason" : "security"}}` when you query information about an ECS instance, the instance is locked for security reasons. No operations are allowed on the instance. * * @param request - AttachDiskRequest * @returns AttachDiskResponse */ async attachDisk(request: $_model.AttachDiskRequest): Promise<$_model.AttachDiskResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.attachDiskWithOptions(request, runtime); } /** * Attaches an instance Resource Access Management (RAM) role to Elastic Compute Service (ECS) instances. * * @remarks * You can call the [DescribeInstanceRamRole](https://help.aliyun.com/document_detail/2679686.html) operation to query the [instance RAM roles](https://help.aliyun.com/document_detail/61175.html) that are attached to ECS instances. * > If an ECS instance already has an instance RAM role, an error is returned when you attach another instance RAM role to the instance. * * @param request - AttachInstanceRamRoleRequest * @param runtime - runtime options for this request RuntimeOptions * @returns AttachInstanceRamRoleResponse */ async attachInstanceRamRoleWithOptions(request: $_model.AttachInstanceRamRoleRequest, runtime: $dara.RuntimeOptions): Promise<$_model.AttachInstanceRamRoleResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.instanceIds)) { query["InstanceIds"] = request.instanceIds; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.policy)) { query["Policy"] = request.policy; } if (!$dara.isNull(request.ramRoleName)) { query["RamRoleName"] = request.ramRoleName; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "AttachInstanceRamRole", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.AttachInstanceRamRoleResponse>(await this.callApi(params, req, runtime), new $_model.AttachInstanceRamRoleResponse({})); } /** * Attaches an instance Resource Access Management (RAM) role to Elastic Compute Service (ECS) instances. * * @remarks * You can call the [DescribeInstanceRamRole](https://help.aliyun.com/document_detail/2679686.html) operation to query the [instance RAM roles](https://help.aliyun.com/document_detail/61175.html) that are attached to ECS instances. * > If an ECS instance already has an instance RAM role, an error is returned when you attach another instance RAM role to the instance. * * @param request - AttachInstanceRamRoleRequest * @returns AttachInstanceRamRoleResponse */ async attachInstanceRamRole(request: $_model.AttachInstanceRamRoleRequest): Promise<$_model.AttachInstanceRamRoleResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.attachInstanceRamRoleWithOptions(request, runtime); } /** * Binds an SSH key pair to one or more Linux instances. * * @remarks * Take note of the following items: * * SSH key pairs are not supported on Windows instances. * * If an SSH key pair is bound to an instance, authentication by using the username and password is disabled for the instance. * * If you bind an SSH key pair to an instance in the **running** state, you must call the [RebootInstance](https://help.aliyun.com/document_detail/25502.html) operation to restart the instance for the key pair to take effect. * * If you bind an SSH key pair to an instance in the **stopped** state, you must call the [StartInstance](https://help.aliyun.com/document_detail/25500.html) operation to start the instance for the key pair to take effect. * * If an instance is already bound to an SSH key pair, the new SSH key pair will replace the original one. * * @param request - AttachKeyPairRequest * @param runtime - runtime options for this request RuntimeOptions * @returns AttachKeyPairResponse */ async attachKeyPairWithOptions(request: $_model.AttachKeyPairRequest, runtime: $dara.RuntimeOptions): Promise<$_model.AttachKeyPairResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.instanceIds)) { query["InstanceIds"] = request.instanceIds; } if (!$dara.isNull(request.keyPairName)) { query["KeyPairName"] = request.keyPairName; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "AttachKeyPair", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.AttachKeyPairResponse>(await this.callApi(params, req, runtime), new $_model.AttachKeyPairResponse({})); } /** * Binds an SSH key pair to one or more Linux instances. * * @remarks * Take note of the following items: * * SSH key pairs are not supported on Windows instances. * * If an SSH key pair is bound to an instance, authentication by using the username and password is disabled for the instance. * * If you bind an SSH key pair to an instance in the **running** state, you must call the [RebootInstance](https://help.aliyun.com/document_detail/25502.html) operation to restart the instance for the key pair to take effect. * * If you bind an SSH key pair to an instance in the **stopped** state, you must call the [StartInstance](https://help.aliyun.com/document_detail/25500.html) operation to start the instance for the key pair to take effect. * * If an instance is already bound to an SSH key pair, the new SSH key pair will replace the original one. * * @param request - AttachKeyPairRequest * @returns AttachKeyPairResponse */ async attachKeyPair(request: $_model.AttachKeyPairRequest): Promise<$_model.AttachKeyPairResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.attachKeyPairWithOptions(request, runtime); } /** * Attaches an elastic network interface (ENI) to an Elastic Compute Service (ECS) instance that resides in a virtual private cloud (VPC). When you call this operation, you can specify parameters, such as NetworkInterfaceId, InstanceId, and NetworkCardIndex, in the request. * * @remarks * Take note of the following items: * * The ENI must be in the **Available** state. You can attach an ENI to only one instance that resides in the same zone and VPC as the ENI. * * The instance must be in the Running or Stopped state. When you attach ENIs to instances of specific instance types, make sure that the instances are in the Stopped state. For more information, see the "Instance types of the ECS instances that must be in the Stopped (Stopped) state" section in the [Bind an ENI](https://help.aliyun.com/document_detail/58503.html) topic. * >If the last start time of the instance (including the start time of the instance if it is a new instance, the last restart time of the instance, and the last reactivation time of the instance) is before April 1st, 2018 and the instance is in the Running state, you must call the RebootInstance operation to restart the instance. If you do not call the RebootInstance operation to restart the instance, you cannot attach the ENI to the instance. * * You can attach multiple ENIs to one instance. For more information, see [ENI overview](https://help.aliyun.com/document_detail/58496.html). * * The vSwitch to which the ENI is connected must be in the same zone and VPC as the vSwitch to which the instance is connected. * * This operation is an asynchronous operation. After you call this operation to attach an ENI, you can view the status or events of the ENI to check whether the ENI is attached. The following figure shows the transitions between the statuses of the ENI. * ![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/en-US/20230223/vqky/AttachNetworkInterface.png) * - If the ENI is in the Attaching state, the ENI attachment request is sent and the ENI is being attached to the specified instance. * - If the ENI is in the InUse state, the ENI is attached to the specified instance. * - If the ENI is in the Available state, the ENI failed to be attached. * **For examples on how to call this operation, see** [Attach an ENI](https://help.aliyun.com/document_detail/471550.html). * * @param request - AttachNetworkInterfaceRequest * @param runtime - runtime options for this request RuntimeOptions * @returns AttachNetworkInterfaceResponse */ async attachNetworkInterfaceWithOptions(request: $_model.AttachNetworkInterfaceRequest, runtime: $dara.RuntimeOptions): Promise<$_model.AttachNetworkInterfaceResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.networkCardIndex)) { query["NetworkCardIndex"] = request.networkCardIndex; } if (!$dara.isNull(request.networkInterfaceId)) { query["NetworkInterfaceId"] = request.networkInterfaceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.trunkNetworkInstanceId)) { query["TrunkNetworkInstanceId"] = request.trunkNetworkInstanceId; } if (!$dara.isNull(request.waitForNetworkConfigurationReady)) { query["WaitForNetworkConfigurationReady"] = request.waitForNetworkConfigurationReady; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "AttachNetworkInterface", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.AttachNetworkInterfaceResponse>(await this.callApi(params, req, runtime), new $_model.AttachNetworkInterfaceResponse({})); } /** * Attaches an elastic network interface (ENI) to an Elastic Compute Service (ECS) instance that resides in a virtual private cloud (VPC). When you call this operation, you can specify parameters, such as NetworkInterfaceId, InstanceId, and NetworkCardIndex, in the request. * * @remarks * Take note of the following items: * * The ENI must be in the **Available** state. You can attach an ENI to only one instance that resides in the same zone and VPC as the ENI. * * The instance must be in the Running or Stopped state. When you attach ENIs to instances of specific instance types, make sure that the instances are in the Stopped state. For more information, see the "Instance types of the ECS instances that must be in the Stopped (Stopped) state" section in the [Bind an ENI](https://help.aliyun.com/document_detail/58503.html) topic. * >If the last start time of the instance (including the start time of the instance if it is a new instance, the last restart time of the instance, and the last reactivation time of the instance) is before April 1st, 2018 and the instance is in the Running state, you must call the RebootInstance operation to restart the instance. If you do not call the RebootInstance operation to restart the instance, you cannot attach the ENI to the instance. * * You can attach multiple ENIs to one instance. For more information, see [ENI overview](https://help.aliyun.com/document_detail/58496.html). * * The vSwitch to which the ENI is connected must be in the same zone and VPC as the vSwitch to which the instance is connected. * * This operation is an asynchronous operation. After you call this operation to attach an ENI, you can view the status or events of the ENI to check whether the ENI is attached. The following figure shows the transitions between the statuses of the ENI. * ![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/en-US/20230223/vqky/AttachNetworkInterface.png) * - If the ENI is in the Attaching state, the ENI attachment request is sent and the ENI is being attached to the specified instance. * - If the ENI is in the InUse state, the ENI is attached to the specified instance. * - If the ENI is in the Available state, the ENI failed to be attached. * **For examples on how to call this operation, see** [Attach an ENI](https://help.aliyun.com/document_detail/471550.html). * * @param request - AttachNetworkInterfaceRequest * @returns AttachNetworkInterfaceResponse */ async attachNetworkInterface(request: $_model.AttachNetworkInterfaceRequest): Promise<$_model.AttachNetworkInterfaceResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.attachNetworkInterfaceWithOptions(request, runtime); } /** * Creates inbound security group rules in a security group. You can use the created rules to allow or deny inbound traffic from other objects to Elastic Compute Service (ECS) instances in the security group for fine-grained network access control. * * @remarks * ### [](#)Precautions * * **Quantity limit**: The maximum number of inbound and outbound rules in all security groups associated with an elastic network interface (ENI) cannot exceed 1,000. For more information, see the [Security groups](~~25412#SecurityGroupQuota1~~) section of the "Limits and quotas on ECS" topic. * * **Rule priorities**: For inbound security group rules, the valid values of Priority range from 1 to 100. A smaller value indicates a higher priority. When multiple security group rules have the same priority, drop rules take precedence. * ### [](#)Considerations * If the security group rule that you call the AuthorizeSecurityGroup operation to create exists in the security group, the call is successful but no security group rule is created. * ### [](#)Parameters that define a security group rule * Define an inbound security group rule by configuring the following parameters together: * * Source: You can specify one parameter from SourceCidrIp (IPv4 address), Ipv6SourceCidrIp (IPv6 address), SourcetPrefixListId (prefix list ID), and SourceGroupId (source security group ID). * * PortRange: specifies the range of destination port numbers. * * IpProtocol: specifies the protocol. * * Policy: specifies the action. * > Advanced security groups do not support security group rules that reference security groups as authorization objects. Each basic security group can contain up to 20 security group rules that reference security groups as authorization objects. * ### [](#)Sample requests * Sample requests to create inbound security group rules that control access from different sources in a security group in the China (Hangzhou) region: * * Sample request to create an inbound security group rule that controls access from a specific CIDR block: * "RegionId":"cn-hangzhou", // Specify the region. * "SecurityGroupId":"sg-bp67acfmxazb4p****", // Specify the security group. * "Permissions":[ * { * "SourceCidrIp":"10.0.0.0/8", // Specify the source IPv4 CIDR block. * "PortRange":"22/22", // Specify the port range. * "IpProtocol":"TCP", // Specify the protocol. * "Policy":"Accept" // Specify the action. * } * ] * * Sample request to create an inbound security group rule that controls access from a security group and an inbound security group rule that controls access from a prefix list: * "RegionId":"cn-hangzhou", * "SecurityGroupId":"sg-bp67acfmxazb4p****", * "Permissions":[ * { * "SourceGroupId":"sg-bp17vs63txqxbd****", // Specify the source security group. * "PortRange":"22/22", * "IpProtocol":"TCP", * "Policy":"Drop" * },{ * "SourcePrefixListId":"pl-x1j1k5ykzqlixdcy****", // Specify the source prefix list. * "PortRange":"22/22", * "IpProtocol":"TCP", * "Policy":"Drop" * } * ] * * @param request - AuthorizeSecurityGroupRequest * @param runtime - runtime options for this request RuntimeOptions * @returns AuthorizeSecurityGroupResponse */ async authorizeSecurityGroupWithOptions(request: $_model.AuthorizeSecurityGroupRequest, runtime: $dara.RuntimeOptions): Promise<$_model.AuthorizeSecurityGroupResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.destCidrIp)) { query["DestCidrIp"] = request.destCidrIp; } if (!$dara.isNull(request.ipProtocol)) { query["IpProtocol"] = request.ipProtocol; } if (!$dara.isNull(request.ipv6DestCidrIp)) { query["Ipv6DestCidrIp"] = request.ipv6DestCidrIp; } if (!$dara.isNull(request.ipv6SourceCidrIp)) { query["Ipv6SourceCidrIp"] = request.ipv6SourceCidrIp; } if (!$dara.isNull(request.nicType)) { query["NicType"] = request.nicType; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.permissions)) { query["Permissions"] = request.permissions; } if (!$dara.isNull(request.policy)) { query["Policy"] = request.policy; } if (!$dara.isNull(request.portRange)) { query["PortRange"] = request.portRange; } if (!$dara.isNull(request.priority)) { query["Priority"] = request.priority; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.securityGroupId)) { query["SecurityGroupId"] = request.securityGroupId; } if (!$dara.isNull(request.securityGroupId)) { query["SecurityGroupId"] = request.securityGroupId; } if (!$dara.isNull(request.sourceCidrIp)) { query["SourceCidrIp"] = request.sourceCidrIp; } if (!$dara.isNull(request.sourceGroupId)) { query["SourceGroupId"] = request.sourceGroupId; } if (!$dara.isNull(request.sourceGroupOwnerAccount)) { query["SourceGroupOwnerAccount"] = request.sourceGroupOwnerAccount; } if (!$dara.isNull(request.sourceGroupOwnerId)) { query["SourceGroupOwnerId"] = request.sourceGroupOwnerId; } if (!$dara.isNull(request.sourcePortRange)) { query["SourcePortRange"] = request.sourcePortRange; } if (!$dara.isNull(request.sourcePrefixListId)) { query["SourcePrefixListId"] = request.sourcePrefixListId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "AuthorizeSecurityGroup", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.AuthorizeSecurityGroupResponse>(await this.callApi(params, req, runtime), new $_model.AuthorizeSecurityGroupResponse({})); } /** * Creates inbound security group rules in a security group. You can use the created rules to allow or deny inbound traffic from other objects to Elastic Compute Service (ECS) instances in the security group for fine-grained network access control. * * @remarks * ### [](#)Precautions * * **Quantity limit**: The maximum number of inbound and outbound rules in all security groups associated with an elastic network interface (ENI) cannot exceed 1,000. For more information, see the [Security groups](~~25412#SecurityGroupQuota1~~) section of the "Limits and quotas on ECS" topic. * * **Rule priorities**: For inbound security group rules, the valid values of Priority range from 1 to 100. A smaller value indicates a higher priority. When multiple security group rules have the same priority, drop rules take precedence. * ### [](#)Considerations * If the security group rule that you call the AuthorizeSecurityGroup operation to create exists in the security group, the call is successful but no security group rule is created. * ### [](#)Parameters that define a security group rule * Define an inbound security group rule by configuring the following parameters together: * * Source: You can specify one parameter from SourceCidrIp (IPv4 address), Ipv6SourceCidrIp (IPv6 address), SourcetPrefixListId (prefix list ID), and SourceGroupId (source security group ID). * * PortRange: specifies the range of destination port numbers. * * IpProtocol: specifies the protocol. * * Policy: specifies the action. * > Advanced security groups do not support security group rules that reference security groups as authorization objects. Each basic security group can contain up to 20 security group rules that reference security groups as authorization objects. * ### [](#)Sample requests * Sample requests to create inbound security group rules that control access from different sources in a security group in the China (Hangzhou) region: * * Sample request to create an inbound security group rule that controls access from a specific CIDR block: * "RegionId":"cn-hangzhou", // Specify the region. * "SecurityGroupId":"sg-bp67acfmxazb4p****", // Specify the security group. * "Permissions":[ * { * "SourceCidrIp":"10.0.0.0/8", // Specify the source IPv4 CIDR block. * "PortRange":"22/22", // Specify the port range. * "IpProtocol":"TCP", // Specify the protocol. * "Policy":"Accept" // Specify the action. * } * ] * * Sample request to create an inbound security group rule that controls access from a security group and an inbound security group rule that controls access from a prefix list: * "RegionId":"cn-hangzhou", * "SecurityGroupId":"sg-bp67acfmxazb4p****", * "Permissions":[ * { * "SourceGroupId":"sg-bp17vs63txqxbd****", // Specify the source security group. * "PortRange":"22/22", * "IpProtocol":"TCP", * "Policy":"Drop" * },{ * "SourcePrefixListId":"pl-x1j1k5ykzqlixdcy****", // Specify the source prefix list. * "PortRange":"22/22", * "IpProtocol":"TCP", * "Policy":"Drop" * } * ] * * @param request - AuthorizeSecurityGroupRequest * @returns AuthorizeSecurityGroupResponse */ async authorizeSecurityGroup(request: $_model.AuthorizeSecurityGroupRequest): Promise<$_model.AuthorizeSecurityGroupResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.authorizeSecurityGroupWithOptions(request, runtime); } /** * Creates outbound rules in a security group. You can use the created rules to allow or deny outbound traffic from Elastic Compute Service (ECS) instances in the security group to other objects for fine-grained network access control. * * @remarks * ### [](#)Precautions * * **Quantity limit**: The maximum number of inbound and outbound rules in all security groups associated with an elastic network interface (ENI) cannot exceed 1,000. For more information, see the [Security group limits](~~25412#SecurityGroupQuota1~~) section of the "Limits" topic. * * **Rule priorities**: For outbound security group rules, the valid values of Priority range from 1 to 100. A smaller value indicates a higher priority. When multiple security group rules have the same priority, drop rules take precedence. * ### [](#)Considerations * If the security group rule that you call the AuthorizeSecurityGroupEgress operation to create exists in the security group, the call is successful but no security group rule is created. * ### [](#)Parameters that define a security group rule * Define an outbound security group rule by configuring the following parameters together: * * One of the following parameters: DestCidrIp, Ipv6DestCidrIp, DestPrefixListId, and DestGroupId. DestCidrIp specifies the destination IPv4 CIDR block. Ipv6DestCidrIp specifies the destination IPv6 CIDR block. DestPrefixListId specifies the ID of the destination prefix list. DestGroupId specifies the destination security group. * * PortRange: specifies the range of destination port numbers. * * IpProtocol: specifies the protocol. * * Policy: specifies the action. * > Advanced security groups do not support security group rules that reference security groups as authorization objects. Each basic security group can contain up to 20 security group rules that reference security groups as authorization objects. * ### [](#)Sample requests * Sample requests to create outbound security group rules that control access to different destinations in a security group in the China (Hangzhou) region: * * Sample request to create an outbound security group rule that controls access to a specified CIDR block: * "RegionId":"cn-hangzhou", // The region ID. * "SecurityGroupId":"sg-bp17vs63txqxbds9***", // The ID of the source security group. * "Permissions":[ * { * "DestCidrIp":"10.0.0.0/8", // The destination IPv4 CIDR block. * "PortRange":"-1/-1", // The range of destination port numbers. * "IpProtocol":"ICMP", //T he protocol. "Policy":"Accept" // Specify the action. * } * ] * * Sample request to create an outbound security group rule that controls access to a security group and an outbound security group rule that controls access to a prefix list: * "RegionId":"cn-hangzhou", * "SecurityGroupId":"sg-bp17vs63txqxbds9***", * "Permissions":[ * { * "DestGroupId":"sg-bp67acfmxazb4pi***", // The ID of the destination security group. * "PortRange":"22/22", * "IpProtocol":"TCP", * "Policy":"Drop" * },{ * "DestPrefixListId":"pl-x1j1k5ykzqlixdcy****", // The destination prefix list. * "PortRange":"22/22", * "IpProtocol":"TCP", * "Policy":"Drop" * } * ] * * @param request - AuthorizeSecurityGroupEgressRequest * @param runtime - runtime options for this request RuntimeOptions * @returns AuthorizeSecurityGroupEgressResponse */ async authorizeSecurityGroupEgressWithOptions(request: $_model.AuthorizeSecurityGroupEgressRequest, runtime: $dara.RuntimeOptions): Promise<$_model.AuthorizeSecurityGroupEgressResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.destCidrIp)) { query["DestCidrIp"] = request.destCidrIp; } if (!$dara.isNull(request.destGroupId)) { query["DestGroupId"] = request.destGroupId; } if (!$dara.isNull(request.destGroupOwnerAccount)) { query["DestGroupOwnerAccount"] = request.destGroupOwnerAccount; } if (!$dara.isNull(request.destGroupOwnerId)) { query["DestGroupOwnerId"] = request.destGroupOwnerId; } if (!$dara.isNull(request.destPrefixListId)) { query["DestPrefixListId"] = request.destPrefixListId; } if (!$dara.isNull(request.ipProtocol)) { query["IpProtocol"] = request.ipProtocol; } if (!$dara.isNull(request.ipv6DestCidrIp)) { query["Ipv6DestCidrIp"] = request.ipv6DestCidrIp; } if (!$dara.isNull(request.ipv6SourceCidrIp)) { query["Ipv6SourceCidrIp"] = request.ipv6SourceCidrIp; } if (!$dara.isNull(request.nicType)) { query["NicType"] = request.nicType; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.permissions)) { query["Permissions"] = request.permissions; } if (!$dara.isNull(request.policy)) { query["Policy"] = request.policy; } if (!$dara.isNull(request.portRange)) { query["PortRange"] = request.portRange; } if (!$dara.isNull(request.priority)) { query["Priority"] = request.priority; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.securityGroupId)) { query["SecurityGroupId"] = request.securityGroupId; } if (!$dara.isNull(request.securityGroupId)) { query["SecurityGroupId"] = request.securityGroupId; } if (!$dara.isNull(request.sourceCidrIp)) { query["SourceCidrIp"] = request.sourceCidrIp; } if (!$dara.isNull(request.sourcePortRange)) { query["SourcePortRange"] = request.sourcePortRange; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "AuthorizeSecurityGroupEgress", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.AuthorizeSecurityGroupEgressResponse>(await this.callApi(params, req, runtime), new $_model.AuthorizeSecurityGroupEgressResponse({})); } /** * Creates outbound rules in a security group. You can use the created rules to allow or deny outbound traffic from Elastic Compute Service (ECS) instances in the security group to other objects for fine-grained network access control. * * @remarks * ### [](#)Precautions * * **Quantity limit**: The maximum number of inbound and outbound rules in all security groups associated with an elastic network interface (ENI) cannot exceed 1,000. For more information, see the [Security group limits](~~25412#SecurityGroupQuota1~~) section of the "Limits" topic. * * **Rule priorities**: For outbound security group rules, the valid values of Priority range from 1 to 100. A smaller value indicates a higher priority. When multiple security group rules have the same priority, drop rules take precedence. * ### [](#)Considerations * If the security group rule that you call the AuthorizeSecurityGroupEgress operation to create exists in the security group, the call is successful but no security group rule is created. * ### [](#)Parameters that define a security group rule * Define an outbound security group rule by configuring the following parameters together: * * One of the following parameters: DestCidrIp, Ipv6DestCidrIp, DestPrefixListId, and DestGroupId. DestCidrIp specifies the destination IPv4 CIDR block. Ipv6DestCidrIp specifies the destination IPv6 CIDR block. DestPrefixListId specifies the ID of the destination prefix list. DestGroupId specifies the destination security group. * * PortRange: specifies the range of destination port numbers. * * IpProtocol: specifies the protocol. * * Policy: specifies the action. * > Advanced security groups do not support security group rules that reference security groups as authorization objects. Each basic security group can contain up to 20 security group rules that reference security groups as authorization objects. * ### [](#)Sample requests * Sample requests to create outbound security group rules that control access to different destinations in a security group in the China (Hangzhou) region: * * Sample request to create an outbound security group rule that controls access to a specified CIDR block: * "RegionId":"cn-hangzhou", // The region ID. * "SecurityGroupId":"sg-bp17vs63txqxbds9***", // The ID of the source security group. * "Permissions":[ * { * "DestCidrIp":"10.0.0.0/8", // The destination IPv4 CIDR block. * "PortRange":"-1/-1", // The range of destination port numbers. * "IpProtocol":"ICMP", //T he protocol. "Policy":"Accept" // Specify the action. * } * ] * * Sample request to create an outbound security group rule that controls access to a security group and an outbound security group rule that controls access to a prefix list: * "RegionId":"cn-hangzhou", * "SecurityGroupId":"sg-bp17vs63txqxbds9***", * "Permissions":[ * { * "DestGroupId":"sg-bp67acfmxazb4pi***", // The ID of the destination security group. * "PortRange":"22/22", * "IpProtocol":"TCP", * "Policy":"Drop" * },{ * "DestPrefixListId":"pl-x1j1k5ykzqlixdcy****", // The destination prefix list. * "PortRange":"22/22", * "IpProtocol":"TCP", * "Policy":"Drop" * } * ] * * @param request - AuthorizeSecurityGroupEgressRequest * @returns AuthorizeSecurityGroupEgressResponse */ async authorizeSecurityGroupEgress(request: $_model.AuthorizeSecurityGroupEgressRequest): Promise<$_model.AuthorizeSecurityGroupEgressResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.authorizeSecurityGroupEgressWithOptions(request, runtime); } /** * Disables automatic snapshot policies for one or more disks. * * @param request - CancelAutoSnapshotPolicyRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CancelAutoSnapshotPolicyResponse */ async cancelAutoSnapshotPolicyWithOptions(request: $_model.CancelAutoSnapshotPolicyRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CancelAutoSnapshotPolicyResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.autoSnapshotPolicyId)) { query["autoSnapshotPolicyId"] = request.autoSnapshotPolicyId; } if (!$dara.isNull(request.diskIds)) { query["diskIds"] = request.diskIds; } if (!$dara.isNull(request.regionId)) { query["regionId"] = request.regionId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CancelAutoSnapshotPolicy", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CancelAutoSnapshotPolicyResponse>(await this.callApi(params, req, runtime), new $_model.CancelAutoSnapshotPolicyResponse({})); } /** * Disables automatic snapshot policies for one or more disks. * * @param request - CancelAutoSnapshotPolicyRequest * @returns CancelAutoSnapshotPolicyResponse */ async cancelAutoSnapshotPolicy(request: $_model.CancelAutoSnapshotPolicyRequest): Promise<$_model.CancelAutoSnapshotPolicyResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.cancelAutoSnapshotPolicyWithOptions(request, runtime); } /** * Cancels an ongoing image copy task. * * @remarks * When you call this operation, take note of the following items: * * After you cancel an image copy task, the image copy created in the destination region is deleted, and the copied image remains unchanged. * * If the image copy task is complete, the CancelCopyImage operation fails, and an error is returned. * * @param request - CancelCopyImageRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CancelCopyImageResponse */ async cancelCopyImageWithOptions(request: $_model.CancelCopyImageRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CancelCopyImageResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.imageId)) { query["ImageId"] = request.imageId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CancelCopyImage", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CancelCopyImageResponse>(await this.callApi(params, req, runtime), new $_model.CancelCopyImageResponse({})); } /** * Cancels an ongoing image copy task. * * @remarks * When you call this operation, take note of the following items: * * After you cancel an image copy task, the image copy created in the destination region is deleted, and the copied image remains unchanged. * * If the image copy task is complete, the CancelCopyImage operation fails, and an error is returned. * * @param request - CancelCopyImageRequest * @returns CancelCopyImageResponse */ async cancelCopyImage(request: $_model.CancelCopyImageRequest): Promise<$_model.CancelCopyImageResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.cancelCopyImageWithOptions(request, runtime); } /** * Cancels an image building task. * * @remarks * Before you call the CancelImagePipelineExecution operation, make sure that the image building task to be canceled is in the BUILDING, PREPARING, or REPAIRING state. * * @param request - CancelImagePipelineExecutionRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CancelImagePipelineExecutionResponse */ async cancelImagePipelineExecutionWithOptions(request: $_model.CancelImagePipelineExecutionRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CancelImagePipelineExecutionResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.executionId)) { query["ExecutionId"] = request.executionId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.templateTag)) { query["TemplateTag"] = request.templateTag; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CancelImagePipelineExecution", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CancelImagePipelineExecutionResponse>(await this.callApi(params, req, runtime), new $_model.CancelImagePipelineExecutionResponse({})); } /** * Cancels an image building task. * * @remarks * Before you call the CancelImagePipelineExecution operation, make sure that the image building task to be canceled is in the BUILDING, PREPARING, or REPAIRING state. * * @param request - CancelImagePipelineExecutionRequest * @returns CancelImagePipelineExecutionResponse */ async cancelImagePipelineExecution(request: $_model.CancelImagePipelineExecutionRequest): Promise<$_model.CancelImagePipelineExecutionResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.cancelImagePipelineExecutionWithOptions(request, runtime); } /** * CancelPhysicalConnection * * @deprecated OpenAPI CancelPhysicalConnection is deprecated, please use Vpc::2016-04-28::CancelPhysicalConnection instead. * * @param request - CancelPhysicalConnectionRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CancelPhysicalConnectionResponse */ async cancelPhysicalConnectionWithOptions(request: $_model.CancelPhysicalConnectionRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CancelPhysicalConnectionResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.physicalConnectionId)) { query["PhysicalConnectionId"] = request.physicalConnectionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.userCidr)) { query["UserCidr"] = request.userCidr; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CancelPhysicalConnection", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CancelPhysicalConnectionResponse>(await this.callApi(params, req, runtime), new $_model.CancelPhysicalConnectionResponse({})); } /** * CancelPhysicalConnection * * @deprecated OpenAPI CancelPhysicalConnection is deprecated, please use Vpc::2016-04-28::CancelPhysicalConnection instead. * * @param request - CancelPhysicalConnectionRequest * @returns CancelPhysicalConnectionResponse */ // Deprecated async cancelPhysicalConnection(request: $_model.CancelPhysicalConnectionRequest): Promise<$_model.CancelPhysicalConnectionResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.cancelPhysicalConnectionWithOptions(request, runtime); } /** * Cancels simulated system events that are in the Scheduled or Executing state. After you cancel a simulated system event, the simulated event enters the Canceled state. * * @param request - CancelSimulatedSystemEventsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CancelSimulatedSystemEventsResponse */ async cancelSimulatedSystemEventsWithOptions(request: $_model.CancelSimulatedSystemEventsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CancelSimulatedSystemEventsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.eventId)) { query["EventId"] = request.eventId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CancelSimulatedSystemEvents", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CancelSimulatedSystemEventsResponse>(await this.callApi(params, req, runtime), new $_model.CancelSimulatedSystemEventsResponse({})); } /** * Cancels simulated system events that are in the Scheduled or Executing state. After you cancel a simulated system event, the simulated event enters the Canceled state. * * @param request - CancelSimulatedSystemEventsRequest * @returns CancelSimulatedSystemEventsResponse */ async cancelSimulatedSystemEvents(request: $_model.CancelSimulatedSystemEventsRequest): Promise<$_model.CancelSimulatedSystemEventsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.cancelSimulatedSystemEventsWithOptions(request, runtime); } /** * Cancels a running task. You can cancel the running tasks generated by the ImportImage or ExportImage operation. * * @param request - CancelTaskRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CancelTaskResponse */ async cancelTaskWithOptions(request: $_model.CancelTaskRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CancelTaskResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.taskId)) { query["TaskId"] = request.taskId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CancelTask", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CancelTaskResponse>(await this.callApi(params, req, runtime), new $_model.CancelTaskResponse({})); } /** * Cancels a running task. You can cancel the running tasks generated by the ImportImage or ExportImage operation. * * @param request - CancelTaskRequest * @returns CancelTaskResponse */ async cancelTask(request: $_model.CancelTaskRequest): Promise<$_model.CancelTaskResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.cancelTaskWithOptions(request, runtime); } /** * ConnectRouterInterface * * @deprecated OpenAPI ConnectRouterInterface is deprecated, please use Vpc::2016-04-28::ConnectRouterInterface instead. * * @param request - ConnectRouterInterfaceRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ConnectRouterInterfaceResponse */ async connectRouterInterfaceWithOptions(request: $_model.ConnectRouterInterfaceRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ConnectRouterInterfaceResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.routerInterfaceId)) { query["RouterInterfaceId"] = request.routerInterfaceId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ConnectRouterInterface", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ConnectRouterInterfaceResponse>(await this.callApi(params, req, runtime), new $_model.ConnectRouterInterfaceResponse({})); } /** * ConnectRouterInterface * * @deprecated OpenAPI ConnectRouterInterface is deprecated, please use Vpc::2016-04-28::ConnectRouterInterface instead. * * @param request - ConnectRouterInterfaceRequest * @returns ConnectRouterInterfaceResponse */ // Deprecated async connectRouterInterface(request: $_model.ConnectRouterInterfaceRequest): Promise<$_model.ConnectRouterInterfaceResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.connectRouterInterfaceWithOptions(request, runtime); } /** * Converts the static public IP address of an Elastic Compute Service (ECS) instance that resides in a virtual private cloud (VPC) into an elastic IP address (EIP). Static public IP addresses are the public IP addresses that are automatically assigned to ECS instances. * * @remarks * ## [](#)Usage notes * After a public IP address is converted into an EIP, the EIP is billed separately. Make sure that you fully understand the billing methods of EIPs. For more information, see [Billing overview](https://help.aliyun.com/document_detail/122035.html). * When you call this operation, make sure that the ECS instance meets the following requirements: * * The instance is in the **Stopped** (`Stopped`) or **Running** (`Running`) state. * * The instance has no EIPs associated. * * The instance has no configuration change tasks that have not taken effect. * * The public bandwidth of the instance is not 0 Mbit/s. * * If the instance is a subscription instance, the billing method for network usage of the instance must be `pay-by-traffic`. The public IP address of a subscription instance that uses the `pay-by-bandwidth` billing method for network usage cannot be converted into an EIP. This requirement does not apply to pay-as-you-go instances. For more information, see [Change the billing method for network usage](https://help.aliyun.com/document_detail/178883.html). * * If the instance is a subscription instance that resides in a VPC, the instance does not expire within 24 hours. * * @param request - ConvertNatPublicIpToEipRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ConvertNatPublicIpToEipResponse */ async convertNatPublicIpToEipWithOptions(request: $_model.ConvertNatPublicIpToEipRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ConvertNatPublicIpToEipResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ConvertNatPublicIpToEip", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ConvertNatPublicIpToEipResponse>(await this.callApi(params, req, runtime), new $_model.ConvertNatPublicIpToEipResponse({})); } /** * Converts the static public IP address of an Elastic Compute Service (ECS) instance that resides in a virtual private cloud (VPC) into an elastic IP address (EIP). Static public IP addresses are the public IP addresses that are automatically assigned to ECS instances. * * @remarks * ## [](#)Usage notes * After a public IP address is converted into an EIP, the EIP is billed separately. Make sure that you fully understand the billing methods of EIPs. For more information, see [Billing overview](https://help.aliyun.com/document_detail/122035.html). * When you call this operation, make sure that the ECS instance meets the following requirements: * * The instance is in the **Stopped** (`Stopped`) or **Running** (`Running`) state. * * The instance has no EIPs associated. * * The instance has no configuration change tasks that have not taken effect. * * The public bandwidth of the instance is not 0 Mbit/s. * * If the instance is a subscription instance, the billing method for network usage of the instance must be `pay-by-traffic`. The public IP address of a subscription instance that uses the `pay-by-bandwidth` billing method for network usage cannot be converted into an EIP. This requirement does not apply to pay-as-you-go instances. For more information, see [Change the billing method for network usage](https://help.aliyun.com/document_detail/178883.html). * * If the instance is a subscription instance that resides in a VPC, the instance does not expire within 24 hours. * * @param request - ConvertNatPublicIpToEipRequest * @returns ConvertNatPublicIpToEipResponse */ async convertNatPublicIpToEip(request: $_model.ConvertNatPublicIpToEipRequest): Promise<$_model.ConvertNatPublicIpToEipResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.convertNatPublicIpToEipWithOptions(request, runtime); } /** * Copies a custom image from one region to another region. You can copy custom images to deploy or copy Elastic Compute Service (ECS) instances across regions. * * @remarks * ## [](#)Usage notes * After you copy a custom image to the destination region, you can use the image copy (new image) to create ECS instances by calling the RunInstances operation or replace the system disks of instances by calling the ReplaceSystemDisk operation in the destination region. * Take note of the following items: * * Only custom images that are in the `Available` state can be copied. * * Custom images that belong to your Alibaba Cloud account can be copied across regions. Images that are shared with you by others can be copied only within the regions where the images reside. * * When an image is being copied, the new image cannot be deleted by calling the [DeleteImage](https://help.aliyun.com/document_detail/25537.html) operation. However, you can cancel the ongoing image copy task by calling the [CancelCopyImage](https://help.aliyun.com/document_detail/25539.html) operation. * * A region supports only up to five concurrent image copy tasks. Excess image copy tasks are queued for execution. * * You can configure `ResourceGroupId` to specify the resource group to which to assign the new image. If you do not configure `ResourceGroupId`, the new image is assigned to the default resource group. * * @param request - CopyImageRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CopyImageResponse */ async copyImageWithOptions(request: $_model.CopyImageRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CopyImageResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.destinationDescription)) { query["DestinationDescription"] = request.destinationDescription; } if (!$dara.isNull(request.destinationImageName)) { query["DestinationImageName"] = request.destinationImageName; } if (!$dara.isNull(request.destinationRegionId)) { query["DestinationRegionId"] = request.destinationRegionId; } if (!$dara.isNull(request.dryRun)) { query["DryRun"] = request.dryRun; } if (!$dara.isNull(request.encryptAlgorithm)) { query["EncryptAlgorithm"] = request.encryptAlgorithm; } if (!$dara.isNull(request.encrypted)) { query["Encrypted"] = request.encrypted; } if (!$dara.isNull(request.imageId)) { query["ImageId"] = request.imageId; } if (!$dara.isNull(request.KMSKeyId)) { query["KMSKeyId"] = request.KMSKeyId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CopyImage", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CopyImageResponse>(await this.callApi(params, req, runtime), new $_model.CopyImageResponse({})); } /** * Copies a custom image from one region to another region. You can copy custom images to deploy or copy Elastic Compute Service (ECS) instances across regions. * * @remarks * ## [](#)Usage notes * After you copy a custom image to the destination region, you can use the image copy (new image) to create ECS instances by calling the RunInstances operation or replace the system disks of instances by calling the ReplaceSystemDisk operation in the destination region. * Take note of the following items: * * Only custom images that are in the `Available` state can be copied. * * Custom images that belong to your Alibaba Cloud account can be copied across regions. Images that are shared with you by others can be copied only within the regions where the images reside. * * When an image is being copied, the new image cannot be deleted by calling the [DeleteImage](https://help.aliyun.com/document_detail/25537.html) operation. However, you can cancel the ongoing image copy task by calling the [CancelCopyImage](https://help.aliyun.com/document_detail/25539.html) operation. * * A region supports only up to five concurrent image copy tasks. Excess image copy tasks are queued for execution. * * You can configure `ResourceGroupId` to specify the resource group to which to assign the new image. If you do not configure `ResourceGroupId`, the new image is assigned to the default resource group. * * @param request - CopyImageRequest * @returns CopyImageResponse */ async copyImage(request: $_model.CopyImageRequest): Promise<$_model.CopyImageResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.copyImageWithOptions(request, runtime); } /** * Copies a standard or encrypted snapshot from one region to another. * * @remarks * When you call this operation, take note of the following item: * * New snapshots (snapshot copies) cannot be used to roll back the disks for which source snapshots (copied snapshots) were created. * * Local snapshots cannot be copied. * * @param request - CopySnapshotRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CopySnapshotResponse */ async copySnapshotWithOptions(request: $_model.CopySnapshotRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CopySnapshotResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.arn)) { query["Arn"] = request.arn; } if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.destinationRegionId)) { query["DestinationRegionId"] = request.destinationRegionId; } if (!$dara.isNull(request.destinationSnapshotDescription)) { query["DestinationSnapshotDescription"] = request.destinationSnapshotDescription; } if (!$dara.isNull(request.destinationSnapshotName)) { query["DestinationSnapshotName"] = request.destinationSnapshotName; } if (!$dara.isNull(request.destinationStorageLocationArn)) { query["DestinationStorageLocationArn"] = request.destinationStorageLocationArn; } if (!$dara.isNull(request.encrypted)) { query["Encrypted"] = request.encrypted; } if (!$dara.isNull(request.KMSKeyId)) { query["KMSKeyId"] = request.KMSKeyId; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.retentionDays)) { query["RetentionDays"] = request.retentionDays; } if (!$dara.isNull(request.snapshotId)) { query["SnapshotId"] = request.snapshotId; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CopySnapshot", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CopySnapshotResponse>(await this.callApi(params, req, runtime), new $_model.CopySnapshotResponse({})); } /** * Copies a standard or encrypted snapshot from one region to another. * * @remarks * When you call this operation, take note of the following item: * * New snapshots (snapshot copies) cannot be used to roll back the disks for which source snapshots (copied snapshots) were created. * * Local snapshots cannot be copied. * * @param request - CopySnapshotRequest * @returns CopySnapshotResponse */ async copySnapshot(request: $_model.CopySnapshotRequest): Promise<$_model.CopySnapshotResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.copySnapshotWithOptions(request, runtime); } /** * Creates an activation code. The activation code is used to register servers that are not provided by Alibaba Cloud as Alibaba Cloud managed instances. * * @remarks * ## [](#)Usage notes * After you use an activation code to register a server that is not provided by Alibaba Cloud as an Alibaba Cloud managed instance, you can use various online services of Alibaba Cloud, such as Cloud Assistant, CloudOps Orchestration Service (OOS), and Apsara Devops, on the managed instance. * If a server is not provided by Alibaba Cloud, you can register the server as an Alibaba Cloud managed instance only if the server has Internet connectivity and runs one of the following operating systems: * * Alibaba Cloud Linux 2, Alibaba Cloud Linux 3, or later * * CentOS 6, CentOS 7, CentOS 8, or later * * Debian 8, Debian 9, Debian 10, or later * * Ubuntu 12, Ubuntu 14, Ubuntu 16, Ubuntu 18, or later * * CoreOS * * OpenSUSE * * Red Hat 5, Red Hat 6, Red Hat 7, or later * * SUSE Linux Enterprise Server 11, SUSE Linux Enterprise Server 12, SUSE Linux Enterprise Server 15, or later * * Windows Server 2012, Windows Server 2016, Windows Server 2019, or later * You can have up to 5,000 activation codes per Alibaba Cloud region. When the number of activation codes exceeds 1,000, the usage of the activation codes must be greater than 50% before you can create additional activation codes. * > To obtain the usage of activation codes, go to the **ECS Cloud Assistant** page in the Elastic Compute Service (ECS) console, click the **Manage Instances** tab, and then click **Register Instance**. * * @param request - CreateActivationRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CreateActivationResponse */ async createActivationWithOptions(request: $_model.CreateActivationRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreateActivationResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.instanceCount)) { query["InstanceCount"] = request.instanceCount; } if (!$dara.isNull(request.instanceName)) { query["InstanceName"] = request.instanceName; } if (!$dara.isNull(request.ipAddressRange)) { query["IpAddressRange"] = request.ipAddressRange; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } if (!$dara.isNull(request.timeToLiveInHours)) { query["TimeToLiveInHours"] = request.timeToLiveInHours; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CreateActivation", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CreateActivationResponse>(await this.callApi(params, req, runtime), new $_model.CreateActivationResponse({})); } /** * Creates an activation code. The activation code is used to register servers that are not provided by Alibaba Cloud as Alibaba Cloud managed instances. * * @remarks * ## [](#)Usage notes * After you use an activation code to register a server that is not provided by Alibaba Cloud as an Alibaba Cloud managed instance, you can use various online services of Alibaba Cloud, such as Cloud Assistant, CloudOps Orchestration Service (OOS), and Apsara Devops, on the managed instance. * If a server is not provided by Alibaba Cloud, you can register the server as an Alibaba Cloud managed instance only if the server has Internet connectivity and runs one of the following operating systems: * * Alibaba Cloud Linux 2, Alibaba Cloud Linux 3, or later * * CentOS 6, CentOS 7, CentOS 8, or later * * Debian 8, Debian 9, Debian 10, or later * * Ubuntu 12, Ubuntu 14, Ubuntu 16, Ubuntu 18, or later * * CoreOS * * OpenSUSE * * Red Hat 5, Red Hat 6, Red Hat 7, or later * * SUSE Linux Enterprise Server 11, SUSE Linux Enterprise Server 12, SUSE Linux Enterprise Server 15, or later * * Windows Server 2012, Windows Server 2016, Windows Server 2019, or later * You can have up to 5,000 activation codes per Alibaba Cloud region. When the number of activation codes exceeds 1,000, the usage of the activation codes must be greater than 50% before you can create additional activation codes. * > To obtain the usage of activation codes, go to the **ECS Cloud Assistant** page in the Elastic Compute Service (ECS) console, click the **Manage Instances** tab, and then click **Register Instance**. * * @param request - CreateActivationRequest * @returns CreateActivationResponse */ async createActivation(request: $_model.CreateActivationRequest): Promise<$_model.CreateActivationResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.createActivationWithOptions(request, runtime); } /** * Creates an auto provisioning group. * * @remarks * ## [](#)Usage notes * * Auto Provisioning is a service that allows quick deployment of an instance cluster that consists of spot instances and pay-as-you-go instances. Auto Provisioning supports push-button deployment of instance clusters across different billing methods, instance families, and zones. For more information, see [Use auto provisioning group-related API operations to create multiple ECS instances at the same time](https://help.aliyun.com/document_detail/200772.html). * * Auto Provisioning uses auto provisioning groups to schedule and maintain computing resources. You can use auto provisioning groups to obtain a steady supply of computing resources. This helps reduce the impact on compute capacity when spot instances are reclaimed. * * Auto Provisioning is provided free of charge. However, you are charged for instance resources that are created in auto provisioning groups. For more information, see [Overview of spot instances](https://help.aliyun.com/document_detail/52088.html) and [Pay-as-you-go](https://help.aliyun.com/document_detail/40653.html). * * When you specify both a launch template (`LaunchTemplateId`) and extended configurations (`LaunchConfiguration.*` parameters), LaunchTemplateId takes precedence. * * @param tmpReq - CreateAutoProvisioningGroupRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CreateAutoProvisioningGroupResponse */ async createAutoProvisioningGroupWithOptions(tmpReq: $_model.CreateAutoProvisioningGroupRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreateAutoProvisioningGroupResponse> { tmpReq.validate(); let request = new $_model.CreateAutoProvisioningGroupShrinkRequest({ }); OpenApiUtil.convert(tmpReq, request); if (!$dara.isNull(tmpReq.resourcePoolOptions)) { request.resourcePoolOptionsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.resourcePoolOptions, "ResourcePoolOptions", "json"); } let query = { }; if (!$dara.isNull(request.autoProvisioningGroupName)) { query["AutoProvisioningGroupName"] = request.autoProvisioningGroupName; } if (!$dara.isNull(request.autoProvisioningGroupType)) { query["AutoProvisioningGroupType"] = request.autoProvisioningGroupType; } if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.dataDiskConfig)) { query["DataDiskConfig"] = request.dataDiskConfig; } if (!$dara.isNull(request.defaultTargetCapacityType)) { query["DefaultTargetCapacityType"] = request.defaultTargetCapacityType; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.excessCapacityTerminationPolicy)) { query["ExcessCapacityTerminationPolicy"] = request.excessCapacityTerminationPolicy; } if (!$dara.isNull(request.executionMode)) { query["ExecutionMode"] = request.executionMode; } if (!$dara.isNull(request.hibernationOptionsConfigured)) { query["HibernationOptionsConfigured"] = request.hibernationOptionsConfigured; } if (!$dara.isNull(request.launchTemplateConfig)) { query["LaunchTemplateConfig"] = request.launchTemplateConfig; } if (!$dara.isNull(request.launchTemplateId)) { query["LaunchTemplateId"] = request.launchTemplateId; } if (!$dara.isNull(request.launchTemplateVersion)) { query["LaunchTemplateVersion"] = request.launchTemplateVersion; } if (!$dara.isNull(request.maxSpotPrice)) { query["MaxSpotPrice"] = request.maxSpotPrice; } if (!$dara.isNull(request.minTargetCapacity)) { query["MinTargetCapacity"] = request.minTargetCapacity; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.payAsYouGoAllocationStrategy)) { query["PayAsYouGoAllocationStrategy"] = request.payAsYouGoAllocationStrategy; } if (!$dara.isNull(request.payAsYouGoTargetCapacity)) { query["PayAsYouGoTargetCapacity"] = request.payAsYouGoTargetCapacity; } if (!$dara.isNull(request.prePaidOptions)) { query["PrePaidOptions"] = request.prePaidOptions; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.resourcePoolOptionsShrink)) { query["ResourcePoolOptions"] = request.resourcePoolOptionsShrink; } if (!$dara.isNull(request.spotAllocationStrategy)) { query["SpotAllocationStrategy"] = request.spotAllocationStrategy; } if (!$dara.isNull(request.spotInstanceInterruptionBehavior)) { query["SpotInstanceInterruptionBehavior"] = request.spotInstanceInterruptionBehavior; } if (!$dara.isNull(request.spotInstancePoolsToUseCount)) { query["SpotInstancePoolsToUseCount"] = request.spotInstancePoolsToUseCount; } if (!$dara.isNull(request.spotTargetCapacity)) { query["SpotTargetCapacity"] = request.spotTargetCapacity; } if (!$dara.isNull(request.systemDiskConfig)) { query["SystemDiskConfig"] = request.systemDiskConfig; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } if (!$dara.isNull(request.terminateInstances)) { query["TerminateInstances"] = request.terminateInstances; } if (!$dara.isNull(request.terminateInstancesWithExpiration)) { query["TerminateInstancesWithExpiration"] = request.terminateInstancesWithExpiration; } if (!$dara.isNull(request.totalTargetCapacity)) { query["TotalTargetCapacity"] = request.totalTargetCapacity; } if (!$dara.isNull(request.validFrom)) { query["ValidFrom"] = request.validFrom; } if (!$dara.isNull(request.validUntil)) { query["ValidUntil"] = request.validUntil; } if (!$dara.isNull(request.launchConfiguration)) { query["LaunchConfiguration"] = request.launchConfiguration; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CreateAutoProvisioningGroup", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CreateAutoProvisioningGroupResponse>(await this.callApi(params, req, runtime), new $_model.CreateAutoProvisioningGroupResponse({})); } /** * Creates an auto provisioning group. * * @remarks * ## [](#)Usage notes * * Auto Provisioning is a service that allows quick deployment of an instance cluster that consists of spot instances and pay-as-you-go instances. Auto Provisioning supports push-button deployment of instance clusters across different billing methods, instance families, and zones. For more information, see [Use auto provisioning group-related API operations to create multiple ECS instances at the same time](https://help.aliyun.com/document_detail/200772.html). * * Auto Provisioning uses auto provisioning groups to schedule and maintain computing resources. You can use auto provisioning groups to obtain a steady supply of computing resources. This helps reduce the impact on compute capacity when spot instances are reclaimed. * * Auto Provisioning is provided free of charge. However, you are charged for instance resources that are created in auto provisioning groups. For more information, see [Overview of spot instances](https://help.aliyun.com/document_detail/52088.html) and [Pay-as-you-go](https://help.aliyun.com/document_detail/40653.html). * * When you specify both a launch template (`LaunchTemplateId`) and extended configurations (`LaunchConfiguration.*` parameters), LaunchTemplateId takes precedence. * * @param request - CreateAutoProvisioningGroupRequest * @returns CreateAutoProvisioningGroupResponse */ async createAutoProvisioningGroup(request: $_model.CreateAutoProvisioningGroupRequest): Promise<$_model.CreateAutoProvisioningGroupResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.createAutoProvisioningGroupWithOptions(request, runtime); } /** * Creates an automatic snapshot policy in a specific region. You can specify the schedule on which to create automatic snapshots, the retention period of the automatic snapshots, and whether to enable cross-region replication for the snapshots in the automatic snapshot policy. The automatic snapshot policy can be applied to create snapshots for system disks or data disks to back up disk data. * * @remarks * Before you call this operation, learn about how to [create an automatic snapshot policy](https://help.aliyun.com/document_detail/127767.html). * Take note of the following items: * * You can create up to 100 automatic snapshot policies per region for a single Alibaba Cloud account. If the maximum number of automatic snapshots for a disk is reached and a new snapshot creation task is created, the system deletes the oldest automatic snapshot of the disk. * * If the instance to which a disk is attached is being stopped or restarted, the system cannot create snapshots for the disk based on the associated automatic snapshot policy. * * If cross-region snapshot replication is enabled and no encryption parameters are configured, encrypted snapshots are copied to the destination region and snapshot copies are encrypted by using the service key of the destination region. For more information about the limits on cross-region snapshot replication, see [Copy a snapshot](https://help.aliyun.com/document_detail/159441.html). * After the automatic snapshot policy is created, call the [ApplyAutoSnapshotPolicy](https://help.aliyun.com/document_detail/25531.html) operation to apply the policy to disks. If you want to modify the automatic snapshot policy, call the [ModifyAutoSnapshotPolicyEx](https://help.aliyun.com/document_detail/25529.html) operation. * * @param request - CreateAutoSnapshotPolicyRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CreateAutoSnapshotPolicyResponse */ async createAutoSnapshotPolicyWithOptions(request: $_model.CreateAutoSnapshotPolicyRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreateAutoSnapshotPolicyResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.copiedSnapshotsRetentionDays)) { query["CopiedSnapshotsRetentionDays"] = request.copiedSnapshotsRetentionDays; } if (!$dara.isNull(request.copyEncryptionConfiguration)) { query["CopyEncryptionConfiguration"] = request.copyEncryptionConfiguration; } if (!$dara.isNull(request.enableCrossRegionCopy)) { query["EnableCrossRegionCopy"] = request.enableCrossRegionCopy; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.storageLocationArn)) { query["StorageLocationArn"] = request.storageLocationArn; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } if (!$dara.isNull(request.targetCopyRegions)) { query["TargetCopyRegions"] = request.targetCopyRegions; } if (!$dara.isNull(request.autoSnapshotPolicyName)) { query["autoSnapshotPolicyName"] = request.autoSnapshotPolicyName; } if (!$dara.isNull(request.regionId)) { query["regionId"] = request.regionId; } if (!$dara.isNull(request.repeatWeekdays)) { query["repeatWeekdays"] = request.repeatWeekdays; } if (!$dara.isNull(request.retentionDays)) { query["retentionDays"] = request.retentionDays; } if (!$dara.isNull(request.timePoints)) { query["timePoints"] = request.timePoints; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CreateAutoSnapshotPolicy", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CreateAutoSnapshotPolicyResponse>(await this.callApi(params, req, runtime), new $_model.CreateAutoSnapshotPolicyResponse({})); } /** * Creates an automatic snapshot policy in a specific region. You can specify the schedule on which to create automatic snapshots, the retention period of the automatic snapshots, and whether to enable cross-region replication for the snapshots in the automatic snapshot policy. The automatic snapshot policy can be applied to create snapshots for system disks or data disks to back up disk data. * * @remarks * Before you call this operation, learn about how to [create an automatic snapshot policy](https://help.aliyun.com/document_detail/127767.html). * Take note of the following items: * * You can create up to 100 automatic snapshot policies per region for a single Alibaba Cloud account. If the maximum number of automatic snapshots for a disk is reached and a new snapshot creation task is created, the system deletes the oldest automatic snapshot of the disk. * * If the instance to which a disk is attached is being stopped or restarted, the system cannot create snapshots for the disk based on the associated automatic snapshot policy. * * If cross-region snapshot replication is enabled and no encryption parameters are configured, encrypted snapshots are copied to the destination region and snapshot copies are encrypted by using the service key of the destination region. For more information about the limits on cross-region snapshot replication, see [Copy a snapshot](https://help.aliyun.com/document_detail/159441.html). * After the automatic snapshot policy is created, call the [ApplyAutoSnapshotPolicy](https://help.aliyun.com/document_detail/25531.html) operation to apply the policy to disks. If you want to modify the automatic snapshot policy, call the [ModifyAutoSnapshotPolicyEx](https://help.aliyun.com/document_detail/25529.html) operation. * * @param request - CreateAutoSnapshotPolicyRequest * @returns CreateAutoSnapshotPolicyResponse */ async createAutoSnapshotPolicy(request: $_model.CreateAutoSnapshotPolicyRequest): Promise<$_model.CreateAutoSnapshotPolicyResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.createAutoSnapshotPolicyWithOptions(request, runtime); } /** * Creates a capacity reservation. * * @remarks * When you create a capacity reservation, you can specify attributes such as a zone and an instance type. The system uses a private pool to reserve resources that match the specified attributes. For more information, see [Overview of Immediate Capacity Reservation](https://help.aliyun.com/document_detail/193633.html). * * Currently, only immediate capacity reservations are supported. Immediate capacity reservations take effect immediately after you purchase them. After you purchase an immediate capacity reservation, you are charged for the specified instance type based on the pay-as-you-go billing method regardless of whether you use the capacity reservation to create pay-as-you-go instances. Billing stops when you manually release the capacity reservation or when the capacity reservation expires and is automatically released. * * You can call the [CreateInstance](https://help.aliyun.com/document_detail/25499.html) or [RunInstances](https://help.aliyun.com/document_detail/63440.html) operation to specify private pool attributes when you create instances. To modify the attributes of a private pool, you can call the [ModifyInstanceAttachmentAttributes](https://help.aliyun.com/document_detail/190006.html) operation. If an instance matches a private pool associated with a capacity reservation, you are charged based on the configurations of the instance such as the instance type, disks, and public bandwidth. * * Before you use a private pool associated with a capacity reservation to create pay-as-you-go instances, you are charged only for the specified instance type. * * You can apply savings plans or regional reserved instances to offset hourly billing of unused immediate capacity reservations, and hourly fees of the instances that match the immediate capacity reservations. However, you cannot use zonal reserved instances to offset the hourly fees. We recommend that you purchase reserved instances or savings plans before you purchase immediate capacity reservations. This way, you can access resources free of charge within the coverage of the reserved instances or savings plans. * > You can call the CreateCapacityReservation operation to create only immediate capacity reservations. You can create immediate or scheduled capacity reservations in the Elastic Compute Service (ECS) console. For more information, see [Overview](~~193626#section-oil-qh5-xvx~~). * * @param request - CreateCapacityReservationRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CreateCapacityReservationResponse */ async createCapacityReservationWithOptions(request: $_model.CreateCapacityReservationRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreateCapacityReservationResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.endTime)) { query["EndTime"] = request.endTime; } if (!$dara.isNull(request.endTimeType)) { query["EndTimeType"] = request.endTimeType; } if (!$dara.isNull(request.instanceAmount)) { query["InstanceAmount"] = request.instanceAmount; } if (!$dara.isNull(request.instanceType)) { query["InstanceType"] = request.instanceType; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.platform)) { query["Platform"] = request.platform; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.startTime)) { query["StartTime"] = request.startTime; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } if (!$dara.isNull(request.zoneId)) { query["ZoneId"] = request.zoneId; } if (!$dara.isNull(request.privatePoolOptions)) { query["PrivatePoolOptions"] = request.privatePoolOptions; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CreateCapacityReservation", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CreateCapacityReservationResponse>(await this.callApi(params, req, runtime), new $_model.CreateCapacityReservationResponse({})); } /** * Creates a capacity reservation. * * @remarks * When you create a capacity reservation, you can specify attributes such as a zone and an instance type. The system uses a private pool to reserve resources that match the specified attributes. For more information, see [Overview of Immediate Capacity Reservation](https://help.aliyun.com/document_detail/193633.html). * * Currently, only immediate capacity reservations are supported. Immediate capacity reservations take effect immediately after you purchase them. After you purchase an immediate capacity reservation, you are charged for the specified instance type based on the pay-as-you-go billing method regardless of whether you use the capacity reservation to create pay-as-you-go instances. Billing stops when you manually release the capacity reservation or when the capacity reservation expires and is automatically released. * * You can call the [CreateInstance](https://help.aliyun.com/document_detail/25499.html) or [RunInstances](https://help.aliyun.com/document_detail/63440.html) operation to specify private pool attributes when you create instances. To modify the attributes of a private pool, you can call the [ModifyInstanceAttachmentAttributes](https://help.aliyun.com/document_detail/190006.html) operation. If an instance matches a private pool associated with a capacity reservation, you are charged based on the configurations of the instance such as the instance type, disks, and public bandwidth. * * Before you use a private pool associated with a capacity reservation to create pay-as-you-go instances, you are charged only for the specified instance type. * * You can apply savings plans or regional reserved instances to offset hourly billing of unused immediate capacity reservations, and hourly fees of the instances that match the immediate capacity reservations. However, you cannot use zonal reserved instances to offset the hourly fees. We recommend that you purchase reserved instances or savings plans before you purchase immediate capacity reservations. This way, you can access resources free of charge within the coverage of the reserved instances or savings plans. * > You can call the CreateCapacityReservation operation to create only immediate capacity reservations. You can create immediate or scheduled capacity reservations in the Elastic Compute Service (ECS) console. For more information, see [Overview](~~193626#section-oil-qh5-xvx~~). * * @param request - CreateCapacityReservationRequest * @returns CreateCapacityReservationResponse */ async createCapacityReservation(request: $_model.CreateCapacityReservationRequest): Promise<$_model.CreateCapacityReservationResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.createCapacityReservationWithOptions(request, runtime); } /** * Creates a Cloud Assistant command, which can be a Shell, PowerShell, or batch command. * * @remarks * ## [](#)Usage notes * * You can create commands of the following types: * * Batch commands (RunBatScript), applicable to Windows instances * * PowerShell commands (RunPowerShellScript), applicable to Windows instances * * Shell commands (RunShellScript), applicable to Linux instances * * You can specify the Timeout parameter to set the maximum timeout period for executions of a command on Elastic Compute Service (ECS) instances. If an execution times out, [Cloud Assistant Agent](https://help.aliyun.com/document_detail/64921.html) forcefully terminates the command process by canceling the process ID (PID) of the command. * * For a one-time task, when the execution times out, the state of the command ([InvokeRecordStatus](https://help.aliyun.com/document_detail/64845.html)) becomes Failed. * * For a scheduled task, take note of the following items: * * The timeout period takes effect on each execution. * * When an execution times out, the state ([InvokeRecordStatus](https://help.aliyun.com/document_detail/64845.html)) of the command becomes Failed. * * The timeout of one execution does not affect the subsequent executions. * * You can retain up to 500 to 50,000 Cloud Assistant commands in each region. You can also apply for a quota increase. For information about how to query and increase quotas, see [Manage quotas](https://help.aliyun.com/document_detail/184116.html). * * You can use WorkingDir to specify the execution directory of a Cloud Assistant command. For Linux instances, the default execution directory of Cloud Assistant commands is the home directory of the root user, which is `/root`. For Windows instances, the default execution directory of Cloud Assistant commands is the directory where the Cloud Assistant Agent process resides, such as `C:\\Windows\\System32`. * * You can enable the custom parameter feature for a Cloud Assistant command by setting EnableParameter to true. When you set CommandContent, you can define custom parameters in the {{parameter}} format. Then, when the [InvokeCommand](https://help.aliyun.com/document_detail/64841.html) operation is called, the key-value pairs of custom parameters are passed in. For example, if a command is `echo {{name}}`, the Parameters parameter can be used to pass in the `` key-value pair when the InvokeCommand operation is called. The name key of the custom parameter is automatically replaced by the paired Jack value to generate a new command. As a result, the `echo Jack` command is run. * * @param request - CreateCommandRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CreateCommandResponse */ async createCommandWithOptions(request: $_model.CreateCommandRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreateCommandResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.commandContent)) { query["CommandContent"] = request.commandContent; } if (!$dara.isNull(request.contentEncoding)) { query["ContentEncoding"] = request.contentEncoding; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.enableParameter)) { query["EnableParameter"] = request.enableParameter; } if (!$dara.isNull(request.launcher)) { query["Launcher"] = request.launcher; } if (!$dara.isNull(request.name)) { query["Name"] = request.name; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } if (!$dara.isNull(request.timeout)) { query["Timeout"] = request.timeout; } if (!$dara.isNull(request.type)) { query["Type"] = request.type; } if (!$dara.isNull(request.workingDir)) { query["WorkingDir"] = request.workingDir; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CreateCommand", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CreateCommandResponse>(await this.callApi(params, req, runtime), new $_model.CreateCommandResponse({})); } /** * Creates a Cloud Assistant command, which can be a Shell, PowerShell, or batch command. * * @remarks * ## [](#)Usage notes * * You can create commands of the following types: * * Batch commands (RunBatScript), applicable to Windows instances * * PowerShell commands (RunPowerShellScript), applicable to Windows instances * * Shell commands (RunShellScript), applicable to Linux instances * * You can specify the Timeout parameter to set the maximum timeout period for executions of a command on Elastic Compute Service (ECS) instances. If an execution times out, [Cloud Assistant Agent](https://help.aliyun.com/document_detail/64921.html) forcefully terminates the command process by canceling the process ID (PID) of the command. * * For a one-time task, when the execution times out, the state of the command ([InvokeRecordStatus](https://help.aliyun.com/document_detail/64845.html)) becomes Failed. * * For a scheduled task, take note of the following items: * * The timeout period takes effect on each execution. * * When an execution times out, the state ([InvokeRecordStatus](https://help.aliyun.com/document_detail/64845.html)) of the command becomes Failed. * * The timeout of one execution does not affect the subsequent executions. * * You can retain up to 500 to 50,000 Cloud Assistant commands in each region. You can also apply for a quota increase. For information about how to query and increase quotas, see [Manage quotas](https://help.aliyun.com/document_detail/184116.html). * * You can use WorkingDir to specify the execution directory of a Cloud Assistant command. For Linux instances, the default execution directory of Cloud Assistant commands is the home directory of the root user, which is `/root`. For Windows instances, the default execution directory of Cloud Assistant commands is the directory where the Cloud Assistant Agent process resides, such as `C:\\Windows\\System32`. * * You can enable the custom parameter feature for a Cloud Assistant command by setting EnableParameter to true. When you set CommandContent, you can define custom parameters in the {{parameter}} format. Then, when the [InvokeCommand](https://help.aliyun.com/document_detail/64841.html) operation is called, the key-value pairs of custom parameters are passed in. For example, if a command is `echo {{name}}`, the Parameters parameter can be used to pass in the `` key-value pair when the InvokeCommand operation is called. The name key of the custom parameter is automatically replaced by the paired Jack value to generate a new command. As a result, the `echo Jack` command is run. * * @param request - CreateCommandRequest * @returns CreateCommandResponse */ async createCommand(request: $_model.CreateCommandRequest): Promise<$_model.CreateCommandResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.createCommandWithOptions(request, runtime); } /** * Creates a dedicated host group. * * @param request - CreateDedicatedHostClusterRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CreateDedicatedHostClusterResponse */ async createDedicatedHostClusterWithOptions(request: $_model.CreateDedicatedHostClusterRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreateDedicatedHostClusterResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.dedicatedHostClusterName)) { query["DedicatedHostClusterName"] = request.dedicatedHostClusterName; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.dryRun)) { query["DryRun"] = request.dryRun; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } if (!$dara.isNull(request.zoneId)) { query["ZoneId"] = request.zoneId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CreateDedicatedHostCluster", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CreateDedicatedHostClusterResponse>(await this.callApi(params, req, runtime), new $_model.CreateDedicatedHostClusterResponse({})); } /** * Creates a dedicated host group. * * @param request - CreateDedicatedHostClusterRequest * @returns CreateDedicatedHostClusterResponse */ async createDedicatedHostCluster(request: $_model.CreateDedicatedHostClusterRequest): Promise<$_model.CreateDedicatedHostClusterResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.createDedicatedHostClusterWithOptions(request, runtime); } /** * Creates a deployment set in a region. * * @param request - CreateDeploymentSetRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CreateDeploymentSetResponse */ async createDeploymentSetWithOptions(request: $_model.CreateDeploymentSetRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreateDeploymentSetResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.deploymentSetName)) { query["DeploymentSetName"] = request.deploymentSetName; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.domain)) { query["Domain"] = request.domain; } if (!$dara.isNull(request.granularity)) { query["Granularity"] = request.granularity; } if (!$dara.isNull(request.groupCount)) { query["GroupCount"] = request.groupCount; } if (!$dara.isNull(request.onUnableToRedeployFailedInstance)) { query["OnUnableToRedeployFailedInstance"] = request.onUnableToRedeployFailedInstance; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.strategy)) { query["Strategy"] = request.strategy; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CreateDeploymentSet", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CreateDeploymentSetResponse>(await this.callApi(params, req, runtime), new $_model.CreateDeploymentSetResponse({})); } /** * Creates a deployment set in a region. * * @param request - CreateDeploymentSetRequest * @returns CreateDeploymentSetResponse */ async createDeploymentSet(request: $_model.CreateDeploymentSetRequest): Promise<$_model.CreateDeploymentSetResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.createDeploymentSetWithOptions(request, runtime); } /** * Creates a diagnostic metric set. You can group diagnostic metrics into diagnostic metric sets. * * @param request - CreateDiagnosticMetricSetRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CreateDiagnosticMetricSetResponse */ async createDiagnosticMetricSetWithOptions(request: $_model.CreateDiagnosticMetricSetRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreateDiagnosticMetricSetResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.metricIds)) { query["MetricIds"] = request.metricIds; } if (!$dara.isNull(request.metricSetName)) { query["MetricSetName"] = request.metricSetName; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceType)) { query["ResourceType"] = request.resourceType; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CreateDiagnosticMetricSet", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CreateDiagnosticMetricSetResponse>(await this.callApi(params, req, runtime), new $_model.CreateDiagnosticMetricSetResponse({})); } /** * Creates a diagnostic metric set. You can group diagnostic metrics into diagnostic metric sets. * * @param request - CreateDiagnosticMetricSetRequest * @returns CreateDiagnosticMetricSetResponse */ async createDiagnosticMetricSet(request: $_model.CreateDiagnosticMetricSetRequest): Promise<$_model.CreateDiagnosticMetricSetResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.createDiagnosticMetricSetWithOptions(request, runtime); } /** * Creates a diagnostic report for a resource. When you call this operation, you can configure the MetricSetId parameter to create a diagnostic report based on the specified diagnostic metric set. Then, you can call the DescribeDiagnosticReportAttributes operation based on the returned diagnostic report ID to view the details of the diagnostic report. * * @param request - CreateDiagnosticReportRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CreateDiagnosticReportResponse */ async createDiagnosticReportWithOptions(request: $_model.CreateDiagnosticReportRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreateDiagnosticReportResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.endTime)) { query["EndTime"] = request.endTime; } if (!$dara.isNull(request.metricSetId)) { query["MetricSetId"] = request.metricSetId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceId)) { query["ResourceId"] = request.resourceId; } if (!$dara.isNull(request.startTime)) { query["StartTime"] = request.startTime; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CreateDiagnosticReport", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CreateDiagnosticReportResponse>(await this.callApi(params, req, runtime), new $_model.CreateDiagnosticReportResponse({})); } /** * Creates a diagnostic report for a resource. When you call this operation, you can configure the MetricSetId parameter to create a diagnostic report based on the specified diagnostic metric set. Then, you can call the DescribeDiagnosticReportAttributes operation based on the returned diagnostic report ID to view the details of the diagnostic report. * * @param request - CreateDiagnosticReportRequest * @returns CreateDiagnosticReportResponse */ async createDiagnosticReport(request: $_model.CreateDiagnosticReportRequest): Promise<$_model.CreateDiagnosticReportResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.createDiagnosticReportWithOptions(request, runtime); } /** * Creates a pay-as-you-go or subscription data disk. * * @remarks * You can enable the multi-attach (`MultiAttach`) feature when you create a disk. Before you enable the multi-attach feature, we recommend that you familiarize yourself with the feature and the limits on the feature. For more information, see [NVMe protocol](https://help.aliyun.com/document_detail/256487.html) and [Use the multi-attach feature to attach a cloud disk to multiple ECS instances](https://help.aliyun.com/document_detail/262105.html). * * You can create disks of the following disk categories: basic disks, ultra disks, standard SSDs, Enterprise SSDs (ESSDs), ESSD Entry disks, Regional ESSDs, ESSD AutoPL disks, standard elastic ephemeral disks, and premium elastic ephemeral disks. * * Before you can create a disk, you must complete real-name verification. Complete real-name verification on the [Real-name Verification](https://account.console.aliyun.com/#/auth/home) page in the Alibaba Cloud Management Console. * * When you create disks, you may be charged for the resources used. We recommend that you familiarize yourself with the billing methods of Elastic Compute Service (ECS) resources before you create a disk. For more information, see [Billing overview](https://help.aliyun.com/document_detail/25398.html). * * When you call this operation to create a disk, specific parameters are automatically specified. * * `DeleteAutoSnapshot` is automatically set to `true` when a disk is created. This indicates that the automatic snapshots of the disk are deleted when the disk is released. You can call the [DescribeDisks](https://help.aliyun.com/document_detail/2679767.html) operation to query the DeleteAutoSnapshot value for the disk and call the [ModifyDiskAttribute](https://help.aliyun.com/document_detail/25517.html) operation to change the DeleteAutoSnapshot value for the disk. * * If you do not specify a performance level when you create an ESSD, the performance level of the ESSD is automatically set to PL1. To change the performance level of the ESSD, you can call the [ModifyDiskSpec](https://help.aliyun.com/document_detail/123780.html) operation. * * `Portable` is automatically set to `true` when a disk is created, which indicates that the disk is a pay-as-you-go disk. * * @param request - CreateDiskRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CreateDiskResponse */ async createDiskWithOptions(request: $_model.CreateDiskRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreateDiskResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.advancedFeatures)) { query["AdvancedFeatures"] = request.advancedFeatures; } if (!$dara.isNull(request.arn)) { query["Arn"] = request.arn; } if (!$dara.isNull(request.burstingEnabled)) { query["BurstingEnabled"] = request.burstingEnabled; } if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.diskCategory)) { query["DiskCategory"] = request.diskCategory; } if (!$dara.isNull(request.diskName)) { query["DiskName"] = request.diskName; } if (!$dara.isNull(request.encryptAlgorithm)) { query["EncryptAlgorithm"] = request.encryptAlgorithm; } if (!$dara.isNull(request.encrypted)) { query["Encrypted"] = request.encrypted; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.KMSKeyId)) { query["KMSKeyId"] = request.KMSKeyId; } if (!$dara.isNull(request.multiAttach)) { query["MultiAttach"] = request.multiAttach; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.performanceLevel)) { query["PerformanceLevel"] = request.performanceLevel; } if (!$dara.isNull(request.provisionedIops)) { query["ProvisionedIops"] = request.provisionedIops; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.size)) { query["Size"] = request.size; } if (!$dara.isNull(request.snapshotId)) { query["SnapshotId"] = request.snapshotId; } if (!$dara.isNull(request.storageClusterId)) { query["StorageClusterId"] = request.storageClusterId; } if (!$dara.isNull(request.storageSetId)) { query["StorageSetId"] = request.storageSetId; } if (!$dara.isNull(request.storageSetPartitionNumber)) { query["StorageSetPartitionNumber"] = request.storageSetPartitionNumber; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } if (!$dara.isNull(request.zoneId)) { query["ZoneId"] = request.zoneId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CreateDisk", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CreateDiskResponse>(await this.callApi(params, req, runtime), new $_model.CreateDiskResponse({})); } /** * Creates a pay-as-you-go or subscription data disk. * * @remarks * You can enable the multi-attach (`MultiAttach`) feature when you create a disk. Before you enable the multi-attach feature, we recommend that you familiarize yourself with the feature and the limits on the feature. For more information, see [NVMe protocol](https://help.aliyun.com/document_detail/256487.html) and [Use the multi-attach feature to attach a cloud disk to multiple ECS instances](https://help.aliyun.com/document_detail/262105.html). * * You can create disks of the following disk categories: basic disks, ultra disks, standard SSDs, Enterprise SSDs (ESSDs), ESSD Entry disks, Regional ESSDs, ESSD AutoPL disks, standard elastic ephemeral disks, and premium elastic ephemeral disks. * * Before you can create a disk, you must complete real-name verification. Complete real-name verification on the [Real-name Verification](https://account.console.aliyun.com/#/auth/home) page in the Alibaba Cloud Management Console. * * When you create disks, you may be charged for the resources used. We recommend that you familiarize yourself with the billing methods of Elastic Compute Service (ECS) resources before you create a disk. For more information, see [Billing overview](https://help.aliyun.com/document_detail/25398.html). * * When you call this operation to create a disk, specific parameters are automatically specified. * * `DeleteAutoSnapshot` is automatically set to `true` when a disk is created. This indicates that the automatic snapshots of the disk are deleted when the disk is released. You can call the [DescribeDisks](https://help.aliyun.com/document_detail/2679767.html) operation to query the DeleteAutoSnapshot value for the disk and call the [ModifyDiskAttribute](https://help.aliyun.com/document_detail/25517.html) operation to change the DeleteAutoSnapshot value for the disk. * * If you do not specify a performance level when you create an ESSD, the performance level of the ESSD is automatically set to PL1. To change the performance level of the ESSD, you can call the [ModifyDiskSpec](https://help.aliyun.com/document_detail/123780.html) operation. * * `Portable` is automatically set to `true` when a disk is created, which indicates that the disk is a pay-as-you-go disk. * * @param request - CreateDiskRequest * @returns CreateDiskResponse */ async createDisk(request: $_model.CreateDiskRequest): Promise<$_model.CreateDiskResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.createDiskWithOptions(request, runtime); } /** * Creates an elasticity assurance in a region. When you call this operation, you can specify parameters, such as ZoneId, InstanceType, Period, PeriodUnit, and AutoRenew, in the request. * * @remarks * Elasticity Assurance provides a new method to purchase and use guaranteed resources in a flexible manner. Elasticity Assurance is a resource reservation service that provides assured access to resources for pay-as-you-go Elastic Compute Service (ECS) instances. For more information, see [Overview of Elasticity Assurance](https://help.aliyun.com/document_detail/193630.html). * * After you purchase an elasticity assurance, you cannot request a refund for the elasticity assurance. For information about the billing of elasticity assurances, see [Resource assurance](https://help.aliyun.com/document_detail/432502.html). * * Elasticity assurances can be used to create only pay-as-you-go ECS instances. * * Elasticity assurances only support the unlimited mode. You can set `AssuranceTimes` only to `Unlimited`. Elasticity assurances in unlimited mode can be used for an unlimited number of times within their terms. Elasticity assurances in unlimited mode take effect immediately after creation. * * @param request - CreateElasticityAssuranceRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CreateElasticityAssuranceResponse */ async createElasticityAssuranceWithOptions(request: $_model.CreateElasticityAssuranceRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreateElasticityAssuranceResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.assuranceTimes)) { query["AssuranceTimes"] = request.assuranceTimes; } if (!$dara.isNull(request.autoRenew)) { query["AutoRenew"] = request.autoRenew; } if (!$dara.isNull(request.autoRenewPeriod)) { query["AutoRenewPeriod"] = request.autoRenewPeriod; } if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.instanceAmount)) { query["InstanceAmount"] = request.instanceAmount; } if (!$dara.isNull(request.instanceCpuCoreCount)) { query["InstanceCpuCoreCount"] = request.instanceCpuCoreCount; } if (!$dara.isNull(request.instanceType)) { query["InstanceType"] = request.instanceType; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.period)) { query["Period"] = request.period; } if (!$dara.isNull(request.periodUnit)) { query["PeriodUnit"] = request.periodUnit; } if (!$dara.isNull(request.recurrenceRules)) { query["RecurrenceRules"] = request.recurrenceRules; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.startTime)) { query["StartTime"] = request.startTime; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } if (!$dara.isNull(request.zoneId)) { query["ZoneId"] = request.zoneId; } if (!$dara.isNull(request.privatePoolOptions)) { query["PrivatePoolOptions"] = request.privatePoolOptions; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CreateElasticityAssurance", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CreateElasticityAssuranceResponse>(await this.callApi(params, req, runtime), new $_model.CreateElasticityAssuranceResponse({})); } /** * Creates an elasticity assurance in a region. When you call this operation, you can specify parameters, such as ZoneId, InstanceType, Period, PeriodUnit, and AutoRenew, in the request. * * @remarks * Elasticity Assurance provides a new method to purchase and use guaranteed resources in a flexible manner. Elasticity Assurance is a resource reservation service that provides assured access to resources for pay-as-you-go Elastic Compute Service (ECS) instances. For more information, see [Overview of Elasticity Assurance](https://help.aliyun.com/document_detail/193630.html). * * After you purchase an elasticity assurance, you cannot request a refund for the elasticity assurance. For information about the billing of elasticity assurances, see [Resource assurance](https://help.aliyun.com/document_detail/432502.html). * * Elasticity assurances can be used to create only pay-as-you-go ECS instances. * * Elasticity assurances only support the unlimited mode. You can set `AssuranceTimes` only to `Unlimited`. Elasticity assurances in unlimited mode can be used for an unlimited number of times within their terms. Elasticity assurances in unlimited mode take effect immediately after creation. * * @param request - CreateElasticityAssuranceRequest * @returns CreateElasticityAssuranceResponse */ async createElasticityAssurance(request: $_model.CreateElasticityAssuranceRequest): Promise<$_model.CreateElasticityAssuranceResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.createElasticityAssuranceWithOptions(request, runtime); } /** * CreateForwardEntry * * @deprecated OpenAPI CreateForwardEntry is deprecated, please use Vpc::2016-04-28::CreateForwardEntry instead. * * @param request - CreateForwardEntryRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CreateForwardEntryResponse */ async createForwardEntryWithOptions(request: $_model.CreateForwardEntryRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreateForwardEntryResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.externalIp)) { query["ExternalIp"] = request.externalIp; } if (!$dara.isNull(request.externalPort)) { query["ExternalPort"] = request.externalPort; } if (!$dara.isNull(request.forwardTableId)) { query["ForwardTableId"] = request.forwardTableId; } if (!$dara.isNull(request.internalIp)) { query["InternalIp"] = request.internalIp; } if (!$dara.isNull(request.internalPort)) { query["InternalPort"] = request.internalPort; } if (!$dara.isNull(request.ipProtocol)) { query["IpProtocol"] = request.ipProtocol; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CreateForwardEntry", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CreateForwardEntryResponse>(await this.callApi(params, req, runtime), new $_model.CreateForwardEntryResponse({})); } /** * CreateForwardEntry * * @deprecated OpenAPI CreateForwardEntry is deprecated, please use Vpc::2016-04-28::CreateForwardEntry instead. * * @param request - CreateForwardEntryRequest * @returns CreateForwardEntryResponse */ // Deprecated async createForwardEntry(request: $_model.CreateForwardEntryRequest): Promise<$_model.CreateForwardEntryResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.createForwardEntryWithOptions(request, runtime); } /** * CreateHaVip * * @deprecated OpenAPI CreateHaVip is deprecated, please use Vpc::2016-04-28::CreateHaVip instead. * * @param request - CreateHaVipRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CreateHaVipResponse */ async createHaVipWithOptions(request: $_model.CreateHaVipRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreateHaVipResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.ipAddress)) { query["IpAddress"] = request.ipAddress; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.vSwitchId)) { query["VSwitchId"] = request.vSwitchId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CreateHaVip", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CreateHaVipResponse>(await this.callApi(params, req, runtime), new $_model.CreateHaVipResponse({})); } /** * CreateHaVip * * @deprecated OpenAPI CreateHaVip is deprecated, please use Vpc::2016-04-28::CreateHaVip instead. * * @param request - CreateHaVipRequest * @returns CreateHaVipResponse */ // Deprecated async createHaVip(request: $_model.CreateHaVipRequest): Promise<$_model.CreateHaVipResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.createHaVipWithOptions(request, runtime); } /** * Creates a high performance computing (HPC) cluster. * * @param request - CreateHpcClusterRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CreateHpcClusterResponse */ async createHpcClusterWithOptions(request: $_model.CreateHpcClusterRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreateHpcClusterResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.name)) { query["Name"] = request.name; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CreateHpcCluster", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CreateHpcClusterResponse>(await this.callApi(params, req, runtime), new $_model.CreateHpcClusterResponse({})); } /** * Creates a high performance computing (HPC) cluster. * * @param request - CreateHpcClusterRequest * @returns CreateHpcClusterResponse */ async createHpcCluster(request: $_model.CreateHpcClusterRequest): Promise<$_model.CreateHpcClusterResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.createHpcClusterWithOptions(request, runtime); } /** * Creates a custom image. After you call this operation to create a custom image, you can call the RunInstances operation to create Elastic Compute Service (ECS) instances from the custom image or call the ReplaceSystemDisk operation to replace system disks by using the custom image. * * @remarks * ### [](#)Considerations * * This operation is an asynchronous operation. After a request to create a custom image is sent, an image ID is returned but the creation of the custom image is in progress. You can call the [DescribeImage](https://help.aliyun.com/document_detail/2679797.html) operation to query the status of the custom image. When the status of the custom image is `Available` in the response, the image is created and available. For more information, see [Overview of custom images](https://help.aliyun.com/document_detail/172789.html). * * If the response contains {"OperationLocks": {"LockReason" : "security"}} when you query information about an ECS instance, the instance is locked for security reasons, and you cannot create a custom image from the instance. * * To optimize the image, we recommend that you specify `DetectionStrategy` when you create a custom image. For information about the image check feature, see [Overview](https://help.aliyun.com/document_detail/439819.html). * You can call the CreateImage operation to create a custom image by using one of the following methods. The following request parameters are prioritized in descending order: InstanceId, DiskDeviceMapping, and SnapshotId. If your request contains two or more of these parameters, the custom image is created based on the parameter that has a higher priority. * * **Create a custom image from an instance**. Specify an instance ID (`InstanceId`). * * The ECS instance must be in the Running (`Running`) or Stopped (`Stopped`) state. * * After the CreateImage operation is called, a snapshot is created for each cloud disk of the instance. * ** * **Note** When you create a custom image from a running ECS instance, cache data may not be written to disks. In this case, the data of the custom image may be slightly different from the data of the instance. Before you create a custom image from the instance, we recommend that you stop the instance by calling the StopInstancesoperation. * * **Create a custom image from a snapshot. The specified snapshot must be created after July 15, 2013.** * * **Create a custom image from a system disk snapshot of an ECS instance**. You need to only specify the ID of the system disk snapshot by using `SnapshotId`. * * **Create a custom image from a system disk snapshot and data disk snapshots of an ECS instance**. You need to establish data association between the disks by specifying `DiskDeviceMapping`. * * You can specify only one snapshot to create the system disk in the custom image. * * You can specify up to 16 snapshots to use to create data disks in the custom image. If you do not specify `DiskDeviceMapping.N.SnapshotId`, an empty data disk with the default capacity is created. * > When an ECS instance is released, the system disk of the instance is converted to a pay-as-you-go data disk. You cannot create a custom image from the snapshot of this disk. You must create a custom image from the snapshot of this disk before the instance is released. * * @param request - CreateImageRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CreateImageResponse */ async createImageWithOptions(request: $_model.CreateImageRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreateImageResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.architecture)) { query["Architecture"] = request.architecture; } if (!$dara.isNull(request.bootMode)) { query["BootMode"] = request.bootMode; } if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.detectionStrategy)) { query["DetectionStrategy"] = request.detectionStrategy; } if (!$dara.isNull(request.diskDeviceMapping)) { query["DiskDeviceMapping"] = request.diskDeviceMapping; } if (!$dara.isNull(request.dryRun)) { query["DryRun"] = request.dryRun; } if (!$dara.isNull(request.features)) { query["Features"] = request.features; } if (!$dara.isNull(request.imageFamily)) { query["ImageFamily"] = request.imageFamily; } if (!$dara.isNull(request.imageName)) { query["ImageName"] = request.imageName; } if (!$dara.isNull(request.imageVersion)) { query["ImageVersion"] = request.imageVersion; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.platform)) { query["Platform"] = request.platform; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.snapshotId)) { query["SnapshotId"] = request.snapshotId; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CreateImage", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CreateImageResponse>(await this.callApi(params, req, runtime), new $_model.CreateImageResponse({})); } /** * Creates a custom image. After you call this operation to create a custom image, you can call the RunInstances operation to create Elastic Compute Service (ECS) instances from the custom image or call the ReplaceSystemDisk operation to replace system disks by using the custom image. * * @remarks * ### [](#)Considerations * * This operation is an asynchronous operation. After a request to create a custom image is sent, an image ID is returned but the creation of the custom image is in progress. You can call the [DescribeImage](https://help.aliyun.com/document_detail/2679797.html) operation to query the status of the custom image. When the status of the custom image is `Available` in the response, the image is created and available. For more information, see [Overview of custom images](https://help.aliyun.com/document_detail/172789.html). * * If the response contains {"OperationLocks": {"LockReason" : "security"}} when you query information about an ECS instance, the instance is locked for security reasons, and you cannot create a custom image from the instance. * * To optimize the image, we recommend that you specify `DetectionStrategy` when you create a custom image. For information about the image check feature, see [Overview](https://help.aliyun.com/document_detail/439819.html). * You can call the CreateImage operation to create a custom image by using one of the following methods. The following request parameters are prioritized in descending order: InstanceId, DiskDeviceMapping, and SnapshotId. If your request contains two or more of these parameters, the custom image is created based on the parameter that has a higher priority. * * **Create a custom image from an instance**. Specify an instance ID (`InstanceId`). * * The ECS instance must be in the Running (`Running`) or Stopped (`Stopped`) state. * * After the CreateImage operation is called, a snapshot is created for each cloud disk of the instance. * ** * **Note** When you create a custom image from a running ECS instance, cache data may not be written to disks. In this case, the data of the custom image may be slightly different from the data of the instance. Before you create a custom image from the instance, we recommend that you stop the instance by calling the StopInstancesoperation. * * **Create a custom image from a snapshot. The specified snapshot must be created after July 15, 2013.** * * **Create a custom image from a system disk snapshot of an ECS instance**. You need to only specify the ID of the system disk snapshot by using `SnapshotId`. * * **Create a custom image from a system disk snapshot and data disk snapshots of an ECS instance**. You need to establish data association between the disks by specifying `DiskDeviceMapping`. * * You can specify only one snapshot to create the system disk in the custom image. * * You can specify up to 16 snapshots to use to create data disks in the custom image. If you do not specify `DiskDeviceMapping.N.SnapshotId`, an empty data disk with the default capacity is created. * > When an ECS instance is released, the system disk of the instance is converted to a pay-as-you-go data disk. You cannot create a custom image from the snapshot of this disk. You must create a custom image from the snapshot of this disk before the instance is released. * * @param request - CreateImageRequest * @returns CreateImageResponse */ async createImage(request: $_model.CreateImageRequest): Promise<$_model.CreateImageResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.createImageWithOptions(request, runtime); } /** * Creates an image component. Image components are used to store the builder template commands that are commonly used when you create images. * * @remarks * ## [](#)Usage notes * Take note of the following items: * * You can create only custom image components. * * Each version number of an image component must be unique. When you add a version of an image component to an image template, you can specify the component by its name and version number. * * The content size of an image component cannot exceed 16 KB. For information about the commands supported by Image Builder, see [Commands supported by Image Builder](https://help.aliyun.com/document_detail/200206.html). * For more information, see [Image Builder](https://help.aliyun.com/document_detail/197410.html). * * @param request - CreateImageComponentRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CreateImageComponentResponse */ async createImageComponentWithOptions(request: $_model.CreateImageComponentRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreateImageComponentResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.componentType)) { query["ComponentType"] = request.componentType; } if (!$dara.isNull(request.componentVersion)) { query["ComponentVersion"] = request.componentVersion; } if (!$dara.isNull(request.content)) { query["Content"] = request.content; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.name)) { query["Name"] = request.name; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.systemType)) { query["SystemType"] = request.systemType; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CreateImageComponent", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CreateImageComponentResponse>(await this.callApi(params, req, runtime), new $_model.CreateImageComponentResponse({})); } /** * Creates an image component. Image components are used to store the builder template commands that are commonly used when you create images. * * @remarks * ## [](#)Usage notes * Take note of the following items: * * You can create only custom image components. * * Each version number of an image component must be unique. When you add a version of an image component to an image template, you can specify the component by its name and version number. * * The content size of an image component cannot exceed 16 KB. For information about the commands supported by Image Builder, see [Commands supported by Image Builder](https://help.aliyun.com/document_detail/200206.html). * For more information, see [Image Builder](https://help.aliyun.com/document_detail/197410.html). * * @param request - CreateImageComponentRequest * @returns CreateImageComponentResponse */ async createImageComponent(request: $_model.CreateImageComponentRequest): Promise<$_model.CreateImageComponentResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.createImageComponentWithOptions(request, runtime); } /** * Creates an image template. Image templates can be used to create images. * * @remarks * ## [](#)Usage notes * You can use image templates to customize image content and create images across regions and accounts. Take note of the following items: * * You can create only custom image templates. * * You can specify only a public image, a custom image, a shared image, or an image family as the source image when you create an image template. * * When you use an image template to create an image, multiple intermediate instances are created. You are charged for the intermediate instances on a pay-as-you-go basis. For more information, see [Pay-as-you-go](https://help.aliyun.com/document_detail/40653.html). * When you use `BuildContent` to specify the build content in an image template, take note of the following items: * * The `FROM` command is deprecated. Regardless of whether you specify the `FROM` command in `BuildContent`, the system uses the source image specified by `BaseImageType` and `BaseImage`. BaseImageType specifies the type of the source image and BaseImage specifies the source image. * * The size of BuildContent cannot exceed 16 KB. For information about the commands supported by Image Builder, see [Commands supported by Image Builder](https://help.aliyun.com/document_detail/200206.html). * For more information, see [Image Builder](https://help.aliyun.com/document_detail/197410.html). * * @param request - CreateImagePipelineRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CreateImagePipelineResponse */ async createImagePipelineWithOptions(request: $_model.CreateImagePipelineRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreateImagePipelineResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.addAccount)) { query["AddAccount"] = request.addAccount; } if (!$dara.isNull(request.advancedOptions)) { query["AdvancedOptions"] = request.advancedOptions; } if (!$dara.isNull(request.baseImage)) { query["BaseImage"] = request.baseImage; } if (!$dara.isNull(request.baseImageType)) { query["BaseImageType"] = request.baseImageType; } if (!$dara.isNull(request.buildContent)) { query["BuildContent"] = request.buildContent; } if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.deleteInstanceOnFailure)) { query["DeleteInstanceOnFailure"] = request.deleteInstanceOnFailure; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.imageFamily)) { query["ImageFamily"] = request.imageFamily; } if (!$dara.isNull(request.imageName)) { query["ImageName"] = request.imageName; } if (!$dara.isNull(request.imageOptions)) { query["ImageOptions"] = request.imageOptions; } if (!$dara.isNull(request.importImageOptions)) { query["ImportImageOptions"] = request.importImageOptions; } if (!$dara.isNull(request.instanceType)) { query["InstanceType"] = request.instanceType; } if (!$dara.isNull(request.internetMaxBandwidthOut)) { query["InternetMaxBandwidthOut"] = request.internetMaxBandwidthOut; } if (!$dara.isNull(request.name)) { query["Name"] = request.name; } if (!$dara.isNull(request.nvmeSupport)) { query["NvmeSupport"] = request.nvmeSupport; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.repairMode)) { query["RepairMode"] = request.repairMode; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.systemDiskSize)) { query["SystemDiskSize"] = request.systemDiskSize; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } if (!$dara.isNull(request.testContent)) { query["TestContent"] = request.testContent; } if (!$dara.isNull(request.toRegionId)) { query["ToRegionId"] = request.toRegionId; } if (!$dara.isNull(request.vSwitchId)) { query["VSwitchId"] = request.vSwitchId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CreateImagePipeline", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CreateImagePipelineResponse>(await this.callApi(params, req, runtime), new $_model.CreateImagePipelineResponse({})); } /** * Creates an image template. Image templates can be used to create images. * * @remarks * ## [](#)Usage notes * You can use image templates to customize image content and create images across regions and accounts. Take note of the following items: * * You can create only custom image templates. * * You can specify only a public image, a custom image, a shared image, or an image family as the source image when you create an image template. * * When you use an image template to create an image, multiple intermediate instances are created. You are charged for the intermediate instances on a pay-as-you-go basis. For more information, see [Pay-as-you-go](https://help.aliyun.com/document_detail/40653.html). * When you use `BuildContent` to specify the build content in an image template, take note of the following items: * * The `FROM` command is deprecated. Regardless of whether you specify the `FROM` command in `BuildContent`, the system uses the source image specified by `BaseImageType` and `BaseImage`. BaseImageType specifies the type of the source image and BaseImage specifies the source image. * * The size of BuildContent cannot exceed 16 KB. For information about the commands supported by Image Builder, see [Commands supported by Image Builder](https://help.aliyun.com/document_detail/200206.html). * For more information, see [Image Builder](https://help.aliyun.com/document_detail/197410.html). * * @param request - CreateImagePipelineRequest * @returns CreateImagePipelineResponse */ async createImagePipeline(request: $_model.CreateImagePipelineRequest): Promise<$_model.CreateImagePipelineResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.createImagePipelineWithOptions(request, runtime); } /** * Creates a subscription or pay-as-you-go Elastic Compute Service (ECS) instance. When you call this operation, you can specify different parameters to create instances based on your business requirements. * * @remarks * > This operation is no longer iterated or updated. We recommend that you call the [RunInstances](https://help.aliyun.com/document_detail/2679677.html) operation instead. * **Before you call this operation, familiarize yourself with the billing rules and [pricing](https://www.alibabacloud.com/zh/pricing-calculator#/commodity/vm_intl) of ECS resources.** * This operation is an asynchronous operation. After a request to create an ECS instance is sent, an ECS instance ID is immediately returned but the instance may be still being created. You can call the [DescribeInstanceStatus](https://help.aliyun.com/document_detail/2679688.html) operation to query the status of the instance. If the status of the instance is `Stopped` in the DescribeInstanceStatus response, the instance is created. In this case, you can call the [StartInstance](https://help.aliyun.com/document_detail/2679679.html) operation to start the instance. * ### [](#)Prerequisites * * Make sure that you are familiar with the ECS billing methods because you may be charged for the resources that are used by the instance. For more information, see [Billing overview](https://help.aliyun.com/document_detail/25398.html). * * Make sure that the number of ECS instances you create or the number of vCPUs on ECS instances of all instance types you create does not exceed the corresponding quota. Go to the [Quota Center](https://quotas.console.aliyun.com/products/ecs/quotas) to view the quotas. * * Before you create ECS instances of the Virtual Private Cloud (VPC) type in a region, create a VPC in the region. For more information, see [Create a VPC](https://help.aliyun.com/document_detail/65430.html). * ### [](#)Considerations * * If you create a subscription instance (`PrePaid`), available coupons in your account are automatically used. * * If you want to create instances with 512 MiB of memory, you cannot use Windows Server images except for Windows Server Semi-Annual Channel images. If you want to create instances with 4 GiB or more of memory, you cannot use 32-bit OS image. * * If you call the CreateInstance operation to create an instance, no public IP address is automatically assigned to the instance. If the InternetMaxBandwidthOut value of the instance is greater than 0 Mbit/s, call the [AllocatePublicIpAddress](https://help.aliyun.com/document_detail/25544.html) operation to assign a public IP address to the instance. If the InternetMaxBandwidthOut value of the instance is 0 Mbit/s, call the [ModifyInstanceNetworkSpec](https://help.aliyun.com/document_detail/2679879.html) operation to set InternetMaxBandwidthOut to a value greater than 0 Mbit/s and then call the [AllocatePublicIpAddress](https://help.aliyun.com/document_detail/25544.html) operation to assign a public IP address to the instance. * > For the limits on the sum of maximum public bandwidths of ECS instances that use the pay-by-bandwidth billing method for network usage per region per Alibaba Cloud account, see the [Public bandwidth limits](~~25412#BandwidthQuota~~) section of the "Limits" topic. * ### [](#)Suggestions * * **Instance type selection**: See [Overview of instance families](https://help.aliyun.com/document_detail/25378.html) or call the [DescribeInstanceTypes](https://help.aliyun.com/document_detail/25620.html) operation to query the performance data of instance types, or see [Instance type selection](https://help.aliyun.com/document_detail/58291.html) to learn about how to select instance types. * * **Query of available resources**: Call the [DescribeAvailableResource](https://help.aliyun.com/document_detail/66186.html) operation to query resources available in a specific region or zone. * * **User data**: If the instance type supports [user data](https://help.aliyun.com/document_detail/49121.html), you can use UserData to pass in user data. We recommend that you do not pass in confidential information, such as passwords or private keys, in plaintext as user data. This is because the system does not encrypt `UserData` values when API requests are sent. If you must pass in confidential information as user data, we recommend that you encrypt and encode the information in Base64 before you pass in the information. Then, decode and decrypt the information within the instance for subsequent use. * * @param request - CreateInstanceRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CreateInstanceResponse */ async createInstanceWithOptions(request: $_model.CreateInstanceRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreateInstanceResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.affinity)) { query["Affinity"] = request.affinity; } if (!$dara.isNull(request.arn)) { query["Arn"] = request.arn; } if (!$dara.isNull(request.autoRenew)) { query["AutoRenew"] = request.autoRenew; } if (!$dara.isNull(request.autoRenewPeriod)) { query["AutoRenewPeriod"] = request.autoRenewPeriod; } if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.clusterId)) { query["ClusterId"] = request.clusterId; } if (!$dara.isNull(request.creditSpecification)) { query["CreditSpecification"] = request.creditSpecification; } if (!$dara.isNull(request.dataDisk)) { query["DataDisk"] = request.dataDisk; } if (!$dara.isNull(request.dedicatedHostId)) { query["DedicatedHostId"] = request.dedicatedHostId; } if (!$dara.isNull(request.deletionProtection)) { query["DeletionProtection"] = request.deletionProtection; } if (!$dara.isNull(request.deploymentSetGroupNo)) { query["DeploymentSetGroupNo"] = request.deploymentSetGroupNo; } if (!$dara.isNull(request.deploymentSetId)) { query["DeploymentSetId"] = request.deploymentSetId; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.dryRun)) { query["DryRun"] = request.dryRun; } if (!$dara.isNull(request.hostName)) { query["HostName"] = request.hostName; } if (!$dara.isNull(request.hpcClusterId)) { query["HpcClusterId"] = request.hpcClusterId; } if (!$dara.isNull(request.httpEndpoint)) { query["HttpEndpoint"] = request.httpEndpoint; } if (!$dara.isNull(request.httpPutResponseHopLimit)) { query["HttpPutResponseHopLimit"] = request.httpPutResponseHopLimit; } if (!$dara.isNull(request.httpTokens)) { query["HttpTokens"] = request.httpTokens; } if (!$dara.isNull(request.imageFamily)) { query["ImageFamily"] = request.imageFamily; } if (!$dara.isNull(request.imageId)) { query["ImageId"] = request.imageId; } if (!$dara.isNull(request.innerIpAddress)) { query["InnerIpAddress"] = request.innerIpAddress; } if (!$dara.isNull(request.instanceChargeType)) { query["InstanceChargeType"] = request.instanceChargeType; } if (!$dara.isNull(request.instanceName)) { query["InstanceName"] = request.instanceName; } if (!$dara.isNull(request.instanceType)) { query["InstanceType"] = request.instanceType; } if (!$dara.isNull(request.internetChargeType)) { query["InternetChargeType"] = request.internetChargeType; } if (!$dara.isNull(request.internetMaxBandwidthIn)) { query["InternetMaxBandwidthIn"] = request.internetMaxBandwidthIn; } if (!$dara.isNull(request.internetMaxBandwidthOut)) { query["InternetMaxBandwidthOut"] = request.internetMaxBandwidthOut; } if (!$dara.isNull(request.ioOptimized)) { query["IoOptimized"] = request.ioOptimized; } if (!$dara.isNull(request.keyPairName)) { query["KeyPairName"] = request.keyPairName; } if (!$dara.isNull(request.nodeControllerId)) { query["NodeControllerId"] = request.nodeControllerId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.password)) { query["Password"] = request.password; } if (!$dara.isNull(request.passwordInherit)) { query["PasswordInherit"] = request.passwordInherit; } if (!$dara.isNull(request.period)) { query["Period"] = request.period; } if (!$dara.isNull(request.periodUnit)) { query["PeriodUnit"] = request.periodUnit; } if (!$dara.isNull(request.privateIpAddress)) { query["PrivateIpAddress"] = request.privateIpAddress; } if (!$dara.isNull(request.ramRoleName)) { query["RamRoleName"] = request.ramRoleName; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.securityEnhancementStrategy)) { query["SecurityEnhancementStrategy"] = request.securityEnhancementStrategy; } if (!$dara.isNull(request.securityGroupId)) { query["SecurityGroupId"] = request.securityGroupId; } if (!$dara.isNull(request.spotDuration)) { query["SpotDuration"] = request.spotDuration; } if (!$dara.isNull(request.spotInterruptionBehavior)) { query["SpotInterruptionBehavior"] = request.spotInterruptionBehavior; } if (!$dara.isNull(request.spotPriceLimit)) { query["SpotPriceLimit"] = request.spotPriceLimit; } if (!$dara.isNull(request.spotStrategy)) { query["SpotStrategy"] = request.spotStrategy; } if (!$dara.isNull(request.storageSetId)) { query["StorageSetId"] = request.storageSetId; } if (!$dara.isNull(request.storageSetPartitionNumber)) { query["StorageSetPartitionNumber"] = request.storageSetPartitionNumber; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } if (!$dara.isNull(request.tenancy)) { query["Tenancy"] = request.tenancy; } if (!$dara.isNull(request.useAdditionalService)) { query["UseAdditionalService"] = request.useAdditionalService; } if (!$dara.isNull(request.userData)) { query["UserData"] = request.userData; } if (!$dara.isNull(request.vSwitchId)) { query["VSwitchId"] = request.vSwitchId; } if (!$dara.isNull(request.vlanId)) { query["VlanId"] = request.vlanId; } if (!$dara.isNull(request.zoneId)) { query["ZoneId"] = request.zoneId; } if (!$dara.isNull(request.hibernationOptions)) { query["HibernationOptions"] = request.hibernationOptions; } if (!$dara.isNull(request.privatePoolOptions)) { query["PrivatePoolOptions"] = request.privatePoolOptions; } if (!$dara.isNull(request.systemDisk)) { query["SystemDisk"] = request.systemDisk; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CreateInstance", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CreateInstanceResponse>(await this.callApi(params, req, runtime), new $_model.CreateInstanceResponse({})); } /** * Creates a subscription or pay-as-you-go Elastic Compute Service (ECS) instance. When you call this operation, you can specify different parameters to create instances based on your business requirements. * * @remarks * > This operation is no longer iterated or updated. We recommend that you call the [RunInstances](https://help.aliyun.com/document_detail/2679677.html) operation instead. * **Before you call this operation, familiarize yourself with the billing rules and [pricing](https://www.alibabacloud.com/zh/pricing-calculator#/commodity/vm_intl) of ECS resources.** * This operation is an asynchronous operation. After a request to create an ECS instance is sent, an ECS instance ID is immediately returned but the instance may be still being created. You can call the [DescribeInstanceStatus](https://help.aliyun.com/document_detail/2679688.html) operation to query the status of the instance. If the status of the instance is `Stopped` in the DescribeInstanceStatus response, the instance is created. In this case, you can call the [StartInstance](https://help.aliyun.com/document_detail/2679679.html) operation to start the instance. * ### [](#)Prerequisites * * Make sure that you are familiar with the ECS billing methods because you may be charged for the resources that are used by the instance. For more information, see [Billing overview](https://help.aliyun.com/document_detail/25398.html). * * Make sure that the number of ECS instances you create or the number of vCPUs on ECS instances of all instance types you create does not exceed the corresponding quota. Go to the [Quota Center](https://quotas.console.aliyun.com/products/ecs/quotas) to view the quotas. * * Before you create ECS instances of the Virtual Private Cloud (VPC) type in a region, create a VPC in the region. For more information, see [Create a VPC](https://help.aliyun.com/document_detail/65430.html). * ### [](#)Considerations * * If you create a subscription instance (`PrePaid`), available coupons in your account are automatically used. * * If you want to create instances with 512 MiB of memory, you cannot use Windows Server images except for Windows Server Semi-Annual Channel images. If you want to create instances with 4 GiB or more of memory, you cannot use 32-bit OS image. * * If you call the CreateInstance operation to create an instance, no public IP address is automatically assigned to the instance. If the InternetMaxBandwidthOut value of the instance is greater than 0 Mbit/s, call the [AllocatePublicIpAddress](https://help.aliyun.com/document_detail/25544.html) operation to assign a public IP address to the instance. If the InternetMaxBandwidthOut value of the instance is 0 Mbit/s, call the [ModifyInstanceNetworkSpec](https://help.aliyun.com/document_detail/2679879.html) operation to set InternetMaxBandwidthOut to a value greater than 0 Mbit/s and then call the [AllocatePublicIpAddress](https://help.aliyun.com/document_detail/25544.html) operation to assign a public IP address to the instance. * > For the limits on the sum of maximum public bandwidths of ECS instances that use the pay-by-bandwidth billing method for network usage per region per Alibaba Cloud account, see the [Public bandwidth limits](~~25412#BandwidthQuota~~) section of the "Limits" topic. * ### [](#)Suggestions * * **Instance type selection**: See [Overview of instance families](https://help.aliyun.com/document_detail/25378.html) or call the [DescribeInstanceTypes](https://help.aliyun.com/document_detail/25620.html) operation to query the performance data of instance types, or see [Instance type selection](https://help.aliyun.com/document_detail/58291.html) to learn about how to select instance types. * * **Query of available resources**: Call the [DescribeAvailableResource](https://help.aliyun.com/document_detail/66186.html) operation to query resources available in a specific region or zone. * * **User data**: If the instance type supports [user data](https://help.aliyun.com/document_detail/49121.html), you can use UserData to pass in user data. We recommend that you do not pass in confidential information, such as passwords or private keys, in plaintext as user data. This is because the system does not encrypt `UserData` values when API requests are sent. If you must pass in confidential information as user data, we recommend that you encrypt and encode the information in Base64 before you pass in the information. Then, decode and decrypt the information within the instance for subsequent use. * * @param request - CreateInstanceRequest * @returns CreateInstanceResponse */ async createInstance(request: $_model.CreateInstanceRequest): Promise<$_model.CreateInstanceResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.createInstanceWithOptions(request, runtime); } /** * Creates an SSH key pair. The system stores the public key and returns the unencrypted private key. The private key is encoded with PEM in the PKCS#8 format. You must properly store the private key and ensure its confidentiality. * * @remarks * In addition to calling the CreateKeyPair operation to create a key pair, you can use a third-party tool to create a key pair and then call the [ImportKeyPair](https://help.aliyun.com/document_detail/51774.html) operation to upload the key pair to an Alibaba Cloud region. * Up to 500 key pairs can be created in each region. For more information, see the "SSH key pair limits" section in [Limits](https://help.aliyun.com/document_detail/25412.html). * * @param request - CreateKeyPairRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CreateKeyPairResponse */ async createKeyPairWithOptions(request: $_model.CreateKeyPairRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreateKeyPairResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.keyPairName)) { query["KeyPairName"] = request.keyPairName; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CreateKeyPair", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CreateKeyPairResponse>(await this.callApi(params, req, runtime), new $_model.CreateKeyPairResponse({})); } /** * Creates an SSH key pair. The system stores the public key and returns the unencrypted private key. The private key is encoded with PEM in the PKCS#8 format. You must properly store the private key and ensure its confidentiality. * * @remarks * In addition to calling the CreateKeyPair operation to create a key pair, you can use a third-party tool to create a key pair and then call the [ImportKeyPair](https://help.aliyun.com/document_detail/51774.html) operation to upload the key pair to an Alibaba Cloud region. * Up to 500 key pairs can be created in each region. For more information, see the "SSH key pair limits" section in [Limits](https://help.aliyun.com/document_detail/25412.html). * * @param request - CreateKeyPairRequest * @returns CreateKeyPairResponse */ async createKeyPair(request: $_model.CreateKeyPairRequest): Promise<$_model.CreateKeyPairResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.createKeyPairWithOptions(request, runtime); } /** * Creates a launch template. A launch template eliminates the need to configure a large number of parameters every time you create an Elastic Compute Service (ECS) instance. * * @remarks * After you create a launch template by calling the CreateLaunchTemplate operation, a default version that has a version number of 1 is automatically generated for the launch template. You can call the `CreateLaunchTemplateVersion` operation to create additional versions for the launch template. Version numbers start from 1 and increment by 1. If you specify a launch template but do not specify a launch template version number when you call the [RunInstances](https://help.aliyun.com/document_detail/63440.html) operation to create instances, the default version of the launch template is used. * Launch templates contain preset configurations that are used to create instances, such as the region ID, image ID, instance type, security group ID, and public bandwidth settings. If a specific parameter is not included in a launch template, you need to manually specify the parameter when you use the launch template to create instances. * Take note of the following items: * * You can retain up to 30 launch templates in each region in your Alibaba Cloud account. Each launch template can have up to 30 versions. * * Most parameters in launch templates are optional. When you create a launch template, ECS does not verify the existence or validity of specified parameter values. The parameter values are verified only when you use the launch template to create instances. * * If you configured a specific parameter in a launch template, you cannot filter out the parameter when you call the [RunInstances](https://help.aliyun.com/document_detail/63440.html) operation to create instances from the launch template. For example, if you set `HostName` to LocalHost in a launch template but do not specify `HostName` when you call the `RunInstances` operation to create instances from the launch template, the hostname of the created instances is `LocalHost`. If you want to overwrite `LocalHost`, which is the value of HostName in the launch template, you can set `HostName` to MyHost or a different value when you call the `RunInstances` operation. * * @param request - CreateLaunchTemplateRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CreateLaunchTemplateResponse */ async createLaunchTemplateWithOptions(request: $_model.CreateLaunchTemplateRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreateLaunchTemplateResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.autoReleaseTime)) { query["AutoReleaseTime"] = request.autoReleaseTime; } if (!$dara.isNull(request.autoRenew)) { query["AutoRenew"] = request.autoRenew; } if (!$dara.isNull(request.autoRenewPeriod)) { query["AutoRenewPeriod"] = request.autoRenewPeriod; } if (!$dara.isNull(request.creditSpecification)) { query["CreditSpecification"] = request.creditSpecification; } if (!$dara.isNull(request.dataDisk)) { query["DataDisk"] = request.dataDisk; } if (!$dara.isNull(request.deletionProtection)) { query["DeletionProtection"] = request.deletionProtection; } if (!$dara.isNull(request.deploymentSetId)) { query["DeploymentSetId"] = request.deploymentSetId; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.enableVmOsConfig)) { query["EnableVmOsConfig"] = request.enableVmOsConfig; } if (!$dara.isNull(request.hostName)) { query["HostName"] = request.hostName; } if (!$dara.isNull(request.httpEndpoint)) { query["HttpEndpoint"] = request.httpEndpoint; } if (!$dara.isNull(request.httpPutResponseHopLimit)) { query["HttpPutResponseHopLimit"] = request.httpPutResponseHopLimit; } if (!$dara.isNull(request.httpTokens)) { query["HttpTokens"] = request.httpTokens; } if (!$dara.isNull(request.imageId)) { query["ImageId"] = request.imageId; } if (!$dara.isNull(request.imageOptions)) { query["ImageOptions"] = request.imageOptions; } if (!$dara.isNull(request.imageOwnerAlias)) { query["ImageOwnerAlias"] = request.imageOwnerAlias; } if (!$dara.isNull(request.instanceChargeType)) { query["InstanceChargeType"] = request.instanceChargeType; } if (!$dara.isNull(request.instanceName)) { query["InstanceName"] = request.instanceName; } if (!$dara.isNull(request.instanceType)) { query["InstanceType"] = request.instanceType; } if (!$dara.isNull(request.internetChargeType)) { query["InternetChargeType"] = request.internetChargeType; } if (!$dara.isNull(request.internetMaxBandwidthIn)) { query["InternetMaxBandwidthIn"] = request.internetMaxBandwidthIn; } if (!$dara.isNull(request.internetMaxBandwidthOut)) { query["InternetMaxBandwidthOut"] = request.internetMaxBandwidthOut; } if (!$dara.isNull(request.ioOptimized)) { query["IoOptimized"] = request.ioOptimized; } if (!$dara.isNull(request.ipv6AddressCount)) { query["Ipv6AddressCount"] = request.ipv6AddressCount; } if (!$dara.isNull(request.keyPairName)) { query["KeyPairName"] = request.keyPairName; } if (!$dara.isNull(request.launchTemplateName)) { query["LaunchTemplateName"] = request.launchTemplateName; } if (!$dara.isNull(request.networkInterface)) { query["NetworkInterface"] = request.networkInterface; } if (!$dara.isNull(request.networkType)) { query["NetworkType"] = request.networkType; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.passwordInherit)) { query["PasswordInherit"] = request.passwordInherit; } if (!$dara.isNull(request.period)) { query["Period"] = request.period; } if (!$dara.isNull(request.periodUnit)) { query["PeriodUnit"] = request.periodUnit; } if (!$dara.isNull(request.privateIpAddress)) { query["PrivateIpAddress"] = request.privateIpAddress; } if (!$dara.isNull(request.ramRoleName)) { query["RamRoleName"] = request.ramRoleName; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.securityEnhancementStrategy)) { query["SecurityEnhancementStrategy"] = request.securityEnhancementStrategy; } if (!$dara.isNull(request.securityGroupId)) { query["SecurityGroupId"] = request.securityGroupId; } if (!$dara.isNull(request.securityGroupIds)) { query["SecurityGroupIds"] = request.securityGroupIds; } if (!$dara.isNull(request.securityOptions)) { query["SecurityOptions"] = request.securityOptions; } if (!$dara.isNull(request.spotDuration)) { query["SpotDuration"] = request.spotDuration; } if (!$dara.isNull(request.spotPriceLimit)) { query["SpotPriceLimit"] = request.spotPriceLimit; } if (!$dara.isNull(request.spotStrategy)) { query["SpotStrategy"] = request.spotStrategy; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } if (!$dara.isNull(request.templateResourceGroupId)) { query["TemplateResourceGroupId"] = request.templateResourceGroupId; } if (!$dara.isNull(request.templateTag)) { query["TemplateTag"] = request.templateTag; } if (!$dara.isNull(request.userData)) { query["UserData"] = request.userData; } if (!$dara.isNull(request.vSwitchId)) { query["VSwitchId"] = request.vSwitchId; } if (!$dara.isNull(request.versionDescription)) { query["VersionDescription"] = request.versionDescription; } if (!$dara.isNull(request.vpcId)) { query["VpcId"] = request.vpcId; } if (!$dara.isNull(request.zoneId)) { query["ZoneId"] = request.zoneId; } if (!$dara.isNull(request.systemDisk)) { query["SystemDisk"] = request.systemDisk; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CreateLaunchTemplate", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CreateLaunchTemplateResponse>(await this.callApi(params, req, runtime), new $_model.CreateLaunchTemplateResponse({})); } /** * Creates a launch template. A launch template eliminates the need to configure a large number of parameters every time you create an Elastic Compute Service (ECS) instance. * * @remarks * After you create a launch template by calling the CreateLaunchTemplate operation, a default version that has a version number of 1 is automatically generated for the launch template. You can call the `CreateLaunchTemplateVersion` operation to create additional versions for the launch template. Version numbers start from 1 and increment by 1. If you specify a launch template but do not specify a launch template version number when you call the [RunInstances](https://help.aliyun.com/document_detail/63440.html) operation to create instances, the default version of the launch template is used. * Launch templates contain preset configurations that are used to create instances, such as the region ID, image ID, instance type, security group ID, and public bandwidth settings. If a specific parameter is not included in a launch template, you need to manually specify the parameter when you use the launch template to create instances. * Take note of the following items: * * You can retain up to 30 launch templates in each region in your Alibaba Cloud account. Each launch template can have up to 30 versions. * * Most parameters in launch templates are optional. When you create a launch template, ECS does not verify the existence or validity of specified parameter values. The parameter values are verified only when you use the launch template to create instances. * * If you configured a specific parameter in a launch template, you cannot filter out the parameter when you call the [RunInstances](https://help.aliyun.com/document_detail/63440.html) operation to create instances from the launch template. For example, if you set `HostName` to LocalHost in a launch template but do not specify `HostName` when you call the `RunInstances` operation to create instances from the launch template, the hostname of the created instances is `LocalHost`. If you want to overwrite `LocalHost`, which is the value of HostName in the launch template, you can set `HostName` to MyHost or a different value when you call the `RunInstances` operation. * * @param request - CreateLaunchTemplateRequest * @returns CreateLaunchTemplateResponse */ async createLaunchTemplate(request: $_model.CreateLaunchTemplateRequest): Promise<$_model.CreateLaunchTemplateResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.createLaunchTemplateWithOptions(request, runtime); } /** * Creates a version for a launch template. You can use the created version to create Elastic Compute Service (ECS) instances, scaling groups, or auto provisioning groups. * * @remarks * ## [](#)Usage notes * If you want to modify the parameters of a launch template version, you can create another version with different parameter settings for the launch template. You can create up to 30 versions for each launch template. * * @param request - CreateLaunchTemplateVersionRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CreateLaunchTemplateVersionResponse */ async createLaunchTemplateVersionWithOptions(request: $_model.CreateLaunchTemplateVersionRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreateLaunchTemplateVersionResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.autoReleaseTime)) { query["AutoReleaseTime"] = request.autoReleaseTime; } if (!$dara.isNull(request.autoRenew)) { query["AutoRenew"] = request.autoRenew; } if (!$dara.isNull(request.autoRenewPeriod)) { query["AutoRenewPeriod"] = request.autoRenewPeriod; } if (!$dara.isNull(request.creditSpecification)) { query["CreditSpecification"] = request.creditSpecification; } if (!$dara.isNull(request.dataDisk)) { query["DataDisk"] = request.dataDisk; } if (!$dara.isNull(request.deletionProtection)) { query["DeletionProtection"] = request.deletionProtection; } if (!$dara.isNull(request.deploymentSetId)) { query["DeploymentSetId"] = request.deploymentSetId; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.enableVmOsConfig)) { query["EnableVmOsConfig"] = request.enableVmOsConfig; } if (!$dara.isNull(request.hostName)) { query["HostName"] = request.hostName; } if (!$dara.isNull(request.httpEndpoint)) { query["HttpEndpoint"] = request.httpEndpoint; } if (!$dara.isNull(request.httpPutResponseHopLimit)) { query["HttpPutResponseHopLimit"] = request.httpPutResponseHopLimit; } if (!$dara.isNull(request.httpTokens)) { query["HttpTokens"] = request.httpTokens; } if (!$dara.isNull(request.imageId)) { query["ImageId"] = request.imageId; } if (!$dara.isNull(request.imageOptions)) { query["ImageOptions"] = request.imageOptions; } if (!$dara.isNull(request.imageOwnerAlias)) { query["ImageOwnerAlias"] = request.imageOwnerAlias; } if (!$dara.isNull(request.instanceChargeType)) { query["InstanceChargeType"] = request.instanceChargeType; } if (!$dara.isNull(request.instanceName)) { query["InstanceName"] = request.instanceName; } if (!$dara.isNull(request.instanceType)) { query["InstanceType"] = request.instanceType; } if (!$dara.isNull(request.internetChargeType)) { query["InternetChargeType"] = request.internetChargeType; } if (!$dara.isNull(request.internetMaxBandwidthIn)) { query["InternetMaxBandwidthIn"] = request.internetMaxBandwidthIn; } if (!$dara.isNull(request.internetMaxBandwidthOut)) { query["InternetMaxBandwidthOut"] = request.internetMaxBandwidthOut; } if (!$dara.isNull(request.ioOptimized)) { query["IoOptimized"] = request.ioOptimized; } if (!$dara.isNull(request.ipv6AddressCount)) { query["Ipv6AddressCount"] = request.ipv6AddressCount; } if (!$dara.isNull(request.keyPairName)) { query["KeyPairName"] = request.keyPairName; } if (!$dara.isNull(request.launchTemplateId)) { query["LaunchTemplateId"] = request.launchTemplateId; } if (!$dara.isNull(request.launchTemplateName)) { query["LaunchTemplateName"] = request.launchTemplateName; } if (!$dara.isNull(request.networkInterface)) { query["NetworkInterface"] = request.networkInterface; } if (!$dara.isNull(request.networkType)) { query["NetworkType"] = request.networkType; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.passwordInherit)) { query["PasswordInherit"] = request.passwordInherit; } if (!$dara.isNull(request.period)) { query["Period"] = request.period; } if (!$dara.isNull(request.periodUnit)) { query["PeriodUnit"] = request.periodUnit; } if (!$dara.isNull(request.privateIpAddress)) { query["PrivateIpAddress"] = request.privateIpAddress; } if (!$dara.isNull(request.ramRoleName)) { query["RamRoleName"] = request.ramRoleName; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.securityEnhancementStrategy)) { query["SecurityEnhancementStrategy"] = request.securityEnhancementStrategy; } if (!$dara.isNull(request.securityGroupId)) { query["SecurityGroupId"] = request.securityGroupId; } if (!$dara.isNull(request.securityGroupIds)) { query["SecurityGroupIds"] = request.securityGroupIds; } if (!$dara.isNull(request.securityOptions)) { query["SecurityOptions"] = request.securityOptions; } if (!$dara.isNull(request.spotDuration)) { query["SpotDuration"] = request.spotDuration; } if (!$dara.isNull(request.spotPriceLimit)) { query["SpotPriceLimit"] = request.spotPriceLimit; } if (!$dara.isNull(request.spotStrategy)) { query["SpotStrategy"] = request.spotStrategy; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } if (!$dara.isNull(request.userData)) { query["UserData"] = request.userData; } if (!$dara.isNull(request.vSwitchId)) { query["VSwitchId"] = request.vSwitchId; } if (!$dara.isNull(request.versionDescription)) { query["VersionDescription"] = request.versionDescription; } if (!$dara.isNull(request.vpcId)) { query["VpcId"] = request.vpcId; } if (!$dara.isNull(request.zoneId)) { query["ZoneId"] = request.zoneId; } if (!$dara.isNull(request.systemDisk)) { query["SystemDisk"] = request.systemDisk; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CreateLaunchTemplateVersion", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CreateLaunchTemplateVersionResponse>(await this.callApi(params, req, runtime), new $_model.CreateLaunchTemplateVersionResponse({})); } /** * Creates a version for a launch template. You can use the created version to create Elastic Compute Service (ECS) instances, scaling groups, or auto provisioning groups. * * @remarks * ## [](#)Usage notes * If you want to modify the parameters of a launch template version, you can create another version with different parameter settings for the launch template. You can create up to 30 versions for each launch template. * * @param request - CreateLaunchTemplateVersionRequest * @returns CreateLaunchTemplateVersionResponse */ async createLaunchTemplateVersion(request: $_model.CreateLaunchTemplateVersionRequest): Promise<$_model.CreateLaunchTemplateVersionResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.createLaunchTemplateVersionWithOptions(request, runtime); } /** * CreateNatGateway * * @deprecated OpenAPI CreateNatGateway is deprecated, please use Vpc::2016-04-28::CreateNatGateway instead. * * @param request - CreateNatGatewayRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CreateNatGatewayResponse */ async createNatGatewayWithOptions(request: $_model.CreateNatGatewayRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreateNatGatewayResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.bandwidthPackage)) { query["BandwidthPackage"] = request.bandwidthPackage; } if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.name)) { query["Name"] = request.name; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.vpcId)) { query["VpcId"] = request.vpcId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CreateNatGateway", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CreateNatGatewayResponse>(await this.callApi(params, req, runtime), new $_model.CreateNatGatewayResponse({})); } /** * CreateNatGateway * * @deprecated OpenAPI CreateNatGateway is deprecated, please use Vpc::2016-04-28::CreateNatGateway instead. * * @param request - CreateNatGatewayRequest * @returns CreateNatGatewayResponse */ // Deprecated async createNatGateway(request: $_model.CreateNatGatewayRequest): Promise<$_model.CreateNatGatewayResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.createNatGatewayWithOptions(request, runtime); } /** * Creates an elastic network interface (ENI). You can specify an IP address as the primary private IP address of the ENI. * * @remarks * Take note of the following items: * * This operation is a synchronous operation. After an ENI is created, the ENI immediately enters the Available (`Available`) state and can be attached to an Elastic Compute Service (ECS) instance. * * If `NetworkInterfaceId` is empty in the response, no ENI is created. Recall the operation to create an ENI. * * An ENI can be attached only to a single ECS instance that resides in a virtual private cloud (VPC). * * When an ENI is detached from an ECS instance and attached to another ECS instance, the attributes of the ENI remain unchanged and network traffic is redirected to the new instance. * * When you call this operation to create an ENI, you can assign up to 49 secondary private IP addresses to the ENI. * * If you want to assign IPv6 addresses when you create an ENI, make sure that IPv6 is enabled for the vSwitch with which you want to associate the ENI. For more information, see [What is an IPv6 gateway?](https://help.aliyun.com/document_detail/98896.html) * * A limit is imposed on the number of ENIs that can be created per Alibaba Cloud region per account. You can view the quota limit in the ECS console. For more information, see [Manage ECS quotas](https://help.aliyun.com/document_detail/184115.html). * ### [](#)Sample requests * **Create an ENI** * RegionId: cn-hangzhou, // Specify the China (Hangzhou) region.SecurityGroupId: sg-bp10jztp6b0sdsyl****, // Specify the ID of the security group in which to create the ENI.VSwitchId: vsw-bp19wo63nleroq22g****, // Specify the ID of the vSwitch to which to connect the ENI. * **Create an ENI and specify an IP address as the primary private IP address of the ENI** * RegionId: cn-hangzhou, // Specify the China (Hangzhou) region.SecurityGroupId: sg-bp10jztp6b0sdsyl****, // Specify the ID of the security group in which to create the ENI.VSwitchId: vsw-bp19wo63nleroq22g****, // Specify the ID of the vSwitch to which to connect the ENI.PrimaryIpAddress: 192.168.0.*, // Specify an IP address as the primary private IP address of the ENI. * * @param request - CreateNetworkInterfaceRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CreateNetworkInterfaceResponse */ async createNetworkInterfaceWithOptions(request: $_model.CreateNetworkInterfaceRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreateNetworkInterfaceResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.businessType)) { query["BusinessType"] = request.businessType; } if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.connectionTrackingConfiguration)) { query["ConnectionTrackingConfiguration"] = request.connectionTrackingConfiguration; } if (!$dara.isNull(request.deleteOnRelease)) { query["DeleteOnRelease"] = request.deleteOnRelease; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.enhancedNetwork)) { query["EnhancedNetwork"] = request.enhancedNetwork; } if (!$dara.isNull(request.instanceType)) { query["InstanceType"] = request.instanceType; } if (!$dara.isNull(request.ipv4Prefix)) { query["Ipv4Prefix"] = request.ipv4Prefix; } if (!$dara.isNull(request.ipv4PrefixCount)) { query["Ipv4PrefixCount"] = request.ipv4PrefixCount; } if (!$dara.isNull(request.ipv6Address)) { query["Ipv6Address"] = request.ipv6Address; } if (!$dara.isNull(request.ipv6AddressCount)) { query["Ipv6AddressCount"] = request.ipv6AddressCount; } if (!$dara.isNull(request.ipv6Prefix)) { query["Ipv6Prefix"] = request.ipv6Prefix; } if (!$dara.isNull(request.ipv6PrefixCount)) { query["Ipv6PrefixCount"] = request.ipv6PrefixCount; } if (!$dara.isNull(request.networkInterfaceName)) { query["NetworkInterfaceName"] = request.networkInterfaceName; } if (!$dara.isNull(request.networkInterfaceTrafficConfig)) { query["NetworkInterfaceTrafficConfig"] = request.networkInterfaceTrafficConfig; } if (!$dara.isNull(request.networkInterfaceTrafficMode)) { query["NetworkInterfaceTrafficMode"] = request.networkInterfaceTrafficMode; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.primaryIpAddress)) { query["PrimaryIpAddress"] = request.primaryIpAddress; } if (!$dara.isNull(request.privateIpAddress)) { query["PrivateIpAddress"] = request.privateIpAddress; } if (!$dara.isNull(request.queueNumber)) { query["QueueNumber"] = request.queueNumber; } if (!$dara.isNull(request.queuePairNumber)) { query["QueuePairNumber"] = request.queuePairNumber; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.rxQueueSize)) { query["RxQueueSize"] = request.rxQueueSize; } if (!$dara.isNull(request.secondaryPrivateIpAddressCount)) { query["SecondaryPrivateIpAddressCount"] = request.secondaryPrivateIpAddressCount; } if (!$dara.isNull(request.securityGroupId)) { query["SecurityGroupId"] = request.securityGroupId; } if (!$dara.isNull(request.securityGroupIds)) { query["SecurityGroupIds"] = request.securityGroupIds; } if (!$dara.isNull(request.sourceDestCheck)) { query["SourceDestCheck"] = request.sourceDestCheck; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } if (!$dara.isNull(request.txQueueSize)) { query["TxQueueSize"] = request.txQueueSize; } if (!$dara.isNull(request.vSwitchId)) { query["VSwitchId"] = request.vSwitchId; } if (!$dara.isNull(request.visible)) { query["Visible"] = request.visible; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CreateNetworkInterface", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CreateNetworkInterfaceResponse>(await this.callApi(params, req, runtime), new $_model.CreateNetworkInterfaceResponse({})); } /** * Creates an elastic network interface (ENI). You can specify an IP address as the primary private IP address of the ENI. * * @remarks * Take note of the following items: * * This operation is a synchronous operation. After an ENI is created, the ENI immediately enters the Available (`Available`) state and can be attached to an Elastic Compute Service (ECS) instance. * * If `NetworkInterfaceId` is empty in the response, no ENI is created. Recall the operation to create an ENI. * * An ENI can be attached only to a single ECS instance that resides in a virtual private cloud (VPC). * * When an ENI is detached from an ECS instance and attached to another ECS instance, the attributes of the ENI remain unchanged and network traffic is redirected to the new instance. * * When you call this operation to create an ENI, you can assign up to 49 secondary private IP addresses to the ENI. * * If you want to assign IPv6 addresses when you create an ENI, make sure that IPv6 is enabled for the vSwitch with which you want to associate the ENI. For more information, see [What is an IPv6 gateway?](https://help.aliyun.com/document_detail/98896.html) * * A limit is imposed on the number of ENIs that can be created per Alibaba Cloud region per account. You can view the quota limit in the ECS console. For more information, see [Manage ECS quotas](https://help.aliyun.com/document_detail/184115.html). * ### [](#)Sample requests * **Create an ENI** * RegionId: cn-hangzhou, // Specify the China (Hangzhou) region.SecurityGroupId: sg-bp10jztp6b0sdsyl****, // Specify the ID of the security group in which to create the ENI.VSwitchId: vsw-bp19wo63nleroq22g****, // Specify the ID of the vSwitch to which to connect the ENI. * **Create an ENI and specify an IP address as the primary private IP address of the ENI** * RegionId: cn-hangzhou, // Specify the China (Hangzhou) region.SecurityGroupId: sg-bp10jztp6b0sdsyl****, // Specify the ID of the security group in which to create the ENI.VSwitchId: vsw-bp19wo63nleroq22g****, // Specify the ID of the vSwitch to which to connect the ENI.PrimaryIpAddress: 192.168.0.*, // Specify an IP address as the primary private IP address of the ENI. * * @param request - CreateNetworkInterfaceRequest * @returns CreateNetworkInterfaceResponse */ async createNetworkInterface(request: $_model.CreateNetworkInterfaceRequest): Promise<$_model.CreateNetworkInterfaceResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.createNetworkInterfaceWithOptions(request, runtime); } /** * Grants a permission on an elastic network interface (ENI) to an Alibaba Cloud partner (a certified ISV) or an individual user. * * @remarks * Before you call this operation, submit a ticket to apply for using this operation. * * @param request - CreateNetworkInterfacePermissionRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CreateNetworkInterfacePermissionResponse */ async createNetworkInterfacePermissionWithOptions(request: $_model.CreateNetworkInterfacePermissionRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreateNetworkInterfacePermissionResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.accountId)) { query["AccountId"] = request.accountId; } if (!$dara.isNull(request.networkInterfaceId)) { query["NetworkInterfaceId"] = request.networkInterfaceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.permission)) { query["Permission"] = request.permission; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CreateNetworkInterfacePermission", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CreateNetworkInterfacePermissionResponse>(await this.callApi(params, req, runtime), new $_model.CreateNetworkInterfacePermissionResponse({})); } /** * Grants a permission on an elastic network interface (ENI) to an Alibaba Cloud partner (a certified ISV) or an individual user. * * @remarks * Before you call this operation, submit a ticket to apply for using this operation. * * @param request - CreateNetworkInterfacePermissionRequest * @returns CreateNetworkInterfacePermissionResponse */ async createNetworkInterfacePermission(request: $_model.CreateNetworkInterfacePermissionRequest): Promise<$_model.CreateNetworkInterfacePermissionResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.createNetworkInterfacePermissionWithOptions(request, runtime); } /** * CreatePhysicalConnection * * @deprecated OpenAPI CreatePhysicalConnection is deprecated, please use Vpc::2016-04-28::CreatePhysicalConnection instead. * * @param request - CreatePhysicalConnectionRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CreatePhysicalConnectionResponse */ async createPhysicalConnectionWithOptions(request: $_model.CreatePhysicalConnectionRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreatePhysicalConnectionResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.accessPointId)) { query["AccessPointId"] = request.accessPointId; } if (!$dara.isNull(request.circuitCode)) { query["CircuitCode"] = request.circuitCode; } if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.lineOperator)) { query["LineOperator"] = request.lineOperator; } if (!$dara.isNull(request.name)) { query["Name"] = request.name; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.peerLocation)) { query["PeerLocation"] = request.peerLocation; } if (!$dara.isNull(request.portType)) { query["PortType"] = request.portType; } if (!$dara.isNull(request.redundantPhysicalConnectionId)) { query["RedundantPhysicalConnectionId"] = request.redundantPhysicalConnectionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.type)) { query["Type"] = request.type; } if (!$dara.isNull(request.userCidr)) { query["UserCidr"] = request.userCidr; } if (!$dara.isNull(request.bandwidth)) { query["bandwidth"] = request.bandwidth; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CreatePhysicalConnection", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CreatePhysicalConnectionResponse>(await this.callApi(params, req, runtime), new $_model.CreatePhysicalConnectionResponse({})); } /** * CreatePhysicalConnection * * @deprecated OpenAPI CreatePhysicalConnection is deprecated, please use Vpc::2016-04-28::CreatePhysicalConnection instead. * * @param request - CreatePhysicalConnectionRequest * @returns CreatePhysicalConnectionResponse */ // Deprecated async createPhysicalConnection(request: $_model.CreatePhysicalConnectionRequest): Promise<$_model.CreatePhysicalConnectionResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.createPhysicalConnectionWithOptions(request, runtime); } /** * 创建运维窗口 * * @param tmpReq - CreatePlanMaintenanceWindowRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CreatePlanMaintenanceWindowResponse */ async createPlanMaintenanceWindowWithOptions(tmpReq: $_model.CreatePlanMaintenanceWindowRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreatePlanMaintenanceWindowResponse> { tmpReq.validate(); let request = new $_model.CreatePlanMaintenanceWindowShrinkRequest({ }); OpenApiUtil.convert(tmpReq, request); if (!$dara.isNull(tmpReq.targetResource)) { request.targetResourceShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.targetResource, "TargetResource", "json"); } if (!$dara.isNull(tmpReq.timePeriod)) { request.timePeriodShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.timePeriod, "TimePeriod", "json"); } let query = { }; if (!$dara.isNull(request.enable)) { query["Enable"] = request.enable; } if (!$dara.isNull(request.planWindowName)) { query["PlanWindowName"] = request.planWindowName; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.supportMaintenanceAction)) { query["SupportMaintenanceAction"] = request.supportMaintenanceAction; } if (!$dara.isNull(request.targetResourceShrink)) { query["TargetResource"] = request.targetResourceShrink; } if (!$dara.isNull(request.timePeriodShrink)) { query["TimePeriod"] = request.timePeriodShrink; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CreatePlanMaintenanceWindow", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CreatePlanMaintenanceWindowResponse>(await this.callApi(params, req, runtime), new $_model.CreatePlanMaintenanceWindowResponse({})); } /** * 创建运维窗口 * * @param request - CreatePlanMaintenanceWindowRequest * @returns CreatePlanMaintenanceWindowResponse */ async createPlanMaintenanceWindow(request: $_model.CreatePlanMaintenanceWindowRequest): Promise<$_model.CreatePlanMaintenanceWindowResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.createPlanMaintenanceWindowWithOptions(request, runtime); } /** * Creates a port list. You can associate a port list with resources, such as security groups. * * @param request - CreatePortRangeListRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CreatePortRangeListResponse */ async createPortRangeListWithOptions(request: $_model.CreatePortRangeListRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreatePortRangeListResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.entry)) { query["Entry"] = request.entry; } if (!$dara.isNull(request.maxEntries)) { query["MaxEntries"] = request.maxEntries; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.portRangeListName)) { query["PortRangeListName"] = request.portRangeListName; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CreatePortRangeList", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CreatePortRangeListResponse>(await this.callApi(params, req, runtime), new $_model.CreatePortRangeListResponse({})); } /** * Creates a port list. You can associate a port list with resources, such as security groups. * * @param request - CreatePortRangeListRequest * @returns CreatePortRangeListResponse */ async createPortRangeList(request: $_model.CreatePortRangeListRequest): Promise<$_model.CreatePortRangeListResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.createPortRangeListWithOptions(request, runtime); } /** * Creates a prefix list. * * @remarks * ## [](#)Usage notes * * A prefix list is a collection of network prefixes (CIDR blocks) and can be referenced to configure network rules for other resources. For more information, see [Overview](https://help.aliyun.com/document_detail/206223.html). * * When you create a prefix list, take note of the following items: * * You must specify an IP address family (IPv4 or IPv6) for the prefix list, and cannot change the IP address family after the prefix list is created. You cannot combine IPv4 and IPv6 CIDR blocks in a single prefix list. * * You must specify the maximum number of entries that the prefix list can contain. You cannot modify the maximum number of entries after the prefix list is created. * * You can specify entries for the prefix list. Each entry consists of a CIDR block and the description for the CIDR block. The total number of entries cannot exceed the maximum number of entries that you specified. * * For more information about the limits on prefix lists and other resources, see [Limits](https://help.aliyun.com/document_detail/25412.html). * * You can create Resource Access Management (RAM) users and grant them minimum permissions. This eliminates the need to share the AccessKey pair of your Alibaba Cloud account with other users and reduces security risks for your enterprises. For information about how to grant permissions on prefix lists to RAM users, see [Grant a RAM user permissions on prefix lists](https://help.aliyun.com/document_detail/206175.html) * * @param request - CreatePrefixListRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CreatePrefixListResponse */ async createPrefixListWithOptions(request: $_model.CreatePrefixListRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreatePrefixListResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.addressFamily)) { query["AddressFamily"] = request.addressFamily; } if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.entry)) { query["Entry"] = request.entry; } if (!$dara.isNull(request.maxEntries)) { query["MaxEntries"] = request.maxEntries; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.prefixListName)) { query["PrefixListName"] = request.prefixListName; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CreatePrefixList", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CreatePrefixListResponse>(await this.callApi(params, req, runtime), new $_model.CreatePrefixListResponse({})); } /** * Creates a prefix list. * * @remarks * ## [](#)Usage notes * * A prefix list is a collection of network prefixes (CIDR blocks) and can be referenced to configure network rules for other resources. For more information, see [Overview](https://help.aliyun.com/document_detail/206223.html). * * When you create a prefix list, take note of the following items: * * You must specify an IP address family (IPv4 or IPv6) for the prefix list, and cannot change the IP address family after the prefix list is created. You cannot combine IPv4 and IPv6 CIDR blocks in a single prefix list. * * You must specify the maximum number of entries that the prefix list can contain. You cannot modify the maximum number of entries after the prefix list is created. * * You can specify entries for the prefix list. Each entry consists of a CIDR block and the description for the CIDR block. The total number of entries cannot exceed the maximum number of entries that you specified. * * For more information about the limits on prefix lists and other resources, see [Limits](https://help.aliyun.com/document_detail/25412.html). * * You can create Resource Access Management (RAM) users and grant them minimum permissions. This eliminates the need to share the AccessKey pair of your Alibaba Cloud account with other users and reduces security risks for your enterprises. For information about how to grant permissions on prefix lists to RAM users, see [Grant a RAM user permissions on prefix lists](https://help.aliyun.com/document_detail/206175.html) * * @param request - CreatePrefixListRequest * @returns CreatePrefixListResponse */ async createPrefixList(request: $_model.CreatePrefixListRequest): Promise<$_model.CreatePrefixListResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.createPrefixListWithOptions(request, runtime); } /** * CreateRouteEntry * * @deprecated OpenAPI CreateRouteEntry is deprecated, please use Vpc::2016-04-28::CreateRouteEntry instead. * * @param request - CreateRouteEntryRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CreateRouteEntryResponse */ async createRouteEntryWithOptions(request: $_model.CreateRouteEntryRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreateRouteEntryResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.destinationCidrBlock)) { query["DestinationCidrBlock"] = request.destinationCidrBlock; } if (!$dara.isNull(request.nextHopId)) { query["NextHopId"] = request.nextHopId; } if (!$dara.isNull(request.nextHopList)) { query["NextHopList"] = request.nextHopList; } if (!$dara.isNull(request.nextHopType)) { query["NextHopType"] = request.nextHopType; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.routeTableId)) { query["RouteTableId"] = request.routeTableId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CreateRouteEntry", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CreateRouteEntryResponse>(await this.callApi(params, req, runtime), new $_model.CreateRouteEntryResponse({})); } /** * CreateRouteEntry * * @deprecated OpenAPI CreateRouteEntry is deprecated, please use Vpc::2016-04-28::CreateRouteEntry instead. * * @param request - CreateRouteEntryRequest * @returns CreateRouteEntryResponse */ // Deprecated async createRouteEntry(request: $_model.CreateRouteEntryRequest): Promise<$_model.CreateRouteEntryResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.createRouteEntryWithOptions(request, runtime); } /** * CreateRouterInterface * * @deprecated OpenAPI CreateRouterInterface is deprecated, please use Vpc::2016-04-28::CreateRouterInterface instead. * * @param request - CreateRouterInterfaceRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CreateRouterInterfaceResponse */ async createRouterInterfaceWithOptions(request: $_model.CreateRouterInterfaceRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreateRouterInterfaceResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.accessPointId)) { query["AccessPointId"] = request.accessPointId; } if (!$dara.isNull(request.autoPay)) { query["AutoPay"] = request.autoPay; } if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.healthCheckSourceIp)) { query["HealthCheckSourceIp"] = request.healthCheckSourceIp; } if (!$dara.isNull(request.healthCheckTargetIp)) { query["HealthCheckTargetIp"] = request.healthCheckTargetIp; } if (!$dara.isNull(request.instanceChargeType)) { query["InstanceChargeType"] = request.instanceChargeType; } if (!$dara.isNull(request.name)) { query["Name"] = request.name; } if (!$dara.isNull(request.oppositeAccessPointId)) { query["OppositeAccessPointId"] = request.oppositeAccessPointId; } if (!$dara.isNull(request.oppositeInterfaceId)) { query["OppositeInterfaceId"] = request.oppositeInterfaceId; } if (!$dara.isNull(request.oppositeInterfaceOwnerId)) { query["OppositeInterfaceOwnerId"] = request.oppositeInterfaceOwnerId; } if (!$dara.isNull(request.oppositeRegionId)) { query["OppositeRegionId"] = request.oppositeRegionId; } if (!$dara.isNull(request.oppositeRouterId)) { query["OppositeRouterId"] = request.oppositeRouterId; } if (!$dara.isNull(request.oppositeRouterType)) { query["OppositeRouterType"] = request.oppositeRouterType; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.period)) { query["Period"] = request.period; } if (!$dara.isNull(request.pricingCycle)) { query["PricingCycle"] = request.pricingCycle; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.role)) { query["Role"] = request.role; } if (!$dara.isNull(request.routerId)) { query["RouterId"] = request.routerId; } if (!$dara.isNull(request.routerType)) { query["RouterType"] = request.routerType; } if (!$dara.isNull(request.spec)) { query["Spec"] = request.spec; } if (!$dara.isNull(request.userCidr)) { query["UserCidr"] = request.userCidr; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CreateRouterInterface", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CreateRouterInterfaceResponse>(await this.callApi(params, req, runtime), new $_model.CreateRouterInterfaceResponse({})); } /** * CreateRouterInterface * * @deprecated OpenAPI CreateRouterInterface is deprecated, please use Vpc::2016-04-28::CreateRouterInterface instead. * * @param request - CreateRouterInterfaceRequest * @returns CreateRouterInterfaceResponse */ // Deprecated async createRouterInterface(request: $_model.CreateRouterInterfaceRequest): Promise<$_model.CreateRouterInterfaceResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.createRouterInterfaceWithOptions(request, runtime); } /** * 购买节省计划并预付费换购按量付费 * * @param request - CreateSavingsPlanRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CreateSavingsPlanResponse */ async createSavingsPlanWithOptions(request: $_model.CreateSavingsPlanRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreateSavingsPlanResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.chargeType)) { query["ChargeType"] = request.chargeType; } if (!$dara.isNull(request.committedAmount)) { query["CommittedAmount"] = request.committedAmount; } if (!$dara.isNull(request.instanceTypeFamily)) { query["InstanceTypeFamily"] = request.instanceTypeFamily; } if (!$dara.isNull(request.instanceTypeFamilyGroup)) { query["InstanceTypeFamilyGroup"] = request.instanceTypeFamilyGroup; } if (!$dara.isNull(request.offeringType)) { query["OfferingType"] = request.offeringType; } if (!$dara.isNull(request.period)) { query["Period"] = request.period; } if (!$dara.isNull(request.periodUnit)) { query["PeriodUnit"] = request.periodUnit; } if (!$dara.isNull(request.planType)) { query["PlanType"] = request.planType; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceId)) { query["ResourceId"] = request.resourceId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CreateSavingsPlan", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CreateSavingsPlanResponse>(await this.callApi(params, req, runtime), new $_model.CreateSavingsPlanResponse({})); } /** * 购买节省计划并预付费换购按量付费 * * @param request - CreateSavingsPlanRequest * @returns CreateSavingsPlanResponse */ async createSavingsPlan(request: $_model.CreateSavingsPlanRequest): Promise<$_model.CreateSavingsPlanResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.createSavingsPlanWithOptions(request, runtime); } /** * Creates a security group. * * @remarks * By default, the internal access control policy (InnerAccessPolicy) of the basic security group that you create by calling this operation is internal interconnectivity (**Accept**). You can call the [ModifySecurityGroupPolicy](https://help.aliyun.com/document_detail/2679846.html) operation to change the value of InnerAccessPolicy for the basic security group. * * By default, the internal access control policy (InnerAccessPolicy) of the advanced security group that you create by calling this operation is internal isolation (**Drop**). The InnerAccessPolicy value of the advanced security group cannot be changed. * * You can create a limited number of security groups per region. You can create at least 100 security groups per region. For more information, see the [Security group limits](~~25412#SecurityGroupQuota1~~) section in the "Limits" topic. * * To create a security group of the Virtual Private Cloud (VPC) type, you must specify VpcId. * * @param request - CreateSecurityGroupRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CreateSecurityGroupResponse */ async createSecurityGroupWithOptions(request: $_model.CreateSecurityGroupRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreateSecurityGroupResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.securityGroupName)) { query["SecurityGroupName"] = request.securityGroupName; } if (!$dara.isNull(request.securityGroupType)) { query["SecurityGroupType"] = request.securityGroupType; } if (!$dara.isNull(request.serviceManaged)) { query["ServiceManaged"] = request.serviceManaged; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } if (!$dara.isNull(request.vpcId)) { query["VpcId"] = request.vpcId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CreateSecurityGroup", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CreateSecurityGroupResponse>(await this.callApi(params, req, runtime), new $_model.CreateSecurityGroupResponse({})); } /** * Creates a security group. * * @remarks * By default, the internal access control policy (InnerAccessPolicy) of the basic security group that you create by calling this operation is internal interconnectivity (**Accept**). You can call the [ModifySecurityGroupPolicy](https://help.aliyun.com/document_detail/2679846.html) operation to change the value of InnerAccessPolicy for the basic security group. * * By default, the internal access control policy (InnerAccessPolicy) of the advanced security group that you create by calling this operation is internal isolation (**Drop**). The InnerAccessPolicy value of the advanced security group cannot be changed. * * You can create a limited number of security groups per region. You can create at least 100 security groups per region. For more information, see the [Security group limits](~~25412#SecurityGroupQuota1~~) section in the "Limits" topic. * * To create a security group of the Virtual Private Cloud (VPC) type, you must specify VpcId. * * @param request - CreateSecurityGroupRequest * @returns CreateSecurityGroupResponse */ async createSecurityGroup(request: $_model.CreateSecurityGroupRequest): Promise<$_model.CreateSecurityGroupResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.createSecurityGroupWithOptions(request, runtime); } /** * Schedules simulated system events of Elastic Compute Service (ECS) instances. The simulated system events do not actually occur on or affect ECS instances. * * @remarks * You can use the ECS console, call [ECS API](https://help.aliyun.com/document_detail/63962.html) operations, or use CloudMonitor to view the scheduled simulated system events. * The following descriptions provide the lifecycle of a simulated system event: * * Scheduled: The state of the simulated system event is automatically changed to Scheduled after it is scheduled. * * Executed: The state of the simulated system event is automatically changed to Executed at the time specified by the NotBefore parameter if no manual intervention is involved. * * Canceled: The state of the simulated system event is changed to Canceled if you cancel the event by calling the [CancelSimulatedSystemEvents](https://help.aliyun.com/document_detail/88808.html) operation. * * Avoided: The state of the simulated system event generated from maintenance-triggered instance restart can be changed to Avoided if you restart the instance before the scheduled time of the simulated system event. The maintenance-triggered instance restart is indicated by the SystemMaintenance.Reboot value. For more information, see [RebootInstance](https://help.aliyun.com/document_detail/25502.html). * * @param request - CreateSimulatedSystemEventsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CreateSimulatedSystemEventsResponse */ async createSimulatedSystemEventsWithOptions(request: $_model.CreateSimulatedSystemEventsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreateSimulatedSystemEventsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.eventType)) { query["EventType"] = request.eventType; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.notBefore)) { query["NotBefore"] = request.notBefore; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CreateSimulatedSystemEvents", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CreateSimulatedSystemEventsResponse>(await this.callApi(params, req, runtime), new $_model.CreateSimulatedSystemEventsResponse({})); } /** * Schedules simulated system events of Elastic Compute Service (ECS) instances. The simulated system events do not actually occur on or affect ECS instances. * * @remarks * You can use the ECS console, call [ECS API](https://help.aliyun.com/document_detail/63962.html) operations, or use CloudMonitor to view the scheduled simulated system events. * The following descriptions provide the lifecycle of a simulated system event: * * Scheduled: The state of the simulated system event is automatically changed to Scheduled after it is scheduled. * * Executed: The state of the simulated system event is automatically changed to Executed at the time specified by the NotBefore parameter if no manual intervention is involved. * * Canceled: The state of the simulated system event is changed to Canceled if you cancel the event by calling the [CancelSimulatedSystemEvents](https://help.aliyun.com/document_detail/88808.html) operation. * * Avoided: The state of the simulated system event generated from maintenance-triggered instance restart can be changed to Avoided if you restart the instance before the scheduled time of the simulated system event. The maintenance-triggered instance restart is indicated by the SystemMaintenance.Reboot value. For more information, see [RebootInstance](https://help.aliyun.com/document_detail/25502.html). * * @param request - CreateSimulatedSystemEventsRequest * @returns CreateSimulatedSystemEventsResponse */ async createSimulatedSystemEvents(request: $_model.CreateSimulatedSystemEventsRequest): Promise<$_model.CreateSimulatedSystemEventsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.createSimulatedSystemEventsWithOptions(request, runtime); } /** * Creates a snapshot for a cloud disk. * * @remarks * The local snapshot feature is replaced by the instant access feature. Take note of the following items: * * If you have used the local snapshot feature before December 14, 2020, you can use `Category`. * * If you have not used the local snapshot feature before December 14, 2020, new snapshots of your Enterprise SSD (ESSD) series disks are instantly available after creation without the need for additional configurations, regardless of whether the snapshots are manually or automatically created. ESSD-series disks include ESSDs, ESSD AutoPL disks, ESSD Entry disks, and Regional ESSDs. InstantAccess, InstantAccessRetentionDays, and DisableInstantAccess that are related to the instant access feature no longer take effect in API operations. Available is added to the DescribeSnapshots and DescribeSnapshotGroups operations to indicate whether snapshots are available. * Prerequisites: * * Elastic Compute Service (ECS) Snapshot is activated. For more information, see [Activate ECS Snapshot](https://help.aliyun.com/document_detail/108381.html). * * The disk for which you want to create a snapshot is in the **In_use** or **Available** state. Take note of the following items: * * If the disk is in the **In_use** state, make sure that the ECS instance to which the disk is attached is in the **Running** or **Stopped** state. * * If the disk is in the **Available** state, make sure that the disk was attached to an ECS instance. Snapshots cannot be created for disks that have never been attached to an ECS instance. * * When you use a disk to create a dynamic extended volume or a RAID array, we recommend that you create a snapshot-consistent group and enable the application-consistent snapshot feature to back up data. When a business system involves multiple disks, you can create a snapshot-consistent group to ensure a consistent write order and the crash consistency of business system data. For more information, see [Create a snapshot-consistent group](https://help.aliyun.com/document_detail/199625.html) and [Create application-consistent snapshots](https://help.aliyun.com/document_detail/208589.html). * When you create a snapshot, take note of the following items: * * We recommend that you create snapshots during off-peak hours because snapshot creation degrades disk I/O performance by up to 10% and slows down data reads and writes. * * If a snapshot is being created, you cannot use this snapshot to create a custom image by calling the [CreateImage](https://help.aliyun.com/document_detail/25535.html) operation. * * If operations are performed on the disk and incremental data is generated when a snapshot is being created, the incremental data is not included in the snapshot. * * When a snapshot is being created for a disk that is attached to an ECS instance, do not perform operations that change the status of the instance, such as stopping or restarting the instance. Otherwise, the snapshot may fail to be created. * * You cannot resize a disk for which a snapshot is being created. Wait until the snapshot is created before you resize the disk. * * You can create snapshots for a disk that is in the **Expired** (`Expired`) state. If the release time scheduled for a disk arrives while a snapshot is being created for the disk, the snapshot is in the **Creating** (`Creating`) state and is deleted when the disk is released. * * After you create snapshots, you are charged snapshot storage fees per region based on the total size of the snapshots that are stored in the region. For more information, see [Snapshots](https://help.aliyun.com/document_detail/56159.html). * * In the following scenarios, you cannot create snapshots for a disk: * * The number of manual snapshots of the disk has reached 256. * * A snapshot is being created for the disk. * * If the response contains `{"OperationLocks": {"LockReason" : "security"}}` when you query information about an ECS instance, the instance is locked for security reasons and no operations are allowed on the instance. * * @param request - CreateSnapshotRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CreateSnapshotResponse */ async createSnapshotWithOptions(request: $_model.CreateSnapshotRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreateSnapshotResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.category)) { query["Category"] = request.category; } if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.diskId)) { query["DiskId"] = request.diskId; } if (!$dara.isNull(request.instantAccess)) { query["InstantAccess"] = request.instantAccess; } if (!$dara.isNull(request.instantAccessRetentionDays)) { query["InstantAccessRetentionDays"] = request.instantAccessRetentionDays; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.retentionDays)) { query["RetentionDays"] = request.retentionDays; } if (!$dara.isNull(request.snapshotName)) { query["SnapshotName"] = request.snapshotName; } if (!$dara.isNull(request.storageLocationArn)) { query["StorageLocationArn"] = request.storageLocationArn; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CreateSnapshot", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CreateSnapshotResponse>(await this.callApi(params, req, runtime), new $_model.CreateSnapshotResponse({})); } /** * Creates a snapshot for a cloud disk. * * @remarks * The local snapshot feature is replaced by the instant access feature. Take note of the following items: * * If you have used the local snapshot feature before December 14, 2020, you can use `Category`. * * If you have not used the local snapshot feature before December 14, 2020, new snapshots of your Enterprise SSD (ESSD) series disks are instantly available after creation without the need for additional configurations, regardless of whether the snapshots are manually or automatically created. ESSD-series disks include ESSDs, ESSD AutoPL disks, ESSD Entry disks, and Regional ESSDs. InstantAccess, InstantAccessRetentionDays, and DisableInstantAccess that are related to the instant access feature no longer take effect in API operations. Available is added to the DescribeSnapshots and DescribeSnapshotGroups operations to indicate whether snapshots are available. * Prerequisites: * * Elastic Compute Service (ECS) Snapshot is activated. For more information, see [Activate ECS Snapshot](https://help.aliyun.com/document_detail/108381.html). * * The disk for which you want to create a snapshot is in the **In_use** or **Available** state. Take note of the following items: * * If the disk is in the **In_use** state, make sure that the ECS instance to which the disk is attached is in the **Running** or **Stopped** state. * * If the disk is in the **Available** state, make sure that the disk was attached to an ECS instance. Snapshots cannot be created for disks that have never been attached to an ECS instance. * * When you use a disk to create a dynamic extended volume or a RAID array, we recommend that you create a snapshot-consistent group and enable the application-consistent snapshot feature to back up data. When a business system involves multiple disks, you can create a snapshot-consistent group to ensure a consistent write order and the crash consistency of business system data. For more information, see [Create a snapshot-consistent group](https://help.aliyun.com/document_detail/199625.html) and [Create application-consistent snapshots](https://help.aliyun.com/document_detail/208589.html). * When you create a snapshot, take note of the following items: * * We recommend that you create snapshots during off-peak hours because snapshot creation degrades disk I/O performance by up to 10% and slows down data reads and writes. * * If a snapshot is being created, you cannot use this snapshot to create a custom image by calling the [CreateImage](https://help.aliyun.com/document_detail/25535.html) operation. * * If operations are performed on the disk and incremental data is generated when a snapshot is being created, the incremental data is not included in the snapshot. * * When a snapshot is being created for a disk that is attached to an ECS instance, do not perform operations that change the status of the instance, such as stopping or restarting the instance. Otherwise, the snapshot may fail to be created. * * You cannot resize a disk for which a snapshot is being created. Wait until the snapshot is created before you resize the disk. * * You can create snapshots for a disk that is in the **Expired** (`Expired`) state. If the release time scheduled for a disk arrives while a snapshot is being created for the disk, the snapshot is in the **Creating** (`Creating`) state and is deleted when the disk is released. * * After you create snapshots, you are charged snapshot storage fees per region based on the total size of the snapshots that are stored in the region. For more information, see [Snapshots](https://help.aliyun.com/document_detail/56159.html). * * In the following scenarios, you cannot create snapshots for a disk: * * The number of manual snapshots of the disk has reached 256. * * A snapshot is being created for the disk. * * If the response contains `{"OperationLocks": {"LockReason" : "security"}}` when you query information about an ECS instance, the instance is locked for security reasons and no operations are allowed on the instance. * * @param request - CreateSnapshotRequest * @returns CreateSnapshotResponse */ async createSnapshot(request: $_model.CreateSnapshotRequest): Promise<$_model.CreateSnapshotResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.createSnapshotWithOptions(request, runtime); } /** * Creates a snapshot-consistent group for the disks of an Elastic Compute Service (ECS) instance. A snapshot-consistent group contains snapshots of one or more disks. * * @remarks * You can specify `InstanceId` to create a snapshot-consistent group for disks on a specific ECS instance. You can also specify `DiskId.N` to create a snapshot-consistent group for multiple disks on multiple ECS instances within the same zone. * > You cannot specify both `DiskId.N` and `ExcludeDiskId.N` in the same request. If you specify `InstanceId`, you can use `DiskId.N` to specify only disks on the specified ECS instance and cannot use DiskId.N to specify disks across ECS instances. * Take note of the following items: * * The disks for which you want to create a snapshot must be in the **In Use** (`In_use`) or **Unattached** (`Available`) state. * * If a disk is in the **In Use** (`In_use`) state, make sure that the ECS instance to which the disk is attached is in the **Running** (`Running`) or **Stopped** (`Stopped`) state. * * If a disk is in the **Unattached** (`Available`) state, make sure that the disk has been attached to ECS instances. Snapshots cannot be created for disks that have never been attached to an ECS instance. * * Snapshot-consistent groups can be used to create snapshots only for Enterprise SSDs (ESSDs), ESSD AutoPL disks, and ESSD Entry disks. * * A snapshot-consistent group can contain snapshots of up to 16 disks, including system disks and data disks, and cannot exceed 32 TiB in size. * * Snapshots that you created are stored indefinitely until you delete the snapshots. We recommend that you delete unnecessary snapshots on a regular basis to prevent excess snapshot storage fees. * * Snapshot-consistent groups cannot be created for disks for which multi-attach feature is enabled. If disks for which the multi-attach feature is enabled are attached to an ECS instance, you must specify the `ExcludeDiskId.N` parameter to exclude the disks. * For more information about the snapshot-consistent group feature, see [Create a snapshot-consistent group](https://help.aliyun.com/document_detail/199625.html). * * @param request - CreateSnapshotGroupRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CreateSnapshotGroupResponse */ async createSnapshotGroupWithOptions(request: $_model.CreateSnapshotGroupRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreateSnapshotGroupResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.diskId)) { query["DiskId"] = request.diskId; } if (!$dara.isNull(request.excludeDiskId)) { query["ExcludeDiskId"] = request.excludeDiskId; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.instantAccess)) { query["InstantAccess"] = request.instantAccess; } if (!$dara.isNull(request.instantAccessRetentionDays)) { query["InstantAccessRetentionDays"] = request.instantAccessRetentionDays; } if (!$dara.isNull(request.name)) { query["Name"] = request.name; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.storageLocationArn)) { query["StorageLocationArn"] = request.storageLocationArn; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CreateSnapshotGroup", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CreateSnapshotGroupResponse>(await this.callApi(params, req, runtime), new $_model.CreateSnapshotGroupResponse({})); } /** * Creates a snapshot-consistent group for the disks of an Elastic Compute Service (ECS) instance. A snapshot-consistent group contains snapshots of one or more disks. * * @remarks * You can specify `InstanceId` to create a snapshot-consistent group for disks on a specific ECS instance. You can also specify `DiskId.N` to create a snapshot-consistent group for multiple disks on multiple ECS instances within the same zone. * > You cannot specify both `DiskId.N` and `ExcludeDiskId.N` in the same request. If you specify `InstanceId`, you can use `DiskId.N` to specify only disks on the specified ECS instance and cannot use DiskId.N to specify disks across ECS instances. * Take note of the following items: * * The disks for which you want to create a snapshot must be in the **In Use** (`In_use`) or **Unattached** (`Available`) state. * * If a disk is in the **In Use** (`In_use`) state, make sure that the ECS instance to which the disk is attached is in the **Running** (`Running`) or **Stopped** (`Stopped`) state. * * If a disk is in the **Unattached** (`Available`) state, make sure that the disk has been attached to ECS instances. Snapshots cannot be created for disks that have never been attached to an ECS instance. * * Snapshot-consistent groups can be used to create snapshots only for Enterprise SSDs (ESSDs), ESSD AutoPL disks, and ESSD Entry disks. * * A snapshot-consistent group can contain snapshots of up to 16 disks, including system disks and data disks, and cannot exceed 32 TiB in size. * * Snapshots that you created are stored indefinitely until you delete the snapshots. We recommend that you delete unnecessary snapshots on a regular basis to prevent excess snapshot storage fees. * * Snapshot-consistent groups cannot be created for disks for which multi-attach feature is enabled. If disks for which the multi-attach feature is enabled are attached to an ECS instance, you must specify the `ExcludeDiskId.N` parameter to exclude the disks. * For more information about the snapshot-consistent group feature, see [Create a snapshot-consistent group](https://help.aliyun.com/document_detail/199625.html). * * @param request - CreateSnapshotGroupRequest * @returns CreateSnapshotGroupResponse */ async createSnapshotGroup(request: $_model.CreateSnapshotGroupRequest): Promise<$_model.CreateSnapshotGroupResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.createSnapshotGroupWithOptions(request, runtime); } /** * (Beta) Creates a storage set in a zone of a region. * * @remarks * A storage set can distribute disks or Shared Block Storage devices to different locations. You can specify the number of partitions in a storage set. A larger number of partitions indicate more discrete distribution of disks or Shared Block Storage devices. * When you call this operation, take note of the following items: * * The number of storage sets that you can create in a region is limited. You can call the [DescribeAccountAttributes](https://help.aliyun.com/document_detail/73772.html) operation to query the limit. * * The number of partitions in a zone is limited. You can call the [DescribeAccountAttributes](https://help.aliyun.com/document_detail/73772.html) operation to query the limit. * * @param request - CreateStorageSetRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CreateStorageSetResponse */ async createStorageSetWithOptions(request: $_model.CreateStorageSetRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreateStorageSetResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.maxPartitionNumber)) { query["MaxPartitionNumber"] = request.maxPartitionNumber; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.storageSetName)) { query["StorageSetName"] = request.storageSetName; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } if (!$dara.isNull(request.zoneId)) { query["ZoneId"] = request.zoneId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CreateStorageSet", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CreateStorageSetResponse>(await this.callApi(params, req, runtime), new $_model.CreateStorageSetResponse({})); } /** * (Beta) Creates a storage set in a zone of a region. * * @remarks * A storage set can distribute disks or Shared Block Storage devices to different locations. You can specify the number of partitions in a storage set. A larger number of partitions indicate more discrete distribution of disks or Shared Block Storage devices. * When you call this operation, take note of the following items: * * The number of storage sets that you can create in a region is limited. You can call the [DescribeAccountAttributes](https://help.aliyun.com/document_detail/73772.html) operation to query the limit. * * The number of partitions in a zone is limited. You can call the [DescribeAccountAttributes](https://help.aliyun.com/document_detail/73772.html) operation to query the limit. * * @param request - CreateStorageSetRequest * @returns CreateStorageSetResponse */ async createStorageSet(request: $_model.CreateStorageSetRequest): Promise<$_model.CreateStorageSetResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.createStorageSetWithOptions(request, runtime); } /** * CreateVSwitch * * @deprecated OpenAPI CreateVSwitch is deprecated, please use Vpc::2016-04-28::CreateVSwitch instead. * * @param request - CreateVSwitchRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CreateVSwitchResponse */ async createVSwitchWithOptions(request: $_model.CreateVSwitchRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreateVSwitchResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.cidrBlock)) { query["CidrBlock"] = request.cidrBlock; } if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.vSwitchName)) { query["VSwitchName"] = request.vSwitchName; } if (!$dara.isNull(request.vpcId)) { query["VpcId"] = request.vpcId; } if (!$dara.isNull(request.zoneId)) { query["ZoneId"] = request.zoneId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CreateVSwitch", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CreateVSwitchResponse>(await this.callApi(params, req, runtime), new $_model.CreateVSwitchResponse({})); } /** * CreateVSwitch * * @deprecated OpenAPI CreateVSwitch is deprecated, please use Vpc::2016-04-28::CreateVSwitch instead. * * @param request - CreateVSwitchRequest * @returns CreateVSwitchResponse */ // Deprecated async createVSwitch(request: $_model.CreateVSwitchRequest): Promise<$_model.CreateVSwitchResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.createVSwitchWithOptions(request, runtime); } /** * CreateVirtualBorderRouter * * @deprecated OpenAPI CreateVirtualBorderRouter is deprecated, please use Vpc::2016-04-28::CreateVirtualBorderRouter instead. * * @param request - CreateVirtualBorderRouterRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CreateVirtualBorderRouterResponse */ async createVirtualBorderRouterWithOptions(request: $_model.CreateVirtualBorderRouterRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreateVirtualBorderRouterResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.circuitCode)) { query["CircuitCode"] = request.circuitCode; } if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.localGatewayIp)) { query["LocalGatewayIp"] = request.localGatewayIp; } if (!$dara.isNull(request.name)) { query["Name"] = request.name; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.peerGatewayIp)) { query["PeerGatewayIp"] = request.peerGatewayIp; } if (!$dara.isNull(request.peeringSubnetMask)) { query["PeeringSubnetMask"] = request.peeringSubnetMask; } if (!$dara.isNull(request.physicalConnectionId)) { query["PhysicalConnectionId"] = request.physicalConnectionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.userCidr)) { query["UserCidr"] = request.userCidr; } if (!$dara.isNull(request.vbrOwnerId)) { query["VbrOwnerId"] = request.vbrOwnerId; } if (!$dara.isNull(request.vlanId)) { query["VlanId"] = request.vlanId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CreateVirtualBorderRouter", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CreateVirtualBorderRouterResponse>(await this.callApi(params, req, runtime), new $_model.CreateVirtualBorderRouterResponse({})); } /** * CreateVirtualBorderRouter * * @deprecated OpenAPI CreateVirtualBorderRouter is deprecated, please use Vpc::2016-04-28::CreateVirtualBorderRouter instead. * * @param request - CreateVirtualBorderRouterRequest * @returns CreateVirtualBorderRouterResponse */ // Deprecated async createVirtualBorderRouter(request: $_model.CreateVirtualBorderRouterRequest): Promise<$_model.CreateVirtualBorderRouterResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.createVirtualBorderRouterWithOptions(request, runtime); } /** * CreateVpc * * @deprecated OpenAPI CreateVpc is deprecated, please use Vpc::2016-04-28::CreateVpc instead. * * @param request - CreateVpcRequest * @param runtime - runtime options for this request RuntimeOptions * @returns CreateVpcResponse */ async createVpcWithOptions(request: $_model.CreateVpcRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreateVpcResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.cidrBlock)) { query["CidrBlock"] = request.cidrBlock; } if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.userCidr)) { query["UserCidr"] = request.userCidr; } if (!$dara.isNull(request.vpcName)) { query["VpcName"] = request.vpcName; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "CreateVpc", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.CreateVpcResponse>(await this.callApi(params, req, runtime), new $_model.CreateVpcResponse({})); } /** * CreateVpc * * @deprecated OpenAPI CreateVpc is deprecated, please use Vpc::2016-04-28::CreateVpc instead. * * @param request - CreateVpcRequest * @returns CreateVpcResponse */ // Deprecated async createVpc(request: $_model.CreateVpcRequest): Promise<$_model.CreateVpcResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.createVpcWithOptions(request, runtime); } /** * DeactivateRouterInterface * * @deprecated OpenAPI DeactivateRouterInterface is deprecated, please use Vpc::2016-04-28::DeactivateRouterInterface instead. * * @param request - DeactivateRouterInterfaceRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DeactivateRouterInterfaceResponse */ async deactivateRouterInterfaceWithOptions(request: $_model.DeactivateRouterInterfaceRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DeactivateRouterInterfaceResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.routerInterfaceId)) { query["RouterInterfaceId"] = request.routerInterfaceId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DeactivateRouterInterface", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DeactivateRouterInterfaceResponse>(await this.callApi(params, req, runtime), new $_model.DeactivateRouterInterfaceResponse({})); } /** * DeactivateRouterInterface * * @deprecated OpenAPI DeactivateRouterInterface is deprecated, please use Vpc::2016-04-28::DeactivateRouterInterface instead. * * @param request - DeactivateRouterInterfaceRequest * @returns DeactivateRouterInterfaceResponse */ // Deprecated async deactivateRouterInterface(request: $_model.DeactivateRouterInterfaceRequest): Promise<$_model.DeactivateRouterInterfaceResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.deactivateRouterInterfaceWithOptions(request, runtime); } /** * Deletes an unused activation code. * * @remarks * ## [](#)Usage notes * Before you call this operation to delete an activation code, make sure that no managed instances are registered with the activation code. * * @param request - DeleteActivationRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DeleteActivationResponse */ async deleteActivationWithOptions(request: $_model.DeleteActivationRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DeleteActivationResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.activationId)) { query["ActivationId"] = request.activationId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DeleteActivation", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DeleteActivationResponse>(await this.callApi(params, req, runtime), new $_model.DeleteActivationResponse({})); } /** * Deletes an unused activation code. * * @remarks * ## [](#)Usage notes * Before you call this operation to delete an activation code, make sure that no managed instances are registered with the activation code. * * @param request - DeleteActivationRequest * @returns DeleteActivationResponse */ async deleteActivation(request: $_model.DeleteActivationRequest): Promise<$_model.DeleteActivationResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.deleteActivationWithOptions(request, runtime); } /** * Deletes an auto provisioning group. When you call this operation, you can specify AutoProvisioningGroupId and TerminateInstances in the request. * * @param request - DeleteAutoProvisioningGroupRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DeleteAutoProvisioningGroupResponse */ async deleteAutoProvisioningGroupWithOptions(request: $_model.DeleteAutoProvisioningGroupRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DeleteAutoProvisioningGroupResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.autoProvisioningGroupId)) { query["AutoProvisioningGroupId"] = request.autoProvisioningGroupId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.terminateInstances)) { query["TerminateInstances"] = request.terminateInstances; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DeleteAutoProvisioningGroup", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DeleteAutoProvisioningGroupResponse>(await this.callApi(params, req, runtime), new $_model.DeleteAutoProvisioningGroupResponse({})); } /** * Deletes an auto provisioning group. When you call this operation, you can specify AutoProvisioningGroupId and TerminateInstances in the request. * * @param request - DeleteAutoProvisioningGroupRequest * @returns DeleteAutoProvisioningGroupResponse */ async deleteAutoProvisioningGroup(request: $_model.DeleteAutoProvisioningGroupRequest): Promise<$_model.DeleteAutoProvisioningGroupResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.deleteAutoProvisioningGroupWithOptions(request, runtime); } /** * Deletes an automatic snapshot policy. After you delete an automatic snapshot policy, the policy is no longer applied to the disks on which it previously took effect. * * @param request - DeleteAutoSnapshotPolicyRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DeleteAutoSnapshotPolicyResponse */ async deleteAutoSnapshotPolicyWithOptions(request: $_model.DeleteAutoSnapshotPolicyRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DeleteAutoSnapshotPolicyResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.autoSnapshotPolicyId)) { query["autoSnapshotPolicyId"] = request.autoSnapshotPolicyId; } if (!$dara.isNull(request.regionId)) { query["regionId"] = request.regionId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DeleteAutoSnapshotPolicy", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DeleteAutoSnapshotPolicyResponse>(await this.callApi(params, req, runtime), new $_model.DeleteAutoSnapshotPolicyResponse({})); } /** * Deletes an automatic snapshot policy. After you delete an automatic snapshot policy, the policy is no longer applied to the disks on which it previously took effect. * * @param request - DeleteAutoSnapshotPolicyRequest * @returns DeleteAutoSnapshotPolicyResponse */ async deleteAutoSnapshotPolicy(request: $_model.DeleteAutoSnapshotPolicyRequest): Promise<$_model.DeleteAutoSnapshotPolicyResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.deleteAutoSnapshotPolicyWithOptions(request, runtime); } /** * DeleteBandwidthPackage * * @param request - DeleteBandwidthPackageRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DeleteBandwidthPackageResponse */ async deleteBandwidthPackageWithOptions(request: $_model.DeleteBandwidthPackageRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DeleteBandwidthPackageResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.bandwidthPackageId)) { query["BandwidthPackageId"] = request.bandwidthPackageId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DeleteBandwidthPackage", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DeleteBandwidthPackageResponse>(await this.callApi(params, req, runtime), new $_model.DeleteBandwidthPackageResponse({})); } /** * DeleteBandwidthPackage * * @param request - DeleteBandwidthPackageRequest * @returns DeleteBandwidthPackageResponse */ async deleteBandwidthPackage(request: $_model.DeleteBandwidthPackageRequest): Promise<$_model.DeleteBandwidthPackageResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.deleteBandwidthPackageWithOptions(request, runtime); } /** * Deletes a Cloud Assistant command in a region. This operation cannot delete Cloud Assistant commands that are being run. * * @param request - DeleteCommandRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DeleteCommandResponse */ async deleteCommandWithOptions(request: $_model.DeleteCommandRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DeleteCommandResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.commandId)) { query["CommandId"] = request.commandId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DeleteCommand", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DeleteCommandResponse>(await this.callApi(params, req, runtime), new $_model.DeleteCommandResponse({})); } /** * Deletes a Cloud Assistant command in a region. This operation cannot delete Cloud Assistant commands that are being run. * * @param request - DeleteCommandRequest * @returns DeleteCommandResponse */ async deleteCommand(request: $_model.DeleteCommandRequest): Promise<$_model.DeleteCommandResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.deleteCommandWithOptions(request, runtime); } /** * Deletes a dedicated host group. Before you call the API operation, you must migrate the dedicated hosts in the host group to another host group. * * @param request - DeleteDedicatedHostClusterRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DeleteDedicatedHostClusterResponse */ async deleteDedicatedHostClusterWithOptions(request: $_model.DeleteDedicatedHostClusterRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DeleteDedicatedHostClusterResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.dedicatedHostClusterId)) { query["DedicatedHostClusterId"] = request.dedicatedHostClusterId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DeleteDedicatedHostCluster", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DeleteDedicatedHostClusterResponse>(await this.callApi(params, req, runtime), new $_model.DeleteDedicatedHostClusterResponse({})); } /** * Deletes a dedicated host group. Before you call the API operation, you must migrate the dedicated hosts in the host group to another host group. * * @param request - DeleteDedicatedHostClusterRequest * @returns DeleteDedicatedHostClusterResponse */ async deleteDedicatedHostCluster(request: $_model.DeleteDedicatedHostClusterRequest): Promise<$_model.DeleteDedicatedHostClusterResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.deleteDedicatedHostClusterWithOptions(request, runtime); } /** * Deletes a deployment set. * * @remarks * Before you delete a deployment set, make sure that no instances exist in the deployment set. If instances exist in the deployment set, move the instances to a different deployment set or release the instances before you delete the deployment set. For more information, see [Change the deployment set of an instance](https://help.aliyun.com/document_detail/108407.html) and [Release an ECS instance](https://help.aliyun.com/document_detail/25442.html). * * @param request - DeleteDeploymentSetRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DeleteDeploymentSetResponse */ async deleteDeploymentSetWithOptions(request: $_model.DeleteDeploymentSetRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DeleteDeploymentSetResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.deploymentSetId)) { query["DeploymentSetId"] = request.deploymentSetId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DeleteDeploymentSet", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DeleteDeploymentSetResponse>(await this.callApi(params, req, runtime), new $_model.DeleteDeploymentSetResponse({})); } /** * Deletes a deployment set. * * @remarks * Before you delete a deployment set, make sure that no instances exist in the deployment set. If instances exist in the deployment set, move the instances to a different deployment set or release the instances before you delete the deployment set. For more information, see [Change the deployment set of an instance](https://help.aliyun.com/document_detail/108407.html) and [Release an ECS instance](https://help.aliyun.com/document_detail/25442.html). * * @param request - DeleteDeploymentSetRequest * @returns DeleteDeploymentSetResponse */ async deleteDeploymentSet(request: $_model.DeleteDeploymentSetRequest): Promise<$_model.DeleteDeploymentSetResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.deleteDeploymentSetWithOptions(request, runtime); } /** * Deletes diagnostic metric sets. * * @param request - DeleteDiagnosticMetricSetsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DeleteDiagnosticMetricSetsResponse */ async deleteDiagnosticMetricSetsWithOptions(request: $_model.DeleteDiagnosticMetricSetsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DeleteDiagnosticMetricSetsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.metricSetIds)) { query["MetricSetIds"] = request.metricSetIds; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DeleteDiagnosticMetricSets", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DeleteDiagnosticMetricSetsResponse>(await this.callApi(params, req, runtime), new $_model.DeleteDiagnosticMetricSetsResponse({})); } /** * Deletes diagnostic metric sets. * * @param request - DeleteDiagnosticMetricSetsRequest * @returns DeleteDiagnosticMetricSetsResponse */ async deleteDiagnosticMetricSets(request: $_model.DeleteDiagnosticMetricSetsRequest): Promise<$_model.DeleteDiagnosticMetricSetsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.deleteDiagnosticMetricSetsWithOptions(request, runtime); } /** * Deletes diagnostic reports. * * @remarks * You can call this operation to delete the diagnostic reports that are no longer needed. * * @param request - DeleteDiagnosticReportsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DeleteDiagnosticReportsResponse */ async deleteDiagnosticReportsWithOptions(request: $_model.DeleteDiagnosticReportsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DeleteDiagnosticReportsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.reportIds)) { query["ReportIds"] = request.reportIds; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DeleteDiagnosticReports", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DeleteDiagnosticReportsResponse>(await this.callApi(params, req, runtime), new $_model.DeleteDiagnosticReportsResponse({})); } /** * Deletes diagnostic reports. * * @remarks * You can call this operation to delete the diagnostic reports that are no longer needed. * * @param request - DeleteDiagnosticReportsRequest * @returns DeleteDiagnosticReportsResponse */ async deleteDiagnosticReports(request: $_model.DeleteDiagnosticReportsRequest): Promise<$_model.DeleteDiagnosticReportsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.deleteDiagnosticReportsWithOptions(request, runtime); } /** * Deletes a pay-as-you-go data disk. The data disk can be a basic disk, an ultra disk, a standard SSD, or an Enterprise SSD (ESSD). * * @remarks * When you call this operation, take note of the following items: * * Manual snapshots of the disk are retained. * * You can call the [ModifyDiskAttribute](https://help.aliyun.com/document_detail/25517.html) operation to configure whether to retain automatic snapshots of the disk or release the snapshots along with the disk. We recommend that you delete the snapshots that are no longer needed to maintain a sufficient quota for new automatic snapshots. * * The disk must be in the Unattached (Available) state. * * If the specified DiskId parameter does not exist, the request is ignored. * * @param request - DeleteDiskRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DeleteDiskResponse */ async deleteDiskWithOptions(request: $_model.DeleteDiskRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DeleteDiskResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.diskId)) { query["DiskId"] = request.diskId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DeleteDisk", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DeleteDiskResponse>(await this.callApi(params, req, runtime), new $_model.DeleteDiskResponse({})); } /** * Deletes a pay-as-you-go data disk. The data disk can be a basic disk, an ultra disk, a standard SSD, or an Enterprise SSD (ESSD). * * @remarks * When you call this operation, take note of the following items: * * Manual snapshots of the disk are retained. * * You can call the [ModifyDiskAttribute](https://help.aliyun.com/document_detail/25517.html) operation to configure whether to retain automatic snapshots of the disk or release the snapshots along with the disk. We recommend that you delete the snapshots that are no longer needed to maintain a sufficient quota for new automatic snapshots. * * The disk must be in the Unattached (Available) state. * * If the specified DiskId parameter does not exist, the request is ignored. * * @param request - DeleteDiskRequest * @returns DeleteDiskResponse */ async deleteDisk(request: $_model.DeleteDiskRequest): Promise<$_model.DeleteDiskResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.deleteDiskWithOptions(request, runtime); } /** * DeleteForwardEntry * * @deprecated OpenAPI DeleteForwardEntry is deprecated, please use Vpc::2016-04-28::DeleteForwardEntry instead. * * @param request - DeleteForwardEntryRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DeleteForwardEntryResponse */ async deleteForwardEntryWithOptions(request: $_model.DeleteForwardEntryRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DeleteForwardEntryResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.forwardEntryId)) { query["ForwardEntryId"] = request.forwardEntryId; } if (!$dara.isNull(request.forwardTableId)) { query["ForwardTableId"] = request.forwardTableId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DeleteForwardEntry", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DeleteForwardEntryResponse>(await this.callApi(params, req, runtime), new $_model.DeleteForwardEntryResponse({})); } /** * DeleteForwardEntry * * @deprecated OpenAPI DeleteForwardEntry is deprecated, please use Vpc::2016-04-28::DeleteForwardEntry instead. * * @param request - DeleteForwardEntryRequest * @returns DeleteForwardEntryResponse */ // Deprecated async deleteForwardEntry(request: $_model.DeleteForwardEntryRequest): Promise<$_model.DeleteForwardEntryResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.deleteForwardEntryWithOptions(request, runtime); } /** * DeleteHaVip * * @deprecated OpenAPI DeleteHaVip is deprecated, please use Vpc::2016-04-28::DeleteHaVip instead. * * @param request - DeleteHaVipRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DeleteHaVipResponse */ async deleteHaVipWithOptions(request: $_model.DeleteHaVipRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DeleteHaVipResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.haVipId)) { query["HaVipId"] = request.haVipId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DeleteHaVip", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DeleteHaVipResponse>(await this.callApi(params, req, runtime), new $_model.DeleteHaVipResponse({})); } /** * DeleteHaVip * * @deprecated OpenAPI DeleteHaVip is deprecated, please use Vpc::2016-04-28::DeleteHaVip instead. * * @param request - DeleteHaVipRequest * @returns DeleteHaVipResponse */ // Deprecated async deleteHaVip(request: $_model.DeleteHaVipRequest): Promise<$_model.DeleteHaVipResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.deleteHaVipWithOptions(request, runtime); } /** * Deletes a high performance computing (HPC) cluster. * * @param request - DeleteHpcClusterRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DeleteHpcClusterResponse */ async deleteHpcClusterWithOptions(request: $_model.DeleteHpcClusterRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DeleteHpcClusterResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.hpcClusterId)) { query["HpcClusterId"] = request.hpcClusterId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DeleteHpcCluster", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DeleteHpcClusterResponse>(await this.callApi(params, req, runtime), new $_model.DeleteHpcClusterResponse({})); } /** * Deletes a high performance computing (HPC) cluster. * * @param request - DeleteHpcClusterRequest * @returns DeleteHpcClusterResponse */ async deleteHpcCluster(request: $_model.DeleteHpcClusterRequest): Promise<$_model.DeleteHpcClusterResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.deleteHpcClusterWithOptions(request, runtime); } /** * Deletes a custom image. When you call this operation, you can specify ImageId and Force in the request. * * @remarks * For information about scenarios in which you cannot delete a custom image and the considerations related to custom image deletion, see [Delete a custom image](https://help.aliyun.com/document_detail/25466.html). * * @param request - DeleteImageRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DeleteImageResponse */ async deleteImageWithOptions(request: $_model.DeleteImageRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DeleteImageResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.dryRun)) { query["DryRun"] = request.dryRun; } if (!$dara.isNull(request.force)) { query["Force"] = request.force; } if (!$dara.isNull(request.imageId)) { query["ImageId"] = request.imageId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DeleteImage", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DeleteImageResponse>(await this.callApi(params, req, runtime), new $_model.DeleteImageResponse({})); } /** * Deletes a custom image. When you call this operation, you can specify ImageId and Force in the request. * * @remarks * For information about scenarios in which you cannot delete a custom image and the considerations related to custom image deletion, see [Delete a custom image](https://help.aliyun.com/document_detail/25466.html). * * @param request - DeleteImageRequest * @returns DeleteImageResponse */ async deleteImage(request: $_model.DeleteImageRequest): Promise<$_model.DeleteImageResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.deleteImageWithOptions(request, runtime); } /** * Deletes an image component. You can specify RegionId and ImageComponentId in the request. * * @remarks * Only custom image components can be deleted. * * When you delete a component, make sure that the component is not used in the template. Otherwise, the component fails to be deleted. * * @param request - DeleteImageComponentRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DeleteImageComponentResponse */ async deleteImageComponentWithOptions(request: $_model.DeleteImageComponentRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DeleteImageComponentResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.imageComponentId)) { query["ImageComponentId"] = request.imageComponentId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DeleteImageComponent", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DeleteImageComponentResponse>(await this.callApi(params, req, runtime), new $_model.DeleteImageComponentResponse({})); } /** * Deletes an image component. You can specify RegionId and ImageComponentId in the request. * * @remarks * Only custom image components can be deleted. * * When you delete a component, make sure that the component is not used in the template. Otherwise, the component fails to be deleted. * * @param request - DeleteImageComponentRequest * @returns DeleteImageComponentResponse */ async deleteImageComponent(request: $_model.DeleteImageComponentRequest): Promise<$_model.DeleteImageComponentResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.deleteImageComponentWithOptions(request, runtime); } /** * Deletes an image template. * * @remarks * If an ongoing image building task is associated with an image template, you cannot delete the image template. You can delete the image template only if the image building task reaches the SUCCESS, FAILED, TEST_FAILED, PARTITION_SUCCESS, or CANCELLED state. You can call the DescribeImagePipelineExecutions operation to query the details of an image building task. * * @param request - DeleteImagePipelineRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DeleteImagePipelineResponse */ async deleteImagePipelineWithOptions(request: $_model.DeleteImagePipelineRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DeleteImagePipelineResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.imagePipelineId)) { query["ImagePipelineId"] = request.imagePipelineId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DeleteImagePipeline", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DeleteImagePipelineResponse>(await this.callApi(params, req, runtime), new $_model.DeleteImagePipelineResponse({})); } /** * Deletes an image template. * * @remarks * If an ongoing image building task is associated with an image template, you cannot delete the image template. You can delete the image template only if the image building task reaches the SUCCESS, FAILED, TEST_FAILED, PARTITION_SUCCESS, or CANCELLED state. You can call the DescribeImagePipelineExecutions operation to query the details of an image building task. * * @param request - DeleteImagePipelineRequest * @returns DeleteImagePipelineResponse */ async deleteImagePipeline(request: $_model.DeleteImagePipelineRequest): Promise<$_model.DeleteImagePipelineResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.deleteImagePipelineWithOptions(request, runtime); } /** * Deletes or releases a pay-as-you-go Elastic Compute Service (ECS) instance or an expired subscription ECS instance. You can configure parameters to specify whether to release the disks attached to the instance or retain the disks as pay-as-you-go disks. * * @remarks * * * **Warning** After you release an instance, the physical resources used by the instance are recycled. Relevant data is erased and cannot be restored. * * After you release an instance, manual snapshots of the cloud disks attached to the instance are retained and continue to be billed. You can call the [DeleteSnapshot](https://help.aliyun.com/document_detail/2679824.html) operation to delete the snapshots. * * After you release an instance, whether the cloud disks attached to the instance and the automatic snapshots of the disks are released is determined by the disk attributes. Before you release an instance, you can call the [DescribeDisks](https://help.aliyun.com/document_detail/2679767.html) and [ModifyDiskAttribute](https://help.aliyun.com/document_detail/2679770.html) operations to query and modify disk attributes. * * The cloud disks for which `DeleteWithInstance` is set to false are retained as pay-as-you-go disks after the instance is released. The cloud disks for which DeleteWithInstance is set to true are released along with the instance. * * If `DeleteAutoSnapshot` is set to false for a cloud disk attached to the instance, the automatic snapshots of the cloud disk are retained when the instance is released. If DeleteAutoSnapshot is set to true for the cloud disk, the automatic snapshots of the disk are released along with the instance. * * Elastic IP addresses (EIPs) are not released together with instances. You can call the [ReleaseEipAddress](https://help.aliyun.com/document_detail/448702.html) operation to release EIPs. * ** * **Note** When you release an instance that is locked for security reasons, the cloud disks attached to the instance are released even if DeleteWithInstance is set to false. * * @param request - DeleteInstanceRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DeleteInstanceResponse */ async deleteInstanceWithOptions(request: $_model.DeleteInstanceRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DeleteInstanceResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.dryRun)) { query["DryRun"] = request.dryRun; } if (!$dara.isNull(request.force)) { query["Force"] = request.force; } if (!$dara.isNull(request.forceStop)) { query["ForceStop"] = request.forceStop; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.terminateSubscription)) { query["TerminateSubscription"] = request.terminateSubscription; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DeleteInstance", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DeleteInstanceResponse>(await this.callApi(params, req, runtime), new $_model.DeleteInstanceResponse({})); } /** * Deletes or releases a pay-as-you-go Elastic Compute Service (ECS) instance or an expired subscription ECS instance. You can configure parameters to specify whether to release the disks attached to the instance or retain the disks as pay-as-you-go disks. * * @remarks * * * **Warning** After you release an instance, the physical resources used by the instance are recycled. Relevant data is erased and cannot be restored. * * After you release an instance, manual snapshots of the cloud disks attached to the instance are retained and continue to be billed. You can call the [DeleteSnapshot](https://help.aliyun.com/document_detail/2679824.html) operation to delete the snapshots. * * After you release an instance, whether the cloud disks attached to the instance and the automatic snapshots of the disks are released is determined by the disk attributes. Before you release an instance, you can call the [DescribeDisks](https://help.aliyun.com/document_detail/2679767.html) and [ModifyDiskAttribute](https://help.aliyun.com/document_detail/2679770.html) operations to query and modify disk attributes. * * The cloud disks for which `DeleteWithInstance` is set to false are retained as pay-as-you-go disks after the instance is released. The cloud disks for which DeleteWithInstance is set to true are released along with the instance. * * If `DeleteAutoSnapshot` is set to false for a cloud disk attached to the instance, the automatic snapshots of the cloud disk are retained when the instance is released. If DeleteAutoSnapshot is set to true for the cloud disk, the automatic snapshots of the disk are released along with the instance. * * Elastic IP addresses (EIPs) are not released together with instances. You can call the [ReleaseEipAddress](https://help.aliyun.com/document_detail/448702.html) operation to release EIPs. * ** * **Note** When you release an instance that is locked for security reasons, the cloud disks attached to the instance are released even if DeleteWithInstance is set to false. * * @param request - DeleteInstanceRequest * @returns DeleteInstanceResponse */ async deleteInstance(request: $_model.DeleteInstanceRequest): Promise<$_model.DeleteInstanceResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.deleteInstanceWithOptions(request, runtime); } /** * Releases multiple pay-as-you-go Elastic Compute Service (ECS) instances or expired subscription ECS instances at a time. You can configure parameters to specify whether to release the disks attached to the instances or retain the disks as pay-as-you-go disks. * * @remarks * >Warning: After you release an instance, the physical resources used by the instance are recycled. Relevant data is erased and cannot be restored. * * After you release an instance, manual snapshots of the cloud disks attached to the instance are retained and continue to be billed. You can call the [DeleteSnapshot](https://help.aliyun.com/document_detail/2679824.html) operation to delete the snapshots. * * After you release an instance, whether the cloud disks attached to the instance and the automatic snapshots of the disks are released is determined by the disk attributes. Before you release an instance, you can call the [DescribeDisks](https://help.aliyun.com/document_detail/2679767.html) and [ModifyDiskAttribute](https://help.aliyun.com/document_detail/2679770.html) operations to query and modify disk attributes. * * If `DeleteWithInstance` is set to false for a cloud disk attached to the instance, the cloud disk is changed to a pay-as-you-go disk and retained after the instance is released. If DeleteWithInstance is set to true for the cloud disk, the disk is released together with the instance. * * If `DeleteAutoSnapshot` is set to false for a cloud disk attached to the instance, the automatic snapshots of the disk are retained when the instance is released. If DeleteAutoSnapshot is set to true for the cloud disk, the automatic snapshots of the disk are released together with the instance. * * Elastic IP addresses (EIPs) are not released together with instances. You can call the [ReleaseEipAddress](https://help.aliyun.com/document_detail/448702.html) operation to release EIPs. * > When you release an instance that is locked for security reasons, the cloud disks attached to the instance are released together with the instance even if DeleteWithInstance is set to false for the disks. * * @param request - DeleteInstancesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DeleteInstancesResponse */ async deleteInstancesWithOptions(request: $_model.DeleteInstancesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DeleteInstancesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.dryRun)) { query["DryRun"] = request.dryRun; } if (!$dara.isNull(request.force)) { query["Force"] = request.force; } if (!$dara.isNull(request.forceStop)) { query["ForceStop"] = request.forceStop; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.terminateSubscription)) { query["TerminateSubscription"] = request.terminateSubscription; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DeleteInstances", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DeleteInstancesResponse>(await this.callApi(params, req, runtime), new $_model.DeleteInstancesResponse({})); } /** * Releases multiple pay-as-you-go Elastic Compute Service (ECS) instances or expired subscription ECS instances at a time. You can configure parameters to specify whether to release the disks attached to the instances or retain the disks as pay-as-you-go disks. * * @remarks * >Warning: After you release an instance, the physical resources used by the instance are recycled. Relevant data is erased and cannot be restored. * * After you release an instance, manual snapshots of the cloud disks attached to the instance are retained and continue to be billed. You can call the [DeleteSnapshot](https://help.aliyun.com/document_detail/2679824.html) operation to delete the snapshots. * * After you release an instance, whether the cloud disks attached to the instance and the automatic snapshots of the disks are released is determined by the disk attributes. Before you release an instance, you can call the [DescribeDisks](https://help.aliyun.com/document_detail/2679767.html) and [ModifyDiskAttribute](https://help.aliyun.com/document_detail/2679770.html) operations to query and modify disk attributes. * * If `DeleteWithInstance` is set to false for a cloud disk attached to the instance, the cloud disk is changed to a pay-as-you-go disk and retained after the instance is released. If DeleteWithInstance is set to true for the cloud disk, the disk is released together with the instance. * * If `DeleteAutoSnapshot` is set to false for a cloud disk attached to the instance, the automatic snapshots of the disk are retained when the instance is released. If DeleteAutoSnapshot is set to true for the cloud disk, the automatic snapshots of the disk are released together with the instance. * * Elastic IP addresses (EIPs) are not released together with instances. You can call the [ReleaseEipAddress](https://help.aliyun.com/document_detail/448702.html) operation to release EIPs. * > When you release an instance that is locked for security reasons, the cloud disks attached to the instance are released together with the instance even if DeleteWithInstance is set to false for the disks. * * @param request - DeleteInstancesRequest * @returns DeleteInstancesResponse */ async deleteInstances(request: $_model.DeleteInstancesRequest): Promise<$_model.DeleteInstancesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.deleteInstancesWithOptions(request, runtime); } /** * Deletes one or more SSH key pairs. * * @remarks * When you call this operation, take note of the following items: * * After an SSH key pair is deleted, you cannot query the SSH key pair by calling the [DescribeKeyPairs](https://help.aliyun.com/document_detail/51773.html) operation. * * If an SSH key pair is bound to one or more Elastic Compute Service (ECS) instances, the SSH key pair cannot be deleted. * * @param request - DeleteKeyPairsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DeleteKeyPairsResponse */ async deleteKeyPairsWithOptions(request: $_model.DeleteKeyPairsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DeleteKeyPairsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.keyPairNames)) { query["KeyPairNames"] = request.keyPairNames; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DeleteKeyPairs", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DeleteKeyPairsResponse>(await this.callApi(params, req, runtime), new $_model.DeleteKeyPairsResponse({})); } /** * Deletes one or more SSH key pairs. * * @remarks * When you call this operation, take note of the following items: * * After an SSH key pair is deleted, you cannot query the SSH key pair by calling the [DescribeKeyPairs](https://help.aliyun.com/document_detail/51773.html) operation. * * If an SSH key pair is bound to one or more Elastic Compute Service (ECS) instances, the SSH key pair cannot be deleted. * * @param request - DeleteKeyPairsRequest * @returns DeleteKeyPairsResponse */ async deleteKeyPairs(request: $_model.DeleteKeyPairsRequest): Promise<$_model.DeleteKeyPairsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.deleteKeyPairsWithOptions(request, runtime); } /** * Deletes a launch template. You can use the LaunchTemplateId or LaunchTemplateName parameter to specify the launch template that you want to delete from the specified region. * * @remarks * Take note of the following items: * * After you delete a launch template, Elastic Compute Service (ECS) instances created based on the launch template are not affected. * * After you delete a launch template, all versions of the launch template are deleted and cannot be restored. If you want to delete only a specific version of the launch template, call the [DeleteLaunchTemplateVersion](https://help.aliyun.com/document_detail/2679735.html) operation. * * @param request - DeleteLaunchTemplateRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DeleteLaunchTemplateResponse */ async deleteLaunchTemplateWithOptions(request: $_model.DeleteLaunchTemplateRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DeleteLaunchTemplateResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.launchTemplateId)) { query["LaunchTemplateId"] = request.launchTemplateId; } if (!$dara.isNull(request.launchTemplateName)) { query["LaunchTemplateName"] = request.launchTemplateName; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DeleteLaunchTemplate", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DeleteLaunchTemplateResponse>(await this.callApi(params, req, runtime), new $_model.DeleteLaunchTemplateResponse({})); } /** * Deletes a launch template. You can use the LaunchTemplateId or LaunchTemplateName parameter to specify the launch template that you want to delete from the specified region. * * @remarks * Take note of the following items: * * After you delete a launch template, Elastic Compute Service (ECS) instances created based on the launch template are not affected. * * After you delete a launch template, all versions of the launch template are deleted and cannot be restored. If you want to delete only a specific version of the launch template, call the [DeleteLaunchTemplateVersion](https://help.aliyun.com/document_detail/2679735.html) operation. * * @param request - DeleteLaunchTemplateRequest * @returns DeleteLaunchTemplateResponse */ async deleteLaunchTemplate(request: $_model.DeleteLaunchTemplateRequest): Promise<$_model.DeleteLaunchTemplateResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.deleteLaunchTemplateWithOptions(request, runtime); } /** * Deletes versions of a launch template. When you call this operation, you can specify parameters, such as LaunchTemplateId and DeleteVersion, in the request. * * @remarks * Take note of the following items: * * You cannot delete the default version of a launch template by calling this operation. To delete the default version of a launch template, you must delete the launch template. * * If the version of a launch template that you want to delete is the default version, call the [ModifyLaunchTemplateDefaultVersion](https://help.aliyun.com/document_detail/2679734.html) operation or go to the **Launch Templates** page in the Elastic Compute Service (ECS) console to change the default version to a different version, and then delete the original default version. * * After you delete a version of a launch template, the ECS instances that were created based on the version are not affected. * * @param request - DeleteLaunchTemplateVersionRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DeleteLaunchTemplateVersionResponse */ async deleteLaunchTemplateVersionWithOptions(request: $_model.DeleteLaunchTemplateVersionRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DeleteLaunchTemplateVersionResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.deleteVersion)) { query["DeleteVersion"] = request.deleteVersion; } if (!$dara.isNull(request.launchTemplateId)) { query["LaunchTemplateId"] = request.launchTemplateId; } if (!$dara.isNull(request.launchTemplateName)) { query["LaunchTemplateName"] = request.launchTemplateName; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DeleteLaunchTemplateVersion", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DeleteLaunchTemplateVersionResponse>(await this.callApi(params, req, runtime), new $_model.DeleteLaunchTemplateVersionResponse({})); } /** * Deletes versions of a launch template. When you call this operation, you can specify parameters, such as LaunchTemplateId and DeleteVersion, in the request. * * @remarks * Take note of the following items: * * You cannot delete the default version of a launch template by calling this operation. To delete the default version of a launch template, you must delete the launch template. * * If the version of a launch template that you want to delete is the default version, call the [ModifyLaunchTemplateDefaultVersion](https://help.aliyun.com/document_detail/2679734.html) operation or go to the **Launch Templates** page in the Elastic Compute Service (ECS) console to change the default version to a different version, and then delete the original default version. * * After you delete a version of a launch template, the ECS instances that were created based on the version are not affected. * * @param request - DeleteLaunchTemplateVersionRequest * @returns DeleteLaunchTemplateVersionResponse */ async deleteLaunchTemplateVersion(request: $_model.DeleteLaunchTemplateVersionRequest): Promise<$_model.DeleteLaunchTemplateVersionResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.deleteLaunchTemplateVersionWithOptions(request, runtime); } /** * DeleteNatGateway * * @deprecated OpenAPI DeleteNatGateway is deprecated, please use Vpc::2016-04-28::DeleteNatGateway instead. * * @param request - DeleteNatGatewayRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DeleteNatGatewayResponse */ async deleteNatGatewayWithOptions(request: $_model.DeleteNatGatewayRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DeleteNatGatewayResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.natGatewayId)) { query["NatGatewayId"] = request.natGatewayId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DeleteNatGateway", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DeleteNatGatewayResponse>(await this.callApi(params, req, runtime), new $_model.DeleteNatGatewayResponse({})); } /** * DeleteNatGateway * * @deprecated OpenAPI DeleteNatGateway is deprecated, please use Vpc::2016-04-28::DeleteNatGateway instead. * * @param request - DeleteNatGatewayRequest * @returns DeleteNatGatewayResponse */ // Deprecated async deleteNatGateway(request: $_model.DeleteNatGatewayRequest): Promise<$_model.DeleteNatGatewayResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.deleteNatGatewayWithOptions(request, runtime); } /** * Deletes an elastic network interface (ENI) in a region. DeleteNetworkInterface is an asynchronous operation. * * @remarks * Take note of the following items: * * The ENI to be deleted must be in the Available state. * * If the ENI to be deleted is attached to an Elastic Compute Service (ECS) instance, you must detach the ENI from the instance before you can delete the ENI. To detach the ENI, you can call the [DetachNetworkInterface](https://help.aliyun.com/document_detail/58514.html) operation. * * After an ENI is deleted, the following situations occur: * * All private IP addresses (including primary and secondary private IP addresses) of the ENI are automatically released. * * The ENI is automatically removed from all security groups. * * The DeleteNetworkInterface operation is an asynchronous operation. After this operation is called to delete an ENI, you can check the status or events of the ENI to determine whether the ENI is deleted. The following figure shows the transitions between the states of the ENI. * ![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/en-US/20230223/krcd/DeleteNetworkInterface.png) * * If the ENI is in the Deleting state, the ENI deletion request is sent and the ENI is being deleted. * * If the ENI is not found, the ENI is deleted. * * If the ENI is stuck in the Deleting state, the ENI fails to be deleted. You can re-initiate the request to delete the ENI. * For information about examples on how to call the DeleteNetworkInterface operation, see [Delete an ENI](https://help.aliyun.com/document_detail/471553.html). * * @param request - DeleteNetworkInterfaceRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DeleteNetworkInterfaceResponse */ async deleteNetworkInterfaceWithOptions(request: $_model.DeleteNetworkInterfaceRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DeleteNetworkInterfaceResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.networkInterfaceId)) { query["NetworkInterfaceId"] = request.networkInterfaceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DeleteNetworkInterface", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DeleteNetworkInterfaceResponse>(await this.callApi(params, req, runtime), new $_model.DeleteNetworkInterfaceResponse({})); } /** * Deletes an elastic network interface (ENI) in a region. DeleteNetworkInterface is an asynchronous operation. * * @remarks * Take note of the following items: * * The ENI to be deleted must be in the Available state. * * If the ENI to be deleted is attached to an Elastic Compute Service (ECS) instance, you must detach the ENI from the instance before you can delete the ENI. To detach the ENI, you can call the [DetachNetworkInterface](https://help.aliyun.com/document_detail/58514.html) operation. * * After an ENI is deleted, the following situations occur: * * All private IP addresses (including primary and secondary private IP addresses) of the ENI are automatically released. * * The ENI is automatically removed from all security groups. * * The DeleteNetworkInterface operation is an asynchronous operation. After this operation is called to delete an ENI, you can check the status or events of the ENI to determine whether the ENI is deleted. The following figure shows the transitions between the states of the ENI. * ![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/en-US/20230223/krcd/DeleteNetworkInterface.png) * * If the ENI is in the Deleting state, the ENI deletion request is sent and the ENI is being deleted. * * If the ENI is not found, the ENI is deleted. * * If the ENI is stuck in the Deleting state, the ENI fails to be deleted. You can re-initiate the request to delete the ENI. * For information about examples on how to call the DeleteNetworkInterface operation, see [Delete an ENI](https://help.aliyun.com/document_detail/471553.html). * * @param request - DeleteNetworkInterfaceRequest * @returns DeleteNetworkInterfaceResponse */ async deleteNetworkInterface(request: $_model.DeleteNetworkInterfaceRequest): Promise<$_model.DeleteNetworkInterfaceResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.deleteNetworkInterfaceWithOptions(request, runtime); } /** * 删除操作弹性网卡的权限 * * @deprecated OpenAPI DeleteNetworkInterfacePermission is deprecated, please use Ecs::2014-05-26::DeleteNetworkInterface instead. * * @param request - DeleteNetworkInterfacePermissionRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DeleteNetworkInterfacePermissionResponse */ async deleteNetworkInterfacePermissionWithOptions(request: $_model.DeleteNetworkInterfacePermissionRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DeleteNetworkInterfacePermissionResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.force)) { query["Force"] = request.force; } if (!$dara.isNull(request.networkInterfacePermissionId)) { query["NetworkInterfacePermissionId"] = request.networkInterfacePermissionId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DeleteNetworkInterfacePermission", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DeleteNetworkInterfacePermissionResponse>(await this.callApi(params, req, runtime), new $_model.DeleteNetworkInterfacePermissionResponse({})); } /** * 删除操作弹性网卡的权限 * * @deprecated OpenAPI DeleteNetworkInterfacePermission is deprecated, please use Ecs::2014-05-26::DeleteNetworkInterface instead. * * @param request - DeleteNetworkInterfacePermissionRequest * @returns DeleteNetworkInterfacePermissionResponse */ // Deprecated async deleteNetworkInterfacePermission(request: $_model.DeleteNetworkInterfacePermissionRequest): Promise<$_model.DeleteNetworkInterfacePermissionResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.deleteNetworkInterfacePermissionWithOptions(request, runtime); } /** * DeletePhysicalConnection * * @deprecated OpenAPI DeletePhysicalConnection is deprecated, please use Vpc::2016-04-28::DeletePhysicalConnection instead. * * @param request - DeletePhysicalConnectionRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DeletePhysicalConnectionResponse */ async deletePhysicalConnectionWithOptions(request: $_model.DeletePhysicalConnectionRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DeletePhysicalConnectionResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.physicalConnectionId)) { query["PhysicalConnectionId"] = request.physicalConnectionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DeletePhysicalConnection", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DeletePhysicalConnectionResponse>(await this.callApi(params, req, runtime), new $_model.DeletePhysicalConnectionResponse({})); } /** * DeletePhysicalConnection * * @deprecated OpenAPI DeletePhysicalConnection is deprecated, please use Vpc::2016-04-28::DeletePhysicalConnection instead. * * @param request - DeletePhysicalConnectionRequest * @returns DeletePhysicalConnectionResponse */ // Deprecated async deletePhysicalConnection(request: $_model.DeletePhysicalConnectionRequest): Promise<$_model.DeletePhysicalConnectionResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.deletePhysicalConnectionWithOptions(request, runtime); } /** * 删除运维窗口 * * @param request - DeletePlanMaintenanceWindowRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DeletePlanMaintenanceWindowResponse */ async deletePlanMaintenanceWindowWithOptions(request: $_model.DeletePlanMaintenanceWindowRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DeletePlanMaintenanceWindowResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.planWindowId)) { query["PlanWindowId"] = request.planWindowId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DeletePlanMaintenanceWindow", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DeletePlanMaintenanceWindowResponse>(await this.callApi(params, req, runtime), new $_model.DeletePlanMaintenanceWindowResponse({})); } /** * 删除运维窗口 * * @param request - DeletePlanMaintenanceWindowRequest * @returns DeletePlanMaintenanceWindowResponse */ async deletePlanMaintenanceWindow(request: $_model.DeletePlanMaintenanceWindowRequest): Promise<$_model.DeletePlanMaintenanceWindowResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.deletePlanMaintenanceWindowWithOptions(request, runtime); } /** * Deletes a port list and all entries in the port list. * * @param request - DeletePortRangeListRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DeletePortRangeListResponse */ async deletePortRangeListWithOptions(request: $_model.DeletePortRangeListRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DeletePortRangeListResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.portRangeListId)) { query["PortRangeListId"] = request.portRangeListId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DeletePortRangeList", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DeletePortRangeListResponse>(await this.callApi(params, req, runtime), new $_model.DeletePortRangeListResponse({})); } /** * Deletes a port list and all entries in the port list. * * @param request - DeletePortRangeListRequest * @returns DeletePortRangeListResponse */ async deletePortRangeList(request: $_model.DeletePortRangeListRequest): Promise<$_model.DeletePortRangeListResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.deletePortRangeListWithOptions(request, runtime); } /** * Deletes a prefix list and all entries in the prefix list. * * @remarks * If a prefix list is associated with resources, you cannot delete the prefix list. You must disassociate the prefix list from the resources before you delete the prefix list. You can call the [DescribePrefixListAssociations](https://help.aliyun.com/document_detail/204724.html) operation to query resources that are associated with a specific prefix list. * * @param request - DeletePrefixListRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DeletePrefixListResponse */ async deletePrefixListWithOptions(request: $_model.DeletePrefixListRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DeletePrefixListResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.prefixListId)) { query["PrefixListId"] = request.prefixListId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DeletePrefixList", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DeletePrefixListResponse>(await this.callApi(params, req, runtime), new $_model.DeletePrefixListResponse({})); } /** * Deletes a prefix list and all entries in the prefix list. * * @remarks * If a prefix list is associated with resources, you cannot delete the prefix list. You must disassociate the prefix list from the resources before you delete the prefix list. You can call the [DescribePrefixListAssociations](https://help.aliyun.com/document_detail/204724.html) operation to query resources that are associated with a specific prefix list. * * @param request - DeletePrefixListRequest * @returns DeletePrefixListResponse */ async deletePrefixList(request: $_model.DeletePrefixListRequest): Promise<$_model.DeletePrefixListResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.deletePrefixListWithOptions(request, runtime); } /** * DeleteRouteEntry * * @deprecated OpenAPI DeleteRouteEntry is deprecated, please use Vpc::2016-04-28::DeleteRouteEntry instead. * * @param request - DeleteRouteEntryRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DeleteRouteEntryResponse */ async deleteRouteEntryWithOptions(request: $_model.DeleteRouteEntryRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DeleteRouteEntryResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.destinationCidrBlock)) { query["DestinationCidrBlock"] = request.destinationCidrBlock; } if (!$dara.isNull(request.nextHopId)) { query["NextHopId"] = request.nextHopId; } if (!$dara.isNull(request.nextHopList)) { query["NextHopList"] = request.nextHopList; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.routeTableId)) { query["RouteTableId"] = request.routeTableId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DeleteRouteEntry", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DeleteRouteEntryResponse>(await this.callApi(params, req, runtime), new $_model.DeleteRouteEntryResponse({})); } /** * DeleteRouteEntry * * @deprecated OpenAPI DeleteRouteEntry is deprecated, please use Vpc::2016-04-28::DeleteRouteEntry instead. * * @param request - DeleteRouteEntryRequest * @returns DeleteRouteEntryResponse */ // Deprecated async deleteRouteEntry(request: $_model.DeleteRouteEntryRequest): Promise<$_model.DeleteRouteEntryResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.deleteRouteEntryWithOptions(request, runtime); } /** * DeleteRouterInterface * * @deprecated OpenAPI DeleteRouterInterface is deprecated, please use Vpc::2016-04-28::DeleteRouterInterface instead. * * @param request - DeleteRouterInterfaceRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DeleteRouterInterfaceResponse */ async deleteRouterInterfaceWithOptions(request: $_model.DeleteRouterInterfaceRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DeleteRouterInterfaceResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.routerInterfaceId)) { query["RouterInterfaceId"] = request.routerInterfaceId; } if (!$dara.isNull(request.userCidr)) { query["UserCidr"] = request.userCidr; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DeleteRouterInterface", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DeleteRouterInterfaceResponse>(await this.callApi(params, req, runtime), new $_model.DeleteRouterInterfaceResponse({})); } /** * DeleteRouterInterface * * @deprecated OpenAPI DeleteRouterInterface is deprecated, please use Vpc::2016-04-28::DeleteRouterInterface instead. * * @param request - DeleteRouterInterfaceRequest * @returns DeleteRouterInterfaceResponse */ // Deprecated async deleteRouterInterface(request: $_model.DeleteRouterInterfaceRequest): Promise<$_model.DeleteRouterInterfaceResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.deleteRouterInterfaceWithOptions(request, runtime); } /** * Deletes a security group and all security group rules in the security group. * * @remarks * Make sure that no Elastic Compute Service (ECS) instances exist in the security group. You can query instances by calling the [DescribeInstances](https://help.aliyun.com/document_detail/2679689.html) operation. * * Make sure that no elastic network interfaces (ENIs) exist in the security group. You can query ENIs by calling the [DescribeNetworkInterfaces](https://help.aliyun.com/document_detail/2679884.html) operation. * * Make sure that the security group that you want to delete is not referenced by rules of other security groups. You can query the associations by calling the [DescribeSecurityGroupReferences](https://help.aliyun.com/document_detail/57320.html) operation. * * If the `InvalidOperation.DeletionProtection` error code is returned when you call the DeleteSecurityGroup operation to delete a security group, the deletion protection feature is enabled for the security group. When you create a Container Service for Kubernetes (ACK) cluster, the deletion protection feature is enabled for an associated security group to prevent accidental deletion. You cannot manually disable the deletion protection feature for the security group. The deletion protection feature can be automatically disabled only after the ACK cluster is deleted. For more information, see the [Disable deletion protection for a security group](https://help.aliyun.com/document_detail/353191.html) section of the "Configure and manage security groups for an ACK cluster" topic. * * @param request - DeleteSecurityGroupRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DeleteSecurityGroupResponse */ async deleteSecurityGroupWithOptions(request: $_model.DeleteSecurityGroupRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DeleteSecurityGroupResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.securityGroupId)) { query["SecurityGroupId"] = request.securityGroupId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DeleteSecurityGroup", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DeleteSecurityGroupResponse>(await this.callApi(params, req, runtime), new $_model.DeleteSecurityGroupResponse({})); } /** * Deletes a security group and all security group rules in the security group. * * @remarks * Make sure that no Elastic Compute Service (ECS) instances exist in the security group. You can query instances by calling the [DescribeInstances](https://help.aliyun.com/document_detail/2679689.html) operation. * * Make sure that no elastic network interfaces (ENIs) exist in the security group. You can query ENIs by calling the [DescribeNetworkInterfaces](https://help.aliyun.com/document_detail/2679884.html) operation. * * Make sure that the security group that you want to delete is not referenced by rules of other security groups. You can query the associations by calling the [DescribeSecurityGroupReferences](https://help.aliyun.com/document_detail/57320.html) operation. * * If the `InvalidOperation.DeletionProtection` error code is returned when you call the DeleteSecurityGroup operation to delete a security group, the deletion protection feature is enabled for the security group. When you create a Container Service for Kubernetes (ACK) cluster, the deletion protection feature is enabled for an associated security group to prevent accidental deletion. You cannot manually disable the deletion protection feature for the security group. The deletion protection feature can be automatically disabled only after the ACK cluster is deleted. For more information, see the [Disable deletion protection for a security group](https://help.aliyun.com/document_detail/353191.html) section of the "Configure and manage security groups for an ACK cluster" topic. * * @param request - DeleteSecurityGroupRequest * @returns DeleteSecurityGroupResponse */ async deleteSecurityGroup(request: $_model.DeleteSecurityGroupRequest): Promise<$_model.DeleteSecurityGroupResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.deleteSecurityGroupWithOptions(request, runtime); } /** * Deletes a specified snapshot. If you call this operation to delete a snapshot that is being created, the associated snapshot creation task is also canceled. * * @remarks * Take note of the following items: * * If the snapshot does not exist, the request is ignored. * * If the snapshot has been used to create custom images, the snapshot cannot be deleted. You need to call the [DeleteImage](https://help.aliyun.com/document_detail/25537.html) operation to delete the custom images before you can delete the snapshot. * * If the snapshot has been used to create disks and `Force` is not specified or is set to `false`, the snapshot cannot be deleted directly. If you want to delete the snapshot, set `Force` to true to forcibly delete the snapshot. The disks created from the snapshot cannot be re-initialized after the snapshot is forcibly deleted. * * @param request - DeleteSnapshotRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DeleteSnapshotResponse */ async deleteSnapshotWithOptions(request: $_model.DeleteSnapshotRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DeleteSnapshotResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.force)) { query["Force"] = request.force; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.snapshotId)) { query["SnapshotId"] = request.snapshotId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DeleteSnapshot", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DeleteSnapshotResponse>(await this.callApi(params, req, runtime), new $_model.DeleteSnapshotResponse({})); } /** * Deletes a specified snapshot. If you call this operation to delete a snapshot that is being created, the associated snapshot creation task is also canceled. * * @remarks * Take note of the following items: * * If the snapshot does not exist, the request is ignored. * * If the snapshot has been used to create custom images, the snapshot cannot be deleted. You need to call the [DeleteImage](https://help.aliyun.com/document_detail/25537.html) operation to delete the custom images before you can delete the snapshot. * * If the snapshot has been used to create disks and `Force` is not specified or is set to `false`, the snapshot cannot be deleted directly. If you want to delete the snapshot, set `Force` to true to forcibly delete the snapshot. The disks created from the snapshot cannot be re-initialized after the snapshot is forcibly deleted. * * @param request - DeleteSnapshotRequest * @returns DeleteSnapshotResponse */ async deleteSnapshot(request: $_model.DeleteSnapshotRequest): Promise<$_model.DeleteSnapshotResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.deleteSnapshotWithOptions(request, runtime); } /** * Deletes snapshot-consistent groups. * * @remarks * If a disk snapshot that is contained in a snapshot-consistent group has been used to create a custom image, the disk snapshot is retained after the snapshot-consistent group is deleted. Before you can delete the disk snapshot, you must call the [DeleteImage](https://help.aliyun.com/document_detail/25537.html) operation to delete the custom image. Then, you can call the [DeleteSnapshot](https://help.aliyun.com/document_detail/25525.html) operation to delete the disk snapshot. * * @param request - DeleteSnapshotGroupRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DeleteSnapshotGroupResponse */ async deleteSnapshotGroupWithOptions(request: $_model.DeleteSnapshotGroupRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DeleteSnapshotGroupResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.snapshotGroupId)) { query["SnapshotGroupId"] = request.snapshotGroupId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DeleteSnapshotGroup", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DeleteSnapshotGroupResponse>(await this.callApi(params, req, runtime), new $_model.DeleteSnapshotGroupResponse({})); } /** * Deletes snapshot-consistent groups. * * @remarks * If a disk snapshot that is contained in a snapshot-consistent group has been used to create a custom image, the disk snapshot is retained after the snapshot-consistent group is deleted. Before you can delete the disk snapshot, you must call the [DeleteImage](https://help.aliyun.com/document_detail/25537.html) operation to delete the custom image. Then, you can call the [DeleteSnapshot](https://help.aliyun.com/document_detail/25525.html) operation to delete the disk snapshot. * * @param request - DeleteSnapshotGroupRequest * @returns DeleteSnapshotGroupResponse */ async deleteSnapshotGroup(request: $_model.DeleteSnapshotGroupRequest): Promise<$_model.DeleteSnapshotGroupResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.deleteSnapshotGroupWithOptions(request, runtime); } /** * (Beta) Deletes an empty storage set. The storage set that you want to delete must be empty and do not contain disks or Shared Block Storage devices. * * @param request - DeleteStorageSetRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DeleteStorageSetResponse */ async deleteStorageSetWithOptions(request: $_model.DeleteStorageSetRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DeleteStorageSetResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.storageSetId)) { query["StorageSetId"] = request.storageSetId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DeleteStorageSet", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DeleteStorageSetResponse>(await this.callApi(params, req, runtime), new $_model.DeleteStorageSetResponse({})); } /** * (Beta) Deletes an empty storage set. The storage set that you want to delete must be empty and do not contain disks or Shared Block Storage devices. * * @param request - DeleteStorageSetRequest * @returns DeleteStorageSetResponse */ async deleteStorageSet(request: $_model.DeleteStorageSetRequest): Promise<$_model.DeleteStorageSetResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.deleteStorageSetWithOptions(request, runtime); } /** * DeleteVSwitch * * @deprecated OpenAPI DeleteVSwitch is deprecated, please use Vpc::2016-04-28::DeleteVSwitch instead. * * @param request - DeleteVSwitchRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DeleteVSwitchResponse */ async deleteVSwitchWithOptions(request: $_model.DeleteVSwitchRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DeleteVSwitchResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.vSwitchId)) { query["VSwitchId"] = request.vSwitchId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DeleteVSwitch", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DeleteVSwitchResponse>(await this.callApi(params, req, runtime), new $_model.DeleteVSwitchResponse({})); } /** * DeleteVSwitch * * @deprecated OpenAPI DeleteVSwitch is deprecated, please use Vpc::2016-04-28::DeleteVSwitch instead. * * @param request - DeleteVSwitchRequest * @returns DeleteVSwitchResponse */ // Deprecated async deleteVSwitch(request: $_model.DeleteVSwitchRequest): Promise<$_model.DeleteVSwitchResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.deleteVSwitchWithOptions(request, runtime); } /** * DeleteVirtualBorderRouter * * @deprecated OpenAPI DeleteVirtualBorderRouter is deprecated, please use Vpc::2016-04-28::DeleteVirtualBorderRouter instead. * * @param request - DeleteVirtualBorderRouterRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DeleteVirtualBorderRouterResponse */ async deleteVirtualBorderRouterWithOptions(request: $_model.DeleteVirtualBorderRouterRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DeleteVirtualBorderRouterResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.userCidr)) { query["UserCidr"] = request.userCidr; } if (!$dara.isNull(request.vbrId)) { query["VbrId"] = request.vbrId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DeleteVirtualBorderRouter", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DeleteVirtualBorderRouterResponse>(await this.callApi(params, req, runtime), new $_model.DeleteVirtualBorderRouterResponse({})); } /** * DeleteVirtualBorderRouter * * @deprecated OpenAPI DeleteVirtualBorderRouter is deprecated, please use Vpc::2016-04-28::DeleteVirtualBorderRouter instead. * * @param request - DeleteVirtualBorderRouterRequest * @returns DeleteVirtualBorderRouterResponse */ // Deprecated async deleteVirtualBorderRouter(request: $_model.DeleteVirtualBorderRouterRequest): Promise<$_model.DeleteVirtualBorderRouterResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.deleteVirtualBorderRouterWithOptions(request, runtime); } /** * 删除VPC * * @deprecated OpenAPI DeleteVpc is deprecated, please use Vpc::2016-04-28::DeleteVpc instead. * * @param request - DeleteVpcRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DeleteVpcResponse */ async deleteVpcWithOptions(request: $_model.DeleteVpcRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DeleteVpcResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.vpcId)) { query["VpcId"] = request.vpcId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DeleteVpc", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DeleteVpcResponse>(await this.callApi(params, req, runtime), new $_model.DeleteVpcResponse({})); } /** * 删除VPC * * @deprecated OpenAPI DeleteVpc is deprecated, please use Vpc::2016-04-28::DeleteVpc instead. * * @param request - DeleteVpcRequest * @returns DeleteVpcResponse */ // Deprecated async deleteVpc(request: $_model.DeleteVpcRequest): Promise<$_model.DeleteVpcResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.deleteVpcWithOptions(request, runtime); } /** * Deregisters a managed instance. After you deregister the managed instance, you can no longer use Cloud Assistant to send commands or files to the instance. * * @param request - DeregisterManagedInstanceRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DeregisterManagedInstanceResponse */ async deregisterManagedInstanceWithOptions(request: $_model.DeregisterManagedInstanceRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DeregisterManagedInstanceResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DeregisterManagedInstance", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DeregisterManagedInstanceResponse>(await this.callApi(params, req, runtime), new $_model.DeregisterManagedInstanceResponse({})); } /** * Deregisters a managed instance. After you deregister the managed instance, you can no longer use Cloud Assistant to send commands or files to the instance. * * @param request - DeregisterManagedInstanceRequest * @returns DeregisterManagedInstanceResponse */ async deregisterManagedInstance(request: $_model.DeregisterManagedInstanceRequest): Promise<$_model.DeregisterManagedInstanceResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.deregisterManagedInstanceWithOptions(request, runtime); } /** * DescribeAccessPoints * * @deprecated OpenAPI DescribeAccessPoints is deprecated, please use Vpc::2016-04-28::DescribeAccessPoints instead. * * @param request - DescribeAccessPointsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeAccessPointsResponse */ async describeAccessPointsWithOptions(request: $_model.DescribeAccessPointsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeAccessPointsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.filter)) { query["Filter"] = request.filter; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.type)) { query["Type"] = request.type; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeAccessPoints", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeAccessPointsResponse>(await this.callApi(params, req, runtime), new $_model.DescribeAccessPointsResponse({})); } /** * DescribeAccessPoints * * @deprecated OpenAPI DescribeAccessPoints is deprecated, please use Vpc::2016-04-28::DescribeAccessPoints instead. * * @param request - DescribeAccessPointsRequest * @returns DescribeAccessPointsResponse */ // Deprecated async describeAccessPoints(request: $_model.DescribeAccessPointsRequest): Promise<$_model.DescribeAccessPointsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeAccessPointsWithOptions(request, runtime); } /** * Queries the quotas of Elastic Compute Service (ECS) resources that you can create in an Alibaba Cloud region. For a specific region, you can query the maximum numbers of security groups, elastic network interfaces (ENIs), vCPUs for pay-as-you-go instances, vCPUs for spot instances, and dedicated hosts that you can create and the capacity quotas for pay-as-you-go disks that you can create. You can also query information such as network types or whether an account has completed the account verification. * * @remarks * After you [create](https://account.alibabacloud.com/register/intl_register.htm) an Alibaba Cloud account, you can create a specific number of ECS instances in different regions within the account. For more information, see [Limits](https://help.aliyun.com/document_detail/25412.html). * You can apply for a quota increase in the [Quota Center console](https://quotas.console.aliyun.com/products). * * @param request - DescribeAccountAttributesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeAccountAttributesResponse */ async describeAccountAttributesWithOptions(request: $_model.DescribeAccountAttributesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeAccountAttributesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.attributeName)) { query["AttributeName"] = request.attributeName; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.zoneId)) { query["ZoneId"] = request.zoneId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeAccountAttributes", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeAccountAttributesResponse>(await this.callApi(params, req, runtime), new $_model.DescribeAccountAttributesResponse({})); } /** * Queries the quotas of Elastic Compute Service (ECS) resources that you can create in an Alibaba Cloud region. For a specific region, you can query the maximum numbers of security groups, elastic network interfaces (ENIs), vCPUs for pay-as-you-go instances, vCPUs for spot instances, and dedicated hosts that you can create and the capacity quotas for pay-as-you-go disks that you can create. You can also query information such as network types or whether an account has completed the account verification. * * @remarks * After you [create](https://account.alibabacloud.com/register/intl_register.htm) an Alibaba Cloud account, you can create a specific number of ECS instances in different regions within the account. For more information, see [Limits](https://help.aliyun.com/document_detail/25412.html). * You can apply for a quota increase in the [Quota Center console](https://quotas.console.aliyun.com/products). * * @param request - DescribeAccountAttributesRequest * @returns DescribeAccountAttributesResponse */ async describeAccountAttributes(request: $_model.DescribeAccountAttributesRequest): Promise<$_model.DescribeAccountAttributesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeAccountAttributesWithOptions(request, runtime); } /** * Queries existing activation codes and their usage information. * * @remarks * ## [](#)Usage notes * You can use one of the following methods to check the responses: * * Method 1: During a paged query, when you call the DescribeActivations operation to retrieve the first page of results, use `MaxResults` to specify the maximum number of entries to return in the call. The return value of `NextToken` is a pagination token, which you can use in the next request to retrieve a new page of results. When you call the DescribeActivations operation to retrieve a new page of results, set `NextToken` to the `NextToken` value returned in the previous call and set `MaxResults` to specify the maximum number of entries to return in this call. * * Method 2: Use `PageSize` to specify the number of entries to return on each page, and then use `PageNumber` to specify the number of the page to return. You can use only one of the preceding methods. If you specify `MaxResults` or `NextToken`, the `PageSize` and `PageNumber` request parameters do not take effect and the `TotalCount` response parameter is invalid. * * @param request - DescribeActivationsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeActivationsResponse */ async describeActivationsWithOptions(request: $_model.DescribeActivationsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeActivationsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.activationId)) { query["ActivationId"] = request.activationId; } if (!$dara.isNull(request.instanceName)) { query["InstanceName"] = request.instanceName; } if (!$dara.isNull(request.maxResults)) { query["MaxResults"] = request.maxResults; } if (!$dara.isNull(request.nextToken)) { query["NextToken"] = request.nextToken; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeActivations", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeActivationsResponse>(await this.callApi(params, req, runtime), new $_model.DescribeActivationsResponse({})); } /** * Queries existing activation codes and their usage information. * * @remarks * ## [](#)Usage notes * You can use one of the following methods to check the responses: * * Method 1: During a paged query, when you call the DescribeActivations operation to retrieve the first page of results, use `MaxResults` to specify the maximum number of entries to return in the call. The return value of `NextToken` is a pagination token, which you can use in the next request to retrieve a new page of results. When you call the DescribeActivations operation to retrieve a new page of results, set `NextToken` to the `NextToken` value returned in the previous call and set `MaxResults` to specify the maximum number of entries to return in this call. * * Method 2: Use `PageSize` to specify the number of entries to return on each page, and then use `PageNumber` to specify the number of the page to return. You can use only one of the preceding methods. If you specify `MaxResults` or `NextToken`, the `PageSize` and `PageNumber` request parameters do not take effect and the `TotalCount` response parameter is invalid. * * @param request - DescribeActivationsRequest * @returns DescribeActivationsResponse */ async describeActivations(request: $_model.DescribeActivationsRequest): Promise<$_model.DescribeActivationsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeActivationsWithOptions(request, runtime); } /** * Queries the scheduling tasks of an auto provisioning group. * * @param request - DescribeAutoProvisioningGroupHistoryRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeAutoProvisioningGroupHistoryResponse */ async describeAutoProvisioningGroupHistoryWithOptions(request: $_model.DescribeAutoProvisioningGroupHistoryRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeAutoProvisioningGroupHistoryResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.autoProvisioningGroupId)) { query["AutoProvisioningGroupId"] = request.autoProvisioningGroupId; } if (!$dara.isNull(request.endTime)) { query["EndTime"] = request.endTime; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.startTime)) { query["StartTime"] = request.startTime; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeAutoProvisioningGroupHistory", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeAutoProvisioningGroupHistoryResponse>(await this.callApi(params, req, runtime), new $_model.DescribeAutoProvisioningGroupHistoryResponse({})); } /** * Queries the scheduling tasks of an auto provisioning group. * * @param request - DescribeAutoProvisioningGroupHistoryRequest * @returns DescribeAutoProvisioningGroupHistoryResponse */ async describeAutoProvisioningGroupHistory(request: $_model.DescribeAutoProvisioningGroupHistoryRequest): Promise<$_model.DescribeAutoProvisioningGroupHistoryResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeAutoProvisioningGroupHistoryWithOptions(request, runtime); } /** * Queries information about Elastic Compute Service (ECS) instances in an auto provisioning group. * * @param request - DescribeAutoProvisioningGroupInstancesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeAutoProvisioningGroupInstancesResponse */ async describeAutoProvisioningGroupInstancesWithOptions(request: $_model.DescribeAutoProvisioningGroupInstancesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeAutoProvisioningGroupInstancesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.autoProvisioningGroupId)) { query["AutoProvisioningGroupId"] = request.autoProvisioningGroupId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeAutoProvisioningGroupInstances", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeAutoProvisioningGroupInstancesResponse>(await this.callApi(params, req, runtime), new $_model.DescribeAutoProvisioningGroupInstancesResponse({})); } /** * Queries information about Elastic Compute Service (ECS) instances in an auto provisioning group. * * @param request - DescribeAutoProvisioningGroupInstancesRequest * @returns DescribeAutoProvisioningGroupInstancesResponse */ async describeAutoProvisioningGroupInstances(request: $_model.DescribeAutoProvisioningGroupInstancesRequest): Promise<$_model.DescribeAutoProvisioningGroupInstancesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeAutoProvisioningGroupInstancesWithOptions(request, runtime); } /** * Queries information about one or more auto provisioning groups. * * @param request - DescribeAutoProvisioningGroupsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeAutoProvisioningGroupsResponse */ async describeAutoProvisioningGroupsWithOptions(request: $_model.DescribeAutoProvisioningGroupsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeAutoProvisioningGroupsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.autoProvisioningGroupId)) { query["AutoProvisioningGroupId"] = request.autoProvisioningGroupId; } if (!$dara.isNull(request.autoProvisioningGroupName)) { query["AutoProvisioningGroupName"] = request.autoProvisioningGroupName; } if (!$dara.isNull(request.autoProvisioningGroupStatus)) { query["AutoProvisioningGroupStatus"] = request.autoProvisioningGroupStatus; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeAutoProvisioningGroups", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeAutoProvisioningGroupsResponse>(await this.callApi(params, req, runtime), new $_model.DescribeAutoProvisioningGroupsResponse({})); } /** * Queries information about one or more auto provisioning groups. * * @param request - DescribeAutoProvisioningGroupsRequest * @returns DescribeAutoProvisioningGroupsResponse */ async describeAutoProvisioningGroups(request: $_model.DescribeAutoProvisioningGroupsRequest): Promise<$_model.DescribeAutoProvisioningGroupsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeAutoProvisioningGroupsWithOptions(request, runtime); } /** * Queries association relationships of automatic snapshot policies. * * @param request - DescribeAutoSnapshotPolicyAssociationsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeAutoSnapshotPolicyAssociationsResponse */ async describeAutoSnapshotPolicyAssociationsWithOptions(request: $_model.DescribeAutoSnapshotPolicyAssociationsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeAutoSnapshotPolicyAssociationsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.autoSnapshotPolicyId)) { query["AutoSnapshotPolicyId"] = request.autoSnapshotPolicyId; } if (!$dara.isNull(request.diskId)) { query["DiskId"] = request.diskId; } if (!$dara.isNull(request.maxResults)) { query["MaxResults"] = request.maxResults; } if (!$dara.isNull(request.nextToken)) { query["NextToken"] = request.nextToken; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeAutoSnapshotPolicyAssociations", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeAutoSnapshotPolicyAssociationsResponse>(await this.callApi(params, req, runtime), new $_model.DescribeAutoSnapshotPolicyAssociationsResponse({})); } /** * Queries association relationships of automatic snapshot policies. * * @param request - DescribeAutoSnapshotPolicyAssociationsRequest * @returns DescribeAutoSnapshotPolicyAssociationsResponse */ async describeAutoSnapshotPolicyAssociations(request: $_model.DescribeAutoSnapshotPolicyAssociationsRequest): Promise<$_model.DescribeAutoSnapshotPolicyAssociationsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeAutoSnapshotPolicyAssociationsWithOptions(request, runtime); } /** * Queries the details of automatic snapshot policies that are created in a specific region. * * @param request - DescribeAutoSnapshotPolicyExRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeAutoSnapshotPolicyExResponse */ async describeAutoSnapshotPolicyExWithOptions(request: $_model.DescribeAutoSnapshotPolicyExRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeAutoSnapshotPolicyExResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.autoSnapshotPolicyId)) { query["AutoSnapshotPolicyId"] = request.autoSnapshotPolicyId; } if (!$dara.isNull(request.autoSnapshotPolicyName)) { query["AutoSnapshotPolicyName"] = request.autoSnapshotPolicyName; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeAutoSnapshotPolicyEx", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeAutoSnapshotPolicyExResponse>(await this.callApi(params, req, runtime), new $_model.DescribeAutoSnapshotPolicyExResponse({})); } /** * Queries the details of automatic snapshot policies that are created in a specific region. * * @param request - DescribeAutoSnapshotPolicyExRequest * @returns DescribeAutoSnapshotPolicyExResponse */ async describeAutoSnapshotPolicyEx(request: $_model.DescribeAutoSnapshotPolicyExRequest): Promise<$_model.DescribeAutoSnapshotPolicyExResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeAutoSnapshotPolicyExWithOptions(request, runtime); } /** * 查询可用资源 * * @param request - DescribeAvailableResourceRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeAvailableResourceResponse */ async describeAvailableResourceWithOptions(request: $_model.DescribeAvailableResourceRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeAvailableResourceResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.cores)) { query["Cores"] = request.cores; } if (!$dara.isNull(request.dataDiskCategory)) { query["DataDiskCategory"] = request.dataDiskCategory; } if (!$dara.isNull(request.dedicatedHostId)) { query["DedicatedHostId"] = request.dedicatedHostId; } if (!$dara.isNull(request.destinationResource)) { query["DestinationResource"] = request.destinationResource; } if (!$dara.isNull(request.instanceChargeType)) { query["InstanceChargeType"] = request.instanceChargeType; } if (!$dara.isNull(request.instanceType)) { query["InstanceType"] = request.instanceType; } if (!$dara.isNull(request.ioOptimized)) { query["IoOptimized"] = request.ioOptimized; } if (!$dara.isNull(request.memory)) { query["Memory"] = request.memory; } if (!$dara.isNull(request.networkCategory)) { query["NetworkCategory"] = request.networkCategory; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.resourceType)) { query["ResourceType"] = request.resourceType; } if (!$dara.isNull(request.scope)) { query["Scope"] = request.scope; } if (!$dara.isNull(request.spotDuration)) { query["SpotDuration"] = request.spotDuration; } if (!$dara.isNull(request.spotStrategy)) { query["SpotStrategy"] = request.spotStrategy; } if (!$dara.isNull(request.systemDiskCategory)) { query["SystemDiskCategory"] = request.systemDiskCategory; } if (!$dara.isNull(request.zoneId)) { query["ZoneId"] = request.zoneId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeAvailableResource", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeAvailableResourceResponse>(await this.callApi(params, req, runtime), new $_model.DescribeAvailableResourceResponse({})); } /** * 查询可用资源 * * @param request - DescribeAvailableResourceRequest * @returns DescribeAvailableResourceResponse */ async describeAvailableResource(request: $_model.DescribeAvailableResourceRequest): Promise<$_model.DescribeAvailableResourceResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeAvailableResourceWithOptions(request, runtime); } /** * Queries the maximum public bandwidth that can be purchased, upgraded, or downgraded for various Elastic Compute Service (ECS) instance types. * * @param request - DescribeBandwidthLimitationRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeBandwidthLimitationResponse */ async describeBandwidthLimitationWithOptions(request: $_model.DescribeBandwidthLimitationRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeBandwidthLimitationResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.instanceChargeType)) { query["InstanceChargeType"] = request.instanceChargeType; } if (!$dara.isNull(request.instanceType)) { query["InstanceType"] = request.instanceType; } if (!$dara.isNull(request.operationType)) { query["OperationType"] = request.operationType; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceId)) { query["ResourceId"] = request.resourceId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.spotStrategy)) { query["SpotStrategy"] = request.spotStrategy; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeBandwidthLimitation", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeBandwidthLimitationResponse>(await this.callApi(params, req, runtime), new $_model.DescribeBandwidthLimitationResponse({})); } /** * Queries the maximum public bandwidth that can be purchased, upgraded, or downgraded for various Elastic Compute Service (ECS) instance types. * * @param request - DescribeBandwidthLimitationRequest * @returns DescribeBandwidthLimitationResponse */ async describeBandwidthLimitation(request: $_model.DescribeBandwidthLimitationRequest): Promise<$_model.DescribeBandwidthLimitationResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeBandwidthLimitationWithOptions(request, runtime); } /** * DescribeBandwidthPackages * * @deprecated OpenAPI DescribeBandwidthPackages is deprecated, please use Vpc::2016-04-28::DescribeBandwidthPackages instead. * * @param request - DescribeBandwidthPackagesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeBandwidthPackagesResponse */ async describeBandwidthPackagesWithOptions(request: $_model.DescribeBandwidthPackagesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeBandwidthPackagesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.bandwidthPackageId)) { query["BandwidthPackageId"] = request.bandwidthPackageId; } if (!$dara.isNull(request.natGatewayId)) { query["NatGatewayId"] = request.natGatewayId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeBandwidthPackages", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeBandwidthPackagesResponse>(await this.callApi(params, req, runtime), new $_model.DescribeBandwidthPackagesResponse({})); } /** * DescribeBandwidthPackages * * @deprecated OpenAPI DescribeBandwidthPackages is deprecated, please use Vpc::2016-04-28::DescribeBandwidthPackages instead. * * @param request - DescribeBandwidthPackagesRequest * @returns DescribeBandwidthPackagesResponse */ // Deprecated async describeBandwidthPackages(request: $_model.DescribeBandwidthPackagesRequest): Promise<$_model.DescribeBandwidthPackagesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeBandwidthPackagesWithOptions(request, runtime); } /** * Queries the Elastic Compute Service (ECS) instances that match a capacity reservation. * * @param request - DescribeCapacityReservationInstancesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeCapacityReservationInstancesResponse */ async describeCapacityReservationInstancesWithOptions(request: $_model.DescribeCapacityReservationInstancesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeCapacityReservationInstancesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.maxResults)) { query["MaxResults"] = request.maxResults; } if (!$dara.isNull(request.nextToken)) { query["NextToken"] = request.nextToken; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.privatePoolOptions)) { query["PrivatePoolOptions"] = request.privatePoolOptions; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeCapacityReservationInstances", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeCapacityReservationInstancesResponse>(await this.callApi(params, req, runtime), new $_model.DescribeCapacityReservationInstancesResponse({})); } /** * Queries the Elastic Compute Service (ECS) instances that match a capacity reservation. * * @param request - DescribeCapacityReservationInstancesRequest * @returns DescribeCapacityReservationInstancesResponse */ async describeCapacityReservationInstances(request: $_model.DescribeCapacityReservationInstancesRequest): Promise<$_model.DescribeCapacityReservationInstancesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeCapacityReservationInstancesWithOptions(request, runtime); } /** * Queries the details of capacity reservations. * * @param request - DescribeCapacityReservationsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeCapacityReservationsResponse */ async describeCapacityReservationsWithOptions(request: $_model.DescribeCapacityReservationsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeCapacityReservationsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.instanceChargeType)) { query["InstanceChargeType"] = request.instanceChargeType; } if (!$dara.isNull(request.instanceType)) { query["InstanceType"] = request.instanceType; } if (!$dara.isNull(request.maxResults)) { query["MaxResults"] = request.maxResults; } if (!$dara.isNull(request.nextToken)) { query["NextToken"] = request.nextToken; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.platform)) { query["Platform"] = request.platform; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.status)) { query["Status"] = request.status; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } if (!$dara.isNull(request.zoneId)) { query["ZoneId"] = request.zoneId; } if (!$dara.isNull(request.privatePoolOptions)) { query["PrivatePoolOptions"] = request.privatePoolOptions; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeCapacityReservations", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeCapacityReservationsResponse>(await this.callApi(params, req, runtime), new $_model.DescribeCapacityReservationsResponse({})); } /** * Queries the details of capacity reservations. * * @param request - DescribeCapacityReservationsRequest * @returns DescribeCapacityReservationsResponse */ async describeCapacityReservations(request: $_model.DescribeCapacityReservationsRequest): Promise<$_model.DescribeCapacityReservationsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeCapacityReservationsWithOptions(request, runtime); } /** * Queries instances located in the classic network that have established ClassicLink connections to virtual private clouds (VPCs). * * @remarks * Take note of the following items: * * This operation applies only to instances that reside in the classic network. * * You can query a maximum of 100 instances that reside in the classic network at a time. * * At least one of the `VpcId` and `InstanceId` parameters must be configured. * * @param request - DescribeClassicLinkInstancesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeClassicLinkInstancesResponse */ async describeClassicLinkInstancesWithOptions(request: $_model.DescribeClassicLinkInstancesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeClassicLinkInstancesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.vpcId)) { query["VpcId"] = request.vpcId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeClassicLinkInstances", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeClassicLinkInstancesResponse>(await this.callApi(params, req, runtime), new $_model.DescribeClassicLinkInstancesResponse({})); } /** * Queries instances located in the classic network that have established ClassicLink connections to virtual private clouds (VPCs). * * @remarks * Take note of the following items: * * This operation applies only to instances that reside in the classic network. * * You can query a maximum of 100 instances that reside in the classic network at a time. * * At least one of the `VpcId` and `InstanceId` parameters must be configured. * * @param request - DescribeClassicLinkInstancesRequest * @returns DescribeClassicLinkInstancesResponse */ async describeClassicLinkInstances(request: $_model.DescribeClassicLinkInstancesRequest): Promise<$_model.DescribeClassicLinkInstancesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeClassicLinkInstancesWithOptions(request, runtime); } /** * Queries the configurations of Cloud Assistant features. * * @param request - DescribeCloudAssistantSettingsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeCloudAssistantSettingsResponse */ async describeCloudAssistantSettingsWithOptions(request: $_model.DescribeCloudAssistantSettingsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeCloudAssistantSettingsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.settingType)) { query["SettingType"] = request.settingType; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeCloudAssistantSettings", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeCloudAssistantSettingsResponse>(await this.callApi(params, req, runtime), new $_model.DescribeCloudAssistantSettingsResponse({})); } /** * Queries the configurations of Cloud Assistant features. * * @param request - DescribeCloudAssistantSettingsRequest * @returns DescribeCloudAssistantSettingsResponse */ async describeCloudAssistantSettings(request: $_model.DescribeCloudAssistantSettingsRequest): Promise<$_model.DescribeCloudAssistantSettingsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeCloudAssistantSettingsWithOptions(request, runtime); } /** * Queries whether Cloud Assistant Agent is installed on instances. If Cloud Assistant Agent is installed, the system queries the total number of Cloud Assistant commands that have been run, the number of Cloud Assistant commands that are being run, and the time when Cloud Assistant commands were last run. * * @remarks * ## [](#)Usage notes * * Before you run commands on or send files to instances, especially new instances, we recommend that you query the status of Cloud Assistant on the instances by calling this operation and checking the return value of CloudAssistantStatus. Run commands on or send files to the instances only when the return value is true. * * During a paged query, when you call the DescribeCloudAssistantStatus operation to retrieve the first page of results, set `MaxResults` to specify the maximum number of entries to return in the call. The return value of `NextToken` is a pagination token that can be used in the next call to retrieve a new page of results. When you call the DescribeCloudAssistantStatus operation to retrieve a new page of results, set `NextToken` to the `NextToken` value returned in the previous call and set `MaxResults` to specify the maximum number of entries to return in this call. * * @param request - DescribeCloudAssistantStatusRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeCloudAssistantStatusResponse */ async describeCloudAssistantStatusWithOptions(request: $_model.DescribeCloudAssistantStatusRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeCloudAssistantStatusResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.maxResults)) { query["MaxResults"] = request.maxResults; } if (!$dara.isNull(request.nextToken)) { query["NextToken"] = request.nextToken; } if (!$dara.isNull(request.OSType)) { query["OSType"] = request.OSType; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeCloudAssistantStatus", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeCloudAssistantStatusResponse>(await this.callApi(params, req, runtime), new $_model.DescribeCloudAssistantStatusResponse({})); } /** * Queries whether Cloud Assistant Agent is installed on instances. If Cloud Assistant Agent is installed, the system queries the total number of Cloud Assistant commands that have been run, the number of Cloud Assistant commands that are being run, and the time when Cloud Assistant commands were last run. * * @remarks * ## [](#)Usage notes * * Before you run commands on or send files to instances, especially new instances, we recommend that you query the status of Cloud Assistant on the instances by calling this operation and checking the return value of CloudAssistantStatus. Run commands on or send files to the instances only when the return value is true. * * During a paged query, when you call the DescribeCloudAssistantStatus operation to retrieve the first page of results, set `MaxResults` to specify the maximum number of entries to return in the call. The return value of `NextToken` is a pagination token that can be used in the next call to retrieve a new page of results. When you call the DescribeCloudAssistantStatus operation to retrieve a new page of results, set `NextToken` to the `NextToken` value returned in the previous call and set `MaxResults` to specify the maximum number of entries to return in this call. * * @param request - DescribeCloudAssistantStatusRequest * @returns DescribeCloudAssistantStatusResponse */ async describeCloudAssistantStatus(request: $_model.DescribeCloudAssistantStatusRequest): Promise<$_model.DescribeCloudAssistantStatusResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeCloudAssistantStatusWithOptions(request, runtime); } /** * 查询集群 * * @deprecated OpenAPI DescribeClusters is deprecated * * @param request - DescribeClustersRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeClustersResponse */ async describeClustersWithOptions(request: $_model.DescribeClustersRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeClustersResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeClusters", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeClustersResponse>(await this.callApi(params, req, runtime), new $_model.DescribeClustersResponse({})); } /** * 查询集群 * * @deprecated OpenAPI DescribeClusters is deprecated * * @param request - DescribeClustersRequest * @returns DescribeClustersResponse */ // Deprecated async describeClusters(request: $_model.DescribeClustersRequest): Promise<$_model.DescribeClustersResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeClustersWithOptions(request, runtime); } /** * Queries the Cloud Assistant commands that you created or the common Cloud Assistant commands that Alibaba Cloud provides. * * @remarks * ## [](#)Usage notes * * If you specify only `Action` and `RegionId`, all available commands (`CommandId`) that you created in the specified region are queried by default. * * During a paged query, when you call the DescribeCommands operation to retrieve the first page of results, set `MaxResults` to specify the maximum number of entries to return in the call. The return value of `NextToken` is a pagination token that can be used in the next call to retrieve a new page of results. When you call the DescribeCommands operation to retrieve a new page of results, set `NextToken` to the `NextToken` value returned in the previous call and set `MaxResults` to specify the maximum number of entries to return in this call. * * @param request - DescribeCommandsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeCommandsResponse */ async describeCommandsWithOptions(request: $_model.DescribeCommandsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeCommandsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.commandId)) { query["CommandId"] = request.commandId; } if (!$dara.isNull(request.contentEncoding)) { query["ContentEncoding"] = request.contentEncoding; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.latest)) { query["Latest"] = request.latest; } if (!$dara.isNull(request.maxResults)) { query["MaxResults"] = request.maxResults; } if (!$dara.isNull(request.name)) { query["Name"] = request.name; } if (!$dara.isNull(request.nextToken)) { query["NextToken"] = request.nextToken; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.provider)) { query["Provider"] = request.provider; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } if (!$dara.isNull(request.type)) { query["Type"] = request.type; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeCommands", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeCommandsResponse>(await this.callApi(params, req, runtime), new $_model.DescribeCommandsResponse({})); } /** * Queries the Cloud Assistant commands that you created or the common Cloud Assistant commands that Alibaba Cloud provides. * * @remarks * ## [](#)Usage notes * * If you specify only `Action` and `RegionId`, all available commands (`CommandId`) that you created in the specified region are queried by default. * * During a paged query, when you call the DescribeCommands operation to retrieve the first page of results, set `MaxResults` to specify the maximum number of entries to return in the call. The return value of `NextToken` is a pagination token that can be used in the next call to retrieve a new page of results. When you call the DescribeCommands operation to retrieve a new page of results, set `NextToken` to the `NextToken` value returned in the previous call and set `MaxResults` to specify the maximum number of entries to return in this call. * * @param request - DescribeCommandsRequest * @returns DescribeCommandsResponse */ async describeCommands(request: $_model.DescribeCommandsRequest): Promise<$_model.DescribeCommandsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeCommandsWithOptions(request, runtime); } /** * Queries the auto-renewal status of one or more subscription dedicated hosts. * * @param request - DescribeDedicatedHostAutoRenewRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeDedicatedHostAutoRenewResponse */ async describeDedicatedHostAutoRenewWithOptions(request: $_model.DescribeDedicatedHostAutoRenewRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeDedicatedHostAutoRenewResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.dedicatedHostIds)) { query["DedicatedHostIds"] = request.dedicatedHostIds; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeDedicatedHostAutoRenew", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeDedicatedHostAutoRenewResponse>(await this.callApi(params, req, runtime), new $_model.DescribeDedicatedHostAutoRenewResponse({})); } /** * Queries the auto-renewal status of one or more subscription dedicated hosts. * * @param request - DescribeDedicatedHostAutoRenewRequest * @returns DescribeDedicatedHostAutoRenewResponse */ async describeDedicatedHostAutoRenew(request: $_model.DescribeDedicatedHostAutoRenewRequest): Promise<$_model.DescribeDedicatedHostAutoRenewResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeDedicatedHostAutoRenewWithOptions(request, runtime); } /** * Queries the details of one or more dedicated host groups. * * @remarks * ## [](#)Usage notes * You can specify multiple request parameters to filter query results. Specified request parameters have logical AND relations. Only the specified parameters are included in the filter conditions. However, if `DedicatedHostClusterIds` is set to an empty JSON array (`[]`), this parameter is regarded as a valid filter condition and an empty result is returned. * * @param request - DescribeDedicatedHostClustersRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeDedicatedHostClustersResponse */ async describeDedicatedHostClustersWithOptions(request: $_model.DescribeDedicatedHostClustersRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeDedicatedHostClustersResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.dedicatedHostClusterIds)) { query["DedicatedHostClusterIds"] = request.dedicatedHostClusterIds; } if (!$dara.isNull(request.dedicatedHostClusterName)) { query["DedicatedHostClusterName"] = request.dedicatedHostClusterName; } if (!$dara.isNull(request.lockReason)) { query["LockReason"] = request.lockReason; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.status)) { query["Status"] = request.status; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } if (!$dara.isNull(request.zoneId)) { query["ZoneId"] = request.zoneId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeDedicatedHostClusters", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeDedicatedHostClustersResponse>(await this.callApi(params, req, runtime), new $_model.DescribeDedicatedHostClustersResponse({})); } /** * Queries the details of one or more dedicated host groups. * * @remarks * ## [](#)Usage notes * You can specify multiple request parameters to filter query results. Specified request parameters have logical AND relations. Only the specified parameters are included in the filter conditions. However, if `DedicatedHostClusterIds` is set to an empty JSON array (`[]`), this parameter is regarded as a valid filter condition and an empty result is returned. * * @param request - DescribeDedicatedHostClustersRequest * @returns DescribeDedicatedHostClustersResponse */ async describeDedicatedHostClusters(request: $_model.DescribeDedicatedHostClustersRequest): Promise<$_model.DescribeDedicatedHostClustersResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeDedicatedHostClustersWithOptions(request, runtime); } /** * Queries the details of dedicated host types supported in a region, or the Elastic Compute Service (ECS) instance families supported by a specific dedicated host type. * * @param request - DescribeDedicatedHostTypesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeDedicatedHostTypesResponse */ async describeDedicatedHostTypesWithOptions(request: $_model.DescribeDedicatedHostTypesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeDedicatedHostTypesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.dedicatedHostType)) { query["DedicatedHostType"] = request.dedicatedHostType; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.supportedInstanceTypeFamily)) { query["SupportedInstanceTypeFamily"] = request.supportedInstanceTypeFamily; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeDedicatedHostTypes", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeDedicatedHostTypesResponse>(await this.callApi(params, req, runtime), new $_model.DescribeDedicatedHostTypesResponse({})); } /** * Queries the details of dedicated host types supported in a region, or the Elastic Compute Service (ECS) instance families supported by a specific dedicated host type. * * @param request - DescribeDedicatedHostTypesRequest * @returns DescribeDedicatedHostTypesResponse */ async describeDedicatedHostTypes(request: $_model.DescribeDedicatedHostTypesRequest): Promise<$_model.DescribeDedicatedHostTypesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeDedicatedHostTypesWithOptions(request, runtime); } /** * Queries the details of one or more Dedicated Hosts (DDHs). You can call this operation to obtain information about a DDH, including the physical performance specifications, machine code, service status, and the list of created ECS instances. You can specify relevant parameters, such as DDH IDs, DDH cluster IDs, hostname, and status, to query the required DDH details. This helps you efficiently manage and optimize cloud computing resources. * * @remarks * ## [](#)Usage notes * You can use one of the following methods to query the information about dedicated hosts: * * Specify `DedicatedHostIds` to query the details of specified dedicated hosts. * * Specify `DedicatedHostClusterId` to query the details of dedicated hosts in a dedicated host cluster. * * @param request - DescribeDedicatedHostsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeDedicatedHostsResponse */ async describeDedicatedHostsWithOptions(request: $_model.DescribeDedicatedHostsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeDedicatedHostsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.dedicatedHostClusterId)) { query["DedicatedHostClusterId"] = request.dedicatedHostClusterId; } if (!$dara.isNull(request.dedicatedHostIds)) { query["DedicatedHostIds"] = request.dedicatedHostIds; } if (!$dara.isNull(request.dedicatedHostName)) { query["DedicatedHostName"] = request.dedicatedHostName; } if (!$dara.isNull(request.dedicatedHostType)) { query["DedicatedHostType"] = request.dedicatedHostType; } if (!$dara.isNull(request.lockReason)) { query["LockReason"] = request.lockReason; } if (!$dara.isNull(request.maxResults)) { query["MaxResults"] = request.maxResults; } if (!$dara.isNull(request.nextToken)) { query["NextToken"] = request.nextToken; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.queryInventory)) { query["QueryInventory"] = request.queryInventory; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.socketDetails)) { query["SocketDetails"] = request.socketDetails; } if (!$dara.isNull(request.status)) { query["Status"] = request.status; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } if (!$dara.isNull(request.zoneId)) { query["ZoneId"] = request.zoneId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeDedicatedHosts", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeDedicatedHostsResponse>(await this.callApi(params, req, runtime), new $_model.DescribeDedicatedHostsResponse({})); } /** * Queries the details of one or more Dedicated Hosts (DDHs). You can call this operation to obtain information about a DDH, including the physical performance specifications, machine code, service status, and the list of created ECS instances. You can specify relevant parameters, such as DDH IDs, DDH cluster IDs, hostname, and status, to query the required DDH details. This helps you efficiently manage and optimize cloud computing resources. * * @remarks * ## [](#)Usage notes * You can use one of the following methods to query the information about dedicated hosts: * * Specify `DedicatedHostIds` to query the details of specified dedicated hosts. * * Specify `DedicatedHostClusterId` to query the details of dedicated hosts in a dedicated host cluster. * * @param request - DescribeDedicatedHostsRequest * @returns DescribeDedicatedHostsResponse */ async describeDedicatedHosts(request: $_model.DescribeDedicatedHostsRequest): Promise<$_model.DescribeDedicatedHostsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeDedicatedHostsWithOptions(request, runtime); } /** * Queries the instance families that support different deployment strategies. When you call this operation, specify parameters, such as RegionId and Strategy, in the request. * * @remarks * ## [](#)Usage notes * For information about instance families, see [Overview of instance families](https://help.aliyun.com/document_detail/25378.html). * * @param request - DescribeDeploymentSetSupportedInstanceTypeFamilyRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeDeploymentSetSupportedInstanceTypeFamilyResponse */ async describeDeploymentSetSupportedInstanceTypeFamilyWithOptions(request: $_model.DescribeDeploymentSetSupportedInstanceTypeFamilyRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeDeploymentSetSupportedInstanceTypeFamilyResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.strategy)) { query["Strategy"] = request.strategy; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeDeploymentSetSupportedInstanceTypeFamily", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeDeploymentSetSupportedInstanceTypeFamilyResponse>(await this.callApi(params, req, runtime), new $_model.DescribeDeploymentSetSupportedInstanceTypeFamilyResponse({})); } /** * Queries the instance families that support different deployment strategies. When you call this operation, specify parameters, such as RegionId and Strategy, in the request. * * @remarks * ## [](#)Usage notes * For information about instance families, see [Overview of instance families](https://help.aliyun.com/document_detail/25378.html). * * @param request - DescribeDeploymentSetSupportedInstanceTypeFamilyRequest * @returns DescribeDeploymentSetSupportedInstanceTypeFamilyResponse */ async describeDeploymentSetSupportedInstanceTypeFamily(request: $_model.DescribeDeploymentSetSupportedInstanceTypeFamilyRequest): Promise<$_model.DescribeDeploymentSetSupportedInstanceTypeFamilyResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeDeploymentSetSupportedInstanceTypeFamilyWithOptions(request, runtime); } /** * Queries detailed information about one or more deployment sets. * * @param request - DescribeDeploymentSetsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeDeploymentSetsResponse */ async describeDeploymentSetsWithOptions(request: $_model.DescribeDeploymentSetsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeDeploymentSetsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.deploymentSetIds)) { query["DeploymentSetIds"] = request.deploymentSetIds; } if (!$dara.isNull(request.deploymentSetName)) { query["DeploymentSetName"] = request.deploymentSetName; } if (!$dara.isNull(request.domain)) { query["Domain"] = request.domain; } if (!$dara.isNull(request.granularity)) { query["Granularity"] = request.granularity; } if (!$dara.isNull(request.networkType)) { query["NetworkType"] = request.networkType; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.strategy)) { query["Strategy"] = request.strategy; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeDeploymentSets", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeDeploymentSetsResponse>(await this.callApi(params, req, runtime), new $_model.DescribeDeploymentSetsResponse({})); } /** * Queries detailed information about one or more deployment sets. * * @param request - DescribeDeploymentSetsRequest * @returns DescribeDeploymentSetsResponse */ async describeDeploymentSets(request: $_model.DescribeDeploymentSetsRequest): Promise<$_model.DescribeDeploymentSetsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeDeploymentSetsWithOptions(request, runtime); } /** * Queries diagnostic metric sets. * * @param request - DescribeDiagnosticMetricSetsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeDiagnosticMetricSetsResponse */ async describeDiagnosticMetricSetsWithOptions(request: $_model.DescribeDiagnosticMetricSetsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeDiagnosticMetricSetsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.maxResults)) { query["MaxResults"] = request.maxResults; } if (!$dara.isNull(request.metricSetIds)) { query["MetricSetIds"] = request.metricSetIds; } if (!$dara.isNull(request.nextToken)) { query["NextToken"] = request.nextToken; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceType)) { query["ResourceType"] = request.resourceType; } if (!$dara.isNull(request.type)) { query["Type"] = request.type; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeDiagnosticMetricSets", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeDiagnosticMetricSetsResponse>(await this.callApi(params, req, runtime), new $_model.DescribeDiagnosticMetricSetsResponse({})); } /** * Queries diagnostic metric sets. * * @param request - DescribeDiagnosticMetricSetsRequest * @returns DescribeDiagnosticMetricSetsResponse */ async describeDiagnosticMetricSets(request: $_model.DescribeDiagnosticMetricSetsRequest): Promise<$_model.DescribeDiagnosticMetricSetsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeDiagnosticMetricSetsWithOptions(request, runtime); } /** * Queries diagnostic metrics. * * @param request - DescribeDiagnosticMetricsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeDiagnosticMetricsResponse */ async describeDiagnosticMetricsWithOptions(request: $_model.DescribeDiagnosticMetricsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeDiagnosticMetricsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.maxResults)) { query["MaxResults"] = request.maxResults; } if (!$dara.isNull(request.metricIds)) { query["MetricIds"] = request.metricIds; } if (!$dara.isNull(request.nextToken)) { query["NextToken"] = request.nextToken; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceType)) { query["ResourceType"] = request.resourceType; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeDiagnosticMetrics", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeDiagnosticMetricsResponse>(await this.callApi(params, req, runtime), new $_model.DescribeDiagnosticMetricsResponse({})); } /** * Queries diagnostic metrics. * * @param request - DescribeDiagnosticMetricsRequest * @returns DescribeDiagnosticMetricsResponse */ async describeDiagnosticMetrics(request: $_model.DescribeDiagnosticMetricsRequest): Promise<$_model.DescribeDiagnosticMetricsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeDiagnosticMetricsWithOptions(request, runtime); } /** * Queries the details of a diagnostic report. * * @param request - DescribeDiagnosticReportAttributesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeDiagnosticReportAttributesResponse */ async describeDiagnosticReportAttributesWithOptions(request: $_model.DescribeDiagnosticReportAttributesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeDiagnosticReportAttributesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.reportId)) { query["ReportId"] = request.reportId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeDiagnosticReportAttributes", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeDiagnosticReportAttributesResponse>(await this.callApi(params, req, runtime), new $_model.DescribeDiagnosticReportAttributesResponse({})); } /** * Queries the details of a diagnostic report. * * @param request - DescribeDiagnosticReportAttributesRequest * @returns DescribeDiagnosticReportAttributesResponse */ async describeDiagnosticReportAttributes(request: $_model.DescribeDiagnosticReportAttributesRequest): Promise<$_model.DescribeDiagnosticReportAttributesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeDiagnosticReportAttributesWithOptions(request, runtime); } /** * Queries resource diagnostic reports. * * @param request - DescribeDiagnosticReportsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeDiagnosticReportsResponse */ async describeDiagnosticReportsWithOptions(request: $_model.DescribeDiagnosticReportsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeDiagnosticReportsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.maxResults)) { query["MaxResults"] = request.maxResults; } if (!$dara.isNull(request.nextToken)) { query["NextToken"] = request.nextToken; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.reportIds)) { query["ReportIds"] = request.reportIds; } if (!$dara.isNull(request.resourceIds)) { query["ResourceIds"] = request.resourceIds; } if (!$dara.isNull(request.severity)) { query["Severity"] = request.severity; } if (!$dara.isNull(request.status)) { query["Status"] = request.status; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeDiagnosticReports", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeDiagnosticReportsResponse>(await this.callApi(params, req, runtime), new $_model.DescribeDiagnosticReportsResponse({})); } /** * Queries resource diagnostic reports. * * @param request - DescribeDiagnosticReportsRequest * @returns DescribeDiagnosticReportsResponse */ async describeDiagnosticReports(request: $_model.DescribeDiagnosticReportsRequest): Promise<$_model.DescribeDiagnosticReportsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeDiagnosticReportsWithOptions(request, runtime); } /** * Queries the Key Management Service (KMS) key used by the Account-level Elastic Block Storage (EBS) Default Encryption feature in a region. * * @param request - DescribeDiskDefaultKMSKeyIdRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeDiskDefaultKMSKeyIdResponse */ async describeDiskDefaultKMSKeyIdWithOptions(request: $_model.DescribeDiskDefaultKMSKeyIdRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeDiskDefaultKMSKeyIdResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeDiskDefaultKMSKeyId", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeDiskDefaultKMSKeyIdResponse>(await this.callApi(params, req, runtime), new $_model.DescribeDiskDefaultKMSKeyIdResponse({})); } /** * Queries the Key Management Service (KMS) key used by the Account-level Elastic Block Storage (EBS) Default Encryption feature in a region. * * @param request - DescribeDiskDefaultKMSKeyIdRequest * @returns DescribeDiskDefaultKMSKeyIdResponse */ async describeDiskDefaultKMSKeyId(request: $_model.DescribeDiskDefaultKMSKeyIdRequest): Promise<$_model.DescribeDiskDefaultKMSKeyIdResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeDiskDefaultKMSKeyIdWithOptions(request, runtime); } /** * Queries whether account-level default encryption of Elastic Block Storage (EBS) resources is enabled in a region. * * @param request - DescribeDiskEncryptionByDefaultStatusRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeDiskEncryptionByDefaultStatusResponse */ async describeDiskEncryptionByDefaultStatusWithOptions(request: $_model.DescribeDiskEncryptionByDefaultStatusRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeDiskEncryptionByDefaultStatusResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeDiskEncryptionByDefaultStatus", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeDiskEncryptionByDefaultStatusResponse>(await this.callApi(params, req, runtime), new $_model.DescribeDiskEncryptionByDefaultStatusResponse({})); } /** * Queries whether account-level default encryption of Elastic Block Storage (EBS) resources is enabled in a region. * * @param request - DescribeDiskEncryptionByDefaultStatusRequest * @returns DescribeDiskEncryptionByDefaultStatusResponse */ async describeDiskEncryptionByDefaultStatus(request: $_model.DescribeDiskEncryptionByDefaultStatusRequest): Promise<$_model.DescribeDiskEncryptionByDefaultStatusResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeDiskEncryptionByDefaultStatusWithOptions(request, runtime); } /** * Queries the monitoring data of a cloud disk within a specific period of time, such as the read IOPS, write IOPS, read bandwidth (byte/s), write bandwidth (byte/s), read latency (microseconds), and write latency (microseconds). * * @remarks * Take note of the following items: * * Monitoring data of only disks that are in the In Use (`In_use`) state can be queried. For more information, see [Disk states](https://help.aliyun.com/document_detail/25689.html). * ** * **Note** Some information may be missing from the monitoring data of a disk because the disk is not in the In Use `(In_use)` state and the system cannot obtain the relevant information. * * Up to 400 monitoring data entries can be returned at a time. Make sure that the `TotalCount` value does not exceed 400. The value is calculated by using the following formula: `TotalCount = (EndTime - StartTime)/Period`. If the TotalCount value is greater than 400, the `InvalidParameter.TooManyDataQueried` error is returned. * * You can query the monitoring data in the last 30 days. If the value of `StartTime` is more than 30 days earlier than the current time, an error is returned. * ## [](#)Sample requests * For example, you want to query the monitoring data of a cloud disk whose ID is `d-bp14emm68wx98vjk****` in the China (Hangzhou) region every 600 seconds from `2025-02-17T00:00:00Z` to `2025-02-18T10:00:00Z`. Request parameters: * RegionId:"cn-hangzhou", // Set the region ID to cn-hangzhou, which specifies the China (Hangzhou) region. * DiskId:"d-bp14emm68wx98vjk****", // Specify the disk ID. * StartTime:"2025-02-15T00:00:00Z", // Specify the beginning of the time range to query. * EndTime:"2025-02-17T00:00:00Z", // Specify the end of the time range to query. * Period:"600", // Specify the interval at which to retrieve the monitoring data. * * @param request - DescribeDiskMonitorDataRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeDiskMonitorDataResponse */ async describeDiskMonitorDataWithOptions(request: $_model.DescribeDiskMonitorDataRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeDiskMonitorDataResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.diskId)) { query["DiskId"] = request.diskId; } if (!$dara.isNull(request.endTime)) { query["EndTime"] = request.endTime; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.period)) { query["Period"] = request.period; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.startTime)) { query["StartTime"] = request.startTime; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeDiskMonitorData", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeDiskMonitorDataResponse>(await this.callApi(params, req, runtime), new $_model.DescribeDiskMonitorDataResponse({})); } /** * Queries the monitoring data of a cloud disk within a specific period of time, such as the read IOPS, write IOPS, read bandwidth (byte/s), write bandwidth (byte/s), read latency (microseconds), and write latency (microseconds). * * @remarks * Take note of the following items: * * Monitoring data of only disks that are in the In Use (`In_use`) state can be queried. For more information, see [Disk states](https://help.aliyun.com/document_detail/25689.html). * ** * **Note** Some information may be missing from the monitoring data of a disk because the disk is not in the In Use `(In_use)` state and the system cannot obtain the relevant information. * * Up to 400 monitoring data entries can be returned at a time. Make sure that the `TotalCount` value does not exceed 400. The value is calculated by using the following formula: `TotalCount = (EndTime - StartTime)/Period`. If the TotalCount value is greater than 400, the `InvalidParameter.TooManyDataQueried` error is returned. * * You can query the monitoring data in the last 30 days. If the value of `StartTime` is more than 30 days earlier than the current time, an error is returned. * ## [](#)Sample requests * For example, you want to query the monitoring data of a cloud disk whose ID is `d-bp14emm68wx98vjk****` in the China (Hangzhou) region every 600 seconds from `2025-02-17T00:00:00Z` to `2025-02-18T10:00:00Z`. Request parameters: * RegionId:"cn-hangzhou", // Set the region ID to cn-hangzhou, which specifies the China (Hangzhou) region. * DiskId:"d-bp14emm68wx98vjk****", // Specify the disk ID. * StartTime:"2025-02-15T00:00:00Z", // Specify the beginning of the time range to query. * EndTime:"2025-02-17T00:00:00Z", // Specify the end of the time range to query. * Period:"600", // Specify the interval at which to retrieve the monitoring data. * * @param request - DescribeDiskMonitorDataRequest * @returns DescribeDiskMonitorDataResponse */ async describeDiskMonitorData(request: $_model.DescribeDiskMonitorDataRequest): Promise<$_model.DescribeDiskMonitorDataResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeDiskMonitorDataWithOptions(request, runtime); } /** * Queries block storage devices that you created, including cloud disks, local disks, and elastic ephemeral disks. * * @remarks * You can specify multiple request parameters such as `RegionId`, `ZoneId`, `DiskIds`, and `InstanceId` as filters. The specified parameters are evaluated by using the "AND" operator. If you specify more than one filter, the records that match all filters are returned. * * The value of `DiskIds` is a JSON array. If you do not specify DiskIds, the parameter is not used as a filter. If you set `DiskIds` to an empty JSON array, the parameter is regarded as a valid filter, and an empty result is returned. * * Token-based paged query: Use `NextToken` to configure the query token. Set the value to the `NextToken` value returned in the previous call to the DescribeDisks operation. Then, use `MaxResults` to specify the maximum number of entries to return on each page. * * You can attach a disk for which the multi-attach feature is enabled to multiple instances. You can query the attachment information of the disk based on the `Attachment` values in the response. * When you call the API operation by using Alibaba Cloud CLI, you must specify request parameter values of different data types in the required formats. For more information, see [Parameter formats](https://help.aliyun.com/document_detail/110340.html). * * @param request - DescribeDisksRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeDisksResponse */ async describeDisksWithOptions(request: $_model.DescribeDisksRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeDisksResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.additionalAttributes)) { query["AdditionalAttributes"] = request.additionalAttributes; } if (!$dara.isNull(request.autoSnapshotPolicyId)) { query["AutoSnapshotPolicyId"] = request.autoSnapshotPolicyId; } if (!$dara.isNull(request.category)) { query["Category"] = request.category; } if (!$dara.isNull(request.deleteAutoSnapshot)) { query["DeleteAutoSnapshot"] = request.deleteAutoSnapshot; } if (!$dara.isNull(request.deleteWithInstance)) { query["DeleteWithInstance"] = request.deleteWithInstance; } if (!$dara.isNull(request.diskChargeType)) { query["DiskChargeType"] = request.diskChargeType; } if (!$dara.isNull(request.diskIds)) { query["DiskIds"] = request.diskIds; } if (!$dara.isNull(request.diskName)) { query["DiskName"] = request.diskName; } if (!$dara.isNull(request.diskType)) { query["DiskType"] = request.diskType; } if (!$dara.isNull(request.dryRun)) { query["DryRun"] = request.dryRun; } if (!$dara.isNull(request.enableAutoSnapshot)) { query["EnableAutoSnapshot"] = request.enableAutoSnapshot; } if (!$dara.isNull(request.enableAutomatedSnapshotPolicy)) { query["EnableAutomatedSnapshotPolicy"] = request.enableAutomatedSnapshotPolicy; } if (!$dara.isNull(request.enableShared)) { query["EnableShared"] = request.enableShared; } if (!$dara.isNull(request.encrypted)) { query["Encrypted"] = request.encrypted; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.KMSKeyId)) { query["KMSKeyId"] = request.KMSKeyId; } if (!$dara.isNull(request.lockReason)) { query["LockReason"] = request.lockReason; } if (!$dara.isNull(request.maxResults)) { query["MaxResults"] = request.maxResults; } if (!$dara.isNull(request.multiAttach)) { query["MultiAttach"] = request.multiAttach; } if (!$dara.isNull(request.nextToken)) { query["NextToken"] = request.nextToken; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.portable)) { query["Portable"] = request.portable; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.snapshotId)) { query["SnapshotId"] = request.snapshotId; } if (!$dara.isNull(request.status)) { query["Status"] = request.status; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } if (!$dara.isNull(request.zoneId)) { query["ZoneId"] = request.zoneId; } if (!$dara.isNull(request.filter)) { query["Filter"] = request.filter; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeDisks", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeDisksResponse>(await this.callApi(params, req, runtime), new $_model.DescribeDisksResponse({})); } /** * Queries block storage devices that you created, including cloud disks, local disks, and elastic ephemeral disks. * * @remarks * You can specify multiple request parameters such as `RegionId`, `ZoneId`, `DiskIds`, and `InstanceId` as filters. The specified parameters are evaluated by using the "AND" operator. If you specify more than one filter, the records that match all filters are returned. * * The value of `DiskIds` is a JSON array. If you do not specify DiskIds, the parameter is not used as a filter. If you set `DiskIds` to an empty JSON array, the parameter is regarded as a valid filter, and an empty result is returned. * * Token-based paged query: Use `NextToken` to configure the query token. Set the value to the `NextToken` value returned in the previous call to the DescribeDisks operation. Then, use `MaxResults` to specify the maximum number of entries to return on each page. * * You can attach a disk for which the multi-attach feature is enabled to multiple instances. You can query the attachment information of the disk based on the `Attachment` values in the response. * When you call the API operation by using Alibaba Cloud CLI, you must specify request parameter values of different data types in the required formats. For more information, see [Parameter formats](https://help.aliyun.com/document_detail/110340.html). * * @param request - DescribeDisksRequest * @returns DescribeDisksResponse */ async describeDisks(request: $_model.DescribeDisksRequest): Promise<$_model.DescribeDisksResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeDisksWithOptions(request, runtime); } /** * Queries the full status information about one or more Elastic Block Storage (EBS) devices. * * @remarks * The full status information about an EBS device includes the lifecycle status specified by the `Status` parameter, health status specified by the `HealthStatus` parameter, and event type specified by the `EventType` parameter of the EBS device. You can filter the results based on these parameters. * * The release time, scheduled execution time, and actual execution time of each EBS device event are identical. If you specify a period of time by using the `EventTime.Start` and `EventTime.End` parameters, all events that occurred within this period are queried. You can query events that occurred within the last seven days. * * @param request - DescribeDisksFullStatusRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeDisksFullStatusResponse */ async describeDisksFullStatusWithOptions(request: $_model.DescribeDisksFullStatusRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeDisksFullStatusResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.diskId)) { query["DiskId"] = request.diskId; } if (!$dara.isNull(request.eventId)) { query["EventId"] = request.eventId; } if (!$dara.isNull(request.eventType)) { query["EventType"] = request.eventType; } if (!$dara.isNull(request.healthStatus)) { query["HealthStatus"] = request.healthStatus; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.status)) { query["Status"] = request.status; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } if (!$dara.isNull(request.eventTime)) { query["EventTime"] = request.eventTime; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeDisksFullStatus", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeDisksFullStatusResponse>(await this.callApi(params, req, runtime), new $_model.DescribeDisksFullStatusResponse({})); } /** * Queries the full status information about one or more Elastic Block Storage (EBS) devices. * * @remarks * The full status information about an EBS device includes the lifecycle status specified by the `Status` parameter, health status specified by the `HealthStatus` parameter, and event type specified by the `EventType` parameter of the EBS device. You can filter the results based on these parameters. * * The release time, scheduled execution time, and actual execution time of each EBS device event are identical. If you specify a period of time by using the `EventTime.Start` and `EventTime.End` parameters, all events that occurred within this period are queried. You can query events that occurred within the last seven days. * * @param request - DescribeDisksFullStatusRequest * @returns DescribeDisksFullStatusResponse */ async describeDisksFullStatus(request: $_model.DescribeDisksFullStatusRequest): Promise<$_model.DescribeDisksFullStatusResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeDisksFullStatusWithOptions(request, runtime); } /** * DescribeEipAddresses * * @deprecated OpenAPI DescribeEipAddresses is deprecated, please use Vpc::2016-04-28::DescribeEipAddresses instead. * * @param request - DescribeEipAddressesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeEipAddressesResponse */ async describeEipAddressesWithOptions(request: $_model.DescribeEipAddressesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeEipAddressesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.allocationId)) { query["AllocationId"] = request.allocationId; } if (!$dara.isNull(request.associatedInstanceId)) { query["AssociatedInstanceId"] = request.associatedInstanceId; } if (!$dara.isNull(request.associatedInstanceType)) { query["AssociatedInstanceType"] = request.associatedInstanceType; } if (!$dara.isNull(request.chargeType)) { query["ChargeType"] = request.chargeType; } if (!$dara.isNull(request.eipAddress)) { query["EipAddress"] = request.eipAddress; } if (!$dara.isNull(request.ISP)) { query["ISP"] = request.ISP; } if (!$dara.isNull(request.lockReason)) { query["LockReason"] = request.lockReason; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.status)) { query["Status"] = request.status; } if (!$dara.isNull(request.filter)) { query["Filter"] = request.filter; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeEipAddresses", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeEipAddressesResponse>(await this.callApi(params, req, runtime), new $_model.DescribeEipAddressesResponse({})); } /** * DescribeEipAddresses * * @deprecated OpenAPI DescribeEipAddresses is deprecated, please use Vpc::2016-04-28::DescribeEipAddresses instead. * * @param request - DescribeEipAddressesRequest * @returns DescribeEipAddressesResponse */ // Deprecated async describeEipAddresses(request: $_model.DescribeEipAddressesRequest): Promise<$_model.DescribeEipAddressesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeEipAddressesWithOptions(request, runtime); } /** * DescribeEipMonitorData * * @deprecated OpenAPI DescribeEipMonitorData is deprecated, please use Vpc::2016-04-28::DescribeEipMonitorData instead. * * @param request - DescribeEipMonitorDataRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeEipMonitorDataResponse */ async describeEipMonitorDataWithOptions(request: $_model.DescribeEipMonitorDataRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeEipMonitorDataResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.allocationId)) { query["AllocationId"] = request.allocationId; } if (!$dara.isNull(request.endTime)) { query["EndTime"] = request.endTime; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.period)) { query["Period"] = request.period; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.startTime)) { query["StartTime"] = request.startTime; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeEipMonitorData", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeEipMonitorDataResponse>(await this.callApi(params, req, runtime), new $_model.DescribeEipMonitorDataResponse({})); } /** * DescribeEipMonitorData * * @deprecated OpenAPI DescribeEipMonitorData is deprecated, please use Vpc::2016-04-28::DescribeEipMonitorData instead. * * @param request - DescribeEipMonitorDataRequest * @returns DescribeEipMonitorDataResponse */ // Deprecated async describeEipMonitorData(request: $_model.DescribeEipMonitorDataRequest): Promise<$_model.DescribeEipMonitorDataResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeEipMonitorDataWithOptions(request, runtime); } /** * Queries the auto-renewal attribute of elasticity assurances. * * @param request - DescribeElasticityAssuranceAutoRenewAttributeRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeElasticityAssuranceAutoRenewAttributeResponse */ async describeElasticityAssuranceAutoRenewAttributeWithOptions(request: $_model.DescribeElasticityAssuranceAutoRenewAttributeRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeElasticityAssuranceAutoRenewAttributeResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.privatePoolOptions)) { query["PrivatePoolOptions"] = request.privatePoolOptions; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeElasticityAssuranceAutoRenewAttribute", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeElasticityAssuranceAutoRenewAttributeResponse>(await this.callApi(params, req, runtime), new $_model.DescribeElasticityAssuranceAutoRenewAttributeResponse({})); } /** * Queries the auto-renewal attribute of elasticity assurances. * * @param request - DescribeElasticityAssuranceAutoRenewAttributeRequest * @returns DescribeElasticityAssuranceAutoRenewAttributeResponse */ async describeElasticityAssuranceAutoRenewAttribute(request: $_model.DescribeElasticityAssuranceAutoRenewAttributeRequest): Promise<$_model.DescribeElasticityAssuranceAutoRenewAttributeResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeElasticityAssuranceAutoRenewAttributeWithOptions(request, runtime); } /** * Queries the running Elastic Compute Service (ECS) instances that use an elasticity assurance. * * @remarks * When an elasticity assurance expires, data about the association between the instances and the private pool generated by the elasticity assurance becomes invalid. When you call this operation to query the expired elasticity assurance, no value is returned. * * @param request - DescribeElasticityAssuranceInstancesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeElasticityAssuranceInstancesResponse */ async describeElasticityAssuranceInstancesWithOptions(request: $_model.DescribeElasticityAssuranceInstancesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeElasticityAssuranceInstancesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.maxResults)) { query["MaxResults"] = request.maxResults; } if (!$dara.isNull(request.nextToken)) { query["NextToken"] = request.nextToken; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.privatePoolOptions)) { query["PrivatePoolOptions"] = request.privatePoolOptions; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeElasticityAssuranceInstances", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeElasticityAssuranceInstancesResponse>(await this.callApi(params, req, runtime), new $_model.DescribeElasticityAssuranceInstancesResponse({})); } /** * Queries the running Elastic Compute Service (ECS) instances that use an elasticity assurance. * * @remarks * When an elasticity assurance expires, data about the association between the instances and the private pool generated by the elasticity assurance becomes invalid. When you call this operation to query the expired elasticity assurance, no value is returned. * * @param request - DescribeElasticityAssuranceInstancesRequest * @returns DescribeElasticityAssuranceInstancesResponse */ async describeElasticityAssuranceInstances(request: $_model.DescribeElasticityAssuranceInstancesRequest): Promise<$_model.DescribeElasticityAssuranceInstancesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeElasticityAssuranceInstancesWithOptions(request, runtime); } /** * Queries the details of elasticity assurances. * * @param request - DescribeElasticityAssurancesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeElasticityAssurancesResponse */ async describeElasticityAssurancesWithOptions(request: $_model.DescribeElasticityAssurancesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeElasticityAssurancesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.instanceChargeType)) { query["InstanceChargeType"] = request.instanceChargeType; } if (!$dara.isNull(request.instanceType)) { query["InstanceType"] = request.instanceType; } if (!$dara.isNull(request.maxResults)) { query["MaxResults"] = request.maxResults; } if (!$dara.isNull(request.nextToken)) { query["NextToken"] = request.nextToken; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.packageType)) { query["PackageType"] = request.packageType; } if (!$dara.isNull(request.platform)) { query["Platform"] = request.platform; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.status)) { query["Status"] = request.status; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } if (!$dara.isNull(request.zoneId)) { query["ZoneId"] = request.zoneId; } if (!$dara.isNull(request.privatePoolOptions)) { query["PrivatePoolOptions"] = request.privatePoolOptions; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeElasticityAssurances", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeElasticityAssurancesResponse>(await this.callApi(params, req, runtime), new $_model.DescribeElasticityAssurancesResponse({})); } /** * Queries the details of elasticity assurances. * * @param request - DescribeElasticityAssurancesRequest * @returns DescribeElasticityAssurancesResponse */ async describeElasticityAssurances(request: $_model.DescribeElasticityAssurancesRequest): Promise<$_model.DescribeElasticityAssurancesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeElasticityAssurancesWithOptions(request, runtime); } /** * Queries the monitoring data of a secondary elastic network interface (ENI) over a specific period of time. * * @remarks * ## [](#)Usage notes * The monitoring data of a secondary ENI includes the amount of traffic sent and received over the internal network, the number of packets sent and received by the secondary ENI, and the number of sent and received packets that are dropped by the secondary ENI. Specific information may be missing from the returned monitoring data. This may be because the system cannot obtain the relevant information. For example, if the instance to which the secondary ENI is attached is in the Stopped state or if the secondary ENI is not attached to an instance and is in the Available state, the monitoring data of the secondary ENI cannot be obtained. Take note of the following items: * * Up to 400 monitoring data entries can be returned at a time. Make sure that the `TotalCount` value does not exceed 400. The value is calculated by using the following formula: `TotalCount = (EndTime - StartTime)/Period`. If the TotalCount value is greater than 400, the `InvalidParameter.TooManyDataQueried` error is returned. * * You can query the monitoring data in the last 30 days. If the value of `StartTime` is more than 30 days earlier than the current time, an error is returned. * * @param request - DescribeEniMonitorDataRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeEniMonitorDataResponse */ async describeEniMonitorDataWithOptions(request: $_model.DescribeEniMonitorDataRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeEniMonitorDataResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.endTime)) { query["EndTime"] = request.endTime; } if (!$dara.isNull(request.eniId)) { query["EniId"] = request.eniId; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.period)) { query["Period"] = request.period; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.startTime)) { query["StartTime"] = request.startTime; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeEniMonitorData", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeEniMonitorDataResponse>(await this.callApi(params, req, runtime), new $_model.DescribeEniMonitorDataResponse({})); } /** * Queries the monitoring data of a secondary elastic network interface (ENI) over a specific period of time. * * @remarks * ## [](#)Usage notes * The monitoring data of a secondary ENI includes the amount of traffic sent and received over the internal network, the number of packets sent and received by the secondary ENI, and the number of sent and received packets that are dropped by the secondary ENI. Specific information may be missing from the returned monitoring data. This may be because the system cannot obtain the relevant information. For example, if the instance to which the secondary ENI is attached is in the Stopped state or if the secondary ENI is not attached to an instance and is in the Available state, the monitoring data of the secondary ENI cannot be obtained. Take note of the following items: * * Up to 400 monitoring data entries can be returned at a time. Make sure that the `TotalCount` value does not exceed 400. The value is calculated by using the following formula: `TotalCount = (EndTime - StartTime)/Period`. If the TotalCount value is greater than 400, the `InvalidParameter.TooManyDataQueried` error is returned. * * You can query the monitoring data in the last 30 days. If the value of `StartTime` is more than 30 days earlier than the current time, an error is returned. * * @param request - DescribeEniMonitorDataRequest * @returns DescribeEniMonitorDataResponse */ async describeEniMonitorData(request: $_model.DescribeEniMonitorDataRequest): Promise<$_model.DescribeEniMonitorDataResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeEniMonitorDataWithOptions(request, runtime); } /** * DescribeForwardTableEntries * * @deprecated OpenAPI DescribeForwardTableEntries is deprecated, please use Vpc::2016-04-28::DescribeForwardTableEntries instead. * * @param request - DescribeForwardTableEntriesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeForwardTableEntriesResponse */ async describeForwardTableEntriesWithOptions(request: $_model.DescribeForwardTableEntriesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeForwardTableEntriesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.forwardEntryId)) { query["ForwardEntryId"] = request.forwardEntryId; } if (!$dara.isNull(request.forwardTableId)) { query["ForwardTableId"] = request.forwardTableId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeForwardTableEntries", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeForwardTableEntriesResponse>(await this.callApi(params, req, runtime), new $_model.DescribeForwardTableEntriesResponse({})); } /** * DescribeForwardTableEntries * * @deprecated OpenAPI DescribeForwardTableEntries is deprecated, please use Vpc::2016-04-28::DescribeForwardTableEntries instead. * * @param request - DescribeForwardTableEntriesRequest * @returns DescribeForwardTableEntriesResponse */ // Deprecated async describeForwardTableEntries(request: $_model.DescribeForwardTableEntriesRequest): Promise<$_model.DescribeForwardTableEntriesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeForwardTableEntriesWithOptions(request, runtime); } /** * DescribeHaVips * * @deprecated OpenAPI DescribeHaVips is deprecated, please use Vpc::2016-04-28::DescribeHaVips instead. * * @param request - DescribeHaVipsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeHaVipsResponse */ async describeHaVipsWithOptions(request: $_model.DescribeHaVipsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeHaVipsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.filter)) { query["Filter"] = request.filter; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeHaVips", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeHaVipsResponse>(await this.callApi(params, req, runtime), new $_model.DescribeHaVipsResponse({})); } /** * DescribeHaVips * * @deprecated OpenAPI DescribeHaVips is deprecated, please use Vpc::2016-04-28::DescribeHaVips instead. * * @param request - DescribeHaVipsRequest * @returns DescribeHaVipsResponse */ // Deprecated async describeHaVips(request: $_model.DescribeHaVipsRequest): Promise<$_model.DescribeHaVipsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeHaVipsWithOptions(request, runtime); } /** * The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The \\*\\*token\\*\\* can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence]\\(~~25693~~). * * @param request - DescribeHpcClustersRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeHpcClustersResponse */ async describeHpcClustersWithOptions(request: $_model.DescribeHpcClustersRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeHpcClustersResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.hpcClusterIds)) { query["HpcClusterIds"] = request.hpcClusterIds; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeHpcClusters", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeHpcClustersResponse>(await this.callApi(params, req, runtime), new $_model.DescribeHpcClustersResponse({})); } /** * The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The \\*\\*token\\*\\* can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence]\\(~~25693~~). * * @param request - DescribeHpcClustersRequest * @returns DescribeHpcClustersResponse */ async describeHpcClusters(request: $_model.DescribeHpcClustersRequest): Promise<$_model.DescribeHpcClustersResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeHpcClustersWithOptions(request, runtime); } /** * Queries the details of one or more image components. * * @remarks * You can use `NextToken` to configure the query token. Set the value to the `NextToken` value that is returned in the previous call to the DescribeImageComponents operation. Then, use `MaxResults` to specify the maximum number of entries to return on each page. * * @param request - DescribeImageComponentsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeImageComponentsResponse */ async describeImageComponentsWithOptions(request: $_model.DescribeImageComponentsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeImageComponentsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.componentType)) { query["ComponentType"] = request.componentType; } if (!$dara.isNull(request.componentVersion)) { query["ComponentVersion"] = request.componentVersion; } if (!$dara.isNull(request.imageComponentId)) { query["ImageComponentId"] = request.imageComponentId; } if (!$dara.isNull(request.maxResults)) { query["MaxResults"] = request.maxResults; } if (!$dara.isNull(request.name)) { query["Name"] = request.name; } if (!$dara.isNull(request.nextToken)) { query["NextToken"] = request.nextToken; } if (!$dara.isNull(request.owner)) { query["Owner"] = request.owner; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.systemType)) { query["SystemType"] = request.systemType; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeImageComponents", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeImageComponentsResponse>(await this.callApi(params, req, runtime), new $_model.DescribeImageComponentsResponse({})); } /** * Queries the details of one or more image components. * * @remarks * You can use `NextToken` to configure the query token. Set the value to the `NextToken` value that is returned in the previous call to the DescribeImageComponents operation. Then, use `MaxResults` to specify the maximum number of entries to return on each page. * * @param request - DescribeImageComponentsRequest * @returns DescribeImageComponentsResponse */ async describeImageComponents(request: $_model.DescribeImageComponentsRequest): Promise<$_model.DescribeImageComponentsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeImageComponentsWithOptions(request, runtime); } /** * Queries available custom images that are most recently created in a specific image family. * * @remarks * ## [](#)Usage notes * If no available image exists in a specific image family, the response is empty. * * @param request - DescribeImageFromFamilyRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeImageFromFamilyResponse */ async describeImageFromFamilyWithOptions(request: $_model.DescribeImageFromFamilyRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeImageFromFamilyResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.imageFamily)) { query["ImageFamily"] = request.imageFamily; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeImageFromFamily", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeImageFromFamilyResponse>(await this.callApi(params, req, runtime), new $_model.DescribeImageFromFamilyResponse({})); } /** * Queries available custom images that are most recently created in a specific image family. * * @remarks * ## [](#)Usage notes * If no available image exists in a specific image family, the response is empty. * * @param request - DescribeImageFromFamilyRequest * @returns DescribeImageFromFamilyResponse */ async describeImageFromFamily(request: $_model.DescribeImageFromFamilyRequest): Promise<$_model.DescribeImageFromFamilyResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeImageFromFamilyWithOptions(request, runtime); } /** * The key of tag N of the image creation task. Valid values of N: 1 to 20. * * @remarks * The status of the image creation task. Valid values: * * PREPARING: Resources, such as intermediate instances, are being created. * * REPAIRING: The source image is being repaired. * * BUILDING: The user-defined commands are being run and an image is being created. * * TESTING: The user-defined test commands are being run. * * DISTRIBUTING: The created image is being copied and shared. * * RELEASING: The temporary resources generated during the image creation process are being released. * * SUCCESS The image creation task is completed. * * PARTITION_SUCCESS: The image creation task is partially completed. The image is created, but exceptions may occur when the image was copied or shared or when temporary resources were released. * * FAILED: The image creation task fails. * * TEST_FAILED: The image is created, but the test fails. * * CANCELLING: The image creation task is being canceled. * * CANCELLED: The image creation task is canceled. * * @param request - DescribeImagePipelineExecutionsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeImagePipelineExecutionsResponse */ async describeImagePipelineExecutionsWithOptions(request: $_model.DescribeImagePipelineExecutionsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeImagePipelineExecutionsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.executionId)) { query["ExecutionId"] = request.executionId; } if (!$dara.isNull(request.imagePipelineId)) { query["ImagePipelineId"] = request.imagePipelineId; } if (!$dara.isNull(request.maxResults)) { query["MaxResults"] = request.maxResults; } if (!$dara.isNull(request.nextToken)) { query["NextToken"] = request.nextToken; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.status)) { query["Status"] = request.status; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeImagePipelineExecutions", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeImagePipelineExecutionsResponse>(await this.callApi(params, req, runtime), new $_model.DescribeImagePipelineExecutionsResponse({})); } /** * The key of tag N of the image creation task. Valid values of N: 1 to 20. * * @remarks * The status of the image creation task. Valid values: * * PREPARING: Resources, such as intermediate instances, are being created. * * REPAIRING: The source image is being repaired. * * BUILDING: The user-defined commands are being run and an image is being created. * * TESTING: The user-defined test commands are being run. * * DISTRIBUTING: The created image is being copied and shared. * * RELEASING: The temporary resources generated during the image creation process are being released. * * SUCCESS The image creation task is completed. * * PARTITION_SUCCESS: The image creation task is partially completed. The image is created, but exceptions may occur when the image was copied or shared or when temporary resources were released. * * FAILED: The image creation task fails. * * TEST_FAILED: The image is created, but the test fails. * * CANCELLING: The image creation task is being canceled. * * CANCELLED: The image creation task is canceled. * * @param request - DescribeImagePipelineExecutionsRequest * @returns DescribeImagePipelineExecutionsResponse */ async describeImagePipelineExecutions(request: $_model.DescribeImagePipelineExecutionsRequest): Promise<$_model.DescribeImagePipelineExecutionsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeImagePipelineExecutionsWithOptions(request, runtime); } /** * Queries the details of one or more image templates. * * @remarks * You can use `NextToken` to configure the query token. Set the value to the `NextToken` value that is returned in the previous call to the `DescribeImagePipelines` operation. Then, use `MaxResults` to specify the maximum number of entries to return on each page. * * @param request - DescribeImagePipelinesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeImagePipelinesResponse */ async describeImagePipelinesWithOptions(request: $_model.DescribeImagePipelinesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeImagePipelinesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.imagePipelineId)) { query["ImagePipelineId"] = request.imagePipelineId; } if (!$dara.isNull(request.maxResults)) { query["MaxResults"] = request.maxResults; } if (!$dara.isNull(request.name)) { query["Name"] = request.name; } if (!$dara.isNull(request.nextToken)) { query["NextToken"] = request.nextToken; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeImagePipelines", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeImagePipelinesResponse>(await this.callApi(params, req, runtime), new $_model.DescribeImagePipelinesResponse({})); } /** * Queries the details of one or more image templates. * * @remarks * You can use `NextToken` to configure the query token. Set the value to the `NextToken` value that is returned in the previous call to the `DescribeImagePipelines` operation. Then, use `MaxResults` to specify the maximum number of entries to return on each page. * * @param request - DescribeImagePipelinesRequest * @returns DescribeImagePipelinesResponse */ async describeImagePipelines(request: $_model.DescribeImagePipelinesRequest): Promise<$_model.DescribeImagePipelinesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeImagePipelinesWithOptions(request, runtime); } /** * Queries the accounts with which a custom image is shared. When you call this operation, you can specify parameters, such as RegionId and ImageId, in the request. The response can be displayed by page. By default, 10 entries are displayed on each page. * * @param request - DescribeImageSharePermissionRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeImageSharePermissionResponse */ async describeImageSharePermissionWithOptions(request: $_model.DescribeImageSharePermissionRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeImageSharePermissionResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.imageId)) { query["ImageId"] = request.imageId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeImageSharePermission", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeImageSharePermissionResponse>(await this.callApi(params, req, runtime), new $_model.DescribeImageSharePermissionResponse({})); } /** * Queries the accounts with which a custom image is shared. When you call this operation, you can specify parameters, such as RegionId and ImageId, in the request. The response can be displayed by page. By default, 10 entries are displayed on each page. * * @param request - DescribeImageSharePermissionRequest * @returns DescribeImageSharePermissionResponse */ async describeImageSharePermission(request: $_model.DescribeImageSharePermissionRequest): Promise<$_model.DescribeImageSharePermissionResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeImageSharePermissionWithOptions(request, runtime); } /** * Queries the Elastic Compute Service (ECS) instance types supported by an image. * * @param request - DescribeImageSupportInstanceTypesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeImageSupportInstanceTypesResponse */ async describeImageSupportInstanceTypesWithOptions(request: $_model.DescribeImageSupportInstanceTypesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeImageSupportInstanceTypesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.actionType)) { query["ActionType"] = request.actionType; } if (!$dara.isNull(request.filter)) { query["Filter"] = request.filter; } if (!$dara.isNull(request.imageId)) { query["ImageId"] = request.imageId; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeImageSupportInstanceTypes", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeImageSupportInstanceTypesResponse>(await this.callApi(params, req, runtime), new $_model.DescribeImageSupportInstanceTypesResponse({})); } /** * Queries the Elastic Compute Service (ECS) instance types supported by an image. * * @param request - DescribeImageSupportInstanceTypesRequest * @returns DescribeImageSupportInstanceTypesResponse */ async describeImageSupportInstanceTypes(request: $_model.DescribeImageSupportInstanceTypesRequest): Promise<$_model.DescribeImageSupportInstanceTypesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeImageSupportInstanceTypesWithOptions(request, runtime); } /** * Queries image resources that you can use. You can specify parameters, such as ImageId, ActionType, and Filter, in the request. * * @remarks * ## [](#)Usage notes * * You can query your custom images, public images provided by Alibaba Cloud, Alibaba Cloud Marketplace images, and shared images from other Alibaba Cloud accounts. * * This is a paginated query. The response contains the total number of available images and the images on the returned page. By default,10 entries are displayed on each page. * * When you call an API operation by using Alibaba Cloud CLI, you must specify request parameter values of different data types in the required formats. For more information, see [Parameter formats](https://help.aliyun.com/document_detail/110340.html). * * If you set ImageOwnerAlias to system or others when you call the DescribeImages operation to query public images that are provided by Alibaba Cloud or shared images, Resource Access Management (RAM) policies are ignored in the request. For more information, see [RAM authorization](https://help.aliyun.com/document_detail/25497.html). * * @param request - DescribeImagesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeImagesResponse */ async describeImagesWithOptions(request: $_model.DescribeImagesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeImagesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.actionType)) { query["ActionType"] = request.actionType; } if (!$dara.isNull(request.architecture)) { query["Architecture"] = request.architecture; } if (!$dara.isNull(request.dryRun)) { query["DryRun"] = request.dryRun; } if (!$dara.isNull(request.filter)) { query["Filter"] = request.filter; } if (!$dara.isNull(request.imageFamily)) { query["ImageFamily"] = request.imageFamily; } if (!$dara.isNull(request.imageId)) { query["ImageId"] = request.imageId; } if (!$dara.isNull(request.imageName)) { query["ImageName"] = request.imageName; } if (!$dara.isNull(request.imageOwnerAlias)) { query["ImageOwnerAlias"] = request.imageOwnerAlias; } if (!$dara.isNull(request.imageOwnerId)) { query["ImageOwnerId"] = request.imageOwnerId; } if (!$dara.isNull(request.instanceType)) { query["InstanceType"] = request.instanceType; } if (!$dara.isNull(request.isPublic)) { query["IsPublic"] = request.isPublic; } if (!$dara.isNull(request.isSupportCloudinit)) { query["IsSupportCloudinit"] = request.isSupportCloudinit; } if (!$dara.isNull(request.isSupportIoOptimized)) { query["IsSupportIoOptimized"] = request.isSupportIoOptimized; } if (!$dara.isNull(request.OSType)) { query["OSType"] = request.OSType; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.showExpired)) { query["ShowExpired"] = request.showExpired; } if (!$dara.isNull(request.snapshotId)) { query["SnapshotId"] = request.snapshotId; } if (!$dara.isNull(request.status)) { query["Status"] = request.status; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } if (!$dara.isNull(request.usage)) { query["Usage"] = request.usage; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeImages", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeImagesResponse>(await this.callApi(params, req, runtime), new $_model.DescribeImagesResponse({})); } /** * Queries image resources that you can use. You can specify parameters, such as ImageId, ActionType, and Filter, in the request. * * @remarks * ## [](#)Usage notes * * You can query your custom images, public images provided by Alibaba Cloud, Alibaba Cloud Marketplace images, and shared images from other Alibaba Cloud accounts. * * This is a paginated query. The response contains the total number of available images and the images on the returned page. By default,10 entries are displayed on each page. * * When you call an API operation by using Alibaba Cloud CLI, you must specify request parameter values of different data types in the required formats. For more information, see [Parameter formats](https://help.aliyun.com/document_detail/110340.html). * * If you set ImageOwnerAlias to system or others when you call the DescribeImages operation to query public images that are provided by Alibaba Cloud or shared images, Resource Access Management (RAM) policies are ignored in the request. For more information, see [RAM authorization](https://help.aliyun.com/document_detail/25497.html). * * @param request - DescribeImagesRequest * @returns DescribeImagesResponse */ async describeImages(request: $_model.DescribeImagesRequest): Promise<$_model.DescribeImagesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeImagesWithOptions(request, runtime); } /** * Queries the information about the private pools that Elastic Compute Service (ECS) instances match. * * @remarks * ## [](#)Usage notes * After an elasticity assurance or a capacity reservation is created, a private pool is generated and associated with information about the instances that are created by using the private pool. You can specify a private pool when you create an instance. This way, the instance matches the elasticity assurance or capacity reservation that is associated with the private pool. * When a private pool expires, data related to the association between instances and the private pool becomes invalid. If you call this operation to query information about the private pool, empty values are returned. * * @param request - DescribeInstanceAttachmentAttributesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeInstanceAttachmentAttributesResponse */ async describeInstanceAttachmentAttributesWithOptions(request: $_model.DescribeInstanceAttachmentAttributesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeInstanceAttachmentAttributesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.instanceIds)) { query["InstanceIds"] = request.instanceIds; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeInstanceAttachmentAttributes", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeInstanceAttachmentAttributesResponse>(await this.callApi(params, req, runtime), new $_model.DescribeInstanceAttachmentAttributesResponse({})); } /** * Queries the information about the private pools that Elastic Compute Service (ECS) instances match. * * @remarks * ## [](#)Usage notes * After an elasticity assurance or a capacity reservation is created, a private pool is generated and associated with information about the instances that are created by using the private pool. You can specify a private pool when you create an instance. This way, the instance matches the elasticity assurance or capacity reservation that is associated with the private pool. * When a private pool expires, data related to the association between instances and the private pool becomes invalid. If you call this operation to query information about the private pool, empty values are returned. * * @param request - DescribeInstanceAttachmentAttributesRequest * @returns DescribeInstanceAttachmentAttributesResponse */ async describeInstanceAttachmentAttributes(request: $_model.DescribeInstanceAttachmentAttributesRequest): Promise<$_model.DescribeInstanceAttachmentAttributesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeInstanceAttachmentAttributesWithOptions(request, runtime); } /** * Queries the attributes of a specific Elastic Compute Service (ECS) instance. * * @param request - DescribeInstanceAttributeRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeInstanceAttributeResponse */ async describeInstanceAttributeWithOptions(request: $_model.DescribeInstanceAttributeRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeInstanceAttributeResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeInstanceAttribute", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeInstanceAttributeResponse>(await this.callApi(params, req, runtime), new $_model.DescribeInstanceAttributeResponse({})); } /** * Queries the attributes of a specific Elastic Compute Service (ECS) instance. * * @param request - DescribeInstanceAttributeRequest * @returns DescribeInstanceAttributeResponse */ async describeInstanceAttribute(request: $_model.DescribeInstanceAttributeRequest): Promise<$_model.DescribeInstanceAttributeResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeInstanceAttributeWithOptions(request, runtime); } /** * Queries the auto-renewal attribute of subscription Elastic Compute Service (ECS) instances, including whether auto-renewal is enabled for the instances and the auto-renewal durations of the instances. * * @remarks * Only subscription instances are supported. If you call this operation for a pay-as-you-go instance, an error is returned. * * Before you configure auto-renewal or manual renewal for subscription instances, you can query the auto-renewal status of the instances. * * @param request - DescribeInstanceAutoRenewAttributeRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeInstanceAutoRenewAttributeResponse */ async describeInstanceAutoRenewAttributeWithOptions(request: $_model.DescribeInstanceAutoRenewAttributeRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeInstanceAutoRenewAttributeResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.renewalStatus)) { query["RenewalStatus"] = request.renewalStatus; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeInstanceAutoRenewAttribute", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeInstanceAutoRenewAttributeResponse>(await this.callApi(params, req, runtime), new $_model.DescribeInstanceAutoRenewAttributeResponse({})); } /** * Queries the auto-renewal attribute of subscription Elastic Compute Service (ECS) instances, including whether auto-renewal is enabled for the instances and the auto-renewal durations of the instances. * * @remarks * Only subscription instances are supported. If you call this operation for a pay-as-you-go instance, an error is returned. * * Before you configure auto-renewal or manual renewal for subscription instances, you can query the auto-renewal status of the instances. * * @param request - DescribeInstanceAutoRenewAttributeRequest * @returns DescribeInstanceAutoRenewAttributeResponse */ async describeInstanceAutoRenewAttribute(request: $_model.DescribeInstanceAutoRenewAttributeRequest): Promise<$_model.DescribeInstanceAutoRenewAttributeResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeInstanceAutoRenewAttributeWithOptions(request, runtime); } /** * Queries the system events of Elastic Compute Service (ECS) instances. When you call this operation, you can specify parameters, such as InstanceId and EventType, in the request. By default, non-active system events are queried. * * @remarks * You can query system events that were completed within the last 30 days. No limits apply to the time range for querying uncompleted system events. * * If you do not specify the EventCycleStatus or InstanceEventCycleStatus parameter, only system events in the Avoidated, Executed, Canceled, or Failed state are included in the query results by default. * * You can also specify the InstanceEventCycleStatus parameter in the request to query the system events that are in the Scheduled, Executing, or Inquiring state. * * @param request - DescribeInstanceHistoryEventsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeInstanceHistoryEventsResponse */ async describeInstanceHistoryEventsWithOptions(request: $_model.DescribeInstanceHistoryEventsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeInstanceHistoryEventsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.eventCycleStatus)) { query["EventCycleStatus"] = request.eventCycleStatus; } if (!$dara.isNull(request.eventId)) { query["EventId"] = request.eventId; } if (!$dara.isNull(request.eventType)) { query["EventType"] = request.eventType; } if (!$dara.isNull(request.impactLevel)) { query["ImpactLevel"] = request.impactLevel; } if (!$dara.isNull(request.instanceEventCycleStatus)) { query["InstanceEventCycleStatus"] = request.instanceEventCycleStatus; } if (!$dara.isNull(request.instanceEventType)) { query["InstanceEventType"] = request.instanceEventType; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.maxResults)) { query["MaxResults"] = request.maxResults; } if (!$dara.isNull(request.nextToken)) { query["NextToken"] = request.nextToken; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceId)) { query["ResourceId"] = request.resourceId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.resourceType)) { query["ResourceType"] = request.resourceType; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } if (!$dara.isNull(request.eventPublishTime)) { query["EventPublishTime"] = request.eventPublishTime; } if (!$dara.isNull(request.notBefore)) { query["NotBefore"] = request.notBefore; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeInstanceHistoryEvents", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeInstanceHistoryEventsResponse>(await this.callApi(params, req, runtime), new $_model.DescribeInstanceHistoryEventsResponse({})); } /** * Queries the system events of Elastic Compute Service (ECS) instances. When you call this operation, you can specify parameters, such as InstanceId and EventType, in the request. By default, non-active system events are queried. * * @remarks * You can query system events that were completed within the last 30 days. No limits apply to the time range for querying uncompleted system events. * * If you do not specify the EventCycleStatus or InstanceEventCycleStatus parameter, only system events in the Avoidated, Executed, Canceled, or Failed state are included in the query results by default. * * You can also specify the InstanceEventCycleStatus parameter in the request to query the system events that are in the Scheduled, Executing, or Inquiring state. * * @param request - DescribeInstanceHistoryEventsRequest * @returns DescribeInstanceHistoryEventsResponse */ async describeInstanceHistoryEvents(request: $_model.DescribeInstanceHistoryEventsRequest): Promise<$_model.DescribeInstanceHistoryEventsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeInstanceHistoryEventsWithOptions(request, runtime); } /** * Queries the maintenance attributes of an instance. * * @remarks * This operation is used to query the specified maintenance policy of an instance, which contains the following maintenance attributes: * * Maintenance window: the time period that you specify for maintenance. * * Maintenance action: the action that you specify in response to instance shutdown. * * @param request - DescribeInstanceMaintenanceAttributesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeInstanceMaintenanceAttributesResponse */ async describeInstanceMaintenanceAttributesWithOptions(request: $_model.DescribeInstanceMaintenanceAttributesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeInstanceMaintenanceAttributesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeInstanceMaintenanceAttributes", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeInstanceMaintenanceAttributesResponse>(await this.callApi(params, req, runtime), new $_model.DescribeInstanceMaintenanceAttributesResponse({})); } /** * Queries the maintenance attributes of an instance. * * @remarks * This operation is used to query the specified maintenance policy of an instance, which contains the following maintenance attributes: * * Maintenance window: the time period that you specify for maintenance. * * Maintenance action: the action that you specify in response to instance shutdown. * * @param request - DescribeInstanceMaintenanceAttributesRequest * @returns DescribeInstanceMaintenanceAttributesResponse */ async describeInstanceMaintenanceAttributes(request: $_model.DescribeInstanceMaintenanceAttributesRequest): Promise<$_model.DescribeInstanceMaintenanceAttributesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeInstanceMaintenanceAttributesWithOptions(request, runtime); } /** * Queries the pricing information about newly attached subscription data disks or about the new instance types when you upgrade the configurations of unexpired subscription Elastic Compute Service (ECS) instances. * * @remarks * Pricing information can be queried for unexpired subscription ECS instances only when you upgrade their configurations. The pricing information cannot be queried when the instance configurations are downgraded. * * Pricing information cannot be queried for pay-as-you-go ECS instances when you change their configurations. Prices of existing pay-as-you-go ECS instances whose configurations are changed are the same as those of new pay-as-you-go instances. You can call the [DescribePrice](https://help.aliyun.com/document_detail/107829.html) operation to query the latest prices of ECS instances. * * Before you upgrade the configurations of an instance, we recommend that you call the [DescribeResourcesModification](https://help.aliyun.com/document_detail/66187.html) operation to query the instance types available for configuration upgrades in a specified zone. * * @param request - DescribeInstanceModificationPriceRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeInstanceModificationPriceResponse */ async describeInstanceModificationPriceWithOptions(request: $_model.DescribeInstanceModificationPriceRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeInstanceModificationPriceResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.dataDisk)) { query["DataDisk"] = request.dataDisk; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.instanceType)) { query["InstanceType"] = request.instanceType; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.systemDisk)) { query["SystemDisk"] = request.systemDisk; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeInstanceModificationPrice", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeInstanceModificationPriceResponse>(await this.callApi(params, req, runtime), new $_model.DescribeInstanceModificationPriceResponse({})); } /** * Queries the pricing information about newly attached subscription data disks or about the new instance types when you upgrade the configurations of unexpired subscription Elastic Compute Service (ECS) instances. * * @remarks * Pricing information can be queried for unexpired subscription ECS instances only when you upgrade their configurations. The pricing information cannot be queried when the instance configurations are downgraded. * * Pricing information cannot be queried for pay-as-you-go ECS instances when you change their configurations. Prices of existing pay-as-you-go ECS instances whose configurations are changed are the same as those of new pay-as-you-go instances. You can call the [DescribePrice](https://help.aliyun.com/document_detail/107829.html) operation to query the latest prices of ECS instances. * * Before you upgrade the configurations of an instance, we recommend that you call the [DescribeResourcesModification](https://help.aliyun.com/document_detail/66187.html) operation to query the instance types available for configuration upgrades in a specified zone. * * @param request - DescribeInstanceModificationPriceRequest * @returns DescribeInstanceModificationPriceResponse */ async describeInstanceModificationPrice(request: $_model.DescribeInstanceModificationPriceRequest): Promise<$_model.DescribeInstanceModificationPriceResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeInstanceModificationPriceWithOptions(request, runtime); } /** * Queries the monitoring data of an Elastic Compute Service (ECS) instance. The monitoring data can include the vCPU utilization, CPU credits of the burstable instance, amount of received data traffic, amount of sent data traffic, and average bandwidth. * * @remarks * ## [](#)Usage notes * Take note of the following items: * * Up to 400 monitoring data entries can be returned at a time. Make sure that the `TotalCount` value does not exceed 400. The value is calculated by using the following formula: `TotalCount = (EndTime - StartTime)/Period`. If the TotalCount value is greater than 400, the `InvalidParameter.TooManyDataQueried` error is returned. * * You can query the monitoring data in the last 30 days. If the value of `StartTime` is more than 30 days earlier than the current time, an error is returned. * * In some scenarios, such as when the instance is in the Stopped state, the system cannot obtain the relevant information and specific information may be missing from the returned monitoring data. * * You cannot call this operation to obtain the CPU basic monitoring information of an ECS bare metal instance. To obtain the CPU monitoring information of an ECS bare metal instance, install the CloudMonitor agent on the instance. For more information, see [InstallCloudMonitor](https://help.aliyun.com/document_detail/183482.html). * * @param request - DescribeInstanceMonitorDataRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeInstanceMonitorDataResponse */ async describeInstanceMonitorDataWithOptions(request: $_model.DescribeInstanceMonitorDataRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeInstanceMonitorDataResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.endTime)) { query["EndTime"] = request.endTime; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.period)) { query["Period"] = request.period; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.startTime)) { query["StartTime"] = request.startTime; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeInstanceMonitorData", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeInstanceMonitorDataResponse>(await this.callApi(params, req, runtime), new $_model.DescribeInstanceMonitorDataResponse({})); } /** * Queries the monitoring data of an Elastic Compute Service (ECS) instance. The monitoring data can include the vCPU utilization, CPU credits of the burstable instance, amount of received data traffic, amount of sent data traffic, and average bandwidth. * * @remarks * ## [](#)Usage notes * Take note of the following items: * * Up to 400 monitoring data entries can be returned at a time. Make sure that the `TotalCount` value does not exceed 400. The value is calculated by using the following formula: `TotalCount = (EndTime - StartTime)/Period`. If the TotalCount value is greater than 400, the `InvalidParameter.TooManyDataQueried` error is returned. * * You can query the monitoring data in the last 30 days. If the value of `StartTime` is more than 30 days earlier than the current time, an error is returned. * * In some scenarios, such as when the instance is in the Stopped state, the system cannot obtain the relevant information and specific information may be missing from the returned monitoring data. * * You cannot call this operation to obtain the CPU basic monitoring information of an ECS bare metal instance. To obtain the CPU monitoring information of an ECS bare metal instance, install the CloudMonitor agent on the instance. For more information, see [InstallCloudMonitor](https://help.aliyun.com/document_detail/183482.html). * * @param request - DescribeInstanceMonitorDataRequest * @returns DescribeInstanceMonitorDataResponse */ async describeInstanceMonitorData(request: $_model.DescribeInstanceMonitorDataRequest): Promise<$_model.DescribeInstanceMonitorDataResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeInstanceMonitorDataWithOptions(request, runtime); } /** * Queries the instance Resource Access Management (RAM) roles that are attached to Elastic Compute Service (ECS) instances based on the instance IDs, or queries the ECS instances to which a specific instance RAM role is attached based on the name of the instance RAM role. * * @remarks * ## [](#)Usage notes * When you call the API operation by using Alibaba Cloud CLI, you must specify request parameter values of different data types in the required formats. For more information, see [Parameter formats](https://help.aliyun.com/document_detail/110340.html). * * @param request - DescribeInstanceRamRoleRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeInstanceRamRoleResponse */ async describeInstanceRamRoleWithOptions(request: $_model.DescribeInstanceRamRoleRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeInstanceRamRoleResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.instanceIds)) { query["InstanceIds"] = request.instanceIds; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.ramRoleName)) { query["RamRoleName"] = request.ramRoleName; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeInstanceRamRole", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeInstanceRamRoleResponse>(await this.callApi(params, req, runtime), new $_model.DescribeInstanceRamRoleResponse({})); } /** * Queries the instance Resource Access Management (RAM) roles that are attached to Elastic Compute Service (ECS) instances based on the instance IDs, or queries the ECS instances to which a specific instance RAM role is attached based on the name of the instance RAM role. * * @remarks * ## [](#)Usage notes * When you call the API operation by using Alibaba Cloud CLI, you must specify request parameter values of different data types in the required formats. For more information, see [Parameter formats](https://help.aliyun.com/document_detail/110340.html). * * @param request - DescribeInstanceRamRoleRequest * @returns DescribeInstanceRamRoleResponse */ async describeInstanceRamRole(request: $_model.DescribeInstanceRamRoleRequest): Promise<$_model.DescribeInstanceRamRoleResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeInstanceRamRoleWithOptions(request, runtime); } /** * Queries the status of one or more Elastic Compute Service (ECS) instances. You can also call this operation to query the list of ECS instances that match the specified filter conditions. * * @remarks * For information about the lifecycle states of an ECS instance, see [Instance lifecycle](https://help.aliyun.com/document_detail/25687.html). * ## [](#)Sample requests * * Query the ECS instances and the status of the instances in a **specific region**. Sample request: * * "RegionID": "cn-hangzhou" * * Query the ECS instances and the status of the instances in a **zone** of a **specific region**. Sample request: * * "RegionID": "cn-hangzhou", * "ZoneID": "cn-hangzhou-a" * * Query the status of an ECS instance in a **specific region** based on the **instance ID**. Sample request: * * "RegionID": "cn-hangzhou", * "InstancesID": ["i-bp1f7c1zqp999zvp****", "i-bp1dqjv36biueg61****"] * * @param request - DescribeInstanceStatusRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeInstanceStatusResponse */ async describeInstanceStatusWithOptions(request: $_model.DescribeInstanceStatusRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeInstanceStatusResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clusterId)) { query["ClusterId"] = request.clusterId; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.zoneId)) { query["ZoneId"] = request.zoneId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeInstanceStatus", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeInstanceStatusResponse>(await this.callApi(params, req, runtime), new $_model.DescribeInstanceStatusResponse({})); } /** * Queries the status of one or more Elastic Compute Service (ECS) instances. You can also call this operation to query the list of ECS instances that match the specified filter conditions. * * @remarks * For information about the lifecycle states of an ECS instance, see [Instance lifecycle](https://help.aliyun.com/document_detail/25687.html). * ## [](#)Sample requests * * Query the ECS instances and the status of the instances in a **specific region**. Sample request: * * "RegionID": "cn-hangzhou" * * Query the ECS instances and the status of the instances in a **zone** of a **specific region**. Sample request: * * "RegionID": "cn-hangzhou", * "ZoneID": "cn-hangzhou-a" * * Query the status of an ECS instance in a **specific region** based on the **instance ID**. Sample request: * * "RegionID": "cn-hangzhou", * "InstancesID": ["i-bp1f7c1zqp999zvp****", "i-bp1dqjv36biueg61****"] * * @param request - DescribeInstanceStatusRequest * @returns DescribeInstanceStatusResponse */ async describeInstanceStatus(request: $_model.DescribeInstanceStatusRequest): Promise<$_model.DescribeInstanceStatusResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeInstanceStatusWithOptions(request, runtime); } /** * Queries the topology of the host on which an Elastic Compute Service (ECS) instance resides. * * @param request - DescribeInstanceTopologyRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeInstanceTopologyResponse */ async describeInstanceTopologyWithOptions(request: $_model.DescribeInstanceTopologyRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeInstanceTopologyResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.instanceIds)) { query["InstanceIds"] = request.instanceIds; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeInstanceTopology", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeInstanceTopologyResponse>(await this.callApi(params, req, runtime), new $_model.DescribeInstanceTopologyResponse({})); } /** * Queries the topology of the host on which an Elastic Compute Service (ECS) instance resides. * * @param request - DescribeInstanceTopologyRequest * @returns DescribeInstanceTopologyResponse */ async describeInstanceTopology(request: $_model.DescribeInstanceTopologyRequest): Promise<$_model.DescribeInstanceTopologyResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeInstanceTopologyWithOptions(request, runtime); } /** * Queries the instance families provided by Elastic Compute Service (ECS). You can call the DescribeInstanceTypeFamilies operation to obtain information about different series of instance families. This helps you better understand the available instance types and choose appropriate instance types to create ECS instances. * * @param request - DescribeInstanceTypeFamiliesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeInstanceTypeFamiliesResponse */ async describeInstanceTypeFamiliesWithOptions(request: $_model.DescribeInstanceTypeFamiliesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeInstanceTypeFamiliesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.generation)) { query["Generation"] = request.generation; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeInstanceTypeFamilies", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeInstanceTypeFamiliesResponse>(await this.callApi(params, req, runtime), new $_model.DescribeInstanceTypeFamiliesResponse({})); } /** * Queries the instance families provided by Elastic Compute Service (ECS). You can call the DescribeInstanceTypeFamilies operation to obtain information about different series of instance families. This helps you better understand the available instance types and choose appropriate instance types to create ECS instances. * * @param request - DescribeInstanceTypeFamiliesRequest * @returns DescribeInstanceTypeFamiliesResponse */ async describeInstanceTypeFamilies(request: $_model.DescribeInstanceTypeFamiliesRequest): Promise<$_model.DescribeInstanceTypeFamiliesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeInstanceTypeFamiliesWithOptions(request, runtime); } /** * Queries the details of all instance types or a specific instance type provided by Elastic Compute Service (ECS). You can understand the specifications and performance of instance types based on the response and select an instance type that meets your business requirements. * * @remarks * **Paged query**: You can set MaxResults to specify the maximum number of entries to return in a single call. If the number of entries to return exceeds the specified MaxResults value, the response includes a NextToken value. You can set NextToken to the return value and specify MaxResults in your next request to DescribeInstanceTypes to retrieve the next page of results. * * When you call this operation, if you do not set NextToken to paginate the results, only the first page of results is returned by default and includes a maximum of 100 entries. To retrieve further pages of results, set NextToken or pass filter conditions in your requests to DescribeInstanceTypes. * > MaxResults specifies the maximum number of entries per page. The maximum value of this parameter is changed from 1600 to 100 for all users as of November 15, 2023. If you called the DescribeInstanceTypes operation in 2022, you can use 1600 as the maximum value before November 15, 2023. * * The DescribeInstanceTypes operation is used to query only the specifications and performance information of instance types. To query instance types that are available in a specific region, call the [DescribeAvailableResource](https://help.aliyun.com/document_detail/66186.html) operation. * * To use special instance types such as instance types that are unavailable for purchase, [submit a ticket](https://smartservice.console.aliyun.com/service/create-ticket-intl). * * @param request - DescribeInstanceTypesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeInstanceTypesResponse */ async describeInstanceTypesWithOptions(request: $_model.DescribeInstanceTypesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeInstanceTypesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.additionalAttributes)) { query["AdditionalAttributes"] = request.additionalAttributes; } if (!$dara.isNull(request.cpuArchitecture)) { query["CpuArchitecture"] = request.cpuArchitecture; } if (!$dara.isNull(request.cpuArchitectures)) { query["CpuArchitectures"] = request.cpuArchitectures; } if (!$dara.isNull(request.GPUSpec)) { query["GPUSpec"] = request.GPUSpec; } if (!$dara.isNull(request.gpuSpecs)) { query["GpuSpecs"] = request.gpuSpecs; } if (!$dara.isNull(request.instanceCategories)) { query["InstanceCategories"] = request.instanceCategories; } if (!$dara.isNull(request.instanceCategory)) { query["InstanceCategory"] = request.instanceCategory; } if (!$dara.isNull(request.instanceFamilyLevel)) { query["InstanceFamilyLevel"] = request.instanceFamilyLevel; } if (!$dara.isNull(request.instanceTypeFamilies)) { query["InstanceTypeFamilies"] = request.instanceTypeFamilies; } if (!$dara.isNull(request.instanceTypeFamily)) { query["InstanceTypeFamily"] = request.instanceTypeFamily; } if (!$dara.isNull(request.instanceTypes)) { query["InstanceTypes"] = request.instanceTypes; } if (!$dara.isNull(request.localStorageCategories)) { query["LocalStorageCategories"] = request.localStorageCategories; } if (!$dara.isNull(request.localStorageCategory)) { query["LocalStorageCategory"] = request.localStorageCategory; } if (!$dara.isNull(request.maxResults)) { query["MaxResults"] = request.maxResults; } if (!$dara.isNull(request.maximumCpuCoreCount)) { query["MaximumCpuCoreCount"] = request.maximumCpuCoreCount; } if (!$dara.isNull(request.maximumCpuSpeedFrequency)) { query["MaximumCpuSpeedFrequency"] = request.maximumCpuSpeedFrequency; } if (!$dara.isNull(request.maximumCpuTurboFrequency)) { query["MaximumCpuTurboFrequency"] = request.maximumCpuTurboFrequency; } if (!$dara.isNull(request.maximumGPUAmount)) { query["MaximumGPUAmount"] = request.maximumGPUAmount; } if (!$dara.isNull(request.maximumMemorySize)) { query["MaximumMemorySize"] = request.maximumMemorySize; } if (!$dara.isNull(request.minimumBaselineCredit)) { query["MinimumBaselineCredit"] = request.minimumBaselineCredit; } if (!$dara.isNull(request.minimumCpuCoreCount)) { query["MinimumCpuCoreCount"] = request.minimumCpuCoreCount; } if (!$dara.isNull(request.minimumCpuSpeedFrequency)) { query["MinimumCpuSpeedFrequency"] = request.minimumCpuSpeedFrequency; } if (!$dara.isNull(request.minimumCpuTurboFrequency)) { query["MinimumCpuTurboFrequency"] = request.minimumCpuTurboFrequency; } if (!$dara.isNull(request.minimumDiskQuantity)) { query["MinimumDiskQuantity"] = request.minimumDiskQuantity; } if (!$dara.isNull(request.minimumEniIpv6AddressQuantity)) { query["MinimumEniIpv6AddressQuantity"] = request.minimumEniIpv6AddressQuantity; } if (!$dara.isNull(request.minimumEniPrivateIpAddressQuantity)) { query["MinimumEniPrivateIpAddressQuantity"] = request.minimumEniPrivateIpAddressQuantity; } if (!$dara.isNull(request.minimumEniQuantity)) { query["MinimumEniQuantity"] = request.minimumEniQuantity; } if (!$dara.isNull(request.minimumEriQuantity)) { query["MinimumEriQuantity"] = request.minimumEriQuantity; } if (!$dara.isNull(request.minimumGPUAmount)) { query["MinimumGPUAmount"] = request.minimumGPUAmount; } if (!$dara.isNull(request.minimumInitialCredit)) { query["MinimumInitialCredit"] = request.minimumInitialCredit; } if (!$dara.isNull(request.minimumInstanceBandwidthRx)) { query["MinimumInstanceBandwidthRx"] = request.minimumInstanceBandwidthRx; } if (!$dara.isNull(request.minimumInstanceBandwidthTx)) { query["MinimumInstanceBandwidthTx"] = request.minimumInstanceBandwidthTx; } if (!$dara.isNull(request.minimumInstancePpsRx)) { query["MinimumInstancePpsRx"] = request.minimumInstancePpsRx; } if (!$dara.isNull(request.minimumInstancePpsTx)) { query["MinimumInstancePpsTx"] = request.minimumInstancePpsTx; } if (!$dara.isNull(request.minimumLocalStorageAmount)) { query["MinimumLocalStorageAmount"] = request.minimumLocalStorageAmount; } if (!$dara.isNull(request.minimumLocalStorageCapacity)) { query["MinimumLocalStorageCapacity"] = request.minimumLocalStorageCapacity; } if (!$dara.isNull(request.minimumMemorySize)) { query["MinimumMemorySize"] = request.minimumMemorySize; } if (!$dara.isNull(request.minimumPrimaryEniQueueNumber)) { query["MinimumPrimaryEniQueueNumber"] = request.minimumPrimaryEniQueueNumber; } if (!$dara.isNull(request.minimumQueuePairNumber)) { query["MinimumQueuePairNumber"] = request.minimumQueuePairNumber; } if (!$dara.isNull(request.minimumSecondaryEniQueueNumber)) { query["MinimumSecondaryEniQueueNumber"] = request.minimumSecondaryEniQueueNumber; } if (!$dara.isNull(request.nextToken)) { query["NextToken"] = request.nextToken; } if (!$dara.isNull(request.nvmeSupport)) { query["NvmeSupport"] = request.nvmeSupport; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.physicalProcessorModel)) { query["PhysicalProcessorModel"] = request.physicalProcessorModel; } if (!$dara.isNull(request.physicalProcessorModels)) { query["PhysicalProcessorModels"] = request.physicalProcessorModels; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeInstanceTypes", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeInstanceTypesResponse>(await this.callApi(params, req, runtime), new $_model.DescribeInstanceTypesResponse({})); } /** * Queries the details of all instance types or a specific instance type provided by Elastic Compute Service (ECS). You can understand the specifications and performance of instance types based on the response and select an instance type that meets your business requirements. * * @remarks * **Paged query**: You can set MaxResults to specify the maximum number of entries to return in a single call. If the number of entries to return exceeds the specified MaxResults value, the response includes a NextToken value. You can set NextToken to the return value and specify MaxResults in your next request to DescribeInstanceTypes to retrieve the next page of results. * * When you call this operation, if you do not set NextToken to paginate the results, only the first page of results is returned by default and includes a maximum of 100 entries. To retrieve further pages of results, set NextToken or pass filter conditions in your requests to DescribeInstanceTypes. * > MaxResults specifies the maximum number of entries per page. The maximum value of this parameter is changed from 1600 to 100 for all users as of November 15, 2023. If you called the DescribeInstanceTypes operation in 2022, you can use 1600 as the maximum value before November 15, 2023. * * The DescribeInstanceTypes operation is used to query only the specifications and performance information of instance types. To query instance types that are available in a specific region, call the [DescribeAvailableResource](https://help.aliyun.com/document_detail/66186.html) operation. * * To use special instance types such as instance types that are unavailable for purchase, [submit a ticket](https://smartservice.console.aliyun.com/service/create-ticket-intl). * * @param request - DescribeInstanceTypesRequest * @returns DescribeInstanceTypesResponse */ async describeInstanceTypes(request: $_model.DescribeInstanceTypesRequest): Promise<$_model.DescribeInstanceTypesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeInstanceTypesWithOptions(request, runtime); } /** * Queries the Virtual Network Computing (VNC) logon address of an Elastic Compute Service (ECS) instance. * * @remarks * You cannot directly use the VNC logon address (VncUrl) in the response to log on to an ECS instance. To log on to the ECS instance, you can use the **web management terminal URL** that contains the VNC logon address. * > To construct a web management terminal URL, add the `vncUrl=\\*\\*\\*\\*`, `instanceId=****`, and `isWindows=true/false` parameters at the end of `https://g.alicdn.com/aliyun/ecs-console-vnc2/0.0.8/index.html?`. Separate each parameter with an ampersand (`&`). Parameter description: * * `vncUrl`: the VNC logon address. * * `instanceId`: the instance ID. * * `isWindows`: specifies whether the operating system of your ECS instance is Windows. A value of `true` specifies that the operating system is Windows. A value of `false` specifies that the operating system is not Windows. * * You can connect to an ECS instance without using a VNC logon password. Therefore, you do not need to specify the `password` parameter. * * The keepalive time of a connection to a VNC management terminal is 300 seconds. If you do not interact with the VNC management terminal within 300 seconds, the VNC management terminal is automatically disconnected. * * If the connection is interrupted, you must call the DescribeInstanceVncUrl operation to obtain a new VNC logon address (`VncUrl`) and use the new logon address to construct a new web management terminal URL that you can use to reconnect to the VNC management terminal. You can reconnect to a VNC management terminal up to 30 times per minute. * Sample web management terminal URL: * https://g.alicdn.com/aliyun/ecs-console-vnc2/0.0.8/index.html?vncUrl=ws%3A%2F%****&instanceId=i-wz9hhwq5a6tm****&isWindows=true * * @param request - DescribeInstanceVncUrlRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeInstanceVncUrlResponse */ async describeInstanceVncUrlWithOptions(request: $_model.DescribeInstanceVncUrlRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeInstanceVncUrlResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeInstanceVncUrl", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeInstanceVncUrlResponse>(await this.callApi(params, req, runtime), new $_model.DescribeInstanceVncUrlResponse({})); } /** * Queries the Virtual Network Computing (VNC) logon address of an Elastic Compute Service (ECS) instance. * * @remarks * You cannot directly use the VNC logon address (VncUrl) in the response to log on to an ECS instance. To log on to the ECS instance, you can use the **web management terminal URL** that contains the VNC logon address. * > To construct a web management terminal URL, add the `vncUrl=\\*\\*\\*\\*`, `instanceId=****`, and `isWindows=true/false` parameters at the end of `https://g.alicdn.com/aliyun/ecs-console-vnc2/0.0.8/index.html?`. Separate each parameter with an ampersand (`&`). Parameter description: * * `vncUrl`: the VNC logon address. * * `instanceId`: the instance ID. * * `isWindows`: specifies whether the operating system of your ECS instance is Windows. A value of `true` specifies that the operating system is Windows. A value of `false` specifies that the operating system is not Windows. * * You can connect to an ECS instance without using a VNC logon password. Therefore, you do not need to specify the `password` parameter. * * The keepalive time of a connection to a VNC management terminal is 300 seconds. If you do not interact with the VNC management terminal within 300 seconds, the VNC management terminal is automatically disconnected. * * If the connection is interrupted, you must call the DescribeInstanceVncUrl operation to obtain a new VNC logon address (`VncUrl`) and use the new logon address to construct a new web management terminal URL that you can use to reconnect to the VNC management terminal. You can reconnect to a VNC management terminal up to 30 times per minute. * Sample web management terminal URL: * https://g.alicdn.com/aliyun/ecs-console-vnc2/0.0.8/index.html?vncUrl=ws%3A%2F%****&instanceId=i-wz9hhwq5a6tm****&isWindows=true * * @param request - DescribeInstanceVncUrlRequest * @returns DescribeInstanceVncUrlResponse */ async describeInstanceVncUrl(request: $_model.DescribeInstanceVncUrlRequest): Promise<$_model.DescribeInstanceVncUrlResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeInstanceVncUrlWithOptions(request, runtime); } /** * Queries Elastic Compute Service (ECS) instances by various filter conditions. The details of the queried ECS instances are returned in the response. * * @remarks * ### [](#)Limits * * When you call the API operation by using Alibaba Cloud CLI, you must specify request parameter values of different data types in the required formats. For more information, see [Parameter format overview](https://help.aliyun.com/document_detail/110340.html). * * If you use a Resource Access Management (RAM) user or RAM role that does not have the permissions to call this operation, an empty list is returned. * ### [](#)Suggestions * * Specify DryRun in the request to perform a dry run. In the dry run, the system checks the validity and authorization status of the parameters. * * During a paged query, when you call the DescribeInstances operation to retrieve the first page of results, set `MaxResults` to specify the maximum number of entries to return in the call. The return value of `NextToken` is a pagination token that can be used in the next call to retrieve a new page of results. When you call the DescribeInstances operation to retrieve a new page of results, set `NextToken` to the `NextToken` value returned in the previous call and set `MaxResults` to specify the maximum number of entries to return in this call. * * @param request - DescribeInstancesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeInstancesResponse */ async describeInstancesWithOptions(request: $_model.DescribeInstancesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeInstancesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.additionalAttributes)) { query["AdditionalAttributes"] = request.additionalAttributes; } if (!$dara.isNull(request.deviceAvailable)) { query["DeviceAvailable"] = request.deviceAvailable; } if (!$dara.isNull(request.dryRun)) { query["DryRun"] = request.dryRun; } if (!$dara.isNull(request.eipAddresses)) { query["EipAddresses"] = request.eipAddresses; } if (!$dara.isNull(request.hpcClusterId)) { query["HpcClusterId"] = request.hpcClusterId; } if (!$dara.isNull(request.httpEndpoint)) { query["HttpEndpoint"] = request.httpEndpoint; } if (!$dara.isNull(request.httpPutResponseHopLimit)) { query["HttpPutResponseHopLimit"] = request.httpPutResponseHopLimit; } if (!$dara.isNull(request.httpTokens)) { query["HttpTokens"] = request.httpTokens; } if (!$dara.isNull(request.imageId)) { query["ImageId"] = request.imageId; } if (!$dara.isNull(request.innerIpAddresses)) { query["InnerIpAddresses"] = request.innerIpAddresses; } if (!$dara.isNull(request.instanceChargeType)) { query["InstanceChargeType"] = request.instanceChargeType; } if (!$dara.isNull(request.instanceIds)) { query["InstanceIds"] = request.instanceIds; } if (!$dara.isNull(request.instanceName)) { query["InstanceName"] = request.instanceName; } if (!$dara.isNull(request.instanceNetworkType)) { query["InstanceNetworkType"] = request.instanceNetworkType; } if (!$dara.isNull(request.instanceType)) { query["InstanceType"] = request.instanceType; } if (!$dara.isNull(request.instanceTypeFamily)) { query["InstanceTypeFamily"] = request.instanceTypeFamily; } if (!$dara.isNull(request.internetChargeType)) { query["InternetChargeType"] = request.internetChargeType; } if (!$dara.isNull(request.ioOptimized)) { query["IoOptimized"] = request.ioOptimized; } if (!$dara.isNull(request.ipv6Address)) { query["Ipv6Address"] = request.ipv6Address; } if (!$dara.isNull(request.keyPairName)) { query["KeyPairName"] = request.keyPairName; } if (!$dara.isNull(request.lockReason)) { query["LockReason"] = request.lockReason; } if (!$dara.isNull(request.maxResults)) { query["MaxResults"] = request.maxResults; } if (!$dara.isNull(request.needSaleCycle)) { query["NeedSaleCycle"] = request.needSaleCycle; } if (!$dara.isNull(request.nextToken)) { query["NextToken"] = request.nextToken; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.privateIpAddresses)) { query["PrivateIpAddresses"] = request.privateIpAddresses; } if (!$dara.isNull(request.publicIpAddresses)) { query["PublicIpAddresses"] = request.publicIpAddresses; } if (!$dara.isNull(request.rdmaIpAddresses)) { query["RdmaIpAddresses"] = request.rdmaIpAddresses; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.securityGroupId)) { query["SecurityGroupId"] = request.securityGroupId; } if (!$dara.isNull(request.status)) { query["Status"] = request.status; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } if (!$dara.isNull(request.vSwitchId)) { query["VSwitchId"] = request.vSwitchId; } if (!$dara.isNull(request.vpcId)) { query["VpcId"] = request.vpcId; } if (!$dara.isNull(request.zoneId)) { query["ZoneId"] = request.zoneId; } if (!$dara.isNull(request.filter)) { query["Filter"] = request.filter; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeInstances", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeInstancesResponse>(await this.callApi(params, req, runtime), new $_model.DescribeInstancesResponse({})); } /** * Queries Elastic Compute Service (ECS) instances by various filter conditions. The details of the queried ECS instances are returned in the response. * * @remarks * ### [](#)Limits * * When you call the API operation by using Alibaba Cloud CLI, you must specify request parameter values of different data types in the required formats. For more information, see [Parameter format overview](https://help.aliyun.com/document_detail/110340.html). * * If you use a Resource Access Management (RAM) user or RAM role that does not have the permissions to call this operation, an empty list is returned. * ### [](#)Suggestions * * Specify DryRun in the request to perform a dry run. In the dry run, the system checks the validity and authorization status of the parameters. * * During a paged query, when you call the DescribeInstances operation to retrieve the first page of results, set `MaxResults` to specify the maximum number of entries to return in the call. The return value of `NextToken` is a pagination token that can be used in the next call to retrieve a new page of results. When you call the DescribeInstances operation to retrieve a new page of results, set `NextToken` to the `NextToken` value returned in the previous call and set `MaxResults` to specify the maximum number of entries to return in this call. * * @param request - DescribeInstancesRequest * @returns DescribeInstancesResponse */ async describeInstances(request: $_model.DescribeInstancesRequest): Promise<$_model.DescribeInstancesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeInstancesWithOptions(request, runtime); } /** * Queries the full status information of one or more Elastic Compute Service (ECS) instances. The full status information includes the instance status and the status of instance system events. The instance status is the lifecycle status of instances. The status of instance system events is the health status of maintenance events. * * @remarks * ## [](#)Usage notes * The response includes the instance status and the instance system events that are in the Scheduled state. * You can specify a period of time to query events that occurred within the period of time. * * @param request - DescribeInstancesFullStatusRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeInstancesFullStatusResponse */ async describeInstancesFullStatusWithOptions(request: $_model.DescribeInstancesFullStatusRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeInstancesFullStatusResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.eventId)) { query["EventId"] = request.eventId; } if (!$dara.isNull(request.eventType)) { query["EventType"] = request.eventType; } if (!$dara.isNull(request.healthStatus)) { query["HealthStatus"] = request.healthStatus; } if (!$dara.isNull(request.instanceEventType)) { query["InstanceEventType"] = request.instanceEventType; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.status)) { query["Status"] = request.status; } if (!$dara.isNull(request.eventPublishTime)) { query["EventPublishTime"] = request.eventPublishTime; } if (!$dara.isNull(request.notBefore)) { query["NotBefore"] = request.notBefore; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeInstancesFullStatus", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeInstancesFullStatusResponse>(await this.callApi(params, req, runtime), new $_model.DescribeInstancesFullStatusResponse({})); } /** * Queries the full status information of one or more Elastic Compute Service (ECS) instances. The full status information includes the instance status and the status of instance system events. The instance status is the lifecycle status of instances. The status of instance system events is the health status of maintenance events. * * @remarks * ## [](#)Usage notes * The response includes the instance status and the instance system events that are in the Scheduled state. * You can specify a period of time to query events that occurred within the period of time. * * @param request - DescribeInstancesFullStatusRequest * @returns DescribeInstancesFullStatusResponse */ async describeInstancesFullStatus(request: $_model.DescribeInstancesFullStatusRequest): Promise<$_model.DescribeInstancesFullStatusResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeInstancesFullStatusWithOptions(request, runtime); } /** * The execution status of the command. Valid values: * * Running: * * Scheduled task: Before you stop the scheduled execution of the command, the execution state is always Running. * * One-time task: If the command is being run on instances, the execution state is Running. * * Finished: * * Scheduled task: The execution state can never be Finished. * * One-time task: The execution was complete on all instances, or the execution was stopped on some instances and was complete on the other instances. * * Failed: * * Scheduled task: The execution state can never be Failed. * * One-time task: The execution failed on all instances. * * PartialFailed: * * Scheduled task: The execution state can never be PartialFailed. * * One-time task: The execution failed on some instances. * * Stopped: The task was stopped. * * Stopping: The task is being stopped. * * @remarks * DescribeInvocationResults * * @param request - DescribeInvocationResultsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeInvocationResultsResponse */ async describeInvocationResultsWithOptions(request: $_model.DescribeInvocationResultsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeInvocationResultsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.commandId)) { query["CommandId"] = request.commandId; } if (!$dara.isNull(request.contentEncoding)) { query["ContentEncoding"] = request.contentEncoding; } if (!$dara.isNull(request.includeHistory)) { query["IncludeHistory"] = request.includeHistory; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.invokeId)) { query["InvokeId"] = request.invokeId; } if (!$dara.isNull(request.invokeRecordStatus)) { query["InvokeRecordStatus"] = request.invokeRecordStatus; } if (!$dara.isNull(request.maxResults)) { query["MaxResults"] = request.maxResults; } if (!$dara.isNull(request.nextToken)) { query["NextToken"] = request.nextToken; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeInvocationResults", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeInvocationResultsResponse>(await this.callApi(params, req, runtime), new $_model.DescribeInvocationResultsResponse({})); } /** * The execution status of the command. Valid values: * * Running: * * Scheduled task: Before you stop the scheduled execution of the command, the execution state is always Running. * * One-time task: If the command is being run on instances, the execution state is Running. * * Finished: * * Scheduled task: The execution state can never be Finished. * * One-time task: The execution was complete on all instances, or the execution was stopped on some instances and was complete on the other instances. * * Failed: * * Scheduled task: The execution state can never be Failed. * * One-time task: The execution failed on all instances. * * PartialFailed: * * Scheduled task: The execution state can never be PartialFailed. * * One-time task: The execution failed on some instances. * * Stopped: The task was stopped. * * Stopping: The task is being stopped. * * @remarks * DescribeInvocationResults * * @param request - DescribeInvocationResultsRequest * @returns DescribeInvocationResultsResponse */ async describeInvocationResults(request: $_model.DescribeInvocationResultsRequest): Promise<$_model.DescribeInvocationResultsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeInvocationResultsWithOptions(request, runtime); } /** * The command type. * * @remarks * DescribeInvocations * * @param request - DescribeInvocationsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeInvocationsResponse */ async describeInvocationsWithOptions(request: $_model.DescribeInvocationsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeInvocationsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.commandId)) { query["CommandId"] = request.commandId; } if (!$dara.isNull(request.commandName)) { query["CommandName"] = request.commandName; } if (!$dara.isNull(request.commandType)) { query["CommandType"] = request.commandType; } if (!$dara.isNull(request.contentEncoding)) { query["ContentEncoding"] = request.contentEncoding; } if (!$dara.isNull(request.includeOutput)) { query["IncludeOutput"] = request.includeOutput; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.invokeId)) { query["InvokeId"] = request.invokeId; } if (!$dara.isNull(request.invokeStatus)) { query["InvokeStatus"] = request.invokeStatus; } if (!$dara.isNull(request.maxResults)) { query["MaxResults"] = request.maxResults; } if (!$dara.isNull(request.nextToken)) { query["NextToken"] = request.nextToken; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.repeatMode)) { query["RepeatMode"] = request.repeatMode; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } if (!$dara.isNull(request.timed)) { query["Timed"] = request.timed; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeInvocations", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeInvocationsResponse>(await this.callApi(params, req, runtime), new $_model.DescribeInvocationsResponse({})); } /** * The command type. * * @remarks * DescribeInvocations * * @param request - DescribeInvocationsRequest * @returns DescribeInvocationsResponse */ async describeInvocations(request: $_model.DescribeInvocationsRequest): Promise<$_model.DescribeInvocationsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeInvocationsWithOptions(request, runtime); } /** * Queries one or more key pairs. * * @param request - DescribeKeyPairsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeKeyPairsResponse */ async describeKeyPairsWithOptions(request: $_model.DescribeKeyPairsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeKeyPairsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.includePublicKey)) { query["IncludePublicKey"] = request.includePublicKey; } if (!$dara.isNull(request.keyPairFingerPrint)) { query["KeyPairFingerPrint"] = request.keyPairFingerPrint; } if (!$dara.isNull(request.keyPairName)) { query["KeyPairName"] = request.keyPairName; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeKeyPairs", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeKeyPairsResponse>(await this.callApi(params, req, runtime), new $_model.DescribeKeyPairsResponse({})); } /** * Queries one or more key pairs. * * @param request - DescribeKeyPairsRequest * @returns DescribeKeyPairsResponse */ async describeKeyPairs(request: $_model.DescribeKeyPairsRequest): Promise<$_model.DescribeKeyPairsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeKeyPairsWithOptions(request, runtime); } /** * Queries the information of launch template versions, such as the total number of launch templates, launch template names, and launch template version numbers. * * @param request - DescribeLaunchTemplateVersionsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeLaunchTemplateVersionsResponse */ async describeLaunchTemplateVersionsWithOptions(request: $_model.DescribeLaunchTemplateVersionsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeLaunchTemplateVersionsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.defaultVersion)) { query["DefaultVersion"] = request.defaultVersion; } if (!$dara.isNull(request.detailFlag)) { query["DetailFlag"] = request.detailFlag; } if (!$dara.isNull(request.launchTemplateId)) { query["LaunchTemplateId"] = request.launchTemplateId; } if (!$dara.isNull(request.launchTemplateName)) { query["LaunchTemplateName"] = request.launchTemplateName; } if (!$dara.isNull(request.launchTemplateVersion)) { query["LaunchTemplateVersion"] = request.launchTemplateVersion; } if (!$dara.isNull(request.maxVersion)) { query["MaxVersion"] = request.maxVersion; } if (!$dara.isNull(request.minVersion)) { query["MinVersion"] = request.minVersion; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeLaunchTemplateVersions", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeLaunchTemplateVersionsResponse>(await this.callApi(params, req, runtime), new $_model.DescribeLaunchTemplateVersionsResponse({})); } /** * Queries the information of launch template versions, such as the total number of launch templates, launch template names, and launch template version numbers. * * @param request - DescribeLaunchTemplateVersionsRequest * @returns DescribeLaunchTemplateVersionsResponse */ async describeLaunchTemplateVersions(request: $_model.DescribeLaunchTemplateVersionsRequest): Promise<$_model.DescribeLaunchTemplateVersionsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeLaunchTemplateVersionsWithOptions(request, runtime); } /** * Queries the information of one or more launch templates, such as the total number of launch templates, the creation time of each launch template, and the latest version number of each launch template. When you can this operation, you can specify parameters, such as TemplateTag, TemplateResourceGroupId, and LaunchTemplateId, in the request. * * @param request - DescribeLaunchTemplatesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeLaunchTemplatesResponse */ async describeLaunchTemplatesWithOptions(request: $_model.DescribeLaunchTemplatesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeLaunchTemplatesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.launchTemplateId)) { query["LaunchTemplateId"] = request.launchTemplateId; } if (!$dara.isNull(request.launchTemplateName)) { query["LaunchTemplateName"] = request.launchTemplateName; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.templateResourceGroupId)) { query["TemplateResourceGroupId"] = request.templateResourceGroupId; } if (!$dara.isNull(request.templateTag)) { query["TemplateTag"] = request.templateTag; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeLaunchTemplates", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeLaunchTemplatesResponse>(await this.callApi(params, req, runtime), new $_model.DescribeLaunchTemplatesResponse({})); } /** * Queries the information of one or more launch templates, such as the total number of launch templates, the creation time of each launch template, and the latest version number of each launch template. When you can this operation, you can specify parameters, such as TemplateTag, TemplateResourceGroupId, and LaunchTemplateId, in the request. * * @param request - DescribeLaunchTemplatesRequest * @returns DescribeLaunchTemplatesResponse */ async describeLaunchTemplates(request: $_model.DescribeLaunchTemplatesRequest): Promise<$_model.DescribeLaunchTemplatesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeLaunchTemplatesWithOptions(request, runtime); } /** * 查询账号限制 * * @deprecated OpenAPI DescribeLimitation is deprecated * * @param request - DescribeLimitationRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeLimitationResponse */ async describeLimitationWithOptions(request: $_model.DescribeLimitationRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeLimitationResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.limitation)) { query["Limitation"] = request.limitation; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeLimitation", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeLimitationResponse>(await this.callApi(params, req, runtime), new $_model.DescribeLimitationResponse({})); } /** * 查询账号限制 * * @deprecated OpenAPI DescribeLimitation is deprecated * * @param request - DescribeLimitationRequest * @returns DescribeLimitationResponse */ // Deprecated async describeLimitation(request: $_model.DescribeLimitationRequest): Promise<$_model.DescribeLimitationResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeLimitationWithOptions(request, runtime); } /** * Queries the lock information of a snapshot, such as snapshot lock status and lock configuration. * * @param request - DescribeLockedSnapshotsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeLockedSnapshotsResponse */ async describeLockedSnapshotsWithOptions(request: $_model.DescribeLockedSnapshotsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeLockedSnapshotsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.dryRun)) { query["DryRun"] = request.dryRun; } if (!$dara.isNull(request.lockStatus)) { query["LockStatus"] = request.lockStatus; } if (!$dara.isNull(request.maxResults)) { query["MaxResults"] = request.maxResults; } if (!$dara.isNull(request.nextToken)) { query["NextToken"] = request.nextToken; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.snapshotIds)) { query["SnapshotIds"] = request.snapshotIds; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeLockedSnapshots", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeLockedSnapshotsResponse>(await this.callApi(params, req, runtime), new $_model.DescribeLockedSnapshotsResponse({})); } /** * Queries the lock information of a snapshot, such as snapshot lock status and lock configuration. * * @param request - DescribeLockedSnapshotsRequest * @returns DescribeLockedSnapshotsResponse */ async describeLockedSnapshots(request: $_model.DescribeLockedSnapshotsRequest): Promise<$_model.DescribeLockedSnapshotsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeLockedSnapshotsWithOptions(request, runtime); } /** * Queries managed instances. * * @remarks * During a paged query, when you call the DescribeManagedInstances operation to retrieve the first page of results, set `MaxResults` to specify the maximum number of entries to return in the call. The return value of `NextToken` is a pagination token that can be used in the next call to retrieve a new page of results. When you call the DescribeManagedInstances operation to retrieve a new page of results, set `NextToken` to the `NextToken` value returned in the previous call and set `MaxResults` to specify the maximum number of entries to return in this call. * * @param request - DescribeManagedInstancesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeManagedInstancesResponse */ async describeManagedInstancesWithOptions(request: $_model.DescribeManagedInstancesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeManagedInstancesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.activationId)) { query["ActivationId"] = request.activationId; } if (!$dara.isNull(request.connected)) { query["Connected"] = request.connected; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.instanceIp)) { query["InstanceIp"] = request.instanceIp; } if (!$dara.isNull(request.instanceName)) { query["InstanceName"] = request.instanceName; } if (!$dara.isNull(request.machineId)) { query["MachineId"] = request.machineId; } if (!$dara.isNull(request.maxResults)) { query["MaxResults"] = request.maxResults; } if (!$dara.isNull(request.nextToken)) { query["NextToken"] = request.nextToken; } if (!$dara.isNull(request.osType)) { query["OsType"] = request.osType; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeManagedInstances", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeManagedInstancesResponse>(await this.callApi(params, req, runtime), new $_model.DescribeManagedInstancesResponse({})); } /** * Queries managed instances. * * @remarks * During a paged query, when you call the DescribeManagedInstances operation to retrieve the first page of results, set `MaxResults` to specify the maximum number of entries to return in the call. The return value of `NextToken` is a pagination token that can be used in the next call to retrieve a new page of results. When you call the DescribeManagedInstances operation to retrieve a new page of results, set `NextToken` to the `NextToken` value returned in the previous call and set `MaxResults` to specify the maximum number of entries to return in this call. * * @param request - DescribeManagedInstancesRequest * @returns DescribeManagedInstancesResponse */ async describeManagedInstances(request: $_model.DescribeManagedInstancesRequest): Promise<$_model.DescribeManagedInstancesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeManagedInstancesWithOptions(request, runtime); } /** * DescribeNatGateways * * @deprecated OpenAPI DescribeNatGateways is deprecated, please use Vpc::2016-04-28::DescribeNatGateways instead. * * @param request - DescribeNatGatewaysRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeNatGatewaysResponse */ async describeNatGatewaysWithOptions(request: $_model.DescribeNatGatewaysRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeNatGatewaysResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.natGatewayId)) { query["NatGatewayId"] = request.natGatewayId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.vpcId)) { query["VpcId"] = request.vpcId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeNatGateways", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeNatGatewaysResponse>(await this.callApi(params, req, runtime), new $_model.DescribeNatGatewaysResponse({})); } /** * DescribeNatGateways * * @deprecated OpenAPI DescribeNatGateways is deprecated, please use Vpc::2016-04-28::DescribeNatGateways instead. * * @param request - DescribeNatGatewaysRequest * @returns DescribeNatGatewaysResponse */ // Deprecated async describeNatGateways(request: $_model.DescribeNatGatewaysRequest): Promise<$_model.DescribeNatGatewaysResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeNatGatewaysWithOptions(request, runtime); } /** * Queries the details of an elastic network interface (ENI). When you call this operation, you can set the NetworkInterfaceId parameter to specify an ENI. * * @remarks * ## Debugging * [OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.](https://api.aliyun.com/#product=Ecs\\&api=DescribeNetworkInterfaceAttribute\\&type=RPC\\&version=2014-05-26) * * @param request - DescribeNetworkInterfaceAttributeRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeNetworkInterfaceAttributeResponse */ async describeNetworkInterfaceAttributeWithOptions(request: $_model.DescribeNetworkInterfaceAttributeRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeNetworkInterfaceAttributeResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.attribute)) { query["Attribute"] = request.attribute; } if (!$dara.isNull(request.networkInterfaceId)) { query["NetworkInterfaceId"] = request.networkInterfaceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeNetworkInterfaceAttribute", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeNetworkInterfaceAttributeResponse>(await this.callApi(params, req, runtime), new $_model.DescribeNetworkInterfaceAttributeResponse({})); } /** * Queries the details of an elastic network interface (ENI). When you call this operation, you can set the NetworkInterfaceId parameter to specify an ENI. * * @remarks * ## Debugging * [OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.](https://api.aliyun.com/#product=Ecs\\&api=DescribeNetworkInterfaceAttribute\\&type=RPC\\&version=2014-05-26) * * @param request - DescribeNetworkInterfaceAttributeRequest * @returns DescribeNetworkInterfaceAttributeResponse */ async describeNetworkInterfaceAttribute(request: $_model.DescribeNetworkInterfaceAttributeRequest): Promise<$_model.DescribeNetworkInterfaceAttributeResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeNetworkInterfaceAttributeWithOptions(request, runtime); } /** * Queries the permissions on elastic network interfaces (ENIs) that are granted to an Alibaba Cloud partner (certified ISV) or an individual user. * * @param request - DescribeNetworkInterfacePermissionsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeNetworkInterfacePermissionsResponse */ async describeNetworkInterfacePermissionsWithOptions(request: $_model.DescribeNetworkInterfacePermissionsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeNetworkInterfacePermissionsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.networkInterfaceId)) { query["NetworkInterfaceId"] = request.networkInterfaceId; } if (!$dara.isNull(request.networkInterfacePermissionId)) { query["NetworkInterfacePermissionId"] = request.networkInterfacePermissionId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeNetworkInterfacePermissions", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeNetworkInterfacePermissionsResponse>(await this.callApi(params, req, runtime), new $_model.DescribeNetworkInterfacePermissionsResponse({})); } /** * Queries the permissions on elastic network interfaces (ENIs) that are granted to an Alibaba Cloud partner (certified ISV) or an individual user. * * @param request - DescribeNetworkInterfacePermissionsRequest * @returns DescribeNetworkInterfacePermissionsResponse */ async describeNetworkInterfacePermissions(request: $_model.DescribeNetworkInterfacePermissionsRequest): Promise<$_model.DescribeNetworkInterfacePermissionsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeNetworkInterfacePermissionsWithOptions(request, runtime); } /** * Queries the details of one or more Elastic Network Interface (ENIs). * * @remarks * ## [](#)Usage notes * You can call the `DescribeNetworkInterfaces` operation for paged query by specifying the `MaxResults` or `NextToken` parameter. Take note of the following items: * * During a paged query, when you call the DescribeNetworkInterfaces operation to retrieve the first page of results, set `MaxResults` to specify the maximum number of entries to return in the call. The return value of `NextToken` is a pagination token that can be used in the next call to retrieve a new page of results. * * When you call the DescribeNetworkInterfaces operation to retrieve a new page of results, set `NextToken` to the `NextToken` value returned in the previous call and set `MaxResults` to specify the maximum number of entries to return in this call. * * @param request - DescribeNetworkInterfacesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeNetworkInterfacesResponse */ async describeNetworkInterfacesWithOptions(request: $_model.DescribeNetworkInterfacesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeNetworkInterfacesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.ipv6Address)) { query["Ipv6Address"] = request.ipv6Address; } if (!$dara.isNull(request.maxResults)) { query["MaxResults"] = request.maxResults; } if (!$dara.isNull(request.networkInterfaceId)) { query["NetworkInterfaceId"] = request.networkInterfaceId; } if (!$dara.isNull(request.networkInterfaceName)) { query["NetworkInterfaceName"] = request.networkInterfaceName; } if (!$dara.isNull(request.nextToken)) { query["NextToken"] = request.nextToken; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.primaryIpAddress)) { query["PrimaryIpAddress"] = request.primaryIpAddress; } if (!$dara.isNull(request.privateIpAddress)) { query["PrivateIpAddress"] = request.privateIpAddress; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.securityGroupId)) { query["SecurityGroupId"] = request.securityGroupId; } if (!$dara.isNull(request.serviceManaged)) { query["ServiceManaged"] = request.serviceManaged; } if (!$dara.isNull(request.status)) { query["Status"] = request.status; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } if (!$dara.isNull(request.type)) { query["Type"] = request.type; } if (!$dara.isNull(request.vSwitchId)) { query["VSwitchId"] = request.vSwitchId; } if (!$dara.isNull(request.vpcId)) { query["VpcId"] = request.vpcId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeNetworkInterfaces", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeNetworkInterfacesResponse>(await this.callApi(params, req, runtime), new $_model.DescribeNetworkInterfacesResponse({})); } /** * Queries the details of one or more Elastic Network Interface (ENIs). * * @remarks * ## [](#)Usage notes * You can call the `DescribeNetworkInterfaces` operation for paged query by specifying the `MaxResults` or `NextToken` parameter. Take note of the following items: * * During a paged query, when you call the DescribeNetworkInterfaces operation to retrieve the first page of results, set `MaxResults` to specify the maximum number of entries to return in the call. The return value of `NextToken` is a pagination token that can be used in the next call to retrieve a new page of results. * * When you call the DescribeNetworkInterfaces operation to retrieve a new page of results, set `NextToken` to the `NextToken` value returned in the previous call and set `MaxResults` to specify the maximum number of entries to return in this call. * * @param request - DescribeNetworkInterfacesRequest * @returns DescribeNetworkInterfacesResponse */ async describeNetworkInterfaces(request: $_model.DescribeNetworkInterfacesRequest): Promise<$_model.DescribeNetworkInterfacesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeNetworkInterfacesWithOptions(request, runtime); } /** * DescribeNewProjectEipMonitorData * * @deprecated OpenAPI DescribeNewProjectEipMonitorData is deprecated, please use Vpc::2016-04-28::DescribeEipMonitorData instead. * * @param request - DescribeNewProjectEipMonitorDataRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeNewProjectEipMonitorDataResponse */ async describeNewProjectEipMonitorDataWithOptions(request: $_model.DescribeNewProjectEipMonitorDataRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeNewProjectEipMonitorDataResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.allocationId)) { query["AllocationId"] = request.allocationId; } if (!$dara.isNull(request.endTime)) { query["EndTime"] = request.endTime; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.period)) { query["Period"] = request.period; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.startTime)) { query["StartTime"] = request.startTime; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeNewProjectEipMonitorData", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeNewProjectEipMonitorDataResponse>(await this.callApi(params, req, runtime), new $_model.DescribeNewProjectEipMonitorDataResponse({})); } /** * DescribeNewProjectEipMonitorData * * @deprecated OpenAPI DescribeNewProjectEipMonitorData is deprecated, please use Vpc::2016-04-28::DescribeEipMonitorData instead. * * @param request - DescribeNewProjectEipMonitorDataRequest * @returns DescribeNewProjectEipMonitorDataResponse */ // Deprecated async describeNewProjectEipMonitorData(request: $_model.DescribeNewProjectEipMonitorDataRequest): Promise<$_model.DescribeNewProjectEipMonitorDataResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeNewProjectEipMonitorDataWithOptions(request, runtime); } /** * DescribePhysicalConnections * * @deprecated OpenAPI DescribePhysicalConnections is deprecated, please use Vpc::2016-04-28::DescribePhysicalConnections instead. * * @param request - DescribePhysicalConnectionsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribePhysicalConnectionsResponse */ async describePhysicalConnectionsWithOptions(request: $_model.DescribePhysicalConnectionsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribePhysicalConnectionsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.filter)) { query["Filter"] = request.filter; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.userCidr)) { query["UserCidr"] = request.userCidr; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribePhysicalConnections", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribePhysicalConnectionsResponse>(await this.callApi(params, req, runtime), new $_model.DescribePhysicalConnectionsResponse({})); } /** * DescribePhysicalConnections * * @deprecated OpenAPI DescribePhysicalConnections is deprecated, please use Vpc::2016-04-28::DescribePhysicalConnections instead. * * @param request - DescribePhysicalConnectionsRequest * @returns DescribePhysicalConnectionsResponse */ // Deprecated async describePhysicalConnections(request: $_model.DescribePhysicalConnectionsRequest): Promise<$_model.DescribePhysicalConnectionsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describePhysicalConnectionsWithOptions(request, runtime); } /** * 查询运维窗口 * * @param tmpReq - DescribePlanMaintenanceWindowsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribePlanMaintenanceWindowsResponse */ async describePlanMaintenanceWindowsWithOptions(tmpReq: $_model.DescribePlanMaintenanceWindowsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribePlanMaintenanceWindowsResponse> { tmpReq.validate(); let request = new $_model.DescribePlanMaintenanceWindowsShrinkRequest({ }); OpenApiUtil.convert(tmpReq, request); if (!$dara.isNull(tmpReq.targetResourceTags)) { request.targetResourceTagsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.targetResourceTags, "TargetResourceTags", "json"); } let query = { }; if (!$dara.isNull(request.enable)) { query["Enable"] = request.enable; } if (!$dara.isNull(request.maxResults)) { query["MaxResults"] = request.maxResults; } if (!$dara.isNull(request.nextToken)) { query["NextToken"] = request.nextToken; } if (!$dara.isNull(request.planWindowId)) { query["PlanWindowId"] = request.planWindowId; } if (!$dara.isNull(request.planWindowName)) { query["PlanWindowName"] = request.planWindowName; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.targetResourceGroupId)) { query["TargetResourceGroupId"] = request.targetResourceGroupId; } if (!$dara.isNull(request.targetResourceTagsShrink)) { query["TargetResourceTags"] = request.targetResourceTagsShrink; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribePlanMaintenanceWindows", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribePlanMaintenanceWindowsResponse>(await this.callApi(params, req, runtime), new $_model.DescribePlanMaintenanceWindowsResponse({})); } /** * 查询运维窗口 * * @param request - DescribePlanMaintenanceWindowsRequest * @returns DescribePlanMaintenanceWindowsResponse */ async describePlanMaintenanceWindows(request: $_model.DescribePlanMaintenanceWindowsRequest): Promise<$_model.DescribePlanMaintenanceWindowsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describePlanMaintenanceWindowsWithOptions(request, runtime); } /** * Queries the resources that are associated with a port list, such as security groups. * * @param request - DescribePortRangeListAssociationsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribePortRangeListAssociationsResponse */ async describePortRangeListAssociationsWithOptions(request: $_model.DescribePortRangeListAssociationsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribePortRangeListAssociationsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.maxResults)) { query["MaxResults"] = request.maxResults; } if (!$dara.isNull(request.nextToken)) { query["NextToken"] = request.nextToken; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.portRangeListId)) { query["PortRangeListId"] = request.portRangeListId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribePortRangeListAssociations", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribePortRangeListAssociationsResponse>(await this.callApi(params, req, runtime), new $_model.DescribePortRangeListAssociationsResponse({})); } /** * Queries the resources that are associated with a port list, such as security groups. * * @param request - DescribePortRangeListAssociationsRequest * @returns DescribePortRangeListAssociationsResponse */ async describePortRangeListAssociations(request: $_model.DescribePortRangeListAssociationsRequest): Promise<$_model.DescribePortRangeListAssociationsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describePortRangeListAssociationsWithOptions(request, runtime); } /** * Queries the entries of a specified port list. * * @param request - DescribePortRangeListEntriesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribePortRangeListEntriesResponse */ async describePortRangeListEntriesWithOptions(request: $_model.DescribePortRangeListEntriesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribePortRangeListEntriesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.portRangeListId)) { query["PortRangeListId"] = request.portRangeListId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribePortRangeListEntries", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribePortRangeListEntriesResponse>(await this.callApi(params, req, runtime), new $_model.DescribePortRangeListEntriesResponse({})); } /** * Queries the entries of a specified port list. * * @param request - DescribePortRangeListEntriesRequest * @returns DescribePortRangeListEntriesResponse */ async describePortRangeListEntries(request: $_model.DescribePortRangeListEntriesRequest): Promise<$_model.DescribePortRangeListEntriesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describePortRangeListEntriesWithOptions(request, runtime); } /** * Queries the port lists. * * @param request - DescribePortRangeListsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribePortRangeListsResponse */ async describePortRangeListsWithOptions(request: $_model.DescribePortRangeListsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribePortRangeListsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.maxResults)) { query["MaxResults"] = request.maxResults; } if (!$dara.isNull(request.nextToken)) { query["NextToken"] = request.nextToken; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.portRangeListId)) { query["PortRangeListId"] = request.portRangeListId; } if (!$dara.isNull(request.portRangeListName)) { query["PortRangeListName"] = request.portRangeListName; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribePortRangeLists", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribePortRangeListsResponse>(await this.callApi(params, req, runtime), new $_model.DescribePortRangeListsResponse({})); } /** * Queries the port lists. * * @param request - DescribePortRangeListsRequest * @returns DescribePortRangeListsResponse */ async describePortRangeLists(request: $_model.DescribePortRangeListsRequest): Promise<$_model.DescribePortRangeListsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describePortRangeListsWithOptions(request, runtime); } /** * Queries information about resources that are associated with a prefix list, such as the resource IDs and types. * * @param request - DescribePrefixListAssociationsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribePrefixListAssociationsResponse */ async describePrefixListAssociationsWithOptions(request: $_model.DescribePrefixListAssociationsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribePrefixListAssociationsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.maxResults)) { query["MaxResults"] = request.maxResults; } if (!$dara.isNull(request.nextToken)) { query["NextToken"] = request.nextToken; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.prefixListId)) { query["PrefixListId"] = request.prefixListId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribePrefixListAssociations", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribePrefixListAssociationsResponse>(await this.callApi(params, req, runtime), new $_model.DescribePrefixListAssociationsResponse({})); } /** * Queries information about resources that are associated with a prefix list, such as the resource IDs and types. * * @param request - DescribePrefixListAssociationsRequest * @returns DescribePrefixListAssociationsResponse */ async describePrefixListAssociations(request: $_model.DescribePrefixListAssociationsRequest): Promise<$_model.DescribePrefixListAssociationsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describePrefixListAssociationsWithOptions(request, runtime); } /** * Queries the details of a prefix list, including the name, address family, maximum number of entries, and details of the entries. * * @param request - DescribePrefixListAttributesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribePrefixListAttributesResponse */ async describePrefixListAttributesWithOptions(request: $_model.DescribePrefixListAttributesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribePrefixListAttributesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.prefixListId)) { query["PrefixListId"] = request.prefixListId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribePrefixListAttributes", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribePrefixListAttributesResponse>(await this.callApi(params, req, runtime), new $_model.DescribePrefixListAttributesResponse({})); } /** * Queries the details of a prefix list, including the name, address family, maximum number of entries, and details of the entries. * * @param request - DescribePrefixListAttributesRequest * @returns DescribePrefixListAttributesResponse */ async describePrefixListAttributes(request: $_model.DescribePrefixListAttributesRequest): Promise<$_model.DescribePrefixListAttributesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describePrefixListAttributesWithOptions(request, runtime); } /** * Queries the information of prefix lists. * * @remarks * You can specify the `AddressFamily`, `PrefixListId.N`, and `PrefixListName` request parameters in the request. Specified parameters have logical AND relations. Only the parameters that you set are included in the filter conditions. * * @param request - DescribePrefixListsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribePrefixListsResponse */ async describePrefixListsWithOptions(request: $_model.DescribePrefixListsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribePrefixListsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.addressFamily)) { query["AddressFamily"] = request.addressFamily; } if (!$dara.isNull(request.maxResults)) { query["MaxResults"] = request.maxResults; } if (!$dara.isNull(request.nextToken)) { query["NextToken"] = request.nextToken; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.prefixListId)) { query["PrefixListId"] = request.prefixListId; } if (!$dara.isNull(request.prefixListName)) { query["PrefixListName"] = request.prefixListName; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribePrefixLists", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribePrefixListsResponse>(await this.callApi(params, req, runtime), new $_model.DescribePrefixListsResponse({})); } /** * Queries the information of prefix lists. * * @remarks * You can specify the `AddressFamily`, `PrefixListId.N`, and `PrefixListName` request parameters in the request. Specified parameters have logical AND relations. Only the parameters that you set are included in the filter conditions. * * @param request - DescribePrefixListsRequest * @returns DescribePrefixListsResponse */ async describePrefixLists(request: $_model.DescribePrefixListsRequest): Promise<$_model.DescribePrefixListsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describePrefixListsWithOptions(request, runtime); } /** * Queries the most recent prices of specified resources. You can specify a resource type in the request, such as the Elastic Compute Service (ECS) instance, cloud disk, dedicated host, elasticity assurance, and capacity reservation. You can also query the activity rules, prices, and discounts of resources. * * @remarks * The required parameters vary based on the type of resource whose prices you want to query. * * When `ResourceType` is set to instance, you must specify `InstanceType`. By default, `ChargeType` is set to `PostPaid`. You can specify `PriceUnit` to query the ECS resource prices in different billing cycles. * * When `ResourceType` is set to disk, you must specify `DataDisk.1.Category` and `DataDisk.1.Size` in the same request. When `ResourceType` is set to disk, only pay-as-you-go prices of cloud disks are returned. In this scenario, `PriceUnit` can be set only to `Hour`. * * When `ResourceType` is set to diskperformance, you must specify `DataDisk.1.Category` and `DataDisk.1.ProvisionedIops`. * * When `ResourceType` is set to ddh, you must specify `DedicatedHostType`. * * When `ResourceType` is set to ElasticityAssurance, you must specify `InstanceType`. * * When `ResourceType` is set to CapacityReservation, you must specify `InstanceType`. * * When `ResourceType` is set to bandwidth, only the pay-by-traffic (`PayByTraffic`) prices for network usage are returned. * * @param request - DescribePriceRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribePriceResponse */ async describePriceWithOptions(request: $_model.DescribePriceRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribePriceResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.amount)) { query["Amount"] = request.amount; } if (!$dara.isNull(request.assuranceTimes)) { query["AssuranceTimes"] = request.assuranceTimes; } if (!$dara.isNull(request.capacity)) { query["Capacity"] = request.capacity; } if (!$dara.isNull(request.dedicatedHostType)) { query["DedicatedHostType"] = request.dedicatedHostType; } if (!$dara.isNull(request.imageId)) { query["ImageId"] = request.imageId; } if (!$dara.isNull(request.instanceAmount)) { query["InstanceAmount"] = request.instanceAmount; } if (!$dara.isNull(request.instanceCpuCoreCount)) { query["InstanceCpuCoreCount"] = request.instanceCpuCoreCount; } if (!$dara.isNull(request.instanceNetworkType)) { query["InstanceNetworkType"] = request.instanceNetworkType; } if (!$dara.isNull(request.instanceType)) { query["InstanceType"] = request.instanceType; } if (!$dara.isNull(request.instanceTypeList)) { query["InstanceTypeList"] = request.instanceTypeList; } if (!$dara.isNull(request.internetChargeType)) { query["InternetChargeType"] = request.internetChargeType; } if (!$dara.isNull(request.internetMaxBandwidthOut)) { query["InternetMaxBandwidthOut"] = request.internetMaxBandwidthOut; } if (!$dara.isNull(request.ioOptimized)) { query["IoOptimized"] = request.ioOptimized; } if (!$dara.isNull(request.isp)) { query["Isp"] = request.isp; } if (!$dara.isNull(request.offeringType)) { query["OfferingType"] = request.offeringType; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.period)) { query["Period"] = request.period; } if (!$dara.isNull(request.platform)) { query["Platform"] = request.platform; } if (!$dara.isNull(request.priceUnit)) { query["PriceUnit"] = request.priceUnit; } if (!$dara.isNull(request.recurrenceRules)) { query["RecurrenceRules"] = request.recurrenceRules; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.resourceType)) { query["ResourceType"] = request.resourceType; } if (!$dara.isNull(request.scope)) { query["Scope"] = request.scope; } if (!$dara.isNull(request.spotDuration)) { query["SpotDuration"] = request.spotDuration; } if (!$dara.isNull(request.spotStrategy)) { query["SpotStrategy"] = request.spotStrategy; } if (!$dara.isNull(request.startTime)) { query["StartTime"] = request.startTime; } if (!$dara.isNull(request.zoneId)) { query["ZoneId"] = request.zoneId; } if (!$dara.isNull(request.dataDisk)) { query["DataDisk"] = request.dataDisk; } if (!$dara.isNull(request.schedulerOptions)) { query["SchedulerOptions"] = request.schedulerOptions; } if (!$dara.isNull(request.systemDisk)) { query["SystemDisk"] = request.systemDisk; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribePrice", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribePriceResponse>(await this.callApi(params, req, runtime), new $_model.DescribePriceResponse({})); } /** * Queries the most recent prices of specified resources. You can specify a resource type in the request, such as the Elastic Compute Service (ECS) instance, cloud disk, dedicated host, elasticity assurance, and capacity reservation. You can also query the activity rules, prices, and discounts of resources. * * @remarks * The required parameters vary based on the type of resource whose prices you want to query. * * When `ResourceType` is set to instance, you must specify `InstanceType`. By default, `ChargeType` is set to `PostPaid`. You can specify `PriceUnit` to query the ECS resource prices in different billing cycles. * * When `ResourceType` is set to disk, you must specify `DataDisk.1.Category` and `DataDisk.1.Size` in the same request. When `ResourceType` is set to disk, only pay-as-you-go prices of cloud disks are returned. In this scenario, `PriceUnit` can be set only to `Hour`. * * When `ResourceType` is set to diskperformance, you must specify `DataDisk.1.Category` and `DataDisk.1.ProvisionedIops`. * * When `ResourceType` is set to ddh, you must specify `DedicatedHostType`. * * When `ResourceType` is set to ElasticityAssurance, you must specify `InstanceType`. * * When `ResourceType` is set to CapacityReservation, you must specify `InstanceType`. * * When `ResourceType` is set to bandwidth, only the pay-by-traffic (`PayByTraffic`) prices for network usage are returned. * * @param request - DescribePriceRequest * @returns DescribePriceResponse */ async describePrice(request: $_model.DescribePriceRequest): Promise<$_model.DescribePriceResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describePriceWithOptions(request, runtime); } /** * Queries alternative instance types of an instance type. This operation is in internal preview. This operation lists all alternative instance types of an instance type that has been or is planed to be retired. * * @param request - DescribeRecommendInstanceTypeRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeRecommendInstanceTypeResponse */ async describeRecommendInstanceTypeWithOptions(request: $_model.DescribeRecommendInstanceTypeRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeRecommendInstanceTypeResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.cores)) { query["Cores"] = request.cores; } if (!$dara.isNull(request.instanceChargeType)) { query["InstanceChargeType"] = request.instanceChargeType; } if (!$dara.isNull(request.instanceFamilyLevel)) { query["InstanceFamilyLevel"] = request.instanceFamilyLevel; } if (!$dara.isNull(request.instanceType)) { query["InstanceType"] = request.instanceType; } if (!$dara.isNull(request.instanceTypeFamily)) { query["InstanceTypeFamily"] = request.instanceTypeFamily; } if (!$dara.isNull(request.ioOptimized)) { query["IoOptimized"] = request.ioOptimized; } if (!$dara.isNull(request.maxPrice)) { query["MaxPrice"] = request.maxPrice; } if (!$dara.isNull(request.memory)) { query["Memory"] = request.memory; } if (!$dara.isNull(request.networkType)) { query["NetworkType"] = request.networkType; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.priorityStrategy)) { query["PriorityStrategy"] = request.priorityStrategy; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.scene)) { query["Scene"] = request.scene; } if (!$dara.isNull(request.spotStrategy)) { query["SpotStrategy"] = request.spotStrategy; } if (!$dara.isNull(request.systemDiskCategory)) { query["SystemDiskCategory"] = request.systemDiskCategory; } if (!$dara.isNull(request.zoneId)) { query["ZoneId"] = request.zoneId; } if (!$dara.isNull(request.zoneMatchMode)) { query["ZoneMatchMode"] = request.zoneMatchMode; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeRecommendInstanceType", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeRecommendInstanceTypeResponse>(await this.callApi(params, req, runtime), new $_model.DescribeRecommendInstanceTypeResponse({})); } /** * Queries alternative instance types of an instance type. This operation is in internal preview. This operation lists all alternative instance types of an instance type that has been or is planed to be retired. * * @param request - DescribeRecommendInstanceTypeRequest * @returns DescribeRecommendInstanceTypeResponse */ async describeRecommendInstanceType(request: $_model.DescribeRecommendInstanceTypeRequest): Promise<$_model.DescribeRecommendInstanceTypeResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeRecommendInstanceTypeWithOptions(request, runtime); } /** * Queries Alibaba Cloud regions. When you call this operation, you can specify parameters, such as InstanceChargeType and ResourceType, in the request. * * @param request - DescribeRegionsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeRegionsResponse */ async describeRegionsWithOptions(request: $_model.DescribeRegionsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeRegionsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.acceptLanguage)) { query["AcceptLanguage"] = request.acceptLanguage; } if (!$dara.isNull(request.instanceChargeType)) { query["InstanceChargeType"] = request.instanceChargeType; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.resourceType)) { query["ResourceType"] = request.resourceType; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeRegions", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeRegionsResponse>(await this.callApi(params, req, runtime), new $_model.DescribeRegionsResponse({})); } /** * Queries Alibaba Cloud regions. When you call this operation, you can specify parameters, such as InstanceChargeType and ResourceType, in the request. * * @param request - DescribeRegionsRequest * @returns DescribeRegionsResponse */ async describeRegions(request: $_model.DescribeRegionsRequest): Promise<$_model.DescribeRegionsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeRegionsWithOptions(request, runtime); } /** * Queries the renewal prices of Elastic Compute Service (ECS) resources. Renewal prices of only subscription resources can be queried. * * @remarks * You can call this operation to query the price for renewing a subscription instance for a specific period of time or to a synchronized expiration date. * * Take note of the following items: * * If you specify only the required parameters, the price for renewing an instance for one month is queried by default. * * The renewal period-related parameter pair (`Period` and `PeriodUnit`) and the synchronized expiration date-related parameter (`ExpectedRenewDay`) are mutually exclusive. You cannot set these parameters together to query the prices for renewing a specified instance for a period of time and to a synchronized expiration date at the same time. * * @param request - DescribeRenewalPriceRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeRenewalPriceResponse */ async describeRenewalPriceWithOptions(request: $_model.DescribeRenewalPriceRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeRenewalPriceResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.expectedRenewDay)) { query["ExpectedRenewDay"] = request.expectedRenewDay; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.period)) { query["Period"] = request.period; } if (!$dara.isNull(request.priceUnit)) { query["PriceUnit"] = request.priceUnit; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceId)) { query["ResourceId"] = request.resourceId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.resourceType)) { query["ResourceType"] = request.resourceType; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeRenewalPrice", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeRenewalPriceResponse>(await this.callApi(params, req, runtime), new $_model.DescribeRenewalPriceResponse({})); } /** * Queries the renewal prices of Elastic Compute Service (ECS) resources. Renewal prices of only subscription resources can be queried. * * @remarks * You can call this operation to query the price for renewing a subscription instance for a specific period of time or to a synchronized expiration date. * * Take note of the following items: * * If you specify only the required parameters, the price for renewing an instance for one month is queried by default. * * The renewal period-related parameter pair (`Period` and `PeriodUnit`) and the synchronized expiration date-related parameter (`ExpectedRenewDay`) are mutually exclusive. You cannot set these parameters together to query the prices for renewing a specified instance for a period of time and to a synchronized expiration date at the same time. * * @param request - DescribeRenewalPriceRequest * @returns DescribeRenewalPriceResponse */ async describeRenewalPrice(request: $_model.DescribeRenewalPriceRequest): Promise<$_model.DescribeRenewalPriceResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeRenewalPriceWithOptions(request, runtime); } /** * Queries the auto-renewal attributes of one or more reserved instances, including the auto-renewal duration and auto-renewal status. * * @param request - DescribeReservedInstanceAutoRenewAttributeRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeReservedInstanceAutoRenewAttributeResponse */ async describeReservedInstanceAutoRenewAttributeWithOptions(request: $_model.DescribeReservedInstanceAutoRenewAttributeRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeReservedInstanceAutoRenewAttributeResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.reservedInstanceId)) { query["ReservedInstanceId"] = request.reservedInstanceId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeReservedInstanceAutoRenewAttribute", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeReservedInstanceAutoRenewAttributeResponse>(await this.callApi(params, req, runtime), new $_model.DescribeReservedInstanceAutoRenewAttributeResponse({})); } /** * Queries the auto-renewal attributes of one or more reserved instances, including the auto-renewal duration and auto-renewal status. * * @param request - DescribeReservedInstanceAutoRenewAttributeRequest * @returns DescribeReservedInstanceAutoRenewAttributeResponse */ async describeReservedInstanceAutoRenewAttribute(request: $_model.DescribeReservedInstanceAutoRenewAttributeRequest): Promise<$_model.DescribeReservedInstanceAutoRenewAttributeResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeReservedInstanceAutoRenewAttributeWithOptions(request, runtime); } /** * Queries the details of reserved instances that you have purchased in a specific region. You can query the details of reserved instances based on parameters, such as tags and reserved instance attributes. * * @remarks * ### [](#)Scenarios * * Query all reserved instances in a specific region. * * Query the details of a reserved instance based on the ID or name. * * Query your purchased reserved instances based on the instance type or instance family. * * Query your purchased reserved instances based on the scope or status of reserved instances. * ### [](#)Sample requests * **Example: Query all purchased reserved instances in the China (Hangzhou) region** * "RegionId":"cn-hangzhou", //The ID of the region. * **Example: Query the details of the reserved instance whose ID is ecsri-bp129enntoynwwj5\\*\\*\\*\\* in the China (Hangzhou) region** * "RegionId":"cn-hangzhou", //The ID of the region."ReservedInstanceId":"ecsri-bp129enntoynwwj5****" //The ID of the reserved instance. * **Example: Query the reserved instances that can be used to offset the bills of ecs.c5.2xlarge instances in the China (Hangzhou) region** * "RegionId":"cn-hangzhou", //The ID of the region."InstanceType":"ecs.c5.2xlarge", //The instance type. * **Example: Query the regional reserved instances that are within the validity period in the China (Hangzhou) region** * "RegionId":"cn-hangzhou", //The ID of the region."Scope":"Region", //Set the scope of the reserved instance to regional."Status":["Active"] //Set the status to Active, which indicates that the reserved instance is within the validity period. * * @param request - DescribeReservedInstancesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeReservedInstancesResponse */ async describeReservedInstancesWithOptions(request: $_model.DescribeReservedInstancesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeReservedInstancesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.allocationType)) { query["AllocationType"] = request.allocationType; } if (!$dara.isNull(request.instanceType)) { query["InstanceType"] = request.instanceType; } if (!$dara.isNull(request.instanceTypeFamily)) { query["InstanceTypeFamily"] = request.instanceTypeFamily; } if (!$dara.isNull(request.lockReason)) { query["LockReason"] = request.lockReason; } if (!$dara.isNull(request.offeringType)) { query["OfferingType"] = request.offeringType; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.reservedInstanceId)) { query["ReservedInstanceId"] = request.reservedInstanceId; } if (!$dara.isNull(request.reservedInstanceName)) { query["ReservedInstanceName"] = request.reservedInstanceName; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.scope)) { query["Scope"] = request.scope; } if (!$dara.isNull(request.status)) { query["Status"] = request.status; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } if (!$dara.isNull(request.zoneId)) { query["ZoneId"] = request.zoneId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeReservedInstances", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeReservedInstancesResponse>(await this.callApi(params, req, runtime), new $_model.DescribeReservedInstancesResponse({})); } /** * Queries the details of reserved instances that you have purchased in a specific region. You can query the details of reserved instances based on parameters, such as tags and reserved instance attributes. * * @remarks * ### [](#)Scenarios * * Query all reserved instances in a specific region. * * Query the details of a reserved instance based on the ID or name. * * Query your purchased reserved instances based on the instance type or instance family. * * Query your purchased reserved instances based on the scope or status of reserved instances. * ### [](#)Sample requests * **Example: Query all purchased reserved instances in the China (Hangzhou) region** * "RegionId":"cn-hangzhou", //The ID of the region. * **Example: Query the details of the reserved instance whose ID is ecsri-bp129enntoynwwj5\\*\\*\\*\\* in the China (Hangzhou) region** * "RegionId":"cn-hangzhou", //The ID of the region."ReservedInstanceId":"ecsri-bp129enntoynwwj5****" //The ID of the reserved instance. * **Example: Query the reserved instances that can be used to offset the bills of ecs.c5.2xlarge instances in the China (Hangzhou) region** * "RegionId":"cn-hangzhou", //The ID of the region."InstanceType":"ecs.c5.2xlarge", //The instance type. * **Example: Query the regional reserved instances that are within the validity period in the China (Hangzhou) region** * "RegionId":"cn-hangzhou", //The ID of the region."Scope":"Region", //Set the scope of the reserved instance to regional."Status":["Active"] //Set the status to Active, which indicates that the reserved instance is within the validity period. * * @param request - DescribeReservedInstancesRequest * @returns DescribeReservedInstancesResponse */ async describeReservedInstances(request: $_model.DescribeReservedInstancesRequest): Promise<$_model.DescribeReservedInstancesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeReservedInstancesWithOptions(request, runtime); } /** * Queries resources by tag or resource type. * * @deprecated OpenAPI DescribeResourceByTags is deprecated, please use Tag::2018-08-28::ListResourcesByTag instead. * * @param request - DescribeResourceByTagsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeResourceByTagsResponse */ async describeResourceByTagsWithOptions(request: $_model.DescribeResourceByTagsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeResourceByTagsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.resourceType)) { query["ResourceType"] = request.resourceType; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeResourceByTags", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeResourceByTagsResponse>(await this.callApi(params, req, runtime), new $_model.DescribeResourceByTagsResponse({})); } /** * Queries resources by tag or resource type. * * @deprecated OpenAPI DescribeResourceByTags is deprecated, please use Tag::2018-08-28::ListResourcesByTag instead. * * @param request - DescribeResourceByTagsRequest * @returns DescribeResourceByTagsResponse */ // Deprecated async describeResourceByTags(request: $_model.DescribeResourceByTagsRequest): Promise<$_model.DescribeResourceByTagsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeResourceByTagsWithOptions(request, runtime); } /** * Queries available instance types or system disk categories in a specific zone before you change the instance type or system disk category of an Elastic Compute Service (ECS) instance. * * @remarks * Examples of common scenarios in which this operation is used: * ### [](#-1)Example 1: Query the instance types to which you can change the instance type of an instance. * Query the instance types to which you can change the instance type of the i-bp67acfmxazb4p\\*\\*\\*\\* instance and the inventory of the queried instance types in the zone in which the instance resides. * http(s)://ecs.aliyuncs.com/?Action=DescribeResourcesModification * &RegionId=cn-hangzhou * &ResourceId=i-bp67acfmxazb4p**** * &DestinationResource=InstanceType * &OperationType=Upgrade * & * ### [](#-2)Example 2: Query the instance types to which you can change the instance type of an instance after a system disk category change. * Query the instance types to which you can change the instance type of the i-bp67acfmxazb4p\\*\\*\\*\\* instance after a system disk category change and the inventory of the queried instance types in the zone in which the instance resides. * http(s)://ecs.aliyuncs.com/?Action=DescribeResourcesModification * &RegionId=cn-hangzhou * &ResourceId=i-bp67acfmxazb4p**** * &DestinationResource=InstanceType * &OperationType=Upgrade * &Conditions.0=DiskCategory * & * ### [](#-3)Example 3: Query the system disk categories supported by the instance type to which you want to change the instance type of an instance. * Query the system disk categories supported by the instance type to which you want to change the instance type of the i-bp67acfmxazb4p\\*\\*\\*\\* instance and the inventory of the disk categories in the zone in which the instance resides. In this example, the ecs.g7.large instance type is used. To change to the instance type, you must change the system disk category of the instance to a category supported by the instance type. * > You can call this operation as described in Example 2 to query the instance types to which you can change the instance type of an instance. * http(s)://ecs.aliyuncs.com/?Action=DescribeResourcesModification * &RegionId=cn-hangzhou * &ResourceId=i-bp67acfmxazb4p**** * &DestinationResource=SystemDisk * &OperationType=Upgrade * &InstanceType=ecs.g7.large * & * * @param request - DescribeResourcesModificationRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeResourcesModificationResponse */ async describeResourcesModificationWithOptions(request: $_model.DescribeResourcesModificationRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeResourcesModificationResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.conditions)) { query["Conditions"] = request.conditions; } if (!$dara.isNull(request.cores)) { query["Cores"] = request.cores; } if (!$dara.isNull(request.destinationResource)) { query["DestinationResource"] = request.destinationResource; } if (!$dara.isNull(request.instanceType)) { query["InstanceType"] = request.instanceType; } if (!$dara.isNull(request.memory)) { query["Memory"] = request.memory; } if (!$dara.isNull(request.migrateAcrossZone)) { query["MigrateAcrossZone"] = request.migrateAcrossZone; } if (!$dara.isNull(request.operationType)) { query["OperationType"] = request.operationType; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceId)) { query["ResourceId"] = request.resourceId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.zoneId)) { query["ZoneId"] = request.zoneId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeResourcesModification", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeResourcesModificationResponse>(await this.callApi(params, req, runtime), new $_model.DescribeResourcesModificationResponse({})); } /** * Queries available instance types or system disk categories in a specific zone before you change the instance type or system disk category of an Elastic Compute Service (ECS) instance. * * @remarks * Examples of common scenarios in which this operation is used: * ### [](#-1)Example 1: Query the instance types to which you can change the instance type of an instance. * Query the instance types to which you can change the instance type of the i-bp67acfmxazb4p\\*\\*\\*\\* instance and the inventory of the queried instance types in the zone in which the instance resides. * http(s)://ecs.aliyuncs.com/?Action=DescribeResourcesModification * &RegionId=cn-hangzhou * &ResourceId=i-bp67acfmxazb4p**** * &DestinationResource=InstanceType * &OperationType=Upgrade * & * ### [](#-2)Example 2: Query the instance types to which you can change the instance type of an instance after a system disk category change. * Query the instance types to which you can change the instance type of the i-bp67acfmxazb4p\\*\\*\\*\\* instance after a system disk category change and the inventory of the queried instance types in the zone in which the instance resides. * http(s)://ecs.aliyuncs.com/?Action=DescribeResourcesModification * &RegionId=cn-hangzhou * &ResourceId=i-bp67acfmxazb4p**** * &DestinationResource=InstanceType * &OperationType=Upgrade * &Conditions.0=DiskCategory * & * ### [](#-3)Example 3: Query the system disk categories supported by the instance type to which you want to change the instance type of an instance. * Query the system disk categories supported by the instance type to which you want to change the instance type of the i-bp67acfmxazb4p\\*\\*\\*\\* instance and the inventory of the disk categories in the zone in which the instance resides. In this example, the ecs.g7.large instance type is used. To change to the instance type, you must change the system disk category of the instance to a category supported by the instance type. * > You can call this operation as described in Example 2 to query the instance types to which you can change the instance type of an instance. * http(s)://ecs.aliyuncs.com/?Action=DescribeResourcesModification * &RegionId=cn-hangzhou * &ResourceId=i-bp67acfmxazb4p**** * &DestinationResource=SystemDisk * &OperationType=Upgrade * &InstanceType=ecs.g7.large * & * * @param request - DescribeResourcesModificationRequest * @returns DescribeResourcesModificationResponse */ async describeResourcesModification(request: $_model.DescribeResourcesModificationRequest): Promise<$_model.DescribeResourcesModificationResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeResourcesModificationWithOptions(request, runtime); } /** * 查询路由表信息列表 * * @deprecated OpenAPI DescribeRouteTables is deprecated, please use Vpc::2016-04-28::DescribeRouteTableList instead. * * @param request - DescribeRouteTablesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeRouteTablesResponse */ async describeRouteTablesWithOptions(request: $_model.DescribeRouteTablesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeRouteTablesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.routeTableId)) { query["RouteTableId"] = request.routeTableId; } if (!$dara.isNull(request.routeTableName)) { query["RouteTableName"] = request.routeTableName; } if (!$dara.isNull(request.routerId)) { query["RouterId"] = request.routerId; } if (!$dara.isNull(request.routerType)) { query["RouterType"] = request.routerType; } if (!$dara.isNull(request.VRouterId)) { query["VRouterId"] = request.VRouterId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeRouteTables", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeRouteTablesResponse>(await this.callApi(params, req, runtime), new $_model.DescribeRouteTablesResponse({})); } /** * 查询路由表信息列表 * * @deprecated OpenAPI DescribeRouteTables is deprecated, please use Vpc::2016-04-28::DescribeRouteTableList instead. * * @param request - DescribeRouteTablesRequest * @returns DescribeRouteTablesResponse */ // Deprecated async describeRouteTables(request: $_model.DescribeRouteTablesRequest): Promise<$_model.DescribeRouteTablesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeRouteTablesWithOptions(request, runtime); } /** * DescribeRouterInterfaces * * @deprecated OpenAPI DescribeRouterInterfaces is deprecated, please use Vpc::2016-04-28::DescribeRouterInterfaces instead. * * @param request - DescribeRouterInterfacesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeRouterInterfacesResponse */ async describeRouterInterfacesWithOptions(request: $_model.DescribeRouterInterfacesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeRouterInterfacesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.filter)) { query["Filter"] = request.filter; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeRouterInterfaces", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeRouterInterfacesResponse>(await this.callApi(params, req, runtime), new $_model.DescribeRouterInterfacesResponse({})); } /** * DescribeRouterInterfaces * * @deprecated OpenAPI DescribeRouterInterfaces is deprecated, please use Vpc::2016-04-28::DescribeRouterInterfaces instead. * * @param request - DescribeRouterInterfacesRequest * @returns DescribeRouterInterfacesResponse */ // Deprecated async describeRouterInterfaces(request: $_model.DescribeRouterInterfacesRequest): Promise<$_model.DescribeRouterInterfacesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeRouterInterfacesWithOptions(request, runtime); } /** * 节省计划测算 * * @param request - DescribeSavingsPlanEstimationRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeSavingsPlanEstimationResponse */ async describeSavingsPlanEstimationWithOptions(request: $_model.DescribeSavingsPlanEstimationRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeSavingsPlanEstimationResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.estimationResource)) { query["EstimationResource"] = request.estimationResource; } if (!$dara.isNull(request.instanceTypeScope)) { query["InstanceTypeScope"] = request.instanceTypeScope; } if (!$dara.isNull(request.offeringType)) { query["OfferingType"] = request.offeringType; } if (!$dara.isNull(request.period)) { query["Period"] = request.period; } if (!$dara.isNull(request.periodUnit)) { query["PeriodUnit"] = request.periodUnit; } if (!$dara.isNull(request.planType)) { query["PlanType"] = request.planType; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceId)) { query["ResourceId"] = request.resourceId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeSavingsPlanEstimation", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeSavingsPlanEstimationResponse>(await this.callApi(params, req, runtime), new $_model.DescribeSavingsPlanEstimationResponse({})); } /** * 节省计划测算 * * @param request - DescribeSavingsPlanEstimationRequest * @returns DescribeSavingsPlanEstimationResponse */ async describeSavingsPlanEstimation(request: $_model.DescribeSavingsPlanEstimationRequest): Promise<$_model.DescribeSavingsPlanEstimationResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeSavingsPlanEstimationWithOptions(request, runtime); } /** * 询价购买节省计划并预付费换购按量付费 * * @param request - DescribeSavingsPlanPriceRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeSavingsPlanPriceResponse */ async describeSavingsPlanPriceWithOptions(request: $_model.DescribeSavingsPlanPriceRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeSavingsPlanPriceResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.committedAmount)) { query["CommittedAmount"] = request.committedAmount; } if (!$dara.isNull(request.instanceTypeFamily)) { query["InstanceTypeFamily"] = request.instanceTypeFamily; } if (!$dara.isNull(request.instanceTypeFamilyGroup)) { query["InstanceTypeFamilyGroup"] = request.instanceTypeFamilyGroup; } if (!$dara.isNull(request.offeringType)) { query["OfferingType"] = request.offeringType; } if (!$dara.isNull(request.period)) { query["Period"] = request.period; } if (!$dara.isNull(request.periodUnit)) { query["PeriodUnit"] = request.periodUnit; } if (!$dara.isNull(request.planType)) { query["PlanType"] = request.planType; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceId)) { query["ResourceId"] = request.resourceId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeSavingsPlanPrice", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeSavingsPlanPriceResponse>(await this.callApi(params, req, runtime), new $_model.DescribeSavingsPlanPriceResponse({})); } /** * 询价购买节省计划并预付费换购按量付费 * * @param request - DescribeSavingsPlanPriceRequest * @returns DescribeSavingsPlanPriceResponse */ async describeSavingsPlanPrice(request: $_model.DescribeSavingsPlanPriceRequest): Promise<$_model.DescribeSavingsPlanPriceResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeSavingsPlanPriceWithOptions(request, runtime); } /** * Queries the details of a specified security group and the security group rules of the security group. * * @param request - DescribeSecurityGroupAttributeRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeSecurityGroupAttributeResponse */ async describeSecurityGroupAttributeWithOptions(request: $_model.DescribeSecurityGroupAttributeRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeSecurityGroupAttributeResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.attribute)) { query["Attribute"] = request.attribute; } if (!$dara.isNull(request.direction)) { query["Direction"] = request.direction; } if (!$dara.isNull(request.maxResults)) { query["MaxResults"] = request.maxResults; } if (!$dara.isNull(request.nextToken)) { query["NextToken"] = request.nextToken; } if (!$dara.isNull(request.nicType)) { query["NicType"] = request.nicType; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.securityGroupId)) { query["SecurityGroupId"] = request.securityGroupId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeSecurityGroupAttribute", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeSecurityGroupAttributeResponse>(await this.callApi(params, req, runtime), new $_model.DescribeSecurityGroupAttributeResponse({})); } /** * Queries the details of a specified security group and the security group rules of the security group. * * @param request - DescribeSecurityGroupAttributeRequest * @returns DescribeSecurityGroupAttributeResponse */ async describeSecurityGroupAttribute(request: $_model.DescribeSecurityGroupAttributeRequest): Promise<$_model.DescribeSecurityGroupAttributeResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeSecurityGroupAttributeWithOptions(request, runtime); } /** * Queries the security groups whose rules reference security groups as authorization objects. * * @remarks * If you cannot delete a security group by calling the [DeleteSecurityGroup](https://help.aliyun.com/document_detail/25558.html) operation, call the DescribeSecurityGroupReferences operation to check whether the security group is referenced by the rules of other security groups. If the security group is referenced by the rules of other security groups, you must call the [RevokeSecurityGroup](https://help.aliyun.com/document_detail/2679855.html) and [RevokeSecurityGroupEgress](https://help.aliyun.com/document_detail/2679856.html) operations to remove the references before you can delete the security group. * * @param request - DescribeSecurityGroupReferencesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeSecurityGroupReferencesResponse */ async describeSecurityGroupReferencesWithOptions(request: $_model.DescribeSecurityGroupReferencesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeSecurityGroupReferencesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.securityGroupId)) { query["SecurityGroupId"] = request.securityGroupId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeSecurityGroupReferences", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeSecurityGroupReferencesResponse>(await this.callApi(params, req, runtime), new $_model.DescribeSecurityGroupReferencesResponse({})); } /** * Queries the security groups whose rules reference security groups as authorization objects. * * @remarks * If you cannot delete a security group by calling the [DeleteSecurityGroup](https://help.aliyun.com/document_detail/25558.html) operation, call the DescribeSecurityGroupReferences operation to check whether the security group is referenced by the rules of other security groups. If the security group is referenced by the rules of other security groups, you must call the [RevokeSecurityGroup](https://help.aliyun.com/document_detail/2679855.html) and [RevokeSecurityGroupEgress](https://help.aliyun.com/document_detail/2679856.html) operations to remove the references before you can delete the security group. * * @param request - DescribeSecurityGroupReferencesRequest * @returns DescribeSecurityGroupReferencesResponse */ async describeSecurityGroupReferences(request: $_model.DescribeSecurityGroupReferencesRequest): Promise<$_model.DescribeSecurityGroupReferencesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeSecurityGroupReferencesWithOptions(request, runtime); } /** * Queries the basic information of security groups. You can query the information by various filter conditions, such as the region ID, security group ID, and security group type. * * @remarks * **Paged query**: We recommend that you specify `MaxResults` and `NextToken`. * * If the response does not include `NextToken`, the current page of results is the last page and no more results are to be returned. * * During a paged query, when you call the DescribeSecurityGroups operation to retrieve the first page of results, set `MaxResults` to specify the maximum number of entries to return in the call. The return value of `NextToken` is a pagination token that can be used in the next call to retrieve a new page of results. * * When you call the DescribeSecurityGroups operation to retrieve a new page of results, set `NextToken` to the `NextToken` value returned in the previous call and set `MaxResults` to specify the maximum number of entries to return in this call. * * When you use Alibaba Cloud CLI to call an API operation, you must specify request parameter values of different data types in required formats. For more information, see [Parameter formats](https://help.aliyun.com/document_detail/110340.html). * * @param request - DescribeSecurityGroupsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeSecurityGroupsResponse */ async describeSecurityGroupsWithOptions(request: $_model.DescribeSecurityGroupsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeSecurityGroupsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.dryRun)) { query["DryRun"] = request.dryRun; } if (!$dara.isNull(request.fuzzyQuery)) { query["FuzzyQuery"] = request.fuzzyQuery; } if (!$dara.isNull(request.isQueryEcsCount)) { query["IsQueryEcsCount"] = request.isQueryEcsCount; } if (!$dara.isNull(request.maxResults)) { query["MaxResults"] = request.maxResults; } if (!$dara.isNull(request.networkType)) { query["NetworkType"] = request.networkType; } if (!$dara.isNull(request.nextToken)) { query["NextToken"] = request.nextToken; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.securityGroupId)) { query["SecurityGroupId"] = request.securityGroupId; } if (!$dara.isNull(request.securityGroupIds)) { query["SecurityGroupIds"] = request.securityGroupIds; } if (!$dara.isNull(request.securityGroupName)) { query["SecurityGroupName"] = request.securityGroupName; } if (!$dara.isNull(request.securityGroupType)) { query["SecurityGroupType"] = request.securityGroupType; } if (!$dara.isNull(request.serviceManaged)) { query["ServiceManaged"] = request.serviceManaged; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } if (!$dara.isNull(request.vpcId)) { query["VpcId"] = request.vpcId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeSecurityGroups", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeSecurityGroupsResponse>(await this.callApi(params, req, runtime), new $_model.DescribeSecurityGroupsResponse({})); } /** * Queries the basic information of security groups. You can query the information by various filter conditions, such as the region ID, security group ID, and security group type. * * @remarks * **Paged query**: We recommend that you specify `MaxResults` and `NextToken`. * * If the response does not include `NextToken`, the current page of results is the last page and no more results are to be returned. * * During a paged query, when you call the DescribeSecurityGroups operation to retrieve the first page of results, set `MaxResults` to specify the maximum number of entries to return in the call. The return value of `NextToken` is a pagination token that can be used in the next call to retrieve a new page of results. * * When you call the DescribeSecurityGroups operation to retrieve a new page of results, set `NextToken` to the `NextToken` value returned in the previous call and set `MaxResults` to specify the maximum number of entries to return in this call. * * When you use Alibaba Cloud CLI to call an API operation, you must specify request parameter values of different data types in required formats. For more information, see [Parameter formats](https://help.aliyun.com/document_detail/110340.html). * * @param request - DescribeSecurityGroupsRequest * @returns DescribeSecurityGroupsResponse */ async describeSecurityGroups(request: $_model.DescribeSecurityGroupsRequest): Promise<$_model.DescribeSecurityGroupsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeSecurityGroupsWithOptions(request, runtime); } /** * Queries the files sent by Cloud Assistant and their status. * * @remarks * ## [](#)Usage notes * * When you send a file, the file may fail to be sent to specific Elastic Compute Service (ECS) instances. You can call this operation to check the file sending results. * * You can call this operation to query the file sending records within the last six weeks. * * During a paged query, when you call the DescribeSendFileResults operation to retrieve the first page of results, set `MaxResults` to specify the maximum number of entries to return in the call. The return value of `NextToken` is a pagination token that can be used in the next call to retrieve a new page of results. When you call the DescribeSendFileResults operation to retrieve a new page of results, set `NextToken` to the `NextToken` value returned in the previous call and set `MaxResults` to specify the maximum number of entries to return in this call. * * @param request - DescribeSendFileResultsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeSendFileResultsResponse */ async describeSendFileResultsWithOptions(request: $_model.DescribeSendFileResultsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeSendFileResultsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.invocationStatus)) { query["InvocationStatus"] = request.invocationStatus; } if (!$dara.isNull(request.invokeId)) { query["InvokeId"] = request.invokeId; } if (!$dara.isNull(request.maxResults)) { query["MaxResults"] = request.maxResults; } if (!$dara.isNull(request.name)) { query["Name"] = request.name; } if (!$dara.isNull(request.nextToken)) { query["NextToken"] = request.nextToken; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeSendFileResults", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeSendFileResultsResponse>(await this.callApi(params, req, runtime), new $_model.DescribeSendFileResultsResponse({})); } /** * Queries the files sent by Cloud Assistant and their status. * * @remarks * ## [](#)Usage notes * * When you send a file, the file may fail to be sent to specific Elastic Compute Service (ECS) instances. You can call this operation to check the file sending results. * * You can call this operation to query the file sending records within the last six weeks. * * During a paged query, when you call the DescribeSendFileResults operation to retrieve the first page of results, set `MaxResults` to specify the maximum number of entries to return in the call. The return value of `NextToken` is a pagination token that can be used in the next call to retrieve a new page of results. When you call the DescribeSendFileResults operation to retrieve a new page of results, set `NextToken` to the `NextToken` value returned in the previous call and set `MaxResults` to specify the maximum number of entries to return in this call. * * @param request - DescribeSendFileResultsRequest * @returns DescribeSendFileResultsResponse */ async describeSendFileResults(request: $_model.DescribeSendFileResultsRequest): Promise<$_model.DescribeSendFileResultsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeSendFileResultsWithOptions(request, runtime); } /** * Queries the information of one or more snapshot-consistent groups, such as the status of the groups, IDs of the instances associated with the groups, and snapshot creation progress. * * @remarks * You can specify multiple request parameters to be queried, such as `InstanceId`, `SnapshotGroupId.N`, and `Status.N`. Specified parameters have logical AND relations. Only the specified parameters are included in the filter conditions. * * @param request - DescribeSnapshotGroupsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeSnapshotGroupsResponse */ async describeSnapshotGroupsWithOptions(request: $_model.DescribeSnapshotGroupsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeSnapshotGroupsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.additionalAttributes)) { query["AdditionalAttributes"] = request.additionalAttributes; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.maxResults)) { query["MaxResults"] = request.maxResults; } if (!$dara.isNull(request.name)) { query["Name"] = request.name; } if (!$dara.isNull(request.nextToken)) { query["NextToken"] = request.nextToken; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.snapshotGroupId)) { query["SnapshotGroupId"] = request.snapshotGroupId; } if (!$dara.isNull(request.status)) { query["Status"] = request.status; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeSnapshotGroups", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeSnapshotGroupsResponse>(await this.callApi(params, req, runtime), new $_model.DescribeSnapshotGroupsResponse({})); } /** * Queries the information of one or more snapshot-consistent groups, such as the status of the groups, IDs of the instances associated with the groups, and snapshot creation progress. * * @remarks * You can specify multiple request parameters to be queried, such as `InstanceId`, `SnapshotGroupId.N`, and `Status.N`. Specified parameters have logical AND relations. Only the specified parameters are included in the filter conditions. * * @param request - DescribeSnapshotGroupsRequest * @returns DescribeSnapshotGroupsResponse */ async describeSnapshotGroups(request: $_model.DescribeSnapshotGroupsRequest): Promise<$_model.DescribeSnapshotGroupsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeSnapshotGroupsWithOptions(request, runtime); } /** * Queries the snapshot chains of cloud disks. A snapshot chain is a chain of all the snapshots created for a disk. A disk corresponds to a chain of snapshots. * * @remarks * ## [](#)Usage notes * Take note of the following items: * * You can specify multiple request parameters, such as `RegionId`, `DiskIds`, and `InstanceId`, to query snapshot chains. Specified parameters have logical AND relations. * * Only the specified parameters are used as filter conditions. If the `DiskIds` and `SnapshotLinkIds` parameters are set to empty JSON arrays, the values are considered as valid filter conditions. In this case, an empty result is returned. * * @param request - DescribeSnapshotLinksRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeSnapshotLinksResponse */ async describeSnapshotLinksWithOptions(request: $_model.DescribeSnapshotLinksRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeSnapshotLinksResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.diskIds)) { query["DiskIds"] = request.diskIds; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.maxResults)) { query["MaxResults"] = request.maxResults; } if (!$dara.isNull(request.nextToken)) { query["NextToken"] = request.nextToken; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.snapshotLinkIds)) { query["SnapshotLinkIds"] = request.snapshotLinkIds; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeSnapshotLinks", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeSnapshotLinksResponse>(await this.callApi(params, req, runtime), new $_model.DescribeSnapshotLinksResponse({})); } /** * Queries the snapshot chains of cloud disks. A snapshot chain is a chain of all the snapshots created for a disk. A disk corresponds to a chain of snapshots. * * @remarks * ## [](#)Usage notes * Take note of the following items: * * You can specify multiple request parameters, such as `RegionId`, `DiskIds`, and `InstanceId`, to query snapshot chains. Specified parameters have logical AND relations. * * Only the specified parameters are used as filter conditions. If the `DiskIds` and `SnapshotLinkIds` parameters are set to empty JSON arrays, the values are considered as valid filter conditions. In this case, an empty result is returned. * * @param request - DescribeSnapshotLinksRequest * @returns DescribeSnapshotLinksResponse */ async describeSnapshotLinks(request: $_model.DescribeSnapshotLinksRequest): Promise<$_model.DescribeSnapshotLinksResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeSnapshotLinksWithOptions(request, runtime); } /** * Queries the monitoring data of snapshot sizes in a region within the last 30 days. * * @remarks * ## [](#)Usage notes * Take note of the following items: * * Up to 400 monitoring data entries can be returned at a time. Make sure that the `TotalCount` value does not exceed 400. The value is calculated by using the following formula: `TotalCount = (EndTime - StartTime)/Period`. If the TotalCount value is greater than 400, the `InvalidParameter.TooManyDataQueried` error is returned. * * You can query the monitoring data of snapshot sizes in the last 30 days. If the value of `StartTime` is more than 30 days earlier than the current time, an error is returned. * * @param request - DescribeSnapshotMonitorDataRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeSnapshotMonitorDataResponse */ async describeSnapshotMonitorDataWithOptions(request: $_model.DescribeSnapshotMonitorDataRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeSnapshotMonitorDataResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.category)) { query["Category"] = request.category; } if (!$dara.isNull(request.endTime)) { query["EndTime"] = request.endTime; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.period)) { query["Period"] = request.period; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.startTime)) { query["StartTime"] = request.startTime; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeSnapshotMonitorData", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeSnapshotMonitorDataResponse>(await this.callApi(params, req, runtime), new $_model.DescribeSnapshotMonitorDataResponse({})); } /** * Queries the monitoring data of snapshot sizes in a region within the last 30 days. * * @remarks * ## [](#)Usage notes * Take note of the following items: * * Up to 400 monitoring data entries can be returned at a time. Make sure that the `TotalCount` value does not exceed 400. The value is calculated by using the following formula: `TotalCount = (EndTime - StartTime)/Period`. If the TotalCount value is greater than 400, the `InvalidParameter.TooManyDataQueried` error is returned. * * You can query the monitoring data of snapshot sizes in the last 30 days. If the value of `StartTime` is more than 30 days earlier than the current time, an error is returned. * * @param request - DescribeSnapshotMonitorDataRequest * @returns DescribeSnapshotMonitorDataResponse */ async describeSnapshotMonitorData(request: $_model.DescribeSnapshotMonitorDataRequest): Promise<$_model.DescribeSnapshotMonitorDataResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeSnapshotMonitorDataWithOptions(request, runtime); } /** * Queries the Object Storage Service (OSS) storage plans that you purchased in an Alibaba Cloud region. OSS storage plans can be used to offset the storage fees for standard snapshots instead of local snapshots. * * @param request - DescribeSnapshotPackageRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeSnapshotPackageResponse */ async describeSnapshotPackageWithOptions(request: $_model.DescribeSnapshotPackageRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeSnapshotPackageResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeSnapshotPackage", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeSnapshotPackageResponse>(await this.callApi(params, req, runtime), new $_model.DescribeSnapshotPackageResponse({})); } /** * Queries the Object Storage Service (OSS) storage plans that you purchased in an Alibaba Cloud region. OSS storage plans can be used to offset the storage fees for standard snapshots instead of local snapshots. * * @param request - DescribeSnapshotPackageRequest * @returns DescribeSnapshotPackageResponse */ async describeSnapshotPackage(request: $_model.DescribeSnapshotPackageRequest): Promise<$_model.DescribeSnapshotPackageResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeSnapshotPackageWithOptions(request, runtime); } /** * Queries the details of cloud disk snapshots. The details include the status of the snapshots, the amount of remaining time required to create the snapshots, and the retention period of the automatic snapshots in days. * * @remarks * You can specify multiple request parameters, such as `InstanceId`, `DiskId`, and `SnapshotIds`, to query snapshots. The specified parameters have logical AND relations. Only the specified parameters are included in the filter conditions. * When you use Alibaba Cloud CLI to call an API operation, you must specify request parameter values of different data types in required formats. For more information, see [Parameter formats](https://help.aliyun.com/document_detail/110340.html). * Sample requests: * **Query the snapshots of all cloud disks attached to an Elastic Compute Service (ECS) instance in the China (Hangzhou) region** * RegionId: cn-hangzhou, // Specify the China (Hangzhou) region.InstanceId: i-bp1fh7by6d9mw7zr**** // Specify the ID of the instance that you want to query. * **Query the snapshots of a specific cloud disk in the China (Hangzhou) region** * RegionId: cn-hangzhou, // Specify the China (Hangzhou) region.DiskId: d-bp10e7ej8z743dmu**** // Specify the ID of the cloud disk that you want to query. * **Query information about two snapshots in the China (Hangzhou) region by snapshot ID** * RegionId: cn-hangzhou, // Specify the China (Hangzhou) region.SnapshotIds: ["d-bp10e7ej8z743dmu****", "s-bp19vd1lorzgzt2s****"] // Specify the IDs of the snapshots that you want to query. * **Query snapshots created after a specific point in time in the China (Hangzhou) region** * RegionId: cn-hangzhou, // Specify the China (Hangzhou) region.Filter.1.Key: CreationStartTime, // Specify a point in time to query snapshots that were created after the specified point in time.Filter.1.Value: 2024-11-27T00:00Z * * @param request - DescribeSnapshotsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeSnapshotsResponse */ async describeSnapshotsWithOptions(request: $_model.DescribeSnapshotsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeSnapshotsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.category)) { query["Category"] = request.category; } if (!$dara.isNull(request.diskId)) { query["DiskId"] = request.diskId; } if (!$dara.isNull(request.dryRun)) { query["DryRun"] = request.dryRun; } if (!$dara.isNull(request.encrypted)) { query["Encrypted"] = request.encrypted; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.KMSKeyId)) { query["KMSKeyId"] = request.KMSKeyId; } if (!$dara.isNull(request.maxResults)) { query["MaxResults"] = request.maxResults; } if (!$dara.isNull(request.nextToken)) { query["NextToken"] = request.nextToken; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.snapshotIds)) { query["SnapshotIds"] = request.snapshotIds; } if (!$dara.isNull(request.snapshotLinkId)) { query["SnapshotLinkId"] = request.snapshotLinkId; } if (!$dara.isNull(request.snapshotName)) { query["SnapshotName"] = request.snapshotName; } if (!$dara.isNull(request.snapshotType)) { query["SnapshotType"] = request.snapshotType; } if (!$dara.isNull(request.sourceDiskType)) { query["SourceDiskType"] = request.sourceDiskType; } if (!$dara.isNull(request.status)) { query["Status"] = request.status; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } if (!$dara.isNull(request.usage)) { query["Usage"] = request.usage; } if (!$dara.isNull(request.filter)) { query["Filter"] = request.filter; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeSnapshots", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeSnapshotsResponse>(await this.callApi(params, req, runtime), new $_model.DescribeSnapshotsResponse({})); } /** * Queries the details of cloud disk snapshots. The details include the status of the snapshots, the amount of remaining time required to create the snapshots, and the retention period of the automatic snapshots in days. * * @remarks * You can specify multiple request parameters, such as `InstanceId`, `DiskId`, and `SnapshotIds`, to query snapshots. The specified parameters have logical AND relations. Only the specified parameters are included in the filter conditions. * When you use Alibaba Cloud CLI to call an API operation, you must specify request parameter values of different data types in required formats. For more information, see [Parameter formats](https://help.aliyun.com/document_detail/110340.html). * Sample requests: * **Query the snapshots of all cloud disks attached to an Elastic Compute Service (ECS) instance in the China (Hangzhou) region** * RegionId: cn-hangzhou, // Specify the China (Hangzhou) region.InstanceId: i-bp1fh7by6d9mw7zr**** // Specify the ID of the instance that you want to query. * **Query the snapshots of a specific cloud disk in the China (Hangzhou) region** * RegionId: cn-hangzhou, // Specify the China (Hangzhou) region.DiskId: d-bp10e7ej8z743dmu**** // Specify the ID of the cloud disk that you want to query. * **Query information about two snapshots in the China (Hangzhou) region by snapshot ID** * RegionId: cn-hangzhou, // Specify the China (Hangzhou) region.SnapshotIds: ["d-bp10e7ej8z743dmu****", "s-bp19vd1lorzgzt2s****"] // Specify the IDs of the snapshots that you want to query. * **Query snapshots created after a specific point in time in the China (Hangzhou) region** * RegionId: cn-hangzhou, // Specify the China (Hangzhou) region.Filter.1.Key: CreationStartTime, // Specify a point in time to query snapshots that were created after the specified point in time.Filter.1.Value: 2024-11-27T00:00Z * * @param request - DescribeSnapshotsRequest * @returns DescribeSnapshotsResponse */ async describeSnapshots(request: $_model.DescribeSnapshotsRequest): Promise<$_model.DescribeSnapshotsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeSnapshotsWithOptions(request, runtime); } /** * Queries the number of snapshots that are stored in a region and the total size of the snapshots. * * @remarks * ## [](#)Usage notes * If you want to view the snapshot usage of each disk in the current region, we recommend that you call the [DescribeSnapshotLinks](https://help.aliyun.com/document_detail/55837.html) operation to query snapshot chain information. * * @param request - DescribeSnapshotsUsageRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeSnapshotsUsageResponse */ async describeSnapshotsUsageWithOptions(request: $_model.DescribeSnapshotsUsageRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeSnapshotsUsageResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeSnapshotsUsage", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeSnapshotsUsageResponse>(await this.callApi(params, req, runtime), new $_model.DescribeSnapshotsUsageResponse({})); } /** * Queries the number of snapshots that are stored in a region and the total size of the snapshots. * * @remarks * ## [](#)Usage notes * If you want to view the snapshot usage of each disk in the current region, we recommend that you call the [DescribeSnapshotLinks](https://help.aliyun.com/document_detail/55837.html) operation to query snapshot chain information. * * @param request - DescribeSnapshotsUsageRequest * @returns DescribeSnapshotsUsageResponse */ async describeSnapshotsUsage(request: $_model.DescribeSnapshotsUsageRequest): Promise<$_model.DescribeSnapshotsUsageResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeSnapshotsUsageWithOptions(request, runtime); } /** * Queries information about spot instances in a region in the previous 30 days. The information includes the average release rate of spot instances and the percentage of the average spot instance price relative to the pay-as-you-go instance price. * * @remarks * This operation is applicable only to I/O optimized spot instances that reside in virtual private clouds (VPCs). * * You can use one of the following methods to call this operation: * * Specify `Cores` and `Memory` or `MinCores` and `MinMemory` to query information about the instance types that meet the specified vCPU and memory requirements. * * Specify `InstanceTypes.N` to query information about the specified instance types. * * Specify `Cores` and `Memory` or `MinCores` and `MinMemory`, and then specify `InstanceTypeFamily` or `InstanceFamilyLevel` to query information about the instance types that meet the specified vCPU and memory requirements within the specified instance family or at a specified instance family level. * * You can calculate the average price of spot instances based on the percentage of the average spot instance price relative to the pay-as-you-go instance price and the pay-as-you-go instance price. * * @param request - DescribeSpotAdviceRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeSpotAdviceResponse */ async describeSpotAdviceWithOptions(request: $_model.DescribeSpotAdviceRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeSpotAdviceResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.cores)) { query["Cores"] = request.cores; } if (!$dara.isNull(request.gpuAmount)) { query["GpuAmount"] = request.gpuAmount; } if (!$dara.isNull(request.gpuSpec)) { query["GpuSpec"] = request.gpuSpec; } if (!$dara.isNull(request.instanceFamilyLevel)) { query["InstanceFamilyLevel"] = request.instanceFamilyLevel; } if (!$dara.isNull(request.instanceTypeFamily)) { query["InstanceTypeFamily"] = request.instanceTypeFamily; } if (!$dara.isNull(request.instanceTypes)) { query["InstanceTypes"] = request.instanceTypes; } if (!$dara.isNull(request.memory)) { query["Memory"] = request.memory; } if (!$dara.isNull(request.minCores)) { query["MinCores"] = request.minCores; } if (!$dara.isNull(request.minMemory)) { query["MinMemory"] = request.minMemory; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.zoneId)) { query["ZoneId"] = request.zoneId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeSpotAdvice", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeSpotAdviceResponse>(await this.callApi(params, req, runtime), new $_model.DescribeSpotAdviceResponse({})); } /** * Queries information about spot instances in a region in the previous 30 days. The information includes the average release rate of spot instances and the percentage of the average spot instance price relative to the pay-as-you-go instance price. * * @remarks * This operation is applicable only to I/O optimized spot instances that reside in virtual private clouds (VPCs). * * You can use one of the following methods to call this operation: * * Specify `Cores` and `Memory` or `MinCores` and `MinMemory` to query information about the instance types that meet the specified vCPU and memory requirements. * * Specify `InstanceTypes.N` to query information about the specified instance types. * * Specify `Cores` and `Memory` or `MinCores` and `MinMemory`, and then specify `InstanceTypeFamily` or `InstanceFamilyLevel` to query information about the instance types that meet the specified vCPU and memory requirements within the specified instance family or at a specified instance family level. * * You can calculate the average price of spot instances based on the percentage of the average spot instance price relative to the pay-as-you-go instance price and the pay-as-you-go instance price. * * @param request - DescribeSpotAdviceRequest * @returns DescribeSpotAdviceResponse */ async describeSpotAdvice(request: $_model.DescribeSpotAdviceRequest): Promise<$_model.DescribeSpotAdviceResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeSpotAdviceWithOptions(request, runtime); } /** * Queries the historical prices of spot instances within up to the previous 30 days. You can set the maximum price of a spot instance based on the historical prices. * * @remarks * This operation is applicable only to I/O optimized spot instances. * * The data returned by the interface may be paginated. If the returned data contains the `NextOffset` parameter, you can set the `Offset` parameter in the request to the value of the `NextOffset` parameter for subsequent data query. * * @param request - DescribeSpotPriceHistoryRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeSpotPriceHistoryResponse */ async describeSpotPriceHistoryWithOptions(request: $_model.DescribeSpotPriceHistoryRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeSpotPriceHistoryResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.endTime)) { query["EndTime"] = request.endTime; } if (!$dara.isNull(request.instanceType)) { query["InstanceType"] = request.instanceType; } if (!$dara.isNull(request.ioOptimized)) { query["IoOptimized"] = request.ioOptimized; } if (!$dara.isNull(request.networkType)) { query["NetworkType"] = request.networkType; } if (!$dara.isNull(request.OSType)) { query["OSType"] = request.OSType; } if (!$dara.isNull(request.offset)) { query["Offset"] = request.offset; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.spotDuration)) { query["SpotDuration"] = request.spotDuration; } if (!$dara.isNull(request.startTime)) { query["StartTime"] = request.startTime; } if (!$dara.isNull(request.zoneId)) { query["ZoneId"] = request.zoneId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeSpotPriceHistory", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeSpotPriceHistoryResponse>(await this.callApi(params, req, runtime), new $_model.DescribeSpotPriceHistoryResponse({})); } /** * Queries the historical prices of spot instances within up to the previous 30 days. You can set the maximum price of a spot instance based on the historical prices. * * @remarks * This operation is applicable only to I/O optimized spot instances. * * The data returned by the interface may be paginated. If the returned data contains the `NextOffset` parameter, you can set the `Offset` parameter in the request to the value of the `NextOffset` parameter for subsequent data query. * * @param request - DescribeSpotPriceHistoryRequest * @returns DescribeSpotPriceHistoryResponse */ async describeSpotPriceHistory(request: $_model.DescribeSpotPriceHistoryRequest): Promise<$_model.DescribeSpotPriceHistoryResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeSpotPriceHistoryWithOptions(request, runtime); } /** * Queries the details of storage capacity units (SCUs). In the request, you can specify the name, status, or capacity of each SCU. * * @param request - DescribeStorageCapacityUnitsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeStorageCapacityUnitsResponse */ async describeStorageCapacityUnitsWithOptions(request: $_model.DescribeStorageCapacityUnitsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeStorageCapacityUnitsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.allocationType)) { query["AllocationType"] = request.allocationType; } if (!$dara.isNull(request.capacity)) { query["Capacity"] = request.capacity; } if (!$dara.isNull(request.name)) { query["Name"] = request.name; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.status)) { query["Status"] = request.status; } if (!$dara.isNull(request.storageCapacityUnitId)) { query["StorageCapacityUnitId"] = request.storageCapacityUnitId; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeStorageCapacityUnits", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeStorageCapacityUnitsResponse>(await this.callApi(params, req, runtime), new $_model.DescribeStorageCapacityUnitsResponse({})); } /** * Queries the details of storage capacity units (SCUs). In the request, you can specify the name, status, or capacity of each SCU. * * @param request - DescribeStorageCapacityUnitsRequest * @returns DescribeStorageCapacityUnitsResponse */ async describeStorageCapacityUnits(request: $_model.DescribeStorageCapacityUnitsRequest): Promise<$_model.DescribeStorageCapacityUnitsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeStorageCapacityUnitsWithOptions(request, runtime); } /** * Queries the details of the disks or Shared Block Storage devices in a storage set. * * @param request - DescribeStorageSetDetailsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeStorageSetDetailsResponse */ async describeStorageSetDetailsWithOptions(request: $_model.DescribeStorageSetDetailsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeStorageSetDetailsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.diskIds)) { query["DiskIds"] = request.diskIds; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.storageSetId)) { query["StorageSetId"] = request.storageSetId; } if (!$dara.isNull(request.storageSetPartitionNumber)) { query["StorageSetPartitionNumber"] = request.storageSetPartitionNumber; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeStorageSetDetails", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeStorageSetDetailsResponse>(await this.callApi(params, req, runtime), new $_model.DescribeStorageSetDetailsResponse({})); } /** * Queries the details of the disks or Shared Block Storage devices in a storage set. * * @param request - DescribeStorageSetDetailsRequest * @returns DescribeStorageSetDetailsResponse */ async describeStorageSetDetails(request: $_model.DescribeStorageSetDetailsRequest): Promise<$_model.DescribeStorageSetDetailsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeStorageSetDetailsWithOptions(request, runtime); } /** * Describes the details of storage sets in a specific region. The details of a storage set include its region, zone, creation time, and maximum number of partitions. * * @param request - DescribeStorageSetsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeStorageSetsResponse */ async describeStorageSetsWithOptions(request: $_model.DescribeStorageSetsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeStorageSetsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.storageSetIds)) { query["StorageSetIds"] = request.storageSetIds; } if (!$dara.isNull(request.storageSetName)) { query["StorageSetName"] = request.storageSetName; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } if (!$dara.isNull(request.zoneId)) { query["ZoneId"] = request.zoneId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeStorageSets", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeStorageSetsResponse>(await this.callApi(params, req, runtime), new $_model.DescribeStorageSetsResponse({})); } /** * Describes the details of storage sets in a specific region. The details of a storage set include its region, zone, creation time, and maximum number of partitions. * * @param request - DescribeStorageSetsRequest * @returns DescribeStorageSetsResponse */ async describeStorageSets(request: $_model.DescribeStorageSetsRequest): Promise<$_model.DescribeStorageSetsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeStorageSetsWithOptions(request, runtime); } /** * Queries the available tags. You can specify multiple filter conditions, such as a resource type, a resource ID, a tag key, and a tag value, to query tags. The specified filter conditions have logical AND relations. * * @remarks * If a tag key that has no tag value is specified, all tags that contain the tag key are returned. If a tag key-value pair is specified, only tags that exactly match the key-value pair are returned. * * @deprecated OpenAPI DescribeTags is deprecated, please use Tag::2018-08-28::CountResourcesByTags instead. * * @param request - DescribeTagsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeTagsResponse */ async describeTagsWithOptions(request: $_model.DescribeTagsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeTagsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.category)) { query["Category"] = request.category; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceId)) { query["ResourceId"] = request.resourceId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.resourceType)) { query["ResourceType"] = request.resourceType; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeTags", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeTagsResponse>(await this.callApi(params, req, runtime), new $_model.DescribeTagsResponse({})); } /** * Queries the available tags. You can specify multiple filter conditions, such as a resource type, a resource ID, a tag key, and a tag value, to query tags. The specified filter conditions have logical AND relations. * * @remarks * If a tag key that has no tag value is specified, all tags that contain the tag key are returned. If a tag key-value pair is specified, only tags that exactly match the key-value pair are returned. * * @deprecated OpenAPI DescribeTags is deprecated, please use Tag::2018-08-28::CountResourcesByTags instead. * * @param request - DescribeTagsRequest * @returns DescribeTagsResponse */ // Deprecated async describeTags(request: $_model.DescribeTagsRequest): Promise<$_model.DescribeTagsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeTagsWithOptions(request, runtime); } /** * Queries the details of an asynchronous task. The asynchronous tasks that you can query by calling this operation are the tasks generated by the ImportImage, ExportImage, and ModifyDiskSpec operations. * * @param request - DescribeTaskAttributeRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeTaskAttributeResponse */ async describeTaskAttributeWithOptions(request: $_model.DescribeTaskAttributeRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeTaskAttributeResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.taskId)) { query["TaskId"] = request.taskId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeTaskAttribute", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeTaskAttributeResponse>(await this.callApi(params, req, runtime), new $_model.DescribeTaskAttributeResponse({})); } /** * Queries the details of an asynchronous task. The asynchronous tasks that you can query by calling this operation are the tasks generated by the ImportImage, ExportImage, and ModifyDiskSpec operations. * * @param request - DescribeTaskAttributeRequest * @returns DescribeTaskAttributeResponse */ async describeTaskAttribute(request: $_model.DescribeTaskAttributeRequest): Promise<$_model.DescribeTaskAttributeResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeTaskAttributeWithOptions(request, runtime); } /** * Queries the progress of one or more asynchronous tasks. * * @remarks * ## Debugging * [OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.](https://api.aliyun.com/#product=Ecs\\&api=DescribeTasks\\&type=RPC\\&version=2014-05-26) * * @param request - DescribeTasksRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeTasksResponse */ async describeTasksWithOptions(request: $_model.DescribeTasksRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeTasksResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.endTime)) { query["EndTime"] = request.endTime; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceIds)) { query["ResourceIds"] = request.resourceIds; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.startTime)) { query["StartTime"] = request.startTime; } if (!$dara.isNull(request.taskAction)) { query["TaskAction"] = request.taskAction; } if (!$dara.isNull(request.taskGroupId)) { query["TaskGroupId"] = request.taskGroupId; } if (!$dara.isNull(request.taskIds)) { query["TaskIds"] = request.taskIds; } if (!$dara.isNull(request.taskStatus)) { query["TaskStatus"] = request.taskStatus; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeTasks", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeTasksResponse>(await this.callApi(params, req, runtime), new $_model.DescribeTasksResponse({})); } /** * Queries the progress of one or more asynchronous tasks. * * @remarks * ## Debugging * [OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.](https://api.aliyun.com/#product=Ecs\\&api=DescribeTasks\\&type=RPC\\&version=2014-05-26) * * @param request - DescribeTasksRequest * @returns DescribeTasksResponse */ async describeTasks(request: $_model.DescribeTasksRequest): Promise<$_model.DescribeTasksResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeTasksWithOptions(request, runtime); } /** * Queries the session records of Elastic Compute Service (ECS) Session Manager. * * @remarks * You can query the session records of Session Manager that were generated in the last four weeks. * * @param request - DescribeTerminalSessionsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeTerminalSessionsResponse */ async describeTerminalSessionsWithOptions(request: $_model.DescribeTerminalSessionsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeTerminalSessionsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.maxResults)) { query["MaxResults"] = request.maxResults; } if (!$dara.isNull(request.nextToken)) { query["NextToken"] = request.nextToken; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.sessionId)) { query["SessionId"] = request.sessionId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeTerminalSessions", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeTerminalSessionsResponse>(await this.callApi(params, req, runtime), new $_model.DescribeTerminalSessionsResponse({})); } /** * Queries the session records of Elastic Compute Service (ECS) Session Manager. * * @remarks * You can query the session records of Session Manager that were generated in the last four weeks. * * @param request - DescribeTerminalSessionsRequest * @returns DescribeTerminalSessionsResponse */ async describeTerminalSessions(request: $_model.DescribeTerminalSessionsRequest): Promise<$_model.DescribeTerminalSessionsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeTerminalSessionsWithOptions(request, runtime); } /** * 获取用户级别默认属性 * * @deprecated OpenAPI DescribeUserBusinessBehavior is deprecated * * @param request - DescribeUserBusinessBehaviorRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeUserBusinessBehaviorResponse */ async describeUserBusinessBehaviorWithOptions(request: $_model.DescribeUserBusinessBehaviorRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeUserBusinessBehaviorResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.statusKey)) { query["statusKey"] = request.statusKey; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeUserBusinessBehavior", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeUserBusinessBehaviorResponse>(await this.callApi(params, req, runtime), new $_model.DescribeUserBusinessBehaviorResponse({})); } /** * 获取用户级别默认属性 * * @deprecated OpenAPI DescribeUserBusinessBehavior is deprecated * * @param request - DescribeUserBusinessBehaviorRequest * @returns DescribeUserBusinessBehaviorResponse */ // Deprecated async describeUserBusinessBehavior(request: $_model.DescribeUserBusinessBehaviorRequest): Promise<$_model.DescribeUserBusinessBehaviorResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeUserBusinessBehaviorWithOptions(request, runtime); } /** * Queries the user data of an Elastic Compute Service (ECS) instance. * * @remarks * If no user data is configured for the ECS instance, an empty string is returned. * * @param request - DescribeUserDataRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeUserDataResponse */ async describeUserDataWithOptions(request: $_model.DescribeUserDataRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeUserDataResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeUserData", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeUserDataResponse>(await this.callApi(params, req, runtime), new $_model.DescribeUserDataResponse({})); } /** * Queries the user data of an Elastic Compute Service (ECS) instance. * * @remarks * If no user data is configured for the ECS instance, an empty string is returned. * * @param request - DescribeUserDataRequest * @returns DescribeUserDataResponse */ async describeUserData(request: $_model.DescribeUserDataRequest): Promise<$_model.DescribeUserDataResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeUserDataWithOptions(request, runtime); } /** * 查询路由器列表 * * @deprecated OpenAPI DescribeVRouters is deprecated, please use Vpc::2016-04-28::DescribeVRouters instead. * * @param request - DescribeVRoutersRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeVRoutersResponse */ async describeVRoutersWithOptions(request: $_model.DescribeVRoutersRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeVRoutersResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.VRouterId)) { query["VRouterId"] = request.VRouterId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeVRouters", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeVRoutersResponse>(await this.callApi(params, req, runtime), new $_model.DescribeVRoutersResponse({})); } /** * 查询路由器列表 * * @deprecated OpenAPI DescribeVRouters is deprecated, please use Vpc::2016-04-28::DescribeVRouters instead. * * @param request - DescribeVRoutersRequest * @returns DescribeVRoutersResponse */ // Deprecated async describeVRouters(request: $_model.DescribeVRoutersRequest): Promise<$_model.DescribeVRoutersResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeVRoutersWithOptions(request, runtime); } /** * DescribeVSwitches * * @deprecated OpenAPI DescribeVSwitches is deprecated, please use Vpc::2016-04-28::DescribeVSwitches instead. * * @param request - DescribeVSwitchesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeVSwitchesResponse */ async describeVSwitchesWithOptions(request: $_model.DescribeVSwitchesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeVSwitchesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.isDefault)) { query["IsDefault"] = request.isDefault; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.vSwitchId)) { query["VSwitchId"] = request.vSwitchId; } if (!$dara.isNull(request.vpcId)) { query["VpcId"] = request.vpcId; } if (!$dara.isNull(request.zoneId)) { query["ZoneId"] = request.zoneId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeVSwitches", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeVSwitchesResponse>(await this.callApi(params, req, runtime), new $_model.DescribeVSwitchesResponse({})); } /** * DescribeVSwitches * * @deprecated OpenAPI DescribeVSwitches is deprecated, please use Vpc::2016-04-28::DescribeVSwitches instead. * * @param request - DescribeVSwitchesRequest * @returns DescribeVSwitchesResponse */ // Deprecated async describeVSwitches(request: $_model.DescribeVSwitchesRequest): Promise<$_model.DescribeVSwitchesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeVSwitchesWithOptions(request, runtime); } /** * DescribeVirtualBorderRouters * * @deprecated OpenAPI DescribeVirtualBorderRouters is deprecated, please use Vpc::2016-04-28::DescribeVirtualBorderRouters instead. * * @param request - DescribeVirtualBorderRoutersRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeVirtualBorderRoutersResponse */ async describeVirtualBorderRoutersWithOptions(request: $_model.DescribeVirtualBorderRoutersRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeVirtualBorderRoutersResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.filter)) { query["Filter"] = request.filter; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeVirtualBorderRouters", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeVirtualBorderRoutersResponse>(await this.callApi(params, req, runtime), new $_model.DescribeVirtualBorderRoutersResponse({})); } /** * DescribeVirtualBorderRouters * * @deprecated OpenAPI DescribeVirtualBorderRouters is deprecated, please use Vpc::2016-04-28::DescribeVirtualBorderRouters instead. * * @param request - DescribeVirtualBorderRoutersRequest * @returns DescribeVirtualBorderRoutersResponse */ // Deprecated async describeVirtualBorderRouters(request: $_model.DescribeVirtualBorderRoutersRequest): Promise<$_model.DescribeVirtualBorderRoutersResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeVirtualBorderRoutersWithOptions(request, runtime); } /** * DescribeVirtualBorderRoutersForPhysicalConnection * * @deprecated OpenAPI DescribeVirtualBorderRoutersForPhysicalConnection is deprecated, please use Vpc::2016-04-28::DescribeVirtualBorderRoutersForPhysicalConnection instead. * * @param request - DescribeVirtualBorderRoutersForPhysicalConnectionRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeVirtualBorderRoutersForPhysicalConnectionResponse */ async describeVirtualBorderRoutersForPhysicalConnectionWithOptions(request: $_model.DescribeVirtualBorderRoutersForPhysicalConnectionRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeVirtualBorderRoutersForPhysicalConnectionResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.filter)) { query["Filter"] = request.filter; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.physicalConnectionId)) { query["PhysicalConnectionId"] = request.physicalConnectionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeVirtualBorderRoutersForPhysicalConnection", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeVirtualBorderRoutersForPhysicalConnectionResponse>(await this.callApi(params, req, runtime), new $_model.DescribeVirtualBorderRoutersForPhysicalConnectionResponse({})); } /** * DescribeVirtualBorderRoutersForPhysicalConnection * * @deprecated OpenAPI DescribeVirtualBorderRoutersForPhysicalConnection is deprecated, please use Vpc::2016-04-28::DescribeVirtualBorderRoutersForPhysicalConnection instead. * * @param request - DescribeVirtualBorderRoutersForPhysicalConnectionRequest * @returns DescribeVirtualBorderRoutersForPhysicalConnectionResponse */ // Deprecated async describeVirtualBorderRoutersForPhysicalConnection(request: $_model.DescribeVirtualBorderRoutersForPhysicalConnectionRequest): Promise<$_model.DescribeVirtualBorderRoutersForPhysicalConnectionResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeVirtualBorderRoutersForPhysicalConnectionWithOptions(request, runtime); } /** * 查询VPC * * @deprecated OpenAPI DescribeVpcs is deprecated, please use Vpc::2016-04-28::DescribeVpcs instead. * * @param request - DescribeVpcsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeVpcsResponse */ async describeVpcsWithOptions(request: $_model.DescribeVpcsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeVpcsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.isDefault)) { query["IsDefault"] = request.isDefault; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.vpcId)) { query["VpcId"] = request.vpcId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeVpcs", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeVpcsResponse>(await this.callApi(params, req, runtime), new $_model.DescribeVpcsResponse({})); } /** * 查询VPC * * @deprecated OpenAPI DescribeVpcs is deprecated, please use Vpc::2016-04-28::DescribeVpcs instead. * * @param request - DescribeVpcsRequest * @returns DescribeVpcsResponse */ // Deprecated async describeVpcs(request: $_model.DescribeVpcsRequest): Promise<$_model.DescribeVpcsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeVpcsWithOptions(request, runtime); } /** * Queries Alibaba Cloud regions. You can specify parameters, such as InstanceChargeType and ResourceType, in the request. * * @remarks * ## [](#)Usage notes * When you call this operation, only a list of zones and some resource information of each zone are returned. If you want to query instance types and disk categories that are available for purchase in a specific zone, we recommend that you call the [DescribeAvailableResource](https://help.aliyun.com/document_detail/66186.html) operation. * * @param request - DescribeZonesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DescribeZonesResponse */ async describeZonesWithOptions(request: $_model.DescribeZonesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeZonesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.acceptLanguage)) { query["AcceptLanguage"] = request.acceptLanguage; } if (!$dara.isNull(request.instanceChargeType)) { query["InstanceChargeType"] = request.instanceChargeType; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.spotStrategy)) { query["SpotStrategy"] = request.spotStrategy; } if (!$dara.isNull(request.verbose)) { query["Verbose"] = request.verbose; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DescribeZones", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DescribeZonesResponse>(await this.callApi(params, req, runtime), new $_model.DescribeZonesResponse({})); } /** * Queries Alibaba Cloud regions. You can specify parameters, such as InstanceChargeType and ResourceType, in the request. * * @remarks * ## [](#)Usage notes * When you call this operation, only a list of zones and some resource information of each zone are returned. If you want to query instance types and disk categories that are available for purchase in a specific zone, we recommend that you call the [DescribeAvailableResource](https://help.aliyun.com/document_detail/66186.html) operation. * * @param request - DescribeZonesRequest * @returns DescribeZonesResponse */ async describeZones(request: $_model.DescribeZonesRequest): Promise<$_model.DescribeZonesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.describeZonesWithOptions(request, runtime); } /** * Unlinks an Elastic Compute Service (ECS) instance that resides in the classic network from a virtual private cloud (VPC) by closing the ClassicLink connection between the instance and the VPC. After the instance is unlinked from the VPC, the instance can no longer communicate with instances in the VPC. * * @param request - DetachClassicLinkVpcRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DetachClassicLinkVpcResponse */ async detachClassicLinkVpcWithOptions(request: $_model.DetachClassicLinkVpcRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DetachClassicLinkVpcResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.vpcId)) { query["VpcId"] = request.vpcId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DetachClassicLinkVpc", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DetachClassicLinkVpcResponse>(await this.callApi(params, req, runtime), new $_model.DetachClassicLinkVpcResponse({})); } /** * Unlinks an Elastic Compute Service (ECS) instance that resides in the classic network from a virtual private cloud (VPC) by closing the ClassicLink connection between the instance and the VPC. After the instance is unlinked from the VPC, the instance can no longer communicate with instances in the VPC. * * @param request - DetachClassicLinkVpcRequest * @returns DetachClassicLinkVpcResponse */ async detachClassicLinkVpc(request: $_model.DetachClassicLinkVpcRequest): Promise<$_model.DetachClassicLinkVpcResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.detachClassicLinkVpcWithOptions(request, runtime); } /** * Detaches a pay-as-you-go data disk or a system disk from an Elastic Compute Service (ECS) instance. * * @remarks * Take note of the following items: * * This operation is an asynchronous operation. After you call the operation to detach a disk from an ECS instance, the disk is detached in approximately 1 minute. * * If `OperationLocks` in the response contains `"LockReason" : "security"` when you query information about an instance, the instance is locked for security reasons and all operations are prohibited on the instance. * * If you want to attach an elastic ephemeral disk that you detached from an instance, you can attach the disk only to the instance. * * @param request - DetachDiskRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DetachDiskResponse */ async detachDiskWithOptions(request: $_model.DetachDiskRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DetachDiskResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.deleteWithInstance)) { query["DeleteWithInstance"] = request.deleteWithInstance; } if (!$dara.isNull(request.diskId)) { query["DiskId"] = request.diskId; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DetachDisk", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DetachDiskResponse>(await this.callApi(params, req, runtime), new $_model.DetachDiskResponse({})); } /** * Detaches a pay-as-you-go data disk or a system disk from an Elastic Compute Service (ECS) instance. * * @remarks * Take note of the following items: * * This operation is an asynchronous operation. After you call the operation to detach a disk from an ECS instance, the disk is detached in approximately 1 minute. * * If `OperationLocks` in the response contains `"LockReason" : "security"` when you query information about an instance, the instance is locked for security reasons and all operations are prohibited on the instance. * * If you want to attach an elastic ephemeral disk that you detached from an instance, you can attach the disk only to the instance. * * @param request - DetachDiskRequest * @returns DetachDiskResponse */ async detachDisk(request: $_model.DetachDiskRequest): Promise<$_model.DetachDiskResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.detachDiskWithOptions(request, runtime); } /** * Detaches instance Resource Access Management (RAM) roles from Elastic Compute Service (ECS) instances. * * @param request - DetachInstanceRamRoleRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DetachInstanceRamRoleResponse */ async detachInstanceRamRoleWithOptions(request: $_model.DetachInstanceRamRoleRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DetachInstanceRamRoleResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.instanceIds)) { query["InstanceIds"] = request.instanceIds; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.ramRoleName)) { query["RamRoleName"] = request.ramRoleName; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DetachInstanceRamRole", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DetachInstanceRamRoleResponse>(await this.callApi(params, req, runtime), new $_model.DetachInstanceRamRoleResponse({})); } /** * Detaches instance Resource Access Management (RAM) roles from Elastic Compute Service (ECS) instances. * * @param request - DetachInstanceRamRoleRequest * @returns DetachInstanceRamRoleResponse */ async detachInstanceRamRole(request: $_model.DetachInstanceRamRoleRequest): Promise<$_model.DetachInstanceRamRoleResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.detachInstanceRamRoleWithOptions(request, runtime); } /** * Unbinds an SSH key pair from Linux Elastic Compute Service (ECS) instances. * * @remarks * When you call this operation, take note of the following items: * * After you unbind an SSH key pair from an instance, you must call the [RebootInstance](https://help.aliyun.com/document_detail/25502.html) operation to restart the instance to allow the unbind operation to take effect. * * After you unbind an SSH key pair from an instance, the username and password authentication method is selected for the instance. * * @param request - DetachKeyPairRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DetachKeyPairResponse */ async detachKeyPairWithOptions(request: $_model.DetachKeyPairRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DetachKeyPairResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.instanceIds)) { query["InstanceIds"] = request.instanceIds; } if (!$dara.isNull(request.keyPairName)) { query["KeyPairName"] = request.keyPairName; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DetachKeyPair", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DetachKeyPairResponse>(await this.callApi(params, req, runtime), new $_model.DetachKeyPairResponse({})); } /** * Unbinds an SSH key pair from Linux Elastic Compute Service (ECS) instances. * * @remarks * When you call this operation, take note of the following items: * * After you unbind an SSH key pair from an instance, you must call the [RebootInstance](https://help.aliyun.com/document_detail/25502.html) operation to restart the instance to allow the unbind operation to take effect. * * After you unbind an SSH key pair from an instance, the username and password authentication method is selected for the instance. * * @param request - DetachKeyPairRequest * @returns DetachKeyPairResponse */ async detachKeyPair(request: $_model.DetachKeyPairRequest): Promise<$_model.DetachKeyPairResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.detachKeyPairWithOptions(request, runtime); } /** * Detach an elastic network interface (ENI) from an Elastic Compute Service (ECS) instance. * * @remarks * Take note of the following items: * * You cannot detach the primary ENI of an instance. * * Make sure that the ENI to be detached is in the Detaching (Unbinding) or InUse (Bound) state. * * Make sure that the instance from which you want to detach an ENI is in the Running (Running) or Stopped (Stopped) state. * * The DetachNetworkInterface operation is an asynchronous operation. After this operation is called to detach an ENI, you can check the status or events of the ENI to determine whether the ENI is detached. The following figure shows the transitions between the states of the ENI.![](https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/en-US/20230223/uemr/DetachNetworkInterface.png) * * If the ENI is in the Detaching state, the ENI detachment request is sent and the ENI is being detached from the associated instance. * * If the ENI is in the Available state, the ENI is detached from the associated instance. * * If the ENI is stuck in the Detaching state, the ENI may fail to be detached from the associated instance due to specific reasons. For example, the ENI may fail to be detached because the operating system of the instance did not respond to the ENI detachment request. If this issue occurs, you can re-initiate the request to detach the ENI. If the issue persists, restart the instance. * For information about examples on how to call the DetachNetworkInterface operation, see [Detach an ENI from an ECS instance](https://help.aliyun.com/document_detail/471551.html). * * @param request - DetachNetworkInterfaceRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DetachNetworkInterfaceResponse */ async detachNetworkInterfaceWithOptions(request: $_model.DetachNetworkInterfaceRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DetachNetworkInterfaceResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.networkInterfaceId)) { query["NetworkInterfaceId"] = request.networkInterfaceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.trunkNetworkInstanceId)) { query["TrunkNetworkInstanceId"] = request.trunkNetworkInstanceId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DetachNetworkInterface", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DetachNetworkInterfaceResponse>(await this.callApi(params, req, runtime), new $_model.DetachNetworkInterfaceResponse({})); } /** * Detach an elastic network interface (ENI) from an Elastic Compute Service (ECS) instance. * * @remarks * Take note of the following items: * * You cannot detach the primary ENI of an instance. * * Make sure that the ENI to be detached is in the Detaching (Unbinding) or InUse (Bound) state. * * Make sure that the instance from which you want to detach an ENI is in the Running (Running) or Stopped (Stopped) state. * * The DetachNetworkInterface operation is an asynchronous operation. After this operation is called to detach an ENI, you can check the status or events of the ENI to determine whether the ENI is detached. The following figure shows the transitions between the states of the ENI.![](https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/en-US/20230223/uemr/DetachNetworkInterface.png) * * If the ENI is in the Detaching state, the ENI detachment request is sent and the ENI is being detached from the associated instance. * * If the ENI is in the Available state, the ENI is detached from the associated instance. * * If the ENI is stuck in the Detaching state, the ENI may fail to be detached from the associated instance due to specific reasons. For example, the ENI may fail to be detached because the operating system of the instance did not respond to the ENI detachment request. If this issue occurs, you can re-initiate the request to detach the ENI. If the issue persists, restart the instance. * For information about examples on how to call the DetachNetworkInterface operation, see [Detach an ENI from an ECS instance](https://help.aliyun.com/document_detail/471551.html). * * @param request - DetachNetworkInterfaceRequest * @returns DetachNetworkInterfaceResponse */ async detachNetworkInterface(request: $_model.DetachNetworkInterfaceRequest): Promise<$_model.DetachNetworkInterfaceResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.detachNetworkInterfaceWithOptions(request, runtime); } /** * To prevent an activation code from being leaked, you can call the DisableActivation operation to disable the activation code. Disabled activation codes cannot be used to register new managed instances. However, managed instances that are already registered are not affected. * * @remarks * ## [](#)Usage notes * To prevent an activation code from being leaked, you can call the DisableActivation operation to disable the activation code. Disabled activation codes cannot be used to register new managed instances. However, managed instances that are already registered are not affected. * * @param request - DisableActivationRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DisableActivationResponse */ async disableActivationWithOptions(request: $_model.DisableActivationRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DisableActivationResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.activationId)) { query["ActivationId"] = request.activationId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DisableActivation", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DisableActivationResponse>(await this.callApi(params, req, runtime), new $_model.DisableActivationResponse({})); } /** * To prevent an activation code from being leaked, you can call the DisableActivation operation to disable the activation code. Disabled activation codes cannot be used to register new managed instances. However, managed instances that are already registered are not affected. * * @remarks * ## [](#)Usage notes * To prevent an activation code from being leaked, you can call the DisableActivation operation to disable the activation code. Disabled activation codes cannot be used to register new managed instances. However, managed instances that are already registered are not affected. * * @param request - DisableActivationRequest * @returns DisableActivationResponse */ async disableActivation(request: $_model.DisableActivationRequest): Promise<$_model.DisableActivationResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.disableActivationWithOptions(request, runtime); } /** * Disables account-level default encryption of Elastic Block Storage (EBS) resources in a region. After you disable account-level default encryption of EBS resources in a region, the encryption status of existing disks in the region does not change. When you create a disk, you can still choose to encrypt the disk. * * @remarks * **Instructions** * * You must grant the RAM user the `AliyunECSFullAccess` permissions. For information about how to grant permissions to a RAM user, see [Grant permissions to a RAM user](https://help.aliyun.com/document_detail/116146.html). * * **Considerations** * * After Account-level EBS Default Encryption is disabled, the encryption status of existing cloud disks is not affected. * * After Account-level EBS Default Encryption is disabled, you can still choose to encrypt new cloud disks when you purchase the disks. * * @param request - DisableDiskEncryptionByDefaultRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DisableDiskEncryptionByDefaultResponse */ async disableDiskEncryptionByDefaultWithOptions(request: $_model.DisableDiskEncryptionByDefaultRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DisableDiskEncryptionByDefaultResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DisableDiskEncryptionByDefault", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DisableDiskEncryptionByDefaultResponse>(await this.callApi(params, req, runtime), new $_model.DisableDiskEncryptionByDefaultResponse({})); } /** * Disables account-level default encryption of Elastic Block Storage (EBS) resources in a region. After you disable account-level default encryption of EBS resources in a region, the encryption status of existing disks in the region does not change. When you create a disk, you can still choose to encrypt the disk. * * @remarks * **Instructions** * * You must grant the RAM user the `AliyunECSFullAccess` permissions. For information about how to grant permissions to a RAM user, see [Grant permissions to a RAM user](https://help.aliyun.com/document_detail/116146.html). * * **Considerations** * * After Account-level EBS Default Encryption is disabled, the encryption status of existing cloud disks is not affected. * * After Account-level EBS Default Encryption is disabled, you can still choose to encrypt new cloud disks when you purchase the disks. * * @param request - DisableDiskEncryptionByDefaultRequest * @returns DisableDiskEncryptionByDefaultResponse */ async disableDiskEncryptionByDefault(request: $_model.DisableDiskEncryptionByDefaultRequest): Promise<$_model.DisableDiskEncryptionByDefaultResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.disableDiskEncryptionByDefaultWithOptions(request, runtime); } /** * Disables Elastic Network Interface (ENI) QoS speed setting. * * @param request - DisableNetworkInterfaceQoSRequest * @param runtime - runtime options for this request RuntimeOptions * @returns DisableNetworkInterfaceQoSResponse */ async disableNetworkInterfaceQoSWithOptions(request: $_model.DisableNetworkInterfaceQoSRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DisableNetworkInterfaceQoSResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.networkInterfaceId)) { query["NetworkInterfaceId"] = request.networkInterfaceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "DisableNetworkInterfaceQoS", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.DisableNetworkInterfaceQoSResponse>(await this.callApi(params, req, runtime), new $_model.DisableNetworkInterfaceQoSResponse({})); } /** * Disables Elastic Network Interface (ENI) QoS speed setting. * * @param request - DisableNetworkInterfaceQoSRequest * @returns DisableNetworkInterfaceQoSResponse */ async disableNetworkInterfaceQoS(request: $_model.DisableNetworkInterfaceQoSRequest): Promise<$_model.DisableNetworkInterfaceQoSResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.disableNetworkInterfaceQoSWithOptions(request, runtime); } /** * Enables the Account-level Elastic Block Storage (EBS) Default Encryption feature in a region. * * @remarks * > The Account-level EBS Default Encryption feature is available only in specific regions and to specific users. To use the feature, [submit a ticket](https://smartservice.console.aliyun.com/service/create-ticket-intl). * * **Precautions** * * To enable the Account-level EBS Default Encryption feature as a Resource Access Management (RAM) user, grant the `AliyunECSFullAccess` permission to the RAM user. For more information, see [Grant permissions to a RAM user](https://help.aliyun.com/document_detail/116146.html). * * Before you can enable the Account-level EBS Default Encryption feature in a region, you must [activate Key Management Service (KMS)](https://help.aliyun.com/document_detail/480156.html) in the region. * * After you enable the Account-level EBS Default Encryption feature in a region, you can purchase only encrypted cloud disks in the region. For more information, see the [Limits](~~59643#50de175230erj~~) section of the "Encrypt cloud disks" topic. * * **Considerations** * * After you enable the Account-level EBS Default Encryption feature in a region, new pay-as-you-go and subscription cloud disks in the region must be encrypted. You can use the KMS key configured for the feature or specify other KMS keys to encrypt the cloud disks. * * The first time you enable the Account-level EBS Default Encryption feature in a region, the service key in the region is automatically used to encrypt EBS resources. * * **Suggestions** * * You can call the [DescribeDiskEncryptionByDefaultStatus](https://help.aliyun.com/document_detail/2851493.html) operation to query whether the Account-level EBS Default Encryption feature is enabled in a region and the [DescribeDiskDefaultKMSKeyId](https://help.aliyun.com/document_detail/2851490.html) operation to query the ID of the KMS key used by the feature in a region. * * You can call the [ModifyDiskDefaultKMSKeyId](https://help.aliyun.com/document_detail/2851492.html) or [ResetDiskDefaultKMSKeyId](https://help.aliyun.com/document_detail/2851539.html) operation to change or reset the KMS key used by the Account-level EBS Default Encryption feature in a region. * * You can call the [DisableDiskEncryptionByDefault](https://help.aliyun.com/document_detail/2851491.html) operation to disable the Account-level EBS Default Encryption feature in a region. * * @param request - EnableDiskEncryptionByDefaultRequest * @param runtime - runtime options for this request RuntimeOptions * @returns EnableDiskEncryptionByDefaultResponse */ async enableDiskEncryptionByDefaultWithOptions(request: $_model.EnableDiskEncryptionByDefaultRequest, runtime: $dara.RuntimeOptions): Promise<$_model.EnableDiskEncryptionByDefaultResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "EnableDiskEncryptionByDefault", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.EnableDiskEncryptionByDefaultResponse>(await this.callApi(params, req, runtime), new $_model.EnableDiskEncryptionByDefaultResponse({})); } /** * Enables the Account-level Elastic Block Storage (EBS) Default Encryption feature in a region. * * @remarks * > The Account-level EBS Default Encryption feature is available only in specific regions and to specific users. To use the feature, [submit a ticket](https://smartservice.console.aliyun.com/service/create-ticket-intl). * * **Precautions** * * To enable the Account-level EBS Default Encryption feature as a Resource Access Management (RAM) user, grant the `AliyunECSFullAccess` permission to the RAM user. For more information, see [Grant permissions to a RAM user](https://help.aliyun.com/document_detail/116146.html). * * Before you can enable the Account-level EBS Default Encryption feature in a region, you must [activate Key Management Service (KMS)](https://help.aliyun.com/document_detail/480156.html) in the region. * * After you enable the Account-level EBS Default Encryption feature in a region, you can purchase only encrypted cloud disks in the region. For more information, see the [Limits](~~59643#50de175230erj~~) section of the "Encrypt cloud disks" topic. * * **Considerations** * * After you enable the Account-level EBS Default Encryption feature in a region, new pay-as-you-go and subscription cloud disks in the region must be encrypted. You can use the KMS key configured for the feature or specify other KMS keys to encrypt the cloud disks. * * The first time you enable the Account-level EBS Default Encryption feature in a region, the service key in the region is automatically used to encrypt EBS resources. * * **Suggestions** * * You can call the [DescribeDiskEncryptionByDefaultStatus](https://help.aliyun.com/document_detail/2851493.html) operation to query whether the Account-level EBS Default Encryption feature is enabled in a region and the [DescribeDiskDefaultKMSKeyId](https://help.aliyun.com/document_detail/2851490.html) operation to query the ID of the KMS key used by the feature in a region. * * You can call the [ModifyDiskDefaultKMSKeyId](https://help.aliyun.com/document_detail/2851492.html) or [ResetDiskDefaultKMSKeyId](https://help.aliyun.com/document_detail/2851539.html) operation to change or reset the KMS key used by the Account-level EBS Default Encryption feature in a region. * * You can call the [DisableDiskEncryptionByDefault](https://help.aliyun.com/document_detail/2851491.html) operation to disable the Account-level EBS Default Encryption feature in a region. * * @param request - EnableDiskEncryptionByDefaultRequest * @returns EnableDiskEncryptionByDefaultResponse */ async enableDiskEncryptionByDefault(request: $_model.EnableDiskEncryptionByDefaultRequest): Promise<$_model.EnableDiskEncryptionByDefaultResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.enableDiskEncryptionByDefaultWithOptions(request, runtime); } /** * 启用或修改弹性网卡QoS限速设置 * * @param request - EnableNetworkInterfaceQoSRequest * @param runtime - runtime options for this request RuntimeOptions * @returns EnableNetworkInterfaceQoSResponse */ async enableNetworkInterfaceQoSWithOptions(request: $_model.EnableNetworkInterfaceQoSRequest, runtime: $dara.RuntimeOptions): Promise<$_model.EnableNetworkInterfaceQoSResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.networkInterfaceId)) { query["NetworkInterfaceId"] = request.networkInterfaceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.qoS)) { query["QoS"] = request.qoS; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "EnableNetworkInterfaceQoS", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.EnableNetworkInterfaceQoSResponse>(await this.callApi(params, req, runtime), new $_model.EnableNetworkInterfaceQoSResponse({})); } /** * 启用或修改弹性网卡QoS限速设置 * * @param request - EnableNetworkInterfaceQoSRequest * @returns EnableNetworkInterfaceQoSResponse */ async enableNetworkInterfaceQoS(request: $_model.EnableNetworkInterfaceQoSRequest): Promise<$_model.EnableNetworkInterfaceQoSResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.enableNetworkInterfaceQoSWithOptions(request, runtime); } /** * EnablePhysicalConnection * * @deprecated OpenAPI EnablePhysicalConnection is deprecated, please use Vpc::2016-04-28::EnablePhysicalConnection instead. * * @param request - EnablePhysicalConnectionRequest * @param runtime - runtime options for this request RuntimeOptions * @returns EnablePhysicalConnectionResponse */ async enablePhysicalConnectionWithOptions(request: $_model.EnablePhysicalConnectionRequest, runtime: $dara.RuntimeOptions): Promise<$_model.EnablePhysicalConnectionResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.physicalConnectionId)) { query["PhysicalConnectionId"] = request.physicalConnectionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.userCidr)) { query["UserCidr"] = request.userCidr; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "EnablePhysicalConnection", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.EnablePhysicalConnectionResponse>(await this.callApi(params, req, runtime), new $_model.EnablePhysicalConnectionResponse({})); } /** * EnablePhysicalConnection * * @deprecated OpenAPI EnablePhysicalConnection is deprecated, please use Vpc::2016-04-28::EnablePhysicalConnection instead. * * @param request - EnablePhysicalConnectionRequest * @returns EnablePhysicalConnectionResponse */ // Deprecated async enablePhysicalConnection(request: $_model.EnablePhysicalConnectionRequest): Promise<$_model.EnablePhysicalConnectionResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.enablePhysicalConnectionWithOptions(request, runtime); } /** * Permanently closes a session. * * @remarks * After you closes a session, the session is no longer available. * * The WebSocket URL that is associated with a closed session is invalid and no longer available. * * @param request - EndTerminalSessionRequest * @param runtime - runtime options for this request RuntimeOptions * @returns EndTerminalSessionResponse */ async endTerminalSessionWithOptions(request: $_model.EndTerminalSessionRequest, runtime: $dara.RuntimeOptions): Promise<$_model.EndTerminalSessionResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.sessionId)) { query["SessionId"] = request.sessionId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "EndTerminalSession", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.EndTerminalSessionResponse>(await this.callApi(params, req, runtime), new $_model.EndTerminalSessionResponse({})); } /** * Permanently closes a session. * * @remarks * After you closes a session, the session is no longer available. * * The WebSocket URL that is associated with a closed session is invalid and no longer available. * * @param request - EndTerminalSessionRequest * @returns EndTerminalSessionResponse */ async endTerminalSession(request: $_model.EndTerminalSessionRequest): Promise<$_model.EndTerminalSessionResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.endTerminalSessionWithOptions(request, runtime); } /** * Exports a custom image to an Object Storage Service (OSS) bucket in the same region. * * @remarks * Take note of the following items: * * Make sure that you are familiar with the prerequisites and considerations. For more information, see [Export a custom image](https://help.aliyun.com/document_detail/58181.html). * * The `ImageFormat` parameter is available only for the following regions: Japan (Tokyo), Indonesia (Jakarta), Germany (Frankfurt), UAE (Dubai), US (Virginia), UK (London), Singapore, Malaysia (Kuala Lumpur), and US (Silicon Valley). By default, custom images are exported in the RAW format in regions where the ImageFormat parameter is unsupported. * * Use Resource Access Management (RAM) to authorize Elastic Compute Service (ECS) to write data to OSS. To complete the authorization, perform the following operations: * * Create a role named `AliyunECSImageExportDefaultRole` and attach the following policy to the role: * { * "Statement": [ * { * "Action": "sts:AssumeRole", * "Effect": "Allow", * "Principal": { * "Service": [ * "ecs.aliyuncs.com" * ] * } * } * ], * "Version": "1" * } * * Attach the `AliyunECSImageExportRolePolicy` system policy, which is the default policy that grants ECS the permissions to export images, to the `AliyunECSImageExportDefaultRole` role. For more information, go to the [Cloud Resource Access Authorization](https://ram.console.aliyun.com/?spm=5176.2020520101.0.0.64c64df5dfpmdY#/role/authorize?request=%7B%22Requests%22:%20%7B%22request1%22:%20%7B%22RoleName%22:%20%22AliyunECSImageImportDefaultRole%22,%20%22TemplateId%22:%20%22ECSImportRole%22%7D,%20%22request2%22:%20%7B%22RoleName%22:%20%22AliyunECSImageExportDefaultRole%22,%20%22TemplateId%22:%20%22ECSExportRole%22%7D%7D,%20%22ReturnUrl%22:%20%22https:%2F%2Fecs.console.aliyun.com%2F%22,%20%22Service%22:%20%22ECS%22%7D) page. You can also create a custom policy that contains the following content and attach the policy to the role: * { * "Version": "1", * "Statement": [ * { * "Action": [ * "oss:GetObject", * "oss:PutObject", * "oss:DeleteObject", * "oss:GetBucketLocation", * "oss:GetBucketInfo", * "oss:AbortMultipartUpload", * "oss:ListMultipartUploads", * "oss:ListParts" * ], * "Resource": "*", * "Effect": "Allow" * } * ] * } * After you export the images, take note of the following items: * Each exported custom image is stored in the specified OSS bucket. You can download the custom image. For more information, see [Download OSS objects by using simple download](https://help.aliyun.com/document_detail/31912.html). * * @param request - ExportImageRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ExportImageResponse */ async exportImageWithOptions(request: $_model.ExportImageRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ExportImageResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.dryRun)) { query["DryRun"] = request.dryRun; } if (!$dara.isNull(request.imageFormat)) { query["ImageFormat"] = request.imageFormat; } if (!$dara.isNull(request.imageId)) { query["ImageId"] = request.imageId; } if (!$dara.isNull(request.OSSBucket)) { query["OSSBucket"] = request.OSSBucket; } if (!$dara.isNull(request.OSSPrefix)) { query["OSSPrefix"] = request.OSSPrefix; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.roleName)) { query["RoleName"] = request.roleName; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ExportImage", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ExportImageResponse>(await this.callApi(params, req, runtime), new $_model.ExportImageResponse({})); } /** * Exports a custom image to an Object Storage Service (OSS) bucket in the same region. * * @remarks * Take note of the following items: * * Make sure that you are familiar with the prerequisites and considerations. For more information, see [Export a custom image](https://help.aliyun.com/document_detail/58181.html). * * The `ImageFormat` parameter is available only for the following regions: Japan (Tokyo), Indonesia (Jakarta), Germany (Frankfurt), UAE (Dubai), US (Virginia), UK (London), Singapore, Malaysia (Kuala Lumpur), and US (Silicon Valley). By default, custom images are exported in the RAW format in regions where the ImageFormat parameter is unsupported. * * Use Resource Access Management (RAM) to authorize Elastic Compute Service (ECS) to write data to OSS. To complete the authorization, perform the following operations: * * Create a role named `AliyunECSImageExportDefaultRole` and attach the following policy to the role: * { * "Statement": [ * { * "Action": "sts:AssumeRole", * "Effect": "Allow", * "Principal": { * "Service": [ * "ecs.aliyuncs.com" * ] * } * } * ], * "Version": "1" * } * * Attach the `AliyunECSImageExportRolePolicy` system policy, which is the default policy that grants ECS the permissions to export images, to the `AliyunECSImageExportDefaultRole` role. For more information, go to the [Cloud Resource Access Authorization](https://ram.console.aliyun.com/?spm=5176.2020520101.0.0.64c64df5dfpmdY#/role/authorize?request=%7B%22Requests%22:%20%7B%22request1%22:%20%7B%22RoleName%22:%20%22AliyunECSImageImportDefaultRole%22,%20%22TemplateId%22:%20%22ECSImportRole%22%7D,%20%22request2%22:%20%7B%22RoleName%22:%20%22AliyunECSImageExportDefaultRole%22,%20%22TemplateId%22:%20%22ECSExportRole%22%7D%7D,%20%22ReturnUrl%22:%20%22https:%2F%2Fecs.console.aliyun.com%2F%22,%20%22Service%22:%20%22ECS%22%7D) page. You can also create a custom policy that contains the following content and attach the policy to the role: * { * "Version": "1", * "Statement": [ * { * "Action": [ * "oss:GetObject", * "oss:PutObject", * "oss:DeleteObject", * "oss:GetBucketLocation", * "oss:GetBucketInfo", * "oss:AbortMultipartUpload", * "oss:ListMultipartUploads", * "oss:ListParts" * ], * "Resource": "*", * "Effect": "Allow" * } * ] * } * After you export the images, take note of the following items: * Each exported custom image is stored in the specified OSS bucket. You can download the custom image. For more information, see [Download OSS objects by using simple download](https://help.aliyun.com/document_detail/31912.html). * * @param request - ExportImageRequest * @returns ExportImageResponse */ async exportImage(request: $_model.ExportImageRequest): Promise<$_model.ExportImageResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.exportImageWithOptions(request, runtime); } /** * 将快照导出到指定的对象存储 * * @deprecated OpenAPI ExportSnapshot is deprecated * * @param request - ExportSnapshotRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ExportSnapshotResponse */ async exportSnapshotWithOptions(request: $_model.ExportSnapshotRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ExportSnapshotResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ossBucket)) { query["OssBucket"] = request.ossBucket; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.roleName)) { query["RoleName"] = request.roleName; } if (!$dara.isNull(request.snapshotId)) { query["SnapshotId"] = request.snapshotId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ExportSnapshot", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ExportSnapshotResponse>(await this.callApi(params, req, runtime), new $_model.ExportSnapshotResponse({})); } /** * 将快照导出到指定的对象存储 * * @deprecated OpenAPI ExportSnapshot is deprecated * * @param request - ExportSnapshotRequest * @returns ExportSnapshotResponse */ // Deprecated async exportSnapshot(request: $_model.ExportSnapshotRequest): Promise<$_model.ExportSnapshotResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.exportSnapshotWithOptions(request, runtime); } /** * Queries the command output of an Elastic Compute Service (ECS) instance. The returned command output is encoded in Base64. * * @remarks * ECS is a virtualized cloud-based service and cannot be connected to display devices. Alibaba Cloud caches system command outputs for the last start, restart, or shutdown of ECS instances. You can call the GetInstanceConsoleOutput operation to query the command outputs. * * For instances of the retired instance types, you cannot obtain command outputs. For more information, see [Retired instance types](https://help.aliyun.com/document_detail/55263.html). * * You cannot obtain the command outputs of Windows instances. * * @param request - GetInstanceConsoleOutputRequest * @param runtime - runtime options for this request RuntimeOptions * @returns GetInstanceConsoleOutputResponse */ async getInstanceConsoleOutputWithOptions(request: $_model.GetInstanceConsoleOutputRequest, runtime: $dara.RuntimeOptions): Promise<$_model.GetInstanceConsoleOutputResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.removeSymbols)) { query["RemoveSymbols"] = request.removeSymbols; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "GetInstanceConsoleOutput", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.GetInstanceConsoleOutputResponse>(await this.callApi(params, req, runtime), new $_model.GetInstanceConsoleOutputResponse({})); } /** * Queries the command output of an Elastic Compute Service (ECS) instance. The returned command output is encoded in Base64. * * @remarks * ECS is a virtualized cloud-based service and cannot be connected to display devices. Alibaba Cloud caches system command outputs for the last start, restart, or shutdown of ECS instances. You can call the GetInstanceConsoleOutput operation to query the command outputs. * * For instances of the retired instance types, you cannot obtain command outputs. For more information, see [Retired instance types](https://help.aliyun.com/document_detail/55263.html). * * You cannot obtain the command outputs of Windows instances. * * @param request - GetInstanceConsoleOutputRequest * @returns GetInstanceConsoleOutputResponse */ async getInstanceConsoleOutput(request: $_model.GetInstanceConsoleOutputRequest): Promise<$_model.GetInstanceConsoleOutputResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.getInstanceConsoleOutputWithOptions(request, runtime); } /** * Obtains the screenshots of an Elastic Compute Service (ECS) instance. * * @remarks * After ECS returns a Base64-encoded instance screenshot in the JPG format, you must decode the screenshot. We recommend that you call this operation for troubleshooting and diagnosis. When you call this operation, take note of the following items: * * The instance must be in the Running state. * * For instances of the retired instance types, you cannot obtain screenshots. For more information, see [Retired instance types](https://help.aliyun.com/document_detail/55263.html). * * If you call this operation on an instance for multiple times, the call interval must be at least 10 seconds. Otherwise, the `Throttling` error is returned. * * @param request - GetInstanceScreenshotRequest * @param runtime - runtime options for this request RuntimeOptions * @returns GetInstanceScreenshotResponse */ async getInstanceScreenshotWithOptions(request: $_model.GetInstanceScreenshotRequest, runtime: $dara.RuntimeOptions): Promise<$_model.GetInstanceScreenshotResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.wakeUp)) { query["WakeUp"] = request.wakeUp; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "GetInstanceScreenshot", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.GetInstanceScreenshotResponse>(await this.callApi(params, req, runtime), new $_model.GetInstanceScreenshotResponse({})); } /** * Obtains the screenshots of an Elastic Compute Service (ECS) instance. * * @remarks * After ECS returns a Base64-encoded instance screenshot in the JPG format, you must decode the screenshot. We recommend that you call this operation for troubleshooting and diagnosis. When you call this operation, take note of the following items: * * The instance must be in the Running state. * * For instances of the retired instance types, you cannot obtain screenshots. For more information, see [Retired instance types](https://help.aliyun.com/document_detail/55263.html). * * If you call this operation on an instance for multiple times, the call interval must be at least 10 seconds. Otherwise, the `Throttling` error is returned. * * @param request - GetInstanceScreenshotRequest * @returns GetInstanceScreenshotResponse */ async getInstanceScreenshot(request: $_model.GetInstanceScreenshotRequest): Promise<$_model.GetInstanceScreenshotResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.getInstanceScreenshotWithOptions(request, runtime); } /** * Imports an on-premise image to Elastic Compute Service (ECS). The imported image exists as a custom image in the destination region. You can use the imported image to create ECS instances by calling the RunInstances operation or replace the system disk of an ECS instance by calling the ReplaceSystemDisk operation. * * @remarks * ### [](#)Usage notes * Take note of the following items: * * Before you import an image, you must upload the image to an Object Storage Service (OSS) bucket. For more information, see [Upload objects](https://help.aliyun.com/document_detail/31886.html). * * In specific scenarios, you may want to create a custom image based on the operating system data of a source server, import the image to Alibaba Cloud, and then create an ECS instance from the image. The source server can be a physical server, a virtual machine, or a cloud host. If the virtio driver is not installed on the source server, the created ECS instance may be unable to start. To prevent this issue, verify that the virtio driver is installed on the source server before you import the image to Alibaba Cloud. For more information, see [Install the virtio driver](https://help.aliyun.com/document_detail/62423.html). * * Before you import images for the first time, you must use Resource Access Management (RAM) to authorize ECS to access your OSS buckets. If ECS is not authorized to access your OSS buckets, the `NoSetRoletoECSServiceAccount` or `InvalidOperation.CloudBoxImageImportRoleRequired` error code is returned when you call the ImportImage operation. The authorization configuration varies based on whether the image files are imported from a cloud box. * * **If the image files are not imported from a cloud box**, you can complete the authorization on the [Cloud Resource Access Authorization](https://ram.console.aliyun.com/?spm=5176.2020520101image.0.0.2ffa4df57kSoHX#/role/authorize?request=%7B%22Requests%22%3A%20%7B%22request1%22%3A%20%7B%22RoleName%22%3A%20%22AliyunECSImageImportDefaultRole%22%2C%20%22TemplateId%22%3A%20%22ECSImportRole%22%7D%2C%20%22request2%22%3A%20%7B%22RoleName%22%3A%20%22AliyunECSImageExportDefaultRole%22%2C%20%22TemplateId%22%3A%20%22ECSExportRole%22%7D%7D%2C%20%22ReturnUrl%22%3A%20%22https%3A//ecs.console.aliyun.com/%22%2C%20%22Service%22%3A%20%22ECS%22%7D) page of the RAM console. You can also complete the authorization by using a RAM role and RAM policies. The following example shows the policies and permissions required for specific steps in the authorization procedure. For more information, see [Control access to ECS resources by using RAM users](https://help.aliyun.com/document_detail/25481.html). * 1. Create a RAM role named `AliyunECSImageImportDefaultRole`. You must use this exact role name. Otherwise, the image cannot be imported. Configure the following trust policy for the role: * { * "Statement": [ * { * "Action": "sts:AssumeRole", * "Effect": "Allow", * "Principal": { * "Service": [ * "ecs.aliyuncs.com" * ] * } * } * ], * "Version": "1" * } * 2. Attach the `AliyunECSImageImportRolePolicy` system policy to the RAM role. You can also create a custom policy that contains the following content and attach the policy to the role: * ``` * { * "Version": "1", * "Statement": [ * { * "Action": [ * "oss:GetObject", * "oss:GetBucketLocation", * "oss:GetBucketInfo" * ], * "Resource": "*", * "Effect": "Allow" * } * ] * } * ``` * * **If the image files are imported from a cloud box**, you can complete the authorization on the [Cloud Resource Access Authorization](https://ram.console.aliyun.com/role/authorize?request=%7B%22ReturnUrl%22%3A%22https%3A%2F%2Fecs.console.aliyun.com%2F%22%2C%22Services%22%3A%5B%7B%22Roles%22%3A%5B%7B%22RoleName%22%3A%22AliyunECSCloudBoxImageImportDefaultRole%22%2C%22TemplateId%22%3A%22AliyunECSCloudBoxImageImportDefaultRole%22%7D%5D%2C%22Service%22%3A%22ECS%22%7D%5D%7D) page of the RAM console. You can also complete the authorization by using a RAM role and RAM policies. The following example shows the policies and permissions required for specific steps in the authorization procedure. For more information, see [Control access to ECS resources by using RAM users](https://help.aliyun.com/document_detail/25481.html). * 1. Create a RAM role named `AliyunECSCloudBoxImageImportDefaultRole`. You must use this exact role name. Otherwise, the image cannot be imported. Configure the following trust policy for the role: * { * "Statement": [ * { * "Action": "sts:AssumeRole", * "Effect": "Allow", * "Principal": { * "Service": [ * "ecs.aliyuncs.com" * ] * } * } * ], * "Version": "1" * } * 2. Attach the `AliyunECSCloudBoxImageImportRolePolicy` system policy to the RAM role. You can also create a custom policy that contains the following content and attach the policy to the role: * ``` * { * "Version": "1", * "Statement": [ * { * "Action": [ * "oss-cloudbox:GetObject", * "oss-cloudbox:GetBucketLocation", * "oss-cloudbox:GetBucketInfo" * ], * "Resource": "*", * "Effect": "Allow" * } * ] * } * ``` * * You cannot delete an image that is being imported. However, you can call the [CancelTask](https://help.aliyun.com/document_detail/25624.html) operation to cancel the image import task. * * You can import an image only to the same region as the OSS bucket to which the image file is uploaded. * * The valid values of N in `DiskDeviceMapping.N` range from 1 to 17. When N is set to 1, the disk is a system disk. When N is set to a value from 2 to 17, the disk is a data disk. When N is set to a value greater than 17, parameters prefixed with DiskDeviceMapping.N are ignored. * * When you set `Architecture` to `arm64` or when you set `Platform` to `CentOS Stream`, `Anolis`, `AlmaLinux`, `UOS`, `Kylin`, or `Rocky Linux`, take note of the following items: * * To ensure that the password can be set or the key pair can be modified for an imported image, make sure that the image meets the following requirements before you import it: * * The kernel of the operating system supports the `CONFIG_FW_CFG_SYSFS` feature. By default, Linux community kernel 4.6 and later and CentOS kernel 3.10.0-826.el7 and later support the CONFIG_FW_CFG_SYSFS feature. You can run the `grep -nr CONFIG_FW_CFG_SYSFS /boot/config-$(uname -r)` command on the source server of the image. If the command output contains `CONFIG_FW_CFG_SYSFS=y`, the kernel of the image supports the `CONFIG_FW_CFG_SYSFS` feature. * * Alibaba Cloud cloud-init of the latest version is installed on the operating system. If the version of cloud-init is 19.1, the minor version must be 19.1.3 or later. If the version of cloud-init is 0.7.6a in some early versions of operating systems, the minor version must be 0.7.6a15 or later. For more information, see [Install cloud-init](https://help.aliyun.com/document_detail/57803.html). * * The operating system supports the SHA-512 encryption algorithm. * * If you want an imported image to support the resizing of disks and file systems, make sure that the image meets the following requirements before you import it: * * The kernel version of the operating system is later than 3.6. * * The image supports the growpart command. To support this command, you must install the `cloud-utils-growpart` package. The methods of installing the package vary based on operating systems. For more information, see [Extend the partitions and file systems of disks on a Linux instance](https://help.aliyun.com/document_detail/25451.html). * * The image supports the resize2fs command. To support this command, you must install the `e2fsprogs` package. By default, the package is installed on the operating system. If the package is not installed, install it. * * Alibaba Cloud cloud-init of the latest version is installed on the operating system. If the version of cloud-init is 19.1, the minor version must be 19.1.3 or later. If the version of cloud-init is 0.7.6a in some early versions of operating systems, the minor version must be 0.7.6a15 or later. For more information, see [Install cloud-init](https://help.aliyun.com/document_detail/57803.html). * * If the image that you want to import uses the Arm64 architecture, configure the real-time clock (RTC) to use the Coordinated Universal Time (UTC) time standard. For more information, see [Linux time and time zones](https://help.aliyun.com/document_detail/405080.html). * * When you import images, we recommend that you specify DetectionStrategy. This way, you can optimize the images based on the image check results. For more information, see [Overview of image check](https://help.aliyun.com/document_detail/439819.html). * * @param request - ImportImageRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ImportImageResponse */ async importImageWithOptions(request: $_model.ImportImageRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ImportImageResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.architecture)) { query["Architecture"] = request.architecture; } if (!$dara.isNull(request.bootMode)) { query["BootMode"] = request.bootMode; } if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.detectionStrategy)) { query["DetectionStrategy"] = request.detectionStrategy; } if (!$dara.isNull(request.diskDeviceMapping)) { query["DiskDeviceMapping"] = request.diskDeviceMapping; } if (!$dara.isNull(request.dryRun)) { query["DryRun"] = request.dryRun; } if (!$dara.isNull(request.features)) { query["Features"] = request.features; } if (!$dara.isNull(request.imageName)) { query["ImageName"] = request.imageName; } if (!$dara.isNull(request.licenseType)) { query["LicenseType"] = request.licenseType; } if (!$dara.isNull(request.OSType)) { query["OSType"] = request.OSType; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.platform)) { query["Platform"] = request.platform; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.roleName)) { query["RoleName"] = request.roleName; } if (!$dara.isNull(request.storageLocationArn)) { query["StorageLocationArn"] = request.storageLocationArn; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ImportImage", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ImportImageResponse>(await this.callApi(params, req, runtime), new $_model.ImportImageResponse({})); } /** * Imports an on-premise image to Elastic Compute Service (ECS). The imported image exists as a custom image in the destination region. You can use the imported image to create ECS instances by calling the RunInstances operation or replace the system disk of an ECS instance by calling the ReplaceSystemDisk operation. * * @remarks * ### [](#)Usage notes * Take note of the following items: * * Before you import an image, you must upload the image to an Object Storage Service (OSS) bucket. For more information, see [Upload objects](https://help.aliyun.com/document_detail/31886.html). * * In specific scenarios, you may want to create a custom image based on the operating system data of a source server, import the image to Alibaba Cloud, and then create an ECS instance from the image. The source server can be a physical server, a virtual machine, or a cloud host. If the virtio driver is not installed on the source server, the created ECS instance may be unable to start. To prevent this issue, verify that the virtio driver is installed on the source server before you import the image to Alibaba Cloud. For more information, see [Install the virtio driver](https://help.aliyun.com/document_detail/62423.html). * * Before you import images for the first time, you must use Resource Access Management (RAM) to authorize ECS to access your OSS buckets. If ECS is not authorized to access your OSS buckets, the `NoSetRoletoECSServiceAccount` or `InvalidOperation.CloudBoxImageImportRoleRequired` error code is returned when you call the ImportImage operation. The authorization configuration varies based on whether the image files are imported from a cloud box. * * **If the image files are not imported from a cloud box**, you can complete the authorization on the [Cloud Resource Access Authorization](https://ram.console.aliyun.com/?spm=5176.2020520101image.0.0.2ffa4df57kSoHX#/role/authorize?request=%7B%22Requests%22%3A%20%7B%22request1%22%3A%20%7B%22RoleName%22%3A%20%22AliyunECSImageImportDefaultRole%22%2C%20%22TemplateId%22%3A%20%22ECSImportRole%22%7D%2C%20%22request2%22%3A%20%7B%22RoleName%22%3A%20%22AliyunECSImageExportDefaultRole%22%2C%20%22TemplateId%22%3A%20%22ECSExportRole%22%7D%7D%2C%20%22ReturnUrl%22%3A%20%22https%3A//ecs.console.aliyun.com/%22%2C%20%22Service%22%3A%20%22ECS%22%7D) page of the RAM console. You can also complete the authorization by using a RAM role and RAM policies. The following example shows the policies and permissions required for specific steps in the authorization procedure. For more information, see [Control access to ECS resources by using RAM users](https://help.aliyun.com/document_detail/25481.html). * 1. Create a RAM role named `AliyunECSImageImportDefaultRole`. You must use this exact role name. Otherwise, the image cannot be imported. Configure the following trust policy for the role: * { * "Statement": [ * { * "Action": "sts:AssumeRole", * "Effect": "Allow", * "Principal": { * "Service": [ * "ecs.aliyuncs.com" * ] * } * } * ], * "Version": "1" * } * 2. Attach the `AliyunECSImageImportRolePolicy` system policy to the RAM role. You can also create a custom policy that contains the following content and attach the policy to the role: * ``` * { * "Version": "1", * "Statement": [ * { * "Action": [ * "oss:GetObject", * "oss:GetBucketLocation", * "oss:GetBucketInfo" * ], * "Resource": "*", * "Effect": "Allow" * } * ] * } * ``` * * **If the image files are imported from a cloud box**, you can complete the authorization on the [Cloud Resource Access Authorization](https://ram.console.aliyun.com/role/authorize?request=%7B%22ReturnUrl%22%3A%22https%3A%2F%2Fecs.console.aliyun.com%2F%22%2C%22Services%22%3A%5B%7B%22Roles%22%3A%5B%7B%22RoleName%22%3A%22AliyunECSCloudBoxImageImportDefaultRole%22%2C%22TemplateId%22%3A%22AliyunECSCloudBoxImageImportDefaultRole%22%7D%5D%2C%22Service%22%3A%22ECS%22%7D%5D%7D) page of the RAM console. You can also complete the authorization by using a RAM role and RAM policies. The following example shows the policies and permissions required for specific steps in the authorization procedure. For more information, see [Control access to ECS resources by using RAM users](https://help.aliyun.com/document_detail/25481.html). * 1. Create a RAM role named `AliyunECSCloudBoxImageImportDefaultRole`. You must use this exact role name. Otherwise, the image cannot be imported. Configure the following trust policy for the role: * { * "Statement": [ * { * "Action": "sts:AssumeRole", * "Effect": "Allow", * "Principal": { * "Service": [ * "ecs.aliyuncs.com" * ] * } * } * ], * "Version": "1" * } * 2. Attach the `AliyunECSCloudBoxImageImportRolePolicy` system policy to the RAM role. You can also create a custom policy that contains the following content and attach the policy to the role: * ``` * { * "Version": "1", * "Statement": [ * { * "Action": [ * "oss-cloudbox:GetObject", * "oss-cloudbox:GetBucketLocation", * "oss-cloudbox:GetBucketInfo" * ], * "Resource": "*", * "Effect": "Allow" * } * ] * } * ``` * * You cannot delete an image that is being imported. However, you can call the [CancelTask](https://help.aliyun.com/document_detail/25624.html) operation to cancel the image import task. * * You can import an image only to the same region as the OSS bucket to which the image file is uploaded. * * The valid values of N in `DiskDeviceMapping.N` range from 1 to 17. When N is set to 1, the disk is a system disk. When N is set to a value from 2 to 17, the disk is a data disk. When N is set to a value greater than 17, parameters prefixed with DiskDeviceMapping.N are ignored. * * When you set `Architecture` to `arm64` or when you set `Platform` to `CentOS Stream`, `Anolis`, `AlmaLinux`, `UOS`, `Kylin`, or `Rocky Linux`, take note of the following items: * * To ensure that the password can be set or the key pair can be modified for an imported image, make sure that the image meets the following requirements before you import it: * * The kernel of the operating system supports the `CONFIG_FW_CFG_SYSFS` feature. By default, Linux community kernel 4.6 and later and CentOS kernel 3.10.0-826.el7 and later support the CONFIG_FW_CFG_SYSFS feature. You can run the `grep -nr CONFIG_FW_CFG_SYSFS /boot/config-$(uname -r)` command on the source server of the image. If the command output contains `CONFIG_FW_CFG_SYSFS=y`, the kernel of the image supports the `CONFIG_FW_CFG_SYSFS` feature. * * Alibaba Cloud cloud-init of the latest version is installed on the operating system. If the version of cloud-init is 19.1, the minor version must be 19.1.3 or later. If the version of cloud-init is 0.7.6a in some early versions of operating systems, the minor version must be 0.7.6a15 or later. For more information, see [Install cloud-init](https://help.aliyun.com/document_detail/57803.html). * * The operating system supports the SHA-512 encryption algorithm. * * If you want an imported image to support the resizing of disks and file systems, make sure that the image meets the following requirements before you import it: * * The kernel version of the operating system is later than 3.6. * * The image supports the growpart command. To support this command, you must install the `cloud-utils-growpart` package. The methods of installing the package vary based on operating systems. For more information, see [Extend the partitions and file systems of disks on a Linux instance](https://help.aliyun.com/document_detail/25451.html). * * The image supports the resize2fs command. To support this command, you must install the `e2fsprogs` package. By default, the package is installed on the operating system. If the package is not installed, install it. * * Alibaba Cloud cloud-init of the latest version is installed on the operating system. If the version of cloud-init is 19.1, the minor version must be 19.1.3 or later. If the version of cloud-init is 0.7.6a in some early versions of operating systems, the minor version must be 0.7.6a15 or later. For more information, see [Install cloud-init](https://help.aliyun.com/document_detail/57803.html). * * If the image that you want to import uses the Arm64 architecture, configure the real-time clock (RTC) to use the Coordinated Universal Time (UTC) time standard. For more information, see [Linux time and time zones](https://help.aliyun.com/document_detail/405080.html). * * When you import images, we recommend that you specify DetectionStrategy. This way, you can optimize the images based on the image check results. For more information, see [Overview of image check](https://help.aliyun.com/document_detail/439819.html). * * @param request - ImportImageRequest * @returns ImportImageResponse */ async importImage(request: $_model.ImportImageRequest): Promise<$_model.ImportImageResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.importImageWithOptions(request, runtime); } /** * Imports the public key of a Rivest-Shamir-Adleman (RSA) key pair that is generated by a third-party tool. After the key pair is imported, Alibaba Cloud stores the public key. You must securely lock away the private key. * * @remarks * Take note of the following items: * * A maximum of 500 key pairs can be created in each region. * * The key pair to be imported must support one of the following encryption methods: * * rsa * * dsa * * ssh-rsa * * ssh-dss * * ecdsa * * * * * * * * * * * * * * * * @param request - ImportKeyPairRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ImportKeyPairResponse */ async importKeyPairWithOptions(request: $_model.ImportKeyPairRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ImportKeyPairResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.keyPairName)) { query["KeyPairName"] = request.keyPairName; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.publicKeyBody)) { query["PublicKeyBody"] = request.publicKeyBody; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ImportKeyPair", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ImportKeyPairResponse>(await this.callApi(params, req, runtime), new $_model.ImportKeyPairResponse({})); } /** * Imports the public key of a Rivest-Shamir-Adleman (RSA) key pair that is generated by a third-party tool. After the key pair is imported, Alibaba Cloud stores the public key. You must securely lock away the private key. * * @remarks * Take note of the following items: * * A maximum of 500 key pairs can be created in each region. * * The key pair to be imported must support one of the following encryption methods: * * rsa * * dsa * * ssh-rsa * * ssh-dss * * ecdsa * * * * * * * * * * * * * * * * @param request - ImportKeyPairRequest * @returns ImportKeyPairResponse */ async importKeyPair(request: $_model.ImportKeyPairRequest): Promise<$_model.ImportKeyPairResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.importKeyPairWithOptions(request, runtime); } /** * Installs Cloud Assistant Agent on Elastic Compute Service (ECS) instances. After you install Cloud Assistant Agent on ECS instances, restart the instances for the installation to take effect. * * @remarks * ## [](#)Usage notes * After you call the InstallCloudAssistant operation to install Cloud Assistant Agent on an ECS instance, call the [RebootInstance](https://help.aliyun.com/document_detail/25502.html) operation to restart the instance to make the installation take effect. * * @param request - InstallCloudAssistantRequest * @param runtime - runtime options for this request RuntimeOptions * @returns InstallCloudAssistantResponse */ async installCloudAssistantWithOptions(request: $_model.InstallCloudAssistantRequest, runtime: $dara.RuntimeOptions): Promise<$_model.InstallCloudAssistantResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "InstallCloudAssistant", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.InstallCloudAssistantResponse>(await this.callApi(params, req, runtime), new $_model.InstallCloudAssistantResponse({})); } /** * Installs Cloud Assistant Agent on Elastic Compute Service (ECS) instances. After you install Cloud Assistant Agent on ECS instances, restart the instances for the installation to take effect. * * @remarks * ## [](#)Usage notes * After you call the InstallCloudAssistant operation to install Cloud Assistant Agent on an ECS instance, call the [RebootInstance](https://help.aliyun.com/document_detail/25502.html) operation to restart the instance to make the installation take effect. * * @param request - InstallCloudAssistantRequest * @returns InstallCloudAssistantResponse */ async installCloudAssistant(request: $_model.InstallCloudAssistantRequest): Promise<$_model.InstallCloudAssistantResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.installCloudAssistantWithOptions(request, runtime); } /** * Runs a Cloud Assistant command on one or more Elastic Compute Service (ECS) instances. When you call this operation, you can specify parameters, such as CommandId, InstanceId, and ResourceGroupId, in the request. * * @remarks * ## [](#)Usage notes * * The ECS instances on which you want to run the Cloud Assistant command must meet the following requirements. If multiple ECS instances are specified and one of the instances does not meet the requirements for running the command, the call fails. You must specify instances that meet the requirements and call the InvokeCommand operation again. * * The instances are in the Running (`Running`) state. You can call the [DescribeInstances](https://help.aliyun.com/document_detail/25506.html) operation to query the status of instances. * * Cloud Assistant Agent is installed on the instances. For more information, see [Install Cloud Assistant Agent](https://help.aliyun.com/document_detail/64921.html). * * If the command is a PowerShell command, make sure that the instances have the PowerShell module configured. * * You can configure the command to run only once on the instances. * * You can configure the command to run on the instances based on a schedule. * * The schedule is specified by Frequency. The results of each execution of the command do not affect the next execution of the command. * * When you use a cron expression to specify a schedule, you can specify a time zone based on your business requirements. If you do not specify a time zone, the schedule is determined by the system time of the instances. Make sure that the time or time zone of the instances meets your business requirements. For more information, see [Manage the time synchronization service](https://help.aliyun.com/document_detail/92704.html). * To ensure that scheduled tasks can run as expected, make sure that the version of Cloud Assistant Agent is not earlier than the following versions. A scheduled task can run a command at a fixed interval, only once at a specific time, or at specific times based on a cron expression in a specified year or time zone. If the ClientNeedUpgrade error code is returned, you must upgrade Cloud Assistant Agent to the latest version. For more information, see [Upgrade or disable upgrades for Cloud Assistant Agent](https://help.aliyun.com/document_detail/134383.html). * * Linux: 2.2.3.282 * * Windows: 2.1.3.282 * * Command executions may fail due to instance status exceptions, network exceptions, or exceptions on Cloud Assistant Agent. If a command execution fails, no execution information is generated. For more information, see [Check execution results and troubleshoot common issues](https://help.aliyun.com/document_detail/87029.html). * * If you enable the custom parameter feature when you create the command, you must specify custom parameters (`Parameters`) to run the command. * * Before you run the command on instances, especially new instances, we recommend that you call the [DescribeCloudAssistantStatus](https://help.aliyun.com/document_detail/87346.html) operation to query the status of Cloud Assistant Agent on the instances and run the command when the value of CloudAssistantStatus in the response is true for the instances. * * @param tmpReq - InvokeCommandRequest * @param runtime - runtime options for this request RuntimeOptions * @returns InvokeCommandResponse */ async invokeCommandWithOptions(tmpReq: $_model.InvokeCommandRequest, runtime: $dara.RuntimeOptions): Promise<$_model.InvokeCommandResponse> { tmpReq.validate(); let request = new $_model.InvokeCommandShrinkRequest({ }); OpenApiUtil.convert(tmpReq, request); if (!$dara.isNull(tmpReq.parameters)) { request.parametersShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.parameters, "Parameters", "json"); } let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.commandId)) { query["CommandId"] = request.commandId; } if (!$dara.isNull(request.containerId)) { query["ContainerId"] = request.containerId; } if (!$dara.isNull(request.containerName)) { query["ContainerName"] = request.containerName; } if (!$dara.isNull(request.frequency)) { query["Frequency"] = request.frequency; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.launcher)) { query["Launcher"] = request.launcher; } if (!$dara.isNull(request.ossOutputDelivery)) { query["OssOutputDelivery"] = request.ossOutputDelivery; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.parametersShrink)) { query["Parameters"] = request.parametersShrink; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.repeatMode)) { query["RepeatMode"] = request.repeatMode; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.resourceTag)) { query["ResourceTag"] = request.resourceTag; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } if (!$dara.isNull(request.terminationMode)) { query["TerminationMode"] = request.terminationMode; } if (!$dara.isNull(request.timed)) { query["Timed"] = request.timed; } if (!$dara.isNull(request.timeout)) { query["Timeout"] = request.timeout; } if (!$dara.isNull(request.username)) { query["Username"] = request.username; } if (!$dara.isNull(request.windowsPasswordName)) { query["WindowsPasswordName"] = request.windowsPasswordName; } if (!$dara.isNull(request.workingDir)) { query["WorkingDir"] = request.workingDir; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "InvokeCommand", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.InvokeCommandResponse>(await this.callApi(params, req, runtime), new $_model.InvokeCommandResponse({})); } /** * Runs a Cloud Assistant command on one or more Elastic Compute Service (ECS) instances. When you call this operation, you can specify parameters, such as CommandId, InstanceId, and ResourceGroupId, in the request. * * @remarks * ## [](#)Usage notes * * The ECS instances on which you want to run the Cloud Assistant command must meet the following requirements. If multiple ECS instances are specified and one of the instances does not meet the requirements for running the command, the call fails. You must specify instances that meet the requirements and call the InvokeCommand operation again. * * The instances are in the Running (`Running`) state. You can call the [DescribeInstances](https://help.aliyun.com/document_detail/25506.html) operation to query the status of instances. * * Cloud Assistant Agent is installed on the instances. For more information, see [Install Cloud Assistant Agent](https://help.aliyun.com/document_detail/64921.html). * * If the command is a PowerShell command, make sure that the instances have the PowerShell module configured. * * You can configure the command to run only once on the instances. * * You can configure the command to run on the instances based on a schedule. * * The schedule is specified by Frequency. The results of each execution of the command do not affect the next execution of the command. * * When you use a cron expression to specify a schedule, you can specify a time zone based on your business requirements. If you do not specify a time zone, the schedule is determined by the system time of the instances. Make sure that the time or time zone of the instances meets your business requirements. For more information, see [Manage the time synchronization service](https://help.aliyun.com/document_detail/92704.html). * To ensure that scheduled tasks can run as expected, make sure that the version of Cloud Assistant Agent is not earlier than the following versions. A scheduled task can run a command at a fixed interval, only once at a specific time, or at specific times based on a cron expression in a specified year or time zone. If the ClientNeedUpgrade error code is returned, you must upgrade Cloud Assistant Agent to the latest version. For more information, see [Upgrade or disable upgrades for Cloud Assistant Agent](https://help.aliyun.com/document_detail/134383.html). * * Linux: 2.2.3.282 * * Windows: 2.1.3.282 * * Command executions may fail due to instance status exceptions, network exceptions, or exceptions on Cloud Assistant Agent. If a command execution fails, no execution information is generated. For more information, see [Check execution results and troubleshoot common issues](https://help.aliyun.com/document_detail/87029.html). * * If you enable the custom parameter feature when you create the command, you must specify custom parameters (`Parameters`) to run the command. * * Before you run the command on instances, especially new instances, we recommend that you call the [DescribeCloudAssistantStatus](https://help.aliyun.com/document_detail/87346.html) operation to query the status of Cloud Assistant Agent on the instances and run the command when the value of CloudAssistantStatus in the response is true for the instances. * * @param request - InvokeCommandRequest * @returns InvokeCommandResponse */ async invokeCommand(request: $_model.InvokeCommandRequest): Promise<$_model.InvokeCommandResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.invokeCommandWithOptions(request, runtime); } /** * Adds an Elastic Compute Service (ECS) resource or service to a resource group. * * @remarks * ## [](#)Usage notes * A resource is a cloud service entity that you create on Alibaba Cloud, such as an ECS instance, an elastic network interface (ENI), or an image. A resource group is a collection of infrastructure for projects, environments, or stacks. In a resource group, you can manage resources and monitor and run tasks in a centralized manner without the need to switch between Alibaba Cloud services. * * @param request - JoinResourceGroupRequest * @param runtime - runtime options for this request RuntimeOptions * @returns JoinResourceGroupResponse */ async joinResourceGroupWithOptions(request: $_model.JoinResourceGroupRequest, runtime: $dara.RuntimeOptions): Promise<$_model.JoinResourceGroupResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceId)) { query["ResourceId"] = request.resourceId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.resourceType)) { query["ResourceType"] = request.resourceType; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "JoinResourceGroup", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.JoinResourceGroupResponse>(await this.callApi(params, req, runtime), new $_model.JoinResourceGroupResponse({})); } /** * Adds an Elastic Compute Service (ECS) resource or service to a resource group. * * @remarks * ## [](#)Usage notes * A resource is a cloud service entity that you create on Alibaba Cloud, such as an ECS instance, an elastic network interface (ENI), or an image. A resource group is a collection of infrastructure for projects, environments, or stacks. In a resource group, you can manage resources and monitor and run tasks in a centralized manner without the need to switch between Alibaba Cloud services. * * @param request - JoinResourceGroupRequest * @returns JoinResourceGroupResponse */ async joinResourceGroup(request: $_model.JoinResourceGroupRequest): Promise<$_model.JoinResourceGroupResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.joinResourceGroupWithOptions(request, runtime); } /** * Adds an Elastic Compute Service (ECS) instance or an elastic network interface (ENI) to a specified security group. * * @remarks * > This operation is not recommended. We recommend that you call the [ModifyInstanceAttribute](https://help.aliyun.com/document_detail/25503.html) operation to add an instance to or remove an instance from a security group, and call the [ModifyNetworkInterfaceAttribute](https://help.aliyun.com/document_detail/58513.html) operation to add an ENI to or remove an ENI from a security group. * * An instance and an ENI cannot be added to a security group at the same time. You cannot specify `InstanceId` and `NetworkInterfaceId` at the same time in a request. * * The security group and the ECS instance to be added to the security group must reside in the same region. * * The security group and the instance must be of the same network type. If the network type is Virtual Private Cloud (VPC), the security group and the instance must reside in the same VPC. * * Before you add an instance to a security group, the instance must be in the **Stopped** or **Running** state. * * An instance can be added to up to five security groups by default. For more information, see [Security group limits](~~25412#SecurityGroupQuota1~~). * * @param request - JoinSecurityGroupRequest * @param runtime - runtime options for this request RuntimeOptions * @returns JoinSecurityGroupResponse */ async joinSecurityGroupWithOptions(request: $_model.JoinSecurityGroupRequest, runtime: $dara.RuntimeOptions): Promise<$_model.JoinSecurityGroupResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.networkInterfaceId)) { query["NetworkInterfaceId"] = request.networkInterfaceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.securityGroupId)) { query["SecurityGroupId"] = request.securityGroupId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "JoinSecurityGroup", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.JoinSecurityGroupResponse>(await this.callApi(params, req, runtime), new $_model.JoinSecurityGroupResponse({})); } /** * Adds an Elastic Compute Service (ECS) instance or an elastic network interface (ENI) to a specified security group. * * @remarks * > This operation is not recommended. We recommend that you call the [ModifyInstanceAttribute](https://help.aliyun.com/document_detail/25503.html) operation to add an instance to or remove an instance from a security group, and call the [ModifyNetworkInterfaceAttribute](https://help.aliyun.com/document_detail/58513.html) operation to add an ENI to or remove an ENI from a security group. * * An instance and an ENI cannot be added to a security group at the same time. You cannot specify `InstanceId` and `NetworkInterfaceId` at the same time in a request. * * The security group and the ECS instance to be added to the security group must reside in the same region. * * The security group and the instance must be of the same network type. If the network type is Virtual Private Cloud (VPC), the security group and the instance must reside in the same VPC. * * Before you add an instance to a security group, the instance must be in the **Stopped** or **Running** state. * * An instance can be added to up to five security groups by default. For more information, see [Security group limits](~~25412#SecurityGroupQuota1~~). * * @param request - JoinSecurityGroupRequest * @returns JoinSecurityGroupResponse */ async joinSecurityGroup(request: $_model.JoinSecurityGroupRequest): Promise<$_model.JoinSecurityGroupResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.joinSecurityGroupWithOptions(request, runtime); } /** * Removes an Elastic Compute Service (ECS) instance or an elastic network interface (ENI) from a security group. * * @remarks * > This operation is not recommended. We recommend that you call the [ModifyInstanceAttribute](https://help.aliyun.com/document_detail/25503.html) operation to add an instance to or remove an instance from a security group, and call the [ModifyNetworkInterfaceAttribute](https://help.aliyun.com/document_detail/58513.html) operation to add an ENI to or remove an ENI from a security group. * > Alibaba Cloud modified verification rules for the LeaveSecurityGroup operation on July 8, 2024. When you remove an ECS instance or ENI that does not belong to a security group from the security group, the "InvalidSecurityGroupAssociation.NotFound" error code is returned instead of a success response. Update the LeaveSecurityGroup operation to use the new verification rules with the new error code based on your business requirements. * * You cannot remove an instance and an ENI from a security group at the same time. This indicates that you cannot specify `InstanceId` and `NetworkInterfaceId` in one request. * * Before you remove an instance from a security group, the instance must be in the **Stopped** (Stopped) or **Running** (Running) state. * * An instance or ENI must be added to at least one security group. If you remove an instance or ENI from the only security group, the removal request fails and an error is returned. * * When you remove an instance or ENI that is not in a security group from the security group, the removal request fails and an error is returned. * * @param request - LeaveSecurityGroupRequest * @param runtime - runtime options for this request RuntimeOptions * @returns LeaveSecurityGroupResponse */ async leaveSecurityGroupWithOptions(request: $_model.LeaveSecurityGroupRequest, runtime: $dara.RuntimeOptions): Promise<$_model.LeaveSecurityGroupResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.networkInterfaceId)) { query["NetworkInterfaceId"] = request.networkInterfaceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.securityGroupId)) { query["SecurityGroupId"] = request.securityGroupId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "LeaveSecurityGroup", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.LeaveSecurityGroupResponse>(await this.callApi(params, req, runtime), new $_model.LeaveSecurityGroupResponse({})); } /** * Removes an Elastic Compute Service (ECS) instance or an elastic network interface (ENI) from a security group. * * @remarks * > This operation is not recommended. We recommend that you call the [ModifyInstanceAttribute](https://help.aliyun.com/document_detail/25503.html) operation to add an instance to or remove an instance from a security group, and call the [ModifyNetworkInterfaceAttribute](https://help.aliyun.com/document_detail/58513.html) operation to add an ENI to or remove an ENI from a security group. * > Alibaba Cloud modified verification rules for the LeaveSecurityGroup operation on July 8, 2024. When you remove an ECS instance or ENI that does not belong to a security group from the security group, the "InvalidSecurityGroupAssociation.NotFound" error code is returned instead of a success response. Update the LeaveSecurityGroup operation to use the new verification rules with the new error code based on your business requirements. * * You cannot remove an instance and an ENI from a security group at the same time. This indicates that you cannot specify `InstanceId` and `NetworkInterfaceId` in one request. * * Before you remove an instance from a security group, the instance must be in the **Stopped** (Stopped) or **Running** (Running) state. * * An instance or ENI must be added to at least one security group. If you remove an instance or ENI from the only security group, the removal request fails and an error is returned. * * When you remove an instance or ENI that is not in a security group from the security group, the removal request fails and an error is returned. * * @param request - LeaveSecurityGroupRequest * @returns LeaveSecurityGroupResponse */ async leaveSecurityGroup(request: $_model.LeaveSecurityGroupRequest): Promise<$_model.LeaveSecurityGroupResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.leaveSecurityGroupWithOptions(request, runtime); } /** * Queries the states of Cloud Assistant plug-ins on Elastic Compute Service (ECS) instances. * * @remarks * Before you call this operation to query the status of Cloud Assistant plug-ins on ECS instances, make sure that the versions of Cloud Assistant Agent on the instances are not earlier than the following ones: * * 2.2.3.344 for Linux instances * * 2.1.3.344 for Windows instances * * During a paged query, when you call the ListPluginStatus operation to retrieve the first page of results, set `MaxResults` to specify the maximum number of entries to return in the call. The return value of `NextToken` is a pagination token that can be used in the next call to retrieve a new page of results. When you call the ListPluginStatus operation to retrieve a new page of results, set `NextToken` to the `NextToken` value returned in the previous call and set `MaxResults` to specify the maximum number of entries to return in this call. * * @param request - ListPluginStatusRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ListPluginStatusResponse */ async listPluginStatusWithOptions(request: $_model.ListPluginStatusRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ListPluginStatusResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.maxResults)) { query["MaxResults"] = request.maxResults; } if (!$dara.isNull(request.name)) { query["Name"] = request.name; } if (!$dara.isNull(request.nextToken)) { query["NextToken"] = request.nextToken; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.pageNumber)) { query["PageNumber"] = request.pageNumber; } if (!$dara.isNull(request.pageSize)) { query["PageSize"] = request.pageSize; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ListPluginStatus", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ListPluginStatusResponse>(await this.callApi(params, req, runtime), new $_model.ListPluginStatusResponse({})); } /** * Queries the states of Cloud Assistant plug-ins on Elastic Compute Service (ECS) instances. * * @remarks * Before you call this operation to query the status of Cloud Assistant plug-ins on ECS instances, make sure that the versions of Cloud Assistant Agent on the instances are not earlier than the following ones: * * 2.2.3.344 for Linux instances * * 2.1.3.344 for Windows instances * * During a paged query, when you call the ListPluginStatus operation to retrieve the first page of results, set `MaxResults` to specify the maximum number of entries to return in the call. The return value of `NextToken` is a pagination token that can be used in the next call to retrieve a new page of results. When you call the ListPluginStatus operation to retrieve a new page of results, set `NextToken` to the `NextToken` value returned in the previous call and set `MaxResults` to specify the maximum number of entries to return in this call. * * @param request - ListPluginStatusRequest * @returns ListPluginStatusResponse */ async listPluginStatus(request: $_model.ListPluginStatusRequest): Promise<$_model.ListPluginStatusResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.listPluginStatusWithOptions(request, runtime); } /** * Queries the tags that are added to one or more Elastic Compute Service (ECS) resources. * * @remarks * ## [](#)Usage notes * Specify at least one of the following parameters or parameter pairs in a request to determine a query object: * * `ResourceId.N` * * `Tag.N` parameter pair (`Tag.N.Key` and `Tag.N.Value`) * * `TagFilter.N` * If one of the following sets of request parameters is specified as filter conditions, only ECS resources that meet all the specified filter conditions are returned: * * Set 1: `Tag.N.Key, Tag.N.Value` and `ResourceId.N` * * Set 2: `TagFilter.N.TagKey, TagFilter.N.TagValues.N` and `ResourceId.N` * * @param request - ListTagResourcesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ListTagResourcesResponse */ async listTagResourcesWithOptions(request: $_model.ListTagResourcesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ListTagResourcesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.nextToken)) { query["NextToken"] = request.nextToken; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceId)) { query["ResourceId"] = request.resourceId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.resourceType)) { query["ResourceType"] = request.resourceType; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } if (!$dara.isNull(request.tagFilter)) { query["TagFilter"] = request.tagFilter; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ListTagResources", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ListTagResourcesResponse>(await this.callApi(params, req, runtime), new $_model.ListTagResourcesResponse({})); } /** * Queries the tags that are added to one or more Elastic Compute Service (ECS) resources. * * @remarks * ## [](#)Usage notes * Specify at least one of the following parameters or parameter pairs in a request to determine a query object: * * `ResourceId.N` * * `Tag.N` parameter pair (`Tag.N.Key` and `Tag.N.Value`) * * `TagFilter.N` * If one of the following sets of request parameters is specified as filter conditions, only ECS resources that meet all the specified filter conditions are returned: * * Set 1: `Tag.N.Key, Tag.N.Value` and `ResourceId.N` * * Set 2: `TagFilter.N.TagKey, TagFilter.N.TagValues.N` and `ResourceId.N` * * @param request - ListTagResourcesRequest * @returns ListTagResourcesResponse */ async listTagResources(request: $_model.ListTagResourcesRequest): Promise<$_model.ListTagResourcesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.listTagResourcesWithOptions(request, runtime); } /** * Lock the snapshot in compliance mode to prevent it from being accidentally or maliciously deleted. During the snapshot lock period, no user can delete it. * * @remarks * You can also use this operation to reconfigure locked snapshots. The configurable items depend on the lock mode and lock status: * * If a snapshot is locked in compliance mode and is in a cooling-off period, you can extend or shorten the cooling-off period and extend or shorten the lock duration. * * If the snapshot is locked in compliance mode and the cooling-off period has expired, you can only extend the lock duration. * > If you reconfigure a locked snapshot during the cooling-off period, the system will be regarded as a relock operation, and all lock parameters will be reset instead of individual adjustments. * * @param request - LockSnapshotRequest * @param runtime - runtime options for this request RuntimeOptions * @returns LockSnapshotResponse */ async lockSnapshotWithOptions(request: $_model.LockSnapshotRequest, runtime: $dara.RuntimeOptions): Promise<$_model.LockSnapshotResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.coolOffPeriod)) { query["CoolOffPeriod"] = request.coolOffPeriod; } if (!$dara.isNull(request.dryRun)) { query["DryRun"] = request.dryRun; } if (!$dara.isNull(request.lockDuration)) { query["LockDuration"] = request.lockDuration; } if (!$dara.isNull(request.lockMode)) { query["LockMode"] = request.lockMode; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.snapshotId)) { query["SnapshotId"] = request.snapshotId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "LockSnapshot", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.LockSnapshotResponse>(await this.callApi(params, req, runtime), new $_model.LockSnapshotResponse({})); } /** * Lock the snapshot in compliance mode to prevent it from being accidentally or maliciously deleted. During the snapshot lock period, no user can delete it. * * @remarks * You can also use this operation to reconfigure locked snapshots. The configurable items depend on the lock mode and lock status: * * If a snapshot is locked in compliance mode and is in a cooling-off period, you can extend or shorten the cooling-off period and extend or shorten the lock duration. * * If the snapshot is locked in compliance mode and the cooling-off period has expired, you can only extend the lock duration. * > If you reconfigure a locked snapshot during the cooling-off period, the system will be regarded as a relock operation, and all lock parameters will be reset instead of individual adjustments. * * @param request - LockSnapshotRequest * @returns LockSnapshotResponse */ async lockSnapshot(request: $_model.LockSnapshotRequest): Promise<$_model.LockSnapshotResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.lockSnapshotWithOptions(request, runtime); } /** * Modifies the configurations of an auto provisioning group. * * @remarks * Before you call this operation, take note of the following items: * * If you modify the capacity or capacity-related settings of an auto-provisioning group, the group executes a scheduling task after the group is modified. * * You cannot modify an auto-provisioning group when the group is being deleted. * * @param request - ModifyAutoProvisioningGroupRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyAutoProvisioningGroupResponse */ async modifyAutoProvisioningGroupWithOptions(request: $_model.ModifyAutoProvisioningGroupRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyAutoProvisioningGroupResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.autoProvisioningGroupId)) { query["AutoProvisioningGroupId"] = request.autoProvisioningGroupId; } if (!$dara.isNull(request.autoProvisioningGroupName)) { query["AutoProvisioningGroupName"] = request.autoProvisioningGroupName; } if (!$dara.isNull(request.defaultTargetCapacityType)) { query["DefaultTargetCapacityType"] = request.defaultTargetCapacityType; } if (!$dara.isNull(request.excessCapacityTerminationPolicy)) { query["ExcessCapacityTerminationPolicy"] = request.excessCapacityTerminationPolicy; } if (!$dara.isNull(request.launchTemplateConfig)) { query["LaunchTemplateConfig"] = request.launchTemplateConfig; } if (!$dara.isNull(request.maxSpotPrice)) { query["MaxSpotPrice"] = request.maxSpotPrice; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.payAsYouGoTargetCapacity)) { query["PayAsYouGoTargetCapacity"] = request.payAsYouGoTargetCapacity; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.spotTargetCapacity)) { query["SpotTargetCapacity"] = request.spotTargetCapacity; } if (!$dara.isNull(request.terminateInstancesWithExpiration)) { query["TerminateInstancesWithExpiration"] = request.terminateInstancesWithExpiration; } if (!$dara.isNull(request.totalTargetCapacity)) { query["TotalTargetCapacity"] = request.totalTargetCapacity; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyAutoProvisioningGroup", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyAutoProvisioningGroupResponse>(await this.callApi(params, req, runtime), new $_model.ModifyAutoProvisioningGroupResponse({})); } /** * Modifies the configurations of an auto provisioning group. * * @remarks * Before you call this operation, take note of the following items: * * If you modify the capacity or capacity-related settings of an auto-provisioning group, the group executes a scheduling task after the group is modified. * * You cannot modify an auto-provisioning group when the group is being deleted. * * @param request - ModifyAutoProvisioningGroupRequest * @returns ModifyAutoProvisioningGroupResponse */ async modifyAutoProvisioningGroup(request: $_model.ModifyAutoProvisioningGroupRequest): Promise<$_model.ModifyAutoProvisioningGroupResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyAutoProvisioningGroupWithOptions(request, runtime); } /** * Modifies an automatic snapshot policy. For example, you can change the points in time of the day at which to create automatic snapshots, days of the week on which to create automatic snapshots, and retention period of automatic snapshots for the automatic snapshot policy. * * @remarks * Before you call this operation, take note of the following items: * * You cannot modify system policies. * * After an automatic snapshot policy is modified, the modifications immediately take effect on the disks that are associated with the policy. * * If cross-region replication for snapshots is enabled and no encryption parameters are configured, the generated encrypted snapshot copies are encrypted by using the Key Management Service (KMS) encryption keys in the region to which the snapshots are copied. * * @param request - ModifyAutoSnapshotPolicyExRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyAutoSnapshotPolicyExResponse */ async modifyAutoSnapshotPolicyExWithOptions(request: $_model.ModifyAutoSnapshotPolicyExRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyAutoSnapshotPolicyExResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.copiedSnapshotsRetentionDays)) { query["CopiedSnapshotsRetentionDays"] = request.copiedSnapshotsRetentionDays; } if (!$dara.isNull(request.copyEncryptionConfiguration)) { query["CopyEncryptionConfiguration"] = request.copyEncryptionConfiguration; } if (!$dara.isNull(request.enableCrossRegionCopy)) { query["EnableCrossRegionCopy"] = request.enableCrossRegionCopy; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.targetCopyRegions)) { query["TargetCopyRegions"] = request.targetCopyRegions; } if (!$dara.isNull(request.autoSnapshotPolicyId)) { query["autoSnapshotPolicyId"] = request.autoSnapshotPolicyId; } if (!$dara.isNull(request.autoSnapshotPolicyName)) { query["autoSnapshotPolicyName"] = request.autoSnapshotPolicyName; } if (!$dara.isNull(request.regionId)) { query["regionId"] = request.regionId; } if (!$dara.isNull(request.repeatWeekdays)) { query["repeatWeekdays"] = request.repeatWeekdays; } if (!$dara.isNull(request.retentionDays)) { query["retentionDays"] = request.retentionDays; } if (!$dara.isNull(request.timePoints)) { query["timePoints"] = request.timePoints; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyAutoSnapshotPolicyEx", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyAutoSnapshotPolicyExResponse>(await this.callApi(params, req, runtime), new $_model.ModifyAutoSnapshotPolicyExResponse({})); } /** * Modifies an automatic snapshot policy. For example, you can change the points in time of the day at which to create automatic snapshots, days of the week on which to create automatic snapshots, and retention period of automatic snapshots for the automatic snapshot policy. * * @remarks * Before you call this operation, take note of the following items: * * You cannot modify system policies. * * After an automatic snapshot policy is modified, the modifications immediately take effect on the disks that are associated with the policy. * * If cross-region replication for snapshots is enabled and no encryption parameters are configured, the generated encrypted snapshot copies are encrypted by using the Key Management Service (KMS) encryption keys in the region to which the snapshots are copied. * * @param request - ModifyAutoSnapshotPolicyExRequest * @returns ModifyAutoSnapshotPolicyExResponse */ async modifyAutoSnapshotPolicyEx(request: $_model.ModifyAutoSnapshotPolicyExRequest): Promise<$_model.ModifyAutoSnapshotPolicyExResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyAutoSnapshotPolicyExWithOptions(request, runtime); } /** * ModifyBandwidthPackageSpec * * @deprecated OpenAPI ModifyBandwidthPackageSpec is deprecated * * @param request - ModifyBandwidthPackageSpecRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyBandwidthPackageSpecResponse */ async modifyBandwidthPackageSpecWithOptions(request: $_model.ModifyBandwidthPackageSpecRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyBandwidthPackageSpecResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.bandwidth)) { query["Bandwidth"] = request.bandwidth; } if (!$dara.isNull(request.bandwidthPackageId)) { query["BandwidthPackageId"] = request.bandwidthPackageId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyBandwidthPackageSpec", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyBandwidthPackageSpecResponse>(await this.callApi(params, req, runtime), new $_model.ModifyBandwidthPackageSpecResponse({})); } /** * ModifyBandwidthPackageSpec * * @deprecated OpenAPI ModifyBandwidthPackageSpec is deprecated * * @param request - ModifyBandwidthPackageSpecRequest * @returns ModifyBandwidthPackageSpecResponse */ // Deprecated async modifyBandwidthPackageSpec(request: $_model.ModifyBandwidthPackageSpecRequest): Promise<$_model.ModifyBandwidthPackageSpecResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyBandwidthPackageSpecWithOptions(request, runtime); } /** * Modifies the information of a capacity reservation, including the name, description, release mode, and the total number of Elastic Compute Service (ECS) instances for which capacity is reserved. * * @param request - ModifyCapacityReservationRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyCapacityReservationResponse */ async modifyCapacityReservationWithOptions(request: $_model.ModifyCapacityReservationRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyCapacityReservationResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.endTime)) { query["EndTime"] = request.endTime; } if (!$dara.isNull(request.endTimeType)) { query["EndTimeType"] = request.endTimeType; } if (!$dara.isNull(request.instanceAmount)) { query["InstanceAmount"] = request.instanceAmount; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.platform)) { query["Platform"] = request.platform; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.startTime)) { query["StartTime"] = request.startTime; } if (!$dara.isNull(request.privatePoolOptions)) { query["PrivatePoolOptions"] = request.privatePoolOptions; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyCapacityReservation", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyCapacityReservationResponse>(await this.callApi(params, req, runtime), new $_model.ModifyCapacityReservationResponse({})); } /** * Modifies the information of a capacity reservation, including the name, description, release mode, and the total number of Elastic Compute Service (ECS) instances for which capacity is reserved. * * @param request - ModifyCapacityReservationRequest * @returns ModifyCapacityReservationResponse */ async modifyCapacityReservation(request: $_model.ModifyCapacityReservationRequest): Promise<$_model.ModifyCapacityReservationResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyCapacityReservationWithOptions(request, runtime); } /** * Modifies the configurations of a Cloud Assistant feature. * * @param tmpReq - ModifyCloudAssistantSettingsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyCloudAssistantSettingsResponse */ async modifyCloudAssistantSettingsWithOptions(tmpReq: $_model.ModifyCloudAssistantSettingsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyCloudAssistantSettingsResponse> { tmpReq.validate(); let request = new $_model.ModifyCloudAssistantSettingsShrinkRequest({ }); OpenApiUtil.convert(tmpReq, request); if (!$dara.isNull(tmpReq.agentUpgradeConfig)) { request.agentUpgradeConfigShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.agentUpgradeConfig, "AgentUpgradeConfig", "json"); } if (!$dara.isNull(tmpReq.ossDeliveryConfig)) { request.ossDeliveryConfigShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.ossDeliveryConfig, "OssDeliveryConfig", "json"); } if (!$dara.isNull(tmpReq.sessionManagerConfig)) { request.sessionManagerConfigShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.sessionManagerConfig, "SessionManagerConfig", "json"); } if (!$dara.isNull(tmpReq.slsDeliveryConfig)) { request.slsDeliveryConfigShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.slsDeliveryConfig, "SlsDeliveryConfig", "json"); } let query = { }; if (!$dara.isNull(request.agentUpgradeConfigShrink)) { query["AgentUpgradeConfig"] = request.agentUpgradeConfigShrink; } if (!$dara.isNull(request.ossDeliveryConfigShrink)) { query["OssDeliveryConfig"] = request.ossDeliveryConfigShrink; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.sessionManagerConfigShrink)) { query["SessionManagerConfig"] = request.sessionManagerConfigShrink; } if (!$dara.isNull(request.settingType)) { query["SettingType"] = request.settingType; } if (!$dara.isNull(request.slsDeliveryConfigShrink)) { query["SlsDeliveryConfig"] = request.slsDeliveryConfigShrink; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyCloudAssistantSettings", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyCloudAssistantSettingsResponse>(await this.callApi(params, req, runtime), new $_model.ModifyCloudAssistantSettingsResponse({})); } /** * Modifies the configurations of a Cloud Assistant feature. * * @param request - ModifyCloudAssistantSettingsRequest * @returns ModifyCloudAssistantSettingsResponse */ async modifyCloudAssistantSettings(request: $_model.ModifyCloudAssistantSettingsRequest): Promise<$_model.ModifyCloudAssistantSettingsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyCloudAssistantSettingsWithOptions(request, runtime); } /** * Modifies the parameters of a Cloud Assistant command. * * @remarks * You can modify a command when it is run. After the command is modified, the new command content applies to subsequent executions. * You cannot modify the command type. For example, you cannot change a shell command (RunShellScript) to a batch command (RunBatScript). * * @param request - ModifyCommandRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyCommandResponse */ async modifyCommandWithOptions(request: $_model.ModifyCommandRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyCommandResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.commandContent)) { query["CommandContent"] = request.commandContent; } if (!$dara.isNull(request.commandId)) { query["CommandId"] = request.commandId; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.launcher)) { query["Launcher"] = request.launcher; } if (!$dara.isNull(request.name)) { query["Name"] = request.name; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.timeout)) { query["Timeout"] = request.timeout; } if (!$dara.isNull(request.workingDir)) { query["WorkingDir"] = request.workingDir; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyCommand", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyCommandResponse>(await this.callApi(params, req, runtime), new $_model.ModifyCommandResponse({})); } /** * Modifies the parameters of a Cloud Assistant command. * * @remarks * You can modify a command when it is run. After the command is modified, the new command content applies to subsequent executions. * You cannot modify the command type. For example, you cannot change a shell command (RunShellScript) to a batch command (RunBatScript). * * @param request - ModifyCommandRequest * @returns ModifyCommandResponse */ async modifyCommand(request: $_model.ModifyCommandRequest): Promise<$_model.ModifyCommandResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyCommandWithOptions(request, runtime); } /** * Modifies the information about a dedicated host, such as the name, description, and instance migration policy that is applied when the dedicated host fails. * * @remarks * ## [](#)Usage notes * * All Elastic Compute Service (ECS) instances that are hosted on a dedicated host must be in the Stopped (`Stopped`) state before you can modify the CPU overcommit ratio of the dedicated host. * * Changes to the CPU overcommit ratio of a dedicated host do not affect the running status of the dedicated host. After the CPU overcommit ratio is changed, the number of allocated vCPUs on the dedicated host cannot exceed the new total number of vCPUs. Otherwise, ECS instances that use the excess vCPUs cannot start. * * @param request - ModifyDedicatedHostAttributeRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyDedicatedHostAttributeResponse */ async modifyDedicatedHostAttributeWithOptions(request: $_model.ModifyDedicatedHostAttributeRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyDedicatedHostAttributeResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.actionOnMaintenance)) { query["ActionOnMaintenance"] = request.actionOnMaintenance; } if (!$dara.isNull(request.autoPlacement)) { query["AutoPlacement"] = request.autoPlacement; } if (!$dara.isNull(request.cpuOverCommitRatio)) { query["CpuOverCommitRatio"] = request.cpuOverCommitRatio; } if (!$dara.isNull(request.dedicatedHostClusterId)) { query["DedicatedHostClusterId"] = request.dedicatedHostClusterId; } if (!$dara.isNull(request.dedicatedHostId)) { query["DedicatedHostId"] = request.dedicatedHostId; } if (!$dara.isNull(request.dedicatedHostName)) { query["DedicatedHostName"] = request.dedicatedHostName; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.networkAttributes)) { query["NetworkAttributes"] = request.networkAttributes; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyDedicatedHostAttribute", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyDedicatedHostAttributeResponse>(await this.callApi(params, req, runtime), new $_model.ModifyDedicatedHostAttributeResponse({})); } /** * Modifies the information about a dedicated host, such as the name, description, and instance migration policy that is applied when the dedicated host fails. * * @remarks * ## [](#)Usage notes * * All Elastic Compute Service (ECS) instances that are hosted on a dedicated host must be in the Stopped (`Stopped`) state before you can modify the CPU overcommit ratio of the dedicated host. * * Changes to the CPU overcommit ratio of a dedicated host do not affect the running status of the dedicated host. After the CPU overcommit ratio is changed, the number of allocated vCPUs on the dedicated host cannot exceed the new total number of vCPUs. Otherwise, ECS instances that use the excess vCPUs cannot start. * * @param request - ModifyDedicatedHostAttributeRequest * @returns ModifyDedicatedHostAttributeResponse */ async modifyDedicatedHostAttribute(request: $_model.ModifyDedicatedHostAttributeRequest): Promise<$_model.ModifyDedicatedHostAttributeResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyDedicatedHostAttributeWithOptions(request, runtime); } /** * Sets the automatic release time for a pay-as-you-go dedicated host or cancels its automatic release. * * @remarks * ## Usage notes * A pay-as-you-go dedicated host can be automatically released at the specified time. Before you release a pay-as-you-go dedicated host, make sure that the host is no longer required and all necessary application data is backed up. * * @param request - ModifyDedicatedHostAutoReleaseTimeRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyDedicatedHostAutoReleaseTimeResponse */ async modifyDedicatedHostAutoReleaseTimeWithOptions(request: $_model.ModifyDedicatedHostAutoReleaseTimeRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyDedicatedHostAutoReleaseTimeResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.autoReleaseTime)) { query["AutoReleaseTime"] = request.autoReleaseTime; } if (!$dara.isNull(request.dedicatedHostId)) { query["DedicatedHostId"] = request.dedicatedHostId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyDedicatedHostAutoReleaseTime", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyDedicatedHostAutoReleaseTimeResponse>(await this.callApi(params, req, runtime), new $_model.ModifyDedicatedHostAutoReleaseTimeResponse({})); } /** * Sets the automatic release time for a pay-as-you-go dedicated host or cancels its automatic release. * * @remarks * ## Usage notes * A pay-as-you-go dedicated host can be automatically released at the specified time. Before you release a pay-as-you-go dedicated host, make sure that the host is no longer required and all necessary application data is backed up. * * @param request - ModifyDedicatedHostAutoReleaseTimeRequest * @returns ModifyDedicatedHostAutoReleaseTimeResponse */ async modifyDedicatedHostAutoReleaseTime(request: $_model.ModifyDedicatedHostAutoReleaseTimeRequest): Promise<$_model.ModifyDedicatedHostAutoReleaseTimeResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyDedicatedHostAutoReleaseTimeWithOptions(request, runtime); } /** * Enables or disables auto-renewal for one or more subscription dedicated hosts. * * @remarks * If you enable auto-renewal for your subscription dedicated host, the system attempts to deduct the renewal payment at 08:00:00 (UTC+8) nine days before the dedicated host expires to renew the dedicated host. If this deduction attempt fails, the system attempt to deduct the payment at the same point in time the next day. The system attempts to deduct the payment once every day until the dedicated host expires or until the payment is deducted. Make sure that your account balance is sufficient. * * Subscription dedicated hosts can be automatically renewed along with the subscription Elastic Compute Service (ECS) instances hosted on the dedicated hosts. For more information, see the description of the AutoRenewWithEcs parameter. * * @param request - ModifyDedicatedHostAutoRenewAttributeRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyDedicatedHostAutoRenewAttributeResponse */ async modifyDedicatedHostAutoRenewAttributeWithOptions(request: $_model.ModifyDedicatedHostAutoRenewAttributeRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyDedicatedHostAutoRenewAttributeResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.autoRenew)) { query["AutoRenew"] = request.autoRenew; } if (!$dara.isNull(request.autoRenewWithEcs)) { query["AutoRenewWithEcs"] = request.autoRenewWithEcs; } if (!$dara.isNull(request.dedicatedHostIds)) { query["DedicatedHostIds"] = request.dedicatedHostIds; } if (!$dara.isNull(request.duration)) { query["Duration"] = request.duration; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.periodUnit)) { query["PeriodUnit"] = request.periodUnit; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.renewalStatus)) { query["RenewalStatus"] = request.renewalStatus; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyDedicatedHostAutoRenewAttribute", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyDedicatedHostAutoRenewAttributeResponse>(await this.callApi(params, req, runtime), new $_model.ModifyDedicatedHostAutoRenewAttributeResponse({})); } /** * Enables or disables auto-renewal for one or more subscription dedicated hosts. * * @remarks * If you enable auto-renewal for your subscription dedicated host, the system attempts to deduct the renewal payment at 08:00:00 (UTC+8) nine days before the dedicated host expires to renew the dedicated host. If this deduction attempt fails, the system attempt to deduct the payment at the same point in time the next day. The system attempts to deduct the payment once every day until the dedicated host expires or until the payment is deducted. Make sure that your account balance is sufficient. * * Subscription dedicated hosts can be automatically renewed along with the subscription Elastic Compute Service (ECS) instances hosted on the dedicated hosts. For more information, see the description of the AutoRenewWithEcs parameter. * * @param request - ModifyDedicatedHostAutoRenewAttributeRequest * @returns ModifyDedicatedHostAutoRenewAttributeResponse */ async modifyDedicatedHostAutoRenewAttribute(request: $_model.ModifyDedicatedHostAutoRenewAttributeRequest): Promise<$_model.ModifyDedicatedHostAutoRenewAttributeResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyDedicatedHostAutoRenewAttributeWithOptions(request, runtime); } /** * Modifies the information of a dedicated host group, including the name, description, and properties. * * @param request - ModifyDedicatedHostClusterAttributeRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyDedicatedHostClusterAttributeResponse */ async modifyDedicatedHostClusterAttributeWithOptions(request: $_model.ModifyDedicatedHostClusterAttributeRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyDedicatedHostClusterAttributeResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.dedicatedHostClusterId)) { query["DedicatedHostClusterId"] = request.dedicatedHostClusterId; } if (!$dara.isNull(request.dedicatedHostClusterName)) { query["DedicatedHostClusterName"] = request.dedicatedHostClusterName; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyDedicatedHostClusterAttribute", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyDedicatedHostClusterAttributeResponse>(await this.callApi(params, req, runtime), new $_model.ModifyDedicatedHostClusterAttributeResponse({})); } /** * Modifies the information of a dedicated host group, including the name, description, and properties. * * @param request - ModifyDedicatedHostClusterAttributeRequest * @returns ModifyDedicatedHostClusterAttributeResponse */ async modifyDedicatedHostClusterAttribute(request: $_model.ModifyDedicatedHostClusterAttributeRequest): Promise<$_model.ModifyDedicatedHostClusterAttributeResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyDedicatedHostClusterAttributeWithOptions(request, runtime); } /** * Changes the billing method of dedicated hosts. * * @param request - ModifyDedicatedHostsChargeTypeRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyDedicatedHostsChargeTypeResponse */ async modifyDedicatedHostsChargeTypeWithOptions(request: $_model.ModifyDedicatedHostsChargeTypeRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyDedicatedHostsChargeTypeResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.autoPay)) { query["AutoPay"] = request.autoPay; } if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.dedicatedHostChargeType)) { query["DedicatedHostChargeType"] = request.dedicatedHostChargeType; } if (!$dara.isNull(request.dedicatedHostIds)) { query["DedicatedHostIds"] = request.dedicatedHostIds; } if (!$dara.isNull(request.detailFee)) { query["DetailFee"] = request.detailFee; } if (!$dara.isNull(request.dryRun)) { query["DryRun"] = request.dryRun; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.period)) { query["Period"] = request.period; } if (!$dara.isNull(request.periodUnit)) { query["PeriodUnit"] = request.periodUnit; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyDedicatedHostsChargeType", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyDedicatedHostsChargeTypeResponse>(await this.callApi(params, req, runtime), new $_model.ModifyDedicatedHostsChargeTypeResponse({})); } /** * Changes the billing method of dedicated hosts. * * @param request - ModifyDedicatedHostsChargeTypeRequest * @returns ModifyDedicatedHostsChargeTypeResponse */ async modifyDedicatedHostsChargeType(request: $_model.ModifyDedicatedHostsChargeTypeRequest): Promise<$_model.ModifyDedicatedHostsChargeTypeResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyDedicatedHostsChargeTypeWithOptions(request, runtime); } /** * Modifies the name and description of a deployment set. * * @param request - ModifyDeploymentSetAttributeRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyDeploymentSetAttributeResponse */ async modifyDeploymentSetAttributeWithOptions(request: $_model.ModifyDeploymentSetAttributeRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyDeploymentSetAttributeResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.deploymentSetId)) { query["DeploymentSetId"] = request.deploymentSetId; } if (!$dara.isNull(request.deploymentSetName)) { query["DeploymentSetName"] = request.deploymentSetName; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyDeploymentSetAttribute", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyDeploymentSetAttributeResponse>(await this.callApi(params, req, runtime), new $_model.ModifyDeploymentSetAttributeResponse({})); } /** * Modifies the name and description of a deployment set. * * @param request - ModifyDeploymentSetAttributeRequest * @returns ModifyDeploymentSetAttributeResponse */ async modifyDeploymentSetAttribute(request: $_model.ModifyDeploymentSetAttributeRequest): Promise<$_model.ModifyDeploymentSetAttributeResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyDeploymentSetAttributeWithOptions(request, runtime); } /** * Modifies a diagnostic metric set. * * @param request - ModifyDiagnosticMetricSetRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyDiagnosticMetricSetResponse */ async modifyDiagnosticMetricSetWithOptions(request: $_model.ModifyDiagnosticMetricSetRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyDiagnosticMetricSetResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.metricIds)) { query["MetricIds"] = request.metricIds; } if (!$dara.isNull(request.metricSetId)) { query["MetricSetId"] = request.metricSetId; } if (!$dara.isNull(request.metricSetName)) { query["MetricSetName"] = request.metricSetName; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceType)) { query["ResourceType"] = request.resourceType; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyDiagnosticMetricSet", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyDiagnosticMetricSetResponse>(await this.callApi(params, req, runtime), new $_model.ModifyDiagnosticMetricSetResponse({})); } /** * Modifies a diagnostic metric set. * * @param request - ModifyDiagnosticMetricSetRequest * @returns ModifyDiagnosticMetricSetResponse */ async modifyDiagnosticMetricSet(request: $_model.ModifyDiagnosticMetricSetRequest): Promise<$_model.ModifyDiagnosticMetricSetResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyDiagnosticMetricSetWithOptions(request, runtime); } /** * Modifies the name, description, release behavior with ECS instance, snapshot deletion on disk removal, automatic snapshot policy feature, and performance burst feature for one or more block storage devices. * * @remarks * You can use `DiskId` to specify a block storage device and modify the attributes of the device, such as the name and description of the device and whether to release the device together with the associated instance. You can use `DiskIds.N` to specify multiple block storage devices and batch modify the attributes of the devices. * * @param request - ModifyDiskAttributeRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyDiskAttributeResponse */ async modifyDiskAttributeWithOptions(request: $_model.ModifyDiskAttributeRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyDiskAttributeResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.burstingEnabled)) { query["BurstingEnabled"] = request.burstingEnabled; } if (!$dara.isNull(request.deleteAutoSnapshot)) { query["DeleteAutoSnapshot"] = request.deleteAutoSnapshot; } if (!$dara.isNull(request.deleteWithInstance)) { query["DeleteWithInstance"] = request.deleteWithInstance; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.diskId)) { query["DiskId"] = request.diskId; } if (!$dara.isNull(request.diskIds)) { query["DiskIds"] = request.diskIds; } if (!$dara.isNull(request.diskName)) { query["DiskName"] = request.diskName; } if (!$dara.isNull(request.enableAutoSnapshot)) { query["EnableAutoSnapshot"] = request.enableAutoSnapshot; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyDiskAttribute", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyDiskAttributeResponse>(await this.callApi(params, req, runtime), new $_model.ModifyDiskAttributeResponse({})); } /** * Modifies the name, description, release behavior with ECS instance, snapshot deletion on disk removal, automatic snapshot policy feature, and performance burst feature for one or more block storage devices. * * @remarks * You can use `DiskId` to specify a block storage device and modify the attributes of the device, such as the name and description of the device and whether to release the device together with the associated instance. You can use `DiskIds.N` to specify multiple block storage devices and batch modify the attributes of the devices. * * @param request - ModifyDiskAttributeRequest * @returns ModifyDiskAttributeResponse */ async modifyDiskAttribute(request: $_model.ModifyDiskAttributeRequest): Promise<$_model.ModifyDiskAttributeResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyDiskAttributeWithOptions(request, runtime); } /** * Converts the billing method of a data disk attached to a subscription ECS instance between pay-as-you-go and subscription. * * @remarks * For information about how to change the billing method of cloud disks, see [Change the billing methods of a disk](https://help.aliyun.com/document_detail/145018.html). * Take note of the following items: * * Only pay-as-you-go disks can be attached to pay-as-you-go instances, and the billing methods of the disks cannot be changed. * * The instance to which data disks are attached cannot be in the Stopped state due to expiration. * * The price difference is refunded to the payment account that you used. Vouchers that have been redeemed are nonrefundable. * * You cannot change the billing method again within 5 minutes of a successful change. * After you change the billing method, the payment (if any) is automatically completed. Maintain sufficient balance in your account. Otherwise, your order becomes invalid and must be canceled. If your account balance is insufficient, you can set AutoPay to false to generate an unpaid order. Then, log on to the **Expenses and Costs console**, go to the [Orders page](https://usercenter2-intl.aliyun.com/order/list), and pay for the order. * * @param request - ModifyDiskChargeTypeRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyDiskChargeTypeResponse */ async modifyDiskChargeTypeWithOptions(request: $_model.ModifyDiskChargeTypeRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyDiskChargeTypeResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.autoPay)) { query["AutoPay"] = request.autoPay; } if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.diskChargeType)) { query["DiskChargeType"] = request.diskChargeType; } if (!$dara.isNull(request.diskIds)) { query["DiskIds"] = request.diskIds; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyDiskChargeType", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyDiskChargeTypeResponse>(await this.callApi(params, req, runtime), new $_model.ModifyDiskChargeTypeResponse({})); } /** * Converts the billing method of a data disk attached to a subscription ECS instance between pay-as-you-go and subscription. * * @remarks * For information about how to change the billing method of cloud disks, see [Change the billing methods of a disk](https://help.aliyun.com/document_detail/145018.html). * Take note of the following items: * * Only pay-as-you-go disks can be attached to pay-as-you-go instances, and the billing methods of the disks cannot be changed. * * The instance to which data disks are attached cannot be in the Stopped state due to expiration. * * The price difference is refunded to the payment account that you used. Vouchers that have been redeemed are nonrefundable. * * You cannot change the billing method again within 5 minutes of a successful change. * After you change the billing method, the payment (if any) is automatically completed. Maintain sufficient balance in your account. Otherwise, your order becomes invalid and must be canceled. If your account balance is insufficient, you can set AutoPay to false to generate an unpaid order. Then, log on to the **Expenses and Costs console**, go to the [Orders page](https://usercenter2-intl.aliyun.com/order/list), and pay for the order. * * @param request - ModifyDiskChargeTypeRequest * @returns ModifyDiskChargeTypeResponse */ async modifyDiskChargeType(request: $_model.ModifyDiskChargeTypeRequest): Promise<$_model.ModifyDiskChargeTypeResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyDiskChargeTypeWithOptions(request, runtime); } /** * Changes the Key Management Service (KMS) key used by the Account-level Elastic Block Storage (EBS) Default Encryption feature in a region. * * @remarks * To call this operation as a Resource Access Management (RAM) user, grant the `AliyunECSFullAccess` permission to the RAM user. For more information, see [Grant permissions to a RAM user](https://help.aliyun.com/document_detail/116146.html). * * Before you can call this operation in a region, make sure that the Account-level EBS Default Encryption feature is enabled in the region. * * The first time you use a customer master key (CMK), you must use the `AliyunECSDiskEncryptDefaultRole` role to grant Elastic Compute Service (ECS) access to KMS resources. For more information, see [Grant access to KMS keys through RAM roles](https://help.aliyun.com/document_detail/2838993.html). * * @param request - ModifyDiskDefaultKMSKeyIdRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyDiskDefaultKMSKeyIdResponse */ async modifyDiskDefaultKMSKeyIdWithOptions(request: $_model.ModifyDiskDefaultKMSKeyIdRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyDiskDefaultKMSKeyIdResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.KMSKeyId)) { query["KMSKeyId"] = request.KMSKeyId; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyDiskDefaultKMSKeyId", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyDiskDefaultKMSKeyIdResponse>(await this.callApi(params, req, runtime), new $_model.ModifyDiskDefaultKMSKeyIdResponse({})); } /** * Changes the Key Management Service (KMS) key used by the Account-level Elastic Block Storage (EBS) Default Encryption feature in a region. * * @remarks * To call this operation as a Resource Access Management (RAM) user, grant the `AliyunECSFullAccess` permission to the RAM user. For more information, see [Grant permissions to a RAM user](https://help.aliyun.com/document_detail/116146.html). * * Before you can call this operation in a region, make sure that the Account-level EBS Default Encryption feature is enabled in the region. * * The first time you use a customer master key (CMK), you must use the `AliyunECSDiskEncryptDefaultRole` role to grant Elastic Compute Service (ECS) access to KMS resources. For more information, see [Grant access to KMS keys through RAM roles](https://help.aliyun.com/document_detail/2838993.html). * * @param request - ModifyDiskDefaultKMSKeyIdRequest * @returns ModifyDiskDefaultKMSKeyIdResponse */ async modifyDiskDefaultKMSKeyId(request: $_model.ModifyDiskDefaultKMSKeyIdRequest): Promise<$_model.ModifyDiskDefaultKMSKeyIdResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyDiskDefaultKMSKeyIdWithOptions(request, runtime); } /** * Migrates disks to or from a dedicated block storage cluster, or migrates disks between different dedicated block storage clusters. * * @remarks * > The Dedicated Block Storage Cluster feature is available in the following regions: China (Hangzhou), China (Shanghai), China (Beijing), China (Zhangjiakou), China (Ulanqab), China (Shenzhen), China (Heyuan), Indonesia (Jakarta), Germany (Frankfurt), and China South 1 Finance. * Before you call the ModifyDiskDeployment operation, make sure that you fully understand the billing methods and prices of disks and dedicated block storage clusters. In addition, make sure that the dedicated block storage clusters are unexpired and your account has no overdue payments. For more information, see [Dedicated block storage cluster](https://help.aliyun.com/document_detail/208883.html) and [Block storage devices](https://help.aliyun.com/document_detail/179022.html). * Take note of the following items: * * The disks and a dedicated block storage cluster to which you want to migrate the disk must be in the same zone. * * You can migrate only pay-as-you-go disks. If you want to migrate subscription disks, change the disks to pay-as-you-go disks first. For more information, see [Change the billing method of a disk](https://help.aliyun.com/document_detail/145018.html). * * The specifications of disks that you want to migrate to a destination block storage cluster must the same as the disk specifications that the destination dedicated block storage cluster supports. During migration, you can change the specifications of the disks to ensure specification consistency. * * The disk must be in the **In Use** (In_Use) or **Available** (Available) state. * * If the disk is attached to an Elastic Compute Service (ECS) instance, the instance must be in the **Running** (Running) or **Stopped** (Stopped) state. The ECS instance cannot be in the Expired state. * * The performance level of an Enterprise SSD (ESSD) is limited by the ESSD disk size. If you cannot upgrade the performance level of an ESSD, extend the ESSD and try again. For more information, see [ResizeDisk](https://help.aliyun.com/document_detail/25522.html) and [ESSDs](https://help.aliyun.com/document_detail/122389.html). * * An account can perform up to five disk migration tasks in the same region at the same time. * * When a disk is being migrated, you cannot cancel the migration task, create snapshots for the disk, change the disk configurations, resize the disk, mount the disk, unmount the disk, or re-initialize the disk. * > After you migrate a disk to a destination cluster by calling the ModifyDiskDeployment operation, the billing method, disk specifications, and capabilities of the destination cluster take effect immediately on the disk. Alibaba Cloud charges the disk based on the disk category and performance level. For more information, see [Dedicated block storage cluster](https://help.aliyun.com/document_detail/208883.html) and [Block storage devices](https://help.aliyun.com/document_detail/179022.html). * * @param request - ModifyDiskDeploymentRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyDiskDeploymentResponse */ async modifyDiskDeploymentWithOptions(request: $_model.ModifyDiskDeploymentRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyDiskDeploymentResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.diskCategory)) { query["DiskCategory"] = request.diskCategory; } if (!$dara.isNull(request.diskId)) { query["DiskId"] = request.diskId; } if (!$dara.isNull(request.dryRun)) { query["DryRun"] = request.dryRun; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.performanceLevel)) { query["PerformanceLevel"] = request.performanceLevel; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.storageClusterId)) { query["StorageClusterId"] = request.storageClusterId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyDiskDeployment", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyDiskDeploymentResponse>(await this.callApi(params, req, runtime), new $_model.ModifyDiskDeploymentResponse({})); } /** * Migrates disks to or from a dedicated block storage cluster, or migrates disks between different dedicated block storage clusters. * * @remarks * > The Dedicated Block Storage Cluster feature is available in the following regions: China (Hangzhou), China (Shanghai), China (Beijing), China (Zhangjiakou), China (Ulanqab), China (Shenzhen), China (Heyuan), Indonesia (Jakarta), Germany (Frankfurt), and China South 1 Finance. * Before you call the ModifyDiskDeployment operation, make sure that you fully understand the billing methods and prices of disks and dedicated block storage clusters. In addition, make sure that the dedicated block storage clusters are unexpired and your account has no overdue payments. For more information, see [Dedicated block storage cluster](https://help.aliyun.com/document_detail/208883.html) and [Block storage devices](https://help.aliyun.com/document_detail/179022.html). * Take note of the following items: * * The disks and a dedicated block storage cluster to which you want to migrate the disk must be in the same zone. * * You can migrate only pay-as-you-go disks. If you want to migrate subscription disks, change the disks to pay-as-you-go disks first. For more information, see [Change the billing method of a disk](https://help.aliyun.com/document_detail/145018.html). * * The specifications of disks that you want to migrate to a destination block storage cluster must the same as the disk specifications that the destination dedicated block storage cluster supports. During migration, you can change the specifications of the disks to ensure specification consistency. * * The disk must be in the **In Use** (In_Use) or **Available** (Available) state. * * If the disk is attached to an Elastic Compute Service (ECS) instance, the instance must be in the **Running** (Running) or **Stopped** (Stopped) state. The ECS instance cannot be in the Expired state. * * The performance level of an Enterprise SSD (ESSD) is limited by the ESSD disk size. If you cannot upgrade the performance level of an ESSD, extend the ESSD and try again. For more information, see [ResizeDisk](https://help.aliyun.com/document_detail/25522.html) and [ESSDs](https://help.aliyun.com/document_detail/122389.html). * * An account can perform up to five disk migration tasks in the same region at the same time. * * When a disk is being migrated, you cannot cancel the migration task, create snapshots for the disk, change the disk configurations, resize the disk, mount the disk, unmount the disk, or re-initialize the disk. * > After you migrate a disk to a destination cluster by calling the ModifyDiskDeployment operation, the billing method, disk specifications, and capabilities of the destination cluster take effect immediately on the disk. Alibaba Cloud charges the disk based on the disk category and performance level. For more information, see [Dedicated block storage cluster](https://help.aliyun.com/document_detail/208883.html) and [Block storage devices](https://help.aliyun.com/document_detail/179022.html). * * @param request - ModifyDiskDeploymentRequest * @returns ModifyDiskDeploymentResponse */ async modifyDiskDeployment(request: $_model.ModifyDiskDeploymentRequest): Promise<$_model.ModifyDiskDeploymentResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyDiskDeploymentWithOptions(request, runtime); } /** * Changes the disk category of a cloud disk or the performance level of an Enterprise SSD (ESSD). You cannot change the disk categories of Regional ESSDs, basic disks, elastic ephemeral disks, and local disks. * * @remarks * To minimize impacts on your business, change the disk categories or performance levels of cloud disks during off-peak hours. * Take note of the following items: * * To change the performance level of an ESSD, take note of the following items: * * If the ESSD is a subscription ESSD, you can only upgrade its performance level. * * If the ESSD is a pay-as-you-go ESSD, you can upgrade or downgrade its performance level. However, you cannot downgrade the performance level to PL0. * * The ESSD must be in the **In Use** (In_Use) or **Unattached** (Available) state. * * If the ESSD is attached to an Elastic Compute Service (ECS) instance, the instance must be in the **Running** (Running) or **Stopped** (Stopped) state. The instance cannot be in the Expired state or stopped due to an overdue payment. * * If you cannot upgrade the performance level of an ESSD due to the capacity limit, extend the ESSD by calling the [ResizeDisk](https://help.aliyun.com/document_detail/25522.html) operation and then try again. For more information, see [ESSDs](https://help.aliyun.com/document_detail/122389.html). * * For information about the limits on changing the disk category of a cloud disk, see [Change the category of a disk](~~161980#section_s4a_to0_1jx~~). * * For the disk categories to which cloud disks of each disk category can be changed, see [Change the category of a disk](~~161980#eb8bb54032nho~~). * After the disk category of a cloud disk is changed, the billing of the cloud disk has the following changes: * * If the cloud disk is a pay-as-you-go disk, you are charged for the disk based on the new disk category. * * If the cloud disk is a subscription disk, you may be charged additionally based on the price difference between the old and new disk categories and the remaining days of the billing cycle, starting from 00:00 the next day until the end of the subscription period. * For information about the billing of cloud disks, see [Block storage devices](https://help.aliyun.com/document_detail/179022.html). * * @param request - ModifyDiskSpecRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyDiskSpecResponse */ async modifyDiskSpecWithOptions(request: $_model.ModifyDiskSpecRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyDiskSpecResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.destinationZoneId)) { query["DestinationZoneId"] = request.destinationZoneId; } if (!$dara.isNull(request.diskCategory)) { query["DiskCategory"] = request.diskCategory; } if (!$dara.isNull(request.diskId)) { query["DiskId"] = request.diskId; } if (!$dara.isNull(request.dryRun)) { query["DryRun"] = request.dryRun; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.performanceControlOptions)) { query["PerformanceControlOptions"] = request.performanceControlOptions; } if (!$dara.isNull(request.performanceLevel)) { query["PerformanceLevel"] = request.performanceLevel; } if (!$dara.isNull(request.provisionedIops)) { query["ProvisionedIops"] = request.provisionedIops; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyDiskSpec", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyDiskSpecResponse>(await this.callApi(params, req, runtime), new $_model.ModifyDiskSpecResponse({})); } /** * Changes the disk category of a cloud disk or the performance level of an Enterprise SSD (ESSD). You cannot change the disk categories of Regional ESSDs, basic disks, elastic ephemeral disks, and local disks. * * @remarks * To minimize impacts on your business, change the disk categories or performance levels of cloud disks during off-peak hours. * Take note of the following items: * * To change the performance level of an ESSD, take note of the following items: * * If the ESSD is a subscription ESSD, you can only upgrade its performance level. * * If the ESSD is a pay-as-you-go ESSD, you can upgrade or downgrade its performance level. However, you cannot downgrade the performance level to PL0. * * The ESSD must be in the **In Use** (In_Use) or **Unattached** (Available) state. * * If the ESSD is attached to an Elastic Compute Service (ECS) instance, the instance must be in the **Running** (Running) or **Stopped** (Stopped) state. The instance cannot be in the Expired state or stopped due to an overdue payment. * * If you cannot upgrade the performance level of an ESSD due to the capacity limit, extend the ESSD by calling the [ResizeDisk](https://help.aliyun.com/document_detail/25522.html) operation and then try again. For more information, see [ESSDs](https://help.aliyun.com/document_detail/122389.html). * * For information about the limits on changing the disk category of a cloud disk, see [Change the category of a disk](~~161980#section_s4a_to0_1jx~~). * * For the disk categories to which cloud disks of each disk category can be changed, see [Change the category of a disk](~~161980#eb8bb54032nho~~). * After the disk category of a cloud disk is changed, the billing of the cloud disk has the following changes: * * If the cloud disk is a pay-as-you-go disk, you are charged for the disk based on the new disk category. * * If the cloud disk is a subscription disk, you may be charged additionally based on the price difference between the old and new disk categories and the remaining days of the billing cycle, starting from 00:00 the next day until the end of the subscription period. * For information about the billing of cloud disks, see [Block storage devices](https://help.aliyun.com/document_detail/179022.html). * * @param request - ModifyDiskSpecRequest * @returns ModifyDiskSpecResponse */ async modifyDiskSpec(request: $_model.ModifyDiskSpecRequest): Promise<$_model.ModifyDiskSpecResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyDiskSpecWithOptions(request, runtime); } /** * ModifyEipAddressAttribute * * @deprecated OpenAPI ModifyEipAddressAttribute is deprecated, please use Vpc::2016-04-28::ModifyEipAddressAttribute instead. * * @param request - ModifyEipAddressAttributeRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyEipAddressAttributeResponse */ async modifyEipAddressAttributeWithOptions(request: $_model.ModifyEipAddressAttributeRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyEipAddressAttributeResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.allocationId)) { query["AllocationId"] = request.allocationId; } if (!$dara.isNull(request.bandwidth)) { query["Bandwidth"] = request.bandwidth; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyEipAddressAttribute", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyEipAddressAttributeResponse>(await this.callApi(params, req, runtime), new $_model.ModifyEipAddressAttributeResponse({})); } /** * ModifyEipAddressAttribute * * @deprecated OpenAPI ModifyEipAddressAttribute is deprecated, please use Vpc::2016-04-28::ModifyEipAddressAttribute instead. * * @param request - ModifyEipAddressAttributeRequest * @returns ModifyEipAddressAttributeResponse */ // Deprecated async modifyEipAddressAttribute(request: $_model.ModifyEipAddressAttributeRequest): Promise<$_model.ModifyEipAddressAttributeResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyEipAddressAttributeWithOptions(request, runtime); } /** * Modifies information about an elasticity assurance, including the name, description, and capacity. Only capacity scale-in is supported . * * @param request - ModifyElasticityAssuranceRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyElasticityAssuranceResponse */ async modifyElasticityAssuranceWithOptions(request: $_model.ModifyElasticityAssuranceRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyElasticityAssuranceResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.instanceAmount)) { query["InstanceAmount"] = request.instanceAmount; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.recurrenceRules)) { query["RecurrenceRules"] = request.recurrenceRules; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.privatePoolOptions)) { query["PrivatePoolOptions"] = request.privatePoolOptions; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyElasticityAssurance", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyElasticityAssuranceResponse>(await this.callApi(params, req, runtime), new $_model.ModifyElasticityAssuranceResponse({})); } /** * Modifies information about an elasticity assurance, including the name, description, and capacity. Only capacity scale-in is supported . * * @param request - ModifyElasticityAssuranceRequest * @returns ModifyElasticityAssuranceResponse */ async modifyElasticityAssurance(request: $_model.ModifyElasticityAssuranceRequest): Promise<$_model.ModifyElasticityAssuranceResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyElasticityAssuranceWithOptions(request, runtime); } /** * Modifies the auto-renewal attribute of elasticity assurances. * * @param request - ModifyElasticityAssuranceAutoRenewAttributeRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyElasticityAssuranceAutoRenewAttributeResponse */ async modifyElasticityAssuranceAutoRenewAttributeWithOptions(request: $_model.ModifyElasticityAssuranceAutoRenewAttributeRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyElasticityAssuranceAutoRenewAttributeResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.period)) { query["Period"] = request.period; } if (!$dara.isNull(request.periodUnit)) { query["PeriodUnit"] = request.periodUnit; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.renewalStatus)) { query["RenewalStatus"] = request.renewalStatus; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.privatePoolOptions)) { query["PrivatePoolOptions"] = request.privatePoolOptions; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyElasticityAssuranceAutoRenewAttribute", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyElasticityAssuranceAutoRenewAttributeResponse>(await this.callApi(params, req, runtime), new $_model.ModifyElasticityAssuranceAutoRenewAttributeResponse({})); } /** * Modifies the auto-renewal attribute of elasticity assurances. * * @param request - ModifyElasticityAssuranceAutoRenewAttributeRequest * @returns ModifyElasticityAssuranceAutoRenewAttributeResponse */ async modifyElasticityAssuranceAutoRenewAttribute(request: $_model.ModifyElasticityAssuranceAutoRenewAttributeRequest): Promise<$_model.ModifyElasticityAssuranceAutoRenewAttributeResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyElasticityAssuranceAutoRenewAttributeWithOptions(request, runtime); } /** * ModifyForwardEntry * * @deprecated OpenAPI ModifyForwardEntry is deprecated, please use Vpc::2016-04-28::ModifyForwardEntry instead. * * @param request - ModifyForwardEntryRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyForwardEntryResponse */ async modifyForwardEntryWithOptions(request: $_model.ModifyForwardEntryRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyForwardEntryResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.externalIp)) { query["ExternalIp"] = request.externalIp; } if (!$dara.isNull(request.externalPort)) { query["ExternalPort"] = request.externalPort; } if (!$dara.isNull(request.forwardEntryId)) { query["ForwardEntryId"] = request.forwardEntryId; } if (!$dara.isNull(request.forwardTableId)) { query["ForwardTableId"] = request.forwardTableId; } if (!$dara.isNull(request.internalIp)) { query["InternalIp"] = request.internalIp; } if (!$dara.isNull(request.internalPort)) { query["InternalPort"] = request.internalPort; } if (!$dara.isNull(request.ipProtocol)) { query["IpProtocol"] = request.ipProtocol; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyForwardEntry", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyForwardEntryResponse>(await this.callApi(params, req, runtime), new $_model.ModifyForwardEntryResponse({})); } /** * ModifyForwardEntry * * @deprecated OpenAPI ModifyForwardEntry is deprecated, please use Vpc::2016-04-28::ModifyForwardEntry instead. * * @param request - ModifyForwardEntryRequest * @returns ModifyForwardEntryResponse */ // Deprecated async modifyForwardEntry(request: $_model.ModifyForwardEntryRequest): Promise<$_model.ModifyForwardEntryResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyForwardEntryWithOptions(request, runtime); } /** * ModifyHaVipAttribute * * @deprecated OpenAPI ModifyHaVipAttribute is deprecated, please use Vpc::2016-04-28::ModifyHaVipAttribute instead. * * @param request - ModifyHaVipAttributeRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyHaVipAttributeResponse */ async modifyHaVipAttributeWithOptions(request: $_model.ModifyHaVipAttributeRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyHaVipAttributeResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.haVipId)) { query["HaVipId"] = request.haVipId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyHaVipAttribute", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyHaVipAttributeResponse>(await this.callApi(params, req, runtime), new $_model.ModifyHaVipAttributeResponse({})); } /** * ModifyHaVipAttribute * * @deprecated OpenAPI ModifyHaVipAttribute is deprecated, please use Vpc::2016-04-28::ModifyHaVipAttribute instead. * * @param request - ModifyHaVipAttributeRequest * @returns ModifyHaVipAttributeResponse */ // Deprecated async modifyHaVipAttribute(request: $_model.ModifyHaVipAttributeRequest): Promise<$_model.ModifyHaVipAttributeResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyHaVipAttributeWithOptions(request, runtime); } /** * Modifies the description of a high performance computing (HPC) cluster. * * @param request - ModifyHpcClusterAttributeRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyHpcClusterAttributeResponse */ async modifyHpcClusterAttributeWithOptions(request: $_model.ModifyHpcClusterAttributeRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyHpcClusterAttributeResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.hpcClusterId)) { query["HpcClusterId"] = request.hpcClusterId; } if (!$dara.isNull(request.name)) { query["Name"] = request.name; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyHpcClusterAttribute", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyHpcClusterAttributeResponse>(await this.callApi(params, req, runtime), new $_model.ModifyHpcClusterAttributeResponse({})); } /** * Modifies the description of a high performance computing (HPC) cluster. * * @param request - ModifyHpcClusterAttributeRequest * @returns ModifyHpcClusterAttributeResponse */ async modifyHpcClusterAttribute(request: $_model.ModifyHpcClusterAttributeRequest): Promise<$_model.ModifyHpcClusterAttributeResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyHpcClusterAttributeWithOptions(request, runtime); } /** * Modifies the attributes of a custom image, such as the image family, name, boot mode, and status and whether the image supports the Non-Volatile Memory Express (NVMe) protocol. When you call this operation, you can specify parameters, such as ImageId and ImageFamily, in the request. * * @param request - ModifyImageAttributeRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyImageAttributeResponse */ async modifyImageAttributeWithOptions(request: $_model.ModifyImageAttributeRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyImageAttributeResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.bootMode)) { query["BootMode"] = request.bootMode; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.dryRun)) { query["DryRun"] = request.dryRun; } if (!$dara.isNull(request.features)) { query["Features"] = request.features; } if (!$dara.isNull(request.imageFamily)) { query["ImageFamily"] = request.imageFamily; } if (!$dara.isNull(request.imageId)) { query["ImageId"] = request.imageId; } if (!$dara.isNull(request.imageName)) { query["ImageName"] = request.imageName; } if (!$dara.isNull(request.licenseType)) { query["LicenseType"] = request.licenseType; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.status)) { query["Status"] = request.status; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyImageAttribute", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyImageAttributeResponse>(await this.callApi(params, req, runtime), new $_model.ModifyImageAttributeResponse({})); } /** * Modifies the attributes of a custom image, such as the image family, name, boot mode, and status and whether the image supports the Non-Volatile Memory Express (NVMe) protocol. When you call this operation, you can specify parameters, such as ImageId and ImageFamily, in the request. * * @param request - ModifyImageAttributeRequest * @returns ModifyImageAttributeResponse */ async modifyImageAttribute(request: $_model.ModifyImageAttributeRequest): Promise<$_model.ModifyImageAttributeResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyImageAttributeWithOptions(request, runtime); } /** * 修改镜像共享组权限 * * @deprecated OpenAPI ModifyImageShareGroupPermission is deprecated, please use Ecs::2014-05-26::ModifyImageSharePermission instead. * * @param request - ModifyImageShareGroupPermissionRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyImageShareGroupPermissionResponse */ async modifyImageShareGroupPermissionWithOptions(request: $_model.ModifyImageShareGroupPermissionRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyImageShareGroupPermissionResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.imageId)) { query["ImageId"] = request.imageId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.addGroup)) { query["AddGroup"] = request.addGroup; } if (!$dara.isNull(request.removeGroup)) { query["RemoveGroup"] = request.removeGroup; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyImageShareGroupPermission", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyImageShareGroupPermissionResponse>(await this.callApi(params, req, runtime), new $_model.ModifyImageShareGroupPermissionResponse({})); } /** * 修改镜像共享组权限 * * @deprecated OpenAPI ModifyImageShareGroupPermission is deprecated, please use Ecs::2014-05-26::ModifyImageSharePermission instead. * * @param request - ModifyImageShareGroupPermissionRequest * @returns ModifyImageShareGroupPermissionResponse */ // Deprecated async modifyImageShareGroupPermission(request: $_model.ModifyImageShareGroupPermissionRequest): Promise<$_model.ModifyImageShareGroupPermissionResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyImageShareGroupPermissionWithOptions(request, runtime); } /** * Modifies the share permissions on an image. You can share your custom images with other Alibaba Cloud accounts or publish the images as community images. * * @remarks * Before you call this operation, read [Share a custom image](https://help.aliyun.com/document_detail/25463.html). * When you call this operation, take note of the following sharing rules: * * **Sharing limits**: You can share only the custom images created in your Alibaba Cloud account to other Alibaba Cloud accounts. A custom image can be shared to up to 50 Alibaba Cloud accounts. You can share a custom image to up to 10 Alibaba Cloud accounts at a time. * * **Impacts on an instance**: If an instance was created ([RunInstances](https://help.aliyun.com/document_detail/63440.html)) from a shared image, you cannot re-initialize the system disk of the instance ([ReInitDisk](https://help.aliyun.com/document_detail/25519.html)) after the image owner unshares or deletes the image ([DeleteImage](https://help.aliyun.com/document_detail/25537.html)). * > You can share images encrypted by using customer master keys (CMKs) but cannot share images encrypted by using service keys. When you share an image encrypted by using a service key, an error is reported. If you want to share an image encrypted by using a service key, call the CopyImage operation to copy the image and change the encryption key of the image copy to a CMK. * When you publish or unpublish a community image, take note of the following items: * * **Responsibilities and agreement**: Alibaba Cloud provides only the platform on which community images can be published and managed. The owner of a community image is responsible for the quality and updates of the image. Make sure that you acknowledge and agree to the Community Image Agreement. Otherwise, you cannot publish community images. For more information, see [Publish a community image](https://help.aliyun.com/document_detail/208370.html). * * **Encryption limits**: You cannot publish encrypted images as community images. * * **Openness**: Community images are publicly available. A community image is available to all Alibaba Cloud accounts in the region where the image resides. * * **Feature limits**: You cannot share, export, or copy community images. * * **Unpublication impacts**: After you unpublish a community image, the image is no longer available to other Alibaba Cloud accounts. If an image is shared to other Alibaba Cloud accounts before it is unpublished, the image remains available to the accounts. * * @param request - ModifyImageSharePermissionRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyImageSharePermissionResponse */ async modifyImageSharePermissionWithOptions(request: $_model.ModifyImageSharePermissionRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyImageSharePermissionResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.addAccount)) { query["AddAccount"] = request.addAccount; } if (!$dara.isNull(request.dryRun)) { query["DryRun"] = request.dryRun; } if (!$dara.isNull(request.imageId)) { query["ImageId"] = request.imageId; } if (!$dara.isNull(request.isPublic)) { query["IsPublic"] = request.isPublic; } if (!$dara.isNull(request.launchPermission)) { query["LaunchPermission"] = request.launchPermission; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.removeAccount)) { query["RemoveAccount"] = request.removeAccount; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyImageSharePermission", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyImageSharePermissionResponse>(await this.callApi(params, req, runtime), new $_model.ModifyImageSharePermissionResponse({})); } /** * Modifies the share permissions on an image. You can share your custom images with other Alibaba Cloud accounts or publish the images as community images. * * @remarks * Before you call this operation, read [Share a custom image](https://help.aliyun.com/document_detail/25463.html). * When you call this operation, take note of the following sharing rules: * * **Sharing limits**: You can share only the custom images created in your Alibaba Cloud account to other Alibaba Cloud accounts. A custom image can be shared to up to 50 Alibaba Cloud accounts. You can share a custom image to up to 10 Alibaba Cloud accounts at a time. * * **Impacts on an instance**: If an instance was created ([RunInstances](https://help.aliyun.com/document_detail/63440.html)) from a shared image, you cannot re-initialize the system disk of the instance ([ReInitDisk](https://help.aliyun.com/document_detail/25519.html)) after the image owner unshares or deletes the image ([DeleteImage](https://help.aliyun.com/document_detail/25537.html)). * > You can share images encrypted by using customer master keys (CMKs) but cannot share images encrypted by using service keys. When you share an image encrypted by using a service key, an error is reported. If you want to share an image encrypted by using a service key, call the CopyImage operation to copy the image and change the encryption key of the image copy to a CMK. * When you publish or unpublish a community image, take note of the following items: * * **Responsibilities and agreement**: Alibaba Cloud provides only the platform on which community images can be published and managed. The owner of a community image is responsible for the quality and updates of the image. Make sure that you acknowledge and agree to the Community Image Agreement. Otherwise, you cannot publish community images. For more information, see [Publish a community image](https://help.aliyun.com/document_detail/208370.html). * * **Encryption limits**: You cannot publish encrypted images as community images. * * **Openness**: Community images are publicly available. A community image is available to all Alibaba Cloud accounts in the region where the image resides. * * **Feature limits**: You cannot share, export, or copy community images. * * **Unpublication impacts**: After you unpublish a community image, the image is no longer available to other Alibaba Cloud accounts. If an image is shared to other Alibaba Cloud accounts before it is unpublished, the image remains available to the accounts. * * @param request - ModifyImageSharePermissionRequest * @returns ModifyImageSharePermissionResponse */ async modifyImageSharePermission(request: $_model.ModifyImageSharePermissionRequest): Promise<$_model.ModifyImageSharePermissionResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyImageSharePermissionWithOptions(request, runtime); } /** * Changes the type of the private pool for an Elastic Compute Service (ECS) instance. * * @remarks * A private pool is generated after an elasticity assurance or a capacity reservation is created. The private pool is associated with information about the instances that use the private pool. You can specify whether to use a private pool when you create an ECS instance to match the instance with the associated elasticity assurance or capacity reservation. * * After you call this operation to modify the private pool attributes of an ECS instance, you do not need to restart the instance for the changes to take effect. * * When you call the following operations on an ECS instance, the system attempts to match the instance with active private pools. If the instance is already matched to a specified private pool, the call to an operation may fail when the private pool capacity is used up or the private pool expires. If the call fails, call the ModifyInstanceAttachmentAttributes operation to change the type of the private pool to `Open`. * * [StartInstance](https://help.aliyun.com/document_detail/2679679.html): start an ECS instance that is stopped in economical mode. * * [ReActivateInstances](https://help.aliyun.com/document_detail/2679707.html): reactivates an ECS instance that has expired or is reclaimed due to an overdue payment. * * [ModifyInstanceChargeType](https://help.aliyun.com/document_detail/2679704.html): changes the billing method of an ECS instance. * * [ModifyPrepayInstanceSpec](https://help.aliyun.com/document_detail/2679706.html): changes the instance type of an ECS instance. * * [ReplaceSystemDisk](https://help.aliyun.com/document_detail/2679771.html): replaces the operating system of an ECS instance. * * @param request - ModifyInstanceAttachmentAttributesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyInstanceAttachmentAttributesResponse */ async modifyInstanceAttachmentAttributesWithOptions(request: $_model.ModifyInstanceAttachmentAttributesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyInstanceAttachmentAttributesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.privatePoolOptions)) { query["PrivatePoolOptions"] = request.privatePoolOptions; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyInstanceAttachmentAttributes", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyInstanceAttachmentAttributesResponse>(await this.callApi(params, req, runtime), new $_model.ModifyInstanceAttachmentAttributesResponse({})); } /** * Changes the type of the private pool for an Elastic Compute Service (ECS) instance. * * @remarks * A private pool is generated after an elasticity assurance or a capacity reservation is created. The private pool is associated with information about the instances that use the private pool. You can specify whether to use a private pool when you create an ECS instance to match the instance with the associated elasticity assurance or capacity reservation. * * After you call this operation to modify the private pool attributes of an ECS instance, you do not need to restart the instance for the changes to take effect. * * When you call the following operations on an ECS instance, the system attempts to match the instance with active private pools. If the instance is already matched to a specified private pool, the call to an operation may fail when the private pool capacity is used up or the private pool expires. If the call fails, call the ModifyInstanceAttachmentAttributes operation to change the type of the private pool to `Open`. * * [StartInstance](https://help.aliyun.com/document_detail/2679679.html): start an ECS instance that is stopped in economical mode. * * [ReActivateInstances](https://help.aliyun.com/document_detail/2679707.html): reactivates an ECS instance that has expired or is reclaimed due to an overdue payment. * * [ModifyInstanceChargeType](https://help.aliyun.com/document_detail/2679704.html): changes the billing method of an ECS instance. * * [ModifyPrepayInstanceSpec](https://help.aliyun.com/document_detail/2679706.html): changes the instance type of an ECS instance. * * [ReplaceSystemDisk](https://help.aliyun.com/document_detail/2679771.html): replaces the operating system of an ECS instance. * * @param request - ModifyInstanceAttachmentAttributesRequest * @returns ModifyInstanceAttachmentAttributesResponse */ async modifyInstanceAttachmentAttributes(request: $_model.ModifyInstanceAttachmentAttributesRequest): Promise<$_model.ModifyInstanceAttachmentAttributesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyInstanceAttachmentAttributesWithOptions(request, runtime); } /** * Modifies the attributes of an Elastic Compute Service (ECS) instance, such as the password, name, description, hostname, security groups, maximum transmission unit (MTU), and user data of the instance. * * @remarks * You cannot call this operation to modify the attributes of the ECS instances that are locked for security reasons. For more information, see [API behavior when an instance is locked for security reasons](https://help.aliyun.com/document_detail/25695.html). * * @param request - ModifyInstanceAttributeRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyInstanceAttributeResponse */ async modifyInstanceAttributeWithOptions(request: $_model.ModifyInstanceAttributeRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyInstanceAttributeResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.creditSpecification)) { query["CreditSpecification"] = request.creditSpecification; } if (!$dara.isNull(request.deletionProtection)) { query["DeletionProtection"] = request.deletionProtection; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.enableJumboFrame)) { query["EnableJumboFrame"] = request.enableJumboFrame; } if (!$dara.isNull(request.enableNetworkEncryption)) { query["EnableNetworkEncryption"] = request.enableNetworkEncryption; } if (!$dara.isNull(request.hostName)) { query["HostName"] = request.hostName; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.instanceName)) { query["InstanceName"] = request.instanceName; } if (!$dara.isNull(request.networkInterfaceQueueNumber)) { query["NetworkInterfaceQueueNumber"] = request.networkInterfaceQueueNumber; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.password)) { query["Password"] = request.password; } if (!$dara.isNull(request.privateDnsNameOptions)) { query["PrivateDnsNameOptions"] = request.privateDnsNameOptions; } if (!$dara.isNull(request.recyclable)) { query["Recyclable"] = request.recyclable; } if (!$dara.isNull(request.remoteConnectionOptions)) { query["RemoteConnectionOptions"] = request.remoteConnectionOptions; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.securityGroupIds)) { query["SecurityGroupIds"] = request.securityGroupIds; } if (!$dara.isNull(request.userData)) { query["UserData"] = request.userData; } if (!$dara.isNull(request.cpuOptions)) { query["CpuOptions"] = request.cpuOptions; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyInstanceAttribute", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyInstanceAttributeResponse>(await this.callApi(params, req, runtime), new $_model.ModifyInstanceAttributeResponse({})); } /** * Modifies the attributes of an Elastic Compute Service (ECS) instance, such as the password, name, description, hostname, security groups, maximum transmission unit (MTU), and user data of the instance. * * @remarks * You cannot call this operation to modify the attributes of the ECS instances that are locked for security reasons. For more information, see [API behavior when an instance is locked for security reasons](https://help.aliyun.com/document_detail/25695.html). * * @param request - ModifyInstanceAttributeRequest * @returns ModifyInstanceAttributeResponse */ async modifyInstanceAttribute(request: $_model.ModifyInstanceAttributeRequest): Promise<$_model.ModifyInstanceAttributeResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyInstanceAttributeWithOptions(request, runtime); } /** * Changes the automatic release time of a pay-as-you-go or spot instance or cancels the automatic release of the instance. * * @param request - ModifyInstanceAutoReleaseTimeRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyInstanceAutoReleaseTimeResponse */ async modifyInstanceAutoReleaseTimeWithOptions(request: $_model.ModifyInstanceAutoReleaseTimeRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyInstanceAutoReleaseTimeResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.autoReleaseTime)) { query["AutoReleaseTime"] = request.autoReleaseTime; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyInstanceAutoReleaseTime", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyInstanceAutoReleaseTimeResponse>(await this.callApi(params, req, runtime), new $_model.ModifyInstanceAutoReleaseTimeResponse({})); } /** * Changes the automatic release time of a pay-as-you-go or spot instance or cancels the automatic release of the instance. * * @param request - ModifyInstanceAutoReleaseTimeRequest * @returns ModifyInstanceAutoReleaseTimeResponse */ async modifyInstanceAutoReleaseTime(request: $_model.ModifyInstanceAutoReleaseTimeRequest): Promise<$_model.ModifyInstanceAutoReleaseTimeResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyInstanceAutoReleaseTimeWithOptions(request, runtime); } /** * Configures auto-renewal for subscription instances to help reduce the maintenance workloads on instance expiration. * * @remarks * *Before you call this operation, make sure that you are familiar with the billing methods and [pricing](https://www.alibabacloud.com/product/ecs#pricing) of Elastic Compute Service (ECS)**. * * Make sure that your account balance or credit balance is sufficient. * * Only subscription instances are supported. If you call this operation for a pay-as-you-go instance, an error is returned. * * The payment for auto-renewal of an instance is automatically deducted at 08:00:00 (UTC+8) nine days before the instance expires. * * If the deduction fails, Alibaba Cloud attempts to deduct the payment every day until the payment is deducted or until the instance is locked on expiration. * * @param request - ModifyInstanceAutoRenewAttributeRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyInstanceAutoRenewAttributeResponse */ async modifyInstanceAutoRenewAttributeWithOptions(request: $_model.ModifyInstanceAutoRenewAttributeRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyInstanceAutoRenewAttributeResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.autoRenew)) { query["AutoRenew"] = request.autoRenew; } if (!$dara.isNull(request.duration)) { query["Duration"] = request.duration; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.periodUnit)) { query["PeriodUnit"] = request.periodUnit; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.renewalStatus)) { query["RenewalStatus"] = request.renewalStatus; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyInstanceAutoRenewAttribute", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyInstanceAutoRenewAttributeResponse>(await this.callApi(params, req, runtime), new $_model.ModifyInstanceAutoRenewAttributeResponse({})); } /** * Configures auto-renewal for subscription instances to help reduce the maintenance workloads on instance expiration. * * @remarks * *Before you call this operation, make sure that you are familiar with the billing methods and [pricing](https://www.alibabacloud.com/product/ecs#pricing) of Elastic Compute Service (ECS)**. * * Make sure that your account balance or credit balance is sufficient. * * Only subscription instances are supported. If you call this operation for a pay-as-you-go instance, an error is returned. * * The payment for auto-renewal of an instance is automatically deducted at 08:00:00 (UTC+8) nine days before the instance expires. * * If the deduction fails, Alibaba Cloud attempts to deduct the payment every day until the payment is deducted or until the instance is locked on expiration. * * @param request - ModifyInstanceAutoRenewAttributeRequest * @returns ModifyInstanceAutoRenewAttributeResponse */ async modifyInstanceAutoRenewAttribute(request: $_model.ModifyInstanceAutoRenewAttributeRequest): Promise<$_model.ModifyInstanceAutoRenewAttributeResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyInstanceAutoRenewAttributeWithOptions(request, runtime); } /** * Changes the billing method of Elastic Compute Service (ECS) instances in batches. * * @remarks * ### [](#)Precautions * * Before you call this operation, make sure that you are familiar with the [subscription](https://help.aliyun.com/document_detail/56220.html) and [pay-as-you-go](https://help.aliyun.com/document_detail/40653.html) billing methods and [pricing](https://www.alibabacloud.com/product/ecs#pricing) of ECS. * * The instances must be in the **Running** (`Running`) or **Stopped** (`Stopped`) state, and you have no overdue payments for the instances. * * After you change the billing method, the payment is automatically completed. Make sure that the balance in your account is sufficient. Otherwise, your order becomes invalid and is canceled. If your account balance is insufficient, you can set `AutoPay` to `false` to generate an unpaid order. Then, you can log on to the [ECS console](https://ecs.console.aliyun.com/) to pay for the order. * ### [](#)Considerations * * **Change the billing method from subscription to pay-as-you-go**: * * After you change the billing method of an instance from subscription to pay-as-you-go, the new billing method remains in effect for the remaining lifecycle of the instance. The price difference is refunded to the payment account that you used. Vouchers that have been redeemed are not refundable. * * **Refund rule**: You have a quota for the total refund amount each month, and unused balance of this quota is not carried forward into the next month. After you use up the refund quota of the current month, you can change the billing method only in the next month. The refund amount incurred when you change the billing method is calculated based on the following formula: **Number of vCPUs × (Number of remaining days × 24 ± Number of remaining or elapsed hours)**. For more information, see [Change the billing method of an instance from subscription to pay-as-you-go](https://help.aliyun.com/document_detail/85517.html). * * **Change the billing method from pay-as-you-go to subscription**: * * You can change the billing method of all data disks attached to an instance from pay-as-you-go to subscription. * * This operation cannot be called for a pay-as-you-go instance that has an automatic release time set. For more information, see [Change the billing method of an instance from subscription to pay-as-you-go](https://help.aliyun.com/document_detail/49884.html). * * @param request - ModifyInstanceChargeTypeRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyInstanceChargeTypeResponse */ async modifyInstanceChargeTypeWithOptions(request: $_model.ModifyInstanceChargeTypeRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyInstanceChargeTypeResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.autoPay)) { query["AutoPay"] = request.autoPay; } if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.dryRun)) { query["DryRun"] = request.dryRun; } if (!$dara.isNull(request.includeDataDisks)) { query["IncludeDataDisks"] = request.includeDataDisks; } if (!$dara.isNull(request.instanceChargeType)) { query["InstanceChargeType"] = request.instanceChargeType; } if (!$dara.isNull(request.instanceIds)) { query["InstanceIds"] = request.instanceIds; } if (!$dara.isNull(request.isDetailFee)) { query["IsDetailFee"] = request.isDetailFee; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.period)) { query["Period"] = request.period; } if (!$dara.isNull(request.periodUnit)) { query["PeriodUnit"] = request.periodUnit; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyInstanceChargeType", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyInstanceChargeTypeResponse>(await this.callApi(params, req, runtime), new $_model.ModifyInstanceChargeTypeResponse({})); } /** * Changes the billing method of Elastic Compute Service (ECS) instances in batches. * * @remarks * ### [](#)Precautions * * Before you call this operation, make sure that you are familiar with the [subscription](https://help.aliyun.com/document_detail/56220.html) and [pay-as-you-go](https://help.aliyun.com/document_detail/40653.html) billing methods and [pricing](https://www.alibabacloud.com/product/ecs#pricing) of ECS. * * The instances must be in the **Running** (`Running`) or **Stopped** (`Stopped`) state, and you have no overdue payments for the instances. * * After you change the billing method, the payment is automatically completed. Make sure that the balance in your account is sufficient. Otherwise, your order becomes invalid and is canceled. If your account balance is insufficient, you can set `AutoPay` to `false` to generate an unpaid order. Then, you can log on to the [ECS console](https://ecs.console.aliyun.com/) to pay for the order. * ### [](#)Considerations * * **Change the billing method from subscription to pay-as-you-go**: * * After you change the billing method of an instance from subscription to pay-as-you-go, the new billing method remains in effect for the remaining lifecycle of the instance. The price difference is refunded to the payment account that you used. Vouchers that have been redeemed are not refundable. * * **Refund rule**: You have a quota for the total refund amount each month, and unused balance of this quota is not carried forward into the next month. After you use up the refund quota of the current month, you can change the billing method only in the next month. The refund amount incurred when you change the billing method is calculated based on the following formula: **Number of vCPUs × (Number of remaining days × 24 ± Number of remaining or elapsed hours)**. For more information, see [Change the billing method of an instance from subscription to pay-as-you-go](https://help.aliyun.com/document_detail/85517.html). * * **Change the billing method from pay-as-you-go to subscription**: * * You can change the billing method of all data disks attached to an instance from pay-as-you-go to subscription. * * This operation cannot be called for a pay-as-you-go instance that has an automatic release time set. For more information, see [Change the billing method of an instance from subscription to pay-as-you-go](https://help.aliyun.com/document_detail/49884.html). * * @param request - ModifyInstanceChargeTypeRequest * @returns ModifyInstanceChargeTypeResponse */ async modifyInstanceChargeType(request: $_model.ModifyInstanceChargeTypeRequest): Promise<$_model.ModifyInstanceChargeTypeResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyInstanceChargeTypeWithOptions(request, runtime); } /** * Modifies the instance clock options. * * @remarks * When you call this operation, note that: * * This is an asynchronous operation. The ID of the asynchronous task is returned after the call. Query the asynchronous task result to determine whether the execution is complete. * * To modify the PtpStatus parameter, you must specify the parameter. The instance types that are supported. You can query the instance type list ([DescribeInstanceTypes](https://help.aliyun.com/document_detail/25620.html) ). * * @param request - ModifyInstanceClockOptionsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyInstanceClockOptionsResponse */ async modifyInstanceClockOptionsWithOptions(request: $_model.ModifyInstanceClockOptionsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyInstanceClockOptionsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.dryRun)) { query["DryRun"] = request.dryRun; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.ptpStatus)) { query["PtpStatus"] = request.ptpStatus; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyInstanceClockOptions", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyInstanceClockOptionsResponse>(await this.callApi(params, req, runtime), new $_model.ModifyInstanceClockOptionsResponse({})); } /** * Modifies the instance clock options. * * @remarks * When you call this operation, note that: * * This is an asynchronous operation. The ID of the asynchronous task is returned after the call. Query the asynchronous task result to determine whether the execution is complete. * * To modify the PtpStatus parameter, you must specify the parameter. The instance types that are supported. You can query the instance type list ([DescribeInstanceTypes](https://help.aliyun.com/document_detail/25620.html) ). * * @param request - ModifyInstanceClockOptionsRequest * @returns ModifyInstanceClockOptionsResponse */ async modifyInstanceClockOptions(request: $_model.ModifyInstanceClockOptionsRequest): Promise<$_model.ModifyInstanceClockOptionsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyInstanceClockOptionsWithOptions(request, runtime); } /** * Changes the deployment set of an Elastic Compute Service (ECS) instance or migrates an ECS instance to a dedicated host. You can change the instance type of an ECS instance when you migrate the instance. * * @remarks * Take note of the following items: * * The instance must be in the **Stopped** (Stopped) state. The instance is automatically restarted after it is migrated. * * The network type of the instance must be Virtual Private Cloud (VPC). * * The instance and the destination dedicated host to which to migrate the instance must belong to the same account and reside in the same region and zone. * * A pay-as-you-go instance can be migrated to a subscription dedicated host. A subscription instance can be migrated only between subscription dedicated hosts. The expiration date of the subscription instance cannot be later than that of the destination dedicated host. * * You can migrate only pay-as-you-go instances from a shared host to a dedicated host. You cannot migrate subscription instances or spot instances from a shared host to a dedicated host. * * You can redeploy an instance to a specific dedicated host cluster. * * @param request - ModifyInstanceDeploymentRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyInstanceDeploymentResponse */ async modifyInstanceDeploymentWithOptions(request: $_model.ModifyInstanceDeploymentRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyInstanceDeploymentResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.affinity)) { query["Affinity"] = request.affinity; } if (!$dara.isNull(request.dedicatedHostClusterId)) { query["DedicatedHostClusterId"] = request.dedicatedHostClusterId; } if (!$dara.isNull(request.dedicatedHostId)) { query["DedicatedHostId"] = request.dedicatedHostId; } if (!$dara.isNull(request.deploymentSetGroupNo)) { query["DeploymentSetGroupNo"] = request.deploymentSetGroupNo; } if (!$dara.isNull(request.deploymentSetId)) { query["DeploymentSetId"] = request.deploymentSetId; } if (!$dara.isNull(request.force)) { query["Force"] = request.force; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.instanceType)) { query["InstanceType"] = request.instanceType; } if (!$dara.isNull(request.migrationType)) { query["MigrationType"] = request.migrationType; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.removeFromDeploymentSet)) { query["RemoveFromDeploymentSet"] = request.removeFromDeploymentSet; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.tenancy)) { query["Tenancy"] = request.tenancy; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyInstanceDeployment", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyInstanceDeploymentResponse>(await this.callApi(params, req, runtime), new $_model.ModifyInstanceDeploymentResponse({})); } /** * Changes the deployment set of an Elastic Compute Service (ECS) instance or migrates an ECS instance to a dedicated host. You can change the instance type of an ECS instance when you migrate the instance. * * @remarks * Take note of the following items: * * The instance must be in the **Stopped** (Stopped) state. The instance is automatically restarted after it is migrated. * * The network type of the instance must be Virtual Private Cloud (VPC). * * The instance and the destination dedicated host to which to migrate the instance must belong to the same account and reside in the same region and zone. * * A pay-as-you-go instance can be migrated to a subscription dedicated host. A subscription instance can be migrated only between subscription dedicated hosts. The expiration date of the subscription instance cannot be later than that of the destination dedicated host. * * You can migrate only pay-as-you-go instances from a shared host to a dedicated host. You cannot migrate subscription instances or spot instances from a shared host to a dedicated host. * * You can redeploy an instance to a specific dedicated host cluster. * * @param request - ModifyInstanceDeploymentRequest * @returns ModifyInstanceDeploymentResponse */ async modifyInstanceDeployment(request: $_model.ModifyInstanceDeploymentRequest): Promise<$_model.ModifyInstanceDeploymentResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyInstanceDeploymentWithOptions(request, runtime); } /** * Modifies the maintenance attributes of an instance. * * @remarks * This operation is used to modify the maintenance policy of an instance. The maintenance policy consists of the following maintenance attributes: * * Maintenance window: the time period that you specify for maintenance. * * Maintenance action: the action that you specify in response to instance shutdown. * * @param request - ModifyInstanceMaintenanceAttributesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyInstanceMaintenanceAttributesResponse */ async modifyInstanceMaintenanceAttributesWithOptions(request: $_model.ModifyInstanceMaintenanceAttributesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyInstanceMaintenanceAttributesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.actionOnMaintenance)) { query["ActionOnMaintenance"] = request.actionOnMaintenance; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.maintenanceWindow)) { query["MaintenanceWindow"] = request.maintenanceWindow; } if (!$dara.isNull(request.notifyOnMaintenance)) { query["NotifyOnMaintenance"] = request.notifyOnMaintenance; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyInstanceMaintenanceAttributes", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyInstanceMaintenanceAttributesResponse>(await this.callApi(params, req, runtime), new $_model.ModifyInstanceMaintenanceAttributesResponse({})); } /** * Modifies the maintenance attributes of an instance. * * @remarks * This operation is used to modify the maintenance policy of an instance. The maintenance policy consists of the following maintenance attributes: * * Maintenance window: the time period that you specify for maintenance. * * Maintenance action: the action that you specify in response to instance shutdown. * * @param request - ModifyInstanceMaintenanceAttributesRequest * @returns ModifyInstanceMaintenanceAttributesResponse */ async modifyInstanceMaintenanceAttributes(request: $_model.ModifyInstanceMaintenanceAttributesRequest): Promise<$_model.ModifyInstanceMaintenanceAttributesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyInstanceMaintenanceAttributesWithOptions(request, runtime); } /** * Modifies the metadata access configurations of instances in a specific region, including whether to enable the metadata access channel and whether to forcefully use the security hardening mode to access instance metadata. * * @param request - ModifyInstanceMetadataOptionsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyInstanceMetadataOptionsResponse */ async modifyInstanceMetadataOptionsWithOptions(request: $_model.ModifyInstanceMetadataOptionsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyInstanceMetadataOptionsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.httpEndpoint)) { query["HttpEndpoint"] = request.httpEndpoint; } if (!$dara.isNull(request.httpPutResponseHopLimit)) { query["HttpPutResponseHopLimit"] = request.httpPutResponseHopLimit; } if (!$dara.isNull(request.httpTokens)) { query["HttpTokens"] = request.httpTokens; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.instanceMetadataTags)) { query["InstanceMetadataTags"] = request.instanceMetadataTags; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyInstanceMetadataOptions", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyInstanceMetadataOptionsResponse>(await this.callApi(params, req, runtime), new $_model.ModifyInstanceMetadataOptionsResponse({})); } /** * Modifies the metadata access configurations of instances in a specific region, including whether to enable the metadata access channel and whether to forcefully use the security hardening mode to access instance metadata. * * @param request - ModifyInstanceMetadataOptionsRequest * @returns ModifyInstanceMetadataOptionsResponse */ async modifyInstanceMetadataOptions(request: $_model.ModifyInstanceMetadataOptionsRequest): Promise<$_model.ModifyInstanceMetadataOptionsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyInstanceMetadataOptionsWithOptions(request, runtime); } /** * Modifies instance network configurations. * * @remarks * When you call this operation, note that: * * This is an asynchronous operation. The ID of the asynchronous task is returned after the call. Query the asynchronous task result to determine whether the execution is complete. * * You can modify only one attribute at a time. If you modify multiple attributes, call this operation multiple times. * * To modify the BandwidthWeighting, you must specify the specifications of the instance. You can use the [DescribeInstanceTypes](https://help.aliyun.com/document_detail/2679699.html) to query whether the current instance type supports bandwidth weights and the supported bandwidth weights. * * @param request - ModifyInstanceNetworkOptionsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyInstanceNetworkOptionsResponse */ async modifyInstanceNetworkOptionsWithOptions(request: $_model.ModifyInstanceNetworkOptionsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyInstanceNetworkOptionsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.bandwidthWeighting)) { query["BandwidthWeighting"] = request.bandwidthWeighting; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyInstanceNetworkOptions", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyInstanceNetworkOptionsResponse>(await this.callApi(params, req, runtime), new $_model.ModifyInstanceNetworkOptionsResponse({})); } /** * Modifies instance network configurations. * * @remarks * When you call this operation, note that: * * This is an asynchronous operation. The ID of the asynchronous task is returned after the call. Query the asynchronous task result to determine whether the execution is complete. * * You can modify only one attribute at a time. If you modify multiple attributes, call this operation multiple times. * * To modify the BandwidthWeighting, you must specify the specifications of the instance. You can use the [DescribeInstanceTypes](https://help.aliyun.com/document_detail/2679699.html) to query whether the current instance type supports bandwidth weights and the supported bandwidth weights. * * @param request - ModifyInstanceNetworkOptionsRequest * @returns ModifyInstanceNetworkOptionsResponse */ async modifyInstanceNetworkOptions(request: $_model.ModifyInstanceNetworkOptionsRequest): Promise<$_model.ModifyInstanceNetworkOptionsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyInstanceNetworkOptionsWithOptions(request, runtime); } /** * Modifies the network configurations of an Elastic Compute Service (ECS) instance, such as the public bandwidth, assignment or unassignment of a static public IP address (also known as system-assigned or auto-assigned public IP address), and billing method for network usage. You can call this operation to upgrade or downgrade the network configurations of ECS instances. * * @remarks * Take note of the following items: * * If you upgrade the outbound public bandwidth (InternetMaxBandwidthOut) of a subscription (PrePaid) instance from 0 Mbit/s when you modify the network configurations of the instance, a static public IP address is automatically assigned to the instance. * * If you upgrade the outbound public bandwidth (InternetMaxBandwidthOut) of a pay-as-you-go (PostPaid) instance from 0 Mbit/s when you modify the network configurations of the instance, no static public IP address is automatically assigned to the instance. In this case, to assign a static public IP address to the instance, you must set `AllocatePublicIp` to `true`. * * You can upgrade the outbound public bandwidth (InternetMaxBandwidthOut) of an instance in the classic network from 0 Mbit/s only if the instance is in the Stopped state. * > For the limits on the sum of maximum public bandwidths of ECS instances that use the pay-by-bandwidth billing method for network usage per region per Alibaba Cloud account, see the [Public bandwidth limits](~~25412#BandwidthQuota~~) section of the "Limits" topic. * * Billing: * * After the public bandwidth is upgraded, AutoPay is automatically set to true and the payment is automatically made. Make sure that your account balance is sufficient. Otherwise, your order becomes invalid and is canceled. If your account balance is insufficient, you can set AutoPay to false. In this case, when you call the ModifyInstanceNetworkSpec operation, an unpaid order is generated. Then, you can log on to the ECS console to pay for the order. * * After the public bandwidth is downgraded, the price difference is refunded to the payment account that you used. Vouchers or coupons that have been redeemed are not refundable. * * @param request - ModifyInstanceNetworkSpecRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyInstanceNetworkSpecResponse */ async modifyInstanceNetworkSpecWithOptions(request: $_model.ModifyInstanceNetworkSpecRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyInstanceNetworkSpecResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.allocatePublicIp)) { query["AllocatePublicIp"] = request.allocatePublicIp; } if (!$dara.isNull(request.autoPay)) { query["AutoPay"] = request.autoPay; } if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.endTime)) { query["EndTime"] = request.endTime; } if (!$dara.isNull(request.ISP)) { query["ISP"] = request.ISP; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.internetMaxBandwidthIn)) { query["InternetMaxBandwidthIn"] = request.internetMaxBandwidthIn; } if (!$dara.isNull(request.internetMaxBandwidthOut)) { query["InternetMaxBandwidthOut"] = request.internetMaxBandwidthOut; } if (!$dara.isNull(request.networkChargeType)) { query["NetworkChargeType"] = request.networkChargeType; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.startTime)) { query["StartTime"] = request.startTime; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyInstanceNetworkSpec", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyInstanceNetworkSpecResponse>(await this.callApi(params, req, runtime), new $_model.ModifyInstanceNetworkSpecResponse({})); } /** * Modifies the network configurations of an Elastic Compute Service (ECS) instance, such as the public bandwidth, assignment or unassignment of a static public IP address (also known as system-assigned or auto-assigned public IP address), and billing method for network usage. You can call this operation to upgrade or downgrade the network configurations of ECS instances. * * @remarks * Take note of the following items: * * If you upgrade the outbound public bandwidth (InternetMaxBandwidthOut) of a subscription (PrePaid) instance from 0 Mbit/s when you modify the network configurations of the instance, a static public IP address is automatically assigned to the instance. * * If you upgrade the outbound public bandwidth (InternetMaxBandwidthOut) of a pay-as-you-go (PostPaid) instance from 0 Mbit/s when you modify the network configurations of the instance, no static public IP address is automatically assigned to the instance. In this case, to assign a static public IP address to the instance, you must set `AllocatePublicIp` to `true`. * * You can upgrade the outbound public bandwidth (InternetMaxBandwidthOut) of an instance in the classic network from 0 Mbit/s only if the instance is in the Stopped state. * > For the limits on the sum of maximum public bandwidths of ECS instances that use the pay-by-bandwidth billing method for network usage per region per Alibaba Cloud account, see the [Public bandwidth limits](~~25412#BandwidthQuota~~) section of the "Limits" topic. * * Billing: * * After the public bandwidth is upgraded, AutoPay is automatically set to true and the payment is automatically made. Make sure that your account balance is sufficient. Otherwise, your order becomes invalid and is canceled. If your account balance is insufficient, you can set AutoPay to false. In this case, when you call the ModifyInstanceNetworkSpec operation, an unpaid order is generated. Then, you can log on to the ECS console to pay for the order. * * After the public bandwidth is downgraded, the price difference is refunded to the payment account that you used. Vouchers or coupons that have been redeemed are not refundable. * * @param request - ModifyInstanceNetworkSpecRequest * @returns ModifyInstanceNetworkSpecResponse */ async modifyInstanceNetworkSpec(request: $_model.ModifyInstanceNetworkSpecRequest): Promise<$_model.ModifyInstanceNetworkSpecResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyInstanceNetworkSpecWithOptions(request, runtime); } /** * Changes the instance type or public bandwidth of a pay-as-you-go Elastic Compute Service (ECS) instance. * * @remarks * *Before you call this operation, familiarize yourself with the billing and [pricing](https://www.alibabacloud.com/zh/pricing-calculator#/commodity/vm_intl) of ECS resources.** * Before you [change the instance type of a pay-as-you-go instance](https://help.aliyun.com/document_detail/60051.html), call the [DescribeResourcesModification](https://help.aliyun.com/document_detail/66187.html) operation to query compatible instance types. * **Considerations** * * Make sure that you have no overdue payments in your account. * * You can change only the instance type or only the public bandwidth of an ECS instance at a time. The instance type and the public bandwidth of an ECS instance cannot be changed together. * * You can change the public bandwidth of an ECS instance only when the instance is in the **Running** (`Running`) or **Stopped** (`Stopped`) state. The change immediately takes effect. * * You can change the instance type of an ECS instance only when the instance is in the **Stopped** (`Stopped`) state. You must [start the instance](https://help.aliyun.com/document_detail/25441.html) for the change to take effect. * > A limit is imposed on the sum of public bandwidths of all ECS instances that use the pay-by-bandwidth billing method for network usage per region in an Alibaba Cloud account. For more information, see the [Public bandwidth limits](~~25412#BandwidthQuota~~) section of the "Limits and quotas" topic. * * @param request - ModifyInstanceSpecRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyInstanceSpecResponse */ async modifyInstanceSpecWithOptions(request: $_model.ModifyInstanceSpecRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyInstanceSpecResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.allowMigrateAcrossZone)) { query["AllowMigrateAcrossZone"] = request.allowMigrateAcrossZone; } if (!$dara.isNull(request.async)) { query["Async"] = request.async; } if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.disk)) { query["Disk"] = request.disk; } if (!$dara.isNull(request.dryRun)) { query["DryRun"] = request.dryRun; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.instanceType)) { query["InstanceType"] = request.instanceType; } if (!$dara.isNull(request.internetMaxBandwidthIn)) { query["InternetMaxBandwidthIn"] = request.internetMaxBandwidthIn; } if (!$dara.isNull(request.internetMaxBandwidthOut)) { query["InternetMaxBandwidthOut"] = request.internetMaxBandwidthOut; } if (!$dara.isNull(request.modifyMode)) { query["ModifyMode"] = request.modifyMode; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.systemDisk)) { query["SystemDisk"] = request.systemDisk; } if (!$dara.isNull(request.temporary)) { query["Temporary"] = request.temporary; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyInstanceSpec", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyInstanceSpecResponse>(await this.callApi(params, req, runtime), new $_model.ModifyInstanceSpecResponse({})); } /** * Changes the instance type or public bandwidth of a pay-as-you-go Elastic Compute Service (ECS) instance. * * @remarks * *Before you call this operation, familiarize yourself with the billing and [pricing](https://www.alibabacloud.com/zh/pricing-calculator#/commodity/vm_intl) of ECS resources.** * Before you [change the instance type of a pay-as-you-go instance](https://help.aliyun.com/document_detail/60051.html), call the [DescribeResourcesModification](https://help.aliyun.com/document_detail/66187.html) operation to query compatible instance types. * **Considerations** * * Make sure that you have no overdue payments in your account. * * You can change only the instance type or only the public bandwidth of an ECS instance at a time. The instance type and the public bandwidth of an ECS instance cannot be changed together. * * You can change the public bandwidth of an ECS instance only when the instance is in the **Running** (`Running`) or **Stopped** (`Stopped`) state. The change immediately takes effect. * * You can change the instance type of an ECS instance only when the instance is in the **Stopped** (`Stopped`) state. You must [start the instance](https://help.aliyun.com/document_detail/25441.html) for the change to take effect. * > A limit is imposed on the sum of public bandwidths of all ECS instances that use the pay-by-bandwidth billing method for network usage per region in an Alibaba Cloud account. For more information, see the [Public bandwidth limits](~~25412#BandwidthQuota~~) section of the "Limits and quotas" topic. * * @param request - ModifyInstanceSpecRequest * @returns ModifyInstanceSpecResponse */ async modifyInstanceSpec(request: $_model.ModifyInstanceSpecRequest): Promise<$_model.ModifyInstanceSpecResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyInstanceSpecWithOptions(request, runtime); } /** * Changes the Virtual Network Computing (VNC) password of an Elastic Compute Service (ECS) instance. * * @remarks * The VNC password must be six characters in length and can contain uppercase letters, lowercase letters, and digits. * * After you modify the VNC password of an ECS instance, take note of the following items: * * If the instance is I/O optimized, the new password takes effect immediately without the need to restart the instance. * * If the instance is not I/O optimized, you must [restart the instance](https://help.aliyun.com/document_detail/25440.html) in the ECS console or by calling the [RebootInstance](https://help.aliyun.com/document_detail/25502.html) operation for the new password to take effect. * * @param request - ModifyInstanceVncPasswdRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyInstanceVncPasswdResponse */ async modifyInstanceVncPasswdWithOptions(request: $_model.ModifyInstanceVncPasswdRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyInstanceVncPasswdResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.vncPassword)) { query["VncPassword"] = request.vncPassword; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyInstanceVncPasswd", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyInstanceVncPasswdResponse>(await this.callApi(params, req, runtime), new $_model.ModifyInstanceVncPasswdResponse({})); } /** * Changes the Virtual Network Computing (VNC) password of an Elastic Compute Service (ECS) instance. * * @remarks * The VNC password must be six characters in length and can contain uppercase letters, lowercase letters, and digits. * * After you modify the VNC password of an ECS instance, take note of the following items: * * If the instance is I/O optimized, the new password takes effect immediately without the need to restart the instance. * * If the instance is not I/O optimized, you must [restart the instance](https://help.aliyun.com/document_detail/25440.html) in the ECS console or by calling the [RebootInstance](https://help.aliyun.com/document_detail/25502.html) operation for the new password to take effect. * * @param request - ModifyInstanceVncPasswdRequest * @returns ModifyInstanceVncPasswdResponse */ async modifyInstanceVncPasswd(request: $_model.ModifyInstanceVncPasswdRequest): Promise<$_model.ModifyInstanceVncPasswdResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyInstanceVncPasswdWithOptions(request, runtime); } /** * Changes the virtual private cloud (VPC), private IP address, security groups, or vSwitch of an Elastic Compute Service (ECS) instance located in a VPC. * * @remarks * The ECS instance that you want to manage must be in the **Stopped** (`Stopped`) state. * * When you call this operation to change the private IP address or vSwitch of an ECS instance, take note of the following items: * * If the instance is a new instance, you must restart the instance before you call this operation. * * After the private IP address or vSwitch of the instance is changed, you must restart the instance before you can recall this operation. * * When you call this operation to change the VPC of an ECS instance, take note of the following items: * * **ECS instance:** * * The instance cannot be in the Locked, To Be Released, Expired, To Be Recycled, Expired and Being Recycled, or Overdue and Being Recycled state. For more information, see [Overview of instances](https://help.aliyun.com/document_detail/25380.html). * * The instance cannot be associated with Server Load Balancer (SLB) instances. * * The instance cannot be used in other Alibaba Cloud services. For example, the instance cannot be in the process of being migrated or having its VPC changed, or the databases deployed on the instance cannot be managed by Data Transmission Service (DTS). * * **Network:** * * The cut-through mode or the multi-elastic IP address (EIP)-to-elastic network interface (ENI) mode cannot be enabled for the ECS instance. * * The ECS instance cannot be associated with a high-availability virtual IP address (HAVIP). * * The vSwitch of the ECS instance cannot be associated with a custom route table. * * Global Accelerator (GA) cannot be activated for the ECS instance. * * Secondary ENIs cannot be attached to the ECS instance. * * The ECS instance cannot be assigned an IPv6 address. * * The primary ENI of the ECS instance cannot be associated with multiple IP addresses. * * The vSwitch must belong to the new VPC. * * The original and new vSwitches must reside in the same zone. * * If you assign a private IP address to the primary ENI of the ECS instance, the private IP address must be an idle IP address within the CIDR block of the new vSwitch. If you do not assign a private IP address to the primary ENI of the ECS instance, a private IP address is randomly assigned to the ENI. Make sure that sufficient IP addresses are available in the CIDR block of the new vSwitch. * * If you use a VPC that is shared by another Alibaba Cloud account with your account and want to change the security groups of the ECS instance, specify the security groups that you created in the VPC, instead of the security group created by the VPC owner, as the new security groups. * * @param request - ModifyInstanceVpcAttributeRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyInstanceVpcAttributeResponse */ async modifyInstanceVpcAttributeWithOptions(request: $_model.ModifyInstanceVpcAttributeRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyInstanceVpcAttributeResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.privateIpAddress)) { query["PrivateIpAddress"] = request.privateIpAddress; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.securityGroupId)) { query["SecurityGroupId"] = request.securityGroupId; } if (!$dara.isNull(request.vSwitchId)) { query["VSwitchId"] = request.vSwitchId; } if (!$dara.isNull(request.vpcId)) { query["VpcId"] = request.vpcId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyInstanceVpcAttribute", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyInstanceVpcAttributeResponse>(await this.callApi(params, req, runtime), new $_model.ModifyInstanceVpcAttributeResponse({})); } /** * Changes the virtual private cloud (VPC), private IP address, security groups, or vSwitch of an Elastic Compute Service (ECS) instance located in a VPC. * * @remarks * The ECS instance that you want to manage must be in the **Stopped** (`Stopped`) state. * * When you call this operation to change the private IP address or vSwitch of an ECS instance, take note of the following items: * * If the instance is a new instance, you must restart the instance before you call this operation. * * After the private IP address or vSwitch of the instance is changed, you must restart the instance before you can recall this operation. * * When you call this operation to change the VPC of an ECS instance, take note of the following items: * * **ECS instance:** * * The instance cannot be in the Locked, To Be Released, Expired, To Be Recycled, Expired and Being Recycled, or Overdue and Being Recycled state. For more information, see [Overview of instances](https://help.aliyun.com/document_detail/25380.html). * * The instance cannot be associated with Server Load Balancer (SLB) instances. * * The instance cannot be used in other Alibaba Cloud services. For example, the instance cannot be in the process of being migrated or having its VPC changed, or the databases deployed on the instance cannot be managed by Data Transmission Service (DTS). * * **Network:** * * The cut-through mode or the multi-elastic IP address (EIP)-to-elastic network interface (ENI) mode cannot be enabled for the ECS instance. * * The ECS instance cannot be associated with a high-availability virtual IP address (HAVIP). * * The vSwitch of the ECS instance cannot be associated with a custom route table. * * Global Accelerator (GA) cannot be activated for the ECS instance. * * Secondary ENIs cannot be attached to the ECS instance. * * The ECS instance cannot be assigned an IPv6 address. * * The primary ENI of the ECS instance cannot be associated with multiple IP addresses. * * The vSwitch must belong to the new VPC. * * The original and new vSwitches must reside in the same zone. * * If you assign a private IP address to the primary ENI of the ECS instance, the private IP address must be an idle IP address within the CIDR block of the new vSwitch. If you do not assign a private IP address to the primary ENI of the ECS instance, a private IP address is randomly assigned to the ENI. Make sure that sufficient IP addresses are available in the CIDR block of the new vSwitch. * * If you use a VPC that is shared by another Alibaba Cloud account with your account and want to change the security groups of the ECS instance, specify the security groups that you created in the VPC, instead of the security group created by the VPC owner, as the new security groups. * * @param request - ModifyInstanceVpcAttributeRequest * @returns ModifyInstanceVpcAttributeResponse */ async modifyInstanceVpcAttribute(request: $_model.ModifyInstanceVpcAttributeRequest): Promise<$_model.ModifyInstanceVpcAttributeResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyInstanceVpcAttributeWithOptions(request, runtime); } /** * Modifies the execution information of a Cloud Assistant scheduled command task, including modifying the content and execution frequency of the command and adding Elastic Compute Service (ECS) instances or Alibaba Cloud managed instances to the command task. * * @remarks * You can modify the execution information of a task that runs a command in one of the following modes. To query the execution mode of a command, you can call the [DescribeInvocations](https://help.aliyun.com/document_detail/2679916.html) operation and check the `RepeatMode` value in the response. * * Period: The task runs the command on a schedule. * * NextRebootOnly: The task runs the command the next time the associated instances start. * * EveryReboot: The task runs the command every time the associated instances start. * * You can modify the execution information of a command task in one of the following execution states. To query the execution status of a command, you can call the [DescribeInvocations](https://help.aliyun.com/document_detail/2679916.html) operation and check the `InvocationStatus` value. * * Pending: The command is being verified or sent. When the execution state on at least one instance is Pending, the overall execution state is Pending. * * Running: The command is being run on instances. When the execution state on at least one instance is Running, the overall execution state is Running. * * Scheduled: The command that is set to run on a schedule is sent and waiting to be run. When the execution state on at least one instance is Scheduled, the overall execution state is Scheduled. * * Stopping: The command task is being stopped. When the execution state on at least one instance is Stopping, the overall execution state is Stopping. * * Before you modify the execution information of a scheduled task, such as the command content, custom parameters, and execution frequency, make sure that the version of Cloud Assistant Agent on the ECS instances or managed instances associated with the task is later than the following versions: * * Linux: 2.2.3.541 * * Windows: 2.1.3.541 * * If the `InvalidOperation.CloudAssistantVersionUnsupported` error code is returned in the response, update Cloud Assistant Agent to the latest version. * * You cannot modify `CommandContent` for a common Cloud Assistant command. * * If you modify the `CommandContent` value of a command and set `KeepCommand` to `true` when you call the [InvokeCommand](https://help.aliyun.com/document_detail/64841.html) or [RunCommand](https://help.aliyun.com/document_detail/141751.html) operation to run the command, a new command is added and retained. The new command consumes the quota for Cloud Assistant commands. You can retain up to 500 to 50,000 Cloud Assistant commands in each region. You can apply for a quota increase. For information about how to query and increase quotas, see [Manage quotas](https://help.aliyun.com/document_detail/184116.html). * * @param tmpReq - ModifyInvocationAttributeRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyInvocationAttributeResponse */ async modifyInvocationAttributeWithOptions(tmpReq: $_model.ModifyInvocationAttributeRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyInvocationAttributeResponse> { tmpReq.validate(); let request = new $_model.ModifyInvocationAttributeShrinkRequest({ }); OpenApiUtil.convert(tmpReq, request); if (!$dara.isNull(tmpReq.parameters)) { request.parametersShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.parameters, "Parameters", "json"); } let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.commandContent)) { query["CommandContent"] = request.commandContent; } if (!$dara.isNull(request.contentEncoding)) { query["ContentEncoding"] = request.contentEncoding; } if (!$dara.isNull(request.enableParameter)) { query["EnableParameter"] = request.enableParameter; } if (!$dara.isNull(request.frequency)) { query["Frequency"] = request.frequency; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.invokeId)) { query["InvokeId"] = request.invokeId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.parametersShrink)) { query["Parameters"] = request.parametersShrink; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyInvocationAttribute", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyInvocationAttributeResponse>(await this.callApi(params, req, runtime), new $_model.ModifyInvocationAttributeResponse({})); } /** * Modifies the execution information of a Cloud Assistant scheduled command task, including modifying the content and execution frequency of the command and adding Elastic Compute Service (ECS) instances or Alibaba Cloud managed instances to the command task. * * @remarks * You can modify the execution information of a task that runs a command in one of the following modes. To query the execution mode of a command, you can call the [DescribeInvocations](https://help.aliyun.com/document_detail/2679916.html) operation and check the `RepeatMode` value in the response. * * Period: The task runs the command on a schedule. * * NextRebootOnly: The task runs the command the next time the associated instances start. * * EveryReboot: The task runs the command every time the associated instances start. * * You can modify the execution information of a command task in one of the following execution states. To query the execution status of a command, you can call the [DescribeInvocations](https://help.aliyun.com/document_detail/2679916.html) operation and check the `InvocationStatus` value. * * Pending: The command is being verified or sent. When the execution state on at least one instance is Pending, the overall execution state is Pending. * * Running: The command is being run on instances. When the execution state on at least one instance is Running, the overall execution state is Running. * * Scheduled: The command that is set to run on a schedule is sent and waiting to be run. When the execution state on at least one instance is Scheduled, the overall execution state is Scheduled. * * Stopping: The command task is being stopped. When the execution state on at least one instance is Stopping, the overall execution state is Stopping. * * Before you modify the execution information of a scheduled task, such as the command content, custom parameters, and execution frequency, make sure that the version of Cloud Assistant Agent on the ECS instances or managed instances associated with the task is later than the following versions: * * Linux: 2.2.3.541 * * Windows: 2.1.3.541 * * If the `InvalidOperation.CloudAssistantVersionUnsupported` error code is returned in the response, update Cloud Assistant Agent to the latest version. * * You cannot modify `CommandContent` for a common Cloud Assistant command. * * If you modify the `CommandContent` value of a command and set `KeepCommand` to `true` when you call the [InvokeCommand](https://help.aliyun.com/document_detail/64841.html) or [RunCommand](https://help.aliyun.com/document_detail/141751.html) operation to run the command, a new command is added and retained. The new command consumes the quota for Cloud Assistant commands. You can retain up to 500 to 50,000 Cloud Assistant commands in each region. You can apply for a quota increase. For information about how to query and increase quotas, see [Manage quotas](https://help.aliyun.com/document_detail/184116.html). * * @param request - ModifyInvocationAttributeRequest * @returns ModifyInvocationAttributeResponse */ async modifyInvocationAttribute(request: $_model.ModifyInvocationAttributeRequest): Promise<$_model.ModifyInvocationAttributeResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyInvocationAttributeWithOptions(request, runtime); } /** * Changes the default version of a launch template. When you call this operation, you can specify DefaultVersionNumber in the request. If you do not specify a version when you create Elastic Compute Service (ECS) instances based on a launch template, the default version of the launch template is used. * * @remarks * ## Debugging * [OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.](https://api.aliyun.com/#product=Ecs\\&api=ModifyLaunchTemplateDefaultVersion\\&type=RPC\\&version=2014-05-26) * * @param request - ModifyLaunchTemplateDefaultVersionRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyLaunchTemplateDefaultVersionResponse */ async modifyLaunchTemplateDefaultVersionWithOptions(request: $_model.ModifyLaunchTemplateDefaultVersionRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyLaunchTemplateDefaultVersionResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.defaultVersionNumber)) { query["DefaultVersionNumber"] = request.defaultVersionNumber; } if (!$dara.isNull(request.launchTemplateId)) { query["LaunchTemplateId"] = request.launchTemplateId; } if (!$dara.isNull(request.launchTemplateName)) { query["LaunchTemplateName"] = request.launchTemplateName; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyLaunchTemplateDefaultVersion", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyLaunchTemplateDefaultVersionResponse>(await this.callApi(params, req, runtime), new $_model.ModifyLaunchTemplateDefaultVersionResponse({})); } /** * Changes the default version of a launch template. When you call this operation, you can specify DefaultVersionNumber in the request. If you do not specify a version when you create Elastic Compute Service (ECS) instances based on a launch template, the default version of the launch template is used. * * @remarks * ## Debugging * [OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.](https://api.aliyun.com/#product=Ecs\\&api=ModifyLaunchTemplateDefaultVersion\\&type=RPC\\&version=2014-05-26) * * @param request - ModifyLaunchTemplateDefaultVersionRequest * @returns ModifyLaunchTemplateDefaultVersionResponse */ async modifyLaunchTemplateDefaultVersion(request: $_model.ModifyLaunchTemplateDefaultVersionRequest): Promise<$_model.ModifyLaunchTemplateDefaultVersionResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyLaunchTemplateDefaultVersionWithOptions(request, runtime); } /** * Modifies the information of a managed instance. * * @remarks * ## [](#)Usage notes * The ModifyManagedInstance operation can be called to change only the name of a single managed instance. * * @param request - ModifyManagedInstanceRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyManagedInstanceResponse */ async modifyManagedInstanceWithOptions(request: $_model.ModifyManagedInstanceRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyManagedInstanceResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.instanceName)) { query["InstanceName"] = request.instanceName; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyManagedInstance", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyManagedInstanceResponse>(await this.callApi(params, req, runtime), new $_model.ModifyManagedInstanceResponse({})); } /** * Modifies the information of a managed instance. * * @remarks * ## [](#)Usage notes * The ModifyManagedInstance operation can be called to change only the name of a single managed instance. * * @param request - ModifyManagedInstanceRequest * @returns ModifyManagedInstanceResponse */ async modifyManagedInstance(request: $_model.ModifyManagedInstanceRequest): Promise<$_model.ModifyManagedInstanceResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyManagedInstanceWithOptions(request, runtime); } /** * Modifies the attributes of an elastic network interface (ENI), such as the number of queues supported by the ENI, the security groups to which the ENI belongs, the queue depth, the communication mode, and whether to retain the ENI when the Elastic Compute Service (ECS) instance to which the ENI is attached is released. * * @param request - ModifyNetworkInterfaceAttributeRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyNetworkInterfaceAttributeResponse */ async modifyNetworkInterfaceAttributeWithOptions(request: $_model.ModifyNetworkInterfaceAttributeRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyNetworkInterfaceAttributeResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.connectionTrackingConfiguration)) { query["ConnectionTrackingConfiguration"] = request.connectionTrackingConfiguration; } if (!$dara.isNull(request.deleteOnRelease)) { query["DeleteOnRelease"] = request.deleteOnRelease; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.enhancedNetwork)) { query["EnhancedNetwork"] = request.enhancedNetwork; } if (!$dara.isNull(request.networkInterfaceId)) { query["NetworkInterfaceId"] = request.networkInterfaceId; } if (!$dara.isNull(request.networkInterfaceName)) { query["NetworkInterfaceName"] = request.networkInterfaceName; } if (!$dara.isNull(request.networkInterfaceTrafficConfig)) { query["NetworkInterfaceTrafficConfig"] = request.networkInterfaceTrafficConfig; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.queueNumber)) { query["QueueNumber"] = request.queueNumber; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.rxQueueSize)) { query["RxQueueSize"] = request.rxQueueSize; } if (!$dara.isNull(request.securityGroupId)) { query["SecurityGroupId"] = request.securityGroupId; } if (!$dara.isNull(request.sourceDestCheck)) { query["SourceDestCheck"] = request.sourceDestCheck; } if (!$dara.isNull(request.txQueueSize)) { query["TxQueueSize"] = request.txQueueSize; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyNetworkInterfaceAttribute", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyNetworkInterfaceAttributeResponse>(await this.callApi(params, req, runtime), new $_model.ModifyNetworkInterfaceAttributeResponse({})); } /** * Modifies the attributes of an elastic network interface (ENI), such as the number of queues supported by the ENI, the security groups to which the ENI belongs, the queue depth, the communication mode, and whether to retain the ENI when the Elastic Compute Service (ECS) instance to which the ENI is attached is released. * * @param request - ModifyNetworkInterfaceAttributeRequest * @returns ModifyNetworkInterfaceAttributeResponse */ async modifyNetworkInterfaceAttribute(request: $_model.ModifyNetworkInterfaceAttributeRequest): Promise<$_model.ModifyNetworkInterfaceAttributeResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyNetworkInterfaceAttributeWithOptions(request, runtime); } /** * ModifyPhysicalConnectionAttribute * * @deprecated OpenAPI ModifyPhysicalConnectionAttribute is deprecated, please use Vpc::2016-04-28::ModifyPhysicalConnectionAttribute instead. * * @param request - ModifyPhysicalConnectionAttributeRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyPhysicalConnectionAttributeResponse */ async modifyPhysicalConnectionAttributeWithOptions(request: $_model.ModifyPhysicalConnectionAttributeRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyPhysicalConnectionAttributeResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.circuitCode)) { query["CircuitCode"] = request.circuitCode; } if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.lineOperator)) { query["LineOperator"] = request.lineOperator; } if (!$dara.isNull(request.name)) { query["Name"] = request.name; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.peerLocation)) { query["PeerLocation"] = request.peerLocation; } if (!$dara.isNull(request.physicalConnectionId)) { query["PhysicalConnectionId"] = request.physicalConnectionId; } if (!$dara.isNull(request.portType)) { query["PortType"] = request.portType; } if (!$dara.isNull(request.redundantPhysicalConnectionId)) { query["RedundantPhysicalConnectionId"] = request.redundantPhysicalConnectionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.userCidr)) { query["UserCidr"] = request.userCidr; } if (!$dara.isNull(request.bandwidth)) { query["bandwidth"] = request.bandwidth; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyPhysicalConnectionAttribute", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyPhysicalConnectionAttributeResponse>(await this.callApi(params, req, runtime), new $_model.ModifyPhysicalConnectionAttributeResponse({})); } /** * ModifyPhysicalConnectionAttribute * * @deprecated OpenAPI ModifyPhysicalConnectionAttribute is deprecated, please use Vpc::2016-04-28::ModifyPhysicalConnectionAttribute instead. * * @param request - ModifyPhysicalConnectionAttributeRequest * @returns ModifyPhysicalConnectionAttributeResponse */ // Deprecated async modifyPhysicalConnectionAttribute(request: $_model.ModifyPhysicalConnectionAttributeRequest): Promise<$_model.ModifyPhysicalConnectionAttributeResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyPhysicalConnectionAttributeWithOptions(request, runtime); } /** * 更新运维窗口 * * @param tmpReq - ModifyPlanMaintenanceWindowRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyPlanMaintenanceWindowResponse */ async modifyPlanMaintenanceWindowWithOptions(tmpReq: $_model.ModifyPlanMaintenanceWindowRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyPlanMaintenanceWindowResponse> { tmpReq.validate(); let request = new $_model.ModifyPlanMaintenanceWindowShrinkRequest({ }); OpenApiUtil.convert(tmpReq, request); if (!$dara.isNull(tmpReq.targetResource)) { request.targetResourceShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.targetResource, "TargetResource", "json"); } if (!$dara.isNull(tmpReq.timePeriod)) { request.timePeriodShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.timePeriod, "TimePeriod", "json"); } let query = { }; if (!$dara.isNull(request.enable)) { query["Enable"] = request.enable; } if (!$dara.isNull(request.planWindowId)) { query["PlanWindowId"] = request.planWindowId; } if (!$dara.isNull(request.planWindowName)) { query["PlanWindowName"] = request.planWindowName; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.supportMaintenanceAction)) { query["SupportMaintenanceAction"] = request.supportMaintenanceAction; } if (!$dara.isNull(request.targetResourceShrink)) { query["TargetResource"] = request.targetResourceShrink; } if (!$dara.isNull(request.timePeriodShrink)) { query["TimePeriod"] = request.timePeriodShrink; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyPlanMaintenanceWindow", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyPlanMaintenanceWindowResponse>(await this.callApi(params, req, runtime), new $_model.ModifyPlanMaintenanceWindowResponse({})); } /** * 更新运维窗口 * * @param request - ModifyPlanMaintenanceWindowRequest * @returns ModifyPlanMaintenanceWindowResponse */ async modifyPlanMaintenanceWindow(request: $_model.ModifyPlanMaintenanceWindowRequest): Promise<$_model.ModifyPlanMaintenanceWindowResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyPlanMaintenanceWindowWithOptions(request, runtime); } /** * Modifies the name and entries of a port list. You can call this operation to add, modify, and remove entries for a port list. * * @param request - ModifyPortRangeListRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyPortRangeListResponse */ async modifyPortRangeListWithOptions(request: $_model.ModifyPortRangeListRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyPortRangeListResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.addEntry)) { query["AddEntry"] = request.addEntry; } if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.portRangeListId)) { query["PortRangeListId"] = request.portRangeListId; } if (!$dara.isNull(request.portRangeListName)) { query["PortRangeListName"] = request.portRangeListName; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.removeEntry)) { query["RemoveEntry"] = request.removeEntry; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyPortRangeList", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyPortRangeListResponse>(await this.callApi(params, req, runtime), new $_model.ModifyPortRangeListResponse({})); } /** * Modifies the name and entries of a port list. You can call this operation to add, modify, and remove entries for a port list. * * @param request - ModifyPortRangeListRequest * @returns ModifyPortRangeListResponse */ async modifyPortRangeList(request: $_model.ModifyPortRangeListRequest): Promise<$_model.ModifyPortRangeListResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyPortRangeListWithOptions(request, runtime); } /** * Modifies the name, description, or entries of a prefix list. You can add, modify, and delete entries in the prefix list. * * @remarks * ## [](#)Usage notes * * The specified CIDR block must be valid. For example, 10.0.0.0/8 is a valid CIDR block while 10.0.0.1/8 is not. For more information, see the [What is CIDR?](~~40637#section-jua-0tj-q5m~~) section in the "Network FAQ" topic. * * When you add or delete an entry, you cannot specify duplicate CIDR blocks. Examples: * * For IPv4 CIDR blocks, you cannot specify the 10.0.0.0/8 CIDR block in two entries. You cannot specify the 10.0.0.1/32 CIDR block in one entry and the 10.0.0.1 CIDR block in another entry. The two CIDR blocks are the same. * * For IPv6 CIDR blocks, you cannot specify the 2001:fd01:0:0:0:0:0:0/32 CIDR block in one entry and the 2001:fd01::/32 CIDR block in another entry. The two CIDR blocks are the same. * * The CIDR block in an entry to be added cannot the same as that in an entry to be deleted. For example, when you add an entry in which the 10.0.0.0/8 CIDR block is specified, make sure that the 10.0.0.0/8 CIDR block is not specified in an entry to be deleted. * * If you want to modify the description of an entry, you must specify the CIDR block (`AddEntry.N.Cidr`) and new description (`AddEntry.N.Description`) for the entry. * * @param request - ModifyPrefixListRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyPrefixListResponse */ async modifyPrefixListWithOptions(request: $_model.ModifyPrefixListRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyPrefixListResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.addEntry)) { query["AddEntry"] = request.addEntry; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.prefixListId)) { query["PrefixListId"] = request.prefixListId; } if (!$dara.isNull(request.prefixListName)) { query["PrefixListName"] = request.prefixListName; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.removeEntry)) { query["RemoveEntry"] = request.removeEntry; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyPrefixList", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyPrefixListResponse>(await this.callApi(params, req, runtime), new $_model.ModifyPrefixListResponse({})); } /** * Modifies the name, description, or entries of a prefix list. You can add, modify, and delete entries in the prefix list. * * @remarks * ## [](#)Usage notes * * The specified CIDR block must be valid. For example, 10.0.0.0/8 is a valid CIDR block while 10.0.0.1/8 is not. For more information, see the [What is CIDR?](~~40637#section-jua-0tj-q5m~~) section in the "Network FAQ" topic. * * When you add or delete an entry, you cannot specify duplicate CIDR blocks. Examples: * * For IPv4 CIDR blocks, you cannot specify the 10.0.0.0/8 CIDR block in two entries. You cannot specify the 10.0.0.1/32 CIDR block in one entry and the 10.0.0.1 CIDR block in another entry. The two CIDR blocks are the same. * * For IPv6 CIDR blocks, you cannot specify the 2001:fd01:0:0:0:0:0:0/32 CIDR block in one entry and the 2001:fd01::/32 CIDR block in another entry. The two CIDR blocks are the same. * * The CIDR block in an entry to be added cannot the same as that in an entry to be deleted. For example, when you add an entry in which the 10.0.0.0/8 CIDR block is specified, make sure that the 10.0.0.0/8 CIDR block is not specified in an entry to be deleted. * * If you want to modify the description of an entry, you must specify the CIDR block (`AddEntry.N.Cidr`) and new description (`AddEntry.N.Description`) for the entry. * * @param request - ModifyPrefixListRequest * @returns ModifyPrefixListResponse */ async modifyPrefixList(request: $_model.ModifyPrefixListRequest): Promise<$_model.ModifyPrefixListResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyPrefixListWithOptions(request, runtime); } /** * Changes the instance type of a subscription Elastic Compute Service (ECS) instance. You can upgrade or downgrade the instance type. The new instance type takes effect for the entire lifecycle of the subscription ECS instance. * * @remarks * *Before you call this operation, make sure that you are familiar with the billing methods, [prices](https://www.alibabacloud.com/zh/pricing-calculator#/commodity/vm_intl), and [rules for unsubscribing from resources](https://help.aliyun.com/document_detail/476339.html) of ECS.** * ModifyPrepayInstanceSpec is an asynchronous operation. After a request is sent, wait for 5 to 10 seconds for the instance type change to complete. Before you change the instance type of a subscription ECS instance, call the [DescribeResourcesModification](https://help.aliyun.com/document_detail/66187.html) operation to query the instance types to which you can change the instance. * **Considerations** * * Before you change the instance type of an expired instance, you must renew the instance. * * When you downgrade the instance type of a subscription ECS instance, take note of the following items: * * The instance must be in the **Stopped** (`Stopped`) state. * * The price difference is refunded to the payment account that you used. Redeemed vouchers are not refundable. * * The new instance type takes effect only after you [start the instance](https://help.aliyun.com/document_detail/25441.html). * * When you upgrade the instance type of a subscription ECS instance, take note of the following items: * * The instance must be in the **Stopped** (`Stopped`) or **Running** (`Running`) state. * * The new instance type takes effect only after you [start the instance](https://help.aliyun.com/document_detail/25441.html) or [restart the instance](https://help.aliyun.com/document_detail/25440.html). * * @param request - ModifyPrepayInstanceSpecRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyPrepayInstanceSpecResponse */ async modifyPrepayInstanceSpecWithOptions(request: $_model.ModifyPrepayInstanceSpecRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyPrepayInstanceSpecResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.autoPay)) { query["AutoPay"] = request.autoPay; } if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.disk)) { query["Disk"] = request.disk; } if (!$dara.isNull(request.endTime)) { query["EndTime"] = request.endTime; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.instanceType)) { query["InstanceType"] = request.instanceType; } if (!$dara.isNull(request.migrateAcrossZone)) { query["MigrateAcrossZone"] = request.migrateAcrossZone; } if (!$dara.isNull(request.modifyMode)) { query["ModifyMode"] = request.modifyMode; } if (!$dara.isNull(request.operatorType)) { query["OperatorType"] = request.operatorType; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.rebootTime)) { query["RebootTime"] = request.rebootTime; } if (!$dara.isNull(request.rebootWhenFinished)) { query["RebootWhenFinished"] = request.rebootWhenFinished; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.systemDisk)) { query["SystemDisk"] = request.systemDisk; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyPrepayInstanceSpec", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyPrepayInstanceSpecResponse>(await this.callApi(params, req, runtime), new $_model.ModifyPrepayInstanceSpecResponse({})); } /** * Changes the instance type of a subscription Elastic Compute Service (ECS) instance. You can upgrade or downgrade the instance type. The new instance type takes effect for the entire lifecycle of the subscription ECS instance. * * @remarks * *Before you call this operation, make sure that you are familiar with the billing methods, [prices](https://www.alibabacloud.com/zh/pricing-calculator#/commodity/vm_intl), and [rules for unsubscribing from resources](https://help.aliyun.com/document_detail/476339.html) of ECS.** * ModifyPrepayInstanceSpec is an asynchronous operation. After a request is sent, wait for 5 to 10 seconds for the instance type change to complete. Before you change the instance type of a subscription ECS instance, call the [DescribeResourcesModification](https://help.aliyun.com/document_detail/66187.html) operation to query the instance types to which you can change the instance. * **Considerations** * * Before you change the instance type of an expired instance, you must renew the instance. * * When you downgrade the instance type of a subscription ECS instance, take note of the following items: * * The instance must be in the **Stopped** (`Stopped`) state. * * The price difference is refunded to the payment account that you used. Redeemed vouchers are not refundable. * * The new instance type takes effect only after you [start the instance](https://help.aliyun.com/document_detail/25441.html). * * When you upgrade the instance type of a subscription ECS instance, take note of the following items: * * The instance must be in the **Stopped** (`Stopped`) or **Running** (`Running`) state. * * The new instance type takes effect only after you [start the instance](https://help.aliyun.com/document_detail/25441.html) or [restart the instance](https://help.aliyun.com/document_detail/25440.html). * * @param request - ModifyPrepayInstanceSpecRequest * @returns ModifyPrepayInstanceSpecResponse */ async modifyPrepayInstanceSpec(request: $_model.ModifyPrepayInstanceSpecRequest): Promise<$_model.ModifyPrepayInstanceSpecResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyPrepayInstanceSpecWithOptions(request, runtime); } /** * Modifies the attributes of a reserved instance, such as the name and description of the instance. * * @param request - ModifyReservedInstanceAttributeRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyReservedInstanceAttributeResponse */ async modifyReservedInstanceAttributeWithOptions(request: $_model.ModifyReservedInstanceAttributeRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyReservedInstanceAttributeResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.reservedInstanceId)) { query["ReservedInstanceId"] = request.reservedInstanceId; } if (!$dara.isNull(request.reservedInstanceName)) { query["ReservedInstanceName"] = request.reservedInstanceName; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyReservedInstanceAttribute", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyReservedInstanceAttributeResponse>(await this.callApi(params, req, runtime), new $_model.ModifyReservedInstanceAttributeResponse({})); } /** * Modifies the attributes of a reserved instance, such as the name and description of the instance. * * @param request - ModifyReservedInstanceAttributeRequest * @returns ModifyReservedInstanceAttributeResponse */ async modifyReservedInstanceAttribute(request: $_model.ModifyReservedInstanceAttributeRequest): Promise<$_model.ModifyReservedInstanceAttributeResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyReservedInstanceAttributeWithOptions(request, runtime); } /** * Modifies the auto-renewal attributes of reserved instances. You can cancel or disable the auto-renewal feature for reserved instances. * * @param request - ModifyReservedInstanceAutoRenewAttributeRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyReservedInstanceAutoRenewAttributeResponse */ async modifyReservedInstanceAutoRenewAttributeWithOptions(request: $_model.ModifyReservedInstanceAutoRenewAttributeRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyReservedInstanceAutoRenewAttributeResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.period)) { query["Period"] = request.period; } if (!$dara.isNull(request.periodUnit)) { query["PeriodUnit"] = request.periodUnit; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.renewalStatus)) { query["RenewalStatus"] = request.renewalStatus; } if (!$dara.isNull(request.reservedInstanceId)) { query["ReservedInstanceId"] = request.reservedInstanceId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyReservedInstanceAutoRenewAttribute", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyReservedInstanceAutoRenewAttributeResponse>(await this.callApi(params, req, runtime), new $_model.ModifyReservedInstanceAutoRenewAttributeResponse({})); } /** * Modifies the auto-renewal attributes of reserved instances. You can cancel or disable the auto-renewal feature for reserved instances. * * @param request - ModifyReservedInstanceAutoRenewAttributeRequest * @returns ModifyReservedInstanceAutoRenewAttributeResponse */ async modifyReservedInstanceAutoRenewAttribute(request: $_model.ModifyReservedInstanceAutoRenewAttributeRequest): Promise<$_model.ModifyReservedInstanceAutoRenewAttributeResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyReservedInstanceAutoRenewAttributeWithOptions(request, runtime); } /** * Modifies the configurations of a reserved instance, such as the instance type, quantity, and zone, to split, merge, or change the scope of the reserved instance. * * @remarks * This operation is an asynchronous operation. After you call this operation to modify a reserved instance, the operation starts the modification process and returns the ID of the resulting new reserved instance. The original reserved instance enters the `Updating` state and then the `Inactive` state. At the same time, the resulting new reserved instance is generated and enters the Creating state and then the Active state. You can call the [DescribeReservedInstances](https://help.aliyun.com/document_detail/2679781.html) operation to query the states of the reserved instance. * * You can modify the configurations of a reserved instance only if the reserved instance is in the **Active** state. * * Make sure that the [computing power](~~140660#2742f3844abzz~~) of the reserved instance remains unchanged before and after the modification. Otherwise, the modification fails. * * You cannot split, merge, or change the scope of a reserved instance at the same time. * For more information, see [Split, merge, or modify reserved instances](https://help.aliyun.com/document_detail/100375.html). * ## [](#)Sample requests * * **Sample request to split a reserved instance**: Split a regional reserved instance that is scoped to the China (Hangzhou) region and can match two pay-as-you-go instances of the ecs.g5.xlarge instance type into two regional reserved instances that are scoped to the China (Hangzhou) region and each can match one pay-as-you-go instance of the ecs.g5.large instance type: * * "RegionId":"cn-hangzhou", //The ID of the region. * "ReservedInstanceId":["ecsri-bp1hd03e9uv19e75****"], //The ID of the reserved instance that you want to split. * "Configuration":[ * { * "ReservedInstanceName":"testReservedInstanceName1", //The name of the new reserved instance. * "InstanceType":"ecs.g5.large", //The instance type that the new reserved instance can match. * "Scope":"Region", //The scope level of the new reserved instance, which must be the same as the scope level of the original reserved instance. * "InstanceAmount":1 //The number of pay-as-you-go instances of the specified instance type that each new reserved instance can match. * }, * { * "ReservedInstanceName":"testReservedInstanceName2", * "InstanceType":"ecs.g5.large", * "Scope":"Region", * "InstanceAmount":1 * } * ] * * **Sample request to merge reserved instance:**: Merge two zonal reserved instances that are scoped to Hangzhou Zone H and can match four pay-as-you-go instances of the ecs.g5.xlarge instance type into one zonal reserved instance that is scoped to Hangzhou Zone H and can match two pay-as-you-go instances of the ecs.g5.4xlarge instance type: * * "RegionId":"cn-hangzhou", //The ID of the region. * "ReservedInstanceId":["ecsri-bp1hd03e9uv16b75****",""ecsri-bp1hd03e9uv16b76****""], //The IDs of the reserved instances that you want to merge. * "Configuration":[ * { * "ReservedInstanceName":"testReservedInstanceName", //The name of the new reserved instance. * "InstanceType":"ecs.g5.4xlarge", //The instance type that the new reserved instance can match. * "Scope":"Zone", //The scope level of the new reserved instance, which must be the same as the scope level of the original reserved instances. * "ZoneId":"cn-hangzhou-h", // * "InstanceAmount":2 //The number of pay-as-you-go instances of the specified instance type that the new reserved instance can match. * } * ] * * **Sample request to change the scope of a reserved instance**: Change a regional reserved instance that is scoped to Hangzhou Zone H and can match six pay-as-you-go instances of the ecs.g5.xlarge instance type to a regional reserved instance that is scoped to the China (Hangzhou) region and can match three pay-as-you-go instances of the ecs.g5.2xlarge instance type. * * "RegionId":"cn-hangzhou", //The ID of the region. * "ReservedInstanceId":["ecsri-bp1hd03e9uv16b77****"], //The ID of the reserved instance whose scope you want to change. * "Configuration":[ * { * "ReservedInstanceName":"testReservedInstanceName", //The name of the new reserved instance. * "InstanceType":"ecs.g5.2xlarge", //The instance type that the new reserved instance can match. * "Scope":"Region", //The scope level of the new reserved instance. * "InstanceAmount":3 //The number of pay-as-you-go instances of the specified instance type that the new reserved instance can match. * } * ] * * @param request - ModifyReservedInstancesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyReservedInstancesResponse */ async modifyReservedInstancesWithOptions(request: $_model.ModifyReservedInstancesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyReservedInstancesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.configuration)) { query["Configuration"] = request.configuration; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.reservedInstanceId)) { query["ReservedInstanceId"] = request.reservedInstanceId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyReservedInstances", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyReservedInstancesResponse>(await this.callApi(params, req, runtime), new $_model.ModifyReservedInstancesResponse({})); } /** * Modifies the configurations of a reserved instance, such as the instance type, quantity, and zone, to split, merge, or change the scope of the reserved instance. * * @remarks * This operation is an asynchronous operation. After you call this operation to modify a reserved instance, the operation starts the modification process and returns the ID of the resulting new reserved instance. The original reserved instance enters the `Updating` state and then the `Inactive` state. At the same time, the resulting new reserved instance is generated and enters the Creating state and then the Active state. You can call the [DescribeReservedInstances](https://help.aliyun.com/document_detail/2679781.html) operation to query the states of the reserved instance. * * You can modify the configurations of a reserved instance only if the reserved instance is in the **Active** state. * * Make sure that the [computing power](~~140660#2742f3844abzz~~) of the reserved instance remains unchanged before and after the modification. Otherwise, the modification fails. * * You cannot split, merge, or change the scope of a reserved instance at the same time. * For more information, see [Split, merge, or modify reserved instances](https://help.aliyun.com/document_detail/100375.html). * ## [](#)Sample requests * * **Sample request to split a reserved instance**: Split a regional reserved instance that is scoped to the China (Hangzhou) region and can match two pay-as-you-go instances of the ecs.g5.xlarge instance type into two regional reserved instances that are scoped to the China (Hangzhou) region and each can match one pay-as-you-go instance of the ecs.g5.large instance type: * * "RegionId":"cn-hangzhou", //The ID of the region. * "ReservedInstanceId":["ecsri-bp1hd03e9uv19e75****"], //The ID of the reserved instance that you want to split. * "Configuration":[ * { * "ReservedInstanceName":"testReservedInstanceName1", //The name of the new reserved instance. * "InstanceType":"ecs.g5.large", //The instance type that the new reserved instance can match. * "Scope":"Region", //The scope level of the new reserved instance, which must be the same as the scope level of the original reserved instance. * "InstanceAmount":1 //The number of pay-as-you-go instances of the specified instance type that each new reserved instance can match. * }, * { * "ReservedInstanceName":"testReservedInstanceName2", * "InstanceType":"ecs.g5.large", * "Scope":"Region", * "InstanceAmount":1 * } * ] * * **Sample request to merge reserved instance:**: Merge two zonal reserved instances that are scoped to Hangzhou Zone H and can match four pay-as-you-go instances of the ecs.g5.xlarge instance type into one zonal reserved instance that is scoped to Hangzhou Zone H and can match two pay-as-you-go instances of the ecs.g5.4xlarge instance type: * * "RegionId":"cn-hangzhou", //The ID of the region. * "ReservedInstanceId":["ecsri-bp1hd03e9uv16b75****",""ecsri-bp1hd03e9uv16b76****""], //The IDs of the reserved instances that you want to merge. * "Configuration":[ * { * "ReservedInstanceName":"testReservedInstanceName", //The name of the new reserved instance. * "InstanceType":"ecs.g5.4xlarge", //The instance type that the new reserved instance can match. * "Scope":"Zone", //The scope level of the new reserved instance, which must be the same as the scope level of the original reserved instances. * "ZoneId":"cn-hangzhou-h", // * "InstanceAmount":2 //The number of pay-as-you-go instances of the specified instance type that the new reserved instance can match. * } * ] * * **Sample request to change the scope of a reserved instance**: Change a regional reserved instance that is scoped to Hangzhou Zone H and can match six pay-as-you-go instances of the ecs.g5.xlarge instance type to a regional reserved instance that is scoped to the China (Hangzhou) region and can match three pay-as-you-go instances of the ecs.g5.2xlarge instance type. * * "RegionId":"cn-hangzhou", //The ID of the region. * "ReservedInstanceId":["ecsri-bp1hd03e9uv16b77****"], //The ID of the reserved instance whose scope you want to change. * "Configuration":[ * { * "ReservedInstanceName":"testReservedInstanceName", //The name of the new reserved instance. * "InstanceType":"ecs.g5.2xlarge", //The instance type that the new reserved instance can match. * "Scope":"Region", //The scope level of the new reserved instance. * "InstanceAmount":3 //The number of pay-as-you-go instances of the specified instance type that the new reserved instance can match. * } * ] * * @param request - ModifyReservedInstancesRequest * @returns ModifyReservedInstancesResponse */ async modifyReservedInstances(request: $_model.ModifyReservedInstancesRequest): Promise<$_model.ModifyReservedInstancesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyReservedInstancesWithOptions(request, runtime); } /** * ModifyRouterInterfaceAttribute * * @deprecated OpenAPI ModifyRouterInterfaceAttribute is deprecated, please use Vpc::2016-04-28::ModifyRouterInterfaceAttribute instead. * * @param request - ModifyRouterInterfaceAttributeRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyRouterInterfaceAttributeResponse */ async modifyRouterInterfaceAttributeWithOptions(request: $_model.ModifyRouterInterfaceAttributeRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyRouterInterfaceAttributeResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.healthCheckSourceIp)) { query["HealthCheckSourceIp"] = request.healthCheckSourceIp; } if (!$dara.isNull(request.healthCheckTargetIp)) { query["HealthCheckTargetIp"] = request.healthCheckTargetIp; } if (!$dara.isNull(request.name)) { query["Name"] = request.name; } if (!$dara.isNull(request.oppositeInterfaceId)) { query["OppositeInterfaceId"] = request.oppositeInterfaceId; } if (!$dara.isNull(request.oppositeInterfaceOwnerId)) { query["OppositeInterfaceOwnerId"] = request.oppositeInterfaceOwnerId; } if (!$dara.isNull(request.oppositeRouterId)) { query["OppositeRouterId"] = request.oppositeRouterId; } if (!$dara.isNull(request.oppositeRouterType)) { query["OppositeRouterType"] = request.oppositeRouterType; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.routerInterfaceId)) { query["RouterInterfaceId"] = request.routerInterfaceId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyRouterInterfaceAttribute", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyRouterInterfaceAttributeResponse>(await this.callApi(params, req, runtime), new $_model.ModifyRouterInterfaceAttributeResponse({})); } /** * ModifyRouterInterfaceAttribute * * @deprecated OpenAPI ModifyRouterInterfaceAttribute is deprecated, please use Vpc::2016-04-28::ModifyRouterInterfaceAttribute instead. * * @param request - ModifyRouterInterfaceAttributeRequest * @returns ModifyRouterInterfaceAttributeResponse */ // Deprecated async modifyRouterInterfaceAttribute(request: $_model.ModifyRouterInterfaceAttributeRequest): Promise<$_model.ModifyRouterInterfaceAttributeResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyRouterInterfaceAttributeWithOptions(request, runtime); } /** * ModifyRouterInterfaceSpec * * @deprecated OpenAPI ModifyRouterInterfaceSpec is deprecated, please use Vpc::2016-04-28::ModifyRouterInterfaceSpec instead. * * @param request - ModifyRouterInterfaceSpecRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyRouterInterfaceSpecResponse */ async modifyRouterInterfaceSpecWithOptions(request: $_model.ModifyRouterInterfaceSpecRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyRouterInterfaceSpecResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.routerInterfaceId)) { query["RouterInterfaceId"] = request.routerInterfaceId; } if (!$dara.isNull(request.spec)) { query["Spec"] = request.spec; } if (!$dara.isNull(request.userCidr)) { query["UserCidr"] = request.userCidr; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyRouterInterfaceSpec", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyRouterInterfaceSpecResponse>(await this.callApi(params, req, runtime), new $_model.ModifyRouterInterfaceSpecResponse({})); } /** * ModifyRouterInterfaceSpec * * @deprecated OpenAPI ModifyRouterInterfaceSpec is deprecated, please use Vpc::2016-04-28::ModifyRouterInterfaceSpec instead. * * @param request - ModifyRouterInterfaceSpecRequest * @returns ModifyRouterInterfaceSpecResponse */ // Deprecated async modifyRouterInterfaceSpec(request: $_model.ModifyRouterInterfaceSpecRequest): Promise<$_model.ModifyRouterInterfaceSpecResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyRouterInterfaceSpecWithOptions(request, runtime); } /** * Modifies the name or description of a specific security group. * * @param request - ModifySecurityGroupAttributeRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifySecurityGroupAttributeResponse */ async modifySecurityGroupAttributeWithOptions(request: $_model.ModifySecurityGroupAttributeRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifySecurityGroupAttributeResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.securityGroupId)) { query["SecurityGroupId"] = request.securityGroupId; } if (!$dara.isNull(request.securityGroupName)) { query["SecurityGroupName"] = request.securityGroupName; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifySecurityGroupAttribute", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifySecurityGroupAttributeResponse>(await this.callApi(params, req, runtime), new $_model.ModifySecurityGroupAttributeResponse({})); } /** * Modifies the name or description of a specific security group. * * @param request - ModifySecurityGroupAttributeRequest * @returns ModifySecurityGroupAttributeResponse */ async modifySecurityGroupAttribute(request: $_model.ModifySecurityGroupAttributeRequest): Promise<$_model.ModifySecurityGroupAttributeResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifySecurityGroupAttributeWithOptions(request, runtime); } /** * Modifies an outbound security group rule in a security group. * * @remarks * Take note of the following items: * * An authorization object in a security group rule can be of one of the following types: IPv4 CIDR block or address, IPv6 CIDR block or address, security group, or prefix list. You cannot call this operation to change the type of an existing authorization object. For example, if an authorization object is an IPv4 CIDR block, you can change the authorization object to a different IPv4 CIDR block or an IPv4 address, but you cannot change the authorization object to an IPv6 CIDR block or address, a security group, or a prefix list. * * You cannot delete the value of a non-empty parameter. If you want to delete the values of non-empty parameters, we recommend that you create another rule and delete the original rule. * * @param request - ModifySecurityGroupEgressRuleRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifySecurityGroupEgressRuleResponse */ async modifySecurityGroupEgressRuleWithOptions(request: $_model.ModifySecurityGroupEgressRuleRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifySecurityGroupEgressRuleResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.destCidrIp)) { query["DestCidrIp"] = request.destCidrIp; } if (!$dara.isNull(request.destGroupId)) { query["DestGroupId"] = request.destGroupId; } if (!$dara.isNull(request.destGroupOwnerAccount)) { query["DestGroupOwnerAccount"] = request.destGroupOwnerAccount; } if (!$dara.isNull(request.destGroupOwnerId)) { query["DestGroupOwnerId"] = request.destGroupOwnerId; } if (!$dara.isNull(request.destPrefixListId)) { query["DestPrefixListId"] = request.destPrefixListId; } if (!$dara.isNull(request.ipProtocol)) { query["IpProtocol"] = request.ipProtocol; } if (!$dara.isNull(request.ipv6DestCidrIp)) { query["Ipv6DestCidrIp"] = request.ipv6DestCidrIp; } if (!$dara.isNull(request.ipv6SourceCidrIp)) { query["Ipv6SourceCidrIp"] = request.ipv6SourceCidrIp; } if (!$dara.isNull(request.nicType)) { query["NicType"] = request.nicType; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.policy)) { query["Policy"] = request.policy; } if (!$dara.isNull(request.portRange)) { query["PortRange"] = request.portRange; } if (!$dara.isNull(request.portRangeListId)) { query["PortRangeListId"] = request.portRangeListId; } if (!$dara.isNull(request.priority)) { query["Priority"] = request.priority; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.securityGroupId)) { query["SecurityGroupId"] = request.securityGroupId; } if (!$dara.isNull(request.securityGroupRuleId)) { query["SecurityGroupRuleId"] = request.securityGroupRuleId; } if (!$dara.isNull(request.sourceCidrIp)) { query["SourceCidrIp"] = request.sourceCidrIp; } if (!$dara.isNull(request.sourcePortRange)) { query["SourcePortRange"] = request.sourcePortRange; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifySecurityGroupEgressRule", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifySecurityGroupEgressRuleResponse>(await this.callApi(params, req, runtime), new $_model.ModifySecurityGroupEgressRuleResponse({})); } /** * Modifies an outbound security group rule in a security group. * * @remarks * Take note of the following items: * * An authorization object in a security group rule can be of one of the following types: IPv4 CIDR block or address, IPv6 CIDR block or address, security group, or prefix list. You cannot call this operation to change the type of an existing authorization object. For example, if an authorization object is an IPv4 CIDR block, you can change the authorization object to a different IPv4 CIDR block or an IPv4 address, but you cannot change the authorization object to an IPv6 CIDR block or address, a security group, or a prefix list. * * You cannot delete the value of a non-empty parameter. If you want to delete the values of non-empty parameters, we recommend that you create another rule and delete the original rule. * * @param request - ModifySecurityGroupEgressRuleRequest * @returns ModifySecurityGroupEgressRuleResponse */ async modifySecurityGroupEgressRule(request: $_model.ModifySecurityGroupEgressRuleRequest): Promise<$_model.ModifySecurityGroupEgressRuleResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifySecurityGroupEgressRuleWithOptions(request, runtime); } /** * Modifies the internal access control policy of a basic security group. * * @remarks * By default, advanced security groups use the **internal isolation policy**, and Elastic Compute Service (ECS) instances in each advanced security group cannot communicate with each other. The internal access control policy of advanced security groups cannot be modified. * * You can call the [DescribeSecurityGroupAttribute](https://help.aliyun.com/document_detail/25555.html) operation to query the internal access control policy of a security group. * * If the internal access control policy of a security group is set to **Accept**, the security group uses the internal interconnectivity policy and all ECS instances in the security group can communicate with each other over the internal network, regardless of whether custom rules exist in the security group. * * If the internal access control policy of a security group is set to **Drop** and the security group contains no custom rules, the security group uses the internal isolation policy and all ECS instances in the security group cannot communicate with each other over the internal network. In this case, you can use custom rules to allow ECS instances in the security group to communicate with each other. For example, you can call the [AuthorizeSecurityGroup](https://help.aliyun.com/document_detail/25554.html) operation to configure custom rules. * * @param request - ModifySecurityGroupPolicyRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifySecurityGroupPolicyResponse */ async modifySecurityGroupPolicyWithOptions(request: $_model.ModifySecurityGroupPolicyRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifySecurityGroupPolicyResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.innerAccessPolicy)) { query["InnerAccessPolicy"] = request.innerAccessPolicy; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.securityGroupId)) { query["SecurityGroupId"] = request.securityGroupId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifySecurityGroupPolicy", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifySecurityGroupPolicyResponse>(await this.callApi(params, req, runtime), new $_model.ModifySecurityGroupPolicyResponse({})); } /** * Modifies the internal access control policy of a basic security group. * * @remarks * By default, advanced security groups use the **internal isolation policy**, and Elastic Compute Service (ECS) instances in each advanced security group cannot communicate with each other. The internal access control policy of advanced security groups cannot be modified. * * You can call the [DescribeSecurityGroupAttribute](https://help.aliyun.com/document_detail/25555.html) operation to query the internal access control policy of a security group. * * If the internal access control policy of a security group is set to **Accept**, the security group uses the internal interconnectivity policy and all ECS instances in the security group can communicate with each other over the internal network, regardless of whether custom rules exist in the security group. * * If the internal access control policy of a security group is set to **Drop** and the security group contains no custom rules, the security group uses the internal isolation policy and all ECS instances in the security group cannot communicate with each other over the internal network. In this case, you can use custom rules to allow ECS instances in the security group to communicate with each other. For example, you can call the [AuthorizeSecurityGroup](https://help.aliyun.com/document_detail/25554.html) operation to configure custom rules. * * @param request - ModifySecurityGroupPolicyRequest * @returns ModifySecurityGroupPolicyResponse */ async modifySecurityGroupPolicy(request: $_model.ModifySecurityGroupPolicyRequest): Promise<$_model.ModifySecurityGroupPolicyResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifySecurityGroupPolicyWithOptions(request, runtime); } /** * Modifies an inbound security group rule in a security group. * * @remarks * Take note of the following items: * * An authorization object in a security group rule can be of one of the following types: IPv4 CIDR block or address, IPv6 CIDR block or address, security group, or prefix list. You cannot call this operation to change the type of an existing authorization object. For example, if an authorization object is an IPv4 CIDR block, you can change the authorization object to a different IPv4 CIDR block or an IPv4 address, but you cannot change the authorization object to an IPv6 CIDR block or address, a security group, or a prefix list. * * You cannot delete the value of a non-empty parameter. If you want to delete the values of non-empty parameters, we recommend that you create a security group rule and delete the original security group rule. * * @param request - ModifySecurityGroupRuleRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifySecurityGroupRuleResponse */ async modifySecurityGroupRuleWithOptions(request: $_model.ModifySecurityGroupRuleRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifySecurityGroupRuleResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.destCidrIp)) { query["DestCidrIp"] = request.destCidrIp; } if (!$dara.isNull(request.ipProtocol)) { query["IpProtocol"] = request.ipProtocol; } if (!$dara.isNull(request.ipv6DestCidrIp)) { query["Ipv6DestCidrIp"] = request.ipv6DestCidrIp; } if (!$dara.isNull(request.ipv6SourceCidrIp)) { query["Ipv6SourceCidrIp"] = request.ipv6SourceCidrIp; } if (!$dara.isNull(request.nicType)) { query["NicType"] = request.nicType; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.policy)) { query["Policy"] = request.policy; } if (!$dara.isNull(request.portRange)) { query["PortRange"] = request.portRange; } if (!$dara.isNull(request.portRangeListId)) { query["PortRangeListId"] = request.portRangeListId; } if (!$dara.isNull(request.priority)) { query["Priority"] = request.priority; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.securityGroupId)) { query["SecurityGroupId"] = request.securityGroupId; } if (!$dara.isNull(request.securityGroupRuleId)) { query["SecurityGroupRuleId"] = request.securityGroupRuleId; } if (!$dara.isNull(request.sourceCidrIp)) { query["SourceCidrIp"] = request.sourceCidrIp; } if (!$dara.isNull(request.sourceGroupId)) { query["SourceGroupId"] = request.sourceGroupId; } if (!$dara.isNull(request.sourceGroupOwnerAccount)) { query["SourceGroupOwnerAccount"] = request.sourceGroupOwnerAccount; } if (!$dara.isNull(request.sourceGroupOwnerId)) { query["SourceGroupOwnerId"] = request.sourceGroupOwnerId; } if (!$dara.isNull(request.sourcePortRange)) { query["SourcePortRange"] = request.sourcePortRange; } if (!$dara.isNull(request.sourcePrefixListId)) { query["SourcePrefixListId"] = request.sourcePrefixListId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifySecurityGroupRule", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifySecurityGroupRuleResponse>(await this.callApi(params, req, runtime), new $_model.ModifySecurityGroupRuleResponse({})); } /** * Modifies an inbound security group rule in a security group. * * @remarks * Take note of the following items: * * An authorization object in a security group rule can be of one of the following types: IPv4 CIDR block or address, IPv6 CIDR block or address, security group, or prefix list. You cannot call this operation to change the type of an existing authorization object. For example, if an authorization object is an IPv4 CIDR block, you can change the authorization object to a different IPv4 CIDR block or an IPv4 address, but you cannot change the authorization object to an IPv6 CIDR block or address, a security group, or a prefix list. * * You cannot delete the value of a non-empty parameter. If you want to delete the values of non-empty parameters, we recommend that you create a security group rule and delete the original security group rule. * * @param request - ModifySecurityGroupRuleRequest * @returns ModifySecurityGroupRuleResponse */ async modifySecurityGroupRule(request: $_model.ModifySecurityGroupRuleRequest): Promise<$_model.ModifySecurityGroupRuleResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifySecurityGroupRuleWithOptions(request, runtime); } /** * Modifies the name, description, or retention period of a snapshot. * * @param request - ModifySnapshotAttributeRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifySnapshotAttributeResponse */ async modifySnapshotAttributeWithOptions(request: $_model.ModifySnapshotAttributeRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifySnapshotAttributeResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.disableInstantAccess)) { query["DisableInstantAccess"] = request.disableInstantAccess; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.retentionDays)) { query["RetentionDays"] = request.retentionDays; } if (!$dara.isNull(request.snapshotId)) { query["SnapshotId"] = request.snapshotId; } if (!$dara.isNull(request.snapshotName)) { query["SnapshotName"] = request.snapshotName; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifySnapshotAttribute", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifySnapshotAttributeResponse>(await this.callApi(params, req, runtime), new $_model.ModifySnapshotAttributeResponse({})); } /** * Modifies the name, description, or retention period of a snapshot. * * @param request - ModifySnapshotAttributeRequest * @returns ModifySnapshotAttributeResponse */ async modifySnapshotAttribute(request: $_model.ModifySnapshotAttributeRequest): Promise<$_model.ModifySnapshotAttributeResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifySnapshotAttributeWithOptions(request, runtime); } /** * Changes the type of a snapshot. You can call this operation to convert a standard snapshot into an archive snapshot. * * @remarks * Archived snapshots cannot be restored to standard snapshots. * * You can archive only standard snapshots that have been retained for at least 14 days. * * You cannot archive snapshots that are shared to you, snapshots managed by Cloud Backup, or snapshots in cloud boxes. * * @param request - ModifySnapshotCategoryRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifySnapshotCategoryResponse */ async modifySnapshotCategoryWithOptions(request: $_model.ModifySnapshotCategoryRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifySnapshotCategoryResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.category)) { query["Category"] = request.category; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.retentionDays)) { query["RetentionDays"] = request.retentionDays; } if (!$dara.isNull(request.snapshotId)) { query["SnapshotId"] = request.snapshotId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifySnapshotCategory", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifySnapshotCategoryResponse>(await this.callApi(params, req, runtime), new $_model.ModifySnapshotCategoryResponse({})); } /** * Changes the type of a snapshot. You can call this operation to convert a standard snapshot into an archive snapshot. * * @remarks * Archived snapshots cannot be restored to standard snapshots. * * You can archive only standard snapshots that have been retained for at least 14 days. * * You cannot archive snapshots that are shared to you, snapshots managed by Cloud Backup, or snapshots in cloud boxes. * * @param request - ModifySnapshotCategoryRequest * @returns ModifySnapshotCategoryResponse */ async modifySnapshotCategory(request: $_model.ModifySnapshotCategoryRequest): Promise<$_model.ModifySnapshotCategoryResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifySnapshotCategoryWithOptions(request, runtime); } /** * Modifies the name and description of a snapshot-consistent group. * * @param request - ModifySnapshotGroupRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifySnapshotGroupResponse */ async modifySnapshotGroupWithOptions(request: $_model.ModifySnapshotGroupRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifySnapshotGroupResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.name)) { query["Name"] = request.name; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.snapshotGroupId)) { query["SnapshotGroupId"] = request.snapshotGroupId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifySnapshotGroup", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifySnapshotGroupResponse>(await this.callApi(params, req, runtime), new $_model.ModifySnapshotGroupResponse({})); } /** * Modifies the name and description of a snapshot-consistent group. * * @param request - ModifySnapshotGroupRequest * @returns ModifySnapshotGroupResponse */ async modifySnapshotGroup(request: $_model.ModifySnapshotGroupRequest): Promise<$_model.ModifySnapshotGroupResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifySnapshotGroupWithOptions(request, runtime); } /** * Modifies the name or description of a storage capacity unit (SCU). * * @param request - ModifyStorageCapacityUnitAttributeRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyStorageCapacityUnitAttributeResponse */ async modifyStorageCapacityUnitAttributeWithOptions(request: $_model.ModifyStorageCapacityUnitAttributeRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyStorageCapacityUnitAttributeResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.name)) { query["Name"] = request.name; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.storageCapacityUnitId)) { query["StorageCapacityUnitId"] = request.storageCapacityUnitId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyStorageCapacityUnitAttribute", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyStorageCapacityUnitAttributeResponse>(await this.callApi(params, req, runtime), new $_model.ModifyStorageCapacityUnitAttributeResponse({})); } /** * Modifies the name or description of a storage capacity unit (SCU). * * @param request - ModifyStorageCapacityUnitAttributeRequest * @returns ModifyStorageCapacityUnitAttributeResponse */ async modifyStorageCapacityUnitAttribute(request: $_model.ModifyStorageCapacityUnitAttributeRequest): Promise<$_model.ModifyStorageCapacityUnitAttributeResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyStorageCapacityUnitAttributeWithOptions(request, runtime); } /** * Modifies the name or description of a storage set. * * @param request - ModifyStorageSetAttributeRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyStorageSetAttributeResponse */ async modifyStorageSetAttributeWithOptions(request: $_model.ModifyStorageSetAttributeRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyStorageSetAttributeResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.storageSetId)) { query["StorageSetId"] = request.storageSetId; } if (!$dara.isNull(request.storageSetName)) { query["StorageSetName"] = request.storageSetName; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyStorageSetAttribute", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyStorageSetAttributeResponse>(await this.callApi(params, req, runtime), new $_model.ModifyStorageSetAttributeResponse({})); } /** * Modifies the name or description of a storage set. * * @param request - ModifyStorageSetAttributeRequest * @returns ModifyStorageSetAttributeResponse */ async modifyStorageSetAttribute(request: $_model.ModifyStorageSetAttributeRequest): Promise<$_model.ModifyStorageSetAttributeResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyStorageSetAttributeWithOptions(request, runtime); } /** * 设置用户级别默认属性 * * @deprecated OpenAPI ModifyUserBusinessBehavior is deprecated * * @param request - ModifyUserBusinessBehaviorRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyUserBusinessBehaviorResponse */ async modifyUserBusinessBehaviorWithOptions(request: $_model.ModifyUserBusinessBehaviorRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyUserBusinessBehaviorResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.statusKey)) { query["statusKey"] = request.statusKey; } if (!$dara.isNull(request.statusValue)) { query["statusValue"] = request.statusValue; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyUserBusinessBehavior", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyUserBusinessBehaviorResponse>(await this.callApi(params, req, runtime), new $_model.ModifyUserBusinessBehaviorResponse({})); } /** * 设置用户级别默认属性 * * @deprecated OpenAPI ModifyUserBusinessBehavior is deprecated * * @param request - ModifyUserBusinessBehaviorRequest * @returns ModifyUserBusinessBehaviorResponse */ // Deprecated async modifyUserBusinessBehavior(request: $_model.ModifyUserBusinessBehaviorRequest): Promise<$_model.ModifyUserBusinessBehaviorResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyUserBusinessBehaviorWithOptions(request, runtime); } /** * ModifyVRouterAttribute * * @deprecated OpenAPI ModifyVRouterAttribute is deprecated, please use Vpc::2016-04-28::ModifyVRouterAttribute instead. * * @param request - ModifyVRouterAttributeRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyVRouterAttributeResponse */ async modifyVRouterAttributeWithOptions(request: $_model.ModifyVRouterAttributeRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyVRouterAttributeResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.VRouterId)) { query["VRouterId"] = request.VRouterId; } if (!$dara.isNull(request.VRouterName)) { query["VRouterName"] = request.VRouterName; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyVRouterAttribute", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyVRouterAttributeResponse>(await this.callApi(params, req, runtime), new $_model.ModifyVRouterAttributeResponse({})); } /** * ModifyVRouterAttribute * * @deprecated OpenAPI ModifyVRouterAttribute is deprecated, please use Vpc::2016-04-28::ModifyVRouterAttribute instead. * * @param request - ModifyVRouterAttributeRequest * @returns ModifyVRouterAttributeResponse */ // Deprecated async modifyVRouterAttribute(request: $_model.ModifyVRouterAttributeRequest): Promise<$_model.ModifyVRouterAttributeResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyVRouterAttributeWithOptions(request, runtime); } /** * ModifyVSwitchAttribute * * @deprecated OpenAPI ModifyVSwitchAttribute is deprecated, please use Vpc::2016-04-28::ModifyVSwitchAttribute instead. * * @param request - ModifyVSwitchAttributeRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyVSwitchAttributeResponse */ async modifyVSwitchAttributeWithOptions(request: $_model.ModifyVSwitchAttributeRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyVSwitchAttributeResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.vSwitchId)) { query["VSwitchId"] = request.vSwitchId; } if (!$dara.isNull(request.vSwitchName)) { query["VSwitchName"] = request.vSwitchName; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyVSwitchAttribute", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyVSwitchAttributeResponse>(await this.callApi(params, req, runtime), new $_model.ModifyVSwitchAttributeResponse({})); } /** * ModifyVSwitchAttribute * * @deprecated OpenAPI ModifyVSwitchAttribute is deprecated, please use Vpc::2016-04-28::ModifyVSwitchAttribute instead. * * @param request - ModifyVSwitchAttributeRequest * @returns ModifyVSwitchAttributeResponse */ // Deprecated async modifyVSwitchAttribute(request: $_model.ModifyVSwitchAttributeRequest): Promise<$_model.ModifyVSwitchAttributeResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyVSwitchAttributeWithOptions(request, runtime); } /** * ModifyVirtualBorderRouterAttribute * * @deprecated OpenAPI ModifyVirtualBorderRouterAttribute is deprecated, please use Vpc::2016-04-28::ModifyVirtualBorderRouterAttribute instead. * * @param request - ModifyVirtualBorderRouterAttributeRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyVirtualBorderRouterAttributeResponse */ async modifyVirtualBorderRouterAttributeWithOptions(request: $_model.ModifyVirtualBorderRouterAttributeRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyVirtualBorderRouterAttributeResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.circuitCode)) { query["CircuitCode"] = request.circuitCode; } if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.localGatewayIp)) { query["LocalGatewayIp"] = request.localGatewayIp; } if (!$dara.isNull(request.name)) { query["Name"] = request.name; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.peerGatewayIp)) { query["PeerGatewayIp"] = request.peerGatewayIp; } if (!$dara.isNull(request.peeringSubnetMask)) { query["PeeringSubnetMask"] = request.peeringSubnetMask; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.userCidr)) { query["UserCidr"] = request.userCidr; } if (!$dara.isNull(request.vbrId)) { query["VbrId"] = request.vbrId; } if (!$dara.isNull(request.vlanId)) { query["VlanId"] = request.vlanId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyVirtualBorderRouterAttribute", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyVirtualBorderRouterAttributeResponse>(await this.callApi(params, req, runtime), new $_model.ModifyVirtualBorderRouterAttributeResponse({})); } /** * ModifyVirtualBorderRouterAttribute * * @deprecated OpenAPI ModifyVirtualBorderRouterAttribute is deprecated, please use Vpc::2016-04-28::ModifyVirtualBorderRouterAttribute instead. * * @param request - ModifyVirtualBorderRouterAttributeRequest * @returns ModifyVirtualBorderRouterAttributeResponse */ // Deprecated async modifyVirtualBorderRouterAttribute(request: $_model.ModifyVirtualBorderRouterAttributeRequest): Promise<$_model.ModifyVirtualBorderRouterAttributeResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyVirtualBorderRouterAttributeWithOptions(request, runtime); } /** * ModifyVpcAttribute * * @deprecated OpenAPI ModifyVpcAttribute is deprecated, please use Vpc::2016-04-28::ModifyVpcAttribute instead. * * @param request - ModifyVpcAttributeRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ModifyVpcAttributeResponse */ async modifyVpcAttributeWithOptions(request: $_model.ModifyVpcAttributeRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyVpcAttributeResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.cidrBlock)) { query["CidrBlock"] = request.cidrBlock; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.userCidr)) { query["UserCidr"] = request.userCidr; } if (!$dara.isNull(request.vpcId)) { query["VpcId"] = request.vpcId; } if (!$dara.isNull(request.vpcName)) { query["VpcName"] = request.vpcName; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ModifyVpcAttribute", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ModifyVpcAttributeResponse>(await this.callApi(params, req, runtime), new $_model.ModifyVpcAttributeResponse({})); } /** * ModifyVpcAttribute * * @deprecated OpenAPI ModifyVpcAttribute is deprecated, please use Vpc::2016-04-28::ModifyVpcAttribute instead. * * @param request - ModifyVpcAttributeRequest * @returns ModifyVpcAttributeResponse */ // Deprecated async modifyVpcAttribute(request: $_model.ModifyVpcAttributeRequest): Promise<$_model.ModifyVpcAttributeResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.modifyVpcAttributeWithOptions(request, runtime); } /** * Activate the snapshot service. * * @param request - OpenSnapshotServiceRequest * @param runtime - runtime options for this request RuntimeOptions * @returns OpenSnapshotServiceResponse */ async openSnapshotServiceWithOptions(request: $_model.OpenSnapshotServiceRequest, runtime: $dara.RuntimeOptions): Promise<$_model.OpenSnapshotServiceResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "OpenSnapshotService", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.OpenSnapshotServiceResponse>(await this.callApi(params, req, runtime), new $_model.OpenSnapshotServiceResponse({})); } /** * Activate the snapshot service. * * @param request - OpenSnapshotServiceRequest * @returns OpenSnapshotServiceResponse */ async openSnapshotService(request: $_model.OpenSnapshotServiceRequest): Promise<$_model.OpenSnapshotServiceResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.openSnapshotServiceWithOptions(request, runtime); } /** * Purchases an elasticity assurance that is not in the Active state and for which resources are prepared. * * @remarks * Before you call this operation, familiarize yourself with the billing rules and [pricing](https://www.alibabacloud.com/zh?spm=5176.28117011.nav-v2-dropdown-language.exp-location-zh.9ae4165bF98IHz&_p_lc=1) of elasticity assurances. * Before you purchase an elasticity assurance, you can call the [DescribeElasticityAssurances](https://help.aliyun.com/document_detail/2679748.html) operation to query the elasticity assurances that you can purchase. * * @param request - PurchaseElasticityAssuranceRequest * @param runtime - runtime options for this request RuntimeOptions * @returns PurchaseElasticityAssuranceResponse */ async purchaseElasticityAssuranceWithOptions(request: $_model.PurchaseElasticityAssuranceRequest, runtime: $dara.RuntimeOptions): Promise<$_model.PurchaseElasticityAssuranceResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.period)) { query["Period"] = request.period; } if (!$dara.isNull(request.periodUnit)) { query["PeriodUnit"] = request.periodUnit; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.startTime)) { query["StartTime"] = request.startTime; } if (!$dara.isNull(request.privatePoolOptions)) { query["PrivatePoolOptions"] = request.privatePoolOptions; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "PurchaseElasticityAssurance", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.PurchaseElasticityAssuranceResponse>(await this.callApi(params, req, runtime), new $_model.PurchaseElasticityAssuranceResponse({})); } /** * Purchases an elasticity assurance that is not in the Active state and for which resources are prepared. * * @remarks * Before you call this operation, familiarize yourself with the billing rules and [pricing](https://www.alibabacloud.com/zh?spm=5176.28117011.nav-v2-dropdown-language.exp-location-zh.9ae4165bF98IHz&_p_lc=1) of elasticity assurances. * Before you purchase an elasticity assurance, you can call the [DescribeElasticityAssurances](https://help.aliyun.com/document_detail/2679748.html) operation to query the elasticity assurances that you can purchase. * * @param request - PurchaseElasticityAssuranceRequest * @returns PurchaseElasticityAssuranceResponse */ async purchaseElasticityAssurance(request: $_model.PurchaseElasticityAssuranceRequest): Promise<$_model.PurchaseElasticityAssuranceResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.purchaseElasticityAssuranceWithOptions(request, runtime); } /** * Purchases a regional or zonal reserved instance to offset the bills of pay-as-you-go Elastic Compute Service (ECS) instances. * * @remarks * *Before you call this operation, make sure that you are familiar with the billing methods and [pricing](https://www.alibabacloud.com/zh/pricing-calculator#/commodity/vm_intl) of reserved instances.** * * Before you call this operation, make sure that you are familiar with the billing rules of reserved instances. For more information, see [Reserved instances](https://help.aliyun.com/document_detail/100371.html). * * You can retain up to 20 regional reserved instances in all regions per Alibaba Cloud account. * * You can retain up to 20 zonal reserved instances per zone per Alibaba Cloud account. * ## [](#)Sample requests * * Purchase a one-year regional reserved instance in the China (Hangzhou) region to offset the bills of three ecs.g5.large Linux pay-as-you-go instances. * * "RegionId":"cn-hangzhou", // Specify the China (Hangzhou) region."InstanceType":"ecs.g5.large", // Specify the instance type."Scope":"Region", // Set the scope of the reserved instance to regional."InstanceAmount":3, // Specify the reserved instance to match three pay-as-you-go instances of the same instance type."OfferingType":"All Upfront", // Specify the payment option. In this example, the default value is used, which is All Upfront."Platform":"Linux", // Specify the operating system platform of the ECS instances eligible for the reserved instance. In this example, the Linux or Unix-like operating system is used."Period":1, // Specify the term of the reserved instance. In this example, the one-year duration is used."PeriodUnit":"Year", // Set the unit of the term to year. * * Purchase a two-year zonal reserved instance in Hangzhou Zone H to offset the bills of five ecs.g5.large Windows pay-as-you-go instances. * * "RegionId":"cn-hangzhou", * "ZoneId":"cn-hangzhou-h", // Specify Hangzhou Zone H."InstanceType":"ecs.g5.large", * "Scope":"Zone", // Set the scope of the reserved instance to zonal."InstanceAmount":5, // Specify the reserved instance to match five pay-as-you-go instances of the same instance type."OfferingType":"All Upfront", * "Platform":"Windows", // Specify the operating system platform of the ECS instances eligible for the reserved instance. In this example, the Windows operating system is used."Period":2, // Specify the term of the reserved instance. In this example, the two-year duration is used."PeriodUnit":"Year", // Set the unit of the term to year. * * @param request - PurchaseReservedInstancesOfferingRequest * @param runtime - runtime options for this request RuntimeOptions * @returns PurchaseReservedInstancesOfferingResponse */ async purchaseReservedInstancesOfferingWithOptions(request: $_model.PurchaseReservedInstancesOfferingRequest, runtime: $dara.RuntimeOptions): Promise<$_model.PurchaseReservedInstancesOfferingResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.autoRenew)) { query["AutoRenew"] = request.autoRenew; } if (!$dara.isNull(request.autoRenewPeriod)) { query["AutoRenewPeriod"] = request.autoRenewPeriod; } if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.instanceAmount)) { query["InstanceAmount"] = request.instanceAmount; } if (!$dara.isNull(request.instanceType)) { query["InstanceType"] = request.instanceType; } if (!$dara.isNull(request.offeringType)) { query["OfferingType"] = request.offeringType; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.period)) { query["Period"] = request.period; } if (!$dara.isNull(request.periodUnit)) { query["PeriodUnit"] = request.periodUnit; } if (!$dara.isNull(request.platform)) { query["Platform"] = request.platform; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.reservedInstanceName)) { query["ReservedInstanceName"] = request.reservedInstanceName; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.scope)) { query["Scope"] = request.scope; } if (!$dara.isNull(request.startTime)) { query["StartTime"] = request.startTime; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } if (!$dara.isNull(request.zoneId)) { query["ZoneId"] = request.zoneId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "PurchaseReservedInstancesOffering", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.PurchaseReservedInstancesOfferingResponse>(await this.callApi(params, req, runtime), new $_model.PurchaseReservedInstancesOfferingResponse({})); } /** * Purchases a regional or zonal reserved instance to offset the bills of pay-as-you-go Elastic Compute Service (ECS) instances. * * @remarks * *Before you call this operation, make sure that you are familiar with the billing methods and [pricing](https://www.alibabacloud.com/zh/pricing-calculator#/commodity/vm_intl) of reserved instances.** * * Before you call this operation, make sure that you are familiar with the billing rules of reserved instances. For more information, see [Reserved instances](https://help.aliyun.com/document_detail/100371.html). * * You can retain up to 20 regional reserved instances in all regions per Alibaba Cloud account. * * You can retain up to 20 zonal reserved instances per zone per Alibaba Cloud account. * ## [](#)Sample requests * * Purchase a one-year regional reserved instance in the China (Hangzhou) region to offset the bills of three ecs.g5.large Linux pay-as-you-go instances. * * "RegionId":"cn-hangzhou", // Specify the China (Hangzhou) region."InstanceType":"ecs.g5.large", // Specify the instance type."Scope":"Region", // Set the scope of the reserved instance to regional."InstanceAmount":3, // Specify the reserved instance to match three pay-as-you-go instances of the same instance type."OfferingType":"All Upfront", // Specify the payment option. In this example, the default value is used, which is All Upfront."Platform":"Linux", // Specify the operating system platform of the ECS instances eligible for the reserved instance. In this example, the Linux or Unix-like operating system is used."Period":1, // Specify the term of the reserved instance. In this example, the one-year duration is used."PeriodUnit":"Year", // Set the unit of the term to year. * * Purchase a two-year zonal reserved instance in Hangzhou Zone H to offset the bills of five ecs.g5.large Windows pay-as-you-go instances. * * "RegionId":"cn-hangzhou", * "ZoneId":"cn-hangzhou-h", // Specify Hangzhou Zone H."InstanceType":"ecs.g5.large", * "Scope":"Zone", // Set the scope of the reserved instance to zonal."InstanceAmount":5, // Specify the reserved instance to match five pay-as-you-go instances of the same instance type."OfferingType":"All Upfront", * "Platform":"Windows", // Specify the operating system platform of the ECS instances eligible for the reserved instance. In this example, the Windows operating system is used."Period":2, // Specify the term of the reserved instance. In this example, the two-year duration is used."PeriodUnit":"Year", // Set the unit of the term to year. * * @param request - PurchaseReservedInstancesOfferingRequest * @returns PurchaseReservedInstancesOfferingResponse */ async purchaseReservedInstancesOffering(request: $_model.PurchaseReservedInstancesOfferingRequest): Promise<$_model.PurchaseReservedInstancesOfferingResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.purchaseReservedInstancesOfferingWithOptions(request, runtime); } /** * Purchases one or more storage capacity units (SCUs). * * @remarks * *Before you call this operation, make sure that you understand the [billing methods](https://help.aliyun.com/document_detail/137897.html) and [pricing](https://www.alibabacloud.com/zh/pricing-calculator#/commodity/vm_intl) of SCUs. * * @param request - PurchaseStorageCapacityUnitRequest * @param runtime - runtime options for this request RuntimeOptions * @returns PurchaseStorageCapacityUnitResponse */ async purchaseStorageCapacityUnitWithOptions(request: $_model.PurchaseStorageCapacityUnitRequest, runtime: $dara.RuntimeOptions): Promise<$_model.PurchaseStorageCapacityUnitResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.amount)) { query["Amount"] = request.amount; } if (!$dara.isNull(request.capacity)) { query["Capacity"] = request.capacity; } if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.fromApp)) { query["FromApp"] = request.fromApp; } if (!$dara.isNull(request.name)) { query["Name"] = request.name; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.period)) { query["Period"] = request.period; } if (!$dara.isNull(request.periodUnit)) { query["PeriodUnit"] = request.periodUnit; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.startTime)) { query["StartTime"] = request.startTime; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "PurchaseStorageCapacityUnit", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.PurchaseStorageCapacityUnitResponse>(await this.callApi(params, req, runtime), new $_model.PurchaseStorageCapacityUnitResponse({})); } /** * Purchases one or more storage capacity units (SCUs). * * @remarks * *Before you call this operation, make sure that you understand the [billing methods](https://help.aliyun.com/document_detail/137897.html) and [pricing](https://www.alibabacloud.com/zh/pricing-calculator#/commodity/vm_intl) of SCUs. * * @param request - PurchaseStorageCapacityUnitRequest * @returns PurchaseStorageCapacityUnitResponse */ async purchaseStorageCapacityUnit(request: $_model.PurchaseStorageCapacityUnitRequest): Promise<$_model.PurchaseStorageCapacityUnitResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.purchaseStorageCapacityUnitWithOptions(request, runtime); } /** * Reactivates a pay-as-you-go Elastic Compute Service (ECS) instance that has expired or has been reclaimed due to overdue payments. * * @remarks * After you complete the overdue payment for a pay-as-you-go ECS instance, you do not need to call this operation to reactivate the instance. The system automatically reactivates the instance to restore the instance to the status before the payment became overdue. Automatic reactivation occasionally fails. Take note of the status of automatic reactivation. If the automatic reactivation fails, call this operation to manually reactivate the instance. * * The instance must be in the **Expired** `(Stopped)` state. * * You cannot call this operation to start ECS instances that are locked for security reasons. For more information, see [API behavior when an instance is locked for security reasons](https://help.aliyun.com/document_detail/25695.html). * * @param request - ReActivateInstancesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ReActivateInstancesResponse */ async reActivateInstancesWithOptions(request: $_model.ReActivateInstancesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ReActivateInstancesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ReActivateInstances", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ReActivateInstancesResponse>(await this.callApi(params, req, runtime), new $_model.ReActivateInstancesResponse({})); } /** * Reactivates a pay-as-you-go Elastic Compute Service (ECS) instance that has expired or has been reclaimed due to overdue payments. * * @remarks * After you complete the overdue payment for a pay-as-you-go ECS instance, you do not need to call this operation to reactivate the instance. The system automatically reactivates the instance to restore the instance to the status before the payment became overdue. Automatic reactivation occasionally fails. Take note of the status of automatic reactivation. If the automatic reactivation fails, call this operation to manually reactivate the instance. * * The instance must be in the **Expired** `(Stopped)` state. * * You cannot call this operation to start ECS instances that are locked for security reasons. For more information, see [API behavior when an instance is locked for security reasons](https://help.aliyun.com/document_detail/25695.html). * * @param request - ReActivateInstancesRequest * @returns ReActivateInstancesResponse */ async reActivateInstances(request: $_model.ReActivateInstancesRequest): Promise<$_model.ReActivateInstancesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.reActivateInstancesWithOptions(request, runtime); } /** * Re-initializes a cloud disk to the state when the cloud disk was created. * * @remarks * Take note of the following items: * * The disk that you want to re-initialize must be in the **In Use** (`In_use`) state and the instance to which the disk is attached must be in the **Stopped** (`Stoppe`) state. * * If an instance has never been started since it was created, the disks attached to it cannot be re-initialized. * * If a local snapshot has been created for a disk, the disk cannot be re-initialized. * * If a system disk is re-initialized, the disk is restored to the state of the image from which it was created. If the image has been deleted, the disk cannot be re-initialized. * * For a data disk that was created from scratch, the disk is initialized to the empty disk state. For a data disk that is created from a snapshot, the disk is initialized to the snapshot state. If the snapshots were deleted, the disks cannot be re-initialized and an error is returned. * * @param request - ReInitDiskRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ReInitDiskResponse */ async reInitDiskWithOptions(request: $_model.ReInitDiskRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ReInitDiskResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.autoStartInstance)) { query["AutoStartInstance"] = request.autoStartInstance; } if (!$dara.isNull(request.diskId)) { query["DiskId"] = request.diskId; } if (!$dara.isNull(request.keyPairName)) { query["KeyPairName"] = request.keyPairName; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.password)) { query["Password"] = request.password; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.securityEnhancementStrategy)) { query["SecurityEnhancementStrategy"] = request.securityEnhancementStrategy; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ReInitDisk", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ReInitDiskResponse>(await this.callApi(params, req, runtime), new $_model.ReInitDiskResponse({})); } /** * Re-initializes a cloud disk to the state when the cloud disk was created. * * @remarks * Take note of the following items: * * The disk that you want to re-initialize must be in the **In Use** (`In_use`) state and the instance to which the disk is attached must be in the **Stopped** (`Stoppe`) state. * * If an instance has never been started since it was created, the disks attached to it cannot be re-initialized. * * If a local snapshot has been created for a disk, the disk cannot be re-initialized. * * If a system disk is re-initialized, the disk is restored to the state of the image from which it was created. If the image has been deleted, the disk cannot be re-initialized. * * For a data disk that was created from scratch, the disk is initialized to the empty disk state. For a data disk that is created from a snapshot, the disk is initialized to the snapshot state. If the snapshots were deleted, the disks cannot be re-initialized and an error is returned. * * @param request - ReInitDiskRequest * @returns ReInitDiskResponse */ async reInitDisk(request: $_model.ReInitDiskRequest): Promise<$_model.ReInitDiskResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.reInitDiskWithOptions(request, runtime); } /** * Restarts an Elastic Compute Service (ECS) instance. * * @remarks * This operation is an asynchronous operation. After you call this operation to restart an ECS instance, the operation sets the status of the ECS instance to `Starting` and begins the restart process. You can call the [DescribeInstanceStatus](https://help.aliyun.com/document_detail/2679688.html) operation to query the status of the instance. When the status of the ECS instance changes to `Running`, the instance is restarted. * ### [](#)Considerations * * You cannot call this operation to restart an ECS instance that is locked for security reasons. For more information, see [API behavior when an instance is locked for security reasons](https://help.aliyun.com/document_detail/25695.html). * * The ECS instance that you want to restart must be in the **Running** (`Running`) state. * * @param request - RebootInstanceRequest * @param runtime - runtime options for this request RuntimeOptions * @returns RebootInstanceResponse */ async rebootInstanceWithOptions(request: $_model.RebootInstanceRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RebootInstanceResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.dryRun)) { query["DryRun"] = request.dryRun; } if (!$dara.isNull(request.forceStop)) { query["ForceStop"] = request.forceStop; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "RebootInstance", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.RebootInstanceResponse>(await this.callApi(params, req, runtime), new $_model.RebootInstanceResponse({})); } /** * Restarts an Elastic Compute Service (ECS) instance. * * @remarks * This operation is an asynchronous operation. After you call this operation to restart an ECS instance, the operation sets the status of the ECS instance to `Starting` and begins the restart process. You can call the [DescribeInstanceStatus](https://help.aliyun.com/document_detail/2679688.html) operation to query the status of the instance. When the status of the ECS instance changes to `Running`, the instance is restarted. * ### [](#)Considerations * * You cannot call this operation to restart an ECS instance that is locked for security reasons. For more information, see [API behavior when an instance is locked for security reasons](https://help.aliyun.com/document_detail/25695.html). * * The ECS instance that you want to restart must be in the **Running** (`Running`) state. * * @param request - RebootInstanceRequest * @returns RebootInstanceResponse */ async rebootInstance(request: $_model.RebootInstanceRequest): Promise<$_model.RebootInstanceResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.rebootInstanceWithOptions(request, runtime); } /** * Restarts Elastic Compute Service (ECS) instances. When you call this operation, you can configure parameters to specify a batch operation mode and whether to forcefully restart the instances. * * @remarks * This operation is an asynchronous operation. After you call this operation to restart an ECS instance, the operation sets the status of the ECS instance to `Starting` and begins the restart process. You can call the [DescribeInstanceStatus](https://help.aliyun.com/document_detail/2679688.html) operation to query the status of the instance. When the status of the ECS instance changes to `Running`, the instance is restarted. * ### [](#)Limits * * You cannot call this operation to restart ECS instances that are locked due to security reasons. For more information, see [API behavior when an instance is locked for security reasons](https://help.aliyun.com/document_detail/25695.html). * * The ECS instances that you want to restart must be in the **Running** (`Running`) state. * * @param request - RebootInstancesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns RebootInstancesResponse */ async rebootInstancesWithOptions(request: $_model.RebootInstancesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RebootInstancesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.batchOptimization)) { query["BatchOptimization"] = request.batchOptimization; } if (!$dara.isNull(request.dryRun)) { query["DryRun"] = request.dryRun; } if (!$dara.isNull(request.forceReboot)) { query["ForceReboot"] = request.forceReboot; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "RebootInstances", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.RebootInstancesResponse>(await this.callApi(params, req, runtime), new $_model.RebootInstancesResponse({})); } /** * Restarts Elastic Compute Service (ECS) instances. When you call this operation, you can configure parameters to specify a batch operation mode and whether to forcefully restart the instances. * * @remarks * This operation is an asynchronous operation. After you call this operation to restart an ECS instance, the operation sets the status of the ECS instance to `Starting` and begins the restart process. You can call the [DescribeInstanceStatus](https://help.aliyun.com/document_detail/2679688.html) operation to query the status of the instance. When the status of the ECS instance changes to `Running`, the instance is restarted. * ### [](#)Limits * * You cannot call this operation to restart ECS instances that are locked due to security reasons. For more information, see [API behavior when an instance is locked for security reasons](https://help.aliyun.com/document_detail/25695.html). * * The ECS instances that you want to restart must be in the **Running** (`Running`) state. * * @param request - RebootInstancesRequest * @returns RebootInstancesResponse */ async rebootInstances(request: $_model.RebootInstancesRequest): Promise<$_model.RebootInstancesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.rebootInstancesWithOptions(request, runtime); } /** * RecoverVirtualBorderRouter * * @deprecated OpenAPI RecoverVirtualBorderRouter is deprecated, please use Vpc::2016-04-28::RecoverVirtualBorderRouter instead. * * @param request - RecoverVirtualBorderRouterRequest * @param runtime - runtime options for this request RuntimeOptions * @returns RecoverVirtualBorderRouterResponse */ async recoverVirtualBorderRouterWithOptions(request: $_model.RecoverVirtualBorderRouterRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RecoverVirtualBorderRouterResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.userCidr)) { query["UserCidr"] = request.userCidr; } if (!$dara.isNull(request.vbrId)) { query["VbrId"] = request.vbrId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "RecoverVirtualBorderRouter", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.RecoverVirtualBorderRouterResponse>(await this.callApi(params, req, runtime), new $_model.RecoverVirtualBorderRouterResponse({})); } /** * RecoverVirtualBorderRouter * * @deprecated OpenAPI RecoverVirtualBorderRouter is deprecated, please use Vpc::2016-04-28::RecoverVirtualBorderRouter instead. * * @param request - RecoverVirtualBorderRouterRequest * @returns RecoverVirtualBorderRouterResponse */ // Deprecated async recoverVirtualBorderRouter(request: $_model.RecoverVirtualBorderRouterRequest): Promise<$_model.RecoverVirtualBorderRouterResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.recoverVirtualBorderRouterWithOptions(request, runtime); } /** * Migrates Elastic Compute Service (ECS) instances from a failed dedicated host. * * @remarks * If a dedicated host is in the `UnderAssessment` state, we recommend that you call this operation to migrate ECS instances away from the dedicated host to prevent permanent failures. You can call the [DescribeDedicatedHosts](https://help.aliyun.com/document_detail/134242.html) operation to query the status of a dedicated host. * * @param request - RedeployDedicatedHostRequest * @param runtime - runtime options for this request RuntimeOptions * @returns RedeployDedicatedHostResponse */ async redeployDedicatedHostWithOptions(request: $_model.RedeployDedicatedHostRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RedeployDedicatedHostResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.dedicatedHostId)) { query["DedicatedHostId"] = request.dedicatedHostId; } if (!$dara.isNull(request.migrationType)) { query["MigrationType"] = request.migrationType; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "RedeployDedicatedHost", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.RedeployDedicatedHostResponse>(await this.callApi(params, req, runtime), new $_model.RedeployDedicatedHostResponse({})); } /** * Migrates Elastic Compute Service (ECS) instances from a failed dedicated host. * * @remarks * If a dedicated host is in the `UnderAssessment` state, we recommend that you call this operation to migrate ECS instances away from the dedicated host to prevent permanent failures. You can call the [DescribeDedicatedHosts](https://help.aliyun.com/document_detail/134242.html) operation to query the status of a dedicated host. * * @param request - RedeployDedicatedHostRequest * @returns RedeployDedicatedHostResponse */ async redeployDedicatedHost(request: $_model.RedeployDedicatedHostRequest): Promise<$_model.RedeployDedicatedHostResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.redeployDedicatedHostWithOptions(request, runtime); } /** * Redeploys an Elastic Compute Service (ECS) instance. You can call this operation to redeploy an ECS instance when the instance receives a system event notification. * * @remarks * ## Usage notes * RedeployInstance is an asynchronous operation. The operation migrates the instance to a healthy physical server and then restarts the instance. After the instance is redeployed, it enters the Running (`Running`) state. If the instance fails to be redeployed, it returns to the original physical server and the state before the redeployment. * When you call this operation, take note of the following item: * * The instance must be in the Running (Running) or Stopped (Stopped) state. After the instance is redeployed, the following changes occur to the status of the instance: * * If the instance is in the Running (`Running`) state, the instance enters the Stopping (`Stopping`) state. * * If the instance is in the Stopped (`Stopped`) state, the instance enters the Starting (`Starting`) state. * * If an instance is deployed on a dedicated host, you cannot redeploy the instance. * * If `OperationLocks` in the response of the DescribeInstances operation contains `"LockReason": "security"` for an instance, the instance is locked for security reasons and cannot be redeployed. * * If an instance receives notifications about simulated events that are created by calling the CreateSimulatedSystemEvent operation for the instance, you cannot call this operation to redeploy the instance. * * When you handle a local disk-related system event for an instance, if the damaged local disk is isolated but the SystemMaintenance.RebootAndReInitErrorDisk (**instance restart and re-initialization of damaged disks due to system maintenance**) event is not sent, you can still call the RedeployInstance operation to redeploy the instance. For more information, see [O&M scenarios and system events for instances equipped with local disks](https://help.aliyun.com/document_detail/107693.html). * The following table describes the types and states of events that you can handle by calling the RedeployInstance operation. * |System event|Event status| * |---|---| * |Instance restart due to system maintenance (SystemMaintenance.Reboot)|Inquiring and Scheduled| * |Instance redeployment due to system maintenance (SystemMaintenance.Redeploy)|Inquiring and Scheduled| * |Instance restart and replacement of damaged disks due to system maintenance (SystemMaintenance.RebootAndIsolateErrorDisk)|Inquiring| * |Instance restart and re-initialization of damaged disks due to system maintenance (SystemMaintenance.RebootAndReInitErrorDisk)|Inquiring| * |Instance redeployment due to system errors (SystemFailure.Redeploy)|Inquiring| * |For ECS instances that use only local disks: instance restart due to system errors (SystemFailure.Reboot)|Executing| * |Isolation of damaged disks due to system maintenance (SystemMaintenance.IsolateErrorDisk)|Inquiring| * |Re-initialization of damaged disks due to system maintenance (SystemMaintenance.ReInitErrorDisk)|Inquiring| * **Note** When the system redeploys instances equipped with local disks, the local disks are re-initialized and data on the local disks is cleared. * * @param request - RedeployInstanceRequest * @param runtime - runtime options for this request RuntimeOptions * @returns RedeployInstanceResponse */ async redeployInstanceWithOptions(request: $_model.RedeployInstanceRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RedeployInstanceResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.forceStop)) { query["ForceStop"] = request.forceStop; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "RedeployInstance", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.RedeployInstanceResponse>(await this.callApi(params, req, runtime), new $_model.RedeployInstanceResponse({})); } /** * Redeploys an Elastic Compute Service (ECS) instance. You can call this operation to redeploy an ECS instance when the instance receives a system event notification. * * @remarks * ## Usage notes * RedeployInstance is an asynchronous operation. The operation migrates the instance to a healthy physical server and then restarts the instance. After the instance is redeployed, it enters the Running (`Running`) state. If the instance fails to be redeployed, it returns to the original physical server and the state before the redeployment. * When you call this operation, take note of the following item: * * The instance must be in the Running (Running) or Stopped (Stopped) state. After the instance is redeployed, the following changes occur to the status of the instance: * * If the instance is in the Running (`Running`) state, the instance enters the Stopping (`Stopping`) state. * * If the instance is in the Stopped (`Stopped`) state, the instance enters the Starting (`Starting`) state. * * If an instance is deployed on a dedicated host, you cannot redeploy the instance. * * If `OperationLocks` in the response of the DescribeInstances operation contains `"LockReason": "security"` for an instance, the instance is locked for security reasons and cannot be redeployed. * * If an instance receives notifications about simulated events that are created by calling the CreateSimulatedSystemEvent operation for the instance, you cannot call this operation to redeploy the instance. * * When you handle a local disk-related system event for an instance, if the damaged local disk is isolated but the SystemMaintenance.RebootAndReInitErrorDisk (**instance restart and re-initialization of damaged disks due to system maintenance**) event is not sent, you can still call the RedeployInstance operation to redeploy the instance. For more information, see [O&M scenarios and system events for instances equipped with local disks](https://help.aliyun.com/document_detail/107693.html). * The following table describes the types and states of events that you can handle by calling the RedeployInstance operation. * |System event|Event status| * |---|---| * |Instance restart due to system maintenance (SystemMaintenance.Reboot)|Inquiring and Scheduled| * |Instance redeployment due to system maintenance (SystemMaintenance.Redeploy)|Inquiring and Scheduled| * |Instance restart and replacement of damaged disks due to system maintenance (SystemMaintenance.RebootAndIsolateErrorDisk)|Inquiring| * |Instance restart and re-initialization of damaged disks due to system maintenance (SystemMaintenance.RebootAndReInitErrorDisk)|Inquiring| * |Instance redeployment due to system errors (SystemFailure.Redeploy)|Inquiring| * |For ECS instances that use only local disks: instance restart due to system errors (SystemFailure.Reboot)|Executing| * |Isolation of damaged disks due to system maintenance (SystemMaintenance.IsolateErrorDisk)|Inquiring| * |Re-initialization of damaged disks due to system maintenance (SystemMaintenance.ReInitErrorDisk)|Inquiring| * **Note** When the system redeploys instances equipped with local disks, the local disks are re-initialized and data on the local disks is cleared. * * @param request - RedeployInstanceRequest * @returns RedeployInstanceResponse */ async redeployInstance(request: $_model.RedeployInstanceRequest): Promise<$_model.RedeployInstanceResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.redeployInstanceWithOptions(request, runtime); } /** * Releases a capacity reservation. * * @remarks * If the release mode of a capacity reservation that takes effect immediately is set to manual release, you can call this operation to release the capacity reservation. * * @param request - ReleaseCapacityReservationRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ReleaseCapacityReservationResponse */ async releaseCapacityReservationWithOptions(request: $_model.ReleaseCapacityReservationRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ReleaseCapacityReservationResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.dryRun)) { query["DryRun"] = request.dryRun; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.privatePoolOptions)) { query["PrivatePoolOptions"] = request.privatePoolOptions; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ReleaseCapacityReservation", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ReleaseCapacityReservationResponse>(await this.callApi(params, req, runtime), new $_model.ReleaseCapacityReservationResponse({})); } /** * Releases a capacity reservation. * * @remarks * If the release mode of a capacity reservation that takes effect immediately is set to manual release, you can call this operation to release the capacity reservation. * * @param request - ReleaseCapacityReservationRequest * @returns ReleaseCapacityReservationResponse */ async releaseCapacityReservation(request: $_model.ReleaseCapacityReservationRequest): Promise<$_model.ReleaseCapacityReservationResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.releaseCapacityReservationWithOptions(request, runtime); } /** * Releases a pay-as-you-go Dedicated Host or an expired subscription Dedicated Host. * * @remarks * ## Usage notes * Before you release a pay-as-you-go dedicated host, make sure that no ECS instances are deployed on the dedicated host. * * @param request - ReleaseDedicatedHostRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ReleaseDedicatedHostResponse */ async releaseDedicatedHostWithOptions(request: $_model.ReleaseDedicatedHostRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ReleaseDedicatedHostResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.dedicatedHostId)) { query["DedicatedHostId"] = request.dedicatedHostId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.terminateSubscription)) { query["TerminateSubscription"] = request.terminateSubscription; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ReleaseDedicatedHost", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ReleaseDedicatedHostResponse>(await this.callApi(params, req, runtime), new $_model.ReleaseDedicatedHostResponse({})); } /** * Releases a pay-as-you-go Dedicated Host or an expired subscription Dedicated Host. * * @remarks * ## Usage notes * Before you release a pay-as-you-go dedicated host, make sure that no ECS instances are deployed on the dedicated host. * * @param request - ReleaseDedicatedHostRequest * @returns ReleaseDedicatedHostResponse */ async releaseDedicatedHost(request: $_model.ReleaseDedicatedHostRequest): Promise<$_model.ReleaseDedicatedHostResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.releaseDedicatedHostWithOptions(request, runtime); } /** * ReleaseEipAddress * * @deprecated OpenAPI ReleaseEipAddress is deprecated, please use Vpc::2016-04-28::ReleaseEipAddress instead. * * @param request - ReleaseEipAddressRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ReleaseEipAddressResponse */ async releaseEipAddressWithOptions(request: $_model.ReleaseEipAddressRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ReleaseEipAddressResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.allocationId)) { query["AllocationId"] = request.allocationId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ReleaseEipAddress", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ReleaseEipAddressResponse>(await this.callApi(params, req, runtime), new $_model.ReleaseEipAddressResponse({})); } /** * ReleaseEipAddress * * @deprecated OpenAPI ReleaseEipAddress is deprecated, please use Vpc::2016-04-28::ReleaseEipAddress instead. * * @param request - ReleaseEipAddressRequest * @returns ReleaseEipAddressResponse */ // Deprecated async releaseEipAddress(request: $_model.ReleaseEipAddressRequest): Promise<$_model.ReleaseEipAddressResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.releaseEipAddressWithOptions(request, runtime); } /** * Disassociates a public IP address from an Elastic Compute Service (ECS) instance. * * @deprecated OpenAPI ReleasePublicIpAddress is deprecated * * @param request - ReleasePublicIpAddressRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ReleasePublicIpAddressResponse */ async releasePublicIpAddressWithOptions(request: $_model.ReleasePublicIpAddressRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ReleasePublicIpAddressResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.dryRun)) { query["DryRun"] = request.dryRun; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.publicIpAddress)) { query["PublicIpAddress"] = request.publicIpAddress; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ReleasePublicIpAddress", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ReleasePublicIpAddressResponse>(await this.callApi(params, req, runtime), new $_model.ReleasePublicIpAddressResponse({})); } /** * Disassociates a public IP address from an Elastic Compute Service (ECS) instance. * * @deprecated OpenAPI ReleasePublicIpAddress is deprecated * * @param request - ReleasePublicIpAddressRequest * @returns ReleasePublicIpAddressResponse */ // Deprecated async releasePublicIpAddress(request: $_model.ReleasePublicIpAddressRequest): Promise<$_model.ReleasePublicIpAddressResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.releasePublicIpAddressWithOptions(request, runtime); } /** * RemoveBandwidthPackageIps * * @param request - RemoveBandwidthPackageIpsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns RemoveBandwidthPackageIpsResponse */ async removeBandwidthPackageIpsWithOptions(request: $_model.RemoveBandwidthPackageIpsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RemoveBandwidthPackageIpsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.bandwidthPackageId)) { query["BandwidthPackageId"] = request.bandwidthPackageId; } if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.removedIpAddresses)) { query["RemovedIpAddresses"] = request.removedIpAddresses; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "RemoveBandwidthPackageIps", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.RemoveBandwidthPackageIpsResponse>(await this.callApi(params, req, runtime), new $_model.RemoveBandwidthPackageIpsResponse({})); } /** * RemoveBandwidthPackageIps * * @param request - RemoveBandwidthPackageIpsRequest * @returns RemoveBandwidthPackageIpsResponse */ async removeBandwidthPackageIps(request: $_model.RemoveBandwidthPackageIpsRequest): Promise<$_model.RemoveBandwidthPackageIpsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.removeBandwidthPackageIpsWithOptions(request, runtime); } /** * Removes tags from a resource, such as an Elastic Compute Service (ECS) instance, disk, snapshot, image, or security group. * * @deprecated OpenAPI RemoveTags is deprecated, please use Ecs::2014-05-26::UntagResources instead. * * @param request - RemoveTagsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns RemoveTagsResponse */ async removeTagsWithOptions(request: $_model.RemoveTagsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RemoveTagsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceId)) { query["ResourceId"] = request.resourceId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.resourceType)) { query["ResourceType"] = request.resourceType; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "RemoveTags", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.RemoveTagsResponse>(await this.callApi(params, req, runtime), new $_model.RemoveTagsResponse({})); } /** * Removes tags from a resource, such as an Elastic Compute Service (ECS) instance, disk, snapshot, image, or security group. * * @deprecated OpenAPI RemoveTags is deprecated, please use Ecs::2014-05-26::UntagResources instead. * * @param request - RemoveTagsRequest * @returns RemoveTagsResponse */ // Deprecated async removeTags(request: $_model.RemoveTagsRequest): Promise<$_model.RemoveTagsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.removeTagsWithOptions(request, runtime); } /** * Renews one or more subscription dedicated hosts. * * @remarks * ## [](#)Usage notes * When you renew subscription dedicated hosts, vouchers are used first by default. Make sure that your account supports credit card payments or balance payments. * * @param request - RenewDedicatedHostsRequest * @param runtime - runtime options for this request RuntimeOptions * @returns RenewDedicatedHostsResponse */ async renewDedicatedHostsWithOptions(request: $_model.RenewDedicatedHostsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RenewDedicatedHostsResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.dedicatedHostIds)) { query["DedicatedHostIds"] = request.dedicatedHostIds; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.period)) { query["Period"] = request.period; } if (!$dara.isNull(request.periodUnit)) { query["PeriodUnit"] = request.periodUnit; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "RenewDedicatedHosts", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.RenewDedicatedHostsResponse>(await this.callApi(params, req, runtime), new $_model.RenewDedicatedHostsResponse({})); } /** * Renews one or more subscription dedicated hosts. * * @remarks * ## [](#)Usage notes * When you renew subscription dedicated hosts, vouchers are used first by default. Make sure that your account supports credit card payments or balance payments. * * @param request - RenewDedicatedHostsRequest * @returns RenewDedicatedHostsResponse */ async renewDedicatedHosts(request: $_model.RenewDedicatedHostsRequest): Promise<$_model.RenewDedicatedHostsResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.renewDedicatedHostsWithOptions(request, runtime); } /** * Renews elasticity assurances that you purchased. * * @param request - RenewElasticityAssurancesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns RenewElasticityAssurancesResponse */ async renewElasticityAssurancesWithOptions(request: $_model.RenewElasticityAssurancesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RenewElasticityAssurancesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.autoPay)) { query["AutoPay"] = request.autoPay; } if (!$dara.isNull(request.autoRenew)) { query["AutoRenew"] = request.autoRenew; } if (!$dara.isNull(request.autoRenewPeriod)) { query["AutoRenewPeriod"] = request.autoRenewPeriod; } if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.period)) { query["Period"] = request.period; } if (!$dara.isNull(request.periodUnit)) { query["PeriodUnit"] = request.periodUnit; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.privatePoolOptions)) { query["PrivatePoolOptions"] = request.privatePoolOptions; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "RenewElasticityAssurances", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.RenewElasticityAssurancesResponse>(await this.callApi(params, req, runtime), new $_model.RenewElasticityAssurancesResponse({})); } /** * Renews elasticity assurances that you purchased. * * @param request - RenewElasticityAssurancesRequest * @returns RenewElasticityAssurancesResponse */ async renewElasticityAssurances(request: $_model.RenewElasticityAssurancesRequest): Promise<$_model.RenewElasticityAssurancesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.renewElasticityAssurancesWithOptions(request, runtime); } /** * Renews a subscription Elastic Compute Service (ECS) instance. You can specify a renewal period or renew the instance to a unified expiration date. * * @remarks * *Before you call this operation, make sure that you are familiar with the billing methods and [pricing](https://www.alibabacloud.com/product/ecs#pricing) of ECS**. * * Make sure that your account balance or credit balance is sufficient. * * Only subscription instances are supported. If you call this operation for a pay-as-you-go instance, an error is returned. * * You must specify the renewal period-related parameter pair (`Period` and `PeriodUnit`) or `ExpectedRenewDay`, but not both. * * @param request - RenewInstanceRequest * @param runtime - runtime options for this request RuntimeOptions * @returns RenewInstanceResponse */ async renewInstanceWithOptions(request: $_model.RenewInstanceRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RenewInstanceResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.expectedRenewDay)) { query["ExpectedRenewDay"] = request.expectedRenewDay; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.period)) { query["Period"] = request.period; } if (!$dara.isNull(request.periodUnit)) { query["PeriodUnit"] = request.periodUnit; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "RenewInstance", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.RenewInstanceResponse>(await this.callApi(params, req, runtime), new $_model.RenewInstanceResponse({})); } /** * Renews a subscription Elastic Compute Service (ECS) instance. You can specify a renewal period or renew the instance to a unified expiration date. * * @remarks * *Before you call this operation, make sure that you are familiar with the billing methods and [pricing](https://www.alibabacloud.com/product/ecs#pricing) of ECS**. * * Make sure that your account balance or credit balance is sufficient. * * Only subscription instances are supported. If you call this operation for a pay-as-you-go instance, an error is returned. * * You must specify the renewal period-related parameter pair (`Period` and `PeriodUnit`) or `ExpectedRenewDay`, but not both. * * @param request - RenewInstanceRequest * @returns RenewInstanceResponse */ async renewInstance(request: $_model.RenewInstanceRequest): Promise<$_model.RenewInstanceResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.renewInstanceWithOptions(request, runtime); } /** * Renews one or more reserved instances. When you renew reserved instances, you can specify a validity period (renewal period) and whether to enable auto-renewal for the reserved instances. * * @remarks * *Before you call this operation, make sure that you are familiar with the billing and [pricing](https://www.alibabacloud.com/zh/pricing-calculator#/commodity/vm_intl) of reserved instances.** * * You can manually renew reserved instances or enable auto-renewal for reserved instances. For more information, see the [Renewal](~~100371#53bfc50b78sta~~) section of the "Reserved instances" topic. * * You can call the [DescribeReservedInstances](https://help.aliyun.com/document_detail/100065.html) operation to query the reserved instances that you purchased. * * You can call this operation to enable auto-renewal for reserved instances but cannot call this operation to disable auto-renewal for reserved instances. To disable auto-renewal for a reserved instance, call the [ModifyReservedInstanceAutoRenewAttribute](https://help.aliyun.com/document_detail/2679786.html) operation. * * @param request - RenewReservedInstancesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns RenewReservedInstancesResponse */ async renewReservedInstancesWithOptions(request: $_model.RenewReservedInstancesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RenewReservedInstancesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.autoRenew)) { query["AutoRenew"] = request.autoRenew; } if (!$dara.isNull(request.autoRenewPeriod)) { query["AutoRenewPeriod"] = request.autoRenewPeriod; } if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.period)) { query["Period"] = request.period; } if (!$dara.isNull(request.periodUnit)) { query["PeriodUnit"] = request.periodUnit; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.reservedInstanceId)) { query["ReservedInstanceId"] = request.reservedInstanceId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "RenewReservedInstances", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.RenewReservedInstancesResponse>(await this.callApi(params, req, runtime), new $_model.RenewReservedInstancesResponse({})); } /** * Renews one or more reserved instances. When you renew reserved instances, you can specify a validity period (renewal period) and whether to enable auto-renewal for the reserved instances. * * @remarks * *Before you call this operation, make sure that you are familiar with the billing and [pricing](https://www.alibabacloud.com/zh/pricing-calculator#/commodity/vm_intl) of reserved instances.** * * You can manually renew reserved instances or enable auto-renewal for reserved instances. For more information, see the [Renewal](~~100371#53bfc50b78sta~~) section of the "Reserved instances" topic. * * You can call the [DescribeReservedInstances](https://help.aliyun.com/document_detail/100065.html) operation to query the reserved instances that you purchased. * * You can call this operation to enable auto-renewal for reserved instances but cannot call this operation to disable auto-renewal for reserved instances. To disable auto-renewal for a reserved instance, call the [ModifyReservedInstanceAutoRenewAttribute](https://help.aliyun.com/document_detail/2679786.html) operation. * * @param request - RenewReservedInstancesRequest * @returns RenewReservedInstancesResponse */ async renewReservedInstances(request: $_model.RenewReservedInstancesRequest): Promise<$_model.RenewReservedInstancesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.renewReservedInstancesWithOptions(request, runtime); } /** * Replaces the operating system (system disk) of an ECS instance. After the operating system of the ECS instance is replaced, the original system disk of the instance is released and a new system disk is generated for the instance. This causes the ID of the system disk to change. * * @remarks * Before you call this operation, refer to [Replace the operating system (system disk) of an instance](https://help.aliyun.com/document_detail/50134.html). * When you call this operation for an ECS instance, take note of the following items: * * The billing method of the system disk cannot be changed. * * The category of the system disk cannot be changed. * * Make sure that no unpaid orders are associated with the instance. * * The instance must be in the `Stopped` state. * ** * **Note:** The operation is applicable only to instances of the Virtual Private Cloud (VPC) type. If the instance is a pay-as-you-go instance and economical mode by default is enabled, you can enable standard mode when stopping the instance. This prevents instance restart failures caused by insufficient resources after the system disk is replaced. For more information, see [StopInstance](https://help.aliyun.com/document_detail/25501.html). * * You can use the parameter `SystemDisk.Size` to re-specify the size of the system disk (cannot be less than the original system disk capacity). * * If the `OperationLocks` parameter value of the instance contains `"LockReason": "security"`, then the ECS instance is locked for security. You cannot replace the system disk. For more information, see [API behavior when an instance is locked for security reasons](https://help.aliyun.com/document_detail/25695.html). * After the system disk is replaced, you can query the status of the instance to check whether the replacement is successful by using the [DescribeInstances](https://help.aliyun.com/document_detail/25506.html) interface. If the `OperationLocks` parameter is empty, the system disk is replaced. * * @param request - ReplaceSystemDiskRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ReplaceSystemDiskResponse */ async replaceSystemDiskWithOptions(request: $_model.ReplaceSystemDiskRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ReplaceSystemDiskResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.architecture)) { query["Architecture"] = request.architecture; } if (!$dara.isNull(request.arn)) { query["Arn"] = request.arn; } if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.diskId)) { query["DiskId"] = request.diskId; } if (!$dara.isNull(request.encryptAlgorithm)) { query["EncryptAlgorithm"] = request.encryptAlgorithm; } if (!$dara.isNull(request.encrypted)) { query["Encrypted"] = request.encrypted; } if (!$dara.isNull(request.imageId)) { query["ImageId"] = request.imageId; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.KMSKeyId)) { query["KMSKeyId"] = request.KMSKeyId; } if (!$dara.isNull(request.keyPairName)) { query["KeyPairName"] = request.keyPairName; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.password)) { query["Password"] = request.password; } if (!$dara.isNull(request.passwordInherit)) { query["PasswordInherit"] = request.passwordInherit; } if (!$dara.isNull(request.platform)) { query["Platform"] = request.platform; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.securityEnhancementStrategy)) { query["SecurityEnhancementStrategy"] = request.securityEnhancementStrategy; } if (!$dara.isNull(request.useAdditionalService)) { query["UseAdditionalService"] = request.useAdditionalService; } if (!$dara.isNull(request.systemDisk)) { query["SystemDisk"] = request.systemDisk; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ReplaceSystemDisk", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ReplaceSystemDiskResponse>(await this.callApi(params, req, runtime), new $_model.ReplaceSystemDiskResponse({})); } /** * Replaces the operating system (system disk) of an ECS instance. After the operating system of the ECS instance is replaced, the original system disk of the instance is released and a new system disk is generated for the instance. This causes the ID of the system disk to change. * * @remarks * Before you call this operation, refer to [Replace the operating system (system disk) of an instance](https://help.aliyun.com/document_detail/50134.html). * When you call this operation for an ECS instance, take note of the following items: * * The billing method of the system disk cannot be changed. * * The category of the system disk cannot be changed. * * Make sure that no unpaid orders are associated with the instance. * * The instance must be in the `Stopped` state. * ** * **Note:** The operation is applicable only to instances of the Virtual Private Cloud (VPC) type. If the instance is a pay-as-you-go instance and economical mode by default is enabled, you can enable standard mode when stopping the instance. This prevents instance restart failures caused by insufficient resources after the system disk is replaced. For more information, see [StopInstance](https://help.aliyun.com/document_detail/25501.html). * * You can use the parameter `SystemDisk.Size` to re-specify the size of the system disk (cannot be less than the original system disk capacity). * * If the `OperationLocks` parameter value of the instance contains `"LockReason": "security"`, then the ECS instance is locked for security. You cannot replace the system disk. For more information, see [API behavior when an instance is locked for security reasons](https://help.aliyun.com/document_detail/25695.html). * After the system disk is replaced, you can query the status of the instance to check whether the replacement is successful by using the [DescribeInstances](https://help.aliyun.com/document_detail/25506.html) interface. If the `OperationLocks` parameter is empty, the system disk is replaced. * * @param request - ReplaceSystemDiskRequest * @returns ReplaceSystemDiskResponse */ async replaceSystemDisk(request: $_model.ReplaceSystemDiskRequest): Promise<$_model.ReplaceSystemDiskResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.replaceSystemDiskWithOptions(request, runtime); } /** * Reports an exception on Elastic Compute Service (ECS) instances. You can report the same exception on multiple ECS instances or on multiple disks of an ECS instance. * * @param request - ReportInstancesStatusRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ReportInstancesStatusResponse */ async reportInstancesStatusWithOptions(request: $_model.ReportInstancesStatusRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ReportInstancesStatusResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.device)) { query["Device"] = request.device; } if (!$dara.isNull(request.diskId)) { query["DiskId"] = request.diskId; } if (!$dara.isNull(request.endTime)) { query["EndTime"] = request.endTime; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.issueCategory)) { query["IssueCategory"] = request.issueCategory; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.reason)) { query["Reason"] = request.reason; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.startTime)) { query["StartTime"] = request.startTime; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ReportInstancesStatus", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ReportInstancesStatusResponse>(await this.callApi(params, req, runtime), new $_model.ReportInstancesStatusResponse({})); } /** * Reports an exception on Elastic Compute Service (ECS) instances. You can report the same exception on multiple ECS instances or on multiple disks of an ECS instance. * * @param request - ReportInstancesStatusRequest * @returns ReportInstancesStatusResponse */ async reportInstancesStatus(request: $_model.ReportInstancesStatusRequest): Promise<$_model.ReportInstancesStatusResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.reportInstancesStatusWithOptions(request, runtime); } /** * Rolls back a cloud disk to a snapshot from an earlier point in time. * * @remarks * Before you call this operation, read [Roll back a disk by using a snapshot](https://help.aliyun.com/document_detail/25450.html). * Take note of the following items: * * The cloud disk that you want to roll back must be in the In Use (`In_use`) or Unattached (`Available`) state. * * The instance to which the cloud disk is attached must be in the `Stopped` state. You can call the [StopInstances](https://help.aliyun.com/document_detail/155372.html) operation to stop the instance. * * The snapshot specified by `SnapshotId` must be created from the disk specified by `DiskId`. * * If the response contains `{"OperationLocks": {"LockReason" : "security"}}` when you query information about an instance by calling the [DescribeInstances](https://help.aliyun.com/document_detail/25506.html) operation, the instance is locked for security reasons and no operations can be performed on the instance. * * @param request - ResetDiskRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ResetDiskResponse */ async resetDiskWithOptions(request: $_model.ResetDiskRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ResetDiskResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.diskId)) { query["DiskId"] = request.diskId; } if (!$dara.isNull(request.dryRun)) { query["DryRun"] = request.dryRun; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.snapshotId)) { query["SnapshotId"] = request.snapshotId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ResetDisk", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ResetDiskResponse>(await this.callApi(params, req, runtime), new $_model.ResetDiskResponse({})); } /** * Rolls back a cloud disk to a snapshot from an earlier point in time. * * @remarks * Before you call this operation, read [Roll back a disk by using a snapshot](https://help.aliyun.com/document_detail/25450.html). * Take note of the following items: * * The cloud disk that you want to roll back must be in the In Use (`In_use`) or Unattached (`Available`) state. * * The instance to which the cloud disk is attached must be in the `Stopped` state. You can call the [StopInstances](https://help.aliyun.com/document_detail/155372.html) operation to stop the instance. * * The snapshot specified by `SnapshotId` must be created from the disk specified by `DiskId`. * * If the response contains `{"OperationLocks": {"LockReason" : "security"}}` when you query information about an instance by calling the [DescribeInstances](https://help.aliyun.com/document_detail/25506.html) operation, the instance is locked for security reasons and no operations can be performed on the instance. * * @param request - ResetDiskRequest * @returns ResetDiskResponse */ async resetDisk(request: $_model.ResetDiskRequest): Promise<$_model.ResetDiskResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.resetDiskWithOptions(request, runtime); } /** * Resets the Key Management Service (KMS) key used by Account-level Elastic Block Storage (EBS) Default Encryption in a region to the service key. * * @remarks * You must grant the RAM user the `AliyunECSFullAccess` permissions. For information about how to grant permissions to a RAM user, see [Grant permissions to a RAM user](https://help.aliyun.com/document_detail/116146.html). * * Before you can call this operation in a region, make sure that the **Account-level Elastic Block Storage (EBS) Default Encryption** feature is enabled in the region. * * @param request - ResetDiskDefaultKMSKeyIdRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ResetDiskDefaultKMSKeyIdResponse */ async resetDiskDefaultKMSKeyIdWithOptions(request: $_model.ResetDiskDefaultKMSKeyIdRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ResetDiskDefaultKMSKeyIdResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ResetDiskDefaultKMSKeyId", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ResetDiskDefaultKMSKeyIdResponse>(await this.callApi(params, req, runtime), new $_model.ResetDiskDefaultKMSKeyIdResponse({})); } /** * Resets the Key Management Service (KMS) key used by Account-level Elastic Block Storage (EBS) Default Encryption in a region to the service key. * * @remarks * You must grant the RAM user the `AliyunECSFullAccess` permissions. For information about how to grant permissions to a RAM user, see [Grant permissions to a RAM user](https://help.aliyun.com/document_detail/116146.html). * * Before you can call this operation in a region, make sure that the **Account-level Elastic Block Storage (EBS) Default Encryption** feature is enabled in the region. * * @param request - ResetDiskDefaultKMSKeyIdRequest * @returns ResetDiskDefaultKMSKeyIdResponse */ async resetDiskDefaultKMSKeyId(request: $_model.ResetDiskDefaultKMSKeyIdRequest): Promise<$_model.ResetDiskDefaultKMSKeyIdResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.resetDiskDefaultKMSKeyIdWithOptions(request, runtime); } /** * Rolls back one or more disks by using a snapshot-consistent group. * * @remarks * This operation will be removed in the future. We recommend that you call the [ResetDisk](https://help.aliyun.com/document_detail/25520.html) operation to roll back a disk. * * @param request - ResetDisksRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ResetDisksResponse */ async resetDisksWithOptions(request: $_model.ResetDisksRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ResetDisksResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.disk)) { query["Disk"] = request.disk; } if (!$dara.isNull(request.dryRun)) { query["DryRun"] = request.dryRun; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ResetDisks", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ResetDisksResponse>(await this.callApi(params, req, runtime), new $_model.ResetDisksResponse({})); } /** * Rolls back one or more disks by using a snapshot-consistent group. * * @remarks * This operation will be removed in the future. We recommend that you call the [ResetDisk](https://help.aliyun.com/document_detail/25520.html) operation to roll back a disk. * * @param request - ResetDisksRequest * @returns ResetDisksResponse */ async resetDisks(request: $_model.ResetDisksRequest): Promise<$_model.ResetDisksResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.resetDisksWithOptions(request, runtime); } /** * Resizes a system disk or a data disk. * * @remarks * > Before you call this operation to resize a disk, you must check the partition format of the disk. If the format is MBR, you cannot resize the file to more than 2TiB. Otherwise, data loss may occur. If you want to resize an MBR partition, we recommend creating and mounting a data disk in the GPT partition format, and then copy the existing data to the new data disk. For more information, see [Resize a disk to extend the disk capacity](https://help.aliyun.com/document_detail/44986.html). * * The disk types that can be resized include basic disks (`cloud` ), ultra disks (`cloud_efficiency` ), SSDs (`cloud_ssd` ), Enterprise SSDs (ESSDs)(`cloud_essd` ), ESSD AutoPL disks (cloud_auto), standard elastic ephemeral disks (elastic_ephemeral_disk_standard), premium elastic ephemeral disks (elastic_ephemeral_disk_premium), and Regional ESSDs (cloud_regional_disk_auto). * * You cannot resize a cloud disk when a snapshot is being created for the disk. Wait until the snapshot is created before you resize the cloud disk. * * You cannot call this operation to extend partitions or file systems. You must manually allocate partitions and file systems after the resize cloud disk capacity. For more information, see [Extend partitions and file systems (Linux)](~~2949817#bb3b1f02e51pj~~) and [Extend partitions and file systems (windows)](~~2932233#a9f9b78f3fujb~~). * * If the multi-attach feature is enabled for a cloud disk, you can resize the disk online or offline. Make sure that the ECS instances to which the disk is attached meet the following requirements: * * If you want to resize the disk online, the ECS instances must be in the **Running** state.`` * * If you want to resize the disk offline, the ECS instances must be in the **Running** or **Stopped** state.```` * * The cloud disk that you want to resize must meet the following requirements: * * The disk is in the In Use (`In Use`) or Unattached (`Available`) state. * * (Recommended) Snapshots are created for the disk to back up disk data. For information about how to create snapshots for a disk, see [Create a snapshot](https://help.aliyun.com/document_detail/25455.html). * * If the disk is a new data disk, initialize the disk before you resize the disk. For more information, see [Overview](https://help.aliyun.com/document_detail/466323.html). * * @param request - ResizeDiskRequest * @param runtime - runtime options for this request RuntimeOptions * @returns ResizeDiskResponse */ async resizeDiskWithOptions(request: $_model.ResizeDiskRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ResizeDiskResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.diskId)) { query["DiskId"] = request.diskId; } if (!$dara.isNull(request.newSize)) { query["NewSize"] = request.newSize; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.type)) { query["Type"] = request.type; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "ResizeDisk", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.ResizeDiskResponse>(await this.callApi(params, req, runtime), new $_model.ResizeDiskResponse({})); } /** * Resizes a system disk or a data disk. * * @remarks * > Before you call this operation to resize a disk, you must check the partition format of the disk. If the format is MBR, you cannot resize the file to more than 2TiB. Otherwise, data loss may occur. If you want to resize an MBR partition, we recommend creating and mounting a data disk in the GPT partition format, and then copy the existing data to the new data disk. For more information, see [Resize a disk to extend the disk capacity](https://help.aliyun.com/document_detail/44986.html). * * The disk types that can be resized include basic disks (`cloud` ), ultra disks (`cloud_efficiency` ), SSDs (`cloud_ssd` ), Enterprise SSDs (ESSDs)(`cloud_essd` ), ESSD AutoPL disks (cloud_auto), standard elastic ephemeral disks (elastic_ephemeral_disk_standard), premium elastic ephemeral disks (elastic_ephemeral_disk_premium), and Regional ESSDs (cloud_regional_disk_auto). * * You cannot resize a cloud disk when a snapshot is being created for the disk. Wait until the snapshot is created before you resize the cloud disk. * * You cannot call this operation to extend partitions or file systems. You must manually allocate partitions and file systems after the resize cloud disk capacity. For more information, see [Extend partitions and file systems (Linux)](~~2949817#bb3b1f02e51pj~~) and [Extend partitions and file systems (windows)](~~2932233#a9f9b78f3fujb~~). * * If the multi-attach feature is enabled for a cloud disk, you can resize the disk online or offline. Make sure that the ECS instances to which the disk is attached meet the following requirements: * * If you want to resize the disk online, the ECS instances must be in the **Running** state.`` * * If you want to resize the disk offline, the ECS instances must be in the **Running** or **Stopped** state.```` * * The cloud disk that you want to resize must meet the following requirements: * * The disk is in the In Use (`In Use`) or Unattached (`Available`) state. * * (Recommended) Snapshots are created for the disk to back up disk data. For information about how to create snapshots for a disk, see [Create a snapshot](https://help.aliyun.com/document_detail/25455.html). * * If the disk is a new data disk, initialize the disk before you resize the disk. For more information, see [Overview](https://help.aliyun.com/document_detail/466323.html). * * @param request - ResizeDiskRequest * @returns ResizeDiskResponse */ async resizeDisk(request: $_model.ResizeDiskRequest): Promise<$_model.ResizeDiskResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.resizeDiskWithOptions(request, runtime); } /** * Deletes inbound security group rules from a specific security group. * * @remarks * > Alibaba Cloud modified verification rules for the RevokeSecurityGroup operation on July 8, 2024. When you call the RevokeSecurityGroup operation to delete a security group rule that does not exist, the "InvalidParam.SecurityGroupRuleId" error code is returned instead of a success response. Update the RevokeSecurityGroup operation to use the new verification rules with the new error code based on your business requirements. * You can use one of the following groups of parameters to specify the security group rules that you want to delete: * * Parameters used to specify the IDs of security group rules. We recommend that you specify the IDs of security group rules to delete the rules. * * If a specified security group rule ID does not exist, the call to RevokeSecurityGroup fails. * * Parameters that start with Permissions. * * If no security group rule matches the specified parameters, the call to RevokeSecurityGroup is successful but no security group rules are deleted. * * Define an inbound security group rule by configuring the following parameters together: * * Source: You can specify one parameter from SourceCidrIp (IPv4 address), Ipv6SourceCidrIp (IPv6 address), SourcetPrefixListId (prefix list ID), and SourceGroupId (source security group ID). * * PortRange: specifies the destination port range. * * IpProtocol: specifies the protocol. * * Policy: specifies the action. * > You cannot specify the IDs of security group rules and the parameters that start with Permissions in the same request. * ### [](#)Sample requests * * Delete a security group rule based on the rule ID: * * "SecurityGroupId":"sg-bp67acfmxazb4p****", //Specify the ID of the security group. * "SecurityGroupRuleId":["sgr-bpdfmk****","sgr-bpdfmg****"] //Specify the ID of the security group rule. * * Delete a security group rule based on an IPv4 CIDR block: * * "SecurityGroupId":"sg-bp67acfmxazb4p****", * "Permissions":[ * { * "SourceCidrIp":"10.0.0.0/8", //Specify the source IPv4 CIDR block. * "IpProtocol":"TCP", //Specify the protocol. * "PortRange":"80/80", //Specify the destination port range. * "Policy":"accept" //Specify the action. * } * ] * * Delete a security group rule in which a security group is referenced: * * "SecurityGroupId":"sg-bp67acfmxazb4p****", * "Permissions":[ * { * "SourceGroupId":"sg-bp67acfmxa123b****", //Specify the ID of the source security group. * "IpProtocol":"TCP," * "PortRange":"80/80", * "Policy":"accept" * ] * } * * Delete a security group rule in which a prefix list is referenced: * * "SecurityGroupId":"sg-bp67acfmxazb4p****", * "Permissions":[ * { * "SourcePrefixListId":pl-x1j1k5ykzqlixdcy****", //Specify the ID of the source prefix list. * "IpProtocol":"TCP", * "PortRange":"80/80", * "Policy":"accept" * } * ] * * @param request - RevokeSecurityGroupRequest * @param runtime - runtime options for this request RuntimeOptions * @returns RevokeSecurityGroupResponse */ async revokeSecurityGroupWithOptions(request: $_model.RevokeSecurityGroupRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RevokeSecurityGroupResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.destCidrIp)) { query["DestCidrIp"] = request.destCidrIp; } if (!$dara.isNull(request.ipProtocol)) { query["IpProtocol"] = request.ipProtocol; } if (!$dara.isNull(request.ipv6DestCidrIp)) { query["Ipv6DestCidrIp"] = request.ipv6DestCidrIp; } if (!$dara.isNull(request.ipv6SourceCidrIp)) { query["Ipv6SourceCidrIp"] = request.ipv6SourceCidrIp; } if (!$dara.isNull(request.nicType)) { query["NicType"] = request.nicType; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.permissions)) { query["Permissions"] = request.permissions; } if (!$dara.isNull(request.policy)) { query["Policy"] = request.policy; } if (!$dara.isNull(request.portRange)) { query["PortRange"] = request.portRange; } if (!$dara.isNull(request.priority)) { query["Priority"] = request.priority; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.securityGroupId)) { query["SecurityGroupId"] = request.securityGroupId; } if (!$dara.isNull(request.securityGroupId)) { query["SecurityGroupId"] = request.securityGroupId; } if (!$dara.isNull(request.securityGroupRuleId)) { query["SecurityGroupRuleId"] = request.securityGroupRuleId; } if (!$dara.isNull(request.sourceCidrIp)) { query["SourceCidrIp"] = request.sourceCidrIp; } if (!$dara.isNull(request.sourceGroupId)) { query["SourceGroupId"] = request.sourceGroupId; } if (!$dara.isNull(request.sourceGroupOwnerAccount)) { query["SourceGroupOwnerAccount"] = request.sourceGroupOwnerAccount; } if (!$dara.isNull(request.sourceGroupOwnerId)) { query["SourceGroupOwnerId"] = request.sourceGroupOwnerId; } if (!$dara.isNull(request.sourcePortRange)) { query["SourcePortRange"] = request.sourcePortRange; } if (!$dara.isNull(request.sourcePrefixListId)) { query["SourcePrefixListId"] = request.sourcePrefixListId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "RevokeSecurityGroup", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.RevokeSecurityGroupResponse>(await this.callApi(params, req, runtime), new $_model.RevokeSecurityGroupResponse({})); } /** * Deletes inbound security group rules from a specific security group. * * @remarks * > Alibaba Cloud modified verification rules for the RevokeSecurityGroup operation on July 8, 2024. When you call the RevokeSecurityGroup operation to delete a security group rule that does not exist, the "InvalidParam.SecurityGroupRuleId" error code is returned instead of a success response. Update the RevokeSecurityGroup operation to use the new verification rules with the new error code based on your business requirements. * You can use one of the following groups of parameters to specify the security group rules that you want to delete: * * Parameters used to specify the IDs of security group rules. We recommend that you specify the IDs of security group rules to delete the rules. * * If a specified security group rule ID does not exist, the call to RevokeSecurityGroup fails. * * Parameters that start with Permissions. * * If no security group rule matches the specified parameters, the call to RevokeSecurityGroup is successful but no security group rules are deleted. * * Define an inbound security group rule by configuring the following parameters together: * * Source: You can specify one parameter from SourceCidrIp (IPv4 address), Ipv6SourceCidrIp (IPv6 address), SourcetPrefixListId (prefix list ID), and SourceGroupId (source security group ID). * * PortRange: specifies the destination port range. * * IpProtocol: specifies the protocol. * * Policy: specifies the action. * > You cannot specify the IDs of security group rules and the parameters that start with Permissions in the same request. * ### [](#)Sample requests * * Delete a security group rule based on the rule ID: * * "SecurityGroupId":"sg-bp67acfmxazb4p****", //Specify the ID of the security group. * "SecurityGroupRuleId":["sgr-bpdfmk****","sgr-bpdfmg****"] //Specify the ID of the security group rule. * * Delete a security group rule based on an IPv4 CIDR block: * * "SecurityGroupId":"sg-bp67acfmxazb4p****", * "Permissions":[ * { * "SourceCidrIp":"10.0.0.0/8", //Specify the source IPv4 CIDR block. * "IpProtocol":"TCP", //Specify the protocol. * "PortRange":"80/80", //Specify the destination port range. * "Policy":"accept" //Specify the action. * } * ] * * Delete a security group rule in which a security group is referenced: * * "SecurityGroupId":"sg-bp67acfmxazb4p****", * "Permissions":[ * { * "SourceGroupId":"sg-bp67acfmxa123b****", //Specify the ID of the source security group. * "IpProtocol":"TCP," * "PortRange":"80/80", * "Policy":"accept" * ] * } * * Delete a security group rule in which a prefix list is referenced: * * "SecurityGroupId":"sg-bp67acfmxazb4p****", * "Permissions":[ * { * "SourcePrefixListId":pl-x1j1k5ykzqlixdcy****", //Specify the ID of the source prefix list. * "IpProtocol":"TCP", * "PortRange":"80/80", * "Policy":"accept" * } * ] * * @param request - RevokeSecurityGroupRequest * @returns RevokeSecurityGroupResponse */ async revokeSecurityGroup(request: $_model.RevokeSecurityGroupRequest): Promise<$_model.RevokeSecurityGroupResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.revokeSecurityGroupWithOptions(request, runtime); } /** * Deletes outbound security group rules from a specified security group. * * @remarks * > Alibaba Cloud modified verification rules for the RevokeSecurityGroupEgress operation on July 8, 2024. When you use the RevokeSecurityGroupEgress operation to delete a security group rule that does not exist, the "InvalidSecurityGroupRule.RuleNotExist" error code is returned instead of a success response. Update the RevokeSecurityGroupEgress operation to use the new verification rules with the new error code based on your business requirements. * You can use one of the following methods to delete a security group rule: * * Delete a rule by specifying the IDs of security group rules. We recommend that you specify the IDs of security group rules to delete the rules. * * If a security group rule ID that you specify does not exist, an error is reported. * * Delete a rule by specifying the Permissions parameter. * * If no security group rule matches the specified parameters, the call to RevokeSecurityGroup is successful but no security group rules are deleted. * * Delete a security group rule by configuring the following parameters together: * * One of the following parameters: DestCidrIp, Ipv6DestCidrIp, DestPrefixListId, and DestGroupId. DestCidrIp specifies the destination IPv4 CIDR block. Ipv6DestCidrIp specifies the destination IPv6 CIDR block. DestPrefixListId specifies the ID of the destination prefix list. DestGroupId specifies the destination security group. * * PortRange: specifies the range of destination port numbers. * * IpProtocol: specifies the protocol. * * Policy: specifies the action. * > You cannot set the security group rule ID and the Permissions parameter at the same time. * ### [](#)Sample requests * * Delete a security group rule. * * "SecurityGroupId":"sg-bp67acfmxazb4p****", //The security group ID. * "SecurityGroupRuleId":["sgr-bpdfmk****","sgr-bpdfmg****"] //The ID of the security group rule. * * Delete a security group rule based on the CIDR block. * * "SecurityGroupId":"sg-bp67acfmxazb4ph***", * "Permissions":[ * { * "IpProtocol":"TCP", //The protocol. * "DestCidrIp":"10.0.0.0/8", //The destination IPv4 CIDR block. * "PortRange":"22/22", //The destination port range. * "Policy":"accept" //The action. } * ] * * Delete a security group rule based on the ID of the destination security group. * * "SecurityGroupId":"sg-bp67acfmxazb4ph***", * "Permissions":[ * { * "DestGroupId":"sg-bp67acfmxa123b****", //Set the ID of the target security group. * "IpProtocol":"TCP", * "PortRange":"22/22", * "Policy":"accept" * } * ] * * Delete a security group rule based on a specified prefix list. * * "SecurityGroupId":"sg-bp67acfmxazb4ph***", * "Permissions":[ * { * "IpProtocol":"TCP", * "DestPrefixListId":"pl-x1j1k5ykzqlixdcy****", //The ID of the destination prefix list. "PortRange":"22/22", * "Policy":"accept", * } * ] * * @param request - RevokeSecurityGroupEgressRequest * @param runtime - runtime options for this request RuntimeOptions * @returns RevokeSecurityGroupEgressResponse */ async revokeSecurityGroupEgressWithOptions(request: $_model.RevokeSecurityGroupEgressRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RevokeSecurityGroupEgressResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.destCidrIp)) { query["DestCidrIp"] = request.destCidrIp; } if (!$dara.isNull(request.destGroupId)) { query["DestGroupId"] = request.destGroupId; } if (!$dara.isNull(request.destGroupOwnerAccount)) { query["DestGroupOwnerAccount"] = request.destGroupOwnerAccount; } if (!$dara.isNull(request.destGroupOwnerId)) { query["DestGroupOwnerId"] = request.destGroupOwnerId; } if (!$dara.isNull(request.destPrefixListId)) { query["DestPrefixListId"] = request.destPrefixListId; } if (!$dara.isNull(request.ipProtocol)) { query["IpProtocol"] = request.ipProtocol; } if (!$dara.isNull(request.ipv6DestCidrIp)) { query["Ipv6DestCidrIp"] = request.ipv6DestCidrIp; } if (!$dara.isNull(request.ipv6SourceCidrIp)) { query["Ipv6SourceCidrIp"] = request.ipv6SourceCidrIp; } if (!$dara.isNull(request.nicType)) { query["NicType"] = request.nicType; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.permissions)) { query["Permissions"] = request.permissions; } if (!$dara.isNull(request.policy)) { query["Policy"] = request.policy; } if (!$dara.isNull(request.portRange)) { query["PortRange"] = request.portRange; } if (!$dara.isNull(request.priority)) { query["Priority"] = request.priority; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.securityGroupId)) { query["SecurityGroupId"] = request.securityGroupId; } if (!$dara.isNull(request.securityGroupId)) { query["SecurityGroupId"] = request.securityGroupId; } if (!$dara.isNull(request.securityGroupRuleId)) { query["SecurityGroupRuleId"] = request.securityGroupRuleId; } if (!$dara.isNull(request.sourceCidrIp)) { query["SourceCidrIp"] = request.sourceCidrIp; } if (!$dara.isNull(request.sourcePortRange)) { query["SourcePortRange"] = request.sourcePortRange; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "RevokeSecurityGroupEgress", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.RevokeSecurityGroupEgressResponse>(await this.callApi(params, req, runtime), new $_model.RevokeSecurityGroupEgressResponse({})); } /** * Deletes outbound security group rules from a specified security group. * * @remarks * > Alibaba Cloud modified verification rules for the RevokeSecurityGroupEgress operation on July 8, 2024. When you use the RevokeSecurityGroupEgress operation to delete a security group rule that does not exist, the "InvalidSecurityGroupRule.RuleNotExist" error code is returned instead of a success response. Update the RevokeSecurityGroupEgress operation to use the new verification rules with the new error code based on your business requirements. * You can use one of the following methods to delete a security group rule: * * Delete a rule by specifying the IDs of security group rules. We recommend that you specify the IDs of security group rules to delete the rules. * * If a security group rule ID that you specify does not exist, an error is reported. * * Delete a rule by specifying the Permissions parameter. * * If no security group rule matches the specified parameters, the call to RevokeSecurityGroup is successful but no security group rules are deleted. * * Delete a security group rule by configuring the following parameters together: * * One of the following parameters: DestCidrIp, Ipv6DestCidrIp, DestPrefixListId, and DestGroupId. DestCidrIp specifies the destination IPv4 CIDR block. Ipv6DestCidrIp specifies the destination IPv6 CIDR block. DestPrefixListId specifies the ID of the destination prefix list. DestGroupId specifies the destination security group. * * PortRange: specifies the range of destination port numbers. * * IpProtocol: specifies the protocol. * * Policy: specifies the action. * > You cannot set the security group rule ID and the Permissions parameter at the same time. * ### [](#)Sample requests * * Delete a security group rule. * * "SecurityGroupId":"sg-bp67acfmxazb4p****", //The security group ID. * "SecurityGroupRuleId":["sgr-bpdfmk****","sgr-bpdfmg****"] //The ID of the security group rule. * * Delete a security group rule based on the CIDR block. * * "SecurityGroupId":"sg-bp67acfmxazb4ph***", * "Permissions":[ * { * "IpProtocol":"TCP", //The protocol. * "DestCidrIp":"10.0.0.0/8", //The destination IPv4 CIDR block. * "PortRange":"22/22", //The destination port range. * "Policy":"accept" //The action. } * ] * * Delete a security group rule based on the ID of the destination security group. * * "SecurityGroupId":"sg-bp67acfmxazb4ph***", * "Permissions":[ * { * "DestGroupId":"sg-bp67acfmxa123b****", //Set the ID of the target security group. * "IpProtocol":"TCP", * "PortRange":"22/22", * "Policy":"accept" * } * ] * * Delete a security group rule based on a specified prefix list. * * "SecurityGroupId":"sg-bp67acfmxazb4ph***", * "Permissions":[ * { * "IpProtocol":"TCP", * "DestPrefixListId":"pl-x1j1k5ykzqlixdcy****", //The ID of the destination prefix list. "PortRange":"22/22", * "Policy":"accept", * } * ] * * @param request - RevokeSecurityGroupEgressRequest * @returns RevokeSecurityGroupEgressResponse */ async revokeSecurityGroupEgress(request: $_model.RevokeSecurityGroupEgressRequest): Promise<$_model.RevokeSecurityGroupEgressResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.revokeSecurityGroupEgressWithOptions(request, runtime); } /** * Creates and runs a Cloud Assistant command on one or more Elastic Compute Service (ECS) instances. Shell, PowerShell, and batch commands are supported. You can run the command based on a schedule, include custom parameters in the command, or run the command in containers on instances. * * @remarks * This operation is an asynchronous operation. After a request is sent, a response that contains a command ID and a command task ID is immediately returned. You can call the [DescribeInvocations](https://help.aliyun.com/document_detail/2679916.html) or [DescribeInvocationResults](https://help.aliyun.com/document_detail/2679916.html) operation with the command ID or task ID to query the execution results of the command. * ### [](#)Precautions * * The instances on which you want to create and run a Cloud Assistant command must be in the Running (`Running`) state. You can call the [DescribeInstances](https://help.aliyun.com/document_detail/25506.html) operation to query the status of instances. * * [Cloud Assistant Agent](https://help.aliyun.com/document_detail/64921.html) must be pre-installed on the instances on which you want to create and run a Cloud Assistant command. You can call the [InstallCloudAssistant](https://help.aliyun.com/document_detail/2679925.html) operation to install Cloud Assistant Agent on instances and the [DescribeCloudAssistantStatus](https://help.aliyun.com/document_detail/2679924.html) operation to query whether Cloud Assistant Agent is installed on instances. * ** * **Note** By default, Cloud Assistant Agent is pre-installed on instances created from public images on or after December 1, 2017. * * Before you run a PowerShell command on a Windows instance, make sure that the PowerShell module is installed on the instance. * ### [](#)Considerations * * You can retain up to 500 to 50,000 Cloud Assistant commands in each region. You can also request a quota increase. For information about how to view quotas and request a quota increase, see [Manage quotas](https://help.aliyun.com/document_detail/184116.html). * * To ensure that scheduled tasks can run as expected, make sure that the Cloud Assistant Agent version is not earlier than the following versions. A scheduled task can run a command at a specific interval, only once at a specific time, or at designated times based on a cron expression in a specific year or time zone. If the `ClientNeedUpgrade` error code is returned, you must update Cloud Assistant Agent to the latest version. For more information, see [Upgrade or disable upgrades of Cloud Assistant Agent](https://help.aliyun.com/document_detail/134383.html). * - Linux: 2.2.3.282 * - Windows: 2.1.3.282 * * When you use a cron expression to specify a schedule, you can specify a time zone based on your business requirements. If you do not specify a time zone, the schedule is determined by the system time of the instances. Make sure that the time or time zone of the instances meets your business requirements. For information about time zones, see [Configure the NTP service for ECS instances that run CentOS 6](https://help.aliyun.com/document_detail/92803.html) or [Configure the NTP service for Windows instances](https://help.aliyun.com/document_detail/51890.html). * ### [](#)Suggestions * * **Timeout settings**: You can set `Timeout` to specify the timeout period for command executions on instances. If an execution times out, Cloud Assistant Agent forcefully terminates the command process. * * When the one-time execution of the command times out, the execution status ([InvokeRecordStatus](https://help.aliyun.com/document_detail/64845.html)) of the command becomes Failed. * * For a scheduled task, the timeout period takes effect on every execution of the command. When a command execution times out, the subsequent executions of the command are not affected. When a scheduled execution of the command times out, the execution status ([InvokeRecordStatus](https://help.aliyun.com/document_detail/64845.html)) of the command becomes Failed. * * **Execution failure**: Command executions may fail due to instance status exceptions, network exceptions, or exceptions on Cloud Assistant Agent. If a command execution fails, no execution information is generated. For more information, see [Check execution results and troubleshoot common issues](https://help.aliyun.com/document_detail/87029.html). * * **Custom parameters**: If you set `EnableParameter` to true, the custom parameter feature is enabled. When you specify `CommandContent`, you can define custom parameters in the `{{parameter}}` format. Then, the key-value pairs of the custom parameters are passed in when you run the command. * * @param tmpReq - RunCommandRequest * @param runtime - runtime options for this request RuntimeOptions * @returns RunCommandResponse */ async runCommandWithOptions(tmpReq: $_model.RunCommandRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunCommandResponse> { tmpReq.validate(); let request = new $_model.RunCommandShrinkRequest({ }); OpenApiUtil.convert(tmpReq, request); if (!$dara.isNull(tmpReq.parameters)) { request.parametersShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.parameters, "Parameters", "json"); } let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.commandContent)) { query["CommandContent"] = request.commandContent; } if (!$dara.isNull(request.containerId)) { query["ContainerId"] = request.containerId; } if (!$dara.isNull(request.containerName)) { query["ContainerName"] = request.containerName; } if (!$dara.isNull(request.contentEncoding)) { query["ContentEncoding"] = request.contentEncoding; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.enableParameter)) { query["EnableParameter"] = request.enableParameter; } if (!$dara.isNull(request.frequency)) { query["Frequency"] = request.frequency; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.keepCommand)) { query["KeepCommand"] = request.keepCommand; } if (!$dara.isNull(request.launcher)) { query["Launcher"] = request.launcher; } if (!$dara.isNull(request.name)) { query["Name"] = request.name; } if (!$dara.isNull(request.ossOutputDelivery)) { query["OssOutputDelivery"] = request.ossOutputDelivery; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.parametersShrink)) { query["Parameters"] = request.parametersShrink; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.repeatMode)) { query["RepeatMode"] = request.repeatMode; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.resourceTag)) { query["ResourceTag"] = request.resourceTag; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } if (!$dara.isNull(request.terminationMode)) { query["TerminationMode"] = request.terminationMode; } if (!$dara.isNull(request.timed)) { query["Timed"] = request.timed; } if (!$dara.isNull(request.timeout)) { query["Timeout"] = request.timeout; } if (!$dara.isNull(request.type)) { query["Type"] = request.type; } if (!$dara.isNull(request.username)) { query["Username"] = request.username; } if (!$dara.isNull(request.windowsPasswordName)) { query["WindowsPasswordName"] = request.windowsPasswordName; } if (!$dara.isNull(request.workingDir)) { query["WorkingDir"] = request.workingDir; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "RunCommand", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.RunCommandResponse>(await this.callApi(params, req, runtime), new $_model.RunCommandResponse({})); } /** * Creates and runs a Cloud Assistant command on one or more Elastic Compute Service (ECS) instances. Shell, PowerShell, and batch commands are supported. You can run the command based on a schedule, include custom parameters in the command, or run the command in containers on instances. * * @remarks * This operation is an asynchronous operation. After a request is sent, a response that contains a command ID and a command task ID is immediately returned. You can call the [DescribeInvocations](https://help.aliyun.com/document_detail/2679916.html) or [DescribeInvocationResults](https://help.aliyun.com/document_detail/2679916.html) operation with the command ID or task ID to query the execution results of the command. * ### [](#)Precautions * * The instances on which you want to create and run a Cloud Assistant command must be in the Running (`Running`) state. You can call the [DescribeInstances](https://help.aliyun.com/document_detail/25506.html) operation to query the status of instances. * * [Cloud Assistant Agent](https://help.aliyun.com/document_detail/64921.html) must be pre-installed on the instances on which you want to create and run a Cloud Assistant command. You can call the [InstallCloudAssistant](https://help.aliyun.com/document_detail/2679925.html) operation to install Cloud Assistant Agent on instances and the [DescribeCloudAssistantStatus](https://help.aliyun.com/document_detail/2679924.html) operation to query whether Cloud Assistant Agent is installed on instances. * ** * **Note** By default, Cloud Assistant Agent is pre-installed on instances created from public images on or after December 1, 2017. * * Before you run a PowerShell command on a Windows instance, make sure that the PowerShell module is installed on the instance. * ### [](#)Considerations * * You can retain up to 500 to 50,000 Cloud Assistant commands in each region. You can also request a quota increase. For information about how to view quotas and request a quota increase, see [Manage quotas](https://help.aliyun.com/document_detail/184116.html). * * To ensure that scheduled tasks can run as expected, make sure that the Cloud Assistant Agent version is not earlier than the following versions. A scheduled task can run a command at a specific interval, only once at a specific time, or at designated times based on a cron expression in a specific year or time zone. If the `ClientNeedUpgrade` error code is returned, you must update Cloud Assistant Agent to the latest version. For more information, see [Upgrade or disable upgrades of Cloud Assistant Agent](https://help.aliyun.com/document_detail/134383.html). * - Linux: 2.2.3.282 * - Windows: 2.1.3.282 * * When you use a cron expression to specify a schedule, you can specify a time zone based on your business requirements. If you do not specify a time zone, the schedule is determined by the system time of the instances. Make sure that the time or time zone of the instances meets your business requirements. For information about time zones, see [Configure the NTP service for ECS instances that run CentOS 6](https://help.aliyun.com/document_detail/92803.html) or [Configure the NTP service for Windows instances](https://help.aliyun.com/document_detail/51890.html). * ### [](#)Suggestions * * **Timeout settings**: You can set `Timeout` to specify the timeout period for command executions on instances. If an execution times out, Cloud Assistant Agent forcefully terminates the command process. * * When the one-time execution of the command times out, the execution status ([InvokeRecordStatus](https://help.aliyun.com/document_detail/64845.html)) of the command becomes Failed. * * For a scheduled task, the timeout period takes effect on every execution of the command. When a command execution times out, the subsequent executions of the command are not affected. When a scheduled execution of the command times out, the execution status ([InvokeRecordStatus](https://help.aliyun.com/document_detail/64845.html)) of the command becomes Failed. * * **Execution failure**: Command executions may fail due to instance status exceptions, network exceptions, or exceptions on Cloud Assistant Agent. If a command execution fails, no execution information is generated. For more information, see [Check execution results and troubleshoot common issues](https://help.aliyun.com/document_detail/87029.html). * * **Custom parameters**: If you set `EnableParameter` to true, the custom parameter feature is enabled. When you specify `CommandContent`, you can define custom parameters in the `{{parameter}}` format. Then, the key-value pairs of the custom parameters are passed in when you run the command. * * @param request - RunCommandRequest * @returns RunCommandResponse */ async runCommand(request: $_model.RunCommandRequest): Promise<$_model.RunCommandResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.runCommandWithOptions(request, runtime); } /** * Batch creates Elastic Compute Service (ECS) instances. You can automatically start, assign public IP addresses to, and specify an automatic release time for the instances. * * @remarks * Before you call this operation, familiarize yourself with the billing rules and [pricing](https://www.alibabacloud.com/zh/pricing-calculator#/commodity/vm_intl) of ECS resources. * This operation is an asynchronous operation. After a request to create ECS instances is sent, ECS instance IDs are returned but the creation and startup of the instances may be incomplete. You can call the [DescribeInstanceStatus](https://help.aliyun.com/document_detail/2679688.html) operation to query the status of the instances. When the status of an instance is `Running` in the DescribeInstanceStatus response, the instance is created and started. * ### [](#)Considerations * * If the resource inventory is insufficient to complete instance creation, Alibaba Cloud immediately sends an instance creation failure event (SystemFailure.Delete). You can call the [DescribeInstanceHistoryEvents](https://help.aliyun.com/document_detail/2679897.html) operation to check whether an instance creation failure event exists. For more information, see [System events related to instance creation failures](https://help.aliyun.com/document_detail/2545990.html). * * Make sure that the number of ECS instances you create or the number of vCPUs on ECS instances of all instance types you create does not exceed the corresponding quota. Go to the [Quota Center](https://quotas.console.aliyun.com/products/ecs/quotas) to view the quotas. * * Before you create ECS instances of the Virtual Private Cloud (VPC) type in a region, [create a VPC](https://help.aliyun.com/document_detail/65430.html) in the region. * ### [](#)Precautions * * If you create a subscription instance (`PrePaid`), available coupons in your account are automatically used. * * You can call the RunInstances operation to create up to 100 ECS instances in a single request. To create more than 100 ECS instances, we recommend that you initiate multiple requests in batches or concurrently. * * If you set `InternetMaxBandwidthOut` to a value greater than 0, public IP addresses are automatically assigned to the ECS instances to be created. * > For the limits on the sum of maximum public bandwidths of ECS instances that use the pay-by-bandwidth billing method for network usage per region per Alibaba Cloud account, see the [Public bandwidth](~~25412#BandwidthQuota~~) section of the "Limits and quotas on ECS" topic. * ### [](#)Suggestions * * **Test scenarios**: Set `DryRun` to true to perform a dry run without performing the actual request. * * **Release of ECS instances**: Use `AutoReleaseTime` to configure an automatic release time for ECS instances in the request to RunInstances or call the [DeleteInstances](https://help.aliyun.com/document_detail/2679710.html) operation to release the instances. * * **Management and search of ECS instances**: Add tags to the ECS instances by specifying `Tag.N.Key` and `Tag.N.Value` and append incremental suffixes by specifying `UniqueSuffix` to the hostname specified by `HostName` and the instance name specified by `InstanceName`. For more information, see [Batch configure sequential names or hostnames for multiple instances](https://help.aliyun.com/document_detail/196048.html). * * **Launch template**: A launch template contains the parameters required to create an ECS instance so that you do not have to specify the parameters every time you create ECS instances. You can call the [CreateLaunchTemplate](https://help.aliyun.com/document_detail/2679729.html) operation to create a launch template. Then, in the request to `RunInstances`, you can specify `LaunchTemplateId` and `LaunchTemplateVersion` to use the launch template. * * **Disabling of Hyper-Threading (HT)**: In memory-intensive scenarios, set `CpuOptions.ThreadsPerCore` to 1 to disable HT and increase the memory-to-vCPU ratio. * * **Enabling of Jumbo Frames**: Set `NetworkOptions.EnableJumboFrame` to true to enable the `Jumbo Frames` feature when you create ECS instances. For more information, see [Jumbo Frames](https://help.aliyun.com/document_detail/200512.html). * ## [](#)Sample requests * Use a specific image to create ECS instances of a specific instance type in the China (Hangzhou) region. The instances use disks with a specific capacity as the system disk and data disks and are automatically assigned public IP addresses. The instances have user-defined names and logon passwords. The instances are assigned to a specific security group and connected to a specific vSwitch. Request parameters: * RegionId:"cn-hangzhou", //Set the region ID to cn-hangzhou, which specifies the China (Hangzhou) region. * ImageId:"aliyun_3_x64_20G_alibase_20221102.vhd", //Set the image ID to aliyun_3_x64_20G_alibase_20221102.vhd. * InstanceType:"ecs.g7.large", //Set the instance type to ecs.g7.large. * SecurityGroupId:"sg-bp150uqocpf9jj70****", //Set the security group ID to sg-bp150uqocpf9jj70****. * VSwitchId:"vsw-bp1qo7s91cbch5i4l****", //Set the vSwitch ID to vsw-bp1qo7s91cbch5i4l****. * SystemDisk:{ * Category:"cloud_essd", //Set the system disk category to cloud_essd, which specifies the Enterprise SSD (ESSD) category. * Size:40, //Set the system disk size to 40. Unit: GiB. * }, * DataDisk:[ * { * Category:"cloud_essd", //Set the data disk category to cloud_essd, which specifies the ESSD category. * Size:100, //Set the data disk size to 100. Unit: GiB. * } * ], * HostName:"ECS-test", //Set the instance hostname to ECS-test. * Password:"ECS@test1234", //Set the logon password to ECS@test1234. * InternetMaxBandwidthOut:10 //Set the outbound public bandwidth to 10. Unit: Mbit/s. * Examples on how to create instances of different types based on the preceding parameters: * **Example: Create five subscription ECS instances for which auto-renewal is enabled** * Amount:5, //Set the number of ECS instances that you want to create to 5. * InstanceChargeType:"PrePaid", //Set the billing method to PrePaid, which specifies the subscription billing method. * PeriodUnit:"Month", //Set the subscription period unit to Month. * Period:1, //Set the subscription period to 1. The unit is specified by PeriodUnit, which is Month in this example. * AutoRenew:true, //Set this parameter to true to enable auto-renewal. * AutoRenewPeriod:1 //Set the renewal period to 1. The unit is specified by PeriodUnit, which is Month in this example. * **Example: Create 10 pay-as-you-go ECS instances** * Amount:10, //Set the number of ECS instances that you want to create to 10. * InstanceChargeType:"PostPaid", //Set the billing method to PostPaid, which specifies the pay-as-you-go billing method. * SpotStrategy:"NoSpot" //Set this parameter to NoSpot, which is the default value and specifies that the instances are created as pay-as-you-go instances. * **Example: Create 20 spot instances that use a specific bidding policy and a protection period** * Amount:20, //Set the number of ECS instances that you want to create to 20. * InstanceChargeType:"PostPaid", * SpotStrategy:"SpotAsPriceGo", //Set the bidding policy to SpotAsPriceGo, which specifies that the instances are created as spot instances for which the market price at the time of purchase is automatically used as the bid price. * SpotDuration:1 //Set the protection period of the spot instances to 1. Unit: hours. * Use a launch template created by calling the [CreateLaunchTemplate](https://help.aliyun.com/document_detail/2679729.html) operation to create ECS instances in the China (Hangzhou) region. Examples: * **Example: Create 10 ECS instances based on a launch template** * RegionId:"cn-hangzhou", //Set the region ID to cn-hangzhou, which specifies the China (Hangzhou) region. * Amount:10, //Set the number of ECS instances that you want to create to 10. * LaunchTemplateId:"lt-bp14xczpoxvb6rre****" //Set the launch template ID to lt-bp14xczpoxvb6rre****. * > If a parameter is specified both in the launch template that you reference in a request and in the instance parameters of the same request, the value specified in the instance parameters takes precedence. For example, if you set InstanceChargeType in the launch template to PrePaid (subscription) and set InstanceChargeType in the instance parameters to PostPaid (pay-as-you-go), the created instances are pay-as-you-go instances. * **Example: Use a full image (an image that contains the system disk and data disks) to create an ECS instance** * RegionId:"cn-hangzhou", //Set the region ID to cn-hangzhou, which specifies the China (Hangzhou) region. * ImageId = m-bp13ohd32cvzpq9e****, //Set the custom image ID to m-bp13ohd32cvzpq9e****. * InstanceType = ecs.u1-c1m1.large, //Set the instance type to ecs.u1-c1m1.large. * SecurityGroupId = sg-bp10jztp6b0sdsyl****, //Set the security group ID to sg-bp10jztp6b0sdsyl****. * VSwitchId = vsw-bp19wo63nleroq22g****, //Set the vSwitch ID to vsw-bp19wo63nleroq22g****. * SystemDisk.Size = 50, //Set the size of the system disk in the full image to 50. Unit: GiB. * SystemDisk.Category = cloud_auto, //Set the category of the system disk in the full image to cloud_auto, which specifies the ESSD AutoPL disk category. * DataDisk.0.Device = /dev/xvdb, //Set the mount point of the data disk in the full image to /dev/xvdb. * DataDisk.0.Size = 50, //Set the size of the data disk in the full image to 50. Unit: GiB. * DataDisk.0.Category = cloud_essd, //Set the category of the data disk in the full image to cloud_essd, which specifies the ESSD category. * DataDisk.1.Device = /dev/xvdc, //Set the mount point of the new data disk to /dev/xvdc. If you want to use a new data disk to replace the data disk in the full image, set DataDisk.1.Device to /dev/xvdb (the default mount point of the data disk in the full image). * DataDisk.1.Size = 70, //Set the size of the new data disk to 70. Unit: GiB. * DataDisk.1.Category = cloud_auto, //Set the category of the new data disk to cloud_auto, which specifies the ESSD AutoPL disk category. * * @param request - RunInstancesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns RunInstancesResponse */ async runInstancesWithOptions(request: $_model.RunInstancesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RunInstancesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.affinity)) { query["Affinity"] = request.affinity; } if (!$dara.isNull(request.amount)) { query["Amount"] = request.amount; } if (!$dara.isNull(request.arn)) { query["Arn"] = request.arn; } if (!$dara.isNull(request.autoPay)) { query["AutoPay"] = request.autoPay; } if (!$dara.isNull(request.autoReleaseTime)) { query["AutoReleaseTime"] = request.autoReleaseTime; } if (!$dara.isNull(request.autoRenew)) { query["AutoRenew"] = request.autoRenew; } if (!$dara.isNull(request.autoRenewPeriod)) { query["AutoRenewPeriod"] = request.autoRenewPeriod; } if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.clockOptions)) { query["ClockOptions"] = request.clockOptions; } if (!$dara.isNull(request.creditSpecification)) { query["CreditSpecification"] = request.creditSpecification; } if (!$dara.isNull(request.dataDisk)) { query["DataDisk"] = request.dataDisk; } if (!$dara.isNull(request.dedicatedHostId)) { query["DedicatedHostId"] = request.dedicatedHostId; } if (!$dara.isNull(request.deletionProtection)) { query["DeletionProtection"] = request.deletionProtection; } if (!$dara.isNull(request.deploymentSetGroupNo)) { query["DeploymentSetGroupNo"] = request.deploymentSetGroupNo; } if (!$dara.isNull(request.deploymentSetId)) { query["DeploymentSetId"] = request.deploymentSetId; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.dryRun)) { query["DryRun"] = request.dryRun; } if (!$dara.isNull(request.hostName)) { query["HostName"] = request.hostName; } if (!$dara.isNull(request.hostNames)) { query["HostNames"] = request.hostNames; } if (!$dara.isNull(request.hpcClusterId)) { query["HpcClusterId"] = request.hpcClusterId; } if (!$dara.isNull(request.httpEndpoint)) { query["HttpEndpoint"] = request.httpEndpoint; } if (!$dara.isNull(request.httpPutResponseHopLimit)) { query["HttpPutResponseHopLimit"] = request.httpPutResponseHopLimit; } if (!$dara.isNull(request.httpTokens)) { query["HttpTokens"] = request.httpTokens; } if (!$dara.isNull(request.imageFamily)) { query["ImageFamily"] = request.imageFamily; } if (!$dara.isNull(request.imageId)) { query["ImageId"] = request.imageId; } if (!$dara.isNull(request.imageOptions)) { query["ImageOptions"] = request.imageOptions; } if (!$dara.isNull(request.instanceChargeType)) { query["InstanceChargeType"] = request.instanceChargeType; } if (!$dara.isNull(request.instanceName)) { query["InstanceName"] = request.instanceName; } if (!$dara.isNull(request.instanceType)) { query["InstanceType"] = request.instanceType; } if (!$dara.isNull(request.internetChargeType)) { query["InternetChargeType"] = request.internetChargeType; } if (!$dara.isNull(request.internetMaxBandwidthIn)) { query["InternetMaxBandwidthIn"] = request.internetMaxBandwidthIn; } if (!$dara.isNull(request.internetMaxBandwidthOut)) { query["InternetMaxBandwidthOut"] = request.internetMaxBandwidthOut; } if (!$dara.isNull(request.ioOptimized)) { query["IoOptimized"] = request.ioOptimized; } if (!$dara.isNull(request.ipv6Address)) { query["Ipv6Address"] = request.ipv6Address; } if (!$dara.isNull(request.ipv6AddressCount)) { query["Ipv6AddressCount"] = request.ipv6AddressCount; } if (!$dara.isNull(request.isp)) { query["Isp"] = request.isp; } if (!$dara.isNull(request.keyPairName)) { query["KeyPairName"] = request.keyPairName; } if (!$dara.isNull(request.launchTemplateId)) { query["LaunchTemplateId"] = request.launchTemplateId; } if (!$dara.isNull(request.launchTemplateName)) { query["LaunchTemplateName"] = request.launchTemplateName; } if (!$dara.isNull(request.launchTemplateVersion)) { query["LaunchTemplateVersion"] = request.launchTemplateVersion; } if (!$dara.isNull(request.minAmount)) { query["MinAmount"] = request.minAmount; } if (!$dara.isNull(request.networkInterface)) { query["NetworkInterface"] = request.networkInterface; } if (!$dara.isNull(request.networkInterfaceQueueNumber)) { query["NetworkInterfaceQueueNumber"] = request.networkInterfaceQueueNumber; } if (!$dara.isNull(request.networkOptions)) { query["NetworkOptions"] = request.networkOptions; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.password)) { query["Password"] = request.password; } if (!$dara.isNull(request.passwordInherit)) { query["PasswordInherit"] = request.passwordInherit; } if (!$dara.isNull(request.period)) { query["Period"] = request.period; } if (!$dara.isNull(request.periodUnit)) { query["PeriodUnit"] = request.periodUnit; } if (!$dara.isNull(request.privateDnsNameOptions)) { query["PrivateDnsNameOptions"] = request.privateDnsNameOptions; } if (!$dara.isNull(request.privateIpAddress)) { query["PrivateIpAddress"] = request.privateIpAddress; } if (!$dara.isNull(request.ramRoleName)) { query["RamRoleName"] = request.ramRoleName; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.securityEnhancementStrategy)) { query["SecurityEnhancementStrategy"] = request.securityEnhancementStrategy; } if (!$dara.isNull(request.securityGroupId)) { query["SecurityGroupId"] = request.securityGroupId; } if (!$dara.isNull(request.securityGroupIds)) { query["SecurityGroupIds"] = request.securityGroupIds; } if (!$dara.isNull(request.spotDuration)) { query["SpotDuration"] = request.spotDuration; } if (!$dara.isNull(request.spotInterruptionBehavior)) { query["SpotInterruptionBehavior"] = request.spotInterruptionBehavior; } if (!$dara.isNull(request.spotPriceLimit)) { query["SpotPriceLimit"] = request.spotPriceLimit; } if (!$dara.isNull(request.spotStrategy)) { query["SpotStrategy"] = request.spotStrategy; } if (!$dara.isNull(request.storageSetId)) { query["StorageSetId"] = request.storageSetId; } if (!$dara.isNull(request.storageSetPartitionNumber)) { query["StorageSetPartitionNumber"] = request.storageSetPartitionNumber; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } if (!$dara.isNull(request.tenancy)) { query["Tenancy"] = request.tenancy; } if (!$dara.isNull(request.uniqueSuffix)) { query["UniqueSuffix"] = request.uniqueSuffix; } if (!$dara.isNull(request.userData)) { query["UserData"] = request.userData; } if (!$dara.isNull(request.vSwitchId)) { query["VSwitchId"] = request.vSwitchId; } if (!$dara.isNull(request.zoneId)) { query["ZoneId"] = request.zoneId; } if (!$dara.isNull(request.cpuOptions)) { query["CpuOptions"] = request.cpuOptions; } if (!$dara.isNull(request.hibernationOptions)) { query["HibernationOptions"] = request.hibernationOptions; } if (!$dara.isNull(request.privatePoolOptions)) { query["PrivatePoolOptions"] = request.privatePoolOptions; } if (!$dara.isNull(request.schedulerOptions)) { query["SchedulerOptions"] = request.schedulerOptions; } if (!$dara.isNull(request.securityOptions)) { query["SecurityOptions"] = request.securityOptions; } if (!$dara.isNull(request.systemDisk)) { query["SystemDisk"] = request.systemDisk; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "RunInstances", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.RunInstancesResponse>(await this.callApi(params, req, runtime), new $_model.RunInstancesResponse({})); } /** * Batch creates Elastic Compute Service (ECS) instances. You can automatically start, assign public IP addresses to, and specify an automatic release time for the instances. * * @remarks * Before you call this operation, familiarize yourself with the billing rules and [pricing](https://www.alibabacloud.com/zh/pricing-calculator#/commodity/vm_intl) of ECS resources. * This operation is an asynchronous operation. After a request to create ECS instances is sent, ECS instance IDs are returned but the creation and startup of the instances may be incomplete. You can call the [DescribeInstanceStatus](https://help.aliyun.com/document_detail/2679688.html) operation to query the status of the instances. When the status of an instance is `Running` in the DescribeInstanceStatus response, the instance is created and started. * ### [](#)Considerations * * If the resource inventory is insufficient to complete instance creation, Alibaba Cloud immediately sends an instance creation failure event (SystemFailure.Delete). You can call the [DescribeInstanceHistoryEvents](https://help.aliyun.com/document_detail/2679897.html) operation to check whether an instance creation failure event exists. For more information, see [System events related to instance creation failures](https://help.aliyun.com/document_detail/2545990.html). * * Make sure that the number of ECS instances you create or the number of vCPUs on ECS instances of all instance types you create does not exceed the corresponding quota. Go to the [Quota Center](https://quotas.console.aliyun.com/products/ecs/quotas) to view the quotas. * * Before you create ECS instances of the Virtual Private Cloud (VPC) type in a region, [create a VPC](https://help.aliyun.com/document_detail/65430.html) in the region. * ### [](#)Precautions * * If you create a subscription instance (`PrePaid`), available coupons in your account are automatically used. * * You can call the RunInstances operation to create up to 100 ECS instances in a single request. To create more than 100 ECS instances, we recommend that you initiate multiple requests in batches or concurrently. * * If you set `InternetMaxBandwidthOut` to a value greater than 0, public IP addresses are automatically assigned to the ECS instances to be created. * > For the limits on the sum of maximum public bandwidths of ECS instances that use the pay-by-bandwidth billing method for network usage per region per Alibaba Cloud account, see the [Public bandwidth](~~25412#BandwidthQuota~~) section of the "Limits and quotas on ECS" topic. * ### [](#)Suggestions * * **Test scenarios**: Set `DryRun` to true to perform a dry run without performing the actual request. * * **Release of ECS instances**: Use `AutoReleaseTime` to configure an automatic release time for ECS instances in the request to RunInstances or call the [DeleteInstances](https://help.aliyun.com/document_detail/2679710.html) operation to release the instances. * * **Management and search of ECS instances**: Add tags to the ECS instances by specifying `Tag.N.Key` and `Tag.N.Value` and append incremental suffixes by specifying `UniqueSuffix` to the hostname specified by `HostName` and the instance name specified by `InstanceName`. For more information, see [Batch configure sequential names or hostnames for multiple instances](https://help.aliyun.com/document_detail/196048.html). * * **Launch template**: A launch template contains the parameters required to create an ECS instance so that you do not have to specify the parameters every time you create ECS instances. You can call the [CreateLaunchTemplate](https://help.aliyun.com/document_detail/2679729.html) operation to create a launch template. Then, in the request to `RunInstances`, you can specify `LaunchTemplateId` and `LaunchTemplateVersion` to use the launch template. * * **Disabling of Hyper-Threading (HT)**: In memory-intensive scenarios, set `CpuOptions.ThreadsPerCore` to 1 to disable HT and increase the memory-to-vCPU ratio. * * **Enabling of Jumbo Frames**: Set `NetworkOptions.EnableJumboFrame` to true to enable the `Jumbo Frames` feature when you create ECS instances. For more information, see [Jumbo Frames](https://help.aliyun.com/document_detail/200512.html). * ## [](#)Sample requests * Use a specific image to create ECS instances of a specific instance type in the China (Hangzhou) region. The instances use disks with a specific capacity as the system disk and data disks and are automatically assigned public IP addresses. The instances have user-defined names and logon passwords. The instances are assigned to a specific security group and connected to a specific vSwitch. Request parameters: * RegionId:"cn-hangzhou", //Set the region ID to cn-hangzhou, which specifies the China (Hangzhou) region. * ImageId:"aliyun_3_x64_20G_alibase_20221102.vhd", //Set the image ID to aliyun_3_x64_20G_alibase_20221102.vhd. * InstanceType:"ecs.g7.large", //Set the instance type to ecs.g7.large. * SecurityGroupId:"sg-bp150uqocpf9jj70****", //Set the security group ID to sg-bp150uqocpf9jj70****. * VSwitchId:"vsw-bp1qo7s91cbch5i4l****", //Set the vSwitch ID to vsw-bp1qo7s91cbch5i4l****. * SystemDisk:{ * Category:"cloud_essd", //Set the system disk category to cloud_essd, which specifies the Enterprise SSD (ESSD) category. * Size:40, //Set the system disk size to 40. Unit: GiB. * }, * DataDisk:[ * { * Category:"cloud_essd", //Set the data disk category to cloud_essd, which specifies the ESSD category. * Size:100, //Set the data disk size to 100. Unit: GiB. * } * ], * HostName:"ECS-test", //Set the instance hostname to ECS-test. * Password:"ECS@test1234", //Set the logon password to ECS@test1234. * InternetMaxBandwidthOut:10 //Set the outbound public bandwidth to 10. Unit: Mbit/s. * Examples on how to create instances of different types based on the preceding parameters: * **Example: Create five subscription ECS instances for which auto-renewal is enabled** * Amount:5, //Set the number of ECS instances that you want to create to 5. * InstanceChargeType:"PrePaid", //Set the billing method to PrePaid, which specifies the subscription billing method. * PeriodUnit:"Month", //Set the subscription period unit to Month. * Period:1, //Set the subscription period to 1. The unit is specified by PeriodUnit, which is Month in this example. * AutoRenew:true, //Set this parameter to true to enable auto-renewal. * AutoRenewPeriod:1 //Set the renewal period to 1. The unit is specified by PeriodUnit, which is Month in this example. * **Example: Create 10 pay-as-you-go ECS instances** * Amount:10, //Set the number of ECS instances that you want to create to 10. * InstanceChargeType:"PostPaid", //Set the billing method to PostPaid, which specifies the pay-as-you-go billing method. * SpotStrategy:"NoSpot" //Set this parameter to NoSpot, which is the default value and specifies that the instances are created as pay-as-you-go instances. * **Example: Create 20 spot instances that use a specific bidding policy and a protection period** * Amount:20, //Set the number of ECS instances that you want to create to 20. * InstanceChargeType:"PostPaid", * SpotStrategy:"SpotAsPriceGo", //Set the bidding policy to SpotAsPriceGo, which specifies that the instances are created as spot instances for which the market price at the time of purchase is automatically used as the bid price. * SpotDuration:1 //Set the protection period of the spot instances to 1. Unit: hours. * Use a launch template created by calling the [CreateLaunchTemplate](https://help.aliyun.com/document_detail/2679729.html) operation to create ECS instances in the China (Hangzhou) region. Examples: * **Example: Create 10 ECS instances based on a launch template** * RegionId:"cn-hangzhou", //Set the region ID to cn-hangzhou, which specifies the China (Hangzhou) region. * Amount:10, //Set the number of ECS instances that you want to create to 10. * LaunchTemplateId:"lt-bp14xczpoxvb6rre****" //Set the launch template ID to lt-bp14xczpoxvb6rre****. * > If a parameter is specified both in the launch template that you reference in a request and in the instance parameters of the same request, the value specified in the instance parameters takes precedence. For example, if you set InstanceChargeType in the launch template to PrePaid (subscription) and set InstanceChargeType in the instance parameters to PostPaid (pay-as-you-go), the created instances are pay-as-you-go instances. * **Example: Use a full image (an image that contains the system disk and data disks) to create an ECS instance** * RegionId:"cn-hangzhou", //Set the region ID to cn-hangzhou, which specifies the China (Hangzhou) region. * ImageId = m-bp13ohd32cvzpq9e****, //Set the custom image ID to m-bp13ohd32cvzpq9e****. * InstanceType = ecs.u1-c1m1.large, //Set the instance type to ecs.u1-c1m1.large. * SecurityGroupId = sg-bp10jztp6b0sdsyl****, //Set the security group ID to sg-bp10jztp6b0sdsyl****. * VSwitchId = vsw-bp19wo63nleroq22g****, //Set the vSwitch ID to vsw-bp19wo63nleroq22g****. * SystemDisk.Size = 50, //Set the size of the system disk in the full image to 50. Unit: GiB. * SystemDisk.Category = cloud_auto, //Set the category of the system disk in the full image to cloud_auto, which specifies the ESSD AutoPL disk category. * DataDisk.0.Device = /dev/xvdb, //Set the mount point of the data disk in the full image to /dev/xvdb. * DataDisk.0.Size = 50, //Set the size of the data disk in the full image to 50. Unit: GiB. * DataDisk.0.Category = cloud_essd, //Set the category of the data disk in the full image to cloud_essd, which specifies the ESSD category. * DataDisk.1.Device = /dev/xvdc, //Set the mount point of the new data disk to /dev/xvdc. If you want to use a new data disk to replace the data disk in the full image, set DataDisk.1.Device to /dev/xvdb (the default mount point of the data disk in the full image). * DataDisk.1.Size = 70, //Set the size of the new data disk to 70. Unit: GiB. * DataDisk.1.Category = cloud_auto, //Set the category of the new data disk to cloud_auto, which specifies the ESSD AutoPL disk category. * * @param request - RunInstancesRequest * @returns RunInstancesResponse */ async runInstances(request: $_model.RunInstancesRequest): Promise<$_model.RunInstancesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.runInstancesWithOptions(request, runtime); } /** * Sends a file to one or more Elastic Compute Service (ECS) instances. * * @remarks * ## [](#)Usage notes * * The instances to which you want to send a file must be in the Running (`Running`) state. * * [Cloud Assistant Agent](https://help.aliyun.com/document_detail/64921.html) must be installed on the instances. * * Only Cloud Assistant Agent versions that are later than the following ones support file sending. If the `ClientNeedUpgrade` error code is returned, update Cloud Assistant Agent to the latest version. * * For Linux instances, the version of Cloud Assistant Agent must be later than 1.0.2.569. * * For Windows instances, the version of Cloud Assistant Agent must be later than 1.0.0.149. * * The file to be sent must not exceed 32 KB in size after it is encoded in Base64. * * The file may fail to be sent due to instance exceptions, network exceptions, or exceptions on Cloud Assistant Agent. If the file fails to be sent, call the [DescribeSendFileResults](https://help.aliyun.com/document_detail/184117.html) operation or see [Check execution results and troubleshoot common issues](https://help.aliyun.com/document_detail/87029.html) for troubleshooting. * * @param request - SendFileRequest * @param runtime - runtime options for this request RuntimeOptions * @returns SendFileResponse */ async sendFileWithOptions(request: $_model.SendFileRequest, runtime: $dara.RuntimeOptions): Promise<$_model.SendFileResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.content)) { query["Content"] = request.content; } if (!$dara.isNull(request.contentType)) { query["ContentType"] = request.contentType; } if (!$dara.isNull(request.description)) { query["Description"] = request.description; } if (!$dara.isNull(request.fileGroup)) { query["FileGroup"] = request.fileGroup; } if (!$dara.isNull(request.fileMode)) { query["FileMode"] = request.fileMode; } if (!$dara.isNull(request.fileOwner)) { query["FileOwner"] = request.fileOwner; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.name)) { query["Name"] = request.name; } if (!$dara.isNull(request.overwrite)) { query["Overwrite"] = request.overwrite; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceGroupId)) { query["ResourceGroupId"] = request.resourceGroupId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } if (!$dara.isNull(request.targetDir)) { query["TargetDir"] = request.targetDir; } if (!$dara.isNull(request.timeout)) { query["Timeout"] = request.timeout; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "SendFile", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.SendFileResponse>(await this.callApi(params, req, runtime), new $_model.SendFileResponse({})); } /** * Sends a file to one or more Elastic Compute Service (ECS) instances. * * @remarks * ## [](#)Usage notes * * The instances to which you want to send a file must be in the Running (`Running`) state. * * [Cloud Assistant Agent](https://help.aliyun.com/document_detail/64921.html) must be installed on the instances. * * Only Cloud Assistant Agent versions that are later than the following ones support file sending. If the `ClientNeedUpgrade` error code is returned, update Cloud Assistant Agent to the latest version. * * For Linux instances, the version of Cloud Assistant Agent must be later than 1.0.2.569. * * For Windows instances, the version of Cloud Assistant Agent must be later than 1.0.0.149. * * The file to be sent must not exceed 32 KB in size after it is encoded in Base64. * * The file may fail to be sent due to instance exceptions, network exceptions, or exceptions on Cloud Assistant Agent. If the file fails to be sent, call the [DescribeSendFileResults](https://help.aliyun.com/document_detail/184117.html) operation or see [Check execution results and troubleshoot common issues](https://help.aliyun.com/document_detail/87029.html) for troubleshooting. * * @param request - SendFileRequest * @returns SendFileResponse */ async sendFile(request: $_model.SendFileRequest): Promise<$_model.SendFileResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.sendFileWithOptions(request, runtime); } /** * Executes an image creation task (image building task) by using an image template. * * @remarks * After you create an image template, you can call the StartImagePipelineExecution operation to create a pipeline task. The system creates, copies, and shares images based on the parameters configured in the image template. * * You can execute only one pipeline task for each image template. * * @param request - StartImagePipelineExecutionRequest * @param runtime - runtime options for this request RuntimeOptions * @returns StartImagePipelineExecutionResponse */ async startImagePipelineExecutionWithOptions(request: $_model.StartImagePipelineExecutionRequest, runtime: $dara.RuntimeOptions): Promise<$_model.StartImagePipelineExecutionResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.imagePipelineId)) { query["ImagePipelineId"] = request.imagePipelineId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } if (!$dara.isNull(request.templateTag)) { query["TemplateTag"] = request.templateTag; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "StartImagePipelineExecution", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.StartImagePipelineExecutionResponse>(await this.callApi(params, req, runtime), new $_model.StartImagePipelineExecutionResponse({})); } /** * Executes an image creation task (image building task) by using an image template. * * @remarks * After you create an image template, you can call the StartImagePipelineExecution operation to create a pipeline task. The system creates, copies, and shares images based on the parameters configured in the image template. * * You can execute only one pipeline task for each image template. * * @param request - StartImagePipelineExecutionRequest * @returns StartImagePipelineExecutionResponse */ async startImagePipelineExecution(request: $_model.StartImagePipelineExecutionRequest): Promise<$_model.StartImagePipelineExecutionResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.startImagePipelineExecutionWithOptions(request, runtime); } /** * Starts an Elastic Compute Service (ECS) instance. You can specify the ID of an ECS instance and parameters, such as InitLocalDisk, in the request based on your business requirements to start the instance. * * @remarks * This operation is an asynchronous operation. After you call this operation to start an ECS instance, the operation sets the status of the ECS instance to Starting and begins the startup process. You can call the [DescribeInstanceStatus](https://help.aliyun.com/document_detail/2679688.html) operation to query the status of the ECS instance. When the status of the ECS instance changes to `Running`, the instance is started. * ### [](#)Precautions * * You cannot call this operation to start an ECS instance that is locked for security reasons. For more information, see [API behavior when an instance is locked for security reasons](https://help.aliyun.com/document_detail/25695.html). * * The ECS instance that you want to start must be in the **Stopped** (`Stopped`) state. * * If an ECS instance is stopped in economical mode, the instance may fail to be started due to insufficient resources. * * @param request - StartInstanceRequest * @param runtime - runtime options for this request RuntimeOptions * @returns StartInstanceResponse */ async startInstanceWithOptions(request: $_model.StartInstanceRequest, runtime: $dara.RuntimeOptions): Promise<$_model.StartInstanceResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.dryRun)) { query["DryRun"] = request.dryRun; } if (!$dara.isNull(request.initLocalDisk)) { query["InitLocalDisk"] = request.initLocalDisk; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "StartInstance", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.StartInstanceResponse>(await this.callApi(params, req, runtime), new $_model.StartInstanceResponse({})); } /** * Starts an Elastic Compute Service (ECS) instance. You can specify the ID of an ECS instance and parameters, such as InitLocalDisk, in the request based on your business requirements to start the instance. * * @remarks * This operation is an asynchronous operation. After you call this operation to start an ECS instance, the operation sets the status of the ECS instance to Starting and begins the startup process. You can call the [DescribeInstanceStatus](https://help.aliyun.com/document_detail/2679688.html) operation to query the status of the ECS instance. When the status of the ECS instance changes to `Running`, the instance is started. * ### [](#)Precautions * * You cannot call this operation to start an ECS instance that is locked for security reasons. For more information, see [API behavior when an instance is locked for security reasons](https://help.aliyun.com/document_detail/25695.html). * * The ECS instance that you want to start must be in the **Stopped** (`Stopped`) state. * * If an ECS instance is stopped in economical mode, the instance may fail to be started due to insufficient resources. * * @param request - StartInstanceRequest * @returns StartInstanceResponse */ async startInstance(request: $_model.StartInstanceRequest): Promise<$_model.StartInstanceResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.startInstanceWithOptions(request, runtime); } /** * Starts Elastic Compute Service (ECS) instances that are in the Stopped state. * * @remarks * This operation is an asynchronous operation. After you call this operation to start ECS instances, the operation sets the status of the ECS instances to Starting and begins the startup process. You can call the [DescribeInstanceStatus](https://help.aliyun.com/document_detail/2679688.html) operation to query the status of the instances. When the status of the ECS instances changes to `Running`, the instances are started. * ### [](#)Precautions * * You cannot call this operation to start ECS instances that are locked for security reasons. For more information, see [API behavior when an instance is locked for security reasons](https://help.aliyun.com/document_detail/25695.html). * * The ECS instances that you want to start must be in the **Stopped** (`Stopped`) state. * * ECS instances stopped in economical mode may fail to be started due to insufficient resources. * * @param request - StartInstancesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns StartInstancesResponse */ async startInstancesWithOptions(request: $_model.StartInstancesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.StartInstancesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.batchOptimization)) { query["BatchOptimization"] = request.batchOptimization; } if (!$dara.isNull(request.dryRun)) { query["DryRun"] = request.dryRun; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "StartInstances", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.StartInstancesResponse>(await this.callApi(params, req, runtime), new $_model.StartInstancesResponse({})); } /** * Starts Elastic Compute Service (ECS) instances that are in the Stopped state. * * @remarks * This operation is an asynchronous operation. After you call this operation to start ECS instances, the operation sets the status of the ECS instances to Starting and begins the startup process. You can call the [DescribeInstanceStatus](https://help.aliyun.com/document_detail/2679688.html) operation to query the status of the instances. When the status of the ECS instances changes to `Running`, the instances are started. * ### [](#)Precautions * * You cannot call this operation to start ECS instances that are locked for security reasons. For more information, see [API behavior when an instance is locked for security reasons](https://help.aliyun.com/document_detail/25695.html). * * The ECS instances that you want to start must be in the **Stopped** (`Stopped`) state. * * ECS instances stopped in economical mode may fail to be started due to insufficient resources. * * @param request - StartInstancesRequest * @returns StartInstancesResponse */ async startInstances(request: $_model.StartInstancesRequest): Promise<$_model.StartInstancesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.startInstancesWithOptions(request, runtime); } /** * Creates a session by using the session management feature. When you call this operation, you can include the ID of an Elastic Compute Service (ECS) instance in the request to create a WebSocket session for the instance. The URL of the WebSocket session returned by the operation can be used to connect to the instance. * * @remarks * ## [](#)Usage notes * When you use custom code to connect to an ECS instance that serves as a client, you can call this operation to obtain the WebSocket URL that is used to connect to the instance. Take note of the following items: * * The ECS instance must be in the Running state. * * Cloud Assistant Agent must be installed on the ECS instance. You can call the [DescribeCloudAssistantStatus](https://help.aliyun.com/document_detail/87346.html) operation to check whether Cloud Assistant Agent is installed on the ECS instance and query the version number of the installed Cloud Assistant Agent. * * If Cloud Assistant Agent is not installed on the ECS instance, call the [InstallCloudAssistant](https://help.aliyun.com/document_detail/85916.html) operation to install Cloud Assistant Agent. * * The Cloud Assistant Agent versions that are later than the following ones support the session management feature. If you need to upgrade the Cloud Assistant Agent version, follow the instructions in [Upgrade or disable upgrades of Cloud Assistant Agent](https://help.aliyun.com/document_detail/134383.html). * * Linux operating system: 2.2.3.256 * * Windows operating system: 2.1.3.256 * * Each WebSocket URL returned by the StartTerminalSession operation remains valid for 10 minutes. * * If no data is transferred over a session within 3 minutes, Cloud Assistant closes the session connection. * * Up to 1,000 sessions can be created and available in a region. Each ECS instance can have up to 20 sessions in the connected state. Each session supports a bandwidth of up to 200 Kbit/s. * * The port forwarding feature supports only TCP port forwarding. UDP port forwarding is not supported. * * If you want to permanently close a session and invalidate the WebSocket URL, call the EndTerminalSession operation. * * @param tmpReq - StartTerminalSessionRequest * @param runtime - runtime options for this request RuntimeOptions * @returns StartTerminalSessionResponse */ async startTerminalSessionWithOptions(tmpReq: $_model.StartTerminalSessionRequest, runtime: $dara.RuntimeOptions): Promise<$_model.StartTerminalSessionResponse> { tmpReq.validate(); let request = new $_model.StartTerminalSessionShrinkRequest({ }); OpenApiUtil.convert(tmpReq, request); if (!$dara.isNull(tmpReq.encryptionOptions)) { request.encryptionOptionsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.encryptionOptions, "EncryptionOptions", "json"); } let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.commandLine)) { query["CommandLine"] = request.commandLine; } if (!$dara.isNull(request.connectionType)) { query["ConnectionType"] = request.connectionType; } if (!$dara.isNull(request.encryptionOptionsShrink)) { query["EncryptionOptions"] = request.encryptionOptionsShrink; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.passwordName)) { query["PasswordName"] = request.passwordName; } if (!$dara.isNull(request.portNumber)) { query["PortNumber"] = request.portNumber; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.targetServer)) { query["TargetServer"] = request.targetServer; } if (!$dara.isNull(request.username)) { query["Username"] = request.username; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "StartTerminalSession", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.StartTerminalSessionResponse>(await this.callApi(params, req, runtime), new $_model.StartTerminalSessionResponse({})); } /** * Creates a session by using the session management feature. When you call this operation, you can include the ID of an Elastic Compute Service (ECS) instance in the request to create a WebSocket session for the instance. The URL of the WebSocket session returned by the operation can be used to connect to the instance. * * @remarks * ## [](#)Usage notes * When you use custom code to connect to an ECS instance that serves as a client, you can call this operation to obtain the WebSocket URL that is used to connect to the instance. Take note of the following items: * * The ECS instance must be in the Running state. * * Cloud Assistant Agent must be installed on the ECS instance. You can call the [DescribeCloudAssistantStatus](https://help.aliyun.com/document_detail/87346.html) operation to check whether Cloud Assistant Agent is installed on the ECS instance and query the version number of the installed Cloud Assistant Agent. * * If Cloud Assistant Agent is not installed on the ECS instance, call the [InstallCloudAssistant](https://help.aliyun.com/document_detail/85916.html) operation to install Cloud Assistant Agent. * * The Cloud Assistant Agent versions that are later than the following ones support the session management feature. If you need to upgrade the Cloud Assistant Agent version, follow the instructions in [Upgrade or disable upgrades of Cloud Assistant Agent](https://help.aliyun.com/document_detail/134383.html). * * Linux operating system: 2.2.3.256 * * Windows operating system: 2.1.3.256 * * Each WebSocket URL returned by the StartTerminalSession operation remains valid for 10 minutes. * * If no data is transferred over a session within 3 minutes, Cloud Assistant closes the session connection. * * Up to 1,000 sessions can be created and available in a region. Each ECS instance can have up to 20 sessions in the connected state. Each session supports a bandwidth of up to 200 Kbit/s. * * The port forwarding feature supports only TCP port forwarding. UDP port forwarding is not supported. * * If you want to permanently close a session and invalidate the WebSocket URL, call the EndTerminalSession operation. * * @param request - StartTerminalSessionRequest * @returns StartTerminalSessionResponse */ async startTerminalSession(request: $_model.StartTerminalSessionRequest): Promise<$_model.StartTerminalSessionResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.startTerminalSessionWithOptions(request, runtime); } /** * Stops an Elastic Compute Service (ECS) instance. You can specify parameters to determine whether to forcefully stop the instance and the stop mode. * * @remarks * This operation is an asynchronous operation. After you call this operation to stop an ECS instance, the operation sets the status of the ECS instance to Stopping and begins the stop process. You can call the [DescribeInstanceStatus](https://help.aliyun.com/document_detail/2679688.html) operation to query the status of the ECS instance. When the status of the ECS instance changes to `Stopped`, the instance is stopped. * ### [](#)Precautions * * You cannot call this operation to stop an ECS instance that is locked for security reasons. For more information, see [API behavior when an instance is locked for security reasons](https://help.aliyun.com/document_detail/25695.html). * * After you enable the default economical mode for all pay-as-you-go ECS instances located in virtual private clouds (VPCs) in your account, you can set `StoppedMode` to KeepCharging for the ECS instance that you want to stop to enable standard mode. This way, the ECS instance continues to be billed after the instance is stopped. The instance type resources and public IP address of the instance are retained. * * @param request - StopInstanceRequest * @param runtime - runtime options for this request RuntimeOptions * @returns StopInstanceResponse */ async stopInstanceWithOptions(request: $_model.StopInstanceRequest, runtime: $dara.RuntimeOptions): Promise<$_model.StopInstanceResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.confirmStop)) { query["ConfirmStop"] = request.confirmStop; } if (!$dara.isNull(request.dryRun)) { query["DryRun"] = request.dryRun; } if (!$dara.isNull(request.forceStop)) { query["ForceStop"] = request.forceStop; } if (!$dara.isNull(request.hibernate)) { query["Hibernate"] = request.hibernate; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.stoppedMode)) { query["StoppedMode"] = request.stoppedMode; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "StopInstance", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.StopInstanceResponse>(await this.callApi(params, req, runtime), new $_model.StopInstanceResponse({})); } /** * Stops an Elastic Compute Service (ECS) instance. You can specify parameters to determine whether to forcefully stop the instance and the stop mode. * * @remarks * This operation is an asynchronous operation. After you call this operation to stop an ECS instance, the operation sets the status of the ECS instance to Stopping and begins the stop process. You can call the [DescribeInstanceStatus](https://help.aliyun.com/document_detail/2679688.html) operation to query the status of the ECS instance. When the status of the ECS instance changes to `Stopped`, the instance is stopped. * ### [](#)Precautions * * You cannot call this operation to stop an ECS instance that is locked for security reasons. For more information, see [API behavior when an instance is locked for security reasons](https://help.aliyun.com/document_detail/25695.html). * * After you enable the default economical mode for all pay-as-you-go ECS instances located in virtual private clouds (VPCs) in your account, you can set `StoppedMode` to KeepCharging for the ECS instance that you want to stop to enable standard mode. This way, the ECS instance continues to be billed after the instance is stopped. The instance type resources and public IP address of the instance are retained. * * @param request - StopInstanceRequest * @returns StopInstanceResponse */ async stopInstance(request: $_model.StopInstanceRequest): Promise<$_model.StopInstanceResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.stopInstanceWithOptions(request, runtime); } /** * Stops Elastic Compute Service (ECS) instances. You can specify parameters to determine whether to forcefully stop the instances and the stop mode. * * @remarks * This operation is an asynchronous operation. After you call this operation to stop an ECS instance, the operation sets the status of the ECS instance to Stopping and begins the stop process. You can call the [DescribeInstanceStatus](https://help.aliyun.com/document_detail/2679688.html) operation to query the status of the ECS instance. When the status of the ECS instance changes to `Stopped`, the instance is stopped. * ### [](#)Considerations * * The instance is unavailable after you stop the instance. Make sure that stopping the instance does not affect your business. You can also call the [StartInstance](https://help.aliyun.com/document_detail/2679679.html) or [StartInstances](https://help.aliyun.com/document_detail/2679680.html) operation to start the instance. * * You cannot call this operation to stop ECS instances that are locked for security reasons. For more information, see [API behavior when an instance is locked for security reasons](https://help.aliyun.com/document_detail/25695.html). * * @param request - StopInstancesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns StopInstancesResponse */ async stopInstancesWithOptions(request: $_model.StopInstancesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.StopInstancesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.batchOptimization)) { query["BatchOptimization"] = request.batchOptimization; } if (!$dara.isNull(request.dryRun)) { query["DryRun"] = request.dryRun; } if (!$dara.isNull(request.forceStop)) { query["ForceStop"] = request.forceStop; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.stoppedMode)) { query["StoppedMode"] = request.stoppedMode; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "StopInstances", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.StopInstancesResponse>(await this.callApi(params, req, runtime), new $_model.StopInstancesResponse({})); } /** * Stops Elastic Compute Service (ECS) instances. You can specify parameters to determine whether to forcefully stop the instances and the stop mode. * * @remarks * This operation is an asynchronous operation. After you call this operation to stop an ECS instance, the operation sets the status of the ECS instance to Stopping and begins the stop process. You can call the [DescribeInstanceStatus](https://help.aliyun.com/document_detail/2679688.html) operation to query the status of the ECS instance. When the status of the ECS instance changes to `Stopped`, the instance is stopped. * ### [](#)Considerations * * The instance is unavailable after you stop the instance. Make sure that stopping the instance does not affect your business. You can also call the [StartInstance](https://help.aliyun.com/document_detail/2679679.html) or [StartInstances](https://help.aliyun.com/document_detail/2679680.html) operation to start the instance. * * You cannot call this operation to stop ECS instances that are locked for security reasons. For more information, see [API behavior when an instance is locked for security reasons](https://help.aliyun.com/document_detail/25695.html). * * @param request - StopInstancesRequest * @returns StopInstancesResponse */ async stopInstances(request: $_model.StopInstancesRequest): Promise<$_model.StopInstancesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.stopInstancesWithOptions(request, runtime); } /** * \\* If you stop the process of a command that runs only once, the executions that have started are not interrupted. The executions that have not started are canceled. * \\* If you stop the process of a scheduled invocation command, the executions that have started are not interrupted. However, the execution does not start in the next period. * * @remarks * ## [](#)Usage notes * * If you stop the process of a command that runs only once, the executions that have started are not interrupted. The executions that have not started are canceled. * * If you stop the process of a command that runs on a schedule, the executions that have started are not interrupted. Subsequent executions are not scheduled. * * @param request - StopInvocationRequest * @param runtime - runtime options for this request RuntimeOptions * @returns StopInvocationResponse */ async stopInvocationWithOptions(request: $_model.StopInvocationRequest, runtime: $dara.RuntimeOptions): Promise<$_model.StopInvocationResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.invokeId)) { query["InvokeId"] = request.invokeId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "StopInvocation", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.StopInvocationResponse>(await this.callApi(params, req, runtime), new $_model.StopInvocationResponse({})); } /** * \\* If you stop the process of a command that runs only once, the executions that have started are not interrupted. The executions that have not started are canceled. * \\* If you stop the process of a scheduled invocation command, the executions that have started are not interrupted. However, the execution does not start in the next period. * * @remarks * ## [](#)Usage notes * * If you stop the process of a command that runs only once, the executions that have started are not interrupted. The executions that have not started are canceled. * * If you stop the process of a command that runs on a schedule, the executions that have started are not interrupted. Subsequent executions are not scheduled. * * @param request - StopInvocationRequest * @returns StopInvocationResponse */ async stopInvocation(request: $_model.StopInvocationRequest): Promise<$_model.StopInvocationResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.stopInvocationWithOptions(request, runtime); } /** * Creates and adds tags to Elastic Compute Service (ECS) resources. * * @remarks * ## [](#)Usage notes * Before you add tags to a resource, Alibaba Cloud checks the number of existing tags of the resource. If the maximum number of tags is reached, an error message is returned. For more information, see [Tag limits](https://help.aliyun.com/document_detail/25412.html). * * @param request - TagResourcesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns TagResourcesResponse */ async tagResourcesWithOptions(request: $_model.TagResourcesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.TagResourcesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceId)) { query["ResourceId"] = request.resourceId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceType)) { query["ResourceType"] = request.resourceType; } if (!$dara.isNull(request.tag)) { query["Tag"] = request.tag; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "TagResources", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.TagResourcesResponse>(await this.callApi(params, req, runtime), new $_model.TagResourcesResponse({})); } /** * Creates and adds tags to Elastic Compute Service (ECS) resources. * * @remarks * ## [](#)Usage notes * Before you add tags to a resource, Alibaba Cloud checks the number of existing tags of the resource. If the maximum number of tags is reached, an error message is returned. For more information, see [Tag limits](https://help.aliyun.com/document_detail/25412.html). * * @param request - TagResourcesRequest * @returns TagResourcesResponse */ async tagResources(request: $_model.TagResourcesRequest): Promise<$_model.TagResourcesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.tagResourcesWithOptions(request, runtime); } /** * TerminatePhysicalConnection * * @deprecated OpenAPI TerminatePhysicalConnection is deprecated, please use Vpc::2016-04-28::TerminatePhysicalConnection instead. * * @param request - TerminatePhysicalConnectionRequest * @param runtime - runtime options for this request RuntimeOptions * @returns TerminatePhysicalConnectionResponse */ async terminatePhysicalConnectionWithOptions(request: $_model.TerminatePhysicalConnectionRequest, runtime: $dara.RuntimeOptions): Promise<$_model.TerminatePhysicalConnectionResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.physicalConnectionId)) { query["PhysicalConnectionId"] = request.physicalConnectionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.userCidr)) { query["UserCidr"] = request.userCidr; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "TerminatePhysicalConnection", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.TerminatePhysicalConnectionResponse>(await this.callApi(params, req, runtime), new $_model.TerminatePhysicalConnectionResponse({})); } /** * TerminatePhysicalConnection * * @deprecated OpenAPI TerminatePhysicalConnection is deprecated, please use Vpc::2016-04-28::TerminatePhysicalConnection instead. * * @param request - TerminatePhysicalConnectionRequest * @returns TerminatePhysicalConnectionResponse */ // Deprecated async terminatePhysicalConnection(request: $_model.TerminatePhysicalConnectionRequest): Promise<$_model.TerminatePhysicalConnectionResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.terminatePhysicalConnectionWithOptions(request, runtime); } /** * TerminateVirtualBorderRouter * * @deprecated OpenAPI TerminateVirtualBorderRouter is deprecated, please use Vpc::2016-04-28::TerminateVirtualBorderRouter instead. * * @param request - TerminateVirtualBorderRouterRequest * @param runtime - runtime options for this request RuntimeOptions * @returns TerminateVirtualBorderRouterResponse */ async terminateVirtualBorderRouterWithOptions(request: $_model.TerminateVirtualBorderRouterRequest, runtime: $dara.RuntimeOptions): Promise<$_model.TerminateVirtualBorderRouterResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.userCidr)) { query["UserCidr"] = request.userCidr; } if (!$dara.isNull(request.vbrId)) { query["VbrId"] = request.vbrId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "TerminateVirtualBorderRouter", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.TerminateVirtualBorderRouterResponse>(await this.callApi(params, req, runtime), new $_model.TerminateVirtualBorderRouterResponse({})); } /** * TerminateVirtualBorderRouter * * @deprecated OpenAPI TerminateVirtualBorderRouter is deprecated, please use Vpc::2016-04-28::TerminateVirtualBorderRouter instead. * * @param request - TerminateVirtualBorderRouterRequest * @returns TerminateVirtualBorderRouterResponse */ // Deprecated async terminateVirtualBorderRouter(request: $_model.TerminateVirtualBorderRouterRequest): Promise<$_model.TerminateVirtualBorderRouterResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.terminateVirtualBorderRouterWithOptions(request, runtime); } /** * Unassigns one or more IPv6 addresses from an elastic network interface (ENI). * * @remarks * ## [](#)Usage notes * Take note of the following items: * * The ENI must be in the **Available** (Available) or **InUse** (InUse) state. * * If the ENI is a primary ENI, the Elastic Compute Service (ECS) instance to which the ENI is attached must be in the **Running** (Running) or **Stopped** (Stopped) state. * * @param request - UnassignIpv6AddressesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns UnassignIpv6AddressesResponse */ async unassignIpv6AddressesWithOptions(request: $_model.UnassignIpv6AddressesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.UnassignIpv6AddressesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ipv6Address)) { query["Ipv6Address"] = request.ipv6Address; } if (!$dara.isNull(request.ipv6Prefix)) { query["Ipv6Prefix"] = request.ipv6Prefix; } if (!$dara.isNull(request.networkInterfaceId)) { query["NetworkInterfaceId"] = request.networkInterfaceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "UnassignIpv6Addresses", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.UnassignIpv6AddressesResponse>(await this.callApi(params, req, runtime), new $_model.UnassignIpv6AddressesResponse({})); } /** * Unassigns one or more IPv6 addresses from an elastic network interface (ENI). * * @remarks * ## [](#)Usage notes * Take note of the following items: * * The ENI must be in the **Available** (Available) or **InUse** (InUse) state. * * If the ENI is a primary ENI, the Elastic Compute Service (ECS) instance to which the ENI is attached must be in the **Running** (Running) or **Stopped** (Stopped) state. * * @param request - UnassignIpv6AddressesRequest * @returns UnassignIpv6AddressesResponse */ async unassignIpv6Addresses(request: $_model.UnassignIpv6AddressesRequest): Promise<$_model.UnassignIpv6AddressesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.unassignIpv6AddressesWithOptions(request, runtime); } /** * Unassigns secondary private IP addresses from an elastic network interface (ENI). * * @remarks * ## [](#)Usage notes * * The ENI from which to unassign secondary private IP addresses must be in the **Available** (Available) or **InUse** (InUse) state. * * If the ENI is a primary ENI, the Elastic Compute Service (ECS) instance to which the ENI is attached must be in the **Running** (Running) or **Stopped** (Stopped) state. * * @param request - UnassignPrivateIpAddressesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns UnassignPrivateIpAddressesResponse */ async unassignPrivateIpAddressesWithOptions(request: $_model.UnassignPrivateIpAddressesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.UnassignPrivateIpAddressesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.ipv4Prefix)) { query["Ipv4Prefix"] = request.ipv4Prefix; } if (!$dara.isNull(request.networkInterfaceId)) { query["NetworkInterfaceId"] = request.networkInterfaceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.privateIpAddress)) { query["PrivateIpAddress"] = request.privateIpAddress; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "UnassignPrivateIpAddresses", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.UnassignPrivateIpAddressesResponse>(await this.callApi(params, req, runtime), new $_model.UnassignPrivateIpAddressesResponse({})); } /** * Unassigns secondary private IP addresses from an elastic network interface (ENI). * * @remarks * ## [](#)Usage notes * * The ENI from which to unassign secondary private IP addresses must be in the **Available** (Available) or **InUse** (InUse) state. * * If the ENI is a primary ENI, the Elastic Compute Service (ECS) instance to which the ENI is attached must be in the **Running** (Running) or **Stopped** (Stopped) state. * * @param request - UnassignPrivateIpAddressesRequest * @returns UnassignPrivateIpAddressesResponse */ async unassignPrivateIpAddresses(request: $_model.UnassignPrivateIpAddressesRequest): Promise<$_model.UnassignPrivateIpAddressesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.unassignPrivateIpAddressesWithOptions(request, runtime); } /** * UnassociateEipAddress * * @deprecated OpenAPI UnassociateEipAddress is deprecated, please use Vpc::2016-04-28::UnassociateEipAddress instead. * * @param request - UnassociateEipAddressRequest * @param runtime - runtime options for this request RuntimeOptions * @returns UnassociateEipAddressResponse */ async unassociateEipAddressWithOptions(request: $_model.UnassociateEipAddressRequest, runtime: $dara.RuntimeOptions): Promise<$_model.UnassociateEipAddressResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.allocationId)) { query["AllocationId"] = request.allocationId; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.instanceType)) { query["InstanceType"] = request.instanceType; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "UnassociateEipAddress", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.UnassociateEipAddressResponse>(await this.callApi(params, req, runtime), new $_model.UnassociateEipAddressResponse({})); } /** * UnassociateEipAddress * * @deprecated OpenAPI UnassociateEipAddress is deprecated, please use Vpc::2016-04-28::UnassociateEipAddress instead. * * @param request - UnassociateEipAddressRequest * @returns UnassociateEipAddressResponse */ // Deprecated async unassociateEipAddress(request: $_model.UnassociateEipAddressRequest): Promise<$_model.UnassociateEipAddressResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.unassociateEipAddressWithOptions(request, runtime); } /** * UnassociateHaVip * * @deprecated OpenAPI UnassociateHaVip is deprecated, please use Vpc::2016-04-28::UnassociateHaVip instead. * * @param request - UnassociateHaVipRequest * @param runtime - runtime options for this request RuntimeOptions * @returns UnassociateHaVipResponse */ async unassociateHaVipWithOptions(request: $_model.UnassociateHaVipRequest, runtime: $dara.RuntimeOptions): Promise<$_model.UnassociateHaVipResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.force)) { query["Force"] = request.force; } if (!$dara.isNull(request.haVipId)) { query["HaVipId"] = request.haVipId; } if (!$dara.isNull(request.instanceId)) { query["InstanceId"] = request.instanceId; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "UnassociateHaVip", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.UnassociateHaVipResponse>(await this.callApi(params, req, runtime), new $_model.UnassociateHaVipResponse({})); } /** * UnassociateHaVip * * @deprecated OpenAPI UnassociateHaVip is deprecated, please use Vpc::2016-04-28::UnassociateHaVip instead. * * @param request - UnassociateHaVipRequest * @returns UnassociateHaVipResponse */ // Deprecated async unassociateHaVip(request: $_model.UnassociateHaVipRequest): Promise<$_model.UnassociateHaVipResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.unassociateHaVipWithOptions(request, runtime); } /** * Unlock snapshots that are locked in compliance mode but are still in a cooling-off period. If the snapshot is locked in compliance mode and the cooling-off period has ended, it cannot be unlocked. * * @param request - UnlockSnapshotRequest * @param runtime - runtime options for this request RuntimeOptions * @returns UnlockSnapshotResponse */ async unlockSnapshotWithOptions(request: $_model.UnlockSnapshotRequest, runtime: $dara.RuntimeOptions): Promise<$_model.UnlockSnapshotResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.clientToken)) { query["ClientToken"] = request.clientToken; } if (!$dara.isNull(request.dryRun)) { query["DryRun"] = request.dryRun; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.snapshotId)) { query["SnapshotId"] = request.snapshotId; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "UnlockSnapshot", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.UnlockSnapshotResponse>(await this.callApi(params, req, runtime), new $_model.UnlockSnapshotResponse({})); } /** * Unlock snapshots that are locked in compliance mode but are still in a cooling-off period. If the snapshot is locked in compliance mode and the cooling-off period has ended, it cannot be unlocked. * * @param request - UnlockSnapshotRequest * @returns UnlockSnapshotResponse */ async unlockSnapshot(request: $_model.UnlockSnapshotRequest): Promise<$_model.UnlockSnapshotResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.unlockSnapshotWithOptions(request, runtime); } /** * Removes tags from Elastic Compute Service (ECS) resources. After a tag is removed from a resource, the tag is automatically deleted if it is not added to other resources. * * @param request - UntagResourcesRequest * @param runtime - runtime options for this request RuntimeOptions * @returns UntagResourcesResponse */ async untagResourcesWithOptions(request: $_model.UntagResourcesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.UntagResourcesResponse> { request.validate(); let query = { }; if (!$dara.isNull(request.all)) { query["All"] = request.all; } if (!$dara.isNull(request.ownerAccount)) { query["OwnerAccount"] = request.ownerAccount; } if (!$dara.isNull(request.ownerId)) { query["OwnerId"] = request.ownerId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.regionId)) { query["RegionId"] = request.regionId; } if (!$dara.isNull(request.resourceId)) { query["ResourceId"] = request.resourceId; } if (!$dara.isNull(request.resourceOwnerAccount)) { query["ResourceOwnerAccount"] = request.resourceOwnerAccount; } if (!$dara.isNull(request.resourceOwnerId)) { query["ResourceOwnerId"] = request.resourceOwnerId; } if (!$dara.isNull(request.resourceType)) { query["ResourceType"] = request.resourceType; } if (!$dara.isNull(request.tagKey)) { query["TagKey"] = request.tagKey; } let req = new $OpenApiUtil.OpenApiRequest({ query: OpenApiUtil.query(query), }); let params = new $OpenApiUtil.Params({ action: "UntagResources", version: "2014-05-26", protocol: "HTTPS", pathname: "/", method: "POST", authType: "AK", style: "RPC", reqBodyType: "formData", bodyType: "json", }); return $dara.cast<$_model.UntagResourcesResponse>(await this.callApi(params, req, runtime), new $_model.UntagResourcesResponse({})); } /** * Removes tags from Elastic Compute Service (ECS) resources. After a tag is removed from a resource, the tag is automatically deleted if it is not added to other resources. * * @param request - UntagResourcesRequest * @returns UntagResourcesResponse */ async untagResources(request: $_model.UntagResourcesRequest): Promise<$_model.UntagResourcesResponse> { let runtime = new $dara.RuntimeOptions({ }); return await this.untagResourcesWithOptions(request, runtime); } }