- 2.53.0 (latest)
- 2.52.0
- 2.51.0
- 2.50.0
- 2.48.0
- 2.47.0
- 2.46.0
- 2.45.0
- 2.44.0
- 2.43.0
- 2.42.0
- 2.41.0
- 2.40.0
- 2.39.0
- 2.38.0
- 2.36.0
- 2.35.0
- 2.34.0
- 2.33.0
- 2.32.0
- 2.31.0
- 2.30.0
- 2.29.0
- 2.28.0
- 2.27.0
- 2.26.0
- 2.23.0
- 2.22.0
- 2.21.0
- 2.20.0
- 2.19.0
- 2.18.0
- 2.17.0
- 2.16.0
- 2.15.0
- 2.14.0
- 2.13.0
- 2.12.0
- 2.11.0
- 2.10.0
- 2.8.0
- 2.7.0
- 2.6.0
- 2.5.0
- 2.4.0
- 2.3.0
- 2.2.7
- 2.0.15
The interfaces provided are listed below, along with usage samples.
OsLoginServiceClient
Service Description: Cloud OS Login API
The Cloud OS Login API allows you to manage users and their associated SSH public keys for logging into virtual machines on Google Cloud Platform.
Sample for OsLoginServiceClient:
try (OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.create()) {
PosixAccountName name = PosixAccountName.of("[USER]", "[PROJECT]");
osLoginServiceClient.deletePosixAccount(name);
}
Classes
DeletePosixAccountRequest
A request message for deleting a POSIX account entry.
Protobuf type google.cloud.oslogin.v1.DeletePosixAccountRequest
DeletePosixAccountRequest.Builder
A request message for deleting a POSIX account entry.
Protobuf type google.cloud.oslogin.v1.DeletePosixAccountRequest
DeleteSshPublicKeyRequest
A request message for deleting an SSH public key.
Protobuf type google.cloud.oslogin.v1.DeleteSshPublicKeyRequest
DeleteSshPublicKeyRequest.Builder
A request message for deleting an SSH public key.
Protobuf type google.cloud.oslogin.v1.DeleteSshPublicKeyRequest
FingerprintName
FingerprintName.Builder
Builder for FingerprintName.
GetLoginProfileRequest
A request message for retrieving the login profile information for a user.
Protobuf type google.cloud.oslogin.v1.GetLoginProfileRequest
GetLoginProfileRequest.Builder
A request message for retrieving the login profile information for a user.
Protobuf type google.cloud.oslogin.v1.GetLoginProfileRequest
GetSshPublicKeyRequest
A request message for retrieving an SSH public key.
Protobuf type google.cloud.oslogin.v1.GetSshPublicKeyRequest
GetSshPublicKeyRequest.Builder
A request message for retrieving an SSH public key.
Protobuf type google.cloud.oslogin.v1.GetSshPublicKeyRequest
ImportSshPublicKeyRequest
A request message for importing an SSH public key.
Protobuf type google.cloud.oslogin.v1.ImportSshPublicKeyRequest
ImportSshPublicKeyRequest.Builder
A request message for importing an SSH public key.
Protobuf type google.cloud.oslogin.v1.ImportSshPublicKeyRequest
ImportSshPublicKeyResponse
A response message for importing an SSH public key.
Protobuf type google.cloud.oslogin.v1.ImportSshPublicKeyResponse
ImportSshPublicKeyResponse.Builder
A response message for importing an SSH public key.
Protobuf type google.cloud.oslogin.v1.ImportSshPublicKeyResponse
LoginProfile
The user profile information used for logging in to a virtual machine on Google Compute Engine.
Protobuf type google.cloud.oslogin.v1.LoginProfile
LoginProfile.Builder
The user profile information used for logging in to a virtual machine on Google Compute Engine.
Protobuf type google.cloud.oslogin.v1.LoginProfile
OsLoginProto
OsLoginServiceClient
Service Description: Cloud OS Login API
The Cloud OS Login API allows you to manage users and their associated SSH public keys for logging into virtual machines on Google Cloud Platform.
This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:
try (OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.create()) {
ProjectName name = ProjectName.of("[USER]", "[PROJECT]");
osLoginServiceClient.deletePosixAccount(name);
}
Note: close() needs to be called on the OsLoginServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
The surface of this class includes several types of Java methods for each of the API's methods:
- A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
- A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
- A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of OsLoginServiceSettings to create(). For example:
To customize credentials:
OsLoginServiceSettings osLoginServiceSettings =
OsLoginServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.create(osLoginServiceSettings);
To customize the endpoint:
OsLoginServiceSettings osLoginServiceSettings =
OsLoginServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.create(osLoginServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
OsLoginServiceGrpc
Cloud OS Login API The Cloud OS Login API allows you to manage users and their associated SSH public keys for logging into virtual machines on Google Cloud Platform.
OsLoginServiceGrpc.OsLoginServiceBlockingStub
Cloud OS Login API The Cloud OS Login API allows you to manage users and their associated SSH public keys for logging into virtual machines on Google Cloud Platform.
OsLoginServiceGrpc.OsLoginServiceFutureStub
Cloud OS Login API The Cloud OS Login API allows you to manage users and their associated SSH public keys for logging into virtual machines on Google Cloud Platform.
OsLoginServiceGrpc.OsLoginServiceImplBase
Cloud OS Login API The Cloud OS Login API allows you to manage users and their associated SSH public keys for logging into virtual machines on Google Cloud Platform.
OsLoginServiceGrpc.OsLoginServiceStub
Cloud OS Login API The Cloud OS Login API allows you to manage users and their associated SSH public keys for logging into virtual machines on Google Cloud Platform.
OsLoginServiceSettings
Settings class to configure an instance of OsLoginServiceClient.
The default instance has everything set to sensible defaults:
- The default service address (oslogin.googleapis.com) and default port (443) are used.
- Credentials are acquired automatically through Application Default Credentials.
- Retries are configured for idempotent methods but not for non-idempotent methods.
The builder of this class is recursive, so contained classes are themselves builders. When build() is called, the tree of builders is called to create the complete settings object.
For example, to set the total timeout of deletePosixAccount to 30 seconds:
OsLoginServiceSettings.Builder osLoginServiceSettingsBuilder =
OsLoginServiceSettings.newBuilder();
osLoginServiceSettingsBuilder
.deletePosixAccountSettings()
.setRetrySettings(
osLoginServiceSettingsBuilder
.deletePosixAccountSettings()
.getRetrySettings()
.toBuilder()
.setTotalTimeout(Duration.ofSeconds(30))
.build());
OsLoginServiceSettings osLoginServiceSettings = osLoginServiceSettingsBuilder.build();
OsLoginServiceSettings.Builder
Builder for OsLoginServiceSettings.
PosixAccountName
PosixAccountName.Builder
Builder for users/{user}/projects/{project}.
ProjectName
ProjectName.Builder
Builder for ProjectName.
SshPublicKeyName
SshPublicKeyName.Builder
Builder for users/{user}/sshPublicKeys/{fingerprint}.
UpdateSshPublicKeyRequest
A request message for updating an SSH public key.
Protobuf type google.cloud.oslogin.v1.UpdateSshPublicKeyRequest
UpdateSshPublicKeyRequest.Builder
A request message for updating an SSH public key.
Protobuf type google.cloud.oslogin.v1.UpdateSshPublicKeyRequest
UserName
UserName.Builder
Builder for users/{user}.