generated/google/apis/serviceusage_v1/classes.rb in google-api-client-0.43.0 vs generated/google/apis/serviceusage_v1/classes.rb in google-api-client-0.44.0
- old
+ new
@@ -1784,10 +1784,42 @@
# the endpoints.
# Corresponds to the JSON property `endpoints`
# @return [Array<Google::Apis::ServiceusageV1::Endpoint>]
attr_accessor :endpoints
+ # Defines the monitored resources used by this service. This is required by the
+ # Service.monitoring and Service.logging configurations.
+ # Corresponds to the JSON property `monitoredResources`
+ # @return [Array<Google::Apis::ServiceusageV1::MonitoredResourceDescriptor>]
+ attr_accessor :monitored_resources
+
+ # Monitoring configuration of the service. The example below shows how to
+ # configure monitored resources and metrics for monitoring. In the example, a
+ # monitored resource and two metrics are defined. The `library.googleapis.com/
+ # book/returned_count` metric is sent to both producer and consumer projects,
+ # whereas the `library.googleapis.com/book/num_overdue` metric is only sent to
+ # the consumer project. monitored_resources: - type: library.googleapis.com/
+ # Branch display_name: "Library Branch" description: "A branch of a library."
+ # launch_stage: GA labels: - key: resource_container description: "The Cloud
+ # container (ie. project id) for the Branch." - key: location description: "The
+ # location of the library branch." - key: branch_id description: "The id of the
+ # branch." metrics: - name: library.googleapis.com/book/returned_count
+ # display_name: "Books Returned" description: "The count of books that have been
+ # returned." launch_stage: GA metric_kind: DELTA value_type: INT64 unit: "1"
+ # labels: - key: customer_id description: "The id of the customer." - name:
+ # library.googleapis.com/book/num_overdue display_name: "Books Overdue"
+ # description: "The current number of overdue books." launch_stage: GA
+ # metric_kind: GAUGE value_type: INT64 unit: "1" labels: - key: customer_id
+ # description: "The id of the customer." monitoring: producer_destinations: -
+ # monitored_resource: library.googleapis.com/Branch metrics: - library.
+ # googleapis.com/book/returned_count consumer_destinations: - monitored_resource:
+ # library.googleapis.com/Branch metrics: - library.googleapis.com/book/
+ # returned_count - library.googleapis.com/book/num_overdue
+ # Corresponds to the JSON property `monitoring`
+ # @return [Google::Apis::ServiceusageV1::Monitoring]
+ attr_accessor :monitoring
+
# The DNS address at which this service is available. An example DNS address
# would be: `calendar.googleapis.com`.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
@@ -1833,10 +1865,12 @@
def update!(**args)
@apis = args[:apis] if args.key?(:apis)
@authentication = args[:authentication] if args.key?(:authentication)
@documentation = args[:documentation] if args.key?(:documentation)
@endpoints = args[:endpoints] if args.key?(:endpoints)
+ @monitored_resources = args[:monitored_resources] if args.key?(:monitored_resources)
+ @monitoring = args[:monitoring] if args.key?(:monitoring)
@name = args[:name] if args.key?(:name)
@quota = args[:quota] if args.key?(:quota)
@title = args[:title] if args.key?(:title)
@usage = args[:usage] if args.key?(:usage)
end
@@ -2491,17 +2525,11 @@
end
end
# Defines a metric type and its schema. Once a metric descriptor is created,
# deleting or altering it stops data collection and makes the metric type's
- # existing data unusable. The following are specific rules for service defined
- # Monitoring metric descriptors: * `type`, `metric_kind`, `value_type` and `
- # description` fields are all required. The `unit` field must be specified if
- # the `value_type` is any of DOUBLE, INT64, DISTRIBUTION. * Maximum of default
- # 500 metric descriptors per service is allowed. * Maximum of default 10 labels
- # per metric descriptor is allowed. The default maximum limit can be overridden.
- # Please follow https://cloud.google.com/monitoring/quotas
+ # existing data unusable.
class MetricDescriptor
include Google::Apis::Core::Hashable
# A detailed description of the metric, which can be used in documentation.
# Corresponds to the JSON property `description`
@@ -2515,16 +2543,14 @@
# Corresponds to the JSON property `displayName`
# @return [String]
attr_accessor :display_name
# The set of labels that can be used to describe a specific instance of this
- # metric type. The label key name must follow: * Only upper and lower-case
- # letters, digits and underscores (_) are allowed. * Label name must start with
- # a letter or digit. * The maximum length of a label name is 100 characters. For
- # example, the `appengine.googleapis.com/http/server/response_latencies` metric
- # type has a label for the HTTP response code, `response_code`, so you can look
- # at latencies for successful responses or just for responses that failed.
+ # metric type. For example, the `appengine.googleapis.com/http/server/
+ # response_latencies` metric type has a label for the HTTP response code, `
+ # response_code`, so you can look at latencies for successful responses or just
+ # for responses that failed.
# Corresponds to the JSON property `labels`
# @return [Array<Google::Apis::ServiceusageV1::LabelDescriptor>]
attr_accessor :labels
# Optional. The launch stage of the metric definition.
@@ -2555,20 +2581,15 @@
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The metric type, including its DNS name prefix. The type is not URL-encoded.
- # All service defined metrics must be prefixed with the service name, in the
- # format of ``service name`/`relative metric name``, such as `cloudsql.
- # googleapis.com/database/cpu/utilization`. The relative metric name must follow:
- # * Only upper and lower-case letters, digits, '/' and underscores '_' are
- # allowed. * The maximum number of characters allowed for the
- # relative_metric_name is 100. All user-defined metric types have the DNS name `
- # custom.googleapis.com`, `external.googleapis.com`, or `logging.googleapis.com/
- # user/`. Metric types should use a natural hierarchical grouping. For example: "
- # custom.googleapis.com/invoice/paid/amount" "external.googleapis.com/prometheus/
- # up" "appengine.googleapis.com/http/server/response_latencies"
+ # All user-defined metric types have the DNS name `custom.googleapis.com` or `
+ # external.googleapis.com`. Metric types should use a natural hierarchical
+ # grouping. For example: "custom.googleapis.com/invoice/paid/amount" "external.
+ # googleapis.com/prometheus/up" "appengine.googleapis.com/http/server/
+ # response_latencies"
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
# The units in which the metric value is reported. It is only applicable if the `
@@ -2730,11 +2751,11 @@
# api.http).get = "/v2/`resource=**`"; ` ` Example of a mixin configuration:
# apis: - name: google.storage.v2.Storage mixins: - name: google.acl.v1.
# AccessControl The mixin construct implies that all methods in `AccessControl`
# are also declared with same name and request/response types in `Storage`. A
# documentation generator or annotation processor will see the effective `
- # Storage.GetAcl` method after inherting documentation and annotations as
+ # Storage.GetAcl` method after inheriting documentation and annotations as
# follows: service Storage ` // Get the underlying ACL object. rpc GetAcl(
# GetAclRequest) returns (Acl) ` option (google.api.http).get = "/v2/`resource=**
# `:getAcl"; ` ... ` Note how the version in the path pattern changed from `v1`
# to `v2`. If the `root` field in the mixin is specified, it should be a
# relative path under which inherited HTTP paths are placed. Example: apis: -
@@ -2768,20 +2789,13 @@
# An object that describes the schema of a MonitoredResource object using a type
# name and a set of labels. For example, the monitored resource descriptor for
# Google Compute Engine VM instances has a type of `"gce_instance"` and
# specifies the use of the labels `"instance_id"` and `"zone"` to identify
- # particular VM instances. Different services can support different monitored
- # resource types. The following are specific rules to service defined monitored
- # resources for Monitoring and Logging: * The `type`, `display_name`, `
- # description`, `labels` and `launch_stage` fields are all required. * The first
- # label of the monitored resource descriptor must be `resource_container`. There
- # are legacy monitored resource descritptors start with `project_id`. * It must
- # include a `location` label. * Maximum of default 5 service defined monitored
- # resource descriptors is allowed per service. * Maximum of default 10 labels
- # per monitored resource is allowed. The default maximum limit can be overridden.
- # Please follow https://cloud.google.com/monitoring/quotas
+ # particular VM instances. Different APIs can support different monitored
+ # resource types. APIs generally provide a `list` method that returns the
+ # monitored resource descriptors used by the API.
class MonitoredResourceDescriptor
include Google::Apis::Core::Hashable
# Optional. A detailed description of the monitored resource type that might be
# used in documentation.
@@ -2795,15 +2809,12 @@
# Corresponds to the JSON property `displayName`
# @return [String]
attr_accessor :display_name
# Required. A set of labels used to describe instances of this monitored
- # resource type. The label key name must follow: * Only upper and lower-case
- # letters, digits and underscores (_) are allowed. * Label name must start with
- # a letter or digit. * The maximum length of a label name is 100 characters. For
- # example, an individual Google Cloud SQL database is identified by values for
- # the labels `database_id` and `location`.
+ # resource type. For example, an individual Google Cloud SQL database is
+ # identified by values for the labels `"database_id"` and `"zone"`.
# Corresponds to the JSON property `labels`
# @return [Array<Google::Apis::ServiceusageV1::LabelDescriptor>]
attr_accessor :labels
# Optional. The launch stage of the monitored resource definition.
@@ -2819,18 +2830,11 @@
# type`"`.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
- # Required. The monitored resource type. For example, the type `
- # cloudsql_database` represents databases in Google Cloud SQL. All service
- # defined monitored resource types must be prefixed with the service name, in
- # the format of ``service name`/`relative resource name``. The relative resource
- # name must follow: * Only upper and lower-case letters and digits are allowed. *
- # It must start with upper case character and is recommended to use Upper Camel
- # Case style. * The maximum number of characters allowed for the
- # relative_resource_name is 100. Note there are legacy service monitored
- # resources not following this rule.
+ # Required. The monitored resource type. For example, the type `"
+ # cloudsql_database"` represents databases in Google Cloud SQL.
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
def initialize(**args)