Autogenerated update (2019-12-07)

Delete:
- cloudbuild_v1alpha1

Update:
- bigqueryreservation_v1beta1
- monitoring_v1
- monitoring_v3
- policytroubleshooter_v1beta
- servicemanagement_v1
This commit is contained in:
Google APIs 2019-12-07 00:36:43 +00:00
parent a716526a90
commit f5be88af32
17 changed files with 1805 additions and 2093 deletions

View File

@ -25,7 +25,7 @@ module Google
# @see https://cloud.google.com/bigquery/
module BigqueryreservationV1beta1
VERSION = 'V1beta1'
REVISION = '20191106'
REVISION = '20191203'
# View and manage your data in Google BigQuery
AUTH_BIGQUERY = 'https://www.googleapis.com/auth/bigquery'

View File

@ -254,6 +254,9 @@ module Google
# Resource name of the parent reservation. E.g.,
# projects/myproject/locations/US
# @param [Google::Apis::BigqueryreservationV1beta1::CapacityCommitment] capacity_commitment_object
# @param [Boolean] enforce_single_admin_project_per_org
# If true, fail the request if another project in the organization has a
# capacity commitment.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
@ -271,13 +274,14 @@ module Google
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def create_project_location_capacity_commitment(parent, capacity_commitment_object = nil, fields: nil, quota_user: nil, options: nil, &block)
def create_project_location_capacity_commitment(parent, capacity_commitment_object = nil, enforce_single_admin_project_per_org: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/{+parent}/capacityCommitments', options)
command.request_representation = Google::Apis::BigqueryreservationV1beta1::CapacityCommitment::Representation
command.request_object = capacity_commitment_object
command.response_representation = Google::Apis::BigqueryreservationV1beta1::CapacityCommitment::Representation
command.response_class = Google::Apis::BigqueryreservationV1beta1::CapacityCommitment
command.params['parent'] = parent unless parent.nil?
command.query['enforceSingleAdminProjectPerOrg'] = enforce_single_admin_project_per_org unless enforce_single_admin_project_per_org.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)

View File

@ -1,34 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/cloudbuild_v1alpha1/service.rb'
require 'google/apis/cloudbuild_v1alpha1/classes.rb'
require 'google/apis/cloudbuild_v1alpha1/representations.rb'
module Google
module Apis
# Cloud Build API
#
# Creates and manages builds on Google Cloud Platform.
#
# @see https://cloud.google.com/cloud-build/docs/
module CloudbuildV1alpha1
VERSION = 'V1alpha1'
REVISION = '20191120'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
end
end
end

File diff suppressed because it is too large Load Diff

View File

@ -1,435 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module CloudbuildV1alpha1
class ArtifactObjects
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ArtifactResult
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Artifacts
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Build
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class BuildOperationMetadata
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class BuildOptions
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class BuildStep
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class BuiltImage
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Empty
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class FileHashes
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class HashProp
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListWorkerPoolsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Network
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class RepoSource
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Results
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Secret
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Source
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class SourceProvenance
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class StorageSource
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class TimeSpan
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Volume
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class WorkerConfig
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class WorkerPool
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ArtifactObjects
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :location, as: 'location'
collection :paths, as: 'paths'
property :timing, as: 'timing', class: Google::Apis::CloudbuildV1alpha1::TimeSpan, decorator: Google::Apis::CloudbuildV1alpha1::TimeSpan::Representation
end
end
class ArtifactResult
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :file_hash, as: 'fileHash', class: Google::Apis::CloudbuildV1alpha1::FileHashes, decorator: Google::Apis::CloudbuildV1alpha1::FileHashes::Representation
property :location, as: 'location'
end
end
class Artifacts
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :images, as: 'images'
property :objects, as: 'objects', class: Google::Apis::CloudbuildV1alpha1::ArtifactObjects, decorator: Google::Apis::CloudbuildV1alpha1::ArtifactObjects::Representation
end
end
class Build
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :artifacts, as: 'artifacts', class: Google::Apis::CloudbuildV1alpha1::Artifacts, decorator: Google::Apis::CloudbuildV1alpha1::Artifacts::Representation
property :build_trigger_id, as: 'buildTriggerId'
property :create_time, as: 'createTime'
property :finish_time, as: 'finishTime'
property :id, as: 'id'
collection :images, as: 'images'
property :log_url, as: 'logUrl'
property :logs_bucket, as: 'logsBucket'
property :options, as: 'options', class: Google::Apis::CloudbuildV1alpha1::BuildOptions, decorator: Google::Apis::CloudbuildV1alpha1::BuildOptions::Representation
property :project_id, as: 'projectId'
property :results, as: 'results', class: Google::Apis::CloudbuildV1alpha1::Results, decorator: Google::Apis::CloudbuildV1alpha1::Results::Representation
collection :secrets, as: 'secrets', class: Google::Apis::CloudbuildV1alpha1::Secret, decorator: Google::Apis::CloudbuildV1alpha1::Secret::Representation
property :source, as: 'source', class: Google::Apis::CloudbuildV1alpha1::Source, decorator: Google::Apis::CloudbuildV1alpha1::Source::Representation
property :source_provenance, as: 'sourceProvenance', class: Google::Apis::CloudbuildV1alpha1::SourceProvenance, decorator: Google::Apis::CloudbuildV1alpha1::SourceProvenance::Representation
property :start_time, as: 'startTime'
property :status, as: 'status'
property :status_detail, as: 'statusDetail'
collection :steps, as: 'steps', class: Google::Apis::CloudbuildV1alpha1::BuildStep, decorator: Google::Apis::CloudbuildV1alpha1::BuildStep::Representation
hash :substitutions, as: 'substitutions'
collection :tags, as: 'tags'
property :timeout, as: 'timeout'
hash :timing, as: 'timing', class: Google::Apis::CloudbuildV1alpha1::TimeSpan, decorator: Google::Apis::CloudbuildV1alpha1::TimeSpan::Representation
end
end
class BuildOperationMetadata
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :build, as: 'build', class: Google::Apis::CloudbuildV1alpha1::Build, decorator: Google::Apis::CloudbuildV1alpha1::Build::Representation
end
end
class BuildOptions
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :disk_size_gb, :numeric_string => true, as: 'diskSizeGb'
collection :env, as: 'env'
property :log_streaming_option, as: 'logStreamingOption'
property :logging, as: 'logging'
property :machine_type, as: 'machineType'
property :requested_verify_option, as: 'requestedVerifyOption'
collection :secret_env, as: 'secretEnv'
collection :source_provenance_hash, as: 'sourceProvenanceHash'
property :substitution_option, as: 'substitutionOption'
collection :volumes, as: 'volumes', class: Google::Apis::CloudbuildV1alpha1::Volume, decorator: Google::Apis::CloudbuildV1alpha1::Volume::Representation
property :worker_pool, as: 'workerPool'
end
end
class BuildStep
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :args, as: 'args'
property :dir, as: 'dir'
property :entrypoint, as: 'entrypoint'
collection :env, as: 'env'
property :id, as: 'id'
property :name, as: 'name'
property :pull_timing, as: 'pullTiming', class: Google::Apis::CloudbuildV1alpha1::TimeSpan, decorator: Google::Apis::CloudbuildV1alpha1::TimeSpan::Representation
collection :secret_env, as: 'secretEnv'
property :status, as: 'status'
property :timeout, as: 'timeout'
property :timing, as: 'timing', class: Google::Apis::CloudbuildV1alpha1::TimeSpan, decorator: Google::Apis::CloudbuildV1alpha1::TimeSpan::Representation
collection :volumes, as: 'volumes', class: Google::Apis::CloudbuildV1alpha1::Volume, decorator: Google::Apis::CloudbuildV1alpha1::Volume::Representation
collection :wait_for, as: 'waitFor'
end
end
class BuiltImage
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :digest, as: 'digest'
property :name, as: 'name'
property :push_timing, as: 'pushTiming', class: Google::Apis::CloudbuildV1alpha1::TimeSpan, decorator: Google::Apis::CloudbuildV1alpha1::TimeSpan::Representation
end
end
class Empty
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class FileHashes
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :file_hash, as: 'fileHash', class: Google::Apis::CloudbuildV1alpha1::HashProp, decorator: Google::Apis::CloudbuildV1alpha1::HashProp::Representation
end
end
class HashProp
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :type, as: 'type'
property :value, :base64 => true, as: 'value'
end
end
class ListWorkerPoolsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :worker_pools, as: 'workerPools', class: Google::Apis::CloudbuildV1alpha1::WorkerPool, decorator: Google::Apis::CloudbuildV1alpha1::WorkerPool::Representation
end
end
class Network
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :network, as: 'network'
property :project_id, as: 'projectId'
property :subnetwork, as: 'subnetwork'
end
end
class RepoSource
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :branch_name, as: 'branchName'
property :commit_sha, as: 'commitSha'
property :dir, as: 'dir'
property :project_id, as: 'projectId'
property :repo_name, as: 'repoName'
hash :substitutions, as: 'substitutions'
property :tag_name, as: 'tagName'
end
end
class Results
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :artifact_manifest, as: 'artifactManifest'
property :artifact_timing, as: 'artifactTiming', class: Google::Apis::CloudbuildV1alpha1::TimeSpan, decorator: Google::Apis::CloudbuildV1alpha1::TimeSpan::Representation
collection :build_step_images, as: 'buildStepImages'
collection :build_step_outputs, as: 'buildStepOutputs'
collection :images, as: 'images', class: Google::Apis::CloudbuildV1alpha1::BuiltImage, decorator: Google::Apis::CloudbuildV1alpha1::BuiltImage::Representation
property :num_artifacts, :numeric_string => true, as: 'numArtifacts'
end
end
class Secret
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :kms_key_name, as: 'kmsKeyName'
hash :secret_env, as: 'secretEnv'
end
end
class Source
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :repo_source, as: 'repoSource', class: Google::Apis::CloudbuildV1alpha1::RepoSource, decorator: Google::Apis::CloudbuildV1alpha1::RepoSource::Representation
property :storage_source, as: 'storageSource', class: Google::Apis::CloudbuildV1alpha1::StorageSource, decorator: Google::Apis::CloudbuildV1alpha1::StorageSource::Representation
end
end
class SourceProvenance
# @private
class Representation < Google::Apis::Core::JsonRepresentation
hash :file_hashes, as: 'fileHashes', class: Google::Apis::CloudbuildV1alpha1::FileHashes, decorator: Google::Apis::CloudbuildV1alpha1::FileHashes::Representation
property :resolved_repo_source, as: 'resolvedRepoSource', class: Google::Apis::CloudbuildV1alpha1::RepoSource, decorator: Google::Apis::CloudbuildV1alpha1::RepoSource::Representation
property :resolved_storage_source, as: 'resolvedStorageSource', class: Google::Apis::CloudbuildV1alpha1::StorageSource, decorator: Google::Apis::CloudbuildV1alpha1::StorageSource::Representation
end
end
class StorageSource
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :bucket, as: 'bucket'
property :generation, :numeric_string => true, as: 'generation'
property :object, as: 'object'
end
end
class TimeSpan
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :end_time, as: 'endTime'
property :start_time, as: 'startTime'
end
end
class Volume
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
property :path, as: 'path'
end
end
class WorkerConfig
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :disk_size_gb, :numeric_string => true, as: 'diskSizeGb'
property :machine_type, as: 'machineType'
property :network, as: 'network', class: Google::Apis::CloudbuildV1alpha1::Network, decorator: Google::Apis::CloudbuildV1alpha1::Network::Representation
property :tag, as: 'tag'
end
end
class WorkerPool
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :create_time, as: 'createTime'
property :delete_time, as: 'deleteTime'
property :name, as: 'name'
property :project_id, as: 'projectId'
collection :regions, as: 'regions'
property :service_account_email, as: 'serviceAccountEmail'
property :status, as: 'status'
property :update_time, as: 'updateTime'
property :worker_config, as: 'workerConfig', class: Google::Apis::CloudbuildV1alpha1::WorkerConfig, decorator: Google::Apis::CloudbuildV1alpha1::WorkerConfig::Representation
property :worker_count, :numeric_string => true, as: 'workerCount'
end
end
end
end
end

View File

@ -1,226 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module CloudbuildV1alpha1
# Cloud Build API
#
# Creates and manages builds on Google Cloud Platform.
#
# @example
# require 'google/apis/cloudbuild_v1alpha1'
#
# Cloudbuild = Google::Apis::CloudbuildV1alpha1 # Alias the module
# service = Cloudbuild::CloudBuildService.new
#
# @see https://cloud.google.com/cloud-build/docs/
class CloudBuildService < Google::Apis::Core::BaseService
# @return [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.
attr_accessor :key
# @return [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.
attr_accessor :quota_user
def initialize
super('https://cloudbuild.googleapis.com/', '')
@batch_path = 'batch'
end
# Creates a `WorkerPool` to run the builds, and returns the new worker pool.
# This API is experimental.
# @param [String] parent
# ID of the parent project.
# @param [Google::Apis::CloudbuildV1alpha1::WorkerPool] worker_pool_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# 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.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudbuildV1alpha1::WorkerPool] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudbuildV1alpha1::WorkerPool]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def create_project_worker_pool(parent, worker_pool_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1alpha1/{+parent}/workerPools', options)
command.request_representation = Google::Apis::CloudbuildV1alpha1::WorkerPool::Representation
command.request_object = worker_pool_object
command.response_representation = Google::Apis::CloudbuildV1alpha1::WorkerPool::Representation
command.response_class = Google::Apis::CloudbuildV1alpha1::WorkerPool
command.params['parent'] = parent unless parent.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Deletes a `WorkerPool` by its project ID and WorkerPool name.
# This API is experimental.
# @param [String] name
# The field will contain name of the resource requested, for example:
# "projects/project-1/workerPools/workerpool-name"
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# 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.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudbuildV1alpha1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudbuildV1alpha1::Empty]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def delete_project_worker_pool(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'v1alpha1/{+name}', options)
command.response_representation = Google::Apis::CloudbuildV1alpha1::Empty::Representation
command.response_class = Google::Apis::CloudbuildV1alpha1::Empty
command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Returns information about a `WorkerPool`.
# This API is experimental.
# @param [String] name
# The field will contain name of the resource requested, for example:
# "projects/project-1/workerPools/workerpool-name"
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# 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.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudbuildV1alpha1::WorkerPool] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudbuildV1alpha1::WorkerPool]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_project_worker_pool(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1alpha1/{+name}', options)
command.response_representation = Google::Apis::CloudbuildV1alpha1::WorkerPool::Representation
command.response_class = Google::Apis::CloudbuildV1alpha1::WorkerPool
command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# List project's `WorkerPool`s.
# This API is experimental.
# @param [String] parent
# ID of the parent project.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# 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.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudbuildV1alpha1::ListWorkerPoolsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudbuildV1alpha1::ListWorkerPoolsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_project_worker_pools(parent, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1alpha1/{+parent}/workerPools', options)
command.response_representation = Google::Apis::CloudbuildV1alpha1::ListWorkerPoolsResponse::Representation
command.response_class = Google::Apis::CloudbuildV1alpha1::ListWorkerPoolsResponse
command.params['parent'] = parent unless parent.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Update a `WorkerPool`.
# This API is experimental.
# @param [String] name
# The field will contain name of the resource requested, for example:
# "projects/project-1/workerPools/workerpool-name"
# @param [Google::Apis::CloudbuildV1alpha1::WorkerPool] worker_pool_object
# @param [String] update_mask
# A mask specifying which fields in `WorkerPool` should be updated.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# 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.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudbuildV1alpha1::WorkerPool] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudbuildV1alpha1::WorkerPool]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def patch_project_worker_pool(name, worker_pool_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:patch, 'v1alpha1/{+name}', options)
command.request_representation = Google::Apis::CloudbuildV1alpha1::WorkerPool::Representation
command.request_object = worker_pool_object
command.response_representation = Google::Apis::CloudbuildV1alpha1::WorkerPool::Representation
command.response_class = Google::Apis::CloudbuildV1alpha1::WorkerPool
command.params['name'] = name unless name.nil?
command.query['updateMask'] = update_mask unless update_mask.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
protected
def apply_command_defaults(command)
command.query['key'] = key unless key.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
end
end
end
end
end

View File

@ -30,7 +30,19 @@ module Google
# @see https://cloud.google.com/monitoring/api/
module MonitoringV1
VERSION = 'V1'
REVISION = '20191005'
REVISION = '20191202'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
# View and write monitoring data for all of your Google and third-party Cloud and API projects
AUTH_MONITORING = 'https://www.googleapis.com/auth/monitoring'
# View monitoring data for all of your Google Cloud and third-party projects
AUTH_MONITORING_READ = 'https://www.googleapis.com/auth/monitoring.read'
# Publish metric data to your Google Cloud projects
AUTH_MONITORING_WRITE = 'https://www.googleapis.com/auth/monitoring.write'
end
end
end

View File

@ -22,6 +22,266 @@ module Google
module Apis
module MonitoringV1
# Describes how to combine multiple time series to provide different views of
# the data. Aggregation consists of an alignment step on individual time series (
# alignment_period and per_series_aligner) followed by an optional reduction
# step of the data across the aligned time series (cross_series_reducer and
# group_by_fields). For more details, see Aggregation.
class Aggregation
include Google::Apis::Core::Hashable
# The alignment period for per-time series alignment. If present,
# alignmentPeriod must be at least 60 seconds. After per-time series alignment,
# each time series will contain data points only on the period boundaries. If
# perSeriesAligner is not specified or equals ALIGN_NONE, then this field is
# ignored. If perSeriesAligner is specified and does not equal ALIGN_NONE, then
# this field must be defined; otherwise an error is returned.
# Corresponds to the JSON property `alignmentPeriod`
# @return [String]
attr_accessor :alignment_period
# The approach to be used to combine time series. Not all reducer functions may
# be applied to all time series, depending on the metric type and the value type
# of the original time series. Reduction may change the metric type of value
# type of the time series.Time series data must be aligned in order to perform
# cross-time series reduction. If crossSeriesReducer is specified, then
# perSeriesAligner must be specified and not equal ALIGN_NONE and
# alignmentPeriod must be specified; otherwise, an error is returned.
# Corresponds to the JSON property `crossSeriesReducer`
# @return [String]
attr_accessor :cross_series_reducer
# The set of fields to preserve when crossSeriesReducer is specified. The
# groupByFields determine how the time series are partitioned into subsets prior
# to applying the aggregation function. Each subset contains time series that
# have the same value for each of the grouping fields. Each individual time
# series is a member of exactly one subset. The crossSeriesReducer is applied to
# each subset of time series. It is not possible to reduce across different
# resource types, so this field implicitly contains resource.type. Fields not
# specified in groupByFields are aggregated away. If groupByFields is not
# specified and all the time series have the same resource type, then the time
# series are aggregated into a single output time series. If crossSeriesReducer
# is not defined, this field is ignored.
# Corresponds to the JSON property `groupByFields`
# @return [Array<String>]
attr_accessor :group_by_fields
# The approach to be used to align individual time series. Not all alignment
# functions may be applied to all time series, depending on the metric type and
# value type of the original time series. Alignment may change the metric type
# or the value type of the time series.Time series data must be aligned in order
# to perform cross-time series reduction. If crossSeriesReducer is specified,
# then perSeriesAligner must be specified and not equal ALIGN_NONE and
# alignmentPeriod must be specified; otherwise, an error is returned.
# Corresponds to the JSON property `perSeriesAligner`
# @return [String]
attr_accessor :per_series_aligner
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@alignment_period = args[:alignment_period] if args.key?(:alignment_period)
@cross_series_reducer = args[:cross_series_reducer] if args.key?(:cross_series_reducer)
@group_by_fields = args[:group_by_fields] if args.key?(:group_by_fields)
@per_series_aligner = args[:per_series_aligner] if args.key?(:per_series_aligner)
end
end
# A chart axis.
class Axis
include Google::Apis::Core::Hashable
# The label of the axis.
# Corresponds to the JSON property `label`
# @return [String]
attr_accessor :label
# The axis scale. By default, a linear scale is used.
# Corresponds to the JSON property `scale`
# @return [String]
attr_accessor :scale
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@label = args[:label] if args.key?(:label)
@scale = args[:scale] if args.key?(:scale)
end
end
# Options to control visual rendering of a chart.
class ChartOptions
include Google::Apis::Core::Hashable
# The chart mode.
# Corresponds to the JSON property `mode`
# @return [String]
attr_accessor :mode
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@mode = args[:mode] if args.key?(:mode)
end
end
# Defines the layout properties and content for a column.
class Column
include Google::Apis::Core::Hashable
# The relative weight of this column. The column weight is used to adjust the
# height of rows on the screen (relative to peers). If omitted, a value of 1 is
# used.
# Corresponds to the JSON property `weight`
# @return [Fixnum]
attr_accessor :weight
# The display widgets arranged vertically in this column.
# Corresponds to the JSON property `widgets`
# @return [Array<Google::Apis::MonitoringV1::Widget>]
attr_accessor :widgets
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@weight = args[:weight] if args.key?(:weight)
@widgets = args[:widgets] if args.key?(:widgets)
end
end
# A simplified layout that divides the available space into vertical columns and
# arranges a set of widgets vertically in each column.
class ColumnLayout
include Google::Apis::Core::Hashable
# The columns of content to display.
# Corresponds to the JSON property `columns`
# @return [Array<Google::Apis::MonitoringV1::Column>]
attr_accessor :columns
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@columns = args[:columns] if args.key?(:columns)
end
end
# A Google Stackdriver dashboard. Dashboards define the content and layout of
# pages in the Stackdriver web application.
class Dashboard
include Google::Apis::Core::Hashable
# A simplified layout that divides the available space into vertical columns and
# arranges a set of widgets vertically in each column.
# Corresponds to the JSON property `columnLayout`
# @return [Google::Apis::MonitoringV1::ColumnLayout]
attr_accessor :column_layout
# The mutable, human-readable name.
# Corresponds to the JSON property `displayName`
# @return [String]
attr_accessor :display_name
# etag is used for optimistic concurrency control as a way to help prevent
# simultaneous updates of a policy from overwriting each other. An etag is
# returned in the response to GetDashboard, and users are expected to put that
# etag in the request to UpdateDashboard to ensure that their change will be
# applied to the same version of the Dashboard configuration. The field should
# not be passed during dashboard creation.
# Corresponds to the JSON property `etag`
# @return [String]
attr_accessor :etag
# A basic layout divides the available space into vertical columns of equal
# width and arranges a list of widgets using a row-first strategy.
# Corresponds to the JSON property `gridLayout`
# @return [Google::Apis::MonitoringV1::GridLayout]
attr_accessor :grid_layout
# The resource name of the dashboard.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# A simplified layout that divides the available space into rows and arranges a
# set of widgets horizontally in each row.
# Corresponds to the JSON property `rowLayout`
# @return [Google::Apis::MonitoringV1::RowLayout]
attr_accessor :row_layout
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@column_layout = args[:column_layout] if args.key?(:column_layout)
@display_name = args[:display_name] if args.key?(:display_name)
@etag = args[:etag] if args.key?(:etag)
@grid_layout = args[:grid_layout] if args.key?(:grid_layout)
@name = args[:name] if args.key?(:name)
@row_layout = args[:row_layout] if args.key?(:row_layout)
end
end
# Groups a time series query definition with charting options.
class DataSet
include Google::Apis::Core::Hashable
# A template string for naming TimeSeries in the resulting data set. This should
# be a string with interpolations of the form $`label_name`, which will resolve
# to the label's value.
# Corresponds to the JSON property `legendTemplate`
# @return [String]
attr_accessor :legend_template
# Optional. The lower bound on data point frequency for this data set
# implemented by specifying the minimum alignment period to use in a time series
# query. For example, if the data is published once every 10 minutes it would
# not make sense to fetch and align data at one minute intervals.
# Corresponds to the JSON property `minAlignmentPeriod`
# @return [String]
attr_accessor :min_alignment_period
# How this data should be plotted on the chart.
# Corresponds to the JSON property `plotType`
# @return [String]
attr_accessor :plot_type
# TimeSeriesQuery collects the set of supported methods for querying time series
# data from the Stackdriver metrics API.
# Corresponds to the JSON property `timeSeriesQuery`
# @return [Google::Apis::MonitoringV1::TimeSeriesQuery]
attr_accessor :time_series_query
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@legend_template = args[:legend_template] if args.key?(:legend_template)
@min_alignment_period = args[:min_alignment_period] if args.key?(:min_alignment_period)
@plot_type = args[:plot_type] if args.key?(:plot_type)
@time_series_query = args[:time_series_query] if args.key?(:time_series_query)
end
end
# A set of (label, value) pairs which were dropped during aggregation, attached
# to google.api.Distribution.Exemplars in google.api.Distribution values during
# aggregation.These values are used in combination with the label values that
@ -51,6 +311,25 @@ module Google
end
end
# A generic empty message that you can re-use to avoid defining duplicated empty
# messages in your APIs. A typical example is to use it as the request or the
# response type of an API method. For instance:
# service Foo `
# rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
# `
# The JSON representation for Empty is empty JSON object ``.
class Empty
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# A single field of a message type.
class Field
include Google::Apis::Core::Hashable
@ -127,6 +406,89 @@ module Google
end
end
# A gauge chart shows where the current value sits within a pre-defined range.
# The upper and lower bounds should define the possible range of values for the
# scorecard's query (inclusive).
class GaugeView
include Google::Apis::Core::Hashable
# The lower bound for this gauge chart. The value of the chart should always be
# greater than or equal to this.
# Corresponds to the JSON property `lowerBound`
# @return [Float]
attr_accessor :lower_bound
# The upper bound for this gauge chart. The value of the chart should always be
# less than or equal to this.
# Corresponds to the JSON property `upperBound`
# @return [Float]
attr_accessor :upper_bound
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@lower_bound = args[:lower_bound] if args.key?(:lower_bound)
@upper_bound = args[:upper_bound] if args.key?(:upper_bound)
end
end
# A basic layout divides the available space into vertical columns of equal
# width and arranges a list of widgets using a row-first strategy.
class GridLayout
include Google::Apis::Core::Hashable
# The number of columns into which the view's width is divided. If omitted or
# set to zero, a system default will be used.
# Corresponds to the JSON property `columns`
# @return [Fixnum]
attr_accessor :columns
# The informational elements that are arranged into the columns row-first.
# Corresponds to the JSON property `widgets`
# @return [Array<Google::Apis::MonitoringV1::Widget>]
attr_accessor :widgets
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@columns = args[:columns] if args.key?(:columns)
@widgets = args[:widgets] if args.key?(:widgets)
end
end
# The ListDashboards request.
class ListDashboardsResponse
include Google::Apis::Core::Hashable
# The list of requested dashboards.
# Corresponds to the JSON property `dashboards`
# @return [Array<Google::Apis::MonitoringV1::Dashboard>]
attr_accessor :dashboards
# If there are more results than have been returned, then this field is set to a
# non-empty value. To see the additional results, use that value as pageToken in
# the next call to this method.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@dashboards = args[:dashboards] if args.key?(:dashboards)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
end
end
# A protocol buffer option, which can be attached to a message, field,
# enumeration, etc.
class Option
@ -159,6 +521,174 @@ module Google
end
end
# Describes a ranking-based time series filter. Each input time series is ranked
# with an aligner. The filter lets through up to num_time_series time series,
# selecting them based on the relative ranking.
class PickTimeSeriesFilter
include Google::Apis::Core::Hashable
# How to use the ranking to select time series that pass through the filter.
# Corresponds to the JSON property `direction`
# @return [String]
attr_accessor :direction
# How many time series to return.
# Corresponds to the JSON property `numTimeSeries`
# @return [Fixnum]
attr_accessor :num_time_series
# rankingMethod is applied to each time series independently to produce the
# value which will be used to compare the time series to other time series.
# Corresponds to the JSON property `rankingMethod`
# @return [String]
attr_accessor :ranking_method
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@direction = args[:direction] if args.key?(:direction)
@num_time_series = args[:num_time_series] if args.key?(:num_time_series)
@ranking_method = args[:ranking_method] if args.key?(:ranking_method)
end
end
# Describes a query to build the numerator or denominator of a
# TimeSeriesFilterRatio.
class RatioPart
include Google::Apis::Core::Hashable
# Describes how to combine multiple time series to provide different views of
# the data. Aggregation consists of an alignment step on individual time series (
# alignment_period and per_series_aligner) followed by an optional reduction
# step of the data across the aligned time series (cross_series_reducer and
# group_by_fields). For more details, see Aggregation.
# Corresponds to the JSON property `aggregation`
# @return [Google::Apis::MonitoringV1::Aggregation]
attr_accessor :aggregation
# Required. The monitoring filter that identifies the metric types, resources,
# and projects to query.
# Corresponds to the JSON property `filter`
# @return [String]
attr_accessor :filter
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@aggregation = args[:aggregation] if args.key?(:aggregation)
@filter = args[:filter] if args.key?(:filter)
end
end
# Defines the layout properties and content for a row.
class Row
include Google::Apis::Core::Hashable
# The relative weight of this row. The row weight is used to adjust the height
# of rows on the screen (relative to peers). If omitted, a value of 1 is used.
# Corresponds to the JSON property `weight`
# @return [Fixnum]
attr_accessor :weight
# The display widgets arranged horizontally in this row.
# Corresponds to the JSON property `widgets`
# @return [Array<Google::Apis::MonitoringV1::Widget>]
attr_accessor :widgets
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@weight = args[:weight] if args.key?(:weight)
@widgets = args[:widgets] if args.key?(:widgets)
end
end
# A simplified layout that divides the available space into rows and arranges a
# set of widgets horizontally in each row.
class RowLayout
include Google::Apis::Core::Hashable
# The rows of content to display.
# Corresponds to the JSON property `rows`
# @return [Array<Google::Apis::MonitoringV1::Row>]
attr_accessor :rows
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@rows = args[:rows] if args.key?(:rows)
end
end
# A widget showing the latest value of a metric, and how this value relates to
# one or more thresholds.
class Scorecard
include Google::Apis::Core::Hashable
# A gauge chart shows where the current value sits within a pre-defined range.
# The upper and lower bounds should define the possible range of values for the
# scorecard's query (inclusive).
# Corresponds to the JSON property `gaugeView`
# @return [Google::Apis::MonitoringV1::GaugeView]
attr_accessor :gauge_view
# A sparkChart is a small chart suitable for inclusion in a table-cell or inline
# in text. This message contains the configuration for a sparkChart to show up
# on a Scorecard, showing recent trends of the scorecard's timeseries.
# Corresponds to the JSON property `sparkChartView`
# @return [Google::Apis::MonitoringV1::SparkChartView]
attr_accessor :spark_chart_view
# The thresholds used to determine the state of the scorecard given the time
# series' current value. For an actual value x, the scorecard is in a danger
# state if x is less than or equal to a danger threshold that triggers below, or
# greater than or equal to a danger threshold that triggers above. Similarly, if
# x is above/below a warning threshold that triggers above/below, then the
# scorecard is in a warning state - unless x also puts it in a danger state. (
# Danger trumps warning.)As an example, consider a scorecard with the following
# four thresholds: ` value: 90, category: 'DANGER', trigger: 'ABOVE', `, `
# value: 70, category: 'WARNING', trigger: 'ABOVE', `, ` value: 10, category:
# 'DANGER', trigger: 'BELOW', `, ` value: 20, category: 'WARNING', trigger:
# 'BELOW', `Then: values less than or equal to 10 would put the scorecard in a
# DANGER state, values greater than 10 but less than or equal to 20 a WARNING
# state, values strictly between 20 and 70 an OK state, values greater than or
# equal to 70 but less than 90 a WARNING state, and values greater than or equal
# to 90 a DANGER state.
# Corresponds to the JSON property `thresholds`
# @return [Array<Google::Apis::MonitoringV1::Threshold>]
attr_accessor :thresholds
# TimeSeriesQuery collects the set of supported methods for querying time series
# data from the Stackdriver metrics API.
# Corresponds to the JSON property `timeSeriesQuery`
# @return [Google::Apis::MonitoringV1::TimeSeriesQuery]
attr_accessor :time_series_query
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@gauge_view = args[:gauge_view] if args.key?(:gauge_view)
@spark_chart_view = args[:spark_chart_view] if args.key?(:spark_chart_view)
@thresholds = args[:thresholds] if args.key?(:thresholds)
@time_series_query = args[:time_series_query] if args.key?(:time_series_query)
end
end
# SourceContext represents information about the source of a protobuf element,
# like the file in which it is defined.
class SourceContext
@ -206,6 +736,266 @@ module Google
end
end
# A sparkChart is a small chart suitable for inclusion in a table-cell or inline
# in text. This message contains the configuration for a sparkChart to show up
# on a Scorecard, showing recent trends of the scorecard's timeseries.
class SparkChartView
include Google::Apis::Core::Hashable
# The lower bound on data point frequency in the chart implemented by specifying
# the minimum alignment period to use in a time series query. For example, if
# the data is published once every 10 minutes it would not make sense to fetch
# and align data at one minute intervals. This field is optional and exists only
# as a hint.
# Corresponds to the JSON property `minAlignmentPeriod`
# @return [String]
attr_accessor :min_alignment_period
# The type of sparkchart to show in this chartView.
# Corresponds to the JSON property `sparkChartType`
# @return [String]
attr_accessor :spark_chart_type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@min_alignment_period = args[:min_alignment_period] if args.key?(:min_alignment_period)
@spark_chart_type = args[:spark_chart_type] if args.key?(:spark_chart_type)
end
end
# A filter that ranks streams based on their statistical relation to other
# streams in a request.
class StatisticalTimeSeriesFilter
include Google::Apis::Core::Hashable
# How many time series to output.
# Corresponds to the JSON property `numTimeSeries`
# @return [Fixnum]
attr_accessor :num_time_series
# rankingMethod is applied to a set of time series, and then the produced value
# for each individual time series is used to compare a given time series to
# others. These are methods that cannot be applied stream-by-stream, but rather
# require the full context of a request to evaluate time series.
# Corresponds to the JSON property `rankingMethod`
# @return [String]
attr_accessor :ranking_method
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@num_time_series = args[:num_time_series] if args.key?(:num_time_series)
@ranking_method = args[:ranking_method] if args.key?(:ranking_method)
end
end
# A widget that displays textual content.
class Text
include Google::Apis::Core::Hashable
# The text content to be displayed.
# Corresponds to the JSON property `content`
# @return [String]
attr_accessor :content
# How the text content is formatted.
# Corresponds to the JSON property `format`
# @return [String]
attr_accessor :format
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@content = args[:content] if args.key?(:content)
@format = args[:format] if args.key?(:format)
end
end
# Defines a threshold for categorizing time series values.
class Threshold
include Google::Apis::Core::Hashable
# The state color for this threshold. Color is not allowed in a XyChart.
# Corresponds to the JSON property `color`
# @return [String]
attr_accessor :color
# The direction for the current threshold. Direction is not allowed in a XyChart.
# Corresponds to the JSON property `direction`
# @return [String]
attr_accessor :direction
# A label for the threshold.
# Corresponds to the JSON property `label`
# @return [String]
attr_accessor :label
# The value of the threshold. The value should be defined in the native scale of
# the metric.
# Corresponds to the JSON property `value`
# @return [Float]
attr_accessor :value
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@color = args[:color] if args.key?(:color)
@direction = args[:direction] if args.key?(:direction)
@label = args[:label] if args.key?(:label)
@value = args[:value] if args.key?(:value)
end
end
# A filter that defines a subset of time series data that is displayed in a
# widget. Time series data is fetched using the ListTimeSeries method.
class TimeSeriesFilter
include Google::Apis::Core::Hashable
# Describes how to combine multiple time series to provide different views of
# the data. Aggregation consists of an alignment step on individual time series (
# alignment_period and per_series_aligner) followed by an optional reduction
# step of the data across the aligned time series (cross_series_reducer and
# group_by_fields). For more details, see Aggregation.
# Corresponds to the JSON property `aggregation`
# @return [Google::Apis::MonitoringV1::Aggregation]
attr_accessor :aggregation
# Required. The monitoring filter that identifies the metric types, resources,
# and projects to query.
# Corresponds to the JSON property `filter`
# @return [String]
attr_accessor :filter
# Describes a ranking-based time series filter. Each input time series is ranked
# with an aligner. The filter lets through up to num_time_series time series,
# selecting them based on the relative ranking.
# Corresponds to the JSON property `pickTimeSeriesFilter`
# @return [Google::Apis::MonitoringV1::PickTimeSeriesFilter]
attr_accessor :pick_time_series_filter
# A filter that ranks streams based on their statistical relation to other
# streams in a request.
# Corresponds to the JSON property `statisticalTimeSeriesFilter`
# @return [Google::Apis::MonitoringV1::StatisticalTimeSeriesFilter]
attr_accessor :statistical_time_series_filter
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@aggregation = args[:aggregation] if args.key?(:aggregation)
@filter = args[:filter] if args.key?(:filter)
@pick_time_series_filter = args[:pick_time_series_filter] if args.key?(:pick_time_series_filter)
@statistical_time_series_filter = args[:statistical_time_series_filter] if args.key?(:statistical_time_series_filter)
end
end
# A pair of time series filters that define a ratio computation. The output time
# series is the pair-wise division of each aligned element from the numerator
# and denominator time series.
class TimeSeriesFilterRatio
include Google::Apis::Core::Hashable
# Describes a query to build the numerator or denominator of a
# TimeSeriesFilterRatio.
# Corresponds to the JSON property `denominator`
# @return [Google::Apis::MonitoringV1::RatioPart]
attr_accessor :denominator
# Describes a query to build the numerator or denominator of a
# TimeSeriesFilterRatio.
# Corresponds to the JSON property `numerator`
# @return [Google::Apis::MonitoringV1::RatioPart]
attr_accessor :numerator
# Describes a ranking-based time series filter. Each input time series is ranked
# with an aligner. The filter lets through up to num_time_series time series,
# selecting them based on the relative ranking.
# Corresponds to the JSON property `pickTimeSeriesFilter`
# @return [Google::Apis::MonitoringV1::PickTimeSeriesFilter]
attr_accessor :pick_time_series_filter
# Describes how to combine multiple time series to provide different views of
# the data. Aggregation consists of an alignment step on individual time series (
# alignment_period and per_series_aligner) followed by an optional reduction
# step of the data across the aligned time series (cross_series_reducer and
# group_by_fields). For more details, see Aggregation.
# Corresponds to the JSON property `secondaryAggregation`
# @return [Google::Apis::MonitoringV1::Aggregation]
attr_accessor :secondary_aggregation
# A filter that ranks streams based on their statistical relation to other
# streams in a request.
# Corresponds to the JSON property `statisticalTimeSeriesFilter`
# @return [Google::Apis::MonitoringV1::StatisticalTimeSeriesFilter]
attr_accessor :statistical_time_series_filter
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@denominator = args[:denominator] if args.key?(:denominator)
@numerator = args[:numerator] if args.key?(:numerator)
@pick_time_series_filter = args[:pick_time_series_filter] if args.key?(:pick_time_series_filter)
@secondary_aggregation = args[:secondary_aggregation] if args.key?(:secondary_aggregation)
@statistical_time_series_filter = args[:statistical_time_series_filter] if args.key?(:statistical_time_series_filter)
end
end
# TimeSeriesQuery collects the set of supported methods for querying time series
# data from the Stackdriver metrics API.
class TimeSeriesQuery
include Google::Apis::Core::Hashable
# A filter that defines a subset of time series data that is displayed in a
# widget. Time series data is fetched using the ListTimeSeries method.
# Corresponds to the JSON property `timeSeriesFilter`
# @return [Google::Apis::MonitoringV1::TimeSeriesFilter]
attr_accessor :time_series_filter
# A pair of time series filters that define a ratio computation. The output time
# series is the pair-wise division of each aligned element from the numerator
# and denominator time series.
# Corresponds to the JSON property `timeSeriesFilterRatio`
# @return [Google::Apis::MonitoringV1::TimeSeriesFilterRatio]
attr_accessor :time_series_filter_ratio
# The unit of data contained in fetched time series. If non-empty, this unit
# will override any unit that accompanies fetched data. The format is the same
# as the unit field in MetricDescriptor.
# Corresponds to the JSON property `unitOverride`
# @return [String]
attr_accessor :unit_override
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@time_series_filter = args[:time_series_filter] if args.key?(:time_series_filter)
@time_series_filter_ratio = args[:time_series_filter_ratio] if args.key?(:time_series_filter_ratio)
@unit_override = args[:unit_override] if args.key?(:unit_override)
end
end
# A protocol buffer message type.
class Type
include Google::Apis::Core::Hashable
@ -255,6 +1045,109 @@ module Google
@syntax = args[:syntax] if args.key?(:syntax)
end
end
# Widget contains a single dashboard component and configuration of how to
# present the component in the dashboard.
class Widget
include Google::Apis::Core::Hashable
# A generic empty message that you can re-use to avoid defining duplicated empty
# messages in your APIs. A typical example is to use it as the request or the
# response type of an API method. For instance:
# service Foo `
# rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
# `
# The JSON representation for Empty is empty JSON object ``.
# Corresponds to the JSON property `blank`
# @return [Google::Apis::MonitoringV1::Empty]
attr_accessor :blank
# A widget showing the latest value of a metric, and how this value relates to
# one or more thresholds.
# Corresponds to the JSON property `scorecard`
# @return [Google::Apis::MonitoringV1::Scorecard]
attr_accessor :scorecard
# A widget that displays textual content.
# Corresponds to the JSON property `text`
# @return [Google::Apis::MonitoringV1::Text]
attr_accessor :text
# Optional. The title of the widget.
# Corresponds to the JSON property `title`
# @return [String]
attr_accessor :title
# A chart that displays data on a 2D (X and Y axes) plane.
# Corresponds to the JSON property `xyChart`
# @return [Google::Apis::MonitoringV1::XyChart]
attr_accessor :xy_chart
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@blank = args[:blank] if args.key?(:blank)
@scorecard = args[:scorecard] if args.key?(:scorecard)
@text = args[:text] if args.key?(:text)
@title = args[:title] if args.key?(:title)
@xy_chart = args[:xy_chart] if args.key?(:xy_chart)
end
end
# A chart that displays data on a 2D (X and Y axes) plane.
class XyChart
include Google::Apis::Core::Hashable
# Options to control visual rendering of a chart.
# Corresponds to the JSON property `chartOptions`
# @return [Google::Apis::MonitoringV1::ChartOptions]
attr_accessor :chart_options
# The data displayed in this chart.
# Corresponds to the JSON property `dataSets`
# @return [Array<Google::Apis::MonitoringV1::DataSet>]
attr_accessor :data_sets
# Threshold lines drawn horizontally across the chart.
# Corresponds to the JSON property `thresholds`
# @return [Array<Google::Apis::MonitoringV1::Threshold>]
attr_accessor :thresholds
# The duration used to display a comparison chart. A comparison chart shows
# values from two time periods simultaneously (e.g., week-over-week metrics).
# The duration must be positive, and it can only be applied to charts with data
# sets of LINE plot type.
# Corresponds to the JSON property `timeshiftDuration`
# @return [String]
attr_accessor :timeshift_duration
# A chart axis.
# Corresponds to the JSON property `xAxis`
# @return [Google::Apis::MonitoringV1::Axis]
attr_accessor :x_axis
# A chart axis.
# Corresponds to the JSON property `yAxis`
# @return [Google::Apis::MonitoringV1::Axis]
attr_accessor :y_axis
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@chart_options = args[:chart_options] if args.key?(:chart_options)
@data_sets = args[:data_sets] if args.key?(:data_sets)
@thresholds = args[:thresholds] if args.key?(:thresholds)
@timeshift_duration = args[:timeshift_duration] if args.key?(:timeshift_duration)
@x_axis = args[:x_axis] if args.key?(:x_axis)
@y_axis = args[:y_axis] if args.key?(:y_axis)
end
end
end
end
end

View File

@ -22,24 +22,120 @@ module Google
module Apis
module MonitoringV1
class Aggregation
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Axis
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ChartOptions
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Column
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ColumnLayout
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Dashboard
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class DataSet
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class DroppedLabels
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Empty
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Field
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GaugeView
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GridLayout
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListDashboardsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Option
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class PickTimeSeriesFilter
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class RatioPart
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Row
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class RowLayout
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Scorecard
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class SourceContext
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -52,12 +148,134 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class SparkChartView
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class StatisticalTimeSeriesFilter
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Text
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Threshold
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class TimeSeriesFilter
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class TimeSeriesFilterRatio
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class TimeSeriesQuery
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Type
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Widget
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class XyChart
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Aggregation
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :alignment_period, as: 'alignmentPeriod'
property :cross_series_reducer, as: 'crossSeriesReducer'
collection :group_by_fields, as: 'groupByFields'
property :per_series_aligner, as: 'perSeriesAligner'
end
end
class Axis
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :label, as: 'label'
property :scale, as: 'scale'
end
end
class ChartOptions
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :mode, as: 'mode'
end
end
class Column
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :weight, :numeric_string => true, as: 'weight'
collection :widgets, as: 'widgets', class: Google::Apis::MonitoringV1::Widget, decorator: Google::Apis::MonitoringV1::Widget::Representation
end
end
class ColumnLayout
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :columns, as: 'columns', class: Google::Apis::MonitoringV1::Column, decorator: Google::Apis::MonitoringV1::Column::Representation
end
end
class Dashboard
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :column_layout, as: 'columnLayout', class: Google::Apis::MonitoringV1::ColumnLayout, decorator: Google::Apis::MonitoringV1::ColumnLayout::Representation
property :display_name, as: 'displayName'
property :etag, as: 'etag'
property :grid_layout, as: 'gridLayout', class: Google::Apis::MonitoringV1::GridLayout, decorator: Google::Apis::MonitoringV1::GridLayout::Representation
property :name, as: 'name'
property :row_layout, as: 'rowLayout', class: Google::Apis::MonitoringV1::RowLayout, decorator: Google::Apis::MonitoringV1::RowLayout::Representation
end
end
class DataSet
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :legend_template, as: 'legendTemplate'
property :min_alignment_period, as: 'minAlignmentPeriod'
property :plot_type, as: 'plotType'
property :time_series_query, as: 'timeSeriesQuery', class: Google::Apis::MonitoringV1::TimeSeriesQuery, decorator: Google::Apis::MonitoringV1::TimeSeriesQuery::Representation
end
end
class DroppedLabels
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -65,6 +283,12 @@ module Google
end
end
class Empty
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class Field
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -82,6 +306,32 @@ module Google
end
end
class GaugeView
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :lower_bound, as: 'lowerBound'
property :upper_bound, as: 'upperBound'
end
end
class GridLayout
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :columns, :numeric_string => true, as: 'columns'
collection :widgets, as: 'widgets', class: Google::Apis::MonitoringV1::Widget, decorator: Google::Apis::MonitoringV1::Widget::Representation
end
end
class ListDashboardsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :dashboards, as: 'dashboards', class: Google::Apis::MonitoringV1::Dashboard, decorator: Google::Apis::MonitoringV1::Dashboard::Representation
property :next_page_token, as: 'nextPageToken'
end
end
class Option
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -90,6 +340,55 @@ module Google
end
end
class PickTimeSeriesFilter
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :direction, as: 'direction'
property :num_time_series, as: 'numTimeSeries'
property :ranking_method, as: 'rankingMethod'
end
end
class RatioPart
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :aggregation, as: 'aggregation', class: Google::Apis::MonitoringV1::Aggregation, decorator: Google::Apis::MonitoringV1::Aggregation::Representation
property :filter, as: 'filter'
end
end
class Row
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :weight, :numeric_string => true, as: 'weight'
collection :widgets, as: 'widgets', class: Google::Apis::MonitoringV1::Widget, decorator: Google::Apis::MonitoringV1::Widget::Representation
end
end
class RowLayout
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :rows, as: 'rows', class: Google::Apis::MonitoringV1::Row, decorator: Google::Apis::MonitoringV1::Row::Representation
end
end
class Scorecard
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :gauge_view, as: 'gaugeView', class: Google::Apis::MonitoringV1::GaugeView, decorator: Google::Apis::MonitoringV1::GaugeView::Representation
property :spark_chart_view, as: 'sparkChartView', class: Google::Apis::MonitoringV1::SparkChartView, decorator: Google::Apis::MonitoringV1::SparkChartView::Representation
collection :thresholds, as: 'thresholds', class: Google::Apis::MonitoringV1::Threshold, decorator: Google::Apis::MonitoringV1::Threshold::Representation
property :time_series_query, as: 'timeSeriesQuery', class: Google::Apis::MonitoringV1::TimeSeriesQuery, decorator: Google::Apis::MonitoringV1::TimeSeriesQuery::Representation
end
end
class SourceContext
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -104,6 +403,80 @@ module Google
end
end
class SparkChartView
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :min_alignment_period, as: 'minAlignmentPeriod'
property :spark_chart_type, as: 'sparkChartType'
end
end
class StatisticalTimeSeriesFilter
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :num_time_series, as: 'numTimeSeries'
property :ranking_method, as: 'rankingMethod'
end
end
class Text
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :content, as: 'content'
property :format, as: 'format'
end
end
class Threshold
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :color, as: 'color'
property :direction, as: 'direction'
property :label, as: 'label'
property :value, as: 'value'
end
end
class TimeSeriesFilter
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :aggregation, as: 'aggregation', class: Google::Apis::MonitoringV1::Aggregation, decorator: Google::Apis::MonitoringV1::Aggregation::Representation
property :filter, as: 'filter'
property :pick_time_series_filter, as: 'pickTimeSeriesFilter', class: Google::Apis::MonitoringV1::PickTimeSeriesFilter, decorator: Google::Apis::MonitoringV1::PickTimeSeriesFilter::Representation
property :statistical_time_series_filter, as: 'statisticalTimeSeriesFilter', class: Google::Apis::MonitoringV1::StatisticalTimeSeriesFilter, decorator: Google::Apis::MonitoringV1::StatisticalTimeSeriesFilter::Representation
end
end
class TimeSeriesFilterRatio
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :denominator, as: 'denominator', class: Google::Apis::MonitoringV1::RatioPart, decorator: Google::Apis::MonitoringV1::RatioPart::Representation
property :numerator, as: 'numerator', class: Google::Apis::MonitoringV1::RatioPart, decorator: Google::Apis::MonitoringV1::RatioPart::Representation
property :pick_time_series_filter, as: 'pickTimeSeriesFilter', class: Google::Apis::MonitoringV1::PickTimeSeriesFilter, decorator: Google::Apis::MonitoringV1::PickTimeSeriesFilter::Representation
property :secondary_aggregation, as: 'secondaryAggregation', class: Google::Apis::MonitoringV1::Aggregation, decorator: Google::Apis::MonitoringV1::Aggregation::Representation
property :statistical_time_series_filter, as: 'statisticalTimeSeriesFilter', class: Google::Apis::MonitoringV1::StatisticalTimeSeriesFilter, decorator: Google::Apis::MonitoringV1::StatisticalTimeSeriesFilter::Representation
end
end
class TimeSeriesQuery
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :time_series_filter, as: 'timeSeriesFilter', class: Google::Apis::MonitoringV1::TimeSeriesFilter, decorator: Google::Apis::MonitoringV1::TimeSeriesFilter::Representation
property :time_series_filter_ratio, as: 'timeSeriesFilterRatio', class: Google::Apis::MonitoringV1::TimeSeriesFilterRatio, decorator: Google::Apis::MonitoringV1::TimeSeriesFilterRatio::Representation
property :unit_override, as: 'unitOverride'
end
end
class Type
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -118,6 +491,38 @@ module Google
property :syntax, as: 'syntax'
end
end
class Widget
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :blank, as: 'blank', class: Google::Apis::MonitoringV1::Empty, decorator: Google::Apis::MonitoringV1::Empty::Representation
property :scorecard, as: 'scorecard', class: Google::Apis::MonitoringV1::Scorecard, decorator: Google::Apis::MonitoringV1::Scorecard::Representation
property :text, as: 'text', class: Google::Apis::MonitoringV1::Text, decorator: Google::Apis::MonitoringV1::Text::Representation
property :title, as: 'title'
property :xy_chart, as: 'xyChart', class: Google::Apis::MonitoringV1::XyChart, decorator: Google::Apis::MonitoringV1::XyChart::Representation
end
end
class XyChart
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :chart_options, as: 'chartOptions', class: Google::Apis::MonitoringV1::ChartOptions, decorator: Google::Apis::MonitoringV1::ChartOptions::Representation
collection :data_sets, as: 'dataSets', class: Google::Apis::MonitoringV1::DataSet, decorator: Google::Apis::MonitoringV1::DataSet::Representation
collection :thresholds, as: 'thresholds', class: Google::Apis::MonitoringV1::Threshold, decorator: Google::Apis::MonitoringV1::Threshold::Representation
property :timeshift_duration, as: 'timeshiftDuration'
property :x_axis, as: 'xAxis', class: Google::Apis::MonitoringV1::Axis, decorator: Google::Apis::MonitoringV1::Axis::Representation
property :y_axis, as: 'yAxis', class: Google::Apis::MonitoringV1::Axis, decorator: Google::Apis::MonitoringV1::Axis::Representation
end
end
end
end
end

View File

@ -51,6 +51,188 @@ module Google
super('https://monitoring.googleapis.com/', '')
@batch_path = 'batch'
end
# Creates a new custom dashboard.This method requires the monitoring.dashboards.
# create permission on the specified project. For more information, see Google
# Cloud IAM (https://cloud.google.com/iam).
# @param [String] parent
# The project on which to execute the request. The format is "projects/`
# project_id_or_number`". The `project_id_or_number` must match the dashboard
# resource name.
# @param [Google::Apis::MonitoringV1::Dashboard] dashboard_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# 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.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::MonitoringV1::Dashboard] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::MonitoringV1::Dashboard]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def create_project_dashboard(parent, dashboard_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+parent}/dashboards', options)
command.request_representation = Google::Apis::MonitoringV1::Dashboard::Representation
command.request_object = dashboard_object
command.response_representation = Google::Apis::MonitoringV1::Dashboard::Representation
command.response_class = Google::Apis::MonitoringV1::Dashboard
command.params['parent'] = parent unless parent.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Deletes an existing custom dashboard.This method requires the monitoring.
# dashboards.delete permission on the specified dashboard. For more information,
# see Google Cloud IAM (https://cloud.google.com/iam).
# @param [String] name
# The resource name of the Dashboard. The format is "projects/`
# project_id_or_number`/dashboards/`dashboard_id`".
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# 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.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::MonitoringV1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::MonitoringV1::Empty]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def delete_project_dashboard(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'v1/{+name}', options)
command.response_representation = Google::Apis::MonitoringV1::Empty::Representation
command.response_class = Google::Apis::MonitoringV1::Empty
command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Fetches a specific dashboard.This method requires the monitoring.dashboards.
# get permission on the specified dashboard. For more information, see Google
# Cloud IAM (https://cloud.google.com/iam).
# @param [String] name
# The resource name of the Dashboard. The format is one of "dashboards/`
# dashboard_id`" (for system dashboards) or "projects/`project_id_or_number`/
# dashboards/`dashboard_id`" (for custom dashboards).
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# 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.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::MonitoringV1::Dashboard] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::MonitoringV1::Dashboard]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_project_dashboard(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}', options)
command.response_representation = Google::Apis::MonitoringV1::Dashboard::Representation
command.response_class = Google::Apis::MonitoringV1::Dashboard
command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Lists the existing dashboards.This method requires the monitoring.dashboards.
# list permission on the specified project. For more information, see Google
# Cloud IAM (https://cloud.google.com/iam).
# @param [String] parent
# The scope of the dashboards to list. A project scope must be specified in the
# form of "projects/`project_id_or_number`".
# @param [Fixnum] page_size
# A positive number that is the maximum number of results to return. If
# unspecified, a default of 1000 is used.
# @param [String] page_token
# If this field is not empty then it must contain the nextPageToken value
# returned by a previous call to this method. Using this field causes the method
# to return additional results from the previous method call.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# 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.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::MonitoringV1::ListDashboardsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::MonitoringV1::ListDashboardsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_project_dashboards(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+parent}/dashboards', options)
command.response_representation = Google::Apis::MonitoringV1::ListDashboardsResponse::Representation
command.response_class = Google::Apis::MonitoringV1::ListDashboardsResponse
command.params['parent'] = parent unless parent.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Replaces an existing custom dashboard with a new definition.This method
# requires the monitoring.dashboards.update permission on the specified
# dashboard. For more information, see Google Cloud IAM (https://cloud.google.
# com/iam).
# @param [String] name
# The resource name of the dashboard.
# @param [Google::Apis::MonitoringV1::Dashboard] dashboard_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# 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.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::MonitoringV1::Dashboard] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::MonitoringV1::Dashboard]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def patch_project_dashboard(name, dashboard_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:patch, 'v1/{+name}', options)
command.request_representation = Google::Apis::MonitoringV1::Dashboard::Representation
command.request_object = dashboard_object
command.response_representation = Google::Apis::MonitoringV1::Dashboard::Representation
command.response_class = Google::Apis::MonitoringV1::Dashboard
command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
protected

View File

@ -30,7 +30,7 @@ module Google
# @see https://cloud.google.com/monitoring/api/
module MonitoringV3
VERSION = 'V3'
REVISION = '20191118'
REVISION = '20191202'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'

View File

@ -2123,39 +2123,17 @@ module Google
# @return [String]
attr_accessor :type
# The unit in which the metric value is reported. It is only applicable if the
# value_type is INT64, DOUBLE, or DISTRIBUTION. The supported units are a subset
# of The Unified Code for Units of Measure (http://unitsofmeasure.org/ucum.html)
# standard:Basic units (UNIT)
# bit bit
# By byte
# s second
# min minute
# h hour
# d dayPrefixes (PREFIX)
# k kilo (10**3)
# M mega (10**6)
# G giga (10**9)
# T tera (10**12)
# P peta (10**15)
# E exa (10**18)
# Z zetta (10**21)
# Y yotta (10**24)
# m milli (10**-3)
# u micro (10**-6)
# n nano (10**-9)
# p pico (10**-12)
# f femto (10**-15)
# a atto (10**-18)
# z zepto (10**-21)
# y yocto (10**-24)
# Ki kibi (2**10)
# Mi mebi (2**20)
# Gi gibi (2**30)
# Ti tebi (2**40)GrammarThe grammar also includes these connectors:
# / division (as an infix operator, e.g. 1/s).
# . multiplication (as an infix operator, e.g. GBy.d)The grammar for a unit is
# as follows:
# Ki kibi (2^10)
# Mi mebi (2^20)
# Gi gibi (2^30)
# Ti tebi (2^40)
# Pi pebi (2^50)GrammarThe grammar also includes these connectors:
# / division or ratio (as an infix operator). For examples, kBy/`email` or MiBy/
# 10ms (although you should almost never have /s in a metric unit; rates should
# always be computed at query time from the underlying cumulative or delta
# value).
# . multiplication or composition (as an infix operator). For examples, GBy.d
# or k`watt`.h.The grammar for a unit is as follows:
# Expression = Component ` "." Component ` ` "/" Component ` ;
# Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ]
# | Annotation
@ -2163,14 +2141,24 @@ module Google
# ;
# Annotation = "`" NAME "`" ;
# Notes:
# Annotation is just a comment if it follows a UNIT and is equivalent to 1 if
# it is used alone. For examples, `requests`/s == 1/s, By`transmitted`/s == By/
# s.
# NAME is a sequence of non-blank printable ASCII characters not containing '`'
# or '`'.
# 1 represents dimensionless value 1, such as in 1/s.
# % represents dimensionless value 1/100, and annotates values giving a
# percentage.
# Annotation is just a comment if it follows a UNIT. If the annotation is used
# alone, then the unit is equivalent to 1. For examples, `request`/s == 1/s, By`
# transmitted`/s == By/s.
# NAME is a sequence of non-blank printable ASCII characters not containing `
# or `.
# 1 represents a unitary dimensionless unit (https://en.wikipedia.org/wiki/
# Dimensionless_quantity) of 1, such as in 1/s. It is typically used when none
# of the basic units are appropriate. For example, "new users per day" can be
# represented as 1/d or `new-users`/d (and a metric value 5 would mean "5 new
# users). Alternatively, "thousands of page views per day" would be represented
# as 1000/d or k1/d or k`page_views`/d (and a metric value of 5.3 would mean "
# 5300 page views per day").
# % represents dimensionless value of 1/100, and annotates values giving a
# percentage (so the metric values are typically in the range of 0..100, and a
# metric value 3 means "3 percent").
# 10^2.% indicates a metric contains a ratio, typically in the range 0..1, that
# will be multiplied by 100 and displayed as a percentage (so a metric value 0.
# 03 means "3 percent").
# Corresponds to the JSON property `unit`
# @return [String]
attr_accessor :unit

View File

@ -25,7 +25,7 @@ module Google
# @see https://cloud.google.com/iam/
module PolicytroubleshooterV1beta
VERSION = 'V1beta'
REVISION = '20191118'
REVISION = '20191202'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'

View File

@ -22,32 +22,35 @@ module Google
module Apis
module PolicytroubleshooterV1beta
# AccessTuple defines information required for checking an access attempt.
# In other words, this is the tuple given to `CheckAccess`.
# Information about the member, resource, and permission to check.
class GoogleCloudPolicytroubleshooterV1betaAccessTuple
include Google::Apis::Core::Hashable
# Required. A full resource name according to
# https://cloud.google.com/apis/design/resource_names. This is the full
# resource name of the resource that access is checked against.
# Required. The full resource name that identifies the resource. For example,
# `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-
# instance`.
# For examples of full resource names for Google Cloud services, see
# https://cloud.google.com/iam/help/troubleshooter/full-resource-names.
# Corresponds to the JSON property `fullResourceName`
# @return [String]
attr_accessor :full_resource_name
# Required. The Cloud IAM permission under which defines the kind of access
# being explained. Example: "resourcemanager.projects.get" would explain
# if and why the principal has the resourcemanager.projects.get permission
# on the resource specified in full_resource_name declared in this structure.
# See https://cloud.google.com/iam/docs/testing-permissions
# Required. The IAM permission to check for the specified member and resource.
# For a complete list of IAM permissions, see
# https://cloud.google.com/iam/help/permissions/reference.
# For a complete list of predefined IAM roles and the permissions in each
# role, see https://cloud.google.com/iam/help/roles/reference.
# Corresponds to the JSON property `permission`
# @return [String]
attr_accessor :permission
# Required. The principal on behalf of who the access is explained for.
# The format is one of the principal's email addresses associated with
# its gaia account. It must be an account that can appear as an actor.
# For example groups are not supported. Currently, service accounts, users
# are supported.
# Required. The member, or principal, whose access you want to check, in the
# form of
# the email address that represents that member. For example,
# `alice@example.com` or
# `my-service-account@my-project.iam.gserviceaccount.com`.
# The member must be a Google Account or a service account. Other types of
# members are not supported.
# Corresponds to the JSON property `principal`
# @return [String]
attr_accessor :principal
@ -64,11 +67,18 @@ module Google
end
end
# Binding Explanation.
# Details about how a binding in a policy affects a member's ability to use a
# permission.
class GoogleCloudPolicytroubleshooterV1betaBindingExplanation
include Google::Apis::Core::Hashable
# REQUIRED: Access decision for this binding.
# Indicates whether _this binding_ provides the specified permission to the
# specified member for the specified resource.
# This field does _not_ indicate whether the member actually has the
# permission for the resource. There might be another binding that overrides
# this binding. To determine whether the member actually has the permission,
# use the `access` field in the
# TroubleshootIamPolicyResponse.
# Corresponds to the JSON property `access`
# @return [String]
attr_accessor :access
@ -81,35 +91,47 @@ module Google
# @return [Google::Apis::PolicytroubleshooterV1beta::GoogleTypeExpr]
attr_accessor :condition
# For each member in the binding, provides information
# whether or not the principal from the request is included
# in the member by which the CheckResult is keyed.
# May indicate that the caller has no access to this information.
# example key: 'group:cloud-iam-assist-eng@google.com'
# example value '`NOT_GRANTED, HIGH`
# Indicates whether each member in the binding includes the member specified
# in the request, either directly or indirectly. Each key identifies a member
# in the binding, and each value indicates whether the member in the binding
# includes the member in the request.
# For example, suppose that a binding includes the following members:
# * `user:alice@example.com`
# * `group:product-eng@example.com`
# You want to troubleshoot access for `user:bob@example.com`. This user is a
# member of the group `group:product-eng@example.com`.
# For the first member in the binding, the key is `user:alice@example.com`,
# and the `membership` field in the value is set to
# `MEMBERSHIP_NOT_INCLUDED`.
# For the second member in the binding, the key is
# `group:product-eng@example.com`, and the `membership` field in the value is
# set to `MEMBERSHIP_INCLUDED`.
# Corresponds to the JSON property `memberships`
# @return [Hash<String,Google::Apis::PolicytroubleshooterV1beta::GoogleCloudPolicytroubleshooterV1betaBindingExplanationAnnotatedMembership>]
attr_accessor :memberships
# Bubbles up role_permission level relavance to BindingExplanation object.
# If role permission is NORMAL, then binding relevance is NORMAL.
# If role permission is HIGH, then binding relevance is HIGH.
# The relevance of this binding to the overall determination for the entire
# policy.
# Corresponds to the JSON property `relevance`
# @return [String]
attr_accessor :relevance
# The role that this binding grants in the policy.
# for example "roles/compute.serviceAgent"
# The role that this binding grants. For example,
# `roles/compute.serviceAgent`.
# For a complete list of predefined IAM roles, as well as the permissions in
# each role, see https://cloud.google.com/iam/help/roles/reference.
# Corresponds to the JSON property `role`
# @return [String]
attr_accessor :role
# Whether the role of this binding contains the checked permission
# Indicates whether the role granted by this binding contains the specified
# permission.
# Corresponds to the JSON property `rolePermission`
# @return [String]
attr_accessor :role_permission
# The relevance of this permission with respect to the BindingExplanation.
# The relevance of the permission's existence, or nonexistence, in the role
# to the overall determination for the entire policy.
# Corresponds to the JSON property `rolePermissionRelevance`
# @return [String]
attr_accessor :role_permission_relevance
@ -130,17 +152,17 @@ module Google
end
end
# Encapsulated membership and the relevance of that membership with respect
# to BindingExplanation.
# Details about whether the binding includes the member.
class GoogleCloudPolicytroubleshooterV1betaBindingExplanationAnnotatedMembership
include Google::Apis::Core::Hashable
# Membership status.
# Indicates whether the binding includes the member.
# Corresponds to the JSON property `membership`
# @return [String]
attr_accessor :membership
# Relevance of this membership with respect to BindingExplanation.
# The relevance of the member's status to the overall determination for the
# binding.
# Corresponds to the JSON property `relevance`
# @return [String]
attr_accessor :relevance
@ -156,39 +178,53 @@ module Google
end
end
# An explained IAM policy combines the raw policy in the context
# of the resource which it is attached to along with detailed
# evaluation on the evaluation parameters provided through the request.
# Details about how a specific IAM Policy contributed
# to the access check.
class GoogleCloudPolicytroubleshooterV1betaExplainedPolicy
include Google::Apis::Core::Hashable
# Access decision for this section of the resource's effective policy.
# Indicates whether _this policy_ provides the specified permission to the
# specified member for the specified resource.
# This field does _not_ indicate whether the member actually has the
# permission for the resource. There might be another policy that overrides
# this policy. To determine whether the member actually has the permission,
# use the `access` field in the
# TroubleshootIamPolicyResponse.
# Corresponds to the JSON property `access`
# @return [String]
attr_accessor :access
# Detailed binding evaluation explanations provide information
# about how each binding contributes to the principal's
# access or the lack thereof.
# Details about how each binding in the policy affects the member's ability,
# or inability, to use the permission for the resource.
# If the sender of the request does not have access to the policy, this field
# is omitted.
# Corresponds to the JSON property `bindingExplanations`
# @return [Array<Google::Apis::PolicytroubleshooterV1beta::GoogleCloudPolicytroubleshooterV1betaBindingExplanation>]
attr_accessor :binding_explanations
# Resource that this section of the effective policy attaches to.
# The full resource name that identifies the resource. For example,
# `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-
# instance`.
# If the sender of the request does not have access to the policy, this field
# is omitted.
# For examples of full resource names for Google Cloud services, see
# https://cloud.google.com/iam/help/troubleshooter/full-resource-names.
# Corresponds to the JSON property `fullResourceName`
# @return [String]
attr_accessor :full_resource_name
# Defines an Identity and Access Management (IAM) policy. It is used to
# specify access control policies for Cloud Platform resources.
# An Identity and Access Management (IAM) policy, which specifies access
# controls for Google Cloud resources.
# A `Policy` is a collection of `bindings`. A `binding` binds one or more
# `members` to a single `role`. Members can be user accounts, service accounts,
# Google groups, and domains (such as G Suite). A `role` is a named list of
# permissions (defined by IAM or configured by users). A `binding` can
# optionally specify a `condition`, which is a logic expression that further
# constrains the role binding based on attributes about the request and/or
# target resource.
# **JSON Example**
# permissions; each `role` can be an IAM predefined role or a user-created
# custom role.
# Optionally, a `binding` can specify a `condition`, which is a logical
# expression that allows access to a resource only if the expression evaluates
# to `true`. A condition can add constraints based on attributes of the
# request, the resource, or both.
# **JSON example:**
# `
# "bindings": [
# `
@ -206,13 +242,15 @@ module Google
# "condition": `
# "title": "expirable access",
# "description": "Does not grant access after Sep 2020",
# "expression": "request.time <
# timestamp('2020-10-01T00:00:00.000Z')",
# "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')
# ",
# `
# `
# ]
# ],
# "etag": "BwWWja0YfJA=",
# "version": 3
# `
# **YAML Example**
# **YAML example:**
# bindings:
# - members:
# - user:mike@example.com
@ -227,13 +265,18 @@ module Google
# title: expirable access
# description: Does not grant access after Sep 2020
# expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
# - etag: BwWWja0YfJA=
# - version: 3
# For a description of IAM and its features, see the
# [IAM developer's guide](https://cloud.google.com/iam/docs).
# [IAM documentation](https://cloud.google.com/iam/docs/).
# Corresponds to the JSON property `policy`
# @return [Google::Apis::PolicytroubleshooterV1beta::GoogleIamV1Policy]
attr_accessor :policy
# Relevance of this Policy.
# The relevance of this policy to the overall determination in the
# TroubleshootIamPolicyResponse.
# If the sender of the request does not have access to the policy, this field
# is omitted.
# Corresponds to the JSON property `relevance`
# @return [String]
attr_accessor :relevance
@ -252,12 +295,11 @@ module Google
end
end
# TroubleshootIamPolicyRequest is used in TroubleshootIamPolicy
# Request for TroubleshootIamPolicy.
class GoogleCloudPolicytroubleshooterV1betaTroubleshootIamPolicyRequest
include Google::Apis::Core::Hashable
# AccessTuple defines information required for checking an access attempt.
# In other words, this is the tuple given to `CheckAccess`.
# Information about the member, resource, and permission to check.
# Corresponds to the JSON property `accessTuple`
# @return [Google::Apis::PolicytroubleshooterV1beta::GoogleCloudPolicytroubleshooterV1betaAccessTuple]
attr_accessor :access_tuple
@ -272,18 +314,24 @@ module Google
end
end
# TroubleshootIamPolicyResponse is used in TroubleshootIamPolicy.
# Response for TroubleshootIamPolicy.
class GoogleCloudPolicytroubleshooterV1betaTroubleshootIamPolicyResponse
include Google::Apis::Core::Hashable
# Reflects whether the probed access was granted, denied
# or ultimately could not be decided from the caller's point of view.
# Indicates whether the member has the specified permission for the specified
# resource, based on evaluating all of the applicable policies.
# Corresponds to the JSON property `access`
# @return [String]
attr_accessor :access
# List of explained policies.
# Each explanation corresponds to one policy along the ancestry path.
# List of IAM policies that were evaluated to check the member's permissions,
# with annotations to indicate how each policy contributed to the final
# result.
# The list of policies can include the policy for the resource itself. It can
# also include policies that are inherited from higher levels of the resource
# hierarchy, including the organization, the folder, and the project.
# To learn more about the resource hierarchy, see
# https://cloud.google.com/iam/help/resource-hierarchy.
# Corresponds to the JSON property `explainedPolicies`
# @return [Array<Google::Apis::PolicytroubleshooterV1beta::GoogleCloudPolicytroubleshooterV1betaExplainedPolicy>]
attr_accessor :explained_policies
@ -439,6 +487,23 @@ module Google
# account. For example, `my-other-app@appspot.gserviceaccount.com`.
# * `group:`emailid``: An email address that represents a Google group.
# For example, `admins@example.com`.
# * `deleted:user:`emailid`?uid=`uniqueid``: An email address (plus unique
# identifier) representing a user that has been recently deleted. For
# example, `alice@example.com?uid=123456789012345678901`. If the user is
# recovered, this value reverts to `user:`emailid`` and the recovered user
# retains the role in the binding.
# * `deleted:serviceAccount:`emailid`?uid=`uniqueid``: An email address (plus
# unique identifier) representing a service account that has been recently
# deleted. For example,
# `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
# If the service account is undeleted, this value reverts to
# `serviceAccount:`emailid`` and the undeleted service account retains the
# role in the binding.
# * `deleted:group:`emailid`?uid=`uniqueid``: An email address (plus unique
# identifier) representing a Google group that has been recently
# deleted. For example, `admins@example.com?uid=123456789012345678901`. If
# the group is recovered, this value reverts to `group:`emailid`` and the
# recovered group retains the role in the binding.
# * `domain:`domain``: The G Suite domain (primary) that represents all the
# users of that domain. For example, `google.com` or `example.com`.
# Corresponds to the JSON property `members`
@ -463,16 +528,18 @@ module Google
end
end
# Defines an Identity and Access Management (IAM) policy. It is used to
# specify access control policies for Cloud Platform resources.
# An Identity and Access Management (IAM) policy, which specifies access
# controls for Google Cloud resources.
# A `Policy` is a collection of `bindings`. A `binding` binds one or more
# `members` to a single `role`. Members can be user accounts, service accounts,
# Google groups, and domains (such as G Suite). A `role` is a named list of
# permissions (defined by IAM or configured by users). A `binding` can
# optionally specify a `condition`, which is a logic expression that further
# constrains the role binding based on attributes about the request and/or
# target resource.
# **JSON Example**
# permissions; each `role` can be an IAM predefined role or a user-created
# custom role.
# Optionally, a `binding` can specify a `condition`, which is a logical
# expression that allows access to a resource only if the expression evaluates
# to `true`. A condition can add constraints based on attributes of the
# request, the resource, or both.
# **JSON example:**
# `
# "bindings": [
# `
@ -490,13 +557,15 @@ module Google
# "condition": `
# "title": "expirable access",
# "description": "Does not grant access after Sep 2020",
# "expression": "request.time <
# timestamp('2020-10-01T00:00:00.000Z')",
# "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')
# ",
# `
# `
# ]
# ],
# "etag": "BwWWja0YfJA=",
# "version": 3
# `
# **YAML Example**
# **YAML example:**
# bindings:
# - members:
# - user:mike@example.com
@ -511,8 +580,10 @@ module Google
# title: expirable access
# description: Does not grant access after Sep 2020
# expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
# - etag: BwWWja0YfJA=
# - version: 3
# For a description of IAM and its features, see the
# [IAM developer's guide](https://cloud.google.com/iam/docs).
# [IAM documentation](https://cloud.google.com/iam/docs/).
class GoogleIamV1Policy
include Google::Apis::Core::Hashable
@ -521,9 +592,9 @@ module Google
# @return [Array<Google::Apis::PolicytroubleshooterV1beta::GoogleIamV1AuditConfig>]
attr_accessor :audit_configs
# Associates a list of `members` to a `role`. Optionally may specify a
# `condition` that determines when binding is in effect.
# `bindings` with no members will result in an error.
# Associates a list of `members` to a `role`. Optionally, may specify a
# `condition` that determines how and when the `bindings` are applied. Each
# of the `bindings` must contain at least one member.
# Corresponds to the JSON property `bindings`
# @return [Array<Google::Apis::PolicytroubleshooterV1beta::GoogleIamV1Binding>]
attr_accessor :bindings
@ -535,26 +606,31 @@ module Google
# conditions: An `etag` is returned in the response to `getIamPolicy`, and
# systems are expected to put that etag in the request to `setIamPolicy` to
# ensure that their change will be applied to the same version of the policy.
# If no `etag` is provided in the call to `setIamPolicy`, then the existing
# policy is overwritten. Due to blind-set semantics of an etag-less policy,
# 'setIamPolicy' will not fail even if the incoming policy version does not
# meet the requirements for modifying the stored policy.
# **Important:** If you use IAM Conditions, you must include the `etag` field
# whenever you call `setIamPolicy`. If you omit this field, then IAM allows
# you to overwrite a version `3` policy with a version `1` policy, and all of
# the conditions in the version `3` policy are lost.
# Corresponds to the JSON property `etag`
# NOTE: Values are automatically base64 encoded/decoded in the client library.
# @return [String]
attr_accessor :etag
# Specifies the format of the policy.
# Valid values are 0, 1, and 3. Requests specifying an invalid value will be
# rejected.
# Operations affecting conditional bindings must specify version 3. This can
# be either setting a conditional policy, modifying a conditional binding,
# or removing a binding (conditional or unconditional) from the stored
# conditional policy.
# Operations on non-conditional policies may specify any valid value or
# leave the field unset.
# If no etag is provided in the call to `setIamPolicy`, version compliance
# checks against the stored policy is skipped.
# Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
# are rejected.
# Any operation that affects conditional role bindings must specify version
# `3`. This requirement applies to the following operations:
# * Getting a policy that includes a conditional role binding
# * Adding a conditional role binding to a policy
# * Changing a conditional role binding in a policy
# * Removing any role binding, with or without a condition, from a policy
# that includes conditions
# **Important:** If you use IAM Conditions, you must include the `etag` field
# whenever you call `setIamPolicy`. If you omit this field, then IAM allows
# you to overwrite a version `3` policy with a version `1` policy, and all of
# the conditions in the version `3` policy are lost.
# If a policy does not include any conditions, operations on that policy may
# specify any valid version or leave the field unset.
# Corresponds to the JSON property `version`
# @return [Fixnum]
attr_accessor :version

View File

@ -47,9 +47,8 @@ module Google
@batch_path = 'batch'
end
# Perform a check on whether a member is granted a permission
# on a resource and how that grant/deny is determined accordinga
# to the resource's effective IAM policy interpretation.
# Checks whether a member has a specific permission for a specific resource,
# and explains why the member does or does not have that permission.
# @param [Google::Apis::PolicytroubleshooterV1beta::GoogleCloudPolicytroubleshooterV1betaTroubleshootIamPolicyRequest] google_cloud_policytroubleshooter_v1beta_troubleshoot_iam_policy_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.

View File

@ -27,7 +27,7 @@ module Google
# @see https://cloud.google.com/service-management/
module ServicemanagementV1
VERSION = 'V1'
REVISION = '20191115'
REVISION = '20191204'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'

View File

@ -623,6 +623,23 @@ module Google
# account. For example, `my-other-app@appspot.gserviceaccount.com`.
# * `group:`emailid``: An email address that represents a Google group.
# For example, `admins@example.com`.
# * `deleted:user:`emailid`?uid=`uniqueid``: An email address (plus unique
# identifier) representing a user that has been recently deleted. For
# example, `alice@example.com?uid=123456789012345678901`. If the user is
# recovered, this value reverts to `user:`emailid`` and the recovered user
# retains the role in the binding.
# * `deleted:serviceAccount:`emailid`?uid=`uniqueid``: An email address (plus
# unique identifier) representing a service account that has been recently
# deleted. For example,
# `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
# If the service account is undeleted, this value reverts to
# `serviceAccount:`emailid`` and the undeleted service account retains the
# role in the binding.
# * `deleted:group:`emailid`?uid=`uniqueid``: An email address (plus unique
# identifier) representing a Google group that has been recently
# deleted. For example, `admins@example.com?uid=123456789012345678901`. If
# the group is recovered, this value reverts to `group:`emailid`` and the
# recovered group retains the role in the binding.
# * `domain:`domain``: The G Suite domain (primary) that represents all the
# users of that domain. For example, `google.com` or `example.com`.
# Corresponds to the JSON property `members`
@ -2457,42 +2474,19 @@ module Google
# @return [String]
attr_accessor :type
# The unit in which the metric value is reported. It is only applicable
# if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The
# supported units are a subset of [The Unified Code for Units of
# Measure](http://unitsofmeasure.org/ucum.html) standard:
# **Basic units (UNIT)**
# * `bit` bit
# * `By` byte
# * `s` second
# * `min` minute
# * `h` hour
# * `d` day
# **Prefixes (PREFIX)**
# * `k` kilo (10**3)
# * `M` mega (10**6)
# * `G` giga (10**9)
# * `T` tera (10**12)
# * `P` peta (10**15)
# * `E` exa (10**18)
# * `Z` zetta (10**21)
# * `Y` yotta (10**24)
# * `m` milli (10**-3)
# * `u` micro (10**-6)
# * `n` nano (10**-9)
# * `p` pico (10**-12)
# * `f` femto (10**-15)
# * `a` atto (10**-18)
# * `z` zepto (10**-21)
# * `y` yocto (10**-24)
# * `Ki` kibi (2**10)
# * `Mi` mebi (2**20)
# * `Gi` gibi (2**30)
# * `Ti` tebi (2**40)
# * `Ki` kibi (2^10)
# * `Mi` mebi (2^20)
# * `Gi` gibi (2^30)
# * `Ti` tebi (2^40)
# * `Pi` pebi (2^50)
# **Grammar**
# The grammar also includes these connectors:
# * `/` division (as an infix operator, e.g. `1/s`).
# * `.` multiplication (as an infix operator, e.g. `GBy.d`)
# * `/` division or ratio (as an infix operator). For examples,
# `kBy/`email`` or `MiBy/10ms` (although you should almost never
# have `/s` in a metric `unit`; rates should always be computed at
# query time from the underlying cumulative or delta value).
# * `.` multiplication or composition (as an infix operator). For
# examples, `GBy.d` or `k`watt`.h`.
# The grammar for a unit is as follows:
# Expression = Component ` "." Component ` ` "/" Component ` ;
# Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ]
@ -2501,14 +2495,25 @@ module Google
# ;
# Annotation = "`" NAME "`" ;
# Notes:
# * `Annotation` is just a comment if it follows a `UNIT` and is
# equivalent to `1` if it is used alone. For examples,
# ``requests`/s == 1/s`, `By`transmitted`/s == By/s`.
# * `Annotation` is just a comment if it follows a `UNIT`. If the annotation
# is used alone, then the unit is equivalent to `1`. For examples,
# ``request`/s == 1/s`, `By`transmitted`/s == By/s`.
# * `NAME` is a sequence of non-blank printable ASCII characters not
# containing '`' or '`'.
# * `1` represents dimensionless value 1, such as in `1/s`.
# * `%` represents dimensionless value 1/100, and annotates values giving
# a percentage.
# containing ``` or ```.
# * `1` represents a unitary [dimensionless
# unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such
# as in `1/s`. It is typically used when none of the basic units are
# appropriate. For example, "new users per day" can be represented as
# `1/d` or ``new-users`/d` (and a metric value `5` would mean "5 new
# users). Alternatively, "thousands of page views per day" would be
# represented as `1000/d` or `k1/d` or `k`page_views`/d` (and a metric
# value of `5.3` would mean "5300 page views per day").
# * `%` represents dimensionless value of 1/100, and annotates values giving
# a percentage (so the metric values are typically in the range of 0..100,
# and a metric value `3` means "3 percent").
# * `10^2.%` indicates a metric contains a ratio, typically in the range
# 0..1, that will be multiplied by 100 and displayed as a percentage
# (so a metric value `0.03` means "3 percent").
# Corresponds to the JSON property `unit`
# @return [String]
attr_accessor :unit
@ -3076,16 +3081,18 @@ module Google
end
end
# Defines an Identity and Access Management (IAM) policy. It is used to
# specify access control policies for Cloud Platform resources.
# An Identity and Access Management (IAM) policy, which specifies access
# controls for Google Cloud resources.
# A `Policy` is a collection of `bindings`. A `binding` binds one or more
# `members` to a single `role`. Members can be user accounts, service accounts,
# Google groups, and domains (such as G Suite). A `role` is a named list of
# permissions (defined by IAM or configured by users). A `binding` can
# optionally specify a `condition`, which is a logic expression that further
# constrains the role binding based on attributes about the request and/or
# target resource.
# **JSON Example**
# permissions; each `role` can be an IAM predefined role or a user-created
# custom role.
# Optionally, a `binding` can specify a `condition`, which is a logical
# expression that allows access to a resource only if the expression evaluates
# to `true`. A condition can add constraints based on attributes of the
# request, the resource, or both.
# **JSON example:**
# `
# "bindings": [
# `
@ -3103,13 +3110,15 @@ module Google
# "condition": `
# "title": "expirable access",
# "description": "Does not grant access after Sep 2020",
# "expression": "request.time <
# timestamp('2020-10-01T00:00:00.000Z')",
# "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')
# ",
# `
# `
# ]
# ],
# "etag": "BwWWja0YfJA=",
# "version": 3
# `
# **YAML Example**
# **YAML example:**
# bindings:
# - members:
# - user:mike@example.com
@ -3124,8 +3133,10 @@ module Google
# title: expirable access
# description: Does not grant access after Sep 2020
# expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
# - etag: BwWWja0YfJA=
# - version: 3
# For a description of IAM and its features, see the
# [IAM developer's guide](https://cloud.google.com/iam/docs).
# [IAM documentation](https://cloud.google.com/iam/docs/).
class Policy
include Google::Apis::Core::Hashable
@ -3134,9 +3145,9 @@ module Google
# @return [Array<Google::Apis::ServicemanagementV1::AuditConfig>]
attr_accessor :audit_configs
# Associates a list of `members` to a `role`. Optionally may specify a
# `condition` that determines when binding is in effect.
# `bindings` with no members will result in an error.
# Associates a list of `members` to a `role`. Optionally, may specify a
# `condition` that determines how and when the `bindings` are applied. Each
# of the `bindings` must contain at least one member.
# Corresponds to the JSON property `bindings`
# @return [Array<Google::Apis::ServicemanagementV1::Binding>]
attr_accessor :bindings
@ -3148,26 +3159,31 @@ module Google
# conditions: An `etag` is returned in the response to `getIamPolicy`, and
# systems are expected to put that etag in the request to `setIamPolicy` to
# ensure that their change will be applied to the same version of the policy.
# If no `etag` is provided in the call to `setIamPolicy`, then the existing
# policy is overwritten. Due to blind-set semantics of an etag-less policy,
# 'setIamPolicy' will not fail even if the incoming policy version does not
# meet the requirements for modifying the stored policy.
# **Important:** If you use IAM Conditions, you must include the `etag` field
# whenever you call `setIamPolicy`. If you omit this field, then IAM allows
# you to overwrite a version `3` policy with a version `1` policy, and all of
# the conditions in the version `3` policy are lost.
# Corresponds to the JSON property `etag`
# NOTE: Values are automatically base64 encoded/decoded in the client library.
# @return [String]
attr_accessor :etag
# Specifies the format of the policy.
# Valid values are 0, 1, and 3. Requests specifying an invalid value will be
# rejected.
# Operations affecting conditional bindings must specify version 3. This can
# be either setting a conditional policy, modifying a conditional binding,
# or removing a binding (conditional or unconditional) from the stored
# conditional policy.
# Operations on non-conditional policies may specify any valid value or
# leave the field unset.
# If no etag is provided in the call to `setIamPolicy`, version compliance
# checks against the stored policy is skipped.
# Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
# are rejected.
# Any operation that affects conditional role bindings must specify version
# `3`. This requirement applies to the following operations:
# * Getting a policy that includes a conditional role binding
# * Adding a conditional role binding to a policy
# * Changing a conditional role binding in a policy
# * Removing any role binding, with or without a condition, from a policy
# that includes conditions
# **Important:** If you use IAM Conditions, you must include the `etag` field
# whenever you call `setIamPolicy`. If you omit this field, then IAM allows
# you to overwrite a version `3` policy with a version `1` policy, and all of
# the conditions in the version `3` policy are lost.
# If a policy does not include any conditions, operations on that policy may
# specify any valid version or leave the field unset.
# Corresponds to the JSON property `version`
# @return [Fixnum]
attr_accessor :version
@ -3904,16 +3920,18 @@ module Google
class SetIamPolicyRequest
include Google::Apis::Core::Hashable
# Defines an Identity and Access Management (IAM) policy. It is used to
# specify access control policies for Cloud Platform resources.
# An Identity and Access Management (IAM) policy, which specifies access
# controls for Google Cloud resources.
# A `Policy` is a collection of `bindings`. A `binding` binds one or more
# `members` to a single `role`. Members can be user accounts, service accounts,
# Google groups, and domains (such as G Suite). A `role` is a named list of
# permissions (defined by IAM or configured by users). A `binding` can
# optionally specify a `condition`, which is a logic expression that further
# constrains the role binding based on attributes about the request and/or
# target resource.
# **JSON Example**
# permissions; each `role` can be an IAM predefined role or a user-created
# custom role.
# Optionally, a `binding` can specify a `condition`, which is a logical
# expression that allows access to a resource only if the expression evaluates
# to `true`. A condition can add constraints based on attributes of the
# request, the resource, or both.
# **JSON example:**
# `
# "bindings": [
# `
@ -3931,13 +3949,15 @@ module Google
# "condition": `
# "title": "expirable access",
# "description": "Does not grant access after Sep 2020",
# "expression": "request.time <
# timestamp('2020-10-01T00:00:00.000Z')",
# "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')
# ",
# `
# `
# ]
# ],
# "etag": "BwWWja0YfJA=",
# "version": 3
# `
# **YAML Example**
# **YAML example:**
# bindings:
# - members:
# - user:mike@example.com
@ -3952,8 +3972,10 @@ module Google
# title: expirable access
# description: Does not grant access after Sep 2020
# expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
# - etag: BwWWja0YfJA=
# - version: 3
# For a description of IAM and its features, see the
# [IAM developer's guide](https://cloud.google.com/iam/docs).
# [IAM documentation](https://cloud.google.com/iam/docs/).
# Corresponds to the JSON property `policy`
# @return [Google::Apis::ServicemanagementV1::Policy]
attr_accessor :policy