google_api_service_control v0.0.1 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 Google Cloud IAM. NOTE: the client code must fail-open if the server returns one of the following quota errors: - `PROJECT_STATUS_UNAVAILABLE` - `SERVICE_STATUS_UNAVAILABLE` - `BILLING_STATUS_UNAVAILABLE` - `QUOTA_SYSTEM_UNAVAILABLE` The server may inject above errors to prohibit any hard dependency on the quota system

Checks an operation with Google Service Control to decide whether the given operation should proceed. It should 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 server errors, the client can rely on the cached results for longer time. 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 Google 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 Google Cloud IAM. NOTE: the client code must fail-open if the server returns one of the following quota errors: - `PROJECT_STATUS_UNAVAILABLE` - `SERVICE_STATUS_UNAVAILABLE` - `BILLING_STATUS_UNAVAILABLE` - `QUOTA_SYSTEM_UNAVAILABLE` The server may inject above errors to prohibit any hard dependency on the quota system

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

Link to this function servicecontrol_services_allocate_quota(connection, service_name, opts \\ []) View Source
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 Google Cloud IAM. NOTE: the client code must fail-open if the server returns one of the following quota errors: - `PROJECT_STATUS_UNAVAILABLE` - `SERVICE_STATUS_UNAVAILABLE` - `BILLING_STATUS_UNAVAILABLE` - `QUOTA_SYSTEM_UNAVAILABLE` The server may inject above errors to prohibit any hard dependency on the quota system.

Parameters

  • connection (GoogleApi.ServiceControl.V1.Connection): Connection to server
  • service_name (String): 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

    • :fields (String): Selector specifying which fields to include in a partial response.
    • :upload_type (String): Legacy upload protocol for media (e.g. "media", "multipart").
    • :callback (String): JSONP
    • :__/xgafv (String): V1 error format.
    • :alt (String): Data format for response.
    • :access_token (String): OAuth access token.
    • :key (String): 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.
    • :quota_user (String): 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.
    • :pp (Boolean): Pretty-print response.
    • :oauth_token (String): OAuth 2.0 token for the current user.
    • :bearer_token (String): OAuth bearer token.
    • :upload_protocol (String): Upload protocol for media (e.g. "raw", "multipart").
    • :pretty_print (Boolean): Returns response with indentations and line breaks.
    • :body (AllocateQuotaRequest):

Returns

{:ok, %GoogleApi.ServiceControl.V1.Model.AllocateQuotaResponse{}} on success {:error, info} on failure

Link to this function servicecontrol_services_check(connection, service_name, opts \\ []) View Source
servicecontrol_services_check(Tesla.Env.client, String.t, keyword) ::
  {:ok, GoogleApi.ServiceControl.V1.Model.CheckResponse.t} |
  {:error, Tesla.Env.t}

Checks an operation with Google Service Control to decide whether the given operation should proceed. It should 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 server errors, the client can rely on the cached results for longer time. 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 Google Cloud IAM.

Parameters

  • connection (GoogleApi.ServiceControl.V1.Connection): Connection to server
  • service_name (String): 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

    • :fields (String): Selector specifying which fields to include in a partial response.
    • :upload_type (String): Legacy upload protocol for media (e.g. "media", "multipart").
    • :callback (String): JSONP
    • :__/xgafv (String): V1 error format.
    • :alt (String): Data format for response.
    • :access_token (String): OAuth access token.
    • :key (String): 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.
    • :quota_user (String): 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.
    • :pp (Boolean): Pretty-print response.
    • :oauth_token (String): OAuth 2.0 token for the current user.
    • :bearer_token (String): OAuth bearer token.
    • :upload_protocol (String): Upload protocol for media (e.g. "raw", "multipart").
    • :pretty_print (Boolean): Returns response with indentations and line breaks.
    • :body (CheckRequest):

Returns

{:ok, %GoogleApi.ServiceControl.V1.Model.CheckResponse{}} on success {:error, info} on failure

Link to this function servicecontrol_services_end_reconciliation(connection, service_name, opts \\ []) View Source
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): 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

    • :fields (String): Selector specifying which fields to include in a partial response.
    • :upload_type (String): Legacy upload protocol for media (e.g. "media", "multipart").
    • :callback (String): JSONP
    • :__/xgafv (String): V1 error format.
    • :alt (String): Data format for response.
    • :access_token (String): OAuth access token.
    • :key (String): 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.
    • :quota_user (String): 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.
    • :pp (Boolean): Pretty-print response.
    • :oauth_token (String): OAuth 2.0 token for the current user.
    • :bearer_token (String): OAuth bearer token.
    • :upload_protocol (String): Upload protocol for media (e.g. "raw", "multipart").
    • :pretty_print (Boolean): Returns response with indentations and line breaks.
    • :body (EndReconciliationRequest):

Returns

{:ok, %GoogleApi.ServiceControl.V1.Model.EndReconciliationResponse{}} on success {:error, info} on failure

Link to this function servicecontrol_services_release_quota(connection, service_name, opts \\ []) View Source
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 Google Cloud IAM. NOTE: the client code must fail-open if the server returns one of the following quota errors: - `PROJECT_STATUS_UNAVAILABLE` - `SERVICE_STATUS_UNAVAILABLE` - `BILLING_STATUS_UNAVAILABLE` - `QUOTA_SYSTEM_UNAVAILABLE` The server may inject above errors to prohibit any hard dependency on the quota system.

Parameters

  • connection (GoogleApi.ServiceControl.V1.Connection): Connection to server
  • service_name (String): 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

    • :fields (String): Selector specifying which fields to include in a partial response.
    • :upload_type (String): Legacy upload protocol for media (e.g. "media", "multipart").
    • :callback (String): JSONP
    • :__/xgafv (String): V1 error format.
    • :alt (String): Data format for response.
    • :access_token (String): OAuth access token.
    • :key (String): 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.
    • :quota_user (String): 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.
    • :pp (Boolean): Pretty-print response.
    • :oauth_token (String): OAuth 2.0 token for the current user.
    • :bearer_token (String): OAuth bearer token.
    • :upload_protocol (String): Upload protocol for media (e.g. "raw", "multipart").
    • :pretty_print (Boolean): Returns response with indentations and line breaks.
    • :body (ReleaseQuotaRequest):

Returns

{:ok, %GoogleApi.ServiceControl.V1.Model.ReleaseQuotaResponse{}} on success {:error, info} on failure

Link to this function servicecontrol_services_report(connection, service_name, opts \\ []) View Source
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): 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

    • :fields (String): Selector specifying which fields to include in a partial response.
    • :upload_type (String): Legacy upload protocol for media (e.g. "media", "multipart").
    • :callback (String): JSONP
    • :__/xgafv (String): V1 error format.
    • :alt (String): Data format for response.
    • :access_token (String): OAuth access token.
    • :key (String): 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.
    • :quota_user (String): 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.
    • :pp (Boolean): Pretty-print response.
    • :oauth_token (String): OAuth 2.0 token for the current user.
    • :bearer_token (String): OAuth bearer token.
    • :upload_protocol (String): Upload protocol for media (e.g. "raw", "multipart").
    • :pretty_print (Boolean): Returns response with indentations and line breaks.
    • :body (ReportRequest):

Returns

{:ok, %GoogleApi.ServiceControl.V1.Model.ReportResponse{}} on success {:error, info} on failure

Link to this function servicecontrol_services_start_reconciliation(connection, service_name, opts \\ []) View Source
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): 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

    • :fields (String): Selector specifying which fields to include in a partial response.
    • :upload_type (String): Legacy upload protocol for media (e.g. "media", "multipart").
    • :callback (String): JSONP
    • :__/xgafv (String): V1 error format.
    • :alt (String): Data format for response.
    • :access_token (String): OAuth access token.
    • :key (String): 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.
    • :quota_user (String): 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.
    • :pp (Boolean): Pretty-print response.
    • :oauth_token (String): OAuth 2.0 token for the current user.
    • :bearer_token (String): OAuth bearer token.
    • :upload_protocol (String): Upload protocol for media (e.g. "raw", "multipart").
    • :pretty_print (Boolean): Returns response with indentations and line breaks.
    • :body (StartReconciliationRequest):

Returns

{:ok, %GoogleApi.ServiceControl.V1.Model.StartReconciliationResponse{}} on success {:error, info} on failure