Class: Google::Apis::OsloginV1alpha::CloudOSLoginService

Inherits:
Core::BaseService show all
Defined in:
generated/google/apis/oslogin_v1alpha/service.rb

Overview

Cloud OS Login API

Manages OS login configuration for Google account users.

Examples:

require 'google/apis/oslogin_v1alpha'

Oslogin = Google::Apis::OsloginV1alpha # Alias the module
service = Oslogin::CloudOSLoginService.new

See Also:

Instance Attribute Summary collapse

Attributes inherited from Core::BaseService

#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path

Instance Method Summary collapse

Methods inherited from Core::BaseService

#batch, #batch_upload, #fetch_all, #http

Methods included from Core::Logging

#logger

Constructor Details

#initializeCloudOSLoginService

Returns a new instance of CloudOSLoginService



45
46
47
48
# File 'generated/google/apis/oslogin_v1alpha/service.rb', line 45

def initialize
  super('https://oslogin.googleapis.com/', '')
  @batch_path = 'batch'
end

Instance Attribute Details

#keyString

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.

Returns:

  • (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.



38
39
40
# File 'generated/google/apis/oslogin_v1alpha/service.rb', line 38

def key
  @key
end

#quota_userString

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.

Returns:

  • (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.



43
44
45
# File 'generated/google/apis/oslogin_v1alpha/service.rb', line 43

def quota_user
  @quota_user
end

Instance Method Details

#delete_user_project(name, operating_system_type: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsloginV1alpha::Empty

Deletes a POSIX account.

Parameters:

  • name (String)

    A reference to the POSIX account to update. POSIX accounts are identified by the project ID they are associated with. A reference to the POSIX account is in format users/user/projects/project``.

  • operating_system_type (String)

    The type of operating system associated with the account.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (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.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



152
153
154
155
156
157
158
159
160
161
# File 'generated/google/apis/oslogin_v1alpha/service.rb', line 152

def delete_user_project(name, operating_system_type: nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'v1alpha/{+name}', options)
  command.response_representation = Google::Apis::OsloginV1alpha::Empty::Representation
  command.response_class = Google::Apis::OsloginV1alpha::Empty
  command.params['name'] = name unless name.nil?
  command.query['operatingSystemType'] = operating_system_type unless operating_system_type.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::OsloginV1alpha::Empty

Deletes an SSH public key.

Parameters:

  • name (String)

    The fingerprint of the public key to update. Public keys are identified by their SHA-256 fingerprint. The fingerprint of the public key is in format users/user/sshPublicKeys/fingerprint``.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (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.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



185
186
187
188
189
190
191
192
193
# File 'generated/google/apis/oslogin_v1alpha/service.rb', line 185

def delete_user_ssh_public_key(name, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'v1alpha/{+name}', options)
  command.response_representation = Google::Apis::OsloginV1alpha::Empty::Representation
  command.response_class = Google::Apis::OsloginV1alpha::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, operating_system_type: nil, project_id: nil, system_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsloginV1alpha::LoginProfile

Retrieves the profile information used for logging in to a virtual machine on Google Compute Engine.

Parameters:

  • name (String)

    The unique ID for the user in format users/user``.

  • operating_system_type (String)

    The type of operating system associated with the account.

  • project_id (String)

    The project ID of the Google Cloud Platform project.

  • system_id (String)

    A system ID for filtering the results of the request.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (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.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



77
78
79
80
81
82
83
84
85
86
87
88
# File 'generated/google/apis/oslogin_v1alpha/service.rb', line 77

def (name, operating_system_type: nil, project_id: nil, system_id: nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v1alpha/{+name}/loginProfile', options)
  command.response_representation = Google::Apis::OsloginV1alpha::LoginProfile::Representation
  command.response_class = Google::Apis::OsloginV1alpha::LoginProfile
  command.params['name'] = name unless name.nil?
  command.query['operatingSystemType'] = operating_system_type unless operating_system_type.nil?
  command.query['projectId'] = project_id unless project_id.nil?
  command.query['systemId'] = system_id unless system_id.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::OsloginV1alpha::SshPublicKey

Retrieves an SSH public key.

Parameters:

  • name (String)

    The fingerprint of the public key to retrieve. Public keys are identified by their SHA-256 fingerprint. The fingerprint of the public key is in format users/user/sshPublicKeys/fingerprint``.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (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.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



217
218
219
220
221
222
223
224
225
# File 'generated/google/apis/oslogin_v1alpha/service.rb', line 217

def get_user_ssh_public_key(name, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v1alpha/{+name}', options)
  command.response_representation = Google::Apis::OsloginV1alpha::SshPublicKey::Representation
  command.response_class = Google::Apis::OsloginV1alpha::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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsloginV1alpha::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.

Parameters:

  • parent (String)

    The unique ID for the user in format users/user``.

  • ssh_public_key_object (Google::Apis::OsloginV1alpha::SshPublicKey) (defaults to: nil)
  • project_id (String)

    The project ID of the Google Cloud Platform project.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (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.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



115
116
117
118
119
120
121
122
123
124
125
126
# File 'generated/google/apis/oslogin_v1alpha/service.rb', line 115

def import_user_ssh_public_key(parent, ssh_public_key_object = nil, project_id: nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:post, 'v1alpha/{+parent}:importSshPublicKey', options)
  command.request_representation = Google::Apis::OsloginV1alpha::SshPublicKey::Representation
  command.request_object = ssh_public_key_object
  command.response_representation = Google::Apis::OsloginV1alpha::ImportSshPublicKeyResponse::Representation
  command.response_class = Google::Apis::OsloginV1alpha::ImportSshPublicKeyResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['projectId'] = project_id unless project_id.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::OsloginV1alpha::SshPublicKey

Updates an SSH public key and returns the profile information. This method supports patch semantics.

Parameters:

  • name (String)

    The fingerprint of the public key to update. Public keys are identified by their SHA-256 fingerprint. The fingerprint of the public key is in format users/user/sshPublicKeys/fingerprint``.

  • ssh_public_key_object (Google::Apis::OsloginV1alpha::SshPublicKey) (defaults to: nil)
  • update_mask (String)

    Mask to control which fields get updated. Updates all if not present.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (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.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



253
254
255
256
257
258
259
260
261
262
263
264
# File 'generated/google/apis/oslogin_v1alpha/service.rb', line 253

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, 'v1alpha/{+name}', options)
  command.request_representation = Google::Apis::OsloginV1alpha::SshPublicKey::Representation
  command.request_object = ssh_public_key_object
  command.response_representation = Google::Apis::OsloginV1alpha::SshPublicKey::Representation
  command.response_class = Google::Apis::OsloginV1alpha::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