Signs an SSH public key for a user to authenticate to a virtual machine on Google Compute Engine.
HTTP request
 POST https://oslogin.googleapis.com/v1beta/{parent=projects/*/locations/*}:signSshPublicKey 
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
| parent |   Required. The parent for the signing request. Format: projects/{project}/locations/{location} | 
Request body
The request body contains data with the following structure:
| JSON representation | 
|---|
| { "sshPublicKey" : string , "serviceAccount" : string , // Union field | 
sshPublicKey 
 string 
Required. The SSH public key to sign.
serviceAccount 
 string 
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.
resource 
. Required. The resource to sign the SSH public key for. Signed SSH public keys are scoped to a specific resource; attempting to use them to sign into another resource will fail. During rollout of the new regionalized SignSshPublicKey API, this field will be required for all requests, but the VM will not initially carry out the verification of this resource unless it updates to a package that supports this feature. resource 
can be only one of the following:computeInstance 
 string 
The Compute instance to sign the SSH public key for. Expected format: projects/{project}/zones/{zone}/instances/{numericInstanceId}
appEngineInstance 
 string 
The App Engine instance to sign the SSH public key for. Expected format: apps/{app}/services/{service}/versions/{version}/instances/{instance}
Response body
The response message for signing an SSH public key.
If successful, the response body contains data with the following structure:
| JSON representation | 
|---|
| { "signedSshPublicKey" : string } | 
| Fields | |
|---|---|
| signedSshPublicKey |   The signed SSH public key to use in the SSH handshake. | 
Authorization scopes
Requires the following OAuth scope:
-  https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview .

