Movatterモバイル変換


[0]ホーム

URL:


oslogin

package
v0.257.0Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2025 License:BSD-3-ClauseImports:18Imported by:0

Details

Repository

github.com/googleapis/google-api-go-client

Links

Documentation

Overview

Package oslogin provides access to the Cloud OS Login API.

This package is DEPRECATED. Use package cloud.google.com/go/oslogin/apiv1 instead.

For product documentation, see:https://cloud.google.com/compute/docs/oslogin/

Library status

These client libraries are officially supported by Google. However, thislibrary is considered complete and is in maintenance mode. This meansthat we will address critical bugs and security issues but will not addany new features.

When possible, we recommend using our newer[Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)that are still actively being worked and iterated on.

Creating a client

Usage example:

import "google.golang.org/api/oslogin/v1beta"...ctx := context.Background()osloginService, err := oslogin.NewService(ctx)

In this example, Google Application Default Credentials are used forauthentication. For information on how to create and obtain ApplicationDefault Credentials, seehttps://developers.google.com/identity/protocols/application-default-credentials.

Other authentication options

By default, all available scopes (see "Constants") are used to authenticate.To restrict scopes, usegoogle.golang.org/api/option.WithScopes:

osloginService, err := oslogin.NewService(ctx, option.WithScopes(oslogin.ComputeReadonlyScope))

To use an API key for authentication (note: some APIs do not support APIkeys), usegoogle.golang.org/api/option.WithAPIKey:

osloginService, err := oslogin.NewService(ctx, option.WithAPIKey("AIza..."))

To use an OAuth token (e.g., a user token obtained via a three-legged OAuthflow, usegoogle.golang.org/api/option.WithTokenSource:

config := &oauth2.Config{...}// ...token, err := config.Exchange(ctx, ...)osloginService, err := oslogin.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))

Seegoogle.golang.org/api/option.ClientOption for details on options.

Index

Constants

View Source
const (// See, edit, configure, and delete your Google Cloud data and see the email// address for your Google Account.CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"// View your data across Google Cloud services and see the email address of// your Google AccountCloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only"// View and manage your Google Compute Engine resourcesComputeScope = "https://www.googleapis.com/auth/compute"// View your Google Compute Engine resourcesComputeReadonlyScope = "https://www.googleapis.com/auth/compute.readonly")

OAuth2 scopes used by this API.

Variables

This section is empty.

Functions

This section is empty.

Types

typeEmpty

type Empty struct {// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`}

Empty: A generic empty message that you can re-use to avoid definingduplicated empty messages in your APIs. A typical example is to use it asthe request or the response type of an API method. For instance: service Foo{ rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }

typeGoogleCloudOsloginControlplaneRegionalV1betaSignSshPublicKeyRequestadded inv0.225.0

type GoogleCloudOsloginControlplaneRegionalV1betaSignSshPublicKeyRequest struct {// AppEngineInstance: The App Engine instance to sign the SSH public key for.// Expected format:// apps/{app}/services/{service}/versions/{version}/instances/{instance}AppEngineInstancestring `json:"appEngineInstance,omitempty"`// ComputeInstance: The Compute instance to sign the SSH public key for.// Expected format:// projects/{project}/zones/{zone}/instances/{numeric_instance_id}ComputeInstancestring `json:"computeInstance,omitempty"`// ServiceAccount: Optional. The service account for the instance. If the// instance in question does not have a service account, this field should be// left empty. If the wrong service account is provided, this operation will// return a signed certificate that will not be accepted by the VM.ServiceAccountstring `json:"serviceAccount,omitempty"`// SshPublicKey: Required. The SSH public key to sign.SshPublicKeystring `json:"sshPublicKey,omitempty"`// ForceSendFields is a list of field names (e.g. "AppEngineInstance") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "AppEngineInstance") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

GoogleCloudOsloginControlplaneRegionalV1betaSignSshPublicKeyRequest: Arequest message for signing an SSH public key.

func (GoogleCloudOsloginControlplaneRegionalV1betaSignSshPublicKeyRequest)MarshalJSONadded inv0.225.0

typeGoogleCloudOsloginControlplaneRegionalV1betaSignSshPublicKeyResponseadded inv0.225.0

type GoogleCloudOsloginControlplaneRegionalV1betaSignSshPublicKeyResponse struct {// SignedSshPublicKey: The signed SSH public key to use in the SSH handshake.SignedSshPublicKeystring `json:"signedSshPublicKey,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "SignedSshPublicKey") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "SignedSshPublicKey") to include// in API requests with the JSON null value. By default, fields with empty// values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

GoogleCloudOsloginControlplaneRegionalV1betaSignSshPublicKeyResponse: Theresponse message for signing an SSH public key.

func (GoogleCloudOsloginControlplaneRegionalV1betaSignSshPublicKeyResponse)MarshalJSONadded inv0.225.0

typeImportSshPublicKeyResponse

type ImportSshPublicKeyResponse struct {// Details: Detailed information about import results.Detailsstring `json:"details,omitempty"`// LoginProfile: The login profile information for the user.LoginProfile *LoginProfile `json:"loginProfile,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Details") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Details") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

ImportSshPublicKeyResponse: A response message for importing an SSH publickey.

func (ImportSshPublicKeyResponse)MarshalJSON

func (sImportSshPublicKeyResponse) MarshalJSON() ([]byte,error)

typeLoginProfile

type LoginProfile struct {// Name: Required. A unique user ID.Namestring `json:"name,omitempty"`// PosixAccounts: The list of POSIX accounts associated with the user.PosixAccounts []*PosixAccount `json:"posixAccounts,omitempty"`// SecurityKeys: The registered security key credentials for a user.SecurityKeys []*SecurityKey `json:"securityKeys,omitempty"`// SshPublicKeys: A map from SSH public key fingerprint to the associated key// object.SshPublicKeys map[string]SshPublicKey `json:"sshPublicKeys,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Name") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Name") to include in API requests// with the JSON null value. By default, fields with empty values are omitted// from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

LoginProfile: The user profile information used for logging in to a virtualmachine on Google Compute Engine.

func (LoginProfile)MarshalJSON

func (sLoginProfile) MarshalJSON() ([]byte,error)

typePosixAccount

type PosixAccount struct {// AccountId: Output only. A POSIX account identifier.AccountIdstring `json:"accountId,omitempty"`// Gecos: The GECOS (user information) entry for this account.Gecosstring `json:"gecos,omitempty"`// Gid: The default group ID.Gidint64 `json:"gid,omitempty,string"`// HomeDirectory: The path to the home directory for this account.HomeDirectorystring `json:"homeDirectory,omitempty"`// Name: Output only. The canonical resource name.Namestring `json:"name,omitempty"`// OperatingSystemType: The operating system type where this account applies.//// Possible values://   "OPERATING_SYSTEM_TYPE_UNSPECIFIED" - The operating system type associated// with the user account information is unspecified.//   "LINUX" - Linux user account information.//   "WINDOWS" - Windows user account information.OperatingSystemTypestring `json:"operatingSystemType,omitempty"`// Primary: Only one POSIX account can be marked as primary.Primarybool `json:"primary,omitempty"`// Shell: The path to the logic shell for this account.Shellstring `json:"shell,omitempty"`// SystemId: System identifier for which account the username or uid applies// to. By default, the empty value is used.SystemIdstring `json:"systemId,omitempty"`// Uid: The user ID.Uidint64 `json:"uid,omitempty,string"`// Username: The username of the POSIX account.Usernamestring `json:"username,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "AccountId") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "AccountId") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

PosixAccount: The POSIX account information associated with a Googleaccount.

func (PosixAccount)MarshalJSON

func (sPosixAccount) MarshalJSON() ([]byte,error)

typeProjectsLocationsServiceadded inv0.225.0

type ProjectsLocationsService struct {// contains filtered or unexported fields}

funcNewProjectsLocationsServiceadded inv0.225.0

func NewProjectsLocationsService(s *Service) *ProjectsLocationsService

func (*ProjectsLocationsService)SignSshPublicKeyadded inv0.225.0

func (r *ProjectsLocationsService) SignSshPublicKey(parentstring, googlecloudoslogincontrolplaneregionalv1betasignsshpublickeyrequest *GoogleCloudOsloginControlplaneRegionalV1betaSignSshPublicKeyRequest) *ProjectsLocationsSignSshPublicKeyCall

SignSshPublicKey: Signs an SSH public key for a user to authenticate to avirtual machine on Google Compute Engine.

  • parent: The parent for the signing request. Format:projects/{project}/locations/{location}.

typeProjectsLocationsSignSshPublicKeyCalladded inv0.225.0

type ProjectsLocationsSignSshPublicKeyCall struct {// contains filtered or unexported fields}

func (*ProjectsLocationsSignSshPublicKeyCall)Contextadded inv0.225.0

Context sets the context to be used in this call's Do method.

func (*ProjectsLocationsSignSshPublicKeyCall)Doadded inv0.225.0

Do executes the "oslogin.projects.locations.signSshPublicKey" call.Any non-2xx status code is an error. Response headers are in either*GoogleCloudOsloginControlplaneRegionalV1betaSignSshPublicKeyResponse.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.

func (*ProjectsLocationsSignSshPublicKeyCall)Fieldsadded inv0.225.0

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*ProjectsLocationsSignSshPublicKeyCall)Headeradded inv0.225.0

Header returns a http.Header that can be modified by the caller to addheaders to the request.

typeProjectsServiceadded inv0.225.0

type ProjectsService struct {Locations *ProjectsLocationsService// contains filtered or unexported fields}

funcNewProjectsServiceadded inv0.225.0

func NewProjectsService(s *Service) *ProjectsService

typeProvisionPosixAccountRequestadded inv0.222.0

type ProvisionPosixAccountRequest struct {// Regions: Optional. The regions to wait for a POSIX account to be written to// before returning a response. If unspecified, defaults to all regions.// Regions are listed athttps://cloud.google.com/about/locations#region.Regions []string `json:"regions,omitempty"`// ForceSendFields is a list of field names (e.g. "Regions") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Regions") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

ProvisionPosixAccountRequest: A request message for creating a POSIX accountentry.

func (ProvisionPosixAccountRequest)MarshalJSONadded inv0.222.0

func (sProvisionPosixAccountRequest) MarshalJSON() ([]byte,error)

typeSecurityKeyadded inv0.53.0

type SecurityKey struct {// DeviceNickname: The security key nickname explicitly set by the user.DeviceNicknamestring `json:"deviceNickname,omitempty"`// PrivateKey: Hardware-backed private key text in SSH format.PrivateKeystring `json:"privateKey,omitempty"`// PublicKey: Public key text in SSH format, defined by RFC4253// ("https://www.ietf.org/rfc/rfc4253.txt") section 6.6.PublicKeystring `json:"publicKey,omitempty"`// UniversalTwoFactor: The U2F protocol type.UniversalTwoFactor *UniversalTwoFactor `json:"universalTwoFactor,omitempty"`// WebAuthn: The Web Authentication protocol type.WebAuthn *WebAuthn `json:"webAuthn,omitempty"`// ForceSendFields is a list of field names (e.g. "DeviceNickname") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "DeviceNickname") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

SecurityKey: The credential information for a Google registered securitykey.

func (SecurityKey)MarshalJSONadded inv0.53.0

func (sSecurityKey) MarshalJSON() ([]byte,error)

typeService

type Service struct {BasePathstring// API endpoint base URLUserAgentstring// optional additional User-Agent fragmentProjects *ProjectsServiceUsers *UsersService// contains filtered or unexported fields}

funcNewdeprecated

func New(client *http.Client) (*Service,error)

New creates a new Service. It uses the provided http.Client for requests.

Deprecated: please use NewService instead.To provide a custom HTTP client, use option.WithHTTPClient.If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.

funcNewServiceadded inv0.3.0

func NewService(ctxcontext.Context, opts ...option.ClientOption) (*Service,error)

NewService creates a new Service.

typeSignSshPublicKeyRequestadded inv0.135.0

type SignSshPublicKeyRequest struct {// SshPublicKey: Required. The SSH public key to sign.SshPublicKeystring `json:"sshPublicKey,omitempty"`// ForceSendFields is a list of field names (e.g. "SshPublicKey") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "SshPublicKey") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

func (SignSshPublicKeyRequest)MarshalJSONadded inv0.135.0

func (sSignSshPublicKeyRequest) MarshalJSON() ([]byte,error)

typeSignSshPublicKeyResponseadded inv0.135.0

type SignSshPublicKeyResponse struct {// SignedSshPublicKey: The signed SSH public key to use in the SSH handshake.SignedSshPublicKeystring `json:"signedSshPublicKey,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "SignedSshPublicKey") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "SignedSshPublicKey") to include// in API requests with the JSON null value. By default, fields with empty// values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

func (SignSshPublicKeyResponse)MarshalJSONadded inv0.135.0

func (sSignSshPublicKeyResponse) MarshalJSON() ([]byte,error)

typeSshPublicKey

type SshPublicKey struct {// ExpirationTimeUsec: An expiration time in microseconds since epoch.ExpirationTimeUsecint64 `json:"expirationTimeUsec,omitempty,string"`// Fingerprint: Output only. The SHA-256 fingerprint of the SSH public key.Fingerprintstring `json:"fingerprint,omitempty"`// Key: Required. Public key text in SSH format, defined by RFC4253// (https://www.ietf.org/rfc/rfc4253.txt) section 6.6.Keystring `json:"key,omitempty"`// Name: Output only. The canonical resource name.Namestring `json:"name,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "ExpirationTimeUsec") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "ExpirationTimeUsec") to include// in API requests with the JSON null value. By default, fields with empty// values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

SshPublicKey: The SSH public key information associated with a Googleaccount.

func (SshPublicKey)MarshalJSON

func (sSshPublicKey) MarshalJSON() ([]byte,error)

typeUniversalTwoFactoradded inv0.53.0

type UniversalTwoFactor struct {// AppId: Application ID for the U2F protocol.AppIdstring `json:"appId,omitempty"`// ForceSendFields is a list of field names (e.g. "AppId") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "AppId") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

UniversalTwoFactor: Security key information specific to the U2F protocol.

func (UniversalTwoFactor)MarshalJSONadded inv0.53.0

func (sUniversalTwoFactor) MarshalJSON() ([]byte,error)

typeUsersGetLoginProfileCall

type UsersGetLoginProfileCall struct {// contains filtered or unexported fields}

func (*UsersGetLoginProfileCall)Context

Context sets the context to be used in this call's Do method.

func (*UsersGetLoginProfileCall)Do

Do executes the "oslogin.users.getLoginProfile" call.Any non-2xx status code is an error. Response headers are in either*LoginProfile.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.

func (*UsersGetLoginProfileCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*UsersGetLoginProfileCall)Header

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*UsersGetLoginProfileCall)IfNoneMatch

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

func (*UsersGetLoginProfileCall)ProjectId

ProjectId sets the optional parameter "projectId": Required. The project IDof the Google Cloud Platform project.

func (*UsersGetLoginProfileCall)SystemId

SystemId sets the optional parameter "systemId": A system ID for filteringthe results of the request.

func (*UsersGetLoginProfileCall)Viewadded inv0.47.0

View sets the optional parameter "view": The view configures whether toretrieve security keys information.

Possible values:

"LOGIN_PROFILE_VIEW_UNSPECIFIED" - The default login profile view. The API

defaults to the BASIC view.

"BASIC" - Includes POSIX and SSH key information."SECURITY_KEY" - Include security key information for the user.

typeUsersImportSshPublicKeyCall

type UsersImportSshPublicKeyCall struct {// contains filtered or unexported fields}

func (*UsersImportSshPublicKeyCall)Context

Context sets the context to be used in this call's Do method.

func (*UsersImportSshPublicKeyCall)Do

Do executes the "oslogin.users.importSshPublicKey" call.Any non-2xx status code is an error. Response headers are in either*ImportSshPublicKeyResponse.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.

func (*UsersImportSshPublicKeyCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*UsersImportSshPublicKeyCall)Header

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*UsersImportSshPublicKeyCall)ProjectId

ProjectId sets the optional parameter "projectId": The project ID of theGoogle Cloud Platform project.

func (*UsersImportSshPublicKeyCall)Regionsadded inv0.155.0

Regions sets the optional parameter "regions": The regions to which toassert that the key was written. If unspecified, defaults to all regions.Regions are listed athttps://cloud.google.com/about/locations#region.

func (*UsersImportSshPublicKeyCall)Viewadded inv0.47.0

View sets the optional parameter "view": The view configures whether toretrieve security keys information.

Possible values:

"LOGIN_PROFILE_VIEW_UNSPECIFIED" - The default login profile view. The API

defaults to the BASIC view.

"BASIC" - Includes POSIX and SSH key information."SECURITY_KEY" - Include security key information for the user.

typeUsersProjectsDeleteCall

type UsersProjectsDeleteCall struct {// contains filtered or unexported fields}

func (*UsersProjectsDeleteCall)Context

Context sets the context to be used in this call's Do method.

func (*UsersProjectsDeleteCall)Do

Do executes the "oslogin.users.projects.delete" call.Any non-2xx status code is an error. Response headers are in either*Empty.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.

func (*UsersProjectsDeleteCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*UsersProjectsDeleteCall)Header

Header returns a http.Header that can be modified by the caller to addheaders to the request.

typeUsersProjectsLocationsServiceadded inv0.144.0

type UsersProjectsLocationsService struct {// contains filtered or unexported fields}

funcNewUsersProjectsLocationsServiceadded inv0.144.0

func NewUsersProjectsLocationsService(s *Service) *UsersProjectsLocationsService

func (*UsersProjectsLocationsService)SignSshPublicKeyadded inv0.144.0

SignSshPublicKey: Signs an SSH public key for a user to authenticate to aninstance.

- parent: The parent project and region for the signing request.

typeUsersProjectsLocationsSignSshPublicKeyCalladded inv0.144.0

type UsersProjectsLocationsSignSshPublicKeyCall struct {// contains filtered or unexported fields}

func (*UsersProjectsLocationsSignSshPublicKeyCall)Contextadded inv0.144.0

Context sets the context to be used in this call's Do method.

func (*UsersProjectsLocationsSignSshPublicKeyCall)Doadded inv0.144.0

Do executes the "oslogin.users.projects.locations.signSshPublicKey" call.Any non-2xx status code is an error. Response headers are in either*SignSshPublicKeyResponse.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.

func (*UsersProjectsLocationsSignSshPublicKeyCall)Fieldsadded inv0.144.0

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*UsersProjectsLocationsSignSshPublicKeyCall)Headeradded inv0.144.0

Header returns a http.Header that can be modified by the caller to addheaders to the request.

typeUsersProjectsProvisionPosixAccountCalladded inv0.222.0

type UsersProjectsProvisionPosixAccountCall struct {// contains filtered or unexported fields}

func (*UsersProjectsProvisionPosixAccountCall)Contextadded inv0.222.0

Context sets the context to be used in this call's Do method.

func (*UsersProjectsProvisionPosixAccountCall)Doadded inv0.222.0

Do executes the "oslogin.users.projects.provisionPosixAccount" call.Any non-2xx status code is an error. Response headers are in either*PosixAccount.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.

func (*UsersProjectsProvisionPosixAccountCall)Fieldsadded inv0.222.0

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*UsersProjectsProvisionPosixAccountCall)Headeradded inv0.222.0

Header returns a http.Header that can be modified by the caller to addheaders to the request.

typeUsersProjectsService

type UsersProjectsService struct {Locations *UsersProjectsLocationsServiceZones *UsersProjectsZonesService// contains filtered or unexported fields}

funcNewUsersProjectsService

func NewUsersProjectsService(s *Service) *UsersProjectsService

func (*UsersProjectsService)Delete

Delete: Deletes a POSIX account.

  • name: A reference to the POSIX account to update. POSIX accounts areidentified by the project ID they are associated with. A reference to thePOSIX account is in format `users/{user}/projects/{project}`.

func (*UsersProjectsService)ProvisionPosixAccountadded inv0.222.0

func (r *UsersProjectsService) ProvisionPosixAccount(namestring, provisionposixaccountrequest *ProvisionPosixAccountRequest) *UsersProjectsProvisionPosixAccountCall

ProvisionPosixAccount: Create a POSIX account if it doesn't exist.

  • name: The unique ID for the user in format`users/{user}/projects/{project}`.

typeUsersProjectsZonesServiceadded inv0.135.0

type UsersProjectsZonesService struct {// contains filtered or unexported fields}

funcNewUsersProjectsZonesServiceadded inv0.135.0

func NewUsersProjectsZonesService(s *Service) *UsersProjectsZonesService

func (*UsersProjectsZonesService)SignSshPublicKeyadded inv0.135.0

func (r *UsersProjectsZonesService) SignSshPublicKey(parentstring, signsshpublickeyrequest *SignSshPublicKeyRequest) *UsersProjectsZonesSignSshPublicKeyCall

SignSshPublicKey: Signs an SSH public key for a user to authenticate to aninstance.

- parent: The parent project and region for the signing request.

typeUsersProjectsZonesSignSshPublicKeyCalladded inv0.135.0

type UsersProjectsZonesSignSshPublicKeyCall struct {// contains filtered or unexported fields}

func (*UsersProjectsZonesSignSshPublicKeyCall)Contextadded inv0.135.0

Context sets the context to be used in this call's Do method.

func (*UsersProjectsZonesSignSshPublicKeyCall)Doadded inv0.135.0

Do executes the "oslogin.users.projects.zones.signSshPublicKey" call.Any non-2xx status code is an error. Response headers are in either*SignSshPublicKeyResponse.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.

func (*UsersProjectsZonesSignSshPublicKeyCall)Fieldsadded inv0.135.0

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*UsersProjectsZonesSignSshPublicKeyCall)Headeradded inv0.135.0

Header returns a http.Header that can be modified by the caller to addheaders to the request.

typeUsersService

type UsersService struct {Projects *UsersProjectsServiceSshPublicKeys *UsersSshPublicKeysService// contains filtered or unexported fields}

funcNewUsersService

func NewUsersService(s *Service) *UsersService

func (*UsersService)GetLoginProfile

func (r *UsersService) GetLoginProfile(namestring) *UsersGetLoginProfileCall

GetLoginProfile: Retrieves the profile information used for logging in to avirtual machine on Google Compute Engine.

- name: The unique ID for the user in format `users/{user}`.

func (*UsersService)ImportSshPublicKey

func (r *UsersService) ImportSshPublicKey(parentstring, sshpublickey *SshPublicKey) *UsersImportSshPublicKeyCall

ImportSshPublicKey: Adds an SSH public key and returns the profileinformation. Default POSIX account information is set when no username andUID exist as part of the login profile.

- parent: The unique ID for the user in format `users/{user}`.

typeUsersSshPublicKeysCreateCalladded inv0.63.0

type UsersSshPublicKeysCreateCall struct {// contains filtered or unexported fields}

func (*UsersSshPublicKeysCreateCall)Contextadded inv0.63.0

Context sets the context to be used in this call's Do method.

func (*UsersSshPublicKeysCreateCall)Doadded inv0.63.0

Do executes the "oslogin.users.sshPublicKeys.create" call.Any non-2xx status code is an error. Response headers are in either*SshPublicKey.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.

func (*UsersSshPublicKeysCreateCall)Fieldsadded inv0.63.0

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*UsersSshPublicKeysCreateCall)Headeradded inv0.63.0

Header returns a http.Header that can be modified by the caller to addheaders to the request.

typeUsersSshPublicKeysDeleteCall

type UsersSshPublicKeysDeleteCall struct {// contains filtered or unexported fields}

func (*UsersSshPublicKeysDeleteCall)Context

Context sets the context to be used in this call's Do method.

func (*UsersSshPublicKeysDeleteCall)Do

Do executes the "oslogin.users.sshPublicKeys.delete" call.Any non-2xx status code is an error. Response headers are in either*Empty.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.

func (*UsersSshPublicKeysDeleteCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*UsersSshPublicKeysDeleteCall)Header

Header returns a http.Header that can be modified by the caller to addheaders to the request.

typeUsersSshPublicKeysGetCall

type UsersSshPublicKeysGetCall struct {// contains filtered or unexported fields}

func (*UsersSshPublicKeysGetCall)Context

Context sets the context to be used in this call's Do method.

func (*UsersSshPublicKeysGetCall)Do

Do executes the "oslogin.users.sshPublicKeys.get" call.Any non-2xx status code is an error. Response headers are in either*SshPublicKey.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.

func (*UsersSshPublicKeysGetCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*UsersSshPublicKeysGetCall)Header

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*UsersSshPublicKeysGetCall)IfNoneMatch

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

typeUsersSshPublicKeysPatchCall

type UsersSshPublicKeysPatchCall struct {// contains filtered or unexported fields}

func (*UsersSshPublicKeysPatchCall)Context

Context sets the context to be used in this call's Do method.

func (*UsersSshPublicKeysPatchCall)Do

Do executes the "oslogin.users.sshPublicKeys.patch" call.Any non-2xx status code is an error. Response headers are in either*SshPublicKey.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.

func (*UsersSshPublicKeysPatchCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*UsersSshPublicKeysPatchCall)Header

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*UsersSshPublicKeysPatchCall)UpdateMask

UpdateMask sets the optional parameter "updateMask": Mask to control whichfields get updated. Updates all if not present.

typeUsersSshPublicKeysService

type UsersSshPublicKeysService struct {// contains filtered or unexported fields}

funcNewUsersSshPublicKeysService

func NewUsersSshPublicKeysService(s *Service) *UsersSshPublicKeysService

func (*UsersSshPublicKeysService)Createadded inv0.63.0

Create: Create an SSH public key

- parent: The unique ID for the user in format `users/{user}`.

func (*UsersSshPublicKeysService)Delete

Delete: Deletes an SSH public key.

  • name: The fingerprint of the public key to update. Public keys areidentified by their SHA-256 fingerprint. The fingerprint of the public keyis in format `users/{user}/sshPublicKeys/{fingerprint}`.

func (*UsersSshPublicKeysService)Get

Get: Retrieves an SSH public key.

  • name: The fingerprint of the public key to retrieve. Public keys areidentified by their SHA-256 fingerprint. The fingerprint of the public keyis in format `users/{user}/sshPublicKeys/{fingerprint}`.

func (*UsersSshPublicKeysService)Patch

Patch: Updates an SSH public key and returns the profile information. Thismethod supports patch semantics.

  • name: The fingerprint of the public key to update. Public keys areidentified by their SHA-256 fingerprint. The fingerprint of the public keyis in format `users/{user}/sshPublicKeys/{fingerprint}`.

typeWebAuthnadded inv0.53.0

type WebAuthn struct {// RpId: Relying party ID for Web Authentication.RpIdstring `json:"rpId,omitempty"`// ForceSendFields is a list of field names (e.g. "RpId") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "RpId") to include in API requests// with the JSON null value. By default, fields with empty values are omitted// from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

WebAuthn: Security key information specific to the Web Authenticationprotocol.

func (WebAuthn)MarshalJSONadded inv0.53.0

func (sWebAuthn) MarshalJSON() ([]byte,error)

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp