Class User
Provides a AWS Transfer User resource. Managing SSH keys can be accomplished with the aws.transfer.SshKey resource.
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var fooServer = new Aws.Transfer.Server("fooServer", new Aws.Transfer.ServerArgs
{
IdentityProviderType = "SERVICE_MANAGED",
Tags =
{
{ "NAME", "tf-acc-test-transfer-server" },
},
});
var fooRole = new Aws.Iam.Role("fooRole", new Aws.Iam.RoleArgs
{
AssumeRolePolicy = @"{
""Version"": ""2012-10-17"",
""Statement"": [
{
""Effect"": ""Allow"",
""Principal"": {
""Service"": ""transfer.amazonaws.com""
},
""Action"": ""sts:AssumeRole""
}
]
}
",
});
var fooRolePolicy = new Aws.Iam.RolePolicy("fooRolePolicy", new Aws.Iam.RolePolicyArgs
{
Policy = @"{
""Version"": ""2012-10-17"",
""Statement"": [
{
""Sid"": ""AllowFullAccesstoS3"",
""Effect"": ""Allow"",
""Action"": [
""s3:*""
],
""Resource"": ""*""
}
]
}
",
Role = fooRole.Id,
});
var fooUser = new Aws.Transfer.User("fooUser", new Aws.Transfer.UserArgs
{
Role = fooRole.Arn,
ServerId = fooServer.Id,
UserName = "tftestuser",
});
}
}
Inherited Members
Namespace: Pulumi.Aws.Transfer
Assembly: Pulumi.Aws.dll
Syntax
public class User : CustomResource
Constructors
View SourceUser(String, UserArgs, CustomResourceOptions)
Create a User resource with the given unique name, arguments, and options.
Declaration
public User(string name, UserArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| UserArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceArn
Amazon Resource Name (ARN) of Transfer User
Declaration
public Output<string> Arn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
HomeDirectory
The landing directory (folder) for a user when they log in to the server using their SFTP client. It should begin with a /. The first item in the path is the name of the home bucket (accessible as ${Transfer:HomeBucket} in the policy) and the rest is the home directory (accessible as ${Transfer:HomeDirectory} in the policy). For example, /example-bucket-1234/username would set the home bucket to example-bucket-1234 and the home directory to username.
Declaration
public Output<string> HomeDirectory { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Policy
An IAM JSON policy document that scopes down user access to portions of their Amazon S3 bucket. IAM variables you can use inside this policy include ${Transfer:UserName}, ${Transfer:HomeDirectory}, and ${Transfer:HomeBucket}. These are evaluated on-the-fly when navigating the bucket.
Declaration
public Output<string> Policy { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Role
Amazon Resource Name (ARN) of an IAM role that allows the service to controls your user’s access to your Amazon S3 bucket.
Declaration
public Output<string> Role { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ServerId
The Server ID of the Transfer Server (e.g. s-12345678)
Declaration
public Output<string> ServerId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Tags
A map of tags to assign to the resource.
Declaration
public Output<ImmutableDictionary<string, object>> Tags { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>> |
UserName
The name used for log in to your SFTP server.
Declaration
public Output<string> UserName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, UserState, CustomResourceOptions)
Get an existing User resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static User Get(string name, Input<string> id, UserState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| UserState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| User |