As of January 1, 2020 this library no longer supports Python 2 on the latest released version. Library versions released prior to that date will continue to be available. For more information please visit Python 2 support on Google Cloud.

Types for Google Cloud Servicecontrol v1 API

class google.cloud.servicecontrol_v1.types.AllocateQuotaRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for the AllocateQuota method.

service_name

Name of the service as specified in the service configuration. For example, "pubsub.googleapis.com".

See [google.api.Service][google.api.Service] for the definition of a service name.

Type

str

allocate_operation

Operation that describes the quota allocation.

Type

google.cloud.servicecontrol_v1.types.QuotaOperation

service_config_id

Specifies which version of service configuration should be used to process the request. If unspecified or no matching version can be found, the latest one will be used.

Type

str

class google.cloud.servicecontrol_v1.types.AllocateQuotaResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response message for the AllocateQuota method.

operation_id

The same operation_id value used in the AllocateQuotaRequest. Used for logging and diagnostics purposes.

Type

str

allocate_errors

Indicates the decision of the allocate.

Type

Sequence[google.cloud.servicecontrol_v1.types.QuotaError]

quota_metrics

Quota metrics to indicate the result of allocation. Depending on the request, one or more of the following metrics will be included:

  1. Per quota group or per quota metric incremental usage will be specified using the following delta metric : “serviceruntime.googleapis.com/api/consumer/quota_used_count”

  2. The quota limit reached condition will be specified using the following boolean metric : “serviceruntime.googleapis.com/quota/exceeded”.

Type

Sequence[google.cloud.servicecontrol_v1.types.MetricValueSet]

service_config_id

ID of the actual config used to process the request.

Type

str

class google.cloud.servicecontrol_v1.types.CheckError(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Defines the errors to be returned in [google.api.servicecontrol.v1.CheckResponse.check_errors][google.api.servicecontrol.v1.CheckResponse.check_errors].

code

The error code.

Type

google.cloud.servicecontrol_v1.types.CheckError.Code

subject

Subject to whom this error applies. See the specific code enum for more details on this field. For example: - “project:<project-id or project-number>” - “folder:<folder-id>” - “organization:<organization-id>”.

Type

str

detail

Free-form text providing details on the error cause of the error.

Type

str

status

Contains public information about the check error. If available, status.code will be non zero and client can propagate it out as public error.

Type

google.rpc.status_pb2.Status

class Code(value)[source]

Bases: proto.enums.Enum

Error codes for Check responses.

API_KEY_EXPIRED = 112
API_KEY_INVALID = 105
API_KEY_NOT_FOUND = 113
API_TARGET_BLOCKED = 122
BILLING_DISABLED = 107
BILLING_STATUS_UNAVAILABLE = 302
CLIENT_APP_BLOCKED = 111
CLOUD_RESOURCE_MANAGER_BACKEND_UNAVAILABLE = 305
CONSUMER_INVALID = 125
ERROR_CODE_UNSPECIFIED = 0
INVALID_CREDENTIAL = 123
IP_ADDRESS_BLOCKED = 109
NAMESPACE_LOOKUP_UNAVAILABLE = 300
NOT_FOUND = 5
PERMISSION_DENIED = 7
PROJECT_DELETED = 108
PROJECT_INVALID = 114
REFERER_BLOCKED = 110
RESOURCE_EXHAUSTED = 8
SERVICE_NOT_ACTIVATED = 104
SERVICE_STATUS_UNAVAILABLE = 301
class google.cloud.servicecontrol_v1.types.CheckRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for the Check method.

service_name

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.

Type

str

operation

The operation to be checked.

Type

google.cloud.servicecontrol_v1.types.Operation

service_config_id

Specifies which version of service configuration should be used to process the request. If unspecified or no matching version can be found, the latest one will be used.

Type

str

class google.cloud.servicecontrol_v1.types.CheckResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response message for the Check method.

operation_id

The same operation_id value used in the [CheckRequest][google.api.servicecontrol.v1.CheckRequest]. Used for logging and diagnostics purposes.

Type

str

check_errors

Indicate the decision of the check. If no check errors are present, the service should process the operation. Otherwise the service should use the list of errors to determine the appropriate action.

Type

Sequence[google.cloud.servicecontrol_v1.types.CheckError]

service_config_id

The actual config id used to process the request.

Type

str

service_rollout_id

The current service rollout id used to process the request.

Type

str

check_info

Feedback data returned from the server during processing a Check request.

Type

google.cloud.servicecontrol_v1.types.CheckResponse.CheckInfo

class CheckInfo(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Contains additional information about the check operation.

unused_arguments

A list of fields and label keys that are ignored by the server. The client doesn’t need to send them for following requests to improve performance and allow better aggregation.

Type

Sequence[str]

consumer_info

Consumer info of this check.

Type

google.cloud.servicecontrol_v1.types.CheckResponse.ConsumerInfo

class ConsumerInfo(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

ConsumerInfo provides information about the consumer.

project_number

The Google cloud project number, e.g. 1234567890. A value of 0 indicates no project number is found. NOTE: This field is deprecated after we support flexible consumer id. New code should not depend on this field anymore.

Type

int

type_

The type of the consumer which should have been defined in Google Resource Manager.

Type

google.cloud.servicecontrol_v1.types.CheckResponse.ConsumerInfo.ConsumerType

consumer_number

The consumer identity number, can be Google cloud project number, folder number or organization number e.g. 1234567890. A value of 0 indicates no consumer number is found.

Type

int

class ConsumerType(value)[source]

Bases: proto.enums.Enum

The type of the consumer as defined in Google Resource Manager.

CONSUMER_TYPE_UNSPECIFIED = 0
FOLDER = 2
ORGANIZATION = 3
PROJECT = 1
SERVICE_SPECIFIC = 4
class google.cloud.servicecontrol_v1.types.Distribution(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Distribution represents a frequency distribution of double- alued sample points. It contains the size of the population of sample points plus additional optional information:

  • the arithmetic mean of the samples

  • the minimum and maximum of the samples

  • the sum-squared-deviation of the samples, used to compute variance

  • a histogram of the values of the sample points

count

The total number of samples in the distribution. Must be >= 0.

Type

int

mean

The arithmetic mean of the samples in the distribution. If count is zero then this field must be zero.

Type

float

minimum

The minimum of the population of values. Ignored if count is zero.

Type

float

maximum

The maximum of the population of values. Ignored if count is zero.

Type

float

sum_of_squared_deviation

The sum of squared deviations from the mean: Sum[i=1..count]((x_i - mean)^2) where each x_i is a sample values. If count is zero then this field must be zero, otherwise validation of the request fails.

Type

float

bucket_counts

The number of samples in each histogram bucket. bucket_counts are optional. If present, they must sum to the count value.

The buckets are defined below in bucket_option. There are N buckets. bucket_counts[0] is the number of samples in the underflow bucket. bucket_counts[1] to bucket_counts[N-1] are the numbers of samples in each of the finite buckets. And bucket_counts[N] is the number of samples in the overflow bucket. See the comments ofbucket_option` below for more details.

Any suffix of trailing zeros may be omitted.

Type

Sequence[int]

linear_buckets

Buckets with constant width.

Type

google.cloud.servicecontrol_v1.types.Distribution.LinearBuckets

exponential_buckets

Buckets with exponentially growing width.

Type

google.cloud.servicecontrol_v1.types.Distribution.ExponentialBuckets

explicit_buckets

Buckets with arbitrary user-provided width.

Type

google.cloud.servicecontrol_v1.types.Distribution.ExplicitBuckets

exemplars

Example points. Must be in increasing order of value field.

Type

Sequence[google.api.distribution_pb2.Exemplar]

class ExplicitBuckets(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Describing buckets with arbitrary user-provided width.

bounds

‘bound’ is a list of strictly increasing boundaries between buckets. Note that a list of length N-1 defines N buckets because of fenceposting. See comments on bucket_options for details.

The i’th finite bucket covers the interval [bound[i-1], bound[i]) where i ranges from 1 to bound_size() - 1. Note that there are no finite buckets at all if ‘bound’ only contains a single element; in that special case the single bound defines the boundary between the underflow and overflow buckets.

bucket number lower bound upper bound i == 0 (underflow) -inf bound[i] 0 < i < bound_size() bound[i-1] bound[i] i == bound_size() (overflow) bound[i-1] +inf

Type

Sequence[float]

class ExponentialBuckets(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Describing buckets with exponentially growing width.

num_finite_buckets

The number of finite buckets. With the underflow and overflow buckets, the total number of buckets is num_finite_buckets + 2. See comments on bucket_options for details.

Type

int

growth_factor

The i’th exponential bucket covers the interval [scale * growth_factor^(i-1), scale * growth_factor^i) where i ranges from 1 to num_finite_buckets inclusive. Must be larger than 1.0.

Type

float

scale

The i’th exponential bucket covers the interval [scale * growth_factor^(i-1), scale * growth_factor^i) where i ranges from 1 to num_finite_buckets inclusive. Must be > 0.

Type

float

class LinearBuckets(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Describing buckets with constant width.

num_finite_buckets

The number of finite buckets. With the underflow and overflow buckets, the total number of buckets is num_finite_buckets + 2. See comments on bucket_options for details.

Type

int

width

The i’th linear bucket covers the interval [offset + (i-1) * width, offset + i * width) where i ranges from 1 to num_finite_buckets, inclusive. Must be strictly positive.

Type

float

offset

The i’th linear bucket covers the interval [offset + (i-1) * width, offset + i * width) where i ranges from 1 to num_finite_buckets, inclusive.

Type

float

class google.cloud.servicecontrol_v1.types.HttpRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A common proto for logging HTTP requests. Only contains semantics defined by the HTTP specification. Product-specific logging information MUST be defined in a separate message.

request_method

The request method. Examples: "GET", "HEAD", "PUT", "POST".

Type

str

request_url

The scheme (http, https), the host name, the path, and the query portion of the URL that was requested. Example: "http://example.com/some/info?color=red".

Type

str

request_size

The size of the HTTP request message in bytes, including the request headers and the request body.

Type

int

status

The response code indicating the status of the response. Examples: 200, 404.

Type

int

response_size

The size of the HTTP response message sent back to the client, in bytes, including the response headers and the response body.

Type

int

user_agent

The user agent sent by the client. Example: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)".

Type

str

remote_ip

The IP address (IPv4 or IPv6) of the client that issued the HTTP request. Examples: "192.168.1.1", "FE80::0202:B3FF:FE1E:8329".

Type

str

server_ip

The IP address (IPv4 or IPv6) of the origin server that the request was sent to.

Type

str

referer

The referer URL of the request, as defined in HTTP/1.1 Header Field Definitions.

Type

str

latency

The request processing latency on the server, from the time the request was received until the response was sent.

Type

google.protobuf.duration_pb2.Duration

cache_lookup

Whether or not a cache lookup was attempted.

Type

bool

cache_hit

Whether or not an entity was served from cache (with or without validation).

Type

bool

cache_validated_with_origin_server

Whether or not the response was validated with the origin server before being served from cache. This field is only meaningful if cache_hit is True.

Type

bool

cache_fill_bytes

The number of HTTP response bytes inserted into cache. Set only when a cache fill was attempted.

Type

int

protocol

Protocol used for the request. Examples: “HTTP/1.1”, “HTTP/2”, “websocket”.

Type

str

class google.cloud.servicecontrol_v1.types.LogEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

An individual log entry.

name

Required. The log to which this log entry belongs. Examples: "syslog", "book_log".

Type

str

timestamp

The time the event described by the log entry occurred. If omitted, defaults to operation start time.

Type

google.protobuf.timestamp_pb2.Timestamp

severity

The severity of the log entry. The default value is LogSeverity.DEFAULT.

Type

google.logging.type.log_severity_pb2.LogSeverity

http_request

Optional. Information about the HTTP request associated with this log entry, if applicable.

Type

google.cloud.servicecontrol_v1.types.HttpRequest

trace

Optional. Resource name of the trace associated with the log entry, if any. If this field contains a relative resource name, you can assume the name is relative to //tracing.googleapis.com. Example: projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824

Type

str

insert_id

A unique ID for the log entry used for deduplication. If omitted, the implementation will generate one based on operation_id.

Type

str

labels

A set of user-defined (key, value) data that provides additional information about the log entry.

Type

Sequence[google.cloud.servicecontrol_v1.types.LogEntry.LabelsEntry]

proto_payload

The log entry payload, represented as a protocol buffer that is expressed as a JSON object. The only accepted type currently is [AuditLog][google.cloud.audit.AuditLog].

Type

google.protobuf.any_pb2.Any

text_payload

The log entry payload, represented as a Unicode string (UTF-8).

Type

str

struct_payload

The log entry payload, represented as a structure that is expressed as a JSON object.

Type

google.protobuf.struct_pb2.Struct

operation

Optional. Information about an operation associated with the log entry, if applicable.

Type

google.cloud.servicecontrol_v1.types.LogEntryOperation

source_location

Optional. Source code location information associated with the log entry, if any.

Type

google.cloud.servicecontrol_v1.types.LogEntrySourceLocation

class LabelsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Bases: proto.message.Message

class google.cloud.servicecontrol_v1.types.LogEntryOperation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Additional information about a potentially long-running operation with which a log entry is associated.

id

Optional. An arbitrary operation identifier. Log entries with the same identifier are assumed to be part of the same operation.

Type

str

producer

Optional. An arbitrary producer identifier. The combination of id and producer must be globally unique. Examples for producer: "MyDivision.MyBigCompany.com", "github.com/MyProject/MyApplication".

Type

str

first

Optional. Set this to True if this is the first log entry in the operation.

Type

bool

last

Optional. Set this to True if this is the last log entry in the operation.

Type

bool

class google.cloud.servicecontrol_v1.types.LogEntrySourceLocation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Additional information about the source code location that produced the log entry.

file

Optional. Source file name. Depending on the runtime environment, this might be a simple name or a fully-qualified name.

Type

str

line

Optional. Line within the source file. 1-based; 0 indicates no line number available.

Type

int

function

Optional. Human-readable name of the function or method being invoked, with optional context such as the class or package name. This information may be used in contexts such as the logs viewer, where a file and line number are less meaningful. The format can vary by language. For example: qual.if.ied.Class.method (Java), dir/package.func (Go), function (Python).

Type

str

class google.cloud.servicecontrol_v1.types.MetricValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents a single metric value.

labels

The labels describing the metric value. See comments on [google.api.servicecontrol.v1.Operation.labels][google.api.servicecontrol.v1.Operation.labels] for the overriding relationship. Note that this map must not contain monitored resource labels.

Type

Sequence[google.cloud.servicecontrol_v1.types.MetricValue.LabelsEntry]

start_time

The start of the time period over which this metric value’s measurement applies. The time period has different semantics for different metric types (cumulative, delta, and gauge). See the metric definition documentation in the service configuration for details. If not specified, [google.api.servicecontrol.v1.Operation.start_time][google.api.servicecontrol.v1.Operation.start_time] will be used.

Type

google.protobuf.timestamp_pb2.Timestamp

end_time

The end of the time period over which this metric value’s measurement applies. If not specified, [google.api.servicecontrol.v1.Operation.end_time][google.api.servicecontrol.v1.Operation.end_time] will be used.

Type

google.protobuf.timestamp_pb2.Timestamp

bool_value

A boolean value.

Type

bool

int64_value

A signed 64-bit integer value.

Type

int

double_value

A double precision floating point value.

Type

float

string_value

A text string value.

Type

str

distribution_value

A distribution value.

Type

google.cloud.servicecontrol_v1.types.Distribution

class LabelsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Bases: proto.message.Message

class google.cloud.servicecontrol_v1.types.MetricValueSet(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents a set of metric values in the same metric. Each metric value in the set should have a unique combination of start time, end time, and label values.

metric_name

The metric name defined in the service configuration.

Type

str

metric_values

The values in this metric.

Type

Sequence[google.cloud.servicecontrol_v1.types.MetricValue]

class google.cloud.servicecontrol_v1.types.Operation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents information regarding an operation.

operation_id

Identity of the operation. This must be unique within the scope of the service that generated the operation. If the service calls Check() and Report() on the same operation, the two calls should carry the same id.

UUID version 4 is recommended, though not required. In scenarios where an operation is computed from existing information and an idempotent id is desirable for deduplication purpose, UUID version 5 is recommended. See RFC 4122 for details.

Type

str

operation_name

Fully qualified name of the operation. Reserved for future use.

Type

str

consumer_id

Identity of the consumer who is using the service. This field should be filled in for the operations initiated by a consumer, but not for service-initiated operations that are not related to a specific consumer.

  • This can be in one of the following formats:

    • project:PROJECT_ID,

    • project_number:PROJECT_NUMBER,

    • projects/PROJECT_ID or PROJECT_NUMBER,

    • folders/FOLDER_NUMBER,

    • organizations/ORGANIZATION_NUMBER,

    • api_key:API_KEY.

Type

str

start_time

Required. Start time of the operation.

Type

google.protobuf.timestamp_pb2.Timestamp

end_time

End time of the operation. Required when the operation is used in [ServiceController.Report][google.api.servicecontrol.v1.ServiceController.Report], but optional when the operation is used in [ServiceController.Check][google.api.servicecontrol.v1.ServiceController.Check].

Type

google.protobuf.timestamp_pb2.Timestamp

labels

Labels describing the operation. Only the following labels are allowed:

  • Labels describing monitored resources as defined in the service configuration.

  • Default labels of metric values. When specified, labels defined in the metric value override these default.

  • The following labels defined by Google Cloud Platform:

    • cloud.googleapis.com/location describing the location where the operation happened,

    • servicecontrol.googleapis.com/user_agent describing the user agent of the API request,

    • servicecontrol.googleapis.com/service_agent describing the service used to handle the API request (e.g. ESP),

    • servicecontrol.googleapis.com/platform describing the platform where the API is served, such as App Engine, Compute Engine, or Kubernetes Engine.

Type

Sequence[google.cloud.servicecontrol_v1.types.Operation.LabelsEntry]

metric_value_sets

Represents information about this operation. Each MetricValueSet corresponds to a metric defined in the service configuration. The data type used in the MetricValueSet must agree with the data type specified in the metric definition. Within a single operation, it is not allowed to have more than one MetricValue instances that have the same metric names and identical label value combinations. If a request has such duplicated MetricValue instances, the entire request is rejected with an invalid argument error.

Type

Sequence[google.cloud.servicecontrol_v1.types.MetricValueSet]

log_entries

Represents information to be logged.

Type

Sequence[google.cloud.servicecontrol_v1.types.LogEntry]

importance

DO NOT USE. This is an experimental field.

Type

google.cloud.servicecontrol_v1.types.Operation.Importance

extensions

Unimplemented.

Type

Sequence[google.protobuf.any_pb2.Any]

class Importance(value)[source]

Bases: proto.enums.Enum

Defines the importance of the data contained in the operation.

HIGH = 1
LOW = 0
class LabelsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Bases: proto.message.Message

class google.cloud.servicecontrol_v1.types.QuotaError(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents error information for [QuotaOperation][google.api.servicecontrol.v1.QuotaOperation].

code

Error code.

Type

google.cloud.servicecontrol_v1.types.QuotaError.Code

subject

Subject to whom this error applies. See the specific enum for more details on this field. For example, “clientip:<ip address of client>” or “project:<Google developer project id>”.

Type

str

description

Free-form text that provides details on the cause of the error.

Type

str

status

Contains additional information about the quota error. If available, status.code will be non zero.

Type

google.rpc.status_pb2.Status

class Code(value)[source]

Bases: proto.enums.Enum

Error codes related to project config validations are deprecated since the quota controller methods do not perform these validations. Instead services have to call the Check method, without quota_properties field, to perform these validations before calling the quota controller methods. These methods check only for project deletion to be wipe out compliant.

API_KEY_EXPIRED = 112
API_KEY_INVALID = 105
BILLING_NOT_ACTIVE = 107
PROJECT_DELETED = 108
RESOURCE_EXHAUSTED = 8
UNSPECIFIED = 0
class google.cloud.servicecontrol_v1.types.QuotaOperation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents information regarding a quota operation.

operation_id

Identity of the operation. This is expected to be unique within the scope of the service that generated the operation, and guarantees idempotency in case of retries.

In order to ensure best performance and latency in the Quota backends, operation_ids are optimally associated with time, so that related operations can be accessed fast in storage. For this reason, the recommended token for services that intend to operate at a high QPS is Unix time in nanos + UUID

Type

str

method_name

Fully qualified name of the API method for which this quota operation is requested. This name is used for matching quota rules or metric rules and billing status rules defined in service configuration.

This field should not be set if any of the following is true: (1) the quota operation is performed on non-API resources. (2) quota_metrics is set because the caller is doing quota override.

Example of an RPC method name: google.example.library.v1.LibraryService.CreateShelf

Type

str

consumer_id

Identity of the consumer for whom this quota operation is being performed.

This can be in one of the following formats: project:<project_id>, project_number:<project_number>, api_key:<api_key>.

Type

str

labels

Labels describing the operation.

Type

Sequence[google.cloud.servicecontrol_v1.types.QuotaOperation.LabelsEntry]

quota_metrics

Represents information about this operation. Each MetricValueSet corresponds to a metric defined in the service configuration. The data type used in the MetricValueSet must agree with the data type specified in the metric definition.

Within a single operation, it is not allowed to have more than one MetricValue instances that have the same metric names and identical label value combinations. If a request has such duplicated MetricValue instances, the entire request is rejected with an invalid argument error.

This field is mutually exclusive with method_name.

Type

Sequence[google.cloud.servicecontrol_v1.types.MetricValueSet]

quota_mode

Quota mode for this operation.

Type

google.cloud.servicecontrol_v1.types.QuotaOperation.QuotaMode

class LabelsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Bases: proto.message.Message

class QuotaMode(value)[source]

Bases: proto.enums.Enum

Supported quota modes.

ADJUST_ONLY = 5
BEST_EFFORT = 2
CHECK_ONLY = 3
NORMAL = 1
QUERY_ONLY = 4
UNSPECIFIED = 0
class google.cloud.servicecontrol_v1.types.ReportRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for the Report method.

service_name

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.

Type

str

operations

Operations to be reported.

Typically the service should report one operation per request. Putting multiple operations into a single request is allowed, but should be used only when multiple operations are natually available at the time of the report.

There is no limit on the number of operations in the same ReportRequest, however the ReportRequest size should be no larger than 1MB. See [ReportResponse.report_errors][google.api.servicecontrol.v1.ReportResponse.report_errors] for partial failure behavior.

Type

Sequence[google.cloud.servicecontrol_v1.types.Operation]

service_config_id

Specifies which version of service config should be used to process the request.

If unspecified or no matching version can be found, the latest one will be used.

Type

str

class google.cloud.servicecontrol_v1.types.ReportResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response message for the Report method.

report_errors

Partial failures, one for each Operation in the request that failed processing. There are three possible combinations of the RPC status:

  1. The combination of a successful RPC status and an empty report_errors list indicates a complete success where all Operations in the request are processed successfully.

  2. The combination of a successful RPC status and a non-empty report_errors list indicates a partial success where some Operations in the request succeeded. Each Operation that failed processing has a corresponding item in this list.

  3. A failed RPC status indicates a general non-deterministic failure. When this happens, it’s impossible to know which of the ‘Operations’ in the request succeeded or failed.

Type

Sequence[google.cloud.servicecontrol_v1.types.ReportResponse.ReportError]

service_config_id

The actual config id used to process the request.

Type

str

service_rollout_id

The current service rollout id used to process the request.

Type

str

class ReportError(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents the processing error of one [Operation][google.api.servicecontrol.v1.Operation] in the request.

operation_id

The [Operation.operation_id][google.api.servicecontrol.v1.Operation.operation_id] value from the request.

Type

str

status

Details of the error when processing the [Operation][google.api.servicecontrol.v1.Operation].

Type

google.rpc.status_pb2.Status