google_api_service_control v0.1.0 GoogleApi.ServiceControl.V1.Api.Services View Source
API calls for all endpoints tagged Services
.
Link to this section Summary
Functions
Attempts to allocate quota for the specified consumer. It should be called before the operation is executed. This method requires the `servicemanagement.services.quota` permission on the specified service. For more information, see Cloud IAM. NOTE: The client must fail-open on server errors `INTERNAL`, `UNKNOWN`, `DEADLINE_EXCEEDED`, and `UNAVAILABLE`. To ensure system reliability, the server may inject these errors to prohibit any hard dependency on the quota functionality
Checks whether an operation on a service should be allowed to proceed based on the configuration of the service and related policies. It must be called before the operation is executed. If feasible, the client should cache the check results and reuse them for 60 seconds. In case of any server errors, the client should rely on the cached results for much longer time to avoid outage. WARNING: There is general 60s delay for the configuration and policy propagation, therefore callers MUST NOT depend on the `Check` method having the latest policy information. NOTE: the CheckRequest has the size limit of 64KB. This method requires the `servicemanagement.services.check` permission on the specified service. For more information, see Cloud IAM
Signals the quota controller that service ends the ongoing usage reconciliation. This method requires the `servicemanagement.services.quota` permission on the specified service. For more information, see Google Cloud IAM
Releases previously allocated quota done through AllocateQuota method. This method requires the `servicemanagement.services.quota` permission on the specified service. For more information, see Cloud IAM. NOTE: The client must fail-open on server errors `INTERNAL`, `UNKNOWN`, `DEADLINE_EXCEEDED`, and `UNAVAILABLE`. To ensure system reliability, the server may inject these errors to prohibit any hard dependency on the quota functionality
Reports operation results to Google Service Control, such as logs and metrics. It should be called after an operation is completed. If feasible, the client should aggregate reporting data for up to 5 seconds to reduce API traffic. Limiting aggregation to 5 seconds is to reduce data loss during client crashes. Clients should carefully choose the aggregation time window to avoid data loss risk more than 0.01% for business and compliance reasons. NOTE: the ReportRequest has the size limit of 1MB. This method requires the `servicemanagement.services.report` permission on the specified service. For more information, see Google Cloud IAM
Unlike rate quota, allocation quota does not get refilled periodically. So, it is possible that the quota usage as seen by the service differs from what the One Platform considers the usage is. This is expected to happen only rarely, but over time this can accumulate. Services can invoke StartReconciliation and EndReconciliation to correct this usage drift, as described below: 1. Service sends StartReconciliation with a timestamp in future for each metric that needs to be reconciled. The timestamp being in future allows to account for in-flight AllocateQuota and ReleaseQuota requests for the same metric. 2. One Platform records this timestamp and starts tracking subsequent AllocateQuota and ReleaseQuota requests until EndReconciliation is called. 3. At or after the time specified in the StartReconciliation, service sends EndReconciliation with the usage that needs to be reconciled to. 4. One Platform adjusts its own record of usage for that metric to the value specified in EndReconciliation by taking in to account any allocation or release between StartReconciliation and EndReconciliation. Signals the quota controller that the service wants to perform a usage reconciliation as specified in the request. This method requires the `servicemanagement.services.quota` permission on the specified service. For more information, see Google Cloud IAM
Link to this section Functions
servicecontrol_services_allocate_quota( Tesla.Env.client(), String.t(), keyword() ) :: {:ok, GoogleApi.ServiceControl.V1.Model.AllocateQuotaResponse.t()} | {:error, Tesla.Env.t()}
Attempts to allocate quota for the specified consumer. It should be called before the operation is executed. This method requires the `servicemanagement.services.quota` permission on the specified service. For more information, see Cloud IAM. NOTE: The client must fail-open on server errors `INTERNAL`, `UNKNOWN`, `DEADLINE_EXCEEDED`, and `UNAVAILABLE`. To ensure system reliability, the server may inject these errors to prohibit any hard dependency on the quota functionality.
Parameters
- connection (GoogleApi.ServiceControl.V1.Connection): Connection to server
- service_name (String.t): Name of the service as specified in the service configuration. For example, `"pubsub.googleapis.com"`. See google.api.Service for the definition of a service name.
opts (KeywordList): [optional] Optional parameters
- :callback (String.t): JSONP
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :$.xgafv (String.t): V1 error format.
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
- :upload_protocol (String.t): Upload protocol for media (e.g. "raw", "multipart").
- :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. "media", "multipart").
- :body (AllocateQuotaRequest):
Returns
{:ok, %GoogleApi.ServiceControl.V1.Model.AllocateQuotaResponse{}} on success {:error, info} on failure
servicecontrol_services_check(Tesla.Env.client(), String.t(), keyword()) :: {:ok, GoogleApi.ServiceControl.V1.Model.CheckResponse.t()} | {:error, Tesla.Env.t()}
Checks whether an operation on a service should be allowed to proceed based on the configuration of the service and related policies. It must be called before the operation is executed. If feasible, the client should cache the check results and reuse them for 60 seconds. In case of any server errors, the client should rely on the cached results for much longer time to avoid outage. WARNING: There is general 60s delay for the configuration and policy propagation, therefore callers MUST NOT depend on the `Check` method having the latest policy information. NOTE: the CheckRequest has the size limit of 64KB. This method requires the `servicemanagement.services.check` permission on the specified service. For more information, see Cloud IAM.
Parameters
- connection (GoogleApi.ServiceControl.V1.Connection): Connection to server
- service_name (String.t): The service name as specified in its service configuration. For example, `"pubsub.googleapis.com"`. See google.api.Service for the definition of a service name.
opts (KeywordList): [optional] Optional parameters
- :callback (String.t): JSONP
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :$.xgafv (String.t): V1 error format.
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
- :upload_protocol (String.t): Upload protocol for media (e.g. "raw", "multipart").
- :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. "media", "multipart").
- :body (CheckRequest):
Returns
{:ok, %GoogleApi.ServiceControl.V1.Model.CheckResponse{}} on success {:error, info} on failure
servicecontrol_services_end_reconciliation( Tesla.Env.client(), String.t(), keyword() ) :: {:ok, GoogleApi.ServiceControl.V1.Model.EndReconciliationResponse.t()} | {:error, Tesla.Env.t()}
Signals the quota controller that service ends the ongoing usage reconciliation. This method requires the `servicemanagement.services.quota` permission on the specified service. For more information, see Google Cloud IAM.
Parameters
- connection (GoogleApi.ServiceControl.V1.Connection): Connection to server
- service_name (String.t): Name of the service as specified in the service configuration. For example, `"pubsub.googleapis.com"`. See google.api.Service for the definition of a service name.
opts (KeywordList): [optional] Optional parameters
- :callback (String.t): JSONP
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :$.xgafv (String.t): V1 error format.
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
- :upload_protocol (String.t): Upload protocol for media (e.g. "raw", "multipart").
- :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. "media", "multipart").
- :body (EndReconciliationRequest):
Returns
{:ok, %GoogleApi.ServiceControl.V1.Model.EndReconciliationResponse{}} on success {:error, info} on failure
servicecontrol_services_release_quota(Tesla.Env.client(), String.t(), keyword()) :: {:ok, GoogleApi.ServiceControl.V1.Model.ReleaseQuotaResponse.t()} | {:error, Tesla.Env.t()}
Releases previously allocated quota done through AllocateQuota method. This method requires the `servicemanagement.services.quota` permission on the specified service. For more information, see Cloud IAM. NOTE: The client must fail-open on server errors `INTERNAL`, `UNKNOWN`, `DEADLINE_EXCEEDED`, and `UNAVAILABLE`. To ensure system reliability, the server may inject these errors to prohibit any hard dependency on the quota functionality.
Parameters
- connection (GoogleApi.ServiceControl.V1.Connection): Connection to server
- service_name (String.t): Name of the service as specified in the service configuration. For example, `"pubsub.googleapis.com"`. See google.api.Service for the definition of a service name.
opts (KeywordList): [optional] Optional parameters
- :callback (String.t): JSONP
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :$.xgafv (String.t): V1 error format.
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
- :upload_protocol (String.t): Upload protocol for media (e.g. "raw", "multipart").
- :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. "media", "multipart").
- :body (ReleaseQuotaRequest):
Returns
{:ok, %GoogleApi.ServiceControl.V1.Model.ReleaseQuotaResponse{}} on success {:error, info} on failure
servicecontrol_services_report(Tesla.Env.client(), String.t(), keyword()) :: {:ok, GoogleApi.ServiceControl.V1.Model.ReportResponse.t()} | {:error, Tesla.Env.t()}
Reports operation results to Google Service Control, such as logs and metrics. It should be called after an operation is completed. If feasible, the client should aggregate reporting data for up to 5 seconds to reduce API traffic. Limiting aggregation to 5 seconds is to reduce data loss during client crashes. Clients should carefully choose the aggregation time window to avoid data loss risk more than 0.01% for business and compliance reasons. NOTE: the ReportRequest has the size limit of 1MB. This method requires the `servicemanagement.services.report` permission on the specified service. For more information, see Google Cloud IAM.
Parameters
- connection (GoogleApi.ServiceControl.V1.Connection): Connection to server
- service_name (String.t): The service name as specified in its service configuration. For example, `"pubsub.googleapis.com"`. See google.api.Service for the definition of a service name.
opts (KeywordList): [optional] Optional parameters
- :callback (String.t): JSONP
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :$.xgafv (String.t): V1 error format.
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
- :upload_protocol (String.t): Upload protocol for media (e.g. "raw", "multipart").
- :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. "media", "multipart").
- :body (ReportRequest):
Returns
{:ok, %GoogleApi.ServiceControl.V1.Model.ReportResponse{}} on success {:error, info} on failure
servicecontrol_services_start_reconciliation( Tesla.Env.client(), String.t(), keyword() ) :: {:ok, GoogleApi.ServiceControl.V1.Model.StartReconciliationResponse.t()} | {:error, Tesla.Env.t()}
Unlike rate quota, allocation quota does not get refilled periodically. So, it is possible that the quota usage as seen by the service differs from what the One Platform considers the usage is. This is expected to happen only rarely, but over time this can accumulate. Services can invoke StartReconciliation and EndReconciliation to correct this usage drift, as described below: 1. Service sends StartReconciliation with a timestamp in future for each metric that needs to be reconciled. The timestamp being in future allows to account for in-flight AllocateQuota and ReleaseQuota requests for the same metric. 2. One Platform records this timestamp and starts tracking subsequent AllocateQuota and ReleaseQuota requests until EndReconciliation is called. 3. At or after the time specified in the StartReconciliation, service sends EndReconciliation with the usage that needs to be reconciled to. 4. One Platform adjusts its own record of usage for that metric to the value specified in EndReconciliation by taking in to account any allocation or release between StartReconciliation and EndReconciliation. Signals the quota controller that the service wants to perform a usage reconciliation as specified in the request. This method requires the `servicemanagement.services.quota` permission on the specified service. For more information, see Google Cloud IAM.
Parameters
- connection (GoogleApi.ServiceControl.V1.Connection): Connection to server
- service_name (String.t): Name of the service as specified in the service configuration. For example, `"pubsub.googleapis.com"`. See google.api.Service for the definition of a service name.
opts (KeywordList): [optional] Optional parameters
- :callback (String.t): JSONP
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :$.xgafv (String.t): V1 error format.
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
- :upload_protocol (String.t): Upload protocol for media (e.g. "raw", "multipart").
- :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. "media", "multipart").
- :body (StartReconciliationRequest):
Returns
{:ok, %GoogleApi.ServiceControl.V1.Model.StartReconciliationResponse{}} on success {:error, info} on failure