Class: Google::Apis::OsloginV1beta::CloudOSLoginService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::OsloginV1beta::CloudOSLoginService
- Defined in:
- lib/google/apis/oslogin_v1beta/service.rb
Overview
Cloud OS Login API
You can use OS Login to manage access to your VM instances using IAM roles.
Constant Summary collapse
- DEFAULT_ENDPOINT_TEMPLATE =
"https://oslogin.$UNIVERSE_DOMAIN$/"
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#create_user_ssh_public_key(parent, ssh_public_key_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsloginV1beta::SshPublicKey
Create an SSH public key.
-
#delete_user_project(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsloginV1beta::Empty
Deletes a POSIX account.
-
#delete_user_ssh_public_key(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsloginV1beta::Empty
Deletes an SSH public key.
-
#get_user_login_profile(name, project_id: nil, system_id: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsloginV1beta::LoginProfile
Retrieves the profile information used for logging in to a virtual machine on Google Compute Engine.
-
#get_user_ssh_public_key(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsloginV1beta::SshPublicKey
Retrieves an SSH public key.
-
#import_user_ssh_public_key(parent, ssh_public_key_object = nil, project_id: nil, regions: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsloginV1beta::ImportSshPublicKeyResponse
Adds an SSH public key and returns the profile information.
-
#initialize ⇒ CloudOSLoginService
constructor
A new instance of CloudOSLoginService.
-
#patch_user_ssh_public_key(name, ssh_public_key_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsloginV1beta::SshPublicKey
Updates an SSH public key and returns the profile information.
-
#sign_location_ssh_public_key(parent, sign_ssh_public_key_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsloginV1beta::SignSshPublicKeyResponse
Signs an SSH public key for a user to authenticate to an instance.
-
#sign_zone_ssh_public_key(parent, sign_ssh_public_key_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsloginV1beta::SignSshPublicKeyResponse
Signs an SSH public key for a user to authenticate to an instance.
Constructor Details
#initialize ⇒ CloudOSLoginService
Returns a new instance of CloudOSLoginService.
47 48 49 50 51 52 |
# File 'lib/google/apis/oslogin_v1beta/service.rb', line 47 def initialize super(DEFAULT_ENDPOINT_TEMPLATE, '', client_name: 'google-apis-oslogin_v1beta', client_version: Google::Apis::OsloginV1beta::GEM_VERSION) @batch_path = 'batch' 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.
40 41 42 |
# File 'lib/google/apis/oslogin_v1beta/service.rb', line 40 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.
45 46 47 |
# File 'lib/google/apis/oslogin_v1beta/service.rb', line 45 def quota_user @quota_user end |
Instance Method Details
#create_user_ssh_public_key(parent, ssh_public_key_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsloginV1beta::SshPublicKey
Create an SSH public key
259 260 261 262 263 264 265 266 267 268 269 |
# File 'lib/google/apis/oslogin_v1beta/service.rb', line 259 def create_user_ssh_public_key(parent, ssh_public_key_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta/{+parent}/sshPublicKeys', ) command.request_representation = Google::Apis::OsloginV1beta::SshPublicKey::Representation command.request_object = ssh_public_key_object command.response_representation = Google::Apis::OsloginV1beta::SshPublicKey::Representation command.response_class = Google::Apis::OsloginV1beta::SshPublicKey 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 |
#delete_user_project(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsloginV1beta::Empty
Deletes a POSIX account.
162 163 164 165 166 167 168 169 170 |
# File 'lib/google/apis/oslogin_v1beta/service.rb', line 162 def delete_user_project(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1beta/{+name}', ) command.response_representation = Google::Apis::OsloginV1beta::Empty::Representation command.response_class = Google::Apis::OsloginV1beta::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 |
#delete_user_ssh_public_key(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsloginV1beta::Empty
Deletes an SSH public key.
293 294 295 296 297 298 299 300 301 |
# File 'lib/google/apis/oslogin_v1beta/service.rb', line 293 def delete_user_ssh_public_key(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1beta/{+name}', ) command.response_representation = Google::Apis::OsloginV1beta::Empty::Representation command.response_class = Google::Apis::OsloginV1beta::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 |
#get_user_login_profile(name, project_id: nil, system_id: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsloginV1beta::LoginProfile
Retrieves the profile information used for logging in to a virtual machine on Google Compute Engine.
81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/google/apis/oslogin_v1beta/service.rb', line 81 def get_user_login_profile(name, project_id: nil, system_id: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta/{+name}/loginProfile', ) command.response_representation = Google::Apis::OsloginV1beta::LoginProfile::Representation command.response_class = Google::Apis::OsloginV1beta::LoginProfile command.params['name'] = name unless name.nil? command.query['projectId'] = project_id unless project_id.nil? command.query['systemId'] = system_id unless system_id.nil? command.query['view'] = view unless view.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_user_ssh_public_key(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsloginV1beta::SshPublicKey
Retrieves an SSH public key.
325 326 327 328 329 330 331 332 333 |
# File 'lib/google/apis/oslogin_v1beta/service.rb', line 325 def get_user_ssh_public_key(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta/{+name}', ) command.response_representation = Google::Apis::OsloginV1beta::SshPublicKey::Representation command.response_class = Google::Apis::OsloginV1beta::SshPublicKey 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 |
#import_user_ssh_public_key(parent, ssh_public_key_object = nil, project_id: nil, regions: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsloginV1beta::ImportSshPublicKeyResponse
Adds an SSH public key and returns the profile information. Default POSIX account information is set when no username and UID exist as part of the login profile.
125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
# File 'lib/google/apis/oslogin_v1beta/service.rb', line 125 def import_user_ssh_public_key(parent, ssh_public_key_object = nil, project_id: nil, regions: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta/{+parent}:importSshPublicKey', ) command.request_representation = Google::Apis::OsloginV1beta::SshPublicKey::Representation command.request_object = ssh_public_key_object command.response_representation = Google::Apis::OsloginV1beta::ImportSshPublicKeyResponse::Representation command.response_class = Google::Apis::OsloginV1beta::ImportSshPublicKeyResponse command.params['parent'] = parent unless parent.nil? command.query['projectId'] = project_id unless project_id.nil? command.query['regions'] = regions unless regions.nil? command.query['view'] = view unless view.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#patch_user_ssh_public_key(name, ssh_public_key_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsloginV1beta::SshPublicKey
Updates an SSH public key and returns the profile information. This method supports patch semantics.
361 362 363 364 365 366 367 368 369 370 371 372 |
# File 'lib/google/apis/oslogin_v1beta/service.rb', line 361 def patch_user_ssh_public_key(name, ssh_public_key_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1beta/{+name}', ) command.request_representation = Google::Apis::OsloginV1beta::SshPublicKey::Representation command.request_object = ssh_public_key_object command.response_representation = Google::Apis::OsloginV1beta::SshPublicKey::Representation command.response_class = Google::Apis::OsloginV1beta::SshPublicKey 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 |
#sign_location_ssh_public_key(parent, sign_ssh_public_key_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsloginV1beta::SignSshPublicKeyResponse
Signs an SSH public key for a user to authenticate to an instance.
193 194 195 196 197 198 199 200 201 202 203 |
# File 'lib/google/apis/oslogin_v1beta/service.rb', line 193 def sign_location_ssh_public_key(parent, sign_ssh_public_key_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta/{+parent}:signSshPublicKey', ) command.request_representation = Google::Apis::OsloginV1beta::SignSshPublicKeyRequest::Representation command.request_object = sign_ssh_public_key_request_object command.response_representation = Google::Apis::OsloginV1beta::SignSshPublicKeyResponse::Representation command.response_class = Google::Apis::OsloginV1beta::SignSshPublicKeyResponse 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 |
#sign_zone_ssh_public_key(parent, sign_ssh_public_key_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsloginV1beta::SignSshPublicKeyResponse
Signs an SSH public key for a user to authenticate to an instance.
226 227 228 229 230 231 232 233 234 235 236 |
# File 'lib/google/apis/oslogin_v1beta/service.rb', line 226 def sign_zone_ssh_public_key(parent, sign_ssh_public_key_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta/{+parent}:signSshPublicKey', ) command.request_representation = Google::Apis::OsloginV1beta::SignSshPublicKeyRequest::Representation command.request_object = sign_ssh_public_key_request_object command.response_representation = Google::Apis::OsloginV1beta::SignSshPublicKeyResponse::Representation command.response_class = Google::Apis::OsloginV1beta::SignSshPublicKeyResponse 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 |