oslogin
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
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
- type Empty
- type GoogleCloudOsloginControlplaneRegionalV1betaSignSshPublicKeyRequest
- type GoogleCloudOsloginControlplaneRegionalV1betaSignSshPublicKeyResponse
- type ImportSshPublicKeyResponse
- type LoginProfile
- type PosixAccount
- type ProjectsLocationsService
- type ProjectsLocationsSignSshPublicKeyCall
- func (c *ProjectsLocationsSignSshPublicKeyCall) Context(ctx context.Context) *ProjectsLocationsSignSshPublicKeyCall
- func (c *ProjectsLocationsSignSshPublicKeyCall) Do(opts ...googleapi.CallOption) (*GoogleCloudOsloginControlplaneRegionalV1betaSignSshPublicKeyResponse, error)
- func (c *ProjectsLocationsSignSshPublicKeyCall) Fields(s ...googleapi.Field) *ProjectsLocationsSignSshPublicKeyCall
- func (c *ProjectsLocationsSignSshPublicKeyCall) Header() http.Header
- type ProjectsService
- type ProvisionPosixAccountRequest
- type SecurityKey
- type Service
- type SignSshPublicKeyRequest
- type SignSshPublicKeyResponse
- type SshPublicKey
- type UniversalTwoFactor
- type UsersGetLoginProfileCall
- func (c *UsersGetLoginProfileCall) Context(ctx context.Context) *UsersGetLoginProfileCall
- func (c *UsersGetLoginProfileCall) Do(opts ...googleapi.CallOption) (*LoginProfile, error)
- func (c *UsersGetLoginProfileCall) Fields(s ...googleapi.Field) *UsersGetLoginProfileCall
- func (c *UsersGetLoginProfileCall) Header() http.Header
- func (c *UsersGetLoginProfileCall) IfNoneMatch(entityTag string) *UsersGetLoginProfileCall
- func (c *UsersGetLoginProfileCall) ProjectId(projectId string) *UsersGetLoginProfileCall
- func (c *UsersGetLoginProfileCall) SystemId(systemId string) *UsersGetLoginProfileCall
- func (c *UsersGetLoginProfileCall) View(view string) *UsersGetLoginProfileCall
- type UsersImportSshPublicKeyCall
- func (c *UsersImportSshPublicKeyCall) Context(ctx context.Context) *UsersImportSshPublicKeyCall
- func (c *UsersImportSshPublicKeyCall) Do(opts ...googleapi.CallOption) (*ImportSshPublicKeyResponse, error)
- func (c *UsersImportSshPublicKeyCall) Fields(s ...googleapi.Field) *UsersImportSshPublicKeyCall
- func (c *UsersImportSshPublicKeyCall) Header() http.Header
- func (c *UsersImportSshPublicKeyCall) ProjectId(projectId string) *UsersImportSshPublicKeyCall
- func (c *UsersImportSshPublicKeyCall) Regions(regions ...string) *UsersImportSshPublicKeyCall
- func (c *UsersImportSshPublicKeyCall) View(view string) *UsersImportSshPublicKeyCall
- type UsersProjectsDeleteCall
- func (c *UsersProjectsDeleteCall) Context(ctx context.Context) *UsersProjectsDeleteCall
- func (c *UsersProjectsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error)
- func (c *UsersProjectsDeleteCall) Fields(s ...googleapi.Field) *UsersProjectsDeleteCall
- func (c *UsersProjectsDeleteCall) Header() http.Header
- type UsersProjectsLocationsService
- type UsersProjectsLocationsSignSshPublicKeyCall
- func (c *UsersProjectsLocationsSignSshPublicKeyCall) Context(ctx context.Context) *UsersProjectsLocationsSignSshPublicKeyCall
- func (c *UsersProjectsLocationsSignSshPublicKeyCall) Do(opts ...googleapi.CallOption) (*SignSshPublicKeyResponse, error)
- func (c *UsersProjectsLocationsSignSshPublicKeyCall) Fields(s ...googleapi.Field) *UsersProjectsLocationsSignSshPublicKeyCall
- func (c *UsersProjectsLocationsSignSshPublicKeyCall) Header() http.Header
- type UsersProjectsProvisionPosixAccountCall
- func (c *UsersProjectsProvisionPosixAccountCall) Context(ctx context.Context) *UsersProjectsProvisionPosixAccountCall
- func (c *UsersProjectsProvisionPosixAccountCall) Do(opts ...googleapi.CallOption) (*PosixAccount, error)
- func (c *UsersProjectsProvisionPosixAccountCall) Fields(s ...googleapi.Field) *UsersProjectsProvisionPosixAccountCall
- func (c *UsersProjectsProvisionPosixAccountCall) Header() http.Header
- type UsersProjectsService
- type UsersProjectsZonesService
- type UsersProjectsZonesSignSshPublicKeyCall
- func (c *UsersProjectsZonesSignSshPublicKeyCall) Context(ctx context.Context) *UsersProjectsZonesSignSshPublicKeyCall
- func (c *UsersProjectsZonesSignSshPublicKeyCall) Do(opts ...googleapi.CallOption) (*SignSshPublicKeyResponse, error)
- func (c *UsersProjectsZonesSignSshPublicKeyCall) Fields(s ...googleapi.Field) *UsersProjectsZonesSignSshPublicKeyCall
- func (c *UsersProjectsZonesSignSshPublicKeyCall) Header() http.Header
- type UsersService
- type UsersSshPublicKeysCreateCall
- func (c *UsersSshPublicKeysCreateCall) Context(ctx context.Context) *UsersSshPublicKeysCreateCall
- func (c *UsersSshPublicKeysCreateCall) Do(opts ...googleapi.CallOption) (*SshPublicKey, error)
- func (c *UsersSshPublicKeysCreateCall) Fields(s ...googleapi.Field) *UsersSshPublicKeysCreateCall
- func (c *UsersSshPublicKeysCreateCall) Header() http.Header
- type UsersSshPublicKeysDeleteCall
- func (c *UsersSshPublicKeysDeleteCall) Context(ctx context.Context) *UsersSshPublicKeysDeleteCall
- func (c *UsersSshPublicKeysDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error)
- func (c *UsersSshPublicKeysDeleteCall) Fields(s ...googleapi.Field) *UsersSshPublicKeysDeleteCall
- func (c *UsersSshPublicKeysDeleteCall) Header() http.Header
- type UsersSshPublicKeysGetCall
- func (c *UsersSshPublicKeysGetCall) Context(ctx context.Context) *UsersSshPublicKeysGetCall
- func (c *UsersSshPublicKeysGetCall) Do(opts ...googleapi.CallOption) (*SshPublicKey, error)
- func (c *UsersSshPublicKeysGetCall) Fields(s ...googleapi.Field) *UsersSshPublicKeysGetCall
- func (c *UsersSshPublicKeysGetCall) Header() http.Header
- func (c *UsersSshPublicKeysGetCall) IfNoneMatch(entityTag string) *UsersSshPublicKeysGetCall
- type UsersSshPublicKeysPatchCall
- func (c *UsersSshPublicKeysPatchCall) Context(ctx context.Context) *UsersSshPublicKeysPatchCall
- func (c *UsersSshPublicKeysPatchCall) Do(opts ...googleapi.CallOption) (*SshPublicKey, error)
- func (c *UsersSshPublicKeysPatchCall) Fields(s ...googleapi.Field) *UsersSshPublicKeysPatchCall
- func (c *UsersSshPublicKeysPatchCall) Header() http.Header
- func (c *UsersSshPublicKeysPatchCall) UpdateMask(updateMask string) *UsersSshPublicKeysPatchCall
- type UsersSshPublicKeysService
- func (r *UsersSshPublicKeysService) Create(parent string, sshpublickey *SshPublicKey) *UsersSshPublicKeysCreateCall
- func (r *UsersSshPublicKeysService) Delete(name string) *UsersSshPublicKeysDeleteCall
- func (r *UsersSshPublicKeysService) Get(name string) *UsersSshPublicKeysGetCall
- func (r *UsersSshPublicKeysService) Patch(name string, sshpublickey *SshPublicKey) *UsersSshPublicKeysPatchCall
- type WebAuthn
Constants¶
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); }
typeGoogleCloudOsloginControlplaneRegionalV1betaSignSshPublicKeyRequest¶added 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)MarshalJSON¶added inv0.225.0
func (sGoogleCloudOsloginControlplaneRegionalV1betaSignSshPublicKeyRequest) MarshalJSON() ([]byte,error)
typeGoogleCloudOsloginControlplaneRegionalV1betaSignSshPublicKeyResponse¶added 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)MarshalJSON¶added inv0.225.0
func (sGoogleCloudOsloginControlplaneRegionalV1betaSignSshPublicKeyResponse) MarshalJSON() ([]byte,error)
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)
typeProjectsLocationsService¶added inv0.225.0
type ProjectsLocationsService struct {// contains filtered or unexported fields}funcNewProjectsLocationsService¶added inv0.225.0
func NewProjectsLocationsService(s *Service) *ProjectsLocationsService
func (*ProjectsLocationsService)SignSshPublicKey¶added 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}.
typeProjectsLocationsSignSshPublicKeyCall¶added inv0.225.0
type ProjectsLocationsSignSshPublicKeyCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsSignSshPublicKeyCall)Context¶added inv0.225.0
func (c *ProjectsLocationsSignSshPublicKeyCall) Context(ctxcontext.Context) *ProjectsLocationsSignSshPublicKeyCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsSignSshPublicKeyCall)Do¶added inv0.225.0
func (c *ProjectsLocationsSignSshPublicKeyCall) Do(opts ...googleapi.CallOption) (*GoogleCloudOsloginControlplaneRegionalV1betaSignSshPublicKeyResponse,error)
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)Fields¶added inv0.225.0
func (c *ProjectsLocationsSignSshPublicKeyCall) Fields(s ...googleapi.Field) *ProjectsLocationsSignSshPublicKeyCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsSignSshPublicKeyCall)Header¶added inv0.225.0
func (c *ProjectsLocationsSignSshPublicKeyCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeProjectsService¶added inv0.225.0
type ProjectsService struct {Locations *ProjectsLocationsService// contains filtered or unexported fields}funcNewProjectsService¶added inv0.225.0
func NewProjectsService(s *Service) *ProjectsService
typeProvisionPosixAccountRequest¶added 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)MarshalJSON¶added inv0.222.0
func (sProvisionPosixAccountRequest) MarshalJSON() ([]byte,error)
typeSecurityKey¶added 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)MarshalJSON¶added 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
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.
funcNewService¶added inv0.3.0
NewService creates a new Service.
typeSignSshPublicKeyRequest¶added 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)MarshalJSON¶added inv0.135.0
func (sSignSshPublicKeyRequest) MarshalJSON() ([]byte,error)
typeSignSshPublicKeyResponse¶added 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)MarshalJSON¶added 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)
typeUniversalTwoFactor¶added 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)MarshalJSON¶added inv0.53.0
func (sUniversalTwoFactor) MarshalJSON() ([]byte,error)
typeUsersGetLoginProfileCall¶
type UsersGetLoginProfileCall struct {// contains filtered or unexported fields}func (*UsersGetLoginProfileCall)Context¶
func (c *UsersGetLoginProfileCall) Context(ctxcontext.Context) *UsersGetLoginProfileCall
Context sets the context to be used in this call's Do method.
func (*UsersGetLoginProfileCall)Do¶
func (c *UsersGetLoginProfileCall) Do(opts ...googleapi.CallOption) (*LoginProfile,error)
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¶
func (c *UsersGetLoginProfileCall) Fields(s ...googleapi.Field) *UsersGetLoginProfileCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*UsersGetLoginProfileCall)Header¶
func (c *UsersGetLoginProfileCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*UsersGetLoginProfileCall)IfNoneMatch¶
func (c *UsersGetLoginProfileCall) IfNoneMatch(entityTagstring) *UsersGetLoginProfileCall
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¶
func (c *UsersGetLoginProfileCall) ProjectId(projectIdstring) *UsersGetLoginProfileCall
ProjectId sets the optional parameter "projectId": Required. The project IDof the Google Cloud Platform project.
func (*UsersGetLoginProfileCall)SystemId¶
func (c *UsersGetLoginProfileCall) SystemId(systemIdstring) *UsersGetLoginProfileCall
SystemId sets the optional parameter "systemId": A system ID for filteringthe results of the request.
func (*UsersGetLoginProfileCall)View¶added inv0.47.0
func (c *UsersGetLoginProfileCall) View(viewstring) *UsersGetLoginProfileCall
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¶
func (c *UsersImportSshPublicKeyCall) Context(ctxcontext.Context) *UsersImportSshPublicKeyCall
Context sets the context to be used in this call's Do method.
func (*UsersImportSshPublicKeyCall)Do¶
func (c *UsersImportSshPublicKeyCall) Do(opts ...googleapi.CallOption) (*ImportSshPublicKeyResponse,error)
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¶
func (c *UsersImportSshPublicKeyCall) Fields(s ...googleapi.Field) *UsersImportSshPublicKeyCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*UsersImportSshPublicKeyCall)Header¶
func (c *UsersImportSshPublicKeyCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*UsersImportSshPublicKeyCall)ProjectId¶
func (c *UsersImportSshPublicKeyCall) ProjectId(projectIdstring) *UsersImportSshPublicKeyCall
ProjectId sets the optional parameter "projectId": The project ID of theGoogle Cloud Platform project.
func (*UsersImportSshPublicKeyCall)Regions¶added inv0.155.0
func (c *UsersImportSshPublicKeyCall) Regions(regions ...string) *UsersImportSshPublicKeyCall
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)View¶added inv0.47.0
func (c *UsersImportSshPublicKeyCall) View(viewstring) *UsersImportSshPublicKeyCall
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¶
func (c *UsersProjectsDeleteCall) Context(ctxcontext.Context) *UsersProjectsDeleteCall
Context sets the context to be used in this call's Do method.
func (*UsersProjectsDeleteCall)Do¶
func (c *UsersProjectsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty,error)
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¶
func (c *UsersProjectsDeleteCall) Fields(s ...googleapi.Field) *UsersProjectsDeleteCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*UsersProjectsDeleteCall)Header¶
func (c *UsersProjectsDeleteCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeUsersProjectsLocationsService¶added inv0.144.0
type UsersProjectsLocationsService struct {// contains filtered or unexported fields}funcNewUsersProjectsLocationsService¶added inv0.144.0
func NewUsersProjectsLocationsService(s *Service) *UsersProjectsLocationsService
func (*UsersProjectsLocationsService)SignSshPublicKey¶added inv0.144.0
func (r *UsersProjectsLocationsService) SignSshPublicKey(parentstring, signsshpublickeyrequest *SignSshPublicKeyRequest) *UsersProjectsLocationsSignSshPublicKeyCall
SignSshPublicKey: Signs an SSH public key for a user to authenticate to aninstance.
- parent: The parent project and region for the signing request.
typeUsersProjectsLocationsSignSshPublicKeyCall¶added inv0.144.0
type UsersProjectsLocationsSignSshPublicKeyCall struct {// contains filtered or unexported fields}func (*UsersProjectsLocationsSignSshPublicKeyCall)Context¶added inv0.144.0
func (c *UsersProjectsLocationsSignSshPublicKeyCall) Context(ctxcontext.Context) *UsersProjectsLocationsSignSshPublicKeyCall
Context sets the context to be used in this call's Do method.
func (*UsersProjectsLocationsSignSshPublicKeyCall)Do¶added inv0.144.0
func (c *UsersProjectsLocationsSignSshPublicKeyCall) Do(opts ...googleapi.CallOption) (*SignSshPublicKeyResponse,error)
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)Fields¶added inv0.144.0
func (c *UsersProjectsLocationsSignSshPublicKeyCall) Fields(s ...googleapi.Field) *UsersProjectsLocationsSignSshPublicKeyCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*UsersProjectsLocationsSignSshPublicKeyCall)Header¶added inv0.144.0
func (c *UsersProjectsLocationsSignSshPublicKeyCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeUsersProjectsProvisionPosixAccountCall¶added inv0.222.0
type UsersProjectsProvisionPosixAccountCall struct {// contains filtered or unexported fields}func (*UsersProjectsProvisionPosixAccountCall)Context¶added inv0.222.0
func (c *UsersProjectsProvisionPosixAccountCall) Context(ctxcontext.Context) *UsersProjectsProvisionPosixAccountCall
Context sets the context to be used in this call's Do method.
func (*UsersProjectsProvisionPosixAccountCall)Do¶added inv0.222.0
func (c *UsersProjectsProvisionPosixAccountCall) Do(opts ...googleapi.CallOption) (*PosixAccount,error)
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)Fields¶added inv0.222.0
func (c *UsersProjectsProvisionPosixAccountCall) Fields(s ...googleapi.Field) *UsersProjectsProvisionPosixAccountCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*UsersProjectsProvisionPosixAccountCall)Header¶added inv0.222.0
func (c *UsersProjectsProvisionPosixAccountCall) Header()http.Header
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¶
func (r *UsersProjectsService) Delete(namestring) *UsersProjectsDeleteCall
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)ProvisionPosixAccount¶added 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}`.
typeUsersProjectsZonesService¶added inv0.135.0
type UsersProjectsZonesService struct {// contains filtered or unexported fields}funcNewUsersProjectsZonesService¶added inv0.135.0
func NewUsersProjectsZonesService(s *Service) *UsersProjectsZonesService
func (*UsersProjectsZonesService)SignSshPublicKey¶added 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.
typeUsersProjectsZonesSignSshPublicKeyCall¶added inv0.135.0
type UsersProjectsZonesSignSshPublicKeyCall struct {// contains filtered or unexported fields}func (*UsersProjectsZonesSignSshPublicKeyCall)Context¶added inv0.135.0
func (c *UsersProjectsZonesSignSshPublicKeyCall) Context(ctxcontext.Context) *UsersProjectsZonesSignSshPublicKeyCall
Context sets the context to be used in this call's Do method.
func (*UsersProjectsZonesSignSshPublicKeyCall)Do¶added inv0.135.0
func (c *UsersProjectsZonesSignSshPublicKeyCall) Do(opts ...googleapi.CallOption) (*SignSshPublicKeyResponse,error)
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)Fields¶added inv0.135.0
func (c *UsersProjectsZonesSignSshPublicKeyCall) Fields(s ...googleapi.Field) *UsersProjectsZonesSignSshPublicKeyCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*UsersProjectsZonesSignSshPublicKeyCall)Header¶added inv0.135.0
func (c *UsersProjectsZonesSignSshPublicKeyCall) Header()http.Header
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}`.
typeUsersSshPublicKeysCreateCall¶added inv0.63.0
type UsersSshPublicKeysCreateCall struct {// contains filtered or unexported fields}func (*UsersSshPublicKeysCreateCall)Context¶added inv0.63.0
func (c *UsersSshPublicKeysCreateCall) Context(ctxcontext.Context) *UsersSshPublicKeysCreateCall
Context sets the context to be used in this call's Do method.
func (*UsersSshPublicKeysCreateCall)Do¶added inv0.63.0
func (c *UsersSshPublicKeysCreateCall) Do(opts ...googleapi.CallOption) (*SshPublicKey,error)
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)Fields¶added inv0.63.0
func (c *UsersSshPublicKeysCreateCall) Fields(s ...googleapi.Field) *UsersSshPublicKeysCreateCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*UsersSshPublicKeysCreateCall)Header¶added inv0.63.0
func (c *UsersSshPublicKeysCreateCall) Header()http.Header
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¶
func (c *UsersSshPublicKeysDeleteCall) Context(ctxcontext.Context) *UsersSshPublicKeysDeleteCall
Context sets the context to be used in this call's Do method.
func (*UsersSshPublicKeysDeleteCall)Do¶
func (c *UsersSshPublicKeysDeleteCall) Do(opts ...googleapi.CallOption) (*Empty,error)
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¶
func (c *UsersSshPublicKeysDeleteCall) Fields(s ...googleapi.Field) *UsersSshPublicKeysDeleteCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*UsersSshPublicKeysDeleteCall)Header¶
func (c *UsersSshPublicKeysDeleteCall) Header()http.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¶
func (c *UsersSshPublicKeysGetCall) Context(ctxcontext.Context) *UsersSshPublicKeysGetCall
Context sets the context to be used in this call's Do method.
func (*UsersSshPublicKeysGetCall)Do¶
func (c *UsersSshPublicKeysGetCall) Do(opts ...googleapi.CallOption) (*SshPublicKey,error)
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¶
func (c *UsersSshPublicKeysGetCall) Fields(s ...googleapi.Field) *UsersSshPublicKeysGetCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*UsersSshPublicKeysGetCall)Header¶
func (c *UsersSshPublicKeysGetCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*UsersSshPublicKeysGetCall)IfNoneMatch¶
func (c *UsersSshPublicKeysGetCall) IfNoneMatch(entityTagstring) *UsersSshPublicKeysGetCall
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¶
func (c *UsersSshPublicKeysPatchCall) Context(ctxcontext.Context) *UsersSshPublicKeysPatchCall
Context sets the context to be used in this call's Do method.
func (*UsersSshPublicKeysPatchCall)Do¶
func (c *UsersSshPublicKeysPatchCall) Do(opts ...googleapi.CallOption) (*SshPublicKey,error)
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¶
func (c *UsersSshPublicKeysPatchCall) Fields(s ...googleapi.Field) *UsersSshPublicKeysPatchCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*UsersSshPublicKeysPatchCall)Header¶
func (c *UsersSshPublicKeysPatchCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*UsersSshPublicKeysPatchCall)UpdateMask¶
func (c *UsersSshPublicKeysPatchCall) UpdateMask(updateMaskstring) *UsersSshPublicKeysPatchCall
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)Create¶added inv0.63.0
func (r *UsersSshPublicKeysService) Create(parentstring, sshpublickey *SshPublicKey) *UsersSshPublicKeysCreateCall
Create: Create an SSH public key
- parent: The unique ID for the user in format `users/{user}`.
func (*UsersSshPublicKeysService)Delete¶
func (r *UsersSshPublicKeysService) Delete(namestring) *UsersSshPublicKeysDeleteCall
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¶
func (r *UsersSshPublicKeysService) Get(namestring) *UsersSshPublicKeysGetCall
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¶
func (r *UsersSshPublicKeysService) Patch(namestring, sshpublickey *SshPublicKey) *UsersSshPublicKeysPatchCall
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}`.
typeWebAuthn¶added 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.