quotas-20200510/main.tea (2,709 lines of code) (raw):
/**
*
*/
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;
extends OpenApi;
init(config: OpenApi.Config){
super(config);
@endpointRule = 'central';
checkConfig(config);
@endpoint = getEndpoint('quotas', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}
function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
if (!Util.empty(endpoint)) {
return endpoint;
}
if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
return endpointMap[regionId];
}
return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}
model CreateQuotaAlarmRequest {
alarmName?: string(name='AlarmName', description='This parameter is required.'),
productCode?: string(name='ProductCode', description='This parameter is required.', example='config'),
quotaActionCode?: string(name='QuotaActionCode', description='This parameter is required.', example='q_hvnoqv'),
quotaDimensions?: [
{
key?: string(name='Key', example='regionId'),
value?: string(name='Value', example='cn-hangzhou'),
}
](name='QuotaDimensions'),
threshold?: float(name='Threshold', example='150'),
thresholdPercent?: float(name='ThresholdPercent', example='50'),
thresholdType?: string(name='ThresholdType', example='used'),
webHook?: string(name='WebHook', example='https://alert.aliyun.com/callback'),
}
model CreateQuotaAlarmResponseBody = {
alarmId?: string(name='AlarmId', example='18b3be23-b7b0-4d45-91bc-d0c331aa****'),
requestId?: string(name='RequestId', example='BD219E2B-E687-45EE-B5F3-61FB730551B1'),
}
model CreateQuotaAlarmResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: CreateQuotaAlarmResponseBody(name='body'),
}
/**
* @summary The value of the quota dimension.
* The value range of N varies based on the number of dimensions that are supported by the related Alibaba Cloud service.
* > This parameter is required if you set the ProductCode parameter to ecs, ecs-spec, actiontrail, or ess.
*
* @description The ID of the alert.
*
* @param request CreateQuotaAlarmRequest
* @param runtime runtime options for this request RuntimeOptions
* @return CreateQuotaAlarmResponse
*/
async function createQuotaAlarmWithOptions(request: CreateQuotaAlarmRequest, runtime: Util.RuntimeOptions): CreateQuotaAlarmResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.alarmName)) {
body['AlarmName'] = request.alarmName;
}
if (!Util.isUnset(request.productCode)) {
body['ProductCode'] = request.productCode;
}
if (!Util.isUnset(request.quotaActionCode)) {
body['QuotaActionCode'] = request.quotaActionCode;
}
if (!Util.isUnset(request.quotaDimensions)) {
body['QuotaDimensions'] = request.quotaDimensions;
}
if (!Util.isUnset(request.threshold)) {
body['Threshold'] = request.threshold;
}
if (!Util.isUnset(request.thresholdPercent)) {
body['ThresholdPercent'] = request.thresholdPercent;
}
if (!Util.isUnset(request.thresholdType)) {
body['ThresholdType'] = request.thresholdType;
}
if (!Util.isUnset(request.webHook)) {
body['WebHook'] = request.webHook;
}
var req = new OpenApi.OpenApiRequest{
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'CreateQuotaAlarm',
version = '2020-05-10',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary The value of the quota dimension.
* The value range of N varies based on the number of dimensions that are supported by the related Alibaba Cloud service.
* > This parameter is required if you set the ProductCode parameter to ecs, ecs-spec, actiontrail, or ess.
*
* @description The ID of the alert.
*
* @param request CreateQuotaAlarmRequest
* @return CreateQuotaAlarmResponse
*/
async function createQuotaAlarm(request: CreateQuotaAlarmRequest): CreateQuotaAlarmResponse {
var runtime = new Util.RuntimeOptions{};
return createQuotaAlarmWithOptions(request, runtime);
}
model CreateQuotaApplicationRequest {
auditMode?: string(name='AuditMode', description='The mode in which you want the application to be reviewed. Valid values:
* Sync: The application is reviewed in a synchronous manner. Quota Center automatically reviews the application. The result is returned immediately after you submit the application. However, the chance of an approval for an application that is reviewed in Sync mode is lower than the chance of an approval for an application that is reviewed in Async mode. The validity period of the new quota value is 1 hour.
* Async: The application is reviewed in an asynchronous manner. An Alibaba Cloud support engineer reviews the application. The chance of an approval for an application that is reviewed in Async mode is higher than the chance of an approval for an application that is reviewed in Sync mode. The validity period of the new quota value is one month.
> This parameter is available only for ECS Quotas by Instance Type.', example='Sync'),
desireValue?: float(name='DesireValue', description='The requested value of the quota.
>
* You can specify the DesireValue parameter based on the values of the `TotalUsage` and `ApplicableRange` parameters that are returned by the [ListProductQuotas](https://help.aliyun.com/document_detail/440554.html) operation.
* Applications are reviewed by the technical support team of each Alibaba Cloud service. To increase the success rate of your application, you must specify a reasonable quota value and detailed reasons when you submit an application to increase the value of the quota.
This parameter is required.', example='804'),
dimensions?: [
{
key?: string(name='Key', description='The key of the dimension.
>
* The value range of N varies based on the number of dimensions that are supported by the related Alibaba Cloud service.
* This parameter is required if you set the `ProductCode` parameter to `ecs`, `ecs-spec`, `actiontrail`, or `ess`.', example='regionId'),
value?: string(name='Value', description='The value of the dimension.
>
* The value range of N varies based on the number of dimensions that are supported by the related Alibaba Cloud service.
* This parameter is required if you set the `ProductCode` parameter to `ecs`, `ecs-spec`, `actiontrail`, or `ess`.', example='cn-hangzhou'),
}
](name='Dimensions', description='The quota dimensions.'),
effectiveTime?: string(name='EffectiveTime', description='The end time of the validity period of the quota. Specify the value in UTC. This parameter is valid only if you set the QuotaCategory parameter to WhiteListLabel.
> If you do not specify an end time, the default end time is 99 years after the quota application is submitted.', example='2021-01-19T09:25:56Z'),
envLanguage?: string(name='EnvLanguage', description='The language of the quota alert notification. Valid values:
* zh (default value): Chinese
* en: English', example='zh'),
expireTime?: string(name='ExpireTime', description='The start time of the validity period of the quota. Specify the value in UTC. This parameter is valid only if you set the QuotaCategory parameter to WhiteListLabel.
> If you do not specify a start time, the default start time is the time when the quota application is submitted.', example='2021-01-20T09:25:56Z'),
noticeType?: int32(name='NoticeType', description='Specifies whether to send a notification about the application result. Valid values:
* 0 (default value): sends a notification about the application result.
* 3: A notification about the application result is sent.', example='0'),
productCode?: string(name='ProductCode', description='The abbreviation of the Alibaba Cloud service name.
> To query the abbreviation of an Alibaba Cloud service name, check the `ProductCode` parameter that is described in [ListProductQuotas](https://help.aliyun.com/document_detail/440554.html).
This parameter is required.', example='ecs'),
quotaActionCode?: string(name='QuotaActionCode', description='The quota ID.
> To query the quota ID of an Alibaba Cloud service, check the `QuotaActionCode` parameter that is described in [ListProductQuotas](https://help.aliyun.com/document_detail/440554.html).
This parameter is required.', example='q_security-groups'),
quotaCategory?: string(name='QuotaCategory', description='The type of the quota.
* CommonQuota (default value): general quota
* FlowControl: API rate limit
* WhiteListLabel: whitelist quota', example='CommonQuota'),
reason?: string(name='Reason', description='The reason for the application.
> Applications are reviewed by the technical support team of each Alibaba Cloud service. To increase the success rate of your application, you must specify a reasonable quota value and detailed reasons when you submit an application to increase the value of the quota.
This parameter is required.', example='Scale Out'),
}
model CreateQuotaApplicationResponseBody = {
applicationId?: string(name='ApplicationId', description='The ID of the application.', example='d314d6ae-867d-484c-9009-3d421a80****'),
applyTime?: string(name='ApplyTime', description='The time when the application was submitted.', example='2021-01-19T09:25:56Z'),
approveValue?: float(name='ApproveValue', description='The quota value that is approved.', example='804'),
auditReason?: string(name='AuditReason', description='The result of the application.', example='Agree'),
desireValue?: int32(name='DesireValue', description='The requested value of the quota.', example='12'),
dimension?: map[string]any(name='Dimension', description='The quota dimension.', example='{"regionId":"cn-hangzhou"}'),
effectiveTime?: string(name='EffectiveTime', description='The time when the new quota value takes effect.', example='2021-01-19T09:25:56Z'),
expireTime?: string(name='ExpireTime', description='The time when the new quota expires.', example='2021-01-20T09:25:56Z'),
noticeType?: long(name='NoticeType', description='Indicates whether Quota Center sends a notification about the application result. Valid values:
* 0: Quota Center does not send a notification.
* 3: Quota Center sends a notification.', example='3'),
productCode?: string(name='ProductCode', description='The abbreviation of the Alibaba Cloud service name.', example='ecs-spec'),
quotaActionCode?: string(name='QuotaActionCode', description='The quota ID.', example='ecs.c5.large'),
quotaArn?: string(name='QuotaArn', description='The Alibaba Cloud Resource Name (ARN) of the quota.', example='acs:quotas:cn-hangzhou:*:quota/ecs/ecs.m2.medium/prepaid/classic/instancetype/cn-hangzhou-b'),
quotaDescription?: string(name='QuotaDescription', description='The description of the quota.', example='ecs.c5.large'),
quotaName?: string(name='QuotaName', description='The name of the quota.', example='ecs.c5.large'),
quotaUnit?: string(name='QuotaUnit', description='The unit of the quota.', example='AMOUNT'),
reason?: string(name='Reason', description='The reason for the application.', example='Scale Out'),
requestId?: string(name='RequestId', description='The ID of the request.', example='D47B3A10-CDAC-5412-B2EE-EC9A3DBE9053'),
status?: string(name='Status', description='The status of the application. Valid values:
* Disagree: The application is rejected.
* Agree: The application is approved.
* Process: The application is being reviewed.
* Cancel: The application is canceled.', example='Process'),
}
model CreateQuotaApplicationResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: CreateQuotaApplicationResponseBody(name='body'),
}
/**
* @summary Submits an application to increase a quota.
*
* @description In this example, the operation is called to submit an application to increase the value of a quota whose ID is `q_security-groups` and whose name is Maximum Number of Security Groups. The quota belongs to Elastic Compute Service (ECS). The expected value of the quota is `804`, the application reason is `Scale Out`, and the ID of the region to which the quota belongs is `cn-hangzhou`.
*
* @param request CreateQuotaApplicationRequest
* @param runtime runtime options for this request RuntimeOptions
* @return CreateQuotaApplicationResponse
*/
async function createQuotaApplicationWithOptions(request: CreateQuotaApplicationRequest, runtime: Util.RuntimeOptions): CreateQuotaApplicationResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.auditMode)) {
body['AuditMode'] = request.auditMode;
}
if (!Util.isUnset(request.desireValue)) {
body['DesireValue'] = request.desireValue;
}
if (!Util.isUnset(request.dimensions)) {
body['Dimensions'] = request.dimensions;
}
if (!Util.isUnset(request.effectiveTime)) {
body['EffectiveTime'] = request.effectiveTime;
}
if (!Util.isUnset(request.envLanguage)) {
body['EnvLanguage'] = request.envLanguage;
}
if (!Util.isUnset(request.expireTime)) {
body['ExpireTime'] = request.expireTime;
}
if (!Util.isUnset(request.noticeType)) {
body['NoticeType'] = request.noticeType;
}
if (!Util.isUnset(request.productCode)) {
body['ProductCode'] = request.productCode;
}
if (!Util.isUnset(request.quotaActionCode)) {
body['QuotaActionCode'] = request.quotaActionCode;
}
if (!Util.isUnset(request.quotaCategory)) {
body['QuotaCategory'] = request.quotaCategory;
}
if (!Util.isUnset(request.reason)) {
body['Reason'] = request.reason;
}
var req = new OpenApi.OpenApiRequest{
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'CreateQuotaApplication',
version = '2020-05-10',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Submits an application to increase a quota.
*
* @description In this example, the operation is called to submit an application to increase the value of a quota whose ID is `q_security-groups` and whose name is Maximum Number of Security Groups. The quota belongs to Elastic Compute Service (ECS). The expected value of the quota is `804`, the application reason is `Scale Out`, and the ID of the region to which the quota belongs is `cn-hangzhou`.
*
* @param request CreateQuotaApplicationRequest
* @return CreateQuotaApplicationResponse
*/
async function createQuotaApplication(request: CreateQuotaApplicationRequest): CreateQuotaApplicationResponse {
var runtime = new Util.RuntimeOptions{};
return createQuotaApplicationWithOptions(request, runtime);
}
model CreateQuotaApplicationsForTemplateRequest {
aliyunUids?: [ string ](name='AliyunUids', description='The Alibaba Cloud accounts that correspond to the resource directory members for which the quotas are applied.
> You can submit a quota increase application for a maximum of 50 members at a time. For more information about the members of a resource directory, see [ListAccounts](https://help.aliyun.com/document_detail/604207.html).
This parameter is required.'),
desireValue?: double(name='DesireValue', description='The requested value of the quota.
>
* You can specify DesireValue based on the values of `TotalUsage` and `ApplicableRange` in the response to the [ListProductQuotas](https://help.aliyun.com/document_detail/440554.html) operation.
* Applications are reviewed by the technical support team of each Alibaba Cloud service. To increase the success rate of your application, specify a reasonable quota value and a detailed reason.
This parameter is required.', example='12'),
dimensions?: [
{
key?: string(name='Key', description='The key of the dimension.
>
* The value range of N varies based on the number of dimensions that are supported by the related Alibaba Cloud service.
* This parameter is required if you set the `ProductCode` parameter to `ecs`, `ecs-spec`, `actiontrail`, or `ess`.', example='regionId'),
value?: string(name='Value', description='The value of the dimension.
>
* The value range of N varies based on the number of dimensions that are supported by the related Alibaba Cloud service.
* This parameter is required if you set the `ProductCode` parameter to `ecs`, `ecs-spec`, `actiontrail`, or `ess`.', example='cn-hangzhou'),
}
](name='Dimensions', description='The quota dimensions.'),
effectiveTime?: string(name='EffectiveTime', description='The start time of the validity period of the quota. Specify the value in UTC. This parameter is valid only if you set the QuotaCategory parameter to WhiteListLabel.
> If you do not specify a start time, the value is the time when the quota application is submitted.', example='2021-01-19T09:25:56Z'),
envLanguage?: string(name='EnvLanguage', description='The language of the notification about the application result. Valid values:
* zh (default): Chinese
* en: English', example='zh'),
expireTime?: string(name='ExpireTime', description='The end time of the validity period of the quota. Specify the value in UTC. This parameter is valid only if you set the QuotaCategory parameter to WhiteListLabel.
> If you do not specify an end time, the value is 99 years after the start time of the validity period.', example='2021-01-20T09:25:56Z'),
noticeType?: int32(name='NoticeType', description='Specifies whether to send a notification about the application result. Valid values:
* 0 (default): no
* 3: yes', example='0'),
productCode?: string(name='ProductCode', description='The abbreviation of the Alibaba Cloud service name.
> To query the abbreviation of an Alibaba Cloud service name, call the [ListProducts](https://help.aliyun.com/document_detail/440555.html) operation and check the value of `ProductCode` in the response.
This parameter is required.', example='ecs-spec'),
quotaActionCode?: string(name='QuotaActionCode', description='The quota ID.
> To query the quota ID of an Alibaba Cloud service, call the [ListProductQuotas](https://help.aliyun.com/document_detail/440554.html) and check the value of `QuotaActionCode` in the response.
This parameter is required.', example='ecs.g5.2xlarge'),
quotaCategory?: string(name='QuotaCategory', description='The quota type. Valid values:
* CommonQuota: general quota
* FlowControl: API rate limit
* WhiteListLabel: privilege
This parameter is required.', example='CommonQuota'),
reason?: string(name='Reason', description='The reason for the quota application.
> Applications are reviewed by the technical support team of each Alibaba Cloud service. To increase the success rate of your application, you must specify a reasonable quota value and detailed reasons when you submit the application.
This parameter is required.', example='Scale Out'),
}
model CreateQuotaApplicationsForTemplateResponseBody = {
aliyunUids?: [ string ](name='AliyunUids', description='The Alibaba Cloud accounts for which the quotas are applied.'),
batchQuotaApplicationId?: string(name='BatchQuotaApplicationId', description='The ID of the quota application batch.', example='d314d6ae-867d-484c-9009-3d421a80****'),
failResults?: [
{
aliyunUid?: string(name='AliyunUid', description='The Alibaba Cloud account of the members in a resource directory whose quota increase request is rejected.', example='135048337611****'),
reason?: string(name='Reason', description='The reason for the rejection.', example='The quota adjustment application is being processed. Please try again later.'),
}
](name='FailResults', description='The Alibaba Cloud accounts of the members in a resource directory whose quota increase request is rejected, and the reason for the rejection.'),
requestId?: string(name='RequestId', description='The request ID.', example='8FF8CAF0-29D9-4F11-B6A4-FD2CBCA016D3'),
}
model CreateQuotaApplicationsForTemplateResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: CreateQuotaApplicationsForTemplateResponseBody(name='body'),
}
/**
* @summary Submits a quota increase application. After you add a quota item to a quota template, the system automatically submits quota applications only for new members in the resource directory. The quota values for existing members remain unchanged. If you want to increase the quota values of existing members, you can submit a quota application for the members by applying quota templates to the members.
*
* @description ### [](#)QPS limit
* You can add a maximum of 10 quota items to a quota template at a time.
*
* @param request CreateQuotaApplicationsForTemplateRequest
* @param runtime runtime options for this request RuntimeOptions
* @return CreateQuotaApplicationsForTemplateResponse
*/
async function createQuotaApplicationsForTemplateWithOptions(request: CreateQuotaApplicationsForTemplateRequest, runtime: Util.RuntimeOptions): CreateQuotaApplicationsForTemplateResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.aliyunUids)) {
body['AliyunUids'] = request.aliyunUids;
}
if (!Util.isUnset(request.desireValue)) {
body['DesireValue'] = request.desireValue;
}
if (!Util.isUnset(request.dimensions)) {
body['Dimensions'] = request.dimensions;
}
if (!Util.isUnset(request.effectiveTime)) {
body['EffectiveTime'] = request.effectiveTime;
}
if (!Util.isUnset(request.envLanguage)) {
body['EnvLanguage'] = request.envLanguage;
}
if (!Util.isUnset(request.expireTime)) {
body['ExpireTime'] = request.expireTime;
}
if (!Util.isUnset(request.noticeType)) {
body['NoticeType'] = request.noticeType;
}
if (!Util.isUnset(request.productCode)) {
body['ProductCode'] = request.productCode;
}
if (!Util.isUnset(request.quotaActionCode)) {
body['QuotaActionCode'] = request.quotaActionCode;
}
if (!Util.isUnset(request.quotaCategory)) {
body['QuotaCategory'] = request.quotaCategory;
}
if (!Util.isUnset(request.reason)) {
body['Reason'] = request.reason;
}
var req = new OpenApi.OpenApiRequest{
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'CreateQuotaApplicationsForTemplate',
version = '2020-05-10',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Submits a quota increase application. After you add a quota item to a quota template, the system automatically submits quota applications only for new members in the resource directory. The quota values for existing members remain unchanged. If you want to increase the quota values of existing members, you can submit a quota application for the members by applying quota templates to the members.
*
* @description ### [](#)QPS limit
* You can add a maximum of 10 quota items to a quota template at a time.
*
* @param request CreateQuotaApplicationsForTemplateRequest
* @return CreateQuotaApplicationsForTemplateResponse
*/
async function createQuotaApplicationsForTemplate(request: CreateQuotaApplicationsForTemplateRequest): CreateQuotaApplicationsForTemplateResponse {
var runtime = new Util.RuntimeOptions{};
return createQuotaApplicationsForTemplateWithOptions(request, runtime);
}
model CreateTemplateQuotaItemRequest {
desireValue?: float(name='DesireValue', description='The requested value of the quota.
>
* You can specify DesireValue based on the values of `TotalUsage` and `ApplicableRange` in the response to the [ListProductQuotas](https://help.aliyun.com/document_detail/440554.html) operation.
* Applications are reviewed by the technical support team for each cloud service. To increase the success rate of your application, specify a reasonable quota value and a detailed reason.
This parameter is required.', example='804'),
dimensions?: [
{
key?: string(name='Key', description='The key of the dimension.
>
* The value range of N varies based on the number of dimensions that are supported by the related Alibaba Cloud service.
* This parameter is required if you set the `ProductCode` parameter to `ecs`, `ecs-spec`, `actiontrail`, or `ess`.', example='regionId'),
value?: string(name='Value', description='The value of the dimension.
>
* The value range of N varies based on the number of dimensions that are supported by the related Alibaba Cloud service.
* This parameter is required if you set the `ProductCode` parameter to `ecs`, `ecs-spec`, `actiontrail`, or `ess`.', example='cn-hangzhou'),
}
](name='Dimensions', description='The quota dimensions.'),
effectiveTime?: string(name='EffectiveTime', description='The start time of the validity period of the quota. Specify the value in UTC. This parameter is valid only if you set the QuotaCategory parameter to WhiteListLabel.
> If you leave this parameter empty, the quota takes effect immediately.', example='2021-01-19T09:25:56Z'),
envLanguage?: string(name='EnvLanguage', description='The language of the quota alert notification. Valid values:
* zh (default value): Chinese
* en: English', example='zh'),
expireTime?: string(name='ExpireTime', description='The end time of the validity period of the quota. Specify the value in UTC. This parameter is valid only if you set the QuotaCategory parameter to WhiteListLabel.
> If you leave this parameter empty, no end time is specified.', example='2021-01-20T09:25:56Z'),
noticeType?: long(name='NoticeType', description='Specifies whether to send a notification about the application result. Valid values:
* 0 (default value): no
* 3: yes', example='0'),
productCode?: string(name='ProductCode', description='The abbreviation of the Alibaba Cloud service name.
> To query the abbreviation of an Alibaba Cloud service name, call the [ListProducts](https://help.aliyun.com/document_detail/440555.html) operation and check the value of `ProductCode` in the response.
This parameter is required.', example='ecs'),
quotaActionCode?: string(name='QuotaActionCode', description='The quota ID.
> To obtain the quota ID of an Alibaba Cloud service, call the [ListProductQuotas](https://help.aliyun.com/document_detail/440554.html) operation and check the value of `QuotaActionCode` in the response.
This parameter is required.', example='q_security-groups'),
quotaCategory?: string(name='QuotaCategory', description='The quota type. Valid values:
* CommonQuota: general quota
* WhiteListLabel: privilege
* FlowControl: API rate limit', example='CommonQuota'),
}
model CreateTemplateQuotaItemResponseBody = {
id?: string(name='Id', description='The ID of the quota template.', example='1****'),
requestId?: string(name='RequestId', description='The ID of the request.', example='D47B3A10-CDAC-5412-B2EE-EC9A3DBE9053'),
}
model CreateTemplateQuotaItemResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: CreateTemplateQuotaItemResponseBody(name='body'),
}
/**
* @summary Creates a quota template by using the management account of a resource directory. After you create a quota template, if a member is added to the resource directory, the quota template automatically submits a quota increase request for the member. The quota values for existing members remain unchanged. You can use a quota template to apply for increases on multiple quotas at the same time. This automated approach improves the efficiency of quota management across your organization.
*
* @description ### [](#)Prerequisites
* You must set the `ServiceStatus` parameter to `1`. This ensures that the quota template is enabled.
* You can call the [GetQuotaTemplateServiceStatus](https://help.aliyun.com/document_detail/450407.html) operation to query the status of a quota template. If the `ServiceStatus` parameter is set to `0` or `-1`, you must call the [ModifyQuotaTemplateServiceStatus](https://help.aliyun.com/document_detail/450406.html) operation to set the ServiceStatus parameter to `1`.
*
* @param request CreateTemplateQuotaItemRequest
* @param runtime runtime options for this request RuntimeOptions
* @return CreateTemplateQuotaItemResponse
*/
async function createTemplateQuotaItemWithOptions(request: CreateTemplateQuotaItemRequest, runtime: Util.RuntimeOptions): CreateTemplateQuotaItemResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.desireValue)) {
body['DesireValue'] = request.desireValue;
}
if (!Util.isUnset(request.dimensions)) {
body['Dimensions'] = request.dimensions;
}
if (!Util.isUnset(request.effectiveTime)) {
body['EffectiveTime'] = request.effectiveTime;
}
if (!Util.isUnset(request.envLanguage)) {
body['EnvLanguage'] = request.envLanguage;
}
if (!Util.isUnset(request.expireTime)) {
body['ExpireTime'] = request.expireTime;
}
if (!Util.isUnset(request.noticeType)) {
body['NoticeType'] = request.noticeType;
}
if (!Util.isUnset(request.productCode)) {
body['ProductCode'] = request.productCode;
}
if (!Util.isUnset(request.quotaActionCode)) {
body['QuotaActionCode'] = request.quotaActionCode;
}
if (!Util.isUnset(request.quotaCategory)) {
body['QuotaCategory'] = request.quotaCategory;
}
var req = new OpenApi.OpenApiRequest{
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'CreateTemplateQuotaItem',
version = '2020-05-10',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Creates a quota template by using the management account of a resource directory. After you create a quota template, if a member is added to the resource directory, the quota template automatically submits a quota increase request for the member. The quota values for existing members remain unchanged. You can use a quota template to apply for increases on multiple quotas at the same time. This automated approach improves the efficiency of quota management across your organization.
*
* @description ### [](#)Prerequisites
* You must set the `ServiceStatus` parameter to `1`. This ensures that the quota template is enabled.
* You can call the [GetQuotaTemplateServiceStatus](https://help.aliyun.com/document_detail/450407.html) operation to query the status of a quota template. If the `ServiceStatus` parameter is set to `0` or `-1`, you must call the [ModifyQuotaTemplateServiceStatus](https://help.aliyun.com/document_detail/450406.html) operation to set the ServiceStatus parameter to `1`.
*
* @param request CreateTemplateQuotaItemRequest
* @return CreateTemplateQuotaItemResponse
*/
async function createTemplateQuotaItem(request: CreateTemplateQuotaItemRequest): CreateTemplateQuotaItemResponse {
var runtime = new Util.RuntimeOptions{};
return createTemplateQuotaItemWithOptions(request, runtime);
}
model DeleteQuotaAlarmRequest {
alarmId?: string(name='AlarmId', description='The ID of the quota alert.
> You can call the [ListQuotaAlarms](https://help.aliyun.com/document_detail/440561.html) operation to obtain the ID of a quota alert.
This parameter is required.', example='6b512ab7-da3a-4142-b529-2b2a9294****'),
}
model DeleteQuotaAlarmResponseBody = {
requestId?: string(name='RequestId', description='The ID of the request.', example='A95C65B3-7CF4-469E-B1D5-1CA0628A6411'),
}
model DeleteQuotaAlarmResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DeleteQuotaAlarmResponseBody(name='body'),
}
/**
* @summary Deletes a quota alert.
*
* @description In this example, the operation is called to delete a quota alert whose ID is `6b512ab7-da3a-4142-b529-2b2a9294****`.
*
* @param request DeleteQuotaAlarmRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DeleteQuotaAlarmResponse
*/
async function deleteQuotaAlarmWithOptions(request: DeleteQuotaAlarmRequest, runtime: Util.RuntimeOptions): DeleteQuotaAlarmResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.alarmId)) {
body['AlarmId'] = request.alarmId;
}
var req = new OpenApi.OpenApiRequest{
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'DeleteQuotaAlarm',
version = '2020-05-10',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Deletes a quota alert.
*
* @description In this example, the operation is called to delete a quota alert whose ID is `6b512ab7-da3a-4142-b529-2b2a9294****`.
*
* @param request DeleteQuotaAlarmRequest
* @return DeleteQuotaAlarmResponse
*/
async function deleteQuotaAlarm(request: DeleteQuotaAlarmRequest): DeleteQuotaAlarmResponse {
var runtime = new Util.RuntimeOptions{};
return deleteQuotaAlarmWithOptions(request, runtime);
}
model DeleteTemplateQuotaItemRequest {
id?: string(name='Id', description='The ID of the quota template.
You can call the [ListQuotaApplicationTemplates](https://help.aliyun.com/document_detail/450403.html) operation to obtain the ID of a quota template.
This parameter is required.', example='1****'),
}
model DeleteTemplateQuotaItemResponseBody = {
id?: string(name='Id', description='The ID of the quota template.', example='1****'),
requestId?: string(name='RequestId', description='The ID of the request.', example='D47B3A10-CDAC-5412-B2EE-EC9A3DBE9053'),
}
model DeleteTemplateQuotaItemResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DeleteTemplateQuotaItemResponseBody(name='body'),
}
/**
* @summary Deletes a quota template by using the management account of a resource directory. After you delete a quota template, if a member is added to the resource directory, the quota template no longer automatically submits a quota increase request for the member.
*
* @param request DeleteTemplateQuotaItemRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DeleteTemplateQuotaItemResponse
*/
async function deleteTemplateQuotaItemWithOptions(request: DeleteTemplateQuotaItemRequest, runtime: Util.RuntimeOptions): DeleteTemplateQuotaItemResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.id)) {
body['Id'] = request.id;
}
var req = new OpenApi.OpenApiRequest{
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'DeleteTemplateQuotaItem',
version = '2020-05-10',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Deletes a quota template by using the management account of a resource directory. After you delete a quota template, if a member is added to the resource directory, the quota template no longer automatically submits a quota increase request for the member.
*
* @param request DeleteTemplateQuotaItemRequest
* @return DeleteTemplateQuotaItemResponse
*/
async function deleteTemplateQuotaItem(request: DeleteTemplateQuotaItemRequest): DeleteTemplateQuotaItemResponse {
var runtime = new Util.RuntimeOptions{};
return deleteTemplateQuotaItemWithOptions(request, runtime);
}
model GetProductQuotaRequest {
dimensions?: [
{
key?: string(name='Key', description='The key of the dimension.
>- The value range of N varies based on the number of dimensions that are supported by the related Alibaba Cloud service.
>- If you call the operation to query the details of a quota that belongs to a cloud service that supports dimensions, you must configure this parameter. You must configure the `Dimensions.N.Key` and `Dimensions.N.Value` parameters at the same time. The following cloud services support dimensions: ECS whose service code is ecs, Enterprise Distributed Application Service (EDAS) whose service code is edas, ECS Quotas by Instance Type whose service code is ecs-spec, and Auto Scaling (ESS) whose service code is ess.', example='regionId'),
value?: string(name='Value', description='The value of the dimension.
> - The value range of N varies based on the number of dimensions that are supported by the related Alibaba Cloud service.
> - If you call the operation to query the details of a quota that belongs to a cloud service that supports dimensions, you must configure this parameter. You must configure the `Dimensions.N.Key` and `Dimensions.N.Value` parameters at the same time. The following cloud services support dimensions: ECS whose service code is ecs, EDAS whose service code is edas, ECS Quotas by Instance Type whose service code is ecs-spec, and ESS whose service code is ess.', example='cn-hangzhou'),
}
](name='Dimensions', description='The quota dimensions.', example='{\\\\"regionId\\\\":\\\\"cn-beijing\\\\"}'),
productCode?: string(name='ProductCode', description='The abbreviation of the Alibaba Cloud service name.
> For more information, see [Alibaba Cloud services that support Quota Center](https://help.aliyun.com/document_detail/182368.html).
This parameter is required.', example='ecs'),
quotaActionCode?: string(name='QuotaActionCode', description='The ID of the quota.
This parameter is required.', example='q_security-groups'),
}
model GetProductQuotaResponseBody = {
quota?: {
adjustable?: boolean(name='Adjustable', description='Indicates whether the quota is adjustable. Valid values:
* true
* false', example='true'),
applicableRange?: [ float ](name='ApplicableRange', description='The range of the quota value.'),
applicableType?: string(name='ApplicableType', description='The type of the adjustable value. Valid values:
* continuous
* discontinuous', example='continuous'),
applyReasonTips?: string(name='ApplyReasonTips', description='The reason for submitting a quota increase request.', example='The business xxx is expected to grow by 50%.'),
consumable?: boolean(name='Consumable', description='Indicates whether the system shows the used value of the quota. Valid values:
* true
* false', example='true'),
dimensions?: map[string]any(name='Dimensions', description='The quota dimension. Format: `{"regionId":"Region"}`.', example='{"regionId":"cn-hangzhou"}'),
effectiveTime?: string(name='EffectiveTime', description='The start time of the validity period of the quota. Specify the value in UTC.', example='2022-09-28T06:06:00Z'),
expireTime?: string(name='ExpireTime', description='The end time of the validity period of the quota. Specify the value in UTC.', example='2022-09-29T06:06:00Z'),
globalQuota?: boolean(name='GlobalQuota', description='Indicates whether the quota is a global quota. Valid values:
* true: The quota is shared in all regions.
* false: The quota is independently used in a region.', example='true'),
period?: {
periodUnit?: string(name='PeriodUnit', description='The unit of the calculation cycle of the quota. Valid values:
* second
* minute
* hour
* day
* week', example='Day'),
periodValue?: int32(name='PeriodValue', description='The value of the calculation cycle of the quota.', example='1'),
}(name='Period', description='The calculation cycle of the quota.'),
productCode?: string(name='ProductCode', description='The abbreviation of the Alibaba Cloud service name.', example='ecs'),
quotaActionCode?: string(name='QuotaActionCode', description='The ID of the quota.', example='q_security-groups'),
quotaArn?: string(name='QuotaArn', description='The Alibaba Cloud Resource Name (ARN) of the quota.', example='acs:quotas:cn-hangzhou:120886317861****:quota/ecs/q_security-groups/'),
quotaCategory?: string(name='QuotaCategory', description='The type of the quota. Valid values:
* CommonQuota: general quota
* FlowControl: API rate limit
* WhiteListLabel: whitelist quota', example='CommonQuota'),
quotaDescription?: string(name='QuotaDescription', description='The description of the quota.', example='The maximum number of security groups that can be owned by the current account'),
quotaItems?: [
{
quota?: string(name='Quota', description='The value of the quota.', example='801'),
quotaUnit?: string(name='QuotaUnit', description='The unit of the quota.
> The unit of each quota is unique. For example, the quota whose ID is `q_cbdch3` represents the maximum number of ACK clusters. The unit of this quota is clusters. The quota whose ID is `q_security-groups` represents the maximum number of security groups. The unit of this quota is security groups.', example='Count'),
type?: string(name='Type', description='The category of the quota. Valid values:
* BaseQuota: base quota.
* ReservedQuota: reserved quota.', example='BaseQuota'),
usage?: string(name='Usage', description='The used quota.', example='26'),
}
](name='QuotaItems', description='The details of the quotas.'),
quotaName?: string(name='QuotaName', description='The name of the quota.', example='Maximum Number of Security Groups'),
quotaType?: string(name='QuotaType', description='The type of the quota. Valid values:
* privilege
* normal (default value)', example='normal'),
quotaUnit?: string(name='QuotaUnit', description='The unit of the new quota value.
> The unit of each quota is unique.** For example, the quota whose ID is `q_cbdch3` represents the maximum number of Container Service for Kubernetes (ACK) clusters. The unit of this quota is clusters. The quota whose ID is `q_security-groups` represents the maximum number of security groups. The unit of this quota is security groups.', example='Count'),
supportedRange?: [ float ](name='SupportedRange', description='The range of the quota value.'),
totalQuota?: float(name='TotalQuota', description='The value of the quota.', example='801'),
totalUsage?: float(name='TotalUsage', description='The used quota.', example='26'),
unadjustableDetail?: string(name='UnadjustableDetail', description='The reason why the quota is not adjustable. Valid values:
* nonactivated: The service is not activated.
* applicationProcess: The application is being processed.
* limitReached: The quota limit is reached.
* supportTicketRequired: The quota can be increased only by submitting a ticket.', example='limitReached'),
usageMetric?: {
metricDimensions?: map[string]string(name='MetricDimensions'),
metricName?: string(name='MetricName'),
metricNamespace?: string(name='MetricNamespace'),
}(name='UsageMetric'),
}(name='Quota', description='The details of the quota.'),
requestId?: string(name='RequestId', description='The ID of the request.', example='8FF8CAF0-29D9-4F11-B6A4-FD2CBCA016D3'),
}
model GetProductQuotaResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: GetProductQuotaResponseBody(name='body'),
}
/**
* @summary Queries the details of the specified quota.
*
* @description In this example, the operation is called to query the details of a quota whose ID is `q_security-groups` and whose name is Maximum Number of Security Groups. This quota belongs to Elastic Compute Service (ECS). The query result shows the details of the quota. The details include the name, ID, description, quota value, used quota, unit, and dimension of the quota. In this example, the quota name is `Maximum Number of Security Groups`. The quota ID is `q_security-groups`. The description is `The maximum number of security groups that can be created for the current account`. The quota value is `801`. The used quota is `26`. The quota unit is `Number of security groups`. The quota dimension is `{"regionId":"cn-hangzhou"}`.
*
* @param request GetProductQuotaRequest
* @param runtime runtime options for this request RuntimeOptions
* @return GetProductQuotaResponse
*/
async function getProductQuotaWithOptions(request: GetProductQuotaRequest, runtime: Util.RuntimeOptions): GetProductQuotaResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.dimensions)) {
body['Dimensions'] = request.dimensions;
}
if (!Util.isUnset(request.productCode)) {
body['ProductCode'] = request.productCode;
}
if (!Util.isUnset(request.quotaActionCode)) {
body['QuotaActionCode'] = request.quotaActionCode;
}
var req = new OpenApi.OpenApiRequest{
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'GetProductQuota',
version = '2020-05-10',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries the details of the specified quota.
*
* @description In this example, the operation is called to query the details of a quota whose ID is `q_security-groups` and whose name is Maximum Number of Security Groups. This quota belongs to Elastic Compute Service (ECS). The query result shows the details of the quota. The details include the name, ID, description, quota value, used quota, unit, and dimension of the quota. In this example, the quota name is `Maximum Number of Security Groups`. The quota ID is `q_security-groups`. The description is `The maximum number of security groups that can be created for the current account`. The quota value is `801`. The used quota is `26`. The quota unit is `Number of security groups`. The quota dimension is `{"regionId":"cn-hangzhou"}`.
*
* @param request GetProductQuotaRequest
* @return GetProductQuotaResponse
*/
async function getProductQuota(request: GetProductQuotaRequest): GetProductQuotaResponse {
var runtime = new Util.RuntimeOptions{};
return getProductQuotaWithOptions(request, runtime);
}
model GetProductQuotaDimensionRequest {
dependentDimensions?: [
{
key?: string(name='Key', description='The key of the quota dimension on which the quota dimension that you want to query is dependent.
> The value range of N varies based on the number of quota dimensions that are supported by the specified Alibaba Cloud service.', example='regionId'),
value?: string(name='Value', description='The value of the quota dimension on which the quota dimension that you want to query is dependent.
> The value range of N varies based on the number of quota dimensions that are supported by the specified Alibaba Cloud service.', example='cn-hangzhou'),
}
](name='DependentDimensions', description='The information about quota dimensions.'),
dimensionKey?: string(name='DimensionKey', description='The key of the quota dimension.', example='regionId'),
productCode?: string(name='ProductCode', description='The abbreviation of the Alibaba Cloud service name.
> For more information, see [Alibaba Cloud services that support Quota Center](https://help.aliyun.com/document_detail/182368.html).
This parameter is required.', example='ecs-spec'),
}
model GetProductQuotaDimensionResponseBody = {
quotaDimension?: {
dependentDimensions?: [ string ](name='DependentDimensions', description='The quota dimensions on which the quota dimension that you want to query is dependent.'),
dimensionKey?: string(name='DimensionKey', description='The key of the quota dimension. Valid values:
* regionId: the region ID.
* zoneId: the zone ID.
* chargeType: the billing method.
* networkType: the network type.', example='regionId'),
dimensionValueDetail?: [
{
name?: string(name='Name', description='The name of the quota dimension.', example='cn-hangzhou'),
value?: string(name='Value', description='The value of the quota dimension.', example='cn-hangzhou'),
}
](name='DimensionValueDetail', description='The details of the quota dimension value.'),
dimensionValues?: [ string ](name='DimensionValues', description='The values of the quota dimension.'),
name?: string(name='Name', description='The name of the quota dimension.', example='region'),
}(name='QuotaDimension', description='The details of the quota dimension.'),
requestId?: string(name='RequestId', description='The ID of the request.', example='1FA5F0E2-368E-4BA4-A8D0-6060FC6BB8F3'),
}
model GetProductQuotaDimensionResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: GetProductQuotaDimensionResponseBody(name='body'),
}
/**
* @summary Queries the details of a quota dimension that is supported by an Alibaba Cloud service.
*
* @description In this example, the operation is called to query the details of a quota dimension whose key is `regionId`. The quota dimension belongs to Elastic Compute Service (ECS) Quotas by Instance Type whose service code is ecs-spec. The following query results are returned:
* * The values of the quota dimension include `cn-shenzhen`, `cn-beijing`, and `cn-hangzhou`.
* * The name of the quota dimension is `region`.
*
* @param request GetProductQuotaDimensionRequest
* @param runtime runtime options for this request RuntimeOptions
* @return GetProductQuotaDimensionResponse
*/
async function getProductQuotaDimensionWithOptions(request: GetProductQuotaDimensionRequest, runtime: Util.RuntimeOptions): GetProductQuotaDimensionResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.dependentDimensions)) {
body['DependentDimensions'] = request.dependentDimensions;
}
if (!Util.isUnset(request.dimensionKey)) {
body['DimensionKey'] = request.dimensionKey;
}
if (!Util.isUnset(request.productCode)) {
body['ProductCode'] = request.productCode;
}
var req = new OpenApi.OpenApiRequest{
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'GetProductQuotaDimension',
version = '2020-05-10',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries the details of a quota dimension that is supported by an Alibaba Cloud service.
*
* @description In this example, the operation is called to query the details of a quota dimension whose key is `regionId`. The quota dimension belongs to Elastic Compute Service (ECS) Quotas by Instance Type whose service code is ecs-spec. The following query results are returned:
* * The values of the quota dimension include `cn-shenzhen`, `cn-beijing`, and `cn-hangzhou`.
* * The name of the quota dimension is `region`.
*
* @param request GetProductQuotaDimensionRequest
* @return GetProductQuotaDimensionResponse
*/
async function getProductQuotaDimension(request: GetProductQuotaDimensionRequest): GetProductQuotaDimensionResponse {
var runtime = new Util.RuntimeOptions{};
return getProductQuotaDimensionWithOptions(request, runtime);
}
model GetQuotaAlarmRequest {
alarmId?: string(name='AlarmId', description='The ID of the quota alert.
For more information about how to query the ID of a quota alert, see [ListQuotaAlarms](https://help.aliyun.com/document_detail/184348.html).', example='78d7e436-4b25-4897-84b5-d7b656bb****'),
}
model GetQuotaAlarmResponseBody = {
quotaAlarm?: {
alarmId?: string(name='AlarmId', description='The ID of the quota alert.', example='78d7e436-4b25-4897-84b5-d7b656bb****'),
alarmName?: string(name='AlarmName', description='The name of the quota alert.', example='tf-testacccn-hangzhouquotasquotaalarm81611'),
createTime?: string(name='CreateTime', description='The time when the quota alert was created.', example='2021-01-21T03:47:28Z'),
notifyChannels?: [ string ](name='NotifyChannels', description='The alert notification methods.'),
notifyTarget?: string(name='NotifyTarget', description='The alert contact.', example='accountContact'),
productCode?: string(name='ProductCode', description='The abbreviation of the cloud service name.', example='ecs'),
quotaActionCode?: string(name='QuotaActionCode', description='The ID of the quota.', example='q_security-groups'),
quotaDimension?: map[string]any(name='QuotaDimension', description='The quota dimension.', example='{"regionId":"cn-hangzhou"}'),
quotaUsage?: float(name='QuotaUsage', description='The used quota.', example='28'),
quotaValue?: float(name='QuotaValue', description='The quota value.', example='804'),
threshold?: float(name='Threshold', description='The numeric value of the alert threshold.', example='29'),
thresholdPercent?: float(name='ThresholdPercent', description='The percentage of the alert threshold.', example='50'),
thresholdType?: string(name='ThresholdType', description='The type of the quota alert. Valid values:
* used: The alert is created for the used quota.
* usable: The alert is created for the available quota.', example='used'),
webhook?: string(name='Webhook', description='The webhook URL. Quota Center sends alert notifications to the specified URL by using HTTP POST requests.', example='https://alert.aliyun.com/callback'),
}(name='QuotaAlarm', description='The details of the quota alert.'),
requestId?: string(name='RequestId', description='The ID of the request.', example='81B9D511-F3DD-43B1-9A81-1795DDB52ADF'),
}
model GetQuotaAlarmResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: GetQuotaAlarmResponseBody(name='body'),
}
/**
* @summary In this example, the operation is called to query the details of a quota alert. The details of the alert are returned. The query results include the alert ID, alert name, alert contact, and time when the quota alert was created.
*
* @description In this example, the operation is called to query the details of a quota alert whose ID is `78d7e436-4b25-4897-84b5-d7b656bb****`. The details of the alert are returned. The query result includes the alert ID, alert name, alert contact, and the time when the quota alert was created.
*
* @param request GetQuotaAlarmRequest
* @param runtime runtime options for this request RuntimeOptions
* @return GetQuotaAlarmResponse
*/
async function getQuotaAlarmWithOptions(request: GetQuotaAlarmRequest, runtime: Util.RuntimeOptions): GetQuotaAlarmResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.alarmId)) {
body['AlarmId'] = request.alarmId;
}
var req = new OpenApi.OpenApiRequest{
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'GetQuotaAlarm',
version = '2020-05-10',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary In this example, the operation is called to query the details of a quota alert. The details of the alert are returned. The query results include the alert ID, alert name, alert contact, and time when the quota alert was created.
*
* @description In this example, the operation is called to query the details of a quota alert whose ID is `78d7e436-4b25-4897-84b5-d7b656bb****`. The details of the alert are returned. The query result includes the alert ID, alert name, alert contact, and the time when the quota alert was created.
*
* @param request GetQuotaAlarmRequest
* @return GetQuotaAlarmResponse
*/
async function getQuotaAlarm(request: GetQuotaAlarmRequest): GetQuotaAlarmResponse {
var runtime = new Util.RuntimeOptions{};
return getQuotaAlarmWithOptions(request, runtime);
}
model GetQuotaApplicationRequest {
applicationId?: string(name='ApplicationId', description='The ID of the application.', example='d314d6ae-867d-484c-9009-3d421a80****'),
}
model GetQuotaApplicationResponseBody = {
quotaApplication?: {
applicationId?: string(name='ApplicationId', description='The ID of the application.', example='d314d6ae-867d-484c-9009-3d421a80****'),
applyTime?: string(name='ApplyTime', description='The time when the application was submitted.', example='2021-01-19T09:25:56Z'),
approveValue?: float(name='ApproveValue', description='The approved quota value.', example='10'),
auditReason?: string(name='AuditReason', description='The result of the application.', example='Agree'),
desireValue?: int32(name='DesireValue', description='The expected value of the quota.', example='804'),
dimension?: map[string]any(name='Dimension', description='The dimension.
Format: `{"regionId":"Region"}`.', example='["cn-shanghai","cn-hangzhou"]'),
effectiveTime?: string(name='EffectiveTime', description='The time when the new quota value takes effect.', example='2021-01-19 15:30:00'),
expireTime?: string(name='ExpireTime', description='The time when the new quota expires.', example='2023-06-29 15:30:00'),
noticeType?: long(name='NoticeType', description='The method of that is used to send alert notifications. Valid values:
* 0: Quota Center does not send a notification.
* 1: Quota Center sends an email notification.
* 2: Quota Center sends an SMS notification.', example='0'),
productCode?: string(name='ProductCode', description='The abbreviation of the Alibaba Cloud service name.', example='ecs'),
quotaActionCode?: string(name='QuotaActionCode', description='The ID of the quota.', example='q_security-groups'),
quotaArn?: string(name='QuotaArn', description='The Alibaba Cloud Resource Name (ARN) of the quota.', example='acs:quotas:cn-hangzhou:120886317861****:quota/ecs/q_security-groups/'),
quotaCategory?: string(name='QuotaCategory'),
quotaDescription?: string(name='QuotaDescription', description='The description of the quota.', example='The maximum number of security groups that can be owned by the current account'),
quotaName?: string(name='QuotaName', description='The name of the quota.', example='Maximum Number of Security Groups'),
quotaUnit?: string(name='QuotaUnit', description='The unit of the new quota value.', example='Count'),
reason?: string(name='Reason', description='The reason for the application.', example='Scale Out'),
status?: string(name='Status', description='The status of the application. Valid values:
* Disagree: The application is rejected.
* Agree: The application is approved.
* Process: The application is being reviewed.
* Cancel: The application is closed.', example='Agree'),
}(name='QuotaApplication', description='The details about the application.'),
requestId?: string(name='RequestId', description='The ID of the request.', example='7BBD1D37-094C-4485-8B7D-64682F82BC18'),
}
model GetQuotaApplicationResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: GetQuotaApplicationResponseBody(name='body'),
}
/**
* @summary Queries the details about a specified application that is submitted to increase a quota.
*
* @description In this example, the operation is called to query the details about an application whose ID is `d314d6ae-867d-484c-9009-3d421a80****`. The query result shows the details about the application. The details include the application ID, application time, expected quota value, and application result.
*
* @param request GetQuotaApplicationRequest
* @param runtime runtime options for this request RuntimeOptions
* @return GetQuotaApplicationResponse
*/
async function getQuotaApplicationWithOptions(request: GetQuotaApplicationRequest, runtime: Util.RuntimeOptions): GetQuotaApplicationResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.applicationId)) {
body['ApplicationId'] = request.applicationId;
}
var req = new OpenApi.OpenApiRequest{
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'GetQuotaApplication',
version = '2020-05-10',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries the details about a specified application that is submitted to increase a quota.
*
* @description In this example, the operation is called to query the details about an application whose ID is `d314d6ae-867d-484c-9009-3d421a80****`. The query result shows the details about the application. The details include the application ID, application time, expected quota value, and application result.
*
* @param request GetQuotaApplicationRequest
* @return GetQuotaApplicationResponse
*/
async function getQuotaApplication(request: GetQuotaApplicationRequest): GetQuotaApplicationResponse {
var runtime = new Util.RuntimeOptions{};
return getQuotaApplicationWithOptions(request, runtime);
}
model GetQuotaApplicationApprovalRequest {
applicationId?: string(name='ApplicationId', description='The quota application ID.
For more information about how to obtain the ID of a quota application, see [ListQuotaApplications](https://help.aliyun.com/document_detail/440568.html).', example='d314d6ae-867d-484c-9009-3d42****'),
}
model GetQuotaApplicationApprovalResponseBody = {
allowRetry?: boolean(name='AllowRetry', description='Indicates whether retries are allowed. Valid values:
* false
* true', example='false'),
dynamicCode?: string(name='DynamicCode', description='The dynamic error code.', example='PARAMETER.ILLEGALL'),
dynamicMessage?: string(name='DynamicMessage', description='The dynamic error message.', example='Parameter[%s] is required.'),
errorArgs?: [ any ](name='ErrorArgs', description='The parameters whose values are invalid.'),
errorCode?: string(name='ErrorCode', description='The error code.', example='RAM.PERMISSION.DENIED'),
errorMsg?: string(name='ErrorMsg', description='The error message.', example='You are not authorized to do this action or the API input parameter is invalid.'),
httpStatusCode?: int32(name='HttpStatusCode', description='The HTTP status code.', example='200'),
module?: {
approvalHours?: int32(name='ApprovalHours', description='The average amount of time required to approve quota applications. Unit: hour.', example='24'),
reminderIntervalHours?: int32(name='ReminderIntervalHours', description='The interval between two consecutive approval reminders. Unit: hour.', example='24'),
supportReminder?: boolean(name='SupportReminder', description='Indicates whether approval reminders are supported for quota applications. Valid values:
* false
* true', example='false'),
unsupportReminderReason?: string(name='UnsupportReminderReason', description='The reason why approval reminders are not supported for quota applications.', example='can only be remind once within the interval'),
}(name='Module', description='The information about quota application approval.'),
requestId?: string(name='RequestId', description='The request ID.', example='7ED584FB-ECBF-4A2A-969D-F54D25EFABF9'),
success?: boolean(name='Success', description='Indicates whether the request was successful. Valid values:
* true
* false', example='True'),
}
model GetQuotaApplicationApprovalResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: GetQuotaApplicationApprovalResponseBody(name='body'),
}
/**
* @summary Queries the information about quota application approval, such as the average amount of time required for approval, whether approval reminders are supported, and the interval between two consecutive approval reminders.
*
* @description ### [](#)Prerequisites
* Make sure that you have created an application for quota increase. For more information, see [CreateQuotaApplication](https://help.aliyun.com/document_detail/440566.html).
*
* @param request GetQuotaApplicationApprovalRequest
* @param runtime runtime options for this request RuntimeOptions
* @return GetQuotaApplicationApprovalResponse
*/
async function getQuotaApplicationApprovalWithOptions(request: GetQuotaApplicationApprovalRequest, runtime: Util.RuntimeOptions): GetQuotaApplicationApprovalResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.applicationId)) {
body['ApplicationId'] = request.applicationId;
}
var req = new OpenApi.OpenApiRequest{
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'GetQuotaApplicationApproval',
version = '2020-05-10',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries the information about quota application approval, such as the average amount of time required for approval, whether approval reminders are supported, and the interval between two consecutive approval reminders.
*
* @description ### [](#)Prerequisites
* Make sure that you have created an application for quota increase. For more information, see [CreateQuotaApplication](https://help.aliyun.com/document_detail/440566.html).
*
* @param request GetQuotaApplicationApprovalRequest
* @return GetQuotaApplicationApprovalResponse
*/
async function getQuotaApplicationApproval(request: GetQuotaApplicationApprovalRequest): GetQuotaApplicationApprovalResponse {
var runtime = new Util.RuntimeOptions{};
return getQuotaApplicationApprovalWithOptions(request, runtime);
}
model GetQuotaTemplateServiceStatusRequest {
resourceDirectoryId?: string(name='ResourceDirectoryId', description='The ID of the resource directory.', example='rd-pG****'),
}
model GetQuotaTemplateServiceStatusResponseBody = {
requestId?: string(name='RequestId', description='The ID of the request.', example='D47B3A10-CDAC-5412-B2EE-EC9A3DBE9053'),
templateServiceStatus?: {
resourceDirectoryId?: string(name='ResourceDirectoryId', description='The ID of the resource directory.', example='rd-pG****'),
serviceStatus?: int32(name='ServiceStatus', description='The state of the quota template. Valid values:
* \\\\-1: The quota template is disabled.
* 1: The quota template is enabled.', example='1'),
}(name='TemplateServiceStatus', description='The status of the quota template.'),
}
model GetQuotaTemplateServiceStatusResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: GetQuotaTemplateServiceStatusResponseBody(name='body'),
}
/**
* @summary Queries the status of a quota template.
*
* @param request GetQuotaTemplateServiceStatusRequest
* @param runtime runtime options for this request RuntimeOptions
* @return GetQuotaTemplateServiceStatusResponse
*/
async function getQuotaTemplateServiceStatusWithOptions(request: GetQuotaTemplateServiceStatusRequest, runtime: Util.RuntimeOptions): GetQuotaTemplateServiceStatusResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.resourceDirectoryId)) {
body['ResourceDirectoryId'] = request.resourceDirectoryId;
}
var req = new OpenApi.OpenApiRequest{
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'GetQuotaTemplateServiceStatus',
version = '2020-05-10',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries the status of a quota template.
*
* @param request GetQuotaTemplateServiceStatusRequest
* @return GetQuotaTemplateServiceStatusResponse
*/
async function getQuotaTemplateServiceStatus(request: GetQuotaTemplateServiceStatusRequest): GetQuotaTemplateServiceStatusResponse {
var runtime = new Util.RuntimeOptions{};
return getQuotaTemplateServiceStatusWithOptions(request, runtime);
}
model ListAlarmHistoriesRequest {
alarmId?: string(name='AlarmId', description='The ID of the alert.', example='18b3be23-b7b0-4d45-91bc-d0c331aa****'),
endTime?: long(name='EndTime', description='The end of the time range to query.', example='20201024'),
keyword?: string(name='Keyword', description='The keyword that is used for the query.', example='Quantity'),
maxResults?: int32(name='MaxResults', description='The maximum number of records that can be returned for the query.
Valid values: 1 to 200. Default value: 30.', example='30'),
nextToken?: string(name='NextToken', description='The token that marks the position from which you want to start the query. If you leave this parameter empty, the query starts from the beginning.', example='1'),
productCode?: string(name='ProductCode', description='The abbreviation of the Alibaba Cloud service name.
> For more information, see [Alibaba Cloud services that support Quota Center](https://help.aliyun.com/document_detail/182368.html).', example='ecs'),
startTime?: long(name='StartTime', description='The beginning of the time range to query.', example='20201020'),
}
model ListAlarmHistoriesResponseBody = {
alarmHistories?: [
{
alarmName?: string(name='AlarmName', description='The name of the quota alert.', example='security_groups'),
createTime?: string(name='CreateTime', description='The time when the quota alert rule was created.', example='2021-01-24T09:20:09Z'),
notifyChannels?: [ string ](name='NotifyChannels', description='The notification methods of the quota alert.'),
notifyTarget?: string(name='NotifyTarget', description='The quota alert contact.', example='accountContact'),
productCode?: string(name='ProductCode', description='The abbreviation of the Alibaba Cloud service name.', example='ecs'),
quotaActionCode?: string(name='QuotaActionCode', description='The quota ID.', example='q_security-groups'),
quotaUsage?: float(name='QuotaUsage', description='The used quota.', example='31'),
threshold?: float(name='Threshold', description='The threshold to trigger quota alerts.', example='29'),
thresholdPercent?: float(name='ThresholdPercent', description='The percentage of the quota alert threshold.', example='80'),
}
](name='AlarmHistories', description='The details of the quota alert records.'),
maxResults?: int32(name='MaxResults', description='The maximum number of records that are returned for the query.', example='4'),
nextToken?: string(name='NextToken', description='The token that marks the position at which the query ends. An empty value indicates that all data is returned.', example='1'),
requestId?: string(name='RequestId', description='The ID of the request.', example='CB38DDF9-B1E0-48C1-9966-19C443C2841E'),
totalCount?: int32(name='TotalCount', description='The total number of records that are returned for the query.', example='4'),
}
model ListAlarmHistoriesResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ListAlarmHistoriesResponseBody(name='body'),
}
/**
* @summary Queries the alert records.
*
* @param request ListAlarmHistoriesRequest
* @param runtime runtime options for this request RuntimeOptions
* @return ListAlarmHistoriesResponse
*/
async function listAlarmHistoriesWithOptions(request: ListAlarmHistoriesRequest, runtime: Util.RuntimeOptions): ListAlarmHistoriesResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.alarmId)) {
body['AlarmId'] = request.alarmId;
}
if (!Util.isUnset(request.endTime)) {
body['EndTime'] = request.endTime;
}
if (!Util.isUnset(request.keyword)) {
body['Keyword'] = request.keyword;
}
if (!Util.isUnset(request.maxResults)) {
body['MaxResults'] = request.maxResults;
}
if (!Util.isUnset(request.nextToken)) {
body['NextToken'] = request.nextToken;
}
if (!Util.isUnset(request.productCode)) {
body['ProductCode'] = request.productCode;
}
if (!Util.isUnset(request.startTime)) {
body['StartTime'] = request.startTime;
}
var req = new OpenApi.OpenApiRequest{
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'ListAlarmHistories',
version = '2020-05-10',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries the alert records.
*
* @param request ListAlarmHistoriesRequest
* @return ListAlarmHistoriesResponse
*/
async function listAlarmHistories(request: ListAlarmHistoriesRequest): ListAlarmHistoriesResponse {
var runtime = new Util.RuntimeOptions{};
return listAlarmHistoriesWithOptions(request, runtime);
}
model ListDependentQuotasRequest {
productCode?: string(name='ProductCode', description='The abbreviation of the Alibaba Cloud service name.
> For more information, see [Alibaba Cloud services that support Quota Center](https://help.aliyun.com/document_detail/182368.html).
This parameter is required.', example='csk'),
quotaActionCode?: string(name='QuotaActionCode', description='The quota ID.
This parameter is required.', example='q_i5uzm3'),
}
model ListDependentQuotasResponseBody = {
quotas?: [
{
dimensions?: [
{
dependentDimension?: [ string ](name='DependentDimension', description='The dimensions of the quotas on which the specified quota depends.'),
dimensionKey?: string(name='DimensionKey', description='The key of the quota dimension.', example='regionId'),
dimensionValues?: [ string ](name='DimensionValues', description='The dimension values.'),
}
](name='Dimensions', description='The dimensions of the quotas on which the specified quota depends.'),
productCode?: string(name='ProductCode', description='The abbreviation of the Alibaba Cloud service name.', example='ecs'),
quotaActionCode?: string(name='QuotaActionCode', description='The quota ID.', example='q_elastic-network-interfaces'),
scale?: float(name='Scale', description='The relationship percentage between the specified quota and the quotas on which the specified quota depends.', example='50'),
}
](name='Quotas', description='The quotas on which the specified quota depends.'),
requestId?: string(name='RequestId', description='The request ID.', example='920D8A47-26BB-49FA-A09F-F98D7DAA55F3'),
}
model ListDependentQuotasResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ListDependentQuotasResponseBody(name='body'),
}
/**
* @summary Queries the quotas on which a specified quota depends.
*
* @description In this example, the operation is called to query the quotas on which a Container Service for Kubernetes (ACK) quota whose ID is `q_i5uzm3` depends. This quota is the maximum number of nodes that can be created in an ACK cluster. The query result indicates that the specified quota depends on the following three quotas:
* * An Elastic Compute Service (ECS) quota whose ID is `q_elastic-network-interfaces`. This quota is the maximum number of ENIs (Secondary ENIs) that can be owned by an Alibaba Cloud account. The quota is available in the following regions: `cn-shenzhen`, `cn-beijing`, and `cn-hangzhou`.
* * A Server Load Balancer (SLB) quota whose ID is `q_fh20b0`. This quota is the number of servers that can be attached to the backend of an SLB instance.
* * An SLB quota whose ID is `q_3mmbsp`. This quota is the number of SLB instances that can be owned by an Alibaba Cloud account.
*
* @param request ListDependentQuotasRequest
* @param runtime runtime options for this request RuntimeOptions
* @return ListDependentQuotasResponse
*/
async function listDependentQuotasWithOptions(request: ListDependentQuotasRequest, runtime: Util.RuntimeOptions): ListDependentQuotasResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.productCode)) {
body['ProductCode'] = request.productCode;
}
if (!Util.isUnset(request.quotaActionCode)) {
body['QuotaActionCode'] = request.quotaActionCode;
}
var req = new OpenApi.OpenApiRequest{
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'ListDependentQuotas',
version = '2020-05-10',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries the quotas on which a specified quota depends.
*
* @description In this example, the operation is called to query the quotas on which a Container Service for Kubernetes (ACK) quota whose ID is `q_i5uzm3` depends. This quota is the maximum number of nodes that can be created in an ACK cluster. The query result indicates that the specified quota depends on the following three quotas:
* * An Elastic Compute Service (ECS) quota whose ID is `q_elastic-network-interfaces`. This quota is the maximum number of ENIs (Secondary ENIs) that can be owned by an Alibaba Cloud account. The quota is available in the following regions: `cn-shenzhen`, `cn-beijing`, and `cn-hangzhou`.
* * A Server Load Balancer (SLB) quota whose ID is `q_fh20b0`. This quota is the number of servers that can be attached to the backend of an SLB instance.
* * An SLB quota whose ID is `q_3mmbsp`. This quota is the number of SLB instances that can be owned by an Alibaba Cloud account.
*
* @param request ListDependentQuotasRequest
* @return ListDependentQuotasResponse
*/
async function listDependentQuotas(request: ListDependentQuotasRequest): ListDependentQuotasResponse {
var runtime = new Util.RuntimeOptions{};
return listDependentQuotasWithOptions(request, runtime);
}
model ListProductDimensionGroupsRequest {
maxResults?: int32(name='MaxResults', description='The maximum number of records that can be returned for the query. Valid values: 1 to 200. Default value: 30.', example='30'),
nextToken?: string(name='NextToken', description='The token that marks the position from which you want to start the query. If you leave this parameter empty, the query starts from the beginning.', example='1'),
productCode?: string(name='ProductCode', description='The service code.
> For more information, see [Alibaba Cloud services that support Quota Center](https://help.aliyun.com/document_detail/182368.html).
This parameter is required.', example='oss'),
}
model ListProductDimensionGroupsResponseBody = {
dimensionGroups?: [
{
dimensionKeys?: [ string ](name='DimensionKeys', description='The key of the dimension group.'),
groupCode?: string(name='GroupCode', description='The code of the dimension group.', example='oss_wf1ngqmd7q'),
groupName?: string(name='GroupName', description='The name of the dimension group.', example='OSS_Group'),
productCode?: string(name='ProductCode', description='The service code.', example='oss'),
}
](name='DimensionGroups', description='The dimension groups.'),
maxResults?: int32(name='MaxResults', description='The maximum number of records that are returned for the query.', example='1'),
nextToken?: string(name='NextToken', description='The token that marks the position at which the query ends. An empty value indicates that all data is returned.', example='1'),
requestId?: string(name='RequestId', description='The ID of the request.', example='057D210F-F2FC-5329-A536-26C16628BB09'),
totalCount?: int32(name='TotalCount', description='The total number of records that are returned for the query.', example='1'),
}
model ListProductDimensionGroupsResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ListProductDimensionGroupsResponseBody(name='body'),
}
/**
* @summary Queries the dimension groups of an Alibaba Cloud service.
*
* @description This topic provides an example on how to call the ListProductDimensionGroups operation to query the dimension groups of Object Storage Service (OSS). In this example, a dimension group is returned. The group name is `OSS_Group`, the group code is `oss_wf1ngqmd7q`, and the group key is `chargeType`.
*
* @param request ListProductDimensionGroupsRequest
* @param runtime runtime options for this request RuntimeOptions
* @return ListProductDimensionGroupsResponse
*/
async function listProductDimensionGroupsWithOptions(request: ListProductDimensionGroupsRequest, runtime: Util.RuntimeOptions): ListProductDimensionGroupsResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.maxResults)) {
query['MaxResults'] = request.maxResults;
}
if (!Util.isUnset(request.nextToken)) {
query['NextToken'] = request.nextToken;
}
if (!Util.isUnset(request.productCode)) {
query['ProductCode'] = request.productCode;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ListProductDimensionGroups',
version = '2020-05-10',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries the dimension groups of an Alibaba Cloud service.
*
* @description This topic provides an example on how to call the ListProductDimensionGroups operation to query the dimension groups of Object Storage Service (OSS). In this example, a dimension group is returned. The group name is `OSS_Group`, the group code is `oss_wf1ngqmd7q`, and the group key is `chargeType`.
*
* @param request ListProductDimensionGroupsRequest
* @return ListProductDimensionGroupsResponse
*/
async function listProductDimensionGroups(request: ListProductDimensionGroupsRequest): ListProductDimensionGroupsResponse {
var runtime = new Util.RuntimeOptions{};
return listProductDimensionGroupsWithOptions(request, runtime);
}
model ListProductQuotaDimensionsRequest {
maxResults?: int32(name='MaxResults', description='The maximum number of records that can be returned for the query.
Valid values: 1 to 200. Default value: 30.', example='30'),
nextToken?: string(name='NextToken', description='The token that marks the position from which you want to start the query. If you leave this parameter empty, the query starts from the beginning.', example='0'),
productCode?: string(name='ProductCode', description='The abbreviation of the Alibaba Cloud service name.
> For more information, see [Alibaba Cloud services that support Quota Center](https://help.aliyun.com/document_detail/182368.html).
This parameter is required.', example='ecs'),
quotaCategory?: string(name='QuotaCategory', description='The type of the quota. Valid values:
* FlowControl: API rate limit.
* CommonQuota: general quota. This is the default value.', example='CommonQuota'),
}
model ListProductQuotaDimensionsResponseBody = {
maxResults?: int32(name='MaxResults', description='The maximum number of records that are returned for the query.', example='10'),
nextToken?: string(name='NextToken', description='The token that marks the position at which the query ends. An empty value indicates that all data is returned.', example='10'),
quotaDimensions?: [
{
dependentDimensions?: [ string ](name='DependentDimensions', description='The quota dimensions on which the quota dimension that you want to query is dependent.'),
dimensionKey?: string(name='DimensionKey', description='The key of the quota dimension. Valid values:
* regionId: the region ID.
* zoneId: the zone ID.
* chargeType: the billing method.
* networkType: the network type.', example='zoneId'),
dimensionValueDetail?: [
{
dependentDimensions?: [
{
key?: string(name='Key', description='The key of the quota dimension on which the quota dimension that you want to query is dependent.', example='regionId'),
value?: string(name='Value', description='The value of the quota dimension on which the quota dimension that you want to query is dependent.', example='cn-hangzhou'),
}
](name='DependentDimensions', description='The quota dimensions on which the quota dimension that you want to query is dependent.'),
name?: string(name='Name', description='The name of the quota dimension.', example='cn-hangzhou'),
value?: string(name='Value', description='The value of the quota dimension.', example='cn-hangzhou'),
}
](name='DimensionValueDetail', description='The details about the dimension value.'),
dimensionValues?: [ string ](name='DimensionValues', description='The dimension values.'),
name?: string(name='Name', description='The name of the quota dimension.', example='Zone'),
requisite?: boolean(name='Requisite', description='Indicates whether the quota dimension is required when you query quota dimensions. Valid values:
* true
* false', example='false'),
}
](name='QuotaDimensions', description='The quota dimensions.'),
requestId?: string(name='RequestId', description='The ID of the request.', example='7ED584FB-ECBF-4A2A-969D-F54D25EFABF9'),
totalCount?: int32(name='TotalCount', description='The total number of records that are returned for the query.', example='10'),
}
model ListProductQuotaDimensionsResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ListProductQuotaDimensionsResponseBody(name='body'),
}
/**
* @summary Queries the quota dimensions that are supported by the specified Alibaba Cloud service.
*
* @description In this example, the operation is called to query the quota dimensions that are supported by Elastic Compute Service (ECS). The query results show all the quota dimensions that are supported by ECS.
*
* @param request ListProductQuotaDimensionsRequest
* @param runtime runtime options for this request RuntimeOptions
* @return ListProductQuotaDimensionsResponse
*/
async function listProductQuotaDimensionsWithOptions(request: ListProductQuotaDimensionsRequest, runtime: Util.RuntimeOptions): ListProductQuotaDimensionsResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.maxResults)) {
body['MaxResults'] = request.maxResults;
}
if (!Util.isUnset(request.nextToken)) {
body['NextToken'] = request.nextToken;
}
if (!Util.isUnset(request.productCode)) {
body['ProductCode'] = request.productCode;
}
if (!Util.isUnset(request.quotaCategory)) {
body['QuotaCategory'] = request.quotaCategory;
}
var req = new OpenApi.OpenApiRequest{
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'ListProductQuotaDimensions',
version = '2020-05-10',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries the quota dimensions that are supported by the specified Alibaba Cloud service.
*
* @description In this example, the operation is called to query the quota dimensions that are supported by Elastic Compute Service (ECS). The query results show all the quota dimensions that are supported by ECS.
*
* @param request ListProductQuotaDimensionsRequest
* @return ListProductQuotaDimensionsResponse
*/
async function listProductQuotaDimensions(request: ListProductQuotaDimensionsRequest): ListProductQuotaDimensionsResponse {
var runtime = new Util.RuntimeOptions{};
return listProductQuotaDimensionsWithOptions(request, runtime);
}
model ListProductQuotasRequest {
dimensions?: [
{
key?: string(name='Key', description='The key of the dimension.
> The value range of N varies based on the number of dimensions that are supported by the related Alibaba Cloud service.', example='regionId'),
value?: string(name='Value', description='The value of the dimension.
> The value range of N varies based on the number of dimensions that are supported by the related Alibaba Cloud service.', example='cn-hangzhou'),
}
](name='Dimensions', description='The quota dimensions.'),
groupCode?: string(name='GroupCode', description='The code of the dimension group.', example='entconsole_w1j3msbo2g'),
keyWord?: string(name='KeyWord', description='The keyword that you want to use to search for the quotas.', example='ecs-spec'),
maxResults?: int32(name='MaxResults', description='The maximum number of records that can be returned for the query.
Valid values: 1 to 100. Default value: 30.', example='30'),
nextToken?: string(name='NextToken', description='The token that marks the position from which you want to start the query. If you leave this parameter empty, the query starts from the beginning.', example='1'),
productCode?: string(name='ProductCode', description='The abbreviation of the Alibaba Cloud service name.
> To query the abbreviation of an Alibaba Cloud service name, call the [ListProducts](https://help.aliyun.com/document_detail/440555.html) operation and check the value of the `ProductCode` parameter.
This parameter is required.', example='ecs-spec'),
quotaActionCode?: string(name='QuotaActionCode', description='The quota ID.', example='ecs.g5.2xlarge'),
quotaCategory?: string(name='QuotaCategory', description='The type of the quota. Valid values:
* CommonQuota (default value): general quota
* FlowControl: API rate limit
* WhiteListLabel: whitelist quota', example='FlowControl'),
sortField?: string(name='SortField', description='The field based on which you want to sort the returned records. Valid values:
* TIME: The returned records are sorted by the last update time.
* TOTAL: The returned records are sorted by the usage of the total quota.
* RESERVED: The returned records are sorted by the usage of the reserved quota.
> This parameter is available only for quotas that belong to ECS Quotas by Instance Type. You can leave this parameter empty.', example='TIME'),
sortOrder?: string(name='SortOrder', description='The order in which you want to sort the returned records. Valid values:
* Ascending: ascending order
* Descending: descending order
> This parameter is available only for quotas that belong to ECS Quotas by Instance Type. You can leave this parameter empty.', example='Ascending'),
}
model ListProductQuotasResponseBody = {
maxResults?: int32(name='MaxResults', description='The maximum number of records that are returned for the query.', example='1'),
nextToken?: string(name='NextToken', description='The token that marks the position at which the query ends. An empty value indicates that all data is returned.', example='AAAAAd98/tlL5GF2aM7UMKQGM8LZesIPr0CbfxASQvHV/pwcmVKNfdBbW8OPld3NvG9Cy8+dNcyFzyUttQA3IONfBhRGpXFyiVoTgK+dupBsP2mX'),
quotas?: [
{
adjustable?: boolean(name='Adjustable', description='Indicates whether the quota is adjustable. Valid values:
* true
* false', example='true'),
applicableRange?: [ float ](name='ApplicableRange', description='N/A'),
applicableType?: string(name='ApplicableType', description='The type of the adjustable value. Valid values:
* continuous
* discontinuous', example='discontinuous'),
applyReasonTips?: string(name='ApplyReasonTips', description='The reason for submitting a quota increase request.', example='The business xxx is expected to grow by 50%.'),
consumable?: boolean(name='Consumable', description='Indicates whether the system shows the used value of the quota. Valid values:
* true
* false', example='true'),
dimensions?: map[string]any(name='Dimensions', description='The quota dimensions. Format: `{"regionId":"Region"}`.', example='{"regionId":"cn-hangzhou"}'),
effectiveTime?: string(name='EffectiveTime', description='The start time of the validity period of the quota. The value is displayed in UTC.', example='2022-09-28T06:07:00Z'),
expireTime?: string(name='ExpireTime', description='The end time of the validity period of the quota. The value is displayed in UTC.', example='2022-09-29T06:07:00Z'),
globalQuota?: boolean(name='GlobalQuota', description='Indicates whether the quota is a global quota. Valid values:
* true
* false', example='true'),
period?: {
periodUnit?: string(name='PeriodUnit', description='The unit of the calculation cycle. Valid values:
* second
* minute
* hour
* day
* week', example='day'),
periodValue?: int32(name='PeriodValue', description='The value of the calculation cycle.', example='1'),
}(name='Period', description='The calculation cycle of the quota.'),
productCode?: string(name='ProductCode', description='The abbreviation of the Alibaba Cloud service name.', example='ecs-spec'),
quotaActionCode?: string(name='QuotaActionCode', description='The quota ID.', example='ecs.g5.2xlarge'),
quotaArn?: string(name='QuotaArn', description='The Alibaba Cloud Resource Name (ARN) of the quota.', example='acs:quotas:cn-hangzhou:107992689699****:quota/ecs/ecs.g5.2xlarge/postpaid/vpc/cn-hangzhou/instancetype/cn-hangzhou-i'),
quotaCategory?: string(name='QuotaCategory', description='The type of the quota. Valid values:
* CommonQuota: general quota
* FlowControl: API rate limit
* WhiteListLabel: privilege', example='CommonQuota'),
quotaDescription?: string(name='QuotaDescription', description='The description of the quota.', example='ecs.g5.2xlarge'),
quotaItems?: [
{
quota?: string(name='Quota', description='The quota value.', example='10'),
quotaUnit?: string(name='QuotaUnit', description='The unit of the quota.', example='AMOUNT'),
type?: string(name='Type', description='The category of the quota. Valid values:
* BaseQuota: base quota
* ReservedQuota: reserved quota', example='BaseQuota'),
usage?: string(name='Usage', description='The quota usage.', example='1'),
}
](name='QuotaItems', description='The details of the quota.'),
quotaName?: string(name='QuotaName', description='The quota name.', example='ecs.g5.2xlarge'),
quotaType?: string(name='QuotaType', description='The type of the quota. Valid values:
* privilege
* normal', example='privilege'),
quotaUnit?: string(name='QuotaUnit', description='The unit of the quota.', example='AMOUNT'),
supportedRange?: [ float ](name='SupportedRange', description='N/A'),
totalQuota?: float(name='TotalQuota', description='The quota value.', example='200'),
totalUsage?: float(name='TotalUsage', description='The quota usage.', example='1'),
unadjustableDetail?: string(name='UnadjustableDetail', description='The reason why the quota is not adjustable. Valid values:
* nonactivated: The service is not activated.
* applicationProcess: The application is being processed.
* limitReached: The quota limit is reached.', example='applicationProcess'),
usageMetric?: {
metricDimensions?: map[string]string(name='MetricDimensions'),
metricName?: string(name='MetricName'),
metricNamespace?: string(name='MetricNamespace'),
}(name='UsageMetric'),
}
](name='Quotas', description='The queried quotas.'),
requestId?: string(name='RequestId', description='The ID of the request.', example='D0131FD5-5397-44FE-BF5A-4B7165B813CC'),
totalCount?: int32(name='TotalCount', description='The total number of records that are returned for the query.', example='4'),
}
model ListProductQuotasResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ListProductQuotasResponseBody(name='body'),
}
/**
* @summary Queries the quotas of a specific Alibaba Cloud service.
*
* @description In this example, the operation is called to query the quotas whose instance type is `ecs.g5.2xlarge`. The quotas belong to Elastic Compute Service (ECS) Quotas by Instance Type. The query result includes the name, ID, unit, dimensions, and cycle of each quota.
*
* @param request ListProductQuotasRequest
* @param runtime runtime options for this request RuntimeOptions
* @return ListProductQuotasResponse
*/
async function listProductQuotasWithOptions(request: ListProductQuotasRequest, runtime: Util.RuntimeOptions): ListProductQuotasResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.dimensions)) {
body['Dimensions'] = request.dimensions;
}
if (!Util.isUnset(request.groupCode)) {
body['GroupCode'] = request.groupCode;
}
if (!Util.isUnset(request.keyWord)) {
body['KeyWord'] = request.keyWord;
}
if (!Util.isUnset(request.maxResults)) {
body['MaxResults'] = request.maxResults;
}
if (!Util.isUnset(request.nextToken)) {
body['NextToken'] = request.nextToken;
}
if (!Util.isUnset(request.productCode)) {
body['ProductCode'] = request.productCode;
}
if (!Util.isUnset(request.quotaActionCode)) {
body['QuotaActionCode'] = request.quotaActionCode;
}
if (!Util.isUnset(request.quotaCategory)) {
body['QuotaCategory'] = request.quotaCategory;
}
if (!Util.isUnset(request.sortField)) {
body['SortField'] = request.sortField;
}
if (!Util.isUnset(request.sortOrder)) {
body['SortOrder'] = request.sortOrder;
}
var req = new OpenApi.OpenApiRequest{
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'ListProductQuotas',
version = '2020-05-10',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries the quotas of a specific Alibaba Cloud service.
*
* @description In this example, the operation is called to query the quotas whose instance type is `ecs.g5.2xlarge`. The quotas belong to Elastic Compute Service (ECS) Quotas by Instance Type. The query result includes the name, ID, unit, dimensions, and cycle of each quota.
*
* @param request ListProductQuotasRequest
* @return ListProductQuotasResponse
*/
async function listProductQuotas(request: ListProductQuotasRequest): ListProductQuotasResponse {
var runtime = new Util.RuntimeOptions{};
return listProductQuotasWithOptions(request, runtime);
}
model ListProductsRequest {
maxResults?: int32(name='MaxResults', description='The maximum number of records that can be returned for the query.
Valid values: 1 to 200. Default value: 30.', example='4'),
nextToken?: string(name='NextToken', description='The token that marks the position from which you want to start the query. If you leave this parameter empty, the query starts from the beginning.', example='4'),
}
model ListProductsResponseBody = {
maxResults?: int32(name='MaxResults', description='The maximum number of records that are returned for the query.', example='4'),
nextToken?: string(name='NextToken', description='The token that marks the position at which the query ends. An empty value indicates that all data is returned.', example='4'),
productInfo?: [
{
commonQuotaSupport?: string(name='CommonQuotaSupport', description='Indicates whether the Alibaba Cloud service supports general quotas. Valid values:
* support: The Alibaba Cloud service supports general quotas.
* unsupport: The Alibaba Cloud service does not support general quotas.', example='support'),
dynamic?: boolean(name='Dynamic', description='Indicates whether the Alibaba Cloud service supports dynamic quota adjustment. Valid values:
* true
* false', example='true'),
flowControlSupport?: string(name='FlowControlSupport', description='Indicates whether the Alibaba Cloud service supports API rate limits. Valid values:
* support: The Alibaba Cloud service supports API rate limits.
* unsupport: The Alibaba Cloud service does not support API rate limits.', example='unsupport'),
productCode?: string(name='ProductCode', description='The abbreviation of the Alibaba Cloud service name.', example='ecs'),
productName?: string(name='ProductName', description='The name of the Alibaba Cloud service.', example='Elastic Compute Service (ECS)'),
productNameEn?: string(name='ProductNameEn', description='The English name of the Alibaba Cloud service.', example='Elastic Compute Service'),
secondCategoryId?: long(name='SecondCategoryId', description='The ID of the service category.', example='5'),
secondCategoryName?: string(name='SecondCategoryName', description='The name of the service category.', example='Elastic Compute'),
secondCategoryNameEn?: string(name='SecondCategoryNameEn', description='The English name of the service category.', example='Elastic Compute'),
whiteListLabelQuotaSupport?: string(name='WhiteListLabelQuotaSupport', description='Indicates whether the Alibaba Cloud service supports whitelist quotas. Valid values:
* support: The Alibaba Cloud service supports whitelist quotas.
* unsupport: The Alibaba Cloud service does not support whitelist quotas.', example='support'),
}
](name='ProductInfo', description='The information of the Alibaba Cloud service.'),
requestId?: string(name='RequestId', description='The ID of the request.', example='1DA9C136-11BC-4C39-ADC6-B86276128072'),
totalCount?: int32(name='TotalCount', description='The total number of records that are returned for the query.', example='1'),
}
model ListProductsResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ListProductsResponseBody(name='body'),
}
/**
* @summary Queries the Alibaba Cloud services that support Quota Center.
*
* @description The services in the query result are the same as the services listed in [Alibaba Cloud services that support Quota Center](https://help.aliyun.com/document_detail/182368.html).
*
* @param request ListProductsRequest
* @param runtime runtime options for this request RuntimeOptions
* @return ListProductsResponse
*/
async function listProductsWithOptions(request: ListProductsRequest, runtime: Util.RuntimeOptions): ListProductsResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.maxResults)) {
body['MaxResults'] = request.maxResults;
}
if (!Util.isUnset(request.nextToken)) {
body['NextToken'] = request.nextToken;
}
var req = new OpenApi.OpenApiRequest{
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'ListProducts',
version = '2020-05-10',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries the Alibaba Cloud services that support Quota Center.
*
* @description The services in the query result are the same as the services listed in [Alibaba Cloud services that support Quota Center](https://help.aliyun.com/document_detail/182368.html).
*
* @param request ListProductsRequest
* @return ListProductsResponse
*/
async function listProducts(request: ListProductsRequest): ListProductsResponse {
var runtime = new Util.RuntimeOptions{};
return listProductsWithOptions(request, runtime);
}
model ListQuotaAlarmsRequest {
alarmName?: string(name='AlarmName', description='The name of the alert.', example='rules'),
maxResults?: int32(name='MaxResults', description='The maximum number of records that you want to return for the query.
Valid values: 1 to 200. Default value: 30.', example='20'),
nextToken?: string(name='NextToken', description='The token that marks the position from which you want to start the query.
> An empty value indicates that the query starts from the beginning.', example='1'),
productCode?: string(name='ProductCode', description='The abbreviation of the Alibaba Cloud service name.
> To query the abbreviation of an Alibaba Cloud service name, call the [ListProducts](https://help.aliyun.com/document_detail/440554.html) operation and check the value of `ProductCode` in the response.', example='ecs'),
quotaActionCode?: string(name='QuotaActionCode', description='The quota ID.
>
* To obtain the quota ID of a cloud service, call the [ListProductQuotas](https://help.aliyun.com/document_detail/440554.html) operation and check the value of `QuotaActionCode` in the response.
* If you specify this parameter, you must specify `ProductCode`.', example='q_hvnoqv'),
quotaDimensions?: [
{
key?: string(name='Key', description='The key of the dimension.
>
* The value range of N varies based on the number of dimensions that are supported by the related Alibaba Cloud service.
* This parameter is required if you set the `ProductCode` parameter to `ecs`, `ecs-spec`, `actiontrail`, or `ess`.', example='regionId'),
value?: string(name='Value', description='The value of the dimension.
>
* The value range of N varies based on the number of dimensions that are supported by the related Alibaba Cloud service.
* This parameter is required if you set the `ProductCode` parameter to `ecs`, `ecs-spec`, `actiontrail`, or `ess`.', example='cn-hangzhou'),
}
](name='QuotaDimensions', description='The quota dimensions.'),
}
model ListQuotaAlarmsResponseBody = {
maxResults?: int32(name='MaxResults', description='The maximum number of records that are returned for the query.', example='1'),
nextToken?: string(name='NextToken', description='The token that marks the position at which the query ends.
> An empty value indicates that all data is returned.', example='1'),
quotaAlarms?: [
{
alarmId?: string(name='AlarmId', description='The ID of the alert.', example='a2efa7fc-832f-47bb-8054-39e28012****'),
alarmName?: string(name='AlarmName', description='The name of the alert event.', example='rules'),
createTime?: string(name='CreateTime', description='The time when the quota alert was created.', example='2020-11-27T07:23:34Z'),
exceedThreshold?: boolean(name='ExceedThreshold', description='Indicates whether the alert threshold was reached. Valid values:
* false
* true', example='false'),
notifyChannels?: [ string ](name='NotifyChannels', description='The alert notification methods.'),
notifyTarget?: string(name='NotifyTarget', description='The alert contact. The value is accountContact.', example='accountContact'),
productCode?: string(name='ProductCode', description='The abbreviation of the Alibaba Cloud service name.', example='config'),
quotaActionCode?: string(name='QuotaActionCode', description='The ID of the quota.', example='q_hvnoqv'),
quotaDimensions?: map[string]any(name='QuotaDimensions', description='The quota dimensions.', example='{"regionId":"cn-hangzhou"}'),
quotaUsage?: float(name='QuotaUsage', description='The used quota.', example='73'),
quotaValue?: float(name='QuotaValue', description='The value of the quota.', example='200'),
threshold?: float(name='Threshold', description='The numeric value of the alert threshold.', example='160'),
thresholdPercent?: float(name='ThresholdPercent', description='The percentage of the alert threshold.', example='80'),
thresholdType?: string(name='ThresholdType', description='The type of the quota alert. Valid values:
* used: The alert is created for the used quota.
* usable: The alert is created for the available quota.', example='used'),
webHook?: string(name='WebHook', description='The webhook URL.', example='https://www.aliyun.com/webhook'),
}
](name='QuotaAlarms', description='The details about the quota alert.'),
requestId?: string(name='RequestId', description='The ID of the request.', example='87F3B755-3BD2-4C76-B36A-93247002918C'),
totalCount?: int32(name='TotalCount', description='The total number of quota alerts.', example='2'),
}
model ListQuotaAlarmsResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ListQuotaAlarmsResponseBody(name='body'),
}
/**
* @summary Queries quota alerts.
*
* @param request ListQuotaAlarmsRequest
* @param runtime runtime options for this request RuntimeOptions
* @return ListQuotaAlarmsResponse
*/
async function listQuotaAlarmsWithOptions(request: ListQuotaAlarmsRequest, runtime: Util.RuntimeOptions): ListQuotaAlarmsResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.alarmName)) {
body['AlarmName'] = request.alarmName;
}
if (!Util.isUnset(request.maxResults)) {
body['MaxResults'] = request.maxResults;
}
if (!Util.isUnset(request.nextToken)) {
body['NextToken'] = request.nextToken;
}
if (!Util.isUnset(request.productCode)) {
body['ProductCode'] = request.productCode;
}
if (!Util.isUnset(request.quotaActionCode)) {
body['QuotaActionCode'] = request.quotaActionCode;
}
if (!Util.isUnset(request.quotaDimensions)) {
body['QuotaDimensions'] = request.quotaDimensions;
}
var req = new OpenApi.OpenApiRequest{
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'ListQuotaAlarms',
version = '2020-05-10',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries quota alerts.
*
* @param request ListQuotaAlarmsRequest
* @return ListQuotaAlarmsResponse
*/
async function listQuotaAlarms(request: ListQuotaAlarmsRequest): ListQuotaAlarmsResponse {
var runtime = new Util.RuntimeOptions{};
return listQuotaAlarmsWithOptions(request, runtime);
}
model ListQuotaApplicationTemplatesRequest {
dimensions?: [
{
key?: string(name='Key', description='The key of the dimension.
>
* The value range of N varies based on the number of dimensions that are supported by the related Alibaba Cloud service.
* You must specify both Key and Value for each quota dimension.', example='regionId'),
value?: string(name='Value', description='The value of the dimension.
>
* The value range of N varies based on the number of dimensions that are supported by the related Alibaba Cloud service.
* You must specify both Key and Value for each quota dimension.', example='cn-hangzhou'),
}
](name='Dimensions', description='The quota dimensions.'),
id?: string(name='Id', description='The ID of the quota item.', example='1****'),
maxResults?: int32(name='MaxResults', description='The maximum number of records that can be returned for the query. Valid values: 1 to 100. Default value: 30.', example='30'),
nextToken?: string(name='NextToken', description='The token that marks the position from which you want to start the query.
> If you leave this parameter empty, the query starts from the beginning.', example='1'),
productCode?: string(name='ProductCode', description='The abbreviation of the Alibaba Cloud service name.
> To query the abbreviation of an Alibaba Cloud service name, call the [ListProducts](https://help.aliyun.com/document_detail/440555.html) operation and check the value of `ProductCode` in the response.', example='ecs'),
quotaActionCode?: string(name='QuotaActionCode', description='The ID of the quota.', example='q_security-groups'),
quotaCategory?: string(name='QuotaCategory', description='The type of the quota. Valid values:
* CommonQuota: general quota
* WhiteListLabel: privilege
* FlowControl: API rate limit', example='CommonQuota'),
}
model ListQuotaApplicationTemplatesResponseBody = {
maxResults?: int32(name='MaxResults', description='The maximum number of records returned for the query.', example='30'),
nextToken?: string(name='NextToken', description='The token that marks the position at which the query ends.
> An empty value indicates that all data is returned.', example='1'),
quotaApplicationTemplates?: [
{
applicableRange?: [ float ](name='ApplicableRange', description='None'),
applicableType?: string(name='ApplicableType', description='The type of the adjustable value. Valid values:
* continuous
* discontinuous', example='continuous'),
desireValue?: float(name='DesireValue', description='The requested value of the quota.', example='802'),
dimensions?: map[string]any(name='Dimensions', description='The quota dimensions.
Format: {"regionId":"Region"}.', example='{"regionId":"cn-hangzhou"}'),
effectiveTime?: string(name='EffectiveTime', description='The start time of the validity period of the quota. The value is displayed in UTC.', example='2022-09-28T06:07:00Z'),
envLanguage?: string(name='EnvLanguage', description='The language of the quota alert notification. Valid values:
* zh: Chinese
* en: English', example='zh'),
expireTime?: string(name='ExpireTime', description='The end time of the validity period of the quota. The value is displayed in UTC.', example='2022-09-29T06:07:00Z'),
id?: string(name='Id', description='The ID of the quota template.', example='1****'),
noticeType?: int32(name='NoticeType', description='Indicates whether Quota Center sends a notification about the application result. Valid values:
* 0: no
* 3: yes', example='0'),
period?: {
periodUnit?: string(name='PeriodUnit', description='The unit of the calculation cycle. Valid values:
* second
* minute
* hour
* day
* week', example='day'),
periodValue?: int32(name='PeriodValue', description='The value of the calculation cycle.', example='1'),
}(name='Period', description='The calculation cycle of the quota.'),
productCode?: string(name='ProductCode', description='The abbreviation of the Alibaba Cloud service name.', example='ecs'),
quotaActionCode?: string(name='QuotaActionCode', description='The ID of the quota.', example='q_security-groups'),
quotaCategory?: string(name='QuotaCategory', description='The type of the quota. Valid values:
* CommonQuota: general quota
* FlowControl: API rate limit
* WhiteListLabel: privilege', example='CommonQuota'),
quotaDescription?: string(name='QuotaDescription', description='The description of the quota.', example='The maximum number of security groups that can be created by the current account.'),
quotaName?: string(name='QuotaName', description='The name of the quota.', example='Maximum Number of Security Groups'),
}
](name='QuotaApplicationTemplates', description='The queried quota templates.'),
requestId?: string(name='RequestId', description='The request ID.', example='D47B3A10-CDAC-5412-B2EE-EC9A3DBE9053'),
totalCount?: int32(name='TotalCount', description='The total number of records returned for the query.', example='40'),
}
model ListQuotaApplicationTemplatesResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ListQuotaApplicationTemplatesResponseBody(name='body'),
}
/**
* @summary Queries quota templates by using the management account of a resource directory.
*
* @param request ListQuotaApplicationTemplatesRequest
* @param runtime runtime options for this request RuntimeOptions
* @return ListQuotaApplicationTemplatesResponse
*/
async function listQuotaApplicationTemplatesWithOptions(request: ListQuotaApplicationTemplatesRequest, runtime: Util.RuntimeOptions): ListQuotaApplicationTemplatesResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.nextToken)) {
query['NextToken'] = request.nextToken;
}
var body : map[string]any = {};
if (!Util.isUnset(request.dimensions)) {
body['Dimensions'] = request.dimensions;
}
if (!Util.isUnset(request.id)) {
body['Id'] = request.id;
}
if (!Util.isUnset(request.maxResults)) {
body['MaxResults'] = request.maxResults;
}
if (!Util.isUnset(request.productCode)) {
body['ProductCode'] = request.productCode;
}
if (!Util.isUnset(request.quotaActionCode)) {
body['QuotaActionCode'] = request.quotaActionCode;
}
if (!Util.isUnset(request.quotaCategory)) {
body['QuotaCategory'] = request.quotaCategory;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'ListQuotaApplicationTemplates',
version = '2020-05-10',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries quota templates by using the management account of a resource directory.
*
* @param request ListQuotaApplicationTemplatesRequest
* @return ListQuotaApplicationTemplatesResponse
*/
async function listQuotaApplicationTemplates(request: ListQuotaApplicationTemplatesRequest): ListQuotaApplicationTemplatesResponse {
var runtime = new Util.RuntimeOptions{};
return listQuotaApplicationTemplatesWithOptions(request, runtime);
}
model ListQuotaApplicationsRequest {
dimensions?: [
{
key?: string(name='Key', description='The key of the dimension.
> The value range of N varies based on the number of dimensions that are supported by the related Alibaba Cloud service.', example='regionId'),
value?: string(name='Value', description='The value of the dimension.
> The value range of N varies based on the number of dimensions that are supported by the related Alibaba Cloud service.', example='cn-hangzhou'),
}
](name='Dimensions', description='The quota dimensions.'),
keyWord?: string(name='KeyWord', description='The keyword that you want to use to search for the application.', example='Cluster'),
maxResults?: int32(name='MaxResults', description='The maximum number of records that can be returned for the query.
Valid values: 1 to 200. Default value: 30.', example='1'),
nextToken?: string(name='NextToken', description='The token that marks the position from which you want to start the query. If you leave this parameter empty, the query starts from the beginning.', example='1'),
productCode?: string(name='ProductCode', description='The abbreviation of the Alibaba Cloud service name.', example='csk'),
quotaActionCode?: string(name='QuotaActionCode', description='The ID of the quota.', example='q_i5uzm3'),
quotaCategory?: string(name='QuotaCategory', description='The type of the quota. Valid values:
* CommonQuota: general quota
* FlowControl: API rate limit
* WhiteListLabel: whitelist quota', example='CommonQuota'),
status?: string(name='Status', description='The status of the application. Valid values:
* Disagree: rejects the application.
* Agree: approves the application.
* Process: reviews the application.
* Cancel: cancels the application.', example='Agree'),
}
model ListQuotaApplicationsResponseBody = {
maxResults?: int32(name='MaxResults', description='The maximum number of records that are returned for the query.', example='1'),
nextToken?: string(name='NextToken', description='The token that marks the position at which the query ends. An empty value indicates that all data is returned.', example='1'),
quotaApplications?: [
{
applicationId?: string(name='ApplicationId', description='The ID of the application.', example='b926571d-cc09-4711-b547-58a615f0****'),
applyTime?: string(name='ApplyTime', description='The time when the application was submitted.', example='2021-01-15T09:13:53Z'),
approveValue?: float(name='ApproveValue', description='The quota value that is approved.', example='101'),
auditReason?: string(name='AuditReason', description='The result of the application.', example='Agree'),
comment?: string(name='Comment', description='The remarks of the application.', example='test'),
desireValue?: float(name='DesireValue', description='The quota value that is approved.', example='101'),
dimension?: map[string]any(name='Dimension', description='The dimension of the application.', example='{"regionId":"cn-hangzhou"}'),
effectiveTime?: string(name='EffectiveTime', description='The time when the application took effect.', example='2021-01-15T11:46:25Z'),
expireTime?: string(name='ExpireTime', description='The time when the application expired.', example='2021-01-17T11:46:25Z'),
noticeType?: int32(name='NoticeType', description='Indicates whether Quota Center sends a notification about the application result. Valid values:
* 0: A notification about the application result is not sent.
* 3: A notification about the application result is sent.', example='3'),
period?: {
periodUnit?: string(name='PeriodUnit', description='The unit of the calculation cycle. Valid values:
* second
* minute
* hour
* day
* week', example='second'),
periodValue?: long(name='PeriodValue', description='The value of the calculation cycle.', example='1'),
}(name='Period', description='The calculation cycle of the quota.'),
productCode?: string(name='ProductCode', description='The abbreviation of the Alibaba Cloud service name.', example='csk'),
quotaActionCode?: string(name='QuotaActionCode', description='The ID of the quota.', example='q_i5uzm3'),
quotaArn?: string(name='QuotaArn', description='The Alibaba Cloud Resource Name (ARN) of the quota.', example='acs:quotas:*:120886317861****:quota/csk/q_i5uzm3'),
quotaCategory?: string(name='QuotaCategory'),
quotaDescription?: string(name='QuotaDescription', description='The description of the quota.', example='The maximum number of nodes in a cluster'),
quotaName?: string(name='QuotaName', description='The name of the quota.', example='Maximum Number of Nodes'),
quotaUnit?: string(name='QuotaUnit', description='The unit of the new quota value.', example='Node'),
reason?: string(name='Reason', description='The reason for the application.', example='Business expansion'),
status?: string(name='Status', description='The status of the application. Valid values:
* Disagree: The application is rejected.
* Agree: The application is approved.
* Process: The application is being reviewed.
* Cancel: The application is canceled.', example='Agree'),
}
](name='QuotaApplications', description='The details of the applications.'),
requestId?: string(name='RequestId', description='The ID of the request.', example='730925FB-0BD0-40AC-AF3A-A6C6E9716879'),
totalCount?: int32(name='TotalCount', description='The total number of applications.', example='1'),
}
model ListQuotaApplicationsResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ListQuotaApplicationsResponseBody(name='body'),
}
/**
* @summary Queries the details of an application that is submitted to increase a quota.
*
* @description In this example, the operation is called to query the details of an application that is submitted to increase a quota whose ID is `q_i5uzm3` and whose name is Maximum Number of Nodes. This quota belongs to Container Service for Kubernetes (ACK). The query result shows the details of the application. The details include the application ID, application time, requested quota, and application result. In this example, the application ID is `b926571d-cc09-4711-b547-58a615f0****`. The application time is `2021-01-15T09:13:53Z`. The expected quota value is `101`. The application result is `Agree`.
*
* @param request ListQuotaApplicationsRequest
* @param runtime runtime options for this request RuntimeOptions
* @return ListQuotaApplicationsResponse
*/
async function listQuotaApplicationsWithOptions(request: ListQuotaApplicationsRequest, runtime: Util.RuntimeOptions): ListQuotaApplicationsResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.dimensions)) {
body['Dimensions'] = request.dimensions;
}
if (!Util.isUnset(request.keyWord)) {
body['KeyWord'] = request.keyWord;
}
if (!Util.isUnset(request.maxResults)) {
body['MaxResults'] = request.maxResults;
}
if (!Util.isUnset(request.nextToken)) {
body['NextToken'] = request.nextToken;
}
if (!Util.isUnset(request.productCode)) {
body['ProductCode'] = request.productCode;
}
if (!Util.isUnset(request.quotaActionCode)) {
body['QuotaActionCode'] = request.quotaActionCode;
}
if (!Util.isUnset(request.quotaCategory)) {
body['QuotaCategory'] = request.quotaCategory;
}
if (!Util.isUnset(request.status)) {
body['Status'] = request.status;
}
var req = new OpenApi.OpenApiRequest{
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'ListQuotaApplications',
version = '2020-05-10',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries the details of an application that is submitted to increase a quota.
*
* @description In this example, the operation is called to query the details of an application that is submitted to increase a quota whose ID is `q_i5uzm3` and whose name is Maximum Number of Nodes. This quota belongs to Container Service for Kubernetes (ACK). The query result shows the details of the application. The details include the application ID, application time, requested quota, and application result. In this example, the application ID is `b926571d-cc09-4711-b547-58a615f0****`. The application time is `2021-01-15T09:13:53Z`. The expected quota value is `101`. The application result is `Agree`.
*
* @param request ListQuotaApplicationsRequest
* @return ListQuotaApplicationsResponse
*/
async function listQuotaApplications(request: ListQuotaApplicationsRequest): ListQuotaApplicationsResponse {
var runtime = new Util.RuntimeOptions{};
return listQuotaApplicationsWithOptions(request, runtime);
}
model ListQuotaApplicationsDetailForTemplateRequest {
aliyunUid?: string(name='AliyunUid', description='The Alibaba Cloud account that is used to submit the quota increase application.', example='135048337611****'),
batchQuotaApplicationId?: string(name='BatchQuotaApplicationId', description='The ID of the quota application batch.', example='d314d6ae-867d-484c-9009-3d421a80****'),
maxResults?: int32(name='MaxResults', description='The maximum number of records that can be returned for the query.
Valid values: 1 to 100. Default value: 30.', example='30'),
nextToken?: string(name='NextToken', description='The token that marks the position from which you want to start the query.
> An empty value indicates that the query starts from the beginning.', example='4'),
productCode?: string(name='ProductCode', description='The abbreviation of the Alibaba Cloud service name.
> To query the abbreviation of an Alibaba Cloud service name, call the [ListProducts](https://help.aliyun.com/document_detail/440555.html) operation and check the value of `ProductCode` in the response.', example='ecs'),
quotaActionCode?: string(name='QuotaActionCode', description='The quota ID.', example='ecs.c5.large'),
quotaCategory?: string(name='QuotaCategory', description='The quota type. Valid values:
* CommonQuota: general quota
* FlowControl: API rate limit
* WhiteListLabel: privilege', example='CommonQuota'),
status?: string(name='Status', description='The approval state of the quota increase application. Valid values:
* Disagree: The application is rejected.
* Agree: The application is approved.
* Process: The application is in review.
* Cancel: The application is canceled.', example='Agree'),
}
model ListQuotaApplicationsDetailForTemplateResponseBody = {
maxResults?: int32(name='MaxResults', description='The maximum number of records that can be returned for the query.', example='30'),
nextToken?: string(name='NextToken', description='The token that marks the position from which you want to start the query.', example='1'),
quotaApplications?: [
{
aliyunUid?: string(name='AliyunUid', description='The ID of the Alibaba Cloud account.', example='175376458581****'),
applicationId?: string(name='ApplicationId', description='The ID of the quota increase application.', example='b926571d-cc09-4711-b547-58a615f0****'),
applyTime?: string(name='ApplyTime', description='The time when the quota increase application was submitted. The value is displayed in UTC.', example='2021-01-15T09:13:53Z'),
approveValue?: double(name='ApproveValue', description='The quota value that is approved.', example='101'),
auditReason?: string(name='AuditReason', description='The approval result of the quota increase application.', example='Agree'),
batchQuotaApplicationId?: string(name='BatchQuotaApplicationId', description='The ID of the quota application batch.', example='d314d6ae-867d-484c-9009-3d421a80****'),
desireValue?: double(name='DesireValue', description='The requested value of the quota.', example='60'),
effectiveTime?: string(name='EffectiveTime', description='The start time of the validity period of the quota. The value is displayed in UTC.', example='2021-01-15T11:46:25Z'),
envLanguage?: string(name='EnvLanguage', description='The language of the quota alert notification. Valid values:
* zh: Chinese
* en: English', example='zh'),
expireTime?: string(name='ExpireTime', description='The end time of the validity period of the quota. The value is displayed in UTC.', example='2021-01-17T11:46:25Z'),
noticeType?: int32(name='NoticeType', description='Indicates whether Quota Center sends a notification about the application result. Valid values:
* 0: no
* 3: yes', example='3'),
period?: {
periodUnit?: string(name='PeriodUnit', description='The unit of the calculation cycle of the quota.', example='second'),
periodValue?: int32(name='PeriodValue', description='The value of the calculation cycle of the quota.', example='1'),
}(name='Period', description='The calculation cycle of the quota.'),
productCode?: string(name='ProductCode', description='The abbreviation of the Alibaba Cloud service name.', example='ecs'),
quotaActionCode?: string(name='QuotaActionCode', description='The quota ID.', example='ecs.n1.large'),
quotaArn?: string(name='QuotaArn', description='The Alibaba Cloud Resource Name (ARN) of the quota.', example='acs:quotas:*:120886317861****:quota/csk/q_i5uzm3'),
quotaCategory?: string(name='QuotaCategory', description='The quota type. Valid values:
* CommonQuota (default): general quota
* WhiteListLabel: privilege
* FlowControl: API rate limit', example='CommonQuota'),
quotaDescription?: string(name='QuotaDescription', description='The description of the quota.', example='The maximum number of nodes in a cluster'),
quotaDimension?: map[string]string(name='QuotaDimension', description='The quota dimensions.'),
quotaName?: string(name='QuotaName', description='The quota name.', example='Maximum Number of Nodes'),
quotaUnit?: string(name='QuotaUnit', description='The unit of the quota.', example='GiB'),
reason?: string(name='Reason', description='The reason for the quota increase application.', example='Business expansion'),
status?: string(name='Status', description='The approval status of the quota increase application. Valid values:
* Disagree: The application is rejected.
* Agree: The application is approved.
* Process: The application is pending approval.
* Cancel: The application is canceled.', example='Agree'),
}
](name='QuotaApplications', description='The details of the quota increase application.'),
requestId?: string(name='RequestId', description='The request ID.', example='D47B3A10-CDAC-5412-B2EE-EC9A3DBE9053'),
totalCount?: int32(name='TotalCount', description='The total number of records that are returned for the query.', example='9'),
}
model ListQuotaApplicationsDetailForTemplateResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ListQuotaApplicationsDetailForTemplateResponseBody(name='body'),
}
/**
* @summary Queries the details of a quota increase application for member accounts in a resource directory.
*
* @param request ListQuotaApplicationsDetailForTemplateRequest
* @param runtime runtime options for this request RuntimeOptions
* @return ListQuotaApplicationsDetailForTemplateResponse
*/
async function listQuotaApplicationsDetailForTemplateWithOptions(request: ListQuotaApplicationsDetailForTemplateRequest, runtime: Util.RuntimeOptions): ListQuotaApplicationsDetailForTemplateResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.aliyunUid)) {
body['AliyunUid'] = request.aliyunUid;
}
if (!Util.isUnset(request.batchQuotaApplicationId)) {
body['BatchQuotaApplicationId'] = request.batchQuotaApplicationId;
}
if (!Util.isUnset(request.maxResults)) {
body['MaxResults'] = request.maxResults;
}
if (!Util.isUnset(request.nextToken)) {
body['NextToken'] = request.nextToken;
}
if (!Util.isUnset(request.productCode)) {
body['ProductCode'] = request.productCode;
}
if (!Util.isUnset(request.quotaActionCode)) {
body['QuotaActionCode'] = request.quotaActionCode;
}
if (!Util.isUnset(request.quotaCategory)) {
body['QuotaCategory'] = request.quotaCategory;
}
if (!Util.isUnset(request.status)) {
body['Status'] = request.status;
}
var req = new OpenApi.OpenApiRequest{
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'ListQuotaApplicationsDetailForTemplate',
version = '2020-05-10',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries the details of a quota increase application for member accounts in a resource directory.
*
* @param request ListQuotaApplicationsDetailForTemplateRequest
* @return ListQuotaApplicationsDetailForTemplateResponse
*/
async function listQuotaApplicationsDetailForTemplate(request: ListQuotaApplicationsDetailForTemplateRequest): ListQuotaApplicationsDetailForTemplateResponse {
var runtime = new Util.RuntimeOptions{};
return listQuotaApplicationsDetailForTemplateWithOptions(request, runtime);
}
model ListQuotaApplicationsForTemplateRequest {
applyEndTime?: string(name='ApplyEndTime', description='The UTC time when the quota application ends.', example='2023-05-22T16:00:00Z'),
applyStartTime?: string(name='ApplyStartTime', description='The UTC time when the quota application starts.', example='2023-05-22T16:00:00Z'),
batchQuotaApplicationId?: string(name='BatchQuotaApplicationId', description='The ID of the quota application batch.', example='d314d6ae-867d-484c-9009-3d421a80****'),
maxResults?: int32(name='MaxResults', description='The maximum number of entries to return for a single request.
Valid values: 1 to 100. Default value: 30.', example='30'),
nextToken?: string(name='NextToken', description='The token that marks the position from which you want to start the query.
> An empty value indicates that the query starts from the beginning.', example='4'),
productCode?: string(name='ProductCode', description='The abbreviation of the Alibaba Cloud service name.
> To query the abbreviation of an Alibaba Cloud service name, call the [ListProducts](https://help.aliyun.com/document_detail/440555.html) operation and check the value of `ProductCode` in the response.', example='ecs-spec'),
quotaActionCode?: string(name='QuotaActionCode', description='The quota ID.', example='ecs.g5.2xlarge'),
quotaCategory?: string(name='QuotaCategory', description='The quota type. Valid values:
* CommonQuota: general quota
* FlowControl: API rate limit
* WhiteListLabel: privilege', example='CommonQuota'),
}
model ListQuotaApplicationsForTemplateResponseBody = {
maxResults?: int32(name='MaxResults', description='The maximum number of records that can be returned for the query.', example='30'),
nextToken?: string(name='NextToken', description='The token that marks the position from which you want to start the query.', example='1'),
quotaBatchApplications?: [
{
aliyunUids?: [ string ](name='AliyunUids', description='The Alibaba Cloud accounts that correspond to the resource directory members for which the quotas are applied.'),
applyTime?: string(name='ApplyTime', description='The time when the quota increase application was submitted. The value is displayed in UTC.', example='2022-09-23T02:38:18Z'),
auditStatusVos?: [
{
count?: int32(name='Count', description='The number of approval tickets.', example='4'),
status?: string(name='Status', description='The approval state of the quota increase application. Valid values:
* Disagree: The application is rejected.
* Agree: The application is approved.
* Process: The application is in review.
* Cancel: The application is canceled.', example='Agree'),
}
](name='AuditStatusVos', description='The number of applications in different approval states.'),
batchQuotaApplicationId?: string(name='BatchQuotaApplicationId', description='The ID of the quota application batch.', example='d314d6ae-867d-484c-9009-3d421a80****'),
desireValue?: double(name='DesireValue', description='The requested value of the quota.', example='105'),
dimensions?: map[string]any(name='Dimensions', description='The quota dimensions.
Format example: {"regionId":"cn-hangzhou"}.', example='{"regionId":"cn-hangzhou"}'),
effectiveTime?: string(name='EffectiveTime', description='The start time of the validity period of the quota. The value is displayed in UTC.', example='2023-05-22T16:00:00Z'),
expireTime?: string(name='ExpireTime', description='The end time of the validity period of the quota. The value is displayed in UTC.', example='2024-05-14T02:08:56Z'),
productCode?: string(name='ProductCode', description='The abbreviation of the Alibaba Cloud service name.', example='vpc'),
quotaActionCode?: string(name='QuotaActionCode', description='The quota ID.', example='q_fhoz4k'),
quotaCategory?: string(name='QuotaCategory', description='The quota type. Valid values:
* CommonQuota: general quota
* FlowControl: API rate limit
* WhiteListLabel: privilege', example='CommonQuota'),
reason?: string(name='Reason', description='The reason for the quota increase application.', example='Business expansion'),
}
](name='QuotaBatchApplications', description='The queried quota application records.'),
requestId?: string(name='RequestId', description='The request ID.', example='D47B3A10-CDAC-5412-B2EE-EC9A3DBE9053'),
totalCount?: int32(name='TotalCount', description='The total number of records that are returned for the query.', example='67'),
}
model ListQuotaApplicationsForTemplateResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ListQuotaApplicationsForTemplateResponseBody(name='body'),
}
/**
* @summary Queries the application records of a quota template that is used to apply for quotas for member accounts.
*
* @param request ListQuotaApplicationsForTemplateRequest
* @param runtime runtime options for this request RuntimeOptions
* @return ListQuotaApplicationsForTemplateResponse
*/
async function listQuotaApplicationsForTemplateWithOptions(request: ListQuotaApplicationsForTemplateRequest, runtime: Util.RuntimeOptions): ListQuotaApplicationsForTemplateResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.applyEndTime)) {
body['ApplyEndTime'] = request.applyEndTime;
}
if (!Util.isUnset(request.applyStartTime)) {
body['ApplyStartTime'] = request.applyStartTime;
}
if (!Util.isUnset(request.batchQuotaApplicationId)) {
body['BatchQuotaApplicationId'] = request.batchQuotaApplicationId;
}
if (!Util.isUnset(request.maxResults)) {
body['MaxResults'] = request.maxResults;
}
if (!Util.isUnset(request.nextToken)) {
body['NextToken'] = request.nextToken;
}
if (!Util.isUnset(request.productCode)) {
body['ProductCode'] = request.productCode;
}
if (!Util.isUnset(request.quotaActionCode)) {
body['QuotaActionCode'] = request.quotaActionCode;
}
if (!Util.isUnset(request.quotaCategory)) {
body['QuotaCategory'] = request.quotaCategory;
}
var req = new OpenApi.OpenApiRequest{
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'ListQuotaApplicationsForTemplate',
version = '2020-05-10',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries the application records of a quota template that is used to apply for quotas for member accounts.
*
* @param request ListQuotaApplicationsForTemplateRequest
* @return ListQuotaApplicationsForTemplateResponse
*/
async function listQuotaApplicationsForTemplate(request: ListQuotaApplicationsForTemplateRequest): ListQuotaApplicationsForTemplateResponse {
var runtime = new Util.RuntimeOptions{};
return listQuotaApplicationsForTemplateWithOptions(request, runtime);
}
model ModifyQuotaTemplateServiceStatusRequest {
serviceStatus?: int32(name='ServiceStatus', description='The status of the quota template. Valid values:
* \\\\-1: The quota template is disabled.
* 1: The quota template is enabled.
This parameter is required.', example='1'),
}
model ModifyQuotaTemplateServiceStatusResponseBody = {
requestId?: string(name='RequestId', description='The ID of the request.', example='D47B3A10-CDAC-5412-B2EE-EC9A3DBE9053'),
templateServiceStatus?: {
resourceDirectoryId?: string(name='ResourceDirectoryId', description='The ID of the resource directory.', example='rd-pG****'),
serviceStatus?: int32(name='ServiceStatus', description='The status of the quota template. Valid values:
* \\\\-1: The quota template is disabled.
* 1: The quota template is enabled.', example='1'),
}(name='TemplateServiceStatus', description='The status of the quota template.'),
}
model ModifyQuotaTemplateServiceStatusResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ModifyQuotaTemplateServiceStatusResponseBody(name='body'),
}
/**
* @summary Changes the status of a quota template. By default, the quota template is not configured. If the management account of a resource directory uses a quota template for the first time, you must enable the quota template.
*
* @description ### [](#)Prerequisites
* A resource directory is enabled. For more information, see [EnableResourceDirectory](https://help.aliyun.com/document_detail/604185.html).
* ### [](#)Usage notes
* If the `ServiceStatus` parameter is set to `0` or `-1`, you can call this operation to set the parameter to `1`. Then, you can call the [CreateTemplateQuotaItem](https://help.aliyun.com/document_detail/450615.html) operation to create a quota template.
*
* @param request ModifyQuotaTemplateServiceStatusRequest
* @param runtime runtime options for this request RuntimeOptions
* @return ModifyQuotaTemplateServiceStatusResponse
*/
async function modifyQuotaTemplateServiceStatusWithOptions(request: ModifyQuotaTemplateServiceStatusRequest, runtime: Util.RuntimeOptions): ModifyQuotaTemplateServiceStatusResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.serviceStatus)) {
body['ServiceStatus'] = request.serviceStatus;
}
var req = new OpenApi.OpenApiRequest{
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'ModifyQuotaTemplateServiceStatus',
version = '2020-05-10',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Changes the status of a quota template. By default, the quota template is not configured. If the management account of a resource directory uses a quota template for the first time, you must enable the quota template.
*
* @description ### [](#)Prerequisites
* A resource directory is enabled. For more information, see [EnableResourceDirectory](https://help.aliyun.com/document_detail/604185.html).
* ### [](#)Usage notes
* If the `ServiceStatus` parameter is set to `0` or `-1`, you can call this operation to set the parameter to `1`. Then, you can call the [CreateTemplateQuotaItem](https://help.aliyun.com/document_detail/450615.html) operation to create a quota template.
*
* @param request ModifyQuotaTemplateServiceStatusRequest
* @return ModifyQuotaTemplateServiceStatusResponse
*/
async function modifyQuotaTemplateServiceStatus(request: ModifyQuotaTemplateServiceStatusRequest): ModifyQuotaTemplateServiceStatusResponse {
var runtime = new Util.RuntimeOptions{};
return modifyQuotaTemplateServiceStatusWithOptions(request, runtime);
}
model ModifyTemplateQuotaItemRequest {
desireValue?: float(name='DesireValue', example='804'),
dimensions?: [
{
key?: string(name='Key', example='regionId'),
value?: string(name='Value', example='cn-hangzhou'),
}
](name='Dimensions'),
effectiveTime?: string(name='EffectiveTime', example='2021-01-19T09:25:56Z'),
envLanguage?: string(name='EnvLanguage', example='zh'),
expireTime?: string(name='ExpireTime', example='2021-01-20T09:25:56Z'),
id?: string(name='Id', description='This parameter is required.', example='1****'),
noticeType?: long(name='NoticeType', example='0'),
productCode?: string(name='ProductCode', example='ecs'),
quotaActionCode?: string(name='QuotaActionCode', example='q_security-groups'),
quotaCategory?: string(name='QuotaCategory', example='CommonQuota'),
}
model ModifyTemplateQuotaItemResponseBody = {
id?: string(name='Id', example='1****'),
requestId?: string(name='RequestId', example='D47B3A10-CDAC-5412-B2EE-EC9A3DBE9053'),
}
model ModifyTemplateQuotaItemResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ModifyTemplateQuotaItemResponseBody(name='body'),
}
/**
* @summary The ID of the quota template.
*
* @param request ModifyTemplateQuotaItemRequest
* @param runtime runtime options for this request RuntimeOptions
* @return ModifyTemplateQuotaItemResponse
*/
async function modifyTemplateQuotaItemWithOptions(request: ModifyTemplateQuotaItemRequest, runtime: Util.RuntimeOptions): ModifyTemplateQuotaItemResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.quotaCategory)) {
query['QuotaCategory'] = request.quotaCategory;
}
var body : map[string]any = {};
if (!Util.isUnset(request.desireValue)) {
body['DesireValue'] = request.desireValue;
}
if (!Util.isUnset(request.dimensions)) {
body['Dimensions'] = request.dimensions;
}
if (!Util.isUnset(request.effectiveTime)) {
body['EffectiveTime'] = request.effectiveTime;
}
if (!Util.isUnset(request.envLanguage)) {
body['EnvLanguage'] = request.envLanguage;
}
if (!Util.isUnset(request.expireTime)) {
body['ExpireTime'] = request.expireTime;
}
if (!Util.isUnset(request.id)) {
body['Id'] = request.id;
}
if (!Util.isUnset(request.noticeType)) {
body['NoticeType'] = request.noticeType;
}
if (!Util.isUnset(request.productCode)) {
body['ProductCode'] = request.productCode;
}
if (!Util.isUnset(request.quotaActionCode)) {
body['QuotaActionCode'] = request.quotaActionCode;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'ModifyTemplateQuotaItem',
version = '2020-05-10',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary The ID of the quota template.
*
* @param request ModifyTemplateQuotaItemRequest
* @return ModifyTemplateQuotaItemResponse
*/
async function modifyTemplateQuotaItem(request: ModifyTemplateQuotaItemRequest): ModifyTemplateQuotaItemResponse {
var runtime = new Util.RuntimeOptions{};
return modifyTemplateQuotaItemWithOptions(request, runtime);
}
model RemindQuotaApplicationApprovalRequest {
applicationId?: string(name='ApplicationId', description='The quota application ID.
For more information about how to obtain the ID of a quota application, see [ListQuotaApplications](https://help.aliyun.com/document_detail/440568.html).', example='219f1ff6-6205-495f-bda7-90d2fe945e****'),
}
model RemindQuotaApplicationApprovalResponseBody = {
allowRetry?: boolean(name='AllowRetry', description='Indicates whether retries are allowed. Valid values:
* false
* true', example='false'),
dynamicCode?: string(name='DynamicCode', description='The dynamic error code.', example='PARAMETER.ILLEGALL'),
dynamicMessage?: string(name='DynamicMessage', description='The dynamic error message.', example='Parameter[%s] is required.'),
errorArgs?: [ any ](name='ErrorArgs', description='The parameters whose values are invalid.'),
errorCode?: string(name='ErrorCode', description='The error code.', example='RAM.PERMISSION.DENIED'),
errorMsg?: string(name='ErrorMsg', description='The error message.', example='You are not authorized to do this action or the API input parameter is invalid.'),
httpStatusCode?: int32(name='HttpStatusCode', description='The HTTP status code.', example='200'),
module?: string(name='Module', description='The quota application ID.', example='219f1ff6-6205-495f-bda7-90d2fe945e****'),
requestId?: string(name='RequestId', description='The request ID.', example='D47B3A10-CDAC-5412-B2EE-EC9A3DBE9053'),
success?: boolean(name='Success', description='Indicates whether the request was successful. Valid values:
* true
* false', example='true'),
}
model RemindQuotaApplicationApprovalResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: RemindQuotaApplicationApprovalResponseBody(name='body'),
}
/**
* @summary Reminds the approver of a quota application to review the application. This operation is applicable to quota applications that support the approval reminding feature.
*
* @description > You can call this operation to enable the approval reminder feature for quota applications that support this feature. To check whether this feature is supported, you can view the value of `SupportReminder` in the GetQuotaApplicationApproval operation. If the value of SupportReminder is `true`, this feature is supported.
*
* @param request RemindQuotaApplicationApprovalRequest
* @param runtime runtime options for this request RuntimeOptions
* @return RemindQuotaApplicationApprovalResponse
*/
async function remindQuotaApplicationApprovalWithOptions(request: RemindQuotaApplicationApprovalRequest, runtime: Util.RuntimeOptions): RemindQuotaApplicationApprovalResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.applicationId)) {
body['ApplicationId'] = request.applicationId;
}
var req = new OpenApi.OpenApiRequest{
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'RemindQuotaApplicationApproval',
version = '2020-05-10',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Reminds the approver of a quota application to review the application. This operation is applicable to quota applications that support the approval reminding feature.
*
* @description > You can call this operation to enable the approval reminder feature for quota applications that support this feature. To check whether this feature is supported, you can view the value of `SupportReminder` in the GetQuotaApplicationApproval operation. If the value of SupportReminder is `true`, this feature is supported.
*
* @param request RemindQuotaApplicationApprovalRequest
* @return RemindQuotaApplicationApprovalResponse
*/
async function remindQuotaApplicationApproval(request: RemindQuotaApplicationApprovalRequest): RemindQuotaApplicationApprovalResponse {
var runtime = new Util.RuntimeOptions{};
return remindQuotaApplicationApprovalWithOptions(request, runtime);
}
model UpdateQuotaAlarmRequest {
alarmId?: string(name='AlarmId', description='The ID of the quota alert.
> You can call the [ListQuotaAlarms](https://help.aliyun.com/document_detail/440561.html) operation to obtain the ID of a quota alert.
This parameter is required.', example='a2efa7fc-832f-47bb-8054-39e28012****'),
alarmName?: string(name='AlarmName', description='The name of the quota alert.
> You can call the [ListQuotaAlarms](https://help.aliyun.com/document_detail/440561.html) operation to obtain the name of a quota alert.
This parameter is required.', example='rules'),
threshold?: float(name='Threshold', description='The numeric value of the alert threshold. Valid values:
* If you set the `ThresholdType` parameter to `used`, you will receive an alert notification when the used quota is greater than or equal to the preset alert threshold. The alert threshold must be greater than the current used quota.
* If you set the `ThresholdType` parameter to `usable`, you will receive an alert notification when the available quota is less than or equal to the preset alert threshold. The alert threshold must be less than the current available quota.
> You must set one of the Threshold and ThresholdPercent parameters.', example='160'),
thresholdPercent?: float(name='ThresholdPercent', description='The percentage of the alert threshold. Valid values:
* If you set `ThresholdType` to `used`, you receive an alert notification when the used quota is greater than or equal to the preset percentage of the alert threshold. Value range: (50%, 100%].
* If you set `ThresholdType` to `usable`, you receive an alert notification when the available quota is less than or equal to the preset percentage of the alert threshold. Value range: (0%, 50%].
> You must set one of Threshold and ThresholdPercent.', example='51'),
thresholdType?: string(name='ThresholdType', description='The type of the quota alert. Valid values:
* used (default): The alert is created for the used quota.
* usable: The alert is created for the available quota.', example='usable'),
webHook?: string(name='WebHook', description='The webhook URL. Quota Center sends alert notifications to the specified URL by using HTTP POST requests.', example='https://alert.aliyun.com/callback'),
}
model UpdateQuotaAlarmResponseBody = {
requestId?: string(name='RequestId', description='The ID of the request.', example='A95C65B3-7CF4-469E-B1D5-1CA0628A6411'),
}
model UpdateQuotaAlarmResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: UpdateQuotaAlarmResponseBody(name='body'),
}
/**
* @summary Modifies a quota alert rule.
*
* @description In this example, the operation is called to modify the information about a quota alert whose ID is `a2efa7fc-832f-47bb-8054-39e28012****` and whose name is `rules`. The alert threshold is changed from `150` to `160`.
*
* @param request UpdateQuotaAlarmRequest
* @param runtime runtime options for this request RuntimeOptions
* @return UpdateQuotaAlarmResponse
*/
async function updateQuotaAlarmWithOptions(request: UpdateQuotaAlarmRequest, runtime: Util.RuntimeOptions): UpdateQuotaAlarmResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.alarmId)) {
body['AlarmId'] = request.alarmId;
}
if (!Util.isUnset(request.alarmName)) {
body['AlarmName'] = request.alarmName;
}
if (!Util.isUnset(request.threshold)) {
body['Threshold'] = request.threshold;
}
if (!Util.isUnset(request.thresholdPercent)) {
body['ThresholdPercent'] = request.thresholdPercent;
}
if (!Util.isUnset(request.thresholdType)) {
body['ThresholdType'] = request.thresholdType;
}
if (!Util.isUnset(request.webHook)) {
body['WebHook'] = request.webHook;
}
var req = new OpenApi.OpenApiRequest{
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'UpdateQuotaAlarm',
version = '2020-05-10',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Modifies a quota alert rule.
*
* @description In this example, the operation is called to modify the information about a quota alert whose ID is `a2efa7fc-832f-47bb-8054-39e28012****` and whose name is `rules`. The alert threshold is changed from `150` to `160`.
*
* @param request UpdateQuotaAlarmRequest
* @return UpdateQuotaAlarmResponse
*/
async function updateQuotaAlarm(request: UpdateQuotaAlarmRequest): UpdateQuotaAlarmResponse {
var runtime = new Util.RuntimeOptions{};
return updateQuotaAlarmWithOptions(request, runtime);
}