Getting started with Yandex Cloud Quota Manager
Note
The service is at the Preview stage.
When designing a cloud infrastructure, it is important to take quotas and limits into consideration. Cloud Quota Manager allows you to manage quotas of all your Yandex Cloud services using different interfaces.
Quotas are limits on the number of resources you can use in your cloud. These are organizational constraints that can be changed as needed. Quotas help you avoid overspending and excessive use of resources through sensible budget planning and consumption management.
There are two terms that describe the use of quotas:
-
Quota limit: Current limit in place for a cloud or organization resource.
-
Quota usage: Amount or size of the actually used resource.
Potentially, you can increase your quotas up to the limits.
Limits are technical constraints due to the Yandex Cloud architecture, physical characteristics of the hardware, or external limitations.
Currently, you can use the following quota management interfaces:
Going forward, you will also be able to get information and request quota updates via the CLI and API.
Getting information about quotas
-
In the management console
, select the cloud to view quotas for. -
Select the Quotas tab.
The page will display a list of services used in your cloud.
-
Expand the relevant service section and view the values in the Usage column.
-
Two numbers stand for
consumed quota / quota value
, e.g.,2 / 20
or1.203 / 5,120 GB
. -
A single number is a non-adjustable
limit
.
-
-
To estimate resource consumption, at the top right, select:
- Actively used: Resources consuming over a half of the quota.
- Almost exhausted: Resources that are almost exhausted.
Configure operations via the API
-
To check that you can work with quotas via the API, install these utilities:
-
Create a service account with the
quota-manager.viewer
role. -
Get an IAM token for the created service account.
View the quotas
-
View the list of services with quotas.
To do this, use the listServices REST API method for the QuotaLimit resource or the QuotaLimitService/ListServices gRPC API call.
To test the REST API method, send this request:
curl -X GET \ --header "Authorization: Bearer <IAM_token>" \ "https://quota-manager.api.cloud.yandex.net/quota-manager/v1/quotaLimits/services?resourceType=<resourceType>"
Where:
<resourceType>
: Resource type,resource-manager.cloud
,organization-manager.organization
, orbilling.account
.<IAM_token>
: Service account IAM token or the environment variable containing the token.
Request example:
curl -X GET \ --header "Authorization: Bearer $IAM_TOKEN" \ 'https://quota-manager.api.cloud.yandex.net/quota-manager/v1/quotaLimits/services?resourceType=resource-manager.cloud'
-
View a list of quotas for a specific service.
To do this, use the list REST API method for the QuotaLimit resource or the QuotaLimitService/List gRPC API call.
To test the REST API method, send this request:
curl -X GET \ --header "Authorization: Bearer <IAM_token>" \ "https://quota-manager.api.cloud.yandex.net/quota-manager/v1/quotaLimits?service=<serviceName>&resource.id=<resourceId>&resource.type=<resourceType>"
Where:
<resourceId>
: Resource ID.<resourceType>
: Resource type,resource-manager.cloud
,organization-manager.organization
, orbilling.account
.<serviceName>
: Service name.<IAM_token>
: Service account IAM token or the environment variable containing the token.
Request example:
curl -X GET \ --header "Authorization: Bearer $IAM_TOKEN" \ 'https://quota-manager.api.cloud.yandex.net/quota-manager/v1/quotaLimits?service=iam&resource.id=yc.iam.service-cloud&resource.type=resource-manager.cloud'
-
View the value of a specific quota.
To do this, use the get REST API method for the QuotaLimit resource or the QuotaLimitService/Get gRPC API call.
To test the REST API method, send this request:
curl -X GET \ --header "Authorization: Bearer <IAM_token>" \ "https://quota-manager.api.cloud.yandex.net/quota-manager/v1/quotaLimits/<quotaId>?resource.id=<resourceId>&resource.type=<resourceType>"
Where:
<quotaId>
: Quota ID you got in the previous step.<resourceId>
: Resource ID.<resourceType>
: Resource type,resource-manager.cloud
,organization-manager.organization
, orbilling.account
.<IAM_token>
: Service account IAM token or the environment variable containing the token.
Request example:
curl -X GET \ --header "Authorization: Bearer $IAM_TOKEN" \ 'https://quota-manager.api.cloud.yandex.net/quota-manager/v1/quotaLimits/iam.accessKeys.count?resource.id=yc.iam.service-cloud&resource.type=resource-manager.cloud'
Requesting a quota increase
Currently, you can request quota updates via the management console
- Make sure your account
has thequota-manager.requestOperator
role or higher (editor
oradmin
). - Request a quota update using one of the following methods:
- Select the resources on the quota page
and click Increase. - Contact support
and describe which quotas you want increased and by how much.
- Select the resources on the quota page