Class: Google::Apis::ServiceuserV1::ServiceUserService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::ServiceuserV1::ServiceUserService
- Defined in:
- generated/google/apis/serviceuser_v1/service.rb
Overview
Google Service User API
Enables services that service consumers want to use on Google Cloud Platform, lists the available or enabled services, or disables services that service consumers no longer use.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Attributes inherited from Core::BaseService
#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path
Instance Method Summary collapse
-
#disable_service(name, disable_service_request_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ServiceuserV1::Operation
Disable a service so it can no longer be used with a project.
-
#enable_service(name, enable_service_request_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ServiceuserV1::Operation
Enable a service so it can be used with a project.
-
#initialize ⇒ ServiceUserService
constructor
A new instance of ServiceUserService.
-
#list_project_services(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ServiceuserV1::ListEnabledServicesResponse
List enabled services for the specified consumer.
-
#search_services(page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ServiceuserV1::SearchServicesResponse
Search available services.
Methods inherited from Core::BaseService
#batch, #batch_upload, #fetch_all, #http
Constructor Details
#initialize ⇒ ServiceUserService
Returns a new instance of ServiceUserService
47 48 49 |
# File 'generated/google/apis/serviceuser_v1/service.rb', line 47 def initialize super('https://serviceuser.googleapis.com/', '') end |
Instance Attribute Details
#key ⇒ String
Returns 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.
45 46 47 |
# File 'generated/google/apis/serviceuser_v1/service.rb', line 45 def key @key end |
#quota_user ⇒ String
Returns 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.
40 41 42 |
# File 'generated/google/apis/serviceuser_v1/service.rb', line 40 def quota_user @quota_user end |
Instance Method Details
#disable_service(name, disable_service_request_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ServiceuserV1::Operation
Disable a service so it can no longer be used with a
project. This prevents unintended usage that may cause unexpected billing
charges or security leaks.
Operation
116 117 118 119 120 121 122 123 124 125 126 |
# File 'generated/google/apis/serviceuser_v1/service.rb', line 116 def disable_service(name, disable_service_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:disable', ) command.request_representation = Google::Apis::ServiceuserV1::DisableServiceRequest::Representation command.request_object = disable_service_request_object command.response_representation = Google::Apis::ServiceuserV1::Operation::Representation command.response_class = Google::Apis::ServiceuserV1::Operation command.params['name'] = name unless name.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end |
#enable_service(name, enable_service_request_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ServiceuserV1::Operation
Enable a service so it can be used with a project.
See Cloud Auth Guide for
more information.
Operation
154 155 156 157 158 159 160 161 162 163 164 |
# File 'generated/google/apis/serviceuser_v1/service.rb', line 154 def enable_service(name, enable_service_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:enable', ) command.request_representation = Google::Apis::ServiceuserV1::EnableServiceRequest::Representation command.request_object = enable_service_request_object command.response_representation = Google::Apis::ServiceuserV1::Operation::Representation command.response_class = Google::Apis::ServiceuserV1::Operation command.params['name'] = name unless name.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end |
#list_project_services(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ServiceuserV1::ListEnabledServicesResponse
List enabled services for the specified consumer.
193 194 195 196 197 198 199 200 201 202 203 |
# File 'generated/google/apis/serviceuser_v1/service.rb', line 193 def list_project_services(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/services', ) command.response_representation = Google::Apis::ServiceuserV1::ListEnabledServicesResponse::Representation command.response_class = Google::Apis::ServiceuserV1::ListEnabledServicesResponse command.params['parent'] = parent unless parent.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end |
#search_services(page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ServiceuserV1::SearchServicesResponse
Search available services. When no filter is specified, returns all accessible services. For authenticated users, also returns all services the calling user has "servicemanagement.services.bind" permission for.
77 78 79 80 81 82 83 84 85 86 |
# File 'generated/google/apis/serviceuser_v1/service.rb', line 77 def search_services(page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/services:search', ) command.response_representation = Google::Apis::ServiceuserV1::SearchServicesResponse::Representation command.response_class = Google::Apis::ServiceuserV1::SearchServicesResponse command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end |