google-api-ruby-client/generated/google-apis-run_v2/lib/google/apis/run_v2/service.rb

610 lines
37 KiB
Ruby

# Copyright 2020 Google LLC
#
# 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 RunV2
# Cloud Run Admin API
#
# Deploy and manage user provided container images that scale automatically
# based on incoming requests. The Cloud Run Admin API v1 follows the Knative
# Serving API specification, while v2 is aligned with Google Cloud AIP-based API
# standards, as described in https://google.aip.dev/.
#
# @example
# require 'google/apis/run_v2'
#
# Run = Google::Apis::RunV2 # Alias the module
# service = Run::CloudRunService.new
#
# @see https://cloud.google.com/run/
class CloudRunService < 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://run.googleapis.com/', '',
client_name: 'google-apis-run_v2',
client_version: Google::Apis::RunV2::GEM_VERSION)
@batch_path = 'batch'
end
# Deletes a long-running operation. This method indicates that the client is no
# longer interested in the operation result. It does not cancel the operation.
# If the server doesn't support this method, it returns `google.rpc.Code.
# UNIMPLEMENTED`.
# @param [String] name
# The name of the operation resource to be deleted.
# @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::RunV2::GoogleProtobufEmpty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::RunV2::GoogleProtobufEmpty]
#
# @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_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'v2/{+name}', options)
command.response_representation = Google::Apis::RunV2::GoogleProtobufEmpty::Representation
command.response_class = Google::Apis::RunV2::GoogleProtobufEmpty
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
# Gets the latest state of a long-running operation. Clients can use this method
# to poll the operation result at intervals as recommended by the API service.
# @param [String] name
# The name of the operation resource.
# @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::RunV2::GoogleLongrunningOperation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::RunV2::GoogleLongrunningOperation]
#
# @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_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v2/{+name}', options)
command.response_representation = Google::Apis::RunV2::GoogleLongrunningOperation::Representation
command.response_class = Google::Apis::RunV2::GoogleLongrunningOperation
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 operations that match the specified filter in the request. If the server
# doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name`
# binding allows API services to override the binding to use different resource
# name schemes, such as `users/*/operations`. To override the binding, API
# services can add a binding such as `"/v1/`name=users/*`/operations"` to their
# service configuration. For backwards compatibility, the default name includes
# the operations collection id, however overriding users must ensure the name
# binding is the parent resource, without the operations collection id.
# @param [String] name
# Required. To query for all of the operations for a project.
# @param [String] filter
# Optional. A filter for matching the completed or in-progress operations. The
# supported formats of *filter* are: To query for only completed operations:
# done:true To query for only ongoing operations: done:false Must be empty to
# query for all of the latest operations for the given parent project.
# @param [Fixnum] page_size
# The maximum number of records that should be returned. Requested page size
# cannot exceed 100. If not set or set to less than or equal to 0, the default
# page size is 100. .
# @param [String] page_token
# Token identifying which result to start with, which is returned by a previous
# list 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::RunV2::GoogleLongrunningListOperationsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::RunV2::GoogleLongrunningListOperationsResponse]
#
# @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_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v2/{+name}/operations', options)
command.response_representation = Google::Apis::RunV2::GoogleLongrunningListOperationsResponse::Representation
command.response_class = Google::Apis::RunV2::GoogleLongrunningListOperationsResponse
command.params['name'] = name unless name.nil?
command.query['filter'] = filter unless filter.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
# Creates a new Service in a given project and location.
# @param [String] parent
# Required. The location and project in which this service should be created.
# Format: projects/`projectnumber`/locations/`location`
# @param [Google::Apis::RunV2::GoogleCloudRunV2Service] google_cloud_run_v2_service_object
# @param [String] service_id
# Required. The unique identifier for the Service. The name of the service
# becomes `parent`/services/`service_id`.
# @param [Boolean] validate_only
# Indicates that the request should be validated and default values populated,
# without persisting the request or creating any resources.
# @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::RunV2::GoogleLongrunningOperation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::RunV2::GoogleLongrunningOperation]
#
# @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_service(parent, google_cloud_run_v2_service_object = nil, service_id: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v2/{+parent}/services', options)
command.request_representation = Google::Apis::RunV2::GoogleCloudRunV2Service::Representation
command.request_object = google_cloud_run_v2_service_object
command.response_representation = Google::Apis::RunV2::GoogleLongrunningOperation::Representation
command.response_class = Google::Apis::RunV2::GoogleLongrunningOperation
command.params['parent'] = parent unless parent.nil?
command.query['serviceId'] = service_id unless service_id.nil?
command.query['validateOnly'] = validate_only unless validate_only.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 Service. This will cause the Service to stop serving traffic and
# will delete all revisions.
# @param [String] name
# Required. The full name of the Service. Format: projects/`projectnumber`/
# locations/`location`/services/`service`
# @param [String] etag
# A system-generated fingerprint for this version of the resource. May be used
# to detect modification conflict during updates.
# @param [Boolean] validate_only
# Indicates that the request should be validated without actually deleting any
# resources.
# @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::RunV2::GoogleLongrunningOperation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::RunV2::GoogleLongrunningOperation]
#
# @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_location_service(name, etag: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'v2/{+name}', options)
command.response_representation = Google::Apis::RunV2::GoogleLongrunningOperation::Representation
command.response_class = Google::Apis::RunV2::GoogleLongrunningOperation
command.params['name'] = name unless name.nil?
command.query['etag'] = etag unless etag.nil?
command.query['validateOnly'] = validate_only unless validate_only.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Gets information about a Service.
# @param [String] name
# Required. The full name of the Service. Format: projects/`projectnumber`/
# locations/`location`/services/`service`
# @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::RunV2::GoogleCloudRunV2Service] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::RunV2::GoogleCloudRunV2Service]
#
# @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_location_service(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v2/{+name}', options)
command.response_representation = Google::Apis::RunV2::GoogleCloudRunV2Service::Representation
command.response_class = Google::Apis::RunV2::GoogleCloudRunV2Service
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
# Get the IAM Access Control policy currently in effect for the given Cloud Run
# Service. This result does not include any inherited policies.
# @param [String] resource
# REQUIRED: The resource for which the policy is being requested. See the
# operation documentation for the appropriate value for this field.
# @param [Fixnum] options_requested_policy_version
# Optional. The maximum policy version that will be used to format the policy.
# Valid values are 0, 1, and 3. Requests specifying an invalid value will be
# rejected. Requests for policies with any conditional role bindings must
# specify version 3. Policies with no conditional role bindings may specify any
# valid value or leave the field unset. The policy in the response might use the
# policy version that you specified, or it might use a lower policy version. For
# example, if you specify version 3, but the policy has no conditional role
# bindings, the response uses version 1. To learn which resources support
# conditions in their IAM policies, see the [IAM documentation](https://cloud.
# google.com/iam/help/conditions/resource-policies).
# @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::RunV2::GoogleIamV1Policy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::RunV2::GoogleIamV1Policy]
#
# @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_location_service_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v2/{+resource}:getIamPolicy', options)
command.response_representation = Google::Apis::RunV2::GoogleIamV1Policy::Representation
command.response_class = Google::Apis::RunV2::GoogleIamV1Policy
command.params['resource'] = resource unless resource.nil?
command.query['options.requestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.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 Services.
# @param [String] parent
# Required. The location and project to list resources on. Location must be a
# valid GCP region, and may not be the "-" wildcard. Format: projects/`
# projectnumber`/locations/`location`
# @param [Fixnum] page_size
# Maximum number of Services to return in this call.
# @param [String] page_token
# A page token received from a previous call to ListServices. All other
# parameters must match.
# @param [Boolean] show_deleted
# If true, returns deleted (but unexpired) resources along with active ones.
# @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::RunV2::GoogleCloudRunV2ListServicesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::RunV2::GoogleCloudRunV2ListServicesResponse]
#
# @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_location_services(parent, page_size: nil, page_token: nil, show_deleted: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v2/{+parent}/services', options)
command.response_representation = Google::Apis::RunV2::GoogleCloudRunV2ListServicesResponse::Representation
command.response_class = Google::Apis::RunV2::GoogleCloudRunV2ListServicesResponse
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['showDeleted'] = show_deleted unless show_deleted.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Updates a Service.
# @param [String] name
# The fully qualified name of this Service. In CreateServiceRequest, this field
# is ignored, and instead composed from CreateServiceRequest.parent and
# CreateServiceRequest.service_id. Format: projects/`project`/locations/`
# location`/services/`service_id`
# @param [Google::Apis::RunV2::GoogleCloudRunV2Service] google_cloud_run_v2_service_object
# @param [Boolean] allow_missing
# If set to true, and if the Service does not exist, it will create a new one.
# Caller must have both create and update permissions for this call if this is
# set to true.
# @param [String] update_mask
# The list of fields to be updated.
# @param [Boolean] validate_only
# Indicates that the request should be validated and default values populated,
# without persisting the request or updating any resources.
# @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::RunV2::GoogleLongrunningOperation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::RunV2::GoogleLongrunningOperation]
#
# @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_location_service(name, google_cloud_run_v2_service_object = nil, allow_missing: nil, update_mask: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:patch, 'v2/{+name}', options)
command.request_representation = Google::Apis::RunV2::GoogleCloudRunV2Service::Representation
command.request_object = google_cloud_run_v2_service_object
command.response_representation = Google::Apis::RunV2::GoogleLongrunningOperation::Representation
command.response_class = Google::Apis::RunV2::GoogleLongrunningOperation
command.params['name'] = name unless name.nil?
command.query['allowMissing'] = allow_missing unless allow_missing.nil?
command.query['updateMask'] = update_mask unless update_mask.nil?
command.query['validateOnly'] = validate_only unless validate_only.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Sets the IAM Access control policy for the specified Service. Overwrites any
# existing policy.
# @param [String] resource
# REQUIRED: The resource for which the policy is being specified. See the
# operation documentation for the appropriate value for this field.
# @param [Google::Apis::RunV2::GoogleIamV1SetIamPolicyRequest] google_iam_v1_set_iam_policy_request_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::RunV2::GoogleIamV1Policy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::RunV2::GoogleIamV1Policy]
#
# @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 set_project_location_service_iam_policy(resource, google_iam_v1_set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v2/{+resource}:setIamPolicy', options)
command.request_representation = Google::Apis::RunV2::GoogleIamV1SetIamPolicyRequest::Representation
command.request_object = google_iam_v1_set_iam_policy_request_object
command.response_representation = Google::Apis::RunV2::GoogleIamV1Policy::Representation
command.response_class = Google::Apis::RunV2::GoogleIamV1Policy
command.params['resource'] = resource unless resource.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 permissions that a caller has on the specified Project. There are no
# permissions required for making this API call.
# @param [String] resource
# REQUIRED: The resource for which the policy detail is being requested. See the
# operation documentation for the appropriate value for this field.
# @param [Google::Apis::RunV2::GoogleIamV1TestIamPermissionsRequest] google_iam_v1_test_iam_permissions_request_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::RunV2::GoogleIamV1TestIamPermissionsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::RunV2::GoogleIamV1TestIamPermissionsResponse]
#
# @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 test_project_location_service_iam_permissions(resource, google_iam_v1_test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v2/{+resource}:testIamPermissions', options)
command.request_representation = Google::Apis::RunV2::GoogleIamV1TestIamPermissionsRequest::Representation
command.request_object = google_iam_v1_test_iam_permissions_request_object
command.response_representation = Google::Apis::RunV2::GoogleIamV1TestIamPermissionsResponse::Representation
command.response_class = Google::Apis::RunV2::GoogleIamV1TestIamPermissionsResponse
command.params['resource'] = resource unless resource.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Delete a Revision.
# @param [String] name
# Required. The name of the Revision to delete. Format: projects/`project`/
# locations/`location`/services/`service`/revisions/`revision`
# @param [String] etag
# A system-generated fingerprint for this version of the resource. This may be
# used to detect modification conflict during updates.
# @param [Boolean] validate_only
# Indicates that the request should be validated without actually deleting any
# resources.
# @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::RunV2::GoogleLongrunningOperation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::RunV2::GoogleLongrunningOperation]
#
# @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_location_service_revision(name, etag: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'v2/{+name}', options)
command.response_representation = Google::Apis::RunV2::GoogleLongrunningOperation::Representation
command.response_class = Google::Apis::RunV2::GoogleLongrunningOperation
command.params['name'] = name unless name.nil?
command.query['etag'] = etag unless etag.nil?
command.query['validateOnly'] = validate_only unless validate_only.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Gets information about a Revision.
# @param [String] name
# Required. The full name of the Revision. Format: projects/`project`/locations/`
# location`/services/`service`/revisions/`revision`
# @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::RunV2::GoogleCloudRunV2Revision] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::RunV2::GoogleCloudRunV2Revision]
#
# @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_location_service_revision(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v2/{+name}', options)
command.response_representation = Google::Apis::RunV2::GoogleCloudRunV2Revision::Representation
command.response_class = Google::Apis::RunV2::GoogleCloudRunV2Revision
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 Revisions from a given Service, or from a given location.
# @param [String] parent
# Required. The Service from which the Revisions should be listed. To list all
# Revisions across Services, use "-" instead of Service name. Format: projects/`
# project`/locations/`location`/services/`service`
# @param [Fixnum] page_size
# Maximum number of revisions to return in this call.
# @param [String] page_token
# A page token received from a previous call to ListRevisions. All other
# parameters must match.
# @param [Boolean] show_deleted
# If true, returns deleted (but unexpired) resources along with active ones.
# @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::RunV2::GoogleCloudRunV2ListRevisionsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::RunV2::GoogleCloudRunV2ListRevisionsResponse]
#
# @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_location_service_revisions(parent, page_size: nil, page_token: nil, show_deleted: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v2/{+parent}/revisions', options)
command.response_representation = Google::Apis::RunV2::GoogleCloudRunV2ListRevisionsResponse::Representation
command.response_class = Google::Apis::RunV2::GoogleCloudRunV2ListRevisionsResponse
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['showDeleted'] = show_deleted unless show_deleted.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