users
Creates, updates, deletes or gets a user
resource or lists users
in a region
Overview
Name | users |
Type | Resource |
Description | Definition of AWS::Transfer::User Resource Type |
Id | aws.transfer.users |
Fields
Name | Datatype | Description |
---|---|---|
arn | string | |
home_directory | string | |
home_directory_mappings | array | |
home_directory_type | string | |
policy | string | |
posix_profile | object | |
role | string | |
server_id | string | |
ssh_public_keys | array | This represents the SSH User Public Keys for CloudFormation resource |
tags | array | |
user_name | string | |
region | string | AWS region. |
For more information, see AWS::Transfer::User
.
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Role, ServerId, UserName, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.transfer.users (
Role,
ServerId,
UserName,
region
)
SELECT
'{{ Role }}',
'{{ ServerId }}',
'{{ UserName }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.transfer.users (
HomeDirectory,
HomeDirectoryMappings,
HomeDirectoryType,
Policy,
PosixProfile,
Role,
ServerId,
SshPublicKeys,
Tags,
UserName,
region
)
SELECT
'{{ HomeDirectory }}',
'{{ HomeDirectoryMappings }}',
'{{ HomeDirectoryType }}',
'{{ Policy }}',
'{{ PosixProfile }}',
'{{ Role }}',
'{{ ServerId }}',
'{{ SshPublicKeys }}',
'{{ Tags }}',
'{{ UserName }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: user
props:
- name: HomeDirectory
value: '{{ HomeDirectory }}'
- name: HomeDirectoryMappings
value:
- Entry: '{{ Entry }}'
Target: '{{ Target }}'
Type: '{{ Type }}'
- name: HomeDirectoryType
value: '{{ HomeDirectoryType }}'
- name: Policy
value: '{{ Policy }}'
- name: PosixProfile
value:
Uid: null
Gid: null
SecondaryGids:
- null
- name: Role
value: '{{ Role }}'
- name: ServerId
value: '{{ ServerId }}'
- name: SshPublicKeys
value:
- '{{ SshPublicKeys[0] }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
- name: UserName
value: '{{ UserName }}'
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