Skip to main content

users

Creates, updates, deletes or gets a user resource or lists users in a region

Overview

Nameusers
TypeResource
DescriptionDefinition of AWS::Transfer::User Resource Type
Idaws.transfer.users

Fields

NameDatatypeDescription
arnstring
home_directorystring
home_directory_mappingsarray
home_directory_typestring
policystring
posix_profileobject
rolestring
server_idstring
ssh_public_keysarrayThis represents the SSH User Public Keys for CloudFormation resource
tagsarray
user_namestring
regionstringAWS region.

For more information, see AWS::Transfer::User.

Methods

NameAccessible byRequired Params
create_resourceINSERTRole, ServerId, UserName, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all users in a region.

SELECT
region,
arn,
home_directory,
home_directory_mappings,
home_directory_type,
policy,
posix_profile,
role,
server_id,
ssh_public_keys,
tags,
user_name
FROM aws.transfer.users
WHERE region = 'us-east-1';

Gets all properties from an individual user.

SELECT
region,
arn,
home_directory,
home_directory_mappings,
home_directory_type,
policy,
posix_profile,
role,
server_id,
ssh_public_keys,
tags,
user_name
FROM aws.transfer.users
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';

INSERT example

Use the following StackQL query and manifest file to create a new user resource, using stack-deploy.

/*+ create */
INSERT INTO aws.transfer.users (
Role,
ServerId,
UserName,
region
)
SELECT
'{{ Role }}',
'{{ ServerId }}',
'{{ UserName }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.transfer.users
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';

Permissions

To operate on the users resource, the following permissions are required:

Create

iam:PassRole,
transfer:CreateUser,
transfer:DescribeUser,
transfer:ImportSshPublicKey,
transfer:TagResource

Read

transfer:DescribeUser

Update

iam:PassRole,
transfer:DeleteSshPublicKey,
transfer:DescribeUser,
transfer:ImportSshPublicKey,
transfer:TagResource,
transfer:UnTagResource,
transfer:UpdateUser

Delete

transfer:DeleteUser

List

transfer:ListUsers