The Cloud Quotas API is an infrastructure service for Google Cloud that lets service consumers list and manage their resource usage limits.
- List/Get the metadata and current status of the quotas for a service.
- Create/Update quota preferencess that declare the preferred quota values.
- Check the status of a quota preference request.
- List/Get pending and historical quota preference.
Equality
Instances of this class created via copy-construction or copy-assignment always compare equal. Instances created with equal std::shared_ptr<*Connection>
objects compare equal. Objects that compare equal share the same underlying resources.
Performance
Creating a new instance of this class is a relatively expensive operation, new objects establish new connections to the service. In contrast, copy-construction, move-construction, and the corresponding assignment operations are relatively efficient as the copies share all underlying resources.
Thread Safety
Concurrent access to different instances of this class, even if they compare equal, is guaranteed to work. Two or more threads operating on the same instance of this class is not guaranteed to work. Since copy-construction and move-construction is a relatively efficient operation, consider using such a copy when using this class from multiple threads.
Constructors
CloudQuotasClient(CloudQuotasClient const &)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
CloudQuotasClient const &
|
CloudQuotasClient(CloudQuotasClient &&)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
CloudQuotasClient &&
|
CloudQuotasClient(std::shared_ptr< CloudQuotasConnection >, Options)
Parameters | |
---|---|
Name | Description |
connection |
std::shared_ptr< CloudQuotasConnection >
|
opts |
Options
|
Operators
operator=(CloudQuotasClient const &)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
CloudQuotasClient const &
|
Returns | |
---|---|
Type | Description |
CloudQuotasClient & |
operator=(CloudQuotasClient &&)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
CloudQuotasClient &&
|
Returns | |
---|---|
Type | Description |
CloudQuotasClient & |
Functions
ListQuotaInfos(std::string const &, Options)
Lists QuotaInfos of all quotas for a given project, folder or organization.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
Required. Parent value of QuotaInfo resources. Listing across different resource containers (such as 'projects/-') is not allowed. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::api::cloudquotas::v1::QuotaInfo > | a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
ListQuotaInfos(google::api::cloudquotas::v1::ListQuotaInfosRequest, Options)
Lists QuotaInfos of all quotas for a given project, folder or organization.
Parameters | |
---|---|
Name | Description |
request |
google::api::cloudquotas::v1::ListQuotaInfosRequest
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::api::cloudquotas::v1::QuotaInfo > | a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
GetQuotaInfo(std::string const &, Options)
Retrieve the QuotaInfo of a quota for a project, folder or organization.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
Required. The resource name of the quota info. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::api::cloudquotas::v1::QuotaInfo > | the result of the RPC. The response message type (google.api.cloudquotas.v1.QuotaInfo) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
GetQuotaInfo(google::api::cloudquotas::v1::GetQuotaInfoRequest const &, Options)
Retrieve the QuotaInfo of a quota for a project, folder or organization.
Parameters | |
---|---|
Name | Description |
request |
google::api::cloudquotas::v1::GetQuotaInfoRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::api::cloudquotas::v1::QuotaInfo > | the result of the RPC. The response message type (google.api.cloudquotas.v1.QuotaInfo) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
ListQuotaPreferences(std::string const &, Options)
Lists QuotaPreferences in a given project, folder or organization.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
Required. Parent value of QuotaPreference resources. Listing across different resource containers (such as 'projects/-') is not allowed. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::api::cloudquotas::v1::QuotaPreference > | a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
ListQuotaPreferences(google::api::cloudquotas::v1::ListQuotaPreferencesRequest, Options)
Lists QuotaPreferences in a given project, folder or organization.
Parameters | |
---|---|
Name | Description |
request |
google::api::cloudquotas::v1::ListQuotaPreferencesRequest
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::api::cloudquotas::v1::QuotaPreference > | a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
GetQuotaPreference(std::string const &, Options)
Gets details of a single QuotaPreference.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
Required. Name of the resource |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::api::cloudquotas::v1::QuotaPreference > | the result of the RPC. The response message type (google.api.cloudquotas.v1.QuotaPreference) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
GetQuotaPreference(google::api::cloudquotas::v1::GetQuotaPreferenceRequest const &, Options)
Gets details of a single QuotaPreference.
Parameters | |
---|---|
Name | Description |
request |
google::api::cloudquotas::v1::GetQuotaPreferenceRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::api::cloudquotas::v1::QuotaPreference > | the result of the RPC. The response message type (google.api.cloudquotas.v1.QuotaPreference) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
CreateQuotaPreference(std::string const &, google::api::cloudquotas::v1::QuotaPreference const &, std::string const &, Options)
Creates a new QuotaPreference that declares the desired value for a quota.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
Required. Value for parent. |
quota_preference |
google::api::cloudquotas::v1::QuotaPreference const &
Required. The resource being created |
quota_preference_id |
std::string const &
Optional. Id of the requesting object, must be unique under its parent. If client does not set this field, the service will generate one. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::api::cloudquotas::v1::QuotaPreference > | the result of the RPC. The response message type (google.api.cloudquotas.v1.QuotaPreference) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
CreateQuotaPreference(std::string const &, google::api::cloudquotas::v1::QuotaPreference const &, Options)
Creates a new QuotaPreference that declares the desired value for a quota.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
Required. Value for parent. |
quota_preference |
google::api::cloudquotas::v1::QuotaPreference const &
Required. The resource being created |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::api::cloudquotas::v1::QuotaPreference > | the result of the RPC. The response message type (google.api.cloudquotas.v1.QuotaPreference) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
CreateQuotaPreference(google::api::cloudquotas::v1::CreateQuotaPreferenceRequest const &, Options)
Creates a new QuotaPreference that declares the desired value for a quota.
Parameters | |
---|---|
Name | Description |
request |
google::api::cloudquotas::v1::CreateQuotaPreferenceRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::api::cloudquotas::v1::QuotaPreference > | the result of the RPC. The response message type (google.api.cloudquotas.v1.QuotaPreference) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
UpdateQuotaPreference(google::api::cloudquotas::v1::QuotaPreference const &, google::protobuf::FieldMask const &, Options)
Updates the parameters of a single QuotaPreference.
It can updates the config in any states, not just the ones pending approval.
Parameters | |
---|---|
Name | Description |
quota_preference |
google::api::cloudquotas::v1::QuotaPreference const &
Required. The resource being updated |
update_mask |
google::protobuf::FieldMask const &
Optional. Field mask is used to specify the fields to be overwritten in the QuotaPreference resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::api::cloudquotas::v1::QuotaPreference > | the result of the RPC. The response message type (google.api.cloudquotas.v1.QuotaPreference) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
UpdateQuotaPreference(google::api::cloudquotas::v1::UpdateQuotaPreferenceRequest const &, Options)
Updates the parameters of a single QuotaPreference.
It can updates the config in any states, not just the ones pending approval.
Parameters | |
---|---|
Name | Description |
request |
google::api::cloudquotas::v1::UpdateQuotaPreferenceRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::api::cloudquotas::v1::QuotaPreference > | the result of the RPC. The response message type (google.api.cloudquotas.v1.QuotaPreference) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |