generated/google/apis/serviceusage_v1/classes.rb in google-api-client-0.40.1 vs generated/google/apis/serviceusage_v1/classes.rb in google-api-client-0.40.2
- old
+ new
@@ -54,11 +54,11 @@
# The resource name of the policy.
# This name is generated by the server when the policy is created.
# Example names would be:
# `organizations/123/services/compute.googleapis.com/consumerQuotaMetrics/
- # compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/adminPolicies/
+ # compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/adminQuotaPolicies/
# 4a3f2c1d`
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
@@ -1248,15 +1248,10 @@
# Corresponds to the JSON property `allowCors`
# @return [Boolean]
attr_accessor :allow_cors
alias_method :allow_cors?, :allow_cors
- # The list of features enabled on this endpoint.
- # Corresponds to the JSON property `features`
- # @return [Array<String>]
- attr_accessor :features
-
# The canonical name of this endpoint.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
@@ -1275,11 +1270,10 @@
# Update properties of this object
def update!(**args)
@aliases = args[:aliases] if args.key?(:aliases)
@allow_cors = args[:allow_cors] if args.key?(:allow_cors)
- @features = args[:features] if args.key?(:features)
@name = args[:name] if args.key?(:name)
@target = args[:target] if args.key?(:target)
end
end
@@ -1742,40 +1736,55 @@
# 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/overdue_count` metric is only sent to the
+ # `library.googleapis.com/book/num_overdue` metric is only sent to the
# consumer project.
# monitored_resources:
- # - type: library.googleapis.com/branch
+ # - type: library.googleapis.com/Branch
+ # display_name: "Library Branch"
+ # description: "A branch of a library."
+ # launch_stage: GA
# labels:
- # - key: /city
- # description: The city where the library branch is located in.
- # - key: /name
- # description: The name of the branch.
+ # - 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
- # - name: library.googleapis.com/book/overdue_count
+ # - 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
+ # - key: customer_id
+ # description: "The id of the customer."
# monitoring:
# producer_destinations:
- # - monitored_resource: library.googleapis.com/branch
+ # - monitored_resource: library.googleapis.com/Branch
# metrics:
# - library.googleapis.com/book/returned_count
# consumer_destinations:
- # - monitored_resource: library.googleapis.com/branch
+ # - monitored_resource: library.googleapis.com/Branch
# metrics:
# - library.googleapis.com/book/returned_count
- # - library.googleapis.com/book/overdue_count
+ # - library.googleapis.com/book/num_overdue
# Corresponds to the JSON property `monitoring`
# @return [Google::Apis::ServiceusageV1::Monitoring]
attr_accessor :monitoring
# The service name, which is a DNS-like logical identifier for the
@@ -2956,10 +2965,19 @@
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`, `description`, `display_name`,
+ # `launch_stage` 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
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`
@@ -2973,11 +2991,17 @@
# 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. For example, the
+ # 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.
# Corresponds to the JSON property `labels`
@@ -3013,13 +3037,23 @@
# 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 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:
+ # 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"
# Corresponds to the JSON property `type`
# @return [String]
@@ -3294,13 +3328,24 @@
# 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 APIs can support different monitored resource types. APIs generally
- # provide a `list` method that returns the monitored resource descriptors used
- # by the API.
+ # 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
class MonitoredResourceDescriptor
include Google::Apis::Core::Hashable
# Optional. A detailed description of the monitored resource type that might
# be used in documentation.
@@ -3315,12 +3360,18 @@
# 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. For example, an individual Google Cloud SQL database is
- # identified by values for the labels `"database_id"` and `"zone"`.
+ # 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`.
# Corresponds to the JSON property `labels`
# @return [Array<Google::Apis::ServiceusageV1::LabelDescriptor>]
attr_accessor :labels
# Optional. The launch stage of the monitored resource definition.
@@ -3336,13 +3387,11 @@
# resource name format `"monitoredResourceDescriptors/`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.
- # The maximum length of this value is 256 characters.
+ # Note there are legacy service monitored resources not following this rule.
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
def initialize(**args)
@@ -3363,54 +3412,69 @@
# 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/overdue_count` metric is only sent to the
+ # `library.googleapis.com/book/num_overdue` metric is only sent to the
# consumer project.
# monitored_resources:
- # - type: library.googleapis.com/branch
+ # - type: library.googleapis.com/Branch
+ # display_name: "Library Branch"
+ # description: "A branch of a library."
+ # launch_stage: GA
# labels:
- # - key: /city
- # description: The city where the library branch is located in.
- # - key: /name
- # description: The name of the branch.
+ # - 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
- # - name: library.googleapis.com/book/overdue_count
+ # - 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
+ # - key: customer_id
+ # description: "The id of the customer."
# monitoring:
# producer_destinations:
- # - monitored_resource: library.googleapis.com/branch
+ # - monitored_resource: library.googleapis.com/Branch
# metrics:
# - library.googleapis.com/book/returned_count
# consumer_destinations:
- # - monitored_resource: library.googleapis.com/branch
+ # - monitored_resource: library.googleapis.com/Branch
# metrics:
# - library.googleapis.com/book/returned_count
- # - library.googleapis.com/book/overdue_count
+ # - library.googleapis.com/book/num_overdue
class Monitoring
include Google::Apis::Core::Hashable
# Monitoring configurations for sending metrics to the consumer project.
- # There can be multiple consumer destinations. A monitored resouce type may
+ # There can be multiple consumer destinations. A monitored resource type may
# appear in multiple monitoring destinations if different aggregations are
# needed for different sets of metrics associated with that monitored
# resource type. A monitored resource and metric pair may only be used once
# in the Monitoring configuration.
# Corresponds to the JSON property `consumerDestinations`
# @return [Array<Google::Apis::ServiceusageV1::MonitoringDestination>]
attr_accessor :consumer_destinations
# Monitoring configurations for sending metrics to the producer project.
- # There can be multiple producer destinations. A monitored resouce type may
+ # There can be multiple producer destinations. A monitored resource type may
# appear in multiple monitoring destinations if different aggregations are
# needed for different sets of metrics associated with that monitored
# resource type. A monitored resource and metric pair may only be used once
# in the Monitoring configuration.
# Corresponds to the JSON property `producerDestinations`