/// <summary>Snippet for ImportSshPublicKey</summary> public void ImportSshPublicKey1() { // Snippet: ImportSshPublicKey(UserName,SshPublicKey,CallSettings) // Create client OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.Create(); // Initialize request argument(s) UserName parent = new UserName("[USER]"); SshPublicKey sshPublicKey = new SshPublicKey(); // Make the request ImportSshPublicKeyResponse response = osLoginServiceClient.ImportSshPublicKey(parent, sshPublicKey); // End snippet }
/// <summary>Snippet for ImportSshPublicKey</summary> public void ImportSshPublicKey2ResourceNames() { // Snippet: ImportSshPublicKey(UserName, SshPublicKey, string, CallSettings) // Create client OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.Create(); // Initialize request argument(s) UserName parent = UserName.FromUser("[USER]"); SshPublicKey sshPublicKey = new SshPublicKey(); string projectId = ""; // Make the request ImportSshPublicKeyResponse response = osLoginServiceClient.ImportSshPublicKey(parent, sshPublicKey, projectId); // End snippet }
/// <summary>Snippet for ImportSshPublicKey</summary> public void ImportSshPublicKey2() { // Snippet: ImportSshPublicKey(string, SshPublicKey, string, CallSettings) // Create client OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.Create(); // Initialize request argument(s) string parent = "users/[USER]"; SshPublicKey sshPublicKey = new SshPublicKey(); string projectId = ""; // Make the request ImportSshPublicKeyResponse response = osLoginServiceClient.ImportSshPublicKey(parent, sshPublicKey, projectId); // End snippet }
/// <summary>Snippet for ImportSshPublicKey</summary> public void ImportSshPublicKey_RequestObject() { // Snippet: ImportSshPublicKey(ImportSshPublicKeyRequest,CallSettings) // Create client OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.Create(); // Initialize request argument(s) ImportSshPublicKeyRequest request = new ImportSshPublicKeyRequest { ParentAsUserName = new UserName("[USER]"), SshPublicKey = new SshPublicKey(), }; // Make the request ImportSshPublicKeyResponse response = osLoginServiceClient.ImportSshPublicKey(request); // End snippet }