...

Package oslogin

import "google.golang.org/api/oslogin/v1beta"
Overview
Index

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, this library is considered complete and is in maintenance mode. This means that we will address critical bugs and security issues but will not add any 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 for authentication. For information on how to create and obtain Application Default Credentials, see https://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, use google.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 API keys), use google.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 OAuth flow, use google.golang.org/api/option.WithTokenSource:

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

See google.golang.org/api/option.ClientOption for details on options.

Index ▾

Constants
type Empty
type ImportSshPublicKeyResponse
    func (s *ImportSshPublicKeyResponse) MarshalJSON() ([]byte, error)
type LoginProfile
    func (s *LoginProfile) MarshalJSON() ([]byte, error)
type PosixAccount
    func (s *PosixAccount) MarshalJSON() ([]byte, error)
type SecurityKey
    func (s *SecurityKey) MarshalJSON() ([]byte, error)
type Service
    func New(client *http.Client) (*Service, error)
    func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error)
type SignSshPublicKeyRequest
    func (s *SignSshPublicKeyRequest) MarshalJSON() ([]byte, error)
type SignSshPublicKeyResponse
    func (s *SignSshPublicKeyResponse) MarshalJSON() ([]byte, error)
type SshPublicKey
    func (s *SshPublicKey) MarshalJSON() ([]byte, error)
type UniversalTwoFactor
    func (s *UniversalTwoFactor) MarshalJSON() ([]byte, error)
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
    func NewUsersProjectsLocationsService(s *Service) *UsersProjectsLocationsService
    func (r *UsersProjectsLocationsService) SignSshPublicKey(parent string, signsshpublickeyrequest *SignSshPublicKeyRequest) *UsersProjectsLocationsSignSshPublicKeyCall
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 UsersProjectsService
    func NewUsersProjectsService(s *Service) *UsersProjectsService
    func (r *UsersProjectsService) Delete(name string) *UsersProjectsDeleteCall
type UsersProjectsZonesService
    func NewUsersProjectsZonesService(s *Service) *UsersProjectsZonesService
    func (r *UsersProjectsZonesService) SignSshPublicKey(parent string, signsshpublickeyrequest *SignSshPublicKeyRequest) *UsersProjectsZonesSignSshPublicKeyCall
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
    func NewUsersService(s *Service) *UsersService
    func (r *UsersService) GetLoginProfile(name string) *UsersGetLoginProfileCall
    func (r *UsersService) ImportSshPublicKey(parent string, sshpublickey *SshPublicKey) *UsersImportSshPublicKeyCall
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 NewUsersSshPublicKeysService(s *Service) *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
    func (s *WebAuthn) MarshalJSON() ([]byte, error)

Package files

oslogin-gen.go

Constants

OAuth2 scopes used by this API.

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 Account
    CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only"

    // View and manage your Google Compute Engine resources
    ComputeScope = "https://www.googleapis.com/auth/compute"

    // View your Google Compute Engine resources
    ComputeReadonlyScope = "https://www.googleapis.com/auth/compute.readonly"
)

type Empty

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

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

type ImportSshPublicKeyResponse

ImportSshPublicKeyResponse: A response message for importing an SSH public key.

type ImportSshPublicKeyResponse struct {
    // Details: Detailed information about import results.
    Details string `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:"-"`
}

func (*ImportSshPublicKeyResponse) MarshalJSON

func (s *ImportSshPublicKeyResponse) MarshalJSON() ([]byte, error)

type LoginProfile

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

type LoginProfile struct {
    // Name: Required. A unique user ID.
    Name string `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:"-"`
}

func (*LoginProfile) MarshalJSON

func (s *LoginProfile) MarshalJSON() ([]byte, error)

type PosixAccount

PosixAccount: The POSIX account information associated with a Google account.

type PosixAccount struct {
    // AccountId: Output only. A POSIX account identifier.
    AccountId string `json:"accountId,omitempty"`
    // Gecos: The GECOS (user information) entry for this account.
    Gecos string `json:"gecos,omitempty"`
    // Gid: The default group ID.
    Gid int64 `json:"gid,omitempty,string"`
    // HomeDirectory: The path to the home directory for this account.
    HomeDirectory string `json:"homeDirectory,omitempty"`
    // Name: Output only. The canonical resource name.
    Name string `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.
    OperatingSystemType string `json:"operatingSystemType,omitempty"`
    // Primary: Only one POSIX account can be marked as primary.
    Primary bool `json:"primary,omitempty"`
    // Shell: The path to the logic shell for this account.
    Shell string `json:"shell,omitempty"`
    // SystemId: System identifier for which account the username or uid applies
    // to. By default, the empty value is used.
    SystemId string `json:"systemId,omitempty"`
    // Uid: The user ID.
    Uid int64 `json:"uid,omitempty,string"`
    // Username: The username of the POSIX account.
    Username string `json:"username,omitempty"`
    // 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:"-"`
}

func (*PosixAccount) MarshalJSON

func (s *PosixAccount) MarshalJSON() ([]byte, error)

type SecurityKey

SecurityKey: The credential information for a Google registered security key.

type SecurityKey struct {
    // DeviceNickname: The security key nickname explicitly set by the user.
    DeviceNickname string `json:"deviceNickname,omitempty"`
    // PrivateKey: Hardware-backed private key text in SSH format.
    PrivateKey string `json:"privateKey,omitempty"`
    // PublicKey: Public key text in SSH format, defined by RFC4253
    // ("https://www.ietf.org/rfc/rfc4253.txt") section 6.6.
    PublicKey string `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:"-"`
}

func (*SecurityKey) MarshalJSON

func (s *SecurityKey) MarshalJSON() ([]byte, error)

type Service

type Service struct {
    BasePath  string // API endpoint base URL
    UserAgent string // optional additional User-Agent fragment

    Users *UsersService
    // contains filtered or unexported fields
}

func New

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.

func NewService

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

NewService creates a new Service.

type SignSshPublicKeyRequest

type SignSshPublicKeyRequest struct {
    // SshPublicKey: The SSH public key to sign.
    SshPublicKey string `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

func (s *SignSshPublicKeyRequest) MarshalJSON() ([]byte, error)

type SignSshPublicKeyResponse

type SignSshPublicKeyResponse struct {
    // SignedSshPublicKey: The signed SSH public key to use in the SSH handshake.
    SignedSshPublicKey string `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

func (s *SignSshPublicKeyResponse) MarshalJSON() ([]byte, error)

type SshPublicKey

SshPublicKey: The SSH public key information associated with a Google account.

type SshPublicKey struct {
    // ExpirationTimeUsec: An expiration time in microseconds since epoch.
    ExpirationTimeUsec int64 `json:"expirationTimeUsec,omitempty,string"`
    // Fingerprint: Output only. The SHA-256 fingerprint of the SSH public key.
    Fingerprint string `json:"fingerprint,omitempty"`
    // Key: Public key text in SSH format, defined by RFC4253 section 6.6.
    Key string `json:"key,omitempty"`
    // Name: Output only. The canonical resource name.
    Name string `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:"-"`
}

func (*SshPublicKey) MarshalJSON

func (s *SshPublicKey) MarshalJSON() ([]byte, error)

type UniversalTwoFactor

UniversalTwoFactor: Security key information specific to the U2F protocol.

type UniversalTwoFactor struct {
    // AppId: Application ID for the U2F protocol.
    AppId string `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:"-"`
}

func (*UniversalTwoFactor) MarshalJSON

func (s *UniversalTwoFactor) MarshalJSON() ([]byte, error)

type UsersGetLoginProfileCall

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

func (*UsersGetLoginProfileCall) Context

func (c *UsersGetLoginProfileCall) Context(ctx context.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 check whether 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. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*UsersGetLoginProfileCall) Header

func (c *UsersGetLoginProfileCall) Header() http.Header

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

func (*UsersGetLoginProfileCall) IfNoneMatch

func (c *UsersGetLoginProfileCall) IfNoneMatch(entityTag string) *UsersGetLoginProfileCall

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

func (*UsersGetLoginProfileCall) ProjectId

func (c *UsersGetLoginProfileCall) ProjectId(projectId string) *UsersGetLoginProfileCall

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

func (*UsersGetLoginProfileCall) SystemId

func (c *UsersGetLoginProfileCall) SystemId(systemId string) *UsersGetLoginProfileCall

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

func (*UsersGetLoginProfileCall) View

func (c *UsersGetLoginProfileCall) View(view string) *UsersGetLoginProfileCall

View sets the optional parameter "view": The view configures whether to retrieve 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.

type UsersImportSshPublicKeyCall

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

func (*UsersImportSshPublicKeyCall) Context

func (c *UsersImportSshPublicKeyCall) Context(ctx context.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 was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*UsersImportSshPublicKeyCall) Fields

func (c *UsersImportSshPublicKeyCall) Fields(s ...googleapi.Field) *UsersImportSshPublicKeyCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*UsersImportSshPublicKeyCall) Header

func (c *UsersImportSshPublicKeyCall) Header() http.Header

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

func (*UsersImportSshPublicKeyCall) ProjectId

func (c *UsersImportSshPublicKeyCall) ProjectId(projectId string) *UsersImportSshPublicKeyCall

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

func (*UsersImportSshPublicKeyCall) Regions

func (c *UsersImportSshPublicKeyCall) Regions(regions ...string) *UsersImportSshPublicKeyCall

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

func (*UsersImportSshPublicKeyCall) View

func (c *UsersImportSshPublicKeyCall) View(view string) *UsersImportSshPublicKeyCall

View sets the optional parameter "view": The view configures whether to retrieve 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.

type UsersProjectsDeleteCall

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

func (*UsersProjectsDeleteCall) Context

func (c *UsersProjectsDeleteCall) Context(ctx context.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) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether 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. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*UsersProjectsDeleteCall) Header

func (c *UsersProjectsDeleteCall) Header() http.Header

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

type UsersProjectsLocationsService

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

func NewUsersProjectsLocationsService

func NewUsersProjectsLocationsService(s *Service) *UsersProjectsLocationsService

func (*UsersProjectsLocationsService) SignSshPublicKey

func (r *UsersProjectsLocationsService) SignSshPublicKey(parent string, signsshpublickeyrequest *SignSshPublicKeyRequest) *UsersProjectsLocationsSignSshPublicKeyCall

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

type UsersProjectsLocationsSignSshPublicKeyCall

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

func (*UsersProjectsLocationsSignSshPublicKeyCall) Context

func (c *UsersProjectsLocationsSignSshPublicKeyCall) Context(ctx context.Context) *UsersProjectsLocationsSignSshPublicKeyCall

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

func (*UsersProjectsLocationsSignSshPublicKeyCall) Do

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 was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*UsersProjectsLocationsSignSshPublicKeyCall) Fields

func (c *UsersProjectsLocationsSignSshPublicKeyCall) Fields(s ...googleapi.Field) *UsersProjectsLocationsSignSshPublicKeyCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*UsersProjectsLocationsSignSshPublicKeyCall) Header

func (c *UsersProjectsLocationsSignSshPublicKeyCall) Header() http.Header

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

type UsersProjectsService

type UsersProjectsService struct {
    Locations *UsersProjectsLocationsService

    Zones *UsersProjectsZonesService
    // contains filtered or unexported fields
}

func NewUsersProjectsService

func NewUsersProjectsService(s *Service) *UsersProjectsService

func (*UsersProjectsService) Delete

func (r *UsersProjectsService) Delete(name string) *UsersProjectsDeleteCall

Delete: Deletes a POSIX account.

type UsersProjectsZonesService

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

func NewUsersProjectsZonesService

func NewUsersProjectsZonesService(s *Service) *UsersProjectsZonesService

func (*UsersProjectsZonesService) SignSshPublicKey

func (r *UsersProjectsZonesService) SignSshPublicKey(parent string, signsshpublickeyrequest *SignSshPublicKeyRequest) *UsersProjectsZonesSignSshPublicKeyCall

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

type UsersProjectsZonesSignSshPublicKeyCall

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

func (*UsersProjectsZonesSignSshPublicKeyCall) Context

func (c *UsersProjectsZonesSignSshPublicKeyCall) Context(ctx context.Context) *UsersProjectsZonesSignSshPublicKeyCall

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

func (*UsersProjectsZonesSignSshPublicKeyCall) Do

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 was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*UsersProjectsZonesSignSshPublicKeyCall) Fields

func (c *UsersProjectsZonesSignSshPublicKeyCall) Fields(s ...googleapi.Field) *UsersProjectsZonesSignSshPublicKeyCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*UsersProjectsZonesSignSshPublicKeyCall) Header

func (c *UsersProjectsZonesSignSshPublicKeyCall) Header() http.Header

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

type UsersService

type UsersService struct {
    Projects *UsersProjectsService

    SshPublicKeys *UsersSshPublicKeysService
    // contains filtered or unexported fields
}

func NewUsersService

func NewUsersService(s *Service) *UsersService

func (*UsersService) GetLoginProfile

func (r *UsersService) GetLoginProfile(name string) *UsersGetLoginProfileCall

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

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

func (*UsersService) ImportSshPublicKey

func (r *UsersService) ImportSshPublicKey(parent string, sshpublickey *SshPublicKey) *UsersImportSshPublicKeyCall

ImportSshPublicKey: 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.

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

type UsersSshPublicKeysCreateCall

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

func (*UsersSshPublicKeysCreateCall) Context

func (c *UsersSshPublicKeysCreateCall) Context(ctx context.Context) *UsersSshPublicKeysCreateCall

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

func (*UsersSshPublicKeysCreateCall) Do

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 check whether the returned error was because http.StatusNotModified was returned.

func (*UsersSshPublicKeysCreateCall) Fields

func (c *UsersSshPublicKeysCreateCall) Fields(s ...googleapi.Field) *UsersSshPublicKeysCreateCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*UsersSshPublicKeysCreateCall) Header

func (c *UsersSshPublicKeysCreateCall) Header() http.Header

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

type UsersSshPublicKeysDeleteCall

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

func (*UsersSshPublicKeysDeleteCall) Context

func (c *UsersSshPublicKeysDeleteCall) Context(ctx context.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) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether 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. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*UsersSshPublicKeysDeleteCall) Header

func (c *UsersSshPublicKeysDeleteCall) Header() http.Header

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

type UsersSshPublicKeysGetCall

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

func (*UsersSshPublicKeysGetCall) Context

func (c *UsersSshPublicKeysGetCall) Context(ctx context.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 check whether 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. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*UsersSshPublicKeysGetCall) Header

func (c *UsersSshPublicKeysGetCall) Header() http.Header

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

func (*UsersSshPublicKeysGetCall) IfNoneMatch

func (c *UsersSshPublicKeysGetCall) IfNoneMatch(entityTag string) *UsersSshPublicKeysGetCall

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

type UsersSshPublicKeysPatchCall

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

func (*UsersSshPublicKeysPatchCall) Context

func (c *UsersSshPublicKeysPatchCall) Context(ctx context.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 check whether 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. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*UsersSshPublicKeysPatchCall) Header

func (c *UsersSshPublicKeysPatchCall) Header() http.Header

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

func (*UsersSshPublicKeysPatchCall) UpdateMask

func (c *UsersSshPublicKeysPatchCall) UpdateMask(updateMask string) *UsersSshPublicKeysPatchCall

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

type UsersSshPublicKeysService

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

func NewUsersSshPublicKeysService

func NewUsersSshPublicKeysService(s *Service) *UsersSshPublicKeysService

func (*UsersSshPublicKeysService) Create

func (r *UsersSshPublicKeysService) Create(parent string, 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(name string) *UsersSshPublicKeysDeleteCall

Delete: Deletes an SSH public key.

func (*UsersSshPublicKeysService) Get

func (r *UsersSshPublicKeysService) Get(name string) *UsersSshPublicKeysGetCall

Get: Retrieves an SSH public key.

func (*UsersSshPublicKeysService) Patch

func (r *UsersSshPublicKeysService) Patch(name string, sshpublickey *SshPublicKey) *UsersSshPublicKeysPatchCall

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

type WebAuthn

WebAuthn: Security key information specific to the Web Authentication protocol.

type WebAuthn struct {
    // RpId: Relying party ID for Web Authentication.
    RpId string `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:"-"`
}

func (*WebAuthn) MarshalJSON

func (s *WebAuthn) MarshalJSON() ([]byte, error)