Class: Google::Apis::ServiceusageV1beta1::ServiceConfig
- Inherits:
-
Object
- Object
- Google::Apis::ServiceusageV1beta1::ServiceConfig
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/serviceusage_v1beta1/classes.rb,
lib/google/apis/serviceusage_v1beta1/representations.rb,
lib/google/apis/serviceusage_v1beta1/representations.rb
Overview
The configuration of the service.
Instance Attribute Summary collapse
-
#apis ⇒ Array<Google::Apis::ServiceusageV1beta1::Api>
A list of API interfaces exported by this service.
-
#authentication ⇒ Google::Apis::ServiceusageV1beta1::Authentication
Authenticationdefines the authentication configuration for API methods provided by an API service. -
#documentation ⇒ Google::Apis::ServiceusageV1beta1::Documentation
Documentationprovides the information for describing a service. -
#endpoints ⇒ Array<Google::Apis::ServiceusageV1beta1::Endpoint>
Configuration for network endpoints.
-
#monitored_resources ⇒ Array<Google::Apis::ServiceusageV1beta1::MonitoredResourceDescriptor>
Defines the monitored resources used by this service.
-
#monitoring ⇒ Google::Apis::ServiceusageV1beta1::Monitoring
Monitoring configuration of the service.
-
#name ⇒ String
The DNS address at which this service is available.
-
#quota ⇒ Google::Apis::ServiceusageV1beta1::Quota
Quota configuration helps to achieve fairness and budgeting in service usage.
-
#title ⇒ String
The product title for this service.
-
#usage ⇒ Google::Apis::ServiceusageV1beta1::Usage
Configuration controlling usage of a service.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ServiceConfig
constructor
A new instance of ServiceConfig.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ ServiceConfig
Returns a new instance of ServiceConfig.
5307 5308 5309 |
# File 'lib/google/apis/serviceusage_v1beta1/classes.rb', line 5307 def initialize(**args) update!(**args) end |
Instance Attribute Details
#apis ⇒ Array<Google::Apis::ServiceusageV1beta1::Api>
A list of API interfaces exported by this service. Contains only the names,
versions, and method names of the interfaces.
Corresponds to the JSON property apis
5187 5188 5189 |
# File 'lib/google/apis/serviceusage_v1beta1/classes.rb', line 5187 def apis @apis end |
#authentication ⇒ Google::Apis::ServiceusageV1beta1::Authentication
Authentication defines the authentication configuration for API methods
provided by an API service. Example: name: calendar.googleapis.com
authentication: providers: - id: google_calendar_auth jwks_uri: https://www.
googleapis.com/oauth2/v1/certs issuer: https://securetoken.google.com rules: -
selector: "*" requirements: provider_id: google_calendar_auth - selector:
google.calendar.Delegate oauth: canonical_scopes: https://www.googleapis.com/
auth/calendar.read
Corresponds to the JSON property authentication
5198 5199 5200 |
# File 'lib/google/apis/serviceusage_v1beta1/classes.rb', line 5198 def authentication @authentication end |
#documentation ⇒ Google::Apis::ServiceusageV1beta1::Documentation
Documentation provides the information for describing a service. Example:
documentation: summary: > The Google Calendar API gives access to most
calendar features. pages: - name: Overview content: (== include google/foo/
overview.md ==) - name: Tutorial content: (== include google/foo/tutorial.md ==
) subpages: - name: Java content: (== include google/foo/tutorial_java.md ==)
rules: - selector: google.calendar.Calendar.Get description: > ... - selector:
google.calendar.Calendar.Put description: > ... Documentation is provided in
markdown syntax. In addition to standard markdown features, definition lists,
tables and fenced code blocks are supported. Section headers can be provided
and are interpreted relative to the section nesting of the context where a
documentation fragment is embedded. Documentation from the IDL is merged with
documentation defined via the config at normalization time, where
documentation provided by config rules overrides IDL provided. A number of
constructs specific to the API platform are supported in documentation text.
In order to reference a proto element, the following notation can be used: [
fully.qualified.proto.name][] To override the display text used for the link,
this can be used: [display text][fully.qualified.proto.name] Text can be
excluded from doc using the following notation: (-- internal comment --) A few
directives are available in documentation. Note that directives must appear on
a single line to be properly identified. The include directive includes a
markdown file from an external source: (== include path/to/file ==) The
resource_for directive marks a message to be the resource of a collection in
REST view. If it is not specified, tools attempt to infer the resource from
the operations in a collection: (== resource_for v1.shelves.books ==) The
directive suppress_warning does not directly affect documentation and is
documented together with service config validation.
Corresponds to the JSON property documentation
5228 5229 5230 |
# File 'lib/google/apis/serviceusage_v1beta1/classes.rb', line 5228 def documentation @documentation end |
#endpoints ⇒ Array<Google::Apis::ServiceusageV1beta1::Endpoint>
Configuration for network endpoints. Contains only the names and aliases of
the endpoints.
Corresponds to the JSON property endpoints
5234 5235 5236 |
# File 'lib/google/apis/serviceusage_v1beta1/classes.rb', line 5234 def endpoints @endpoints end |
#monitored_resources ⇒ Array<Google::Apis::ServiceusageV1beta1::MonitoredResourceDescriptor>
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
5240 5241 5242 |
# File 'lib/google/apis/serviceusage_v1beta1/classes.rb', line 5240 def monitored_resources @monitored_resources end |
#monitoring ⇒ Google::Apis::ServiceusageV1beta1::Monitoring
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
5266 5267 5268 |
# File 'lib/google/apis/serviceusage_v1beta1/classes.rb', line 5266 def monitoring @monitoring end |
#name ⇒ String
The DNS address at which this service is available. An example DNS address
would be: calendar.googleapis.com.
Corresponds to the JSON property name
5272 5273 5274 |
# File 'lib/google/apis/serviceusage_v1beta1/classes.rb', line 5272 def name @name end |
#quota ⇒ Google::Apis::ServiceusageV1beta1::Quota
Quota configuration helps to achieve fairness and budgeting in service usage.
The metric based quota configuration works this way: - The service
configuration defines a set of metrics. - For API calls, the quota.
metric_rules maps methods to metrics with corresponding costs. - The quota.
limits defines limits on the metrics, which will be used for quota checks at
runtime. An example quota configuration in yaml format: quota: limits: - name:
apiWriteQpsPerProject metric: library.googleapis.com/write_calls unit: "1/min/
project" # rate limit for consumer projects values: STANDARD: 10000 (The
metric rules bind all methods to the read_calls metric, except for the
UpdateBook and DeleteBook methods. These two methods are mapped to the
write_calls metric, with the UpdateBook method consuming at twice rate as the
DeleteBook method.) metric_rules: - selector: "*" metric_costs: library.
googleapis.com/read_calls: 1 - selector: google.example.library.v1.
LibraryService.UpdateBook metric_costs: library.googleapis.com/write_calls: 2 -
selector: google.example.library.v1.LibraryService.DeleteBook metric_costs:
library.googleapis.com/write_calls: 1 Corresponding Metric definition: metrics:
- name: library.googleapis.com/read_calls display_name: Read requests
metric_kind: DELTA value_type: INT64 - name: library.googleapis.com/
write_calls display_name: Write requests metric_kind: DELTA value_type: INT64
Corresponds to the JSON property
quota
5295 5296 5297 |
# File 'lib/google/apis/serviceusage_v1beta1/classes.rb', line 5295 def quota @quota end |
#title ⇒ String
The product title for this service.
Corresponds to the JSON property title
5300 5301 5302 |
# File 'lib/google/apis/serviceusage_v1beta1/classes.rb', line 5300 def title @title end |
#usage ⇒ Google::Apis::ServiceusageV1beta1::Usage
Configuration controlling usage of a service.
Corresponds to the JSON property usage
5305 5306 5307 |
# File 'lib/google/apis/serviceusage_v1beta1/classes.rb', line 5305 def usage @usage end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 |
# File 'lib/google/apis/serviceusage_v1beta1/classes.rb', line 5312 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 |