REST Resource: projects.locations.servers.users

Resource: User

Message describing User object

JSON representation
{
  "name": string,
  "createTime": string,
  "updateTime": string,
  "labels": {
    string: string,
    ...
  },
  "username": string,
  "customerServiceAccount": string,
  "state": enum (State),
  "userCredentials": [
    {
      object (UserCredential)
    }
  ],
  "storageDirectoryMappings": [
    {
      object (StorageDirectoryMapping)
    }
  ]
}
Fields
name

string

Identifier. User-friendly name via which User will be identified. projects/{project}/locations/{location}/servers/{server}/users/{user}

createTime

string (Timestamp format)

Output only. [Output only] Create time stamp

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

updateTime

string (Timestamp format)

Output only. [Output only] Update time stamp

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

labels

map (key: string, value: string)

Optional. Labels as key value pairs

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

username

string

Output only. [Output only] The username of the user.

customerServiceAccount

string

Required. Service account in customer project attached to this SFTP User.

state

enum (State)

Output only. Tracks user creation.

userCredentials[]

object (UserCredential)

Required. User credential for the user. The maximum number of user credentials is 10.

storageDirectoryMappings[]

object (StorageDirectoryMapping)

Required. Mapping of Cloud Storage buckets to directories where the user will land in the SFTP server.

State

Tracks user creation.

Enums
STATE_UNSPECIFIED State unspecified.
CREATING User is being created.
ACTIVE User is ready to be used.
ERROR User creation failed.
UPDATING The resource is being updated.
DELETING The resource is being deleted.

UserCredential

Message describing UserCredential object

JSON representation
{
  "credentialName": string,
  "credentialType": enum (Type),
  "sshPublicKeyBody": string
}
Fields
credentialName

string

Required. Name of the user credential.

credentialType

enum (Type)

Required. Type of credential.

sshPublicKeyBody

string

Optional. SSH public key body in OpenSSH format. Example: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQ..."

Type

Type of credential.

Enums
TYPE_UNSPECIFIED Type unspecified.
PUBLIC_KEY Public key credential.

StorageDirectoryMapping

Mapping of backing Cloud Storage path to the directory where the user lands in the SFTP server. If directory is not specified, it'll default to '/'.

Eg 1 - (bucket_name: bucket, bucketPrefix: path1/path2, directory: /abc/def/username)

The user will land at /abcd/def/username, and the view there will match that of /bucket/path1/path2. The user will not be aware of Cloud Storage prefix '/bucket/path1' and there will be no such directory in the view.

Eg 2 - (bucket_name: bucket, bucketPrefix: path1/path2, directory: '')

The user will land at '/', and the view there will match that of /bucket/path1/path2. The user will not be aware of Cloud Storage prefix '/bucket/path1/path2' and there will be no such directory in the view.

JSON representation
{
  "bucket": string,
  "bucketPrefix": string,
  "directory": string,
  "permission": enum (Permission)
}
Fields
bucket

string

Required. Name of the bucket.

bucketPrefix

string

Optional. Prefix inside the bucket.

directory

string

Required. Directory where the user lands in the SFTP server.

permission

enum (Permission)

Required. Permission to the bucket.

Permission

Tracks read/write access to the bucket.

Enums
PERMISSION_UNSPECIFIED Permission unspecified.
READ_ONLY Read only permission.
READ_WRITE Read write permission.

Methods

create

Creates a new User in a given project and location and Server.

delete

Deletes a single User.

get

Gets details of a single User.

list

Lists Users in a given project and location.

patch

Updates the parameters of a single User.