Show / Hide Table of Contents

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",
    });
}

}
Inheritance
System.Object
Resource
CustomResource
User
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.Transfer
Assembly: Pulumi.Aws.dll
Syntax
public class User : CustomResource

Constructors

View Source

User(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 Source

Arn

Amazon Resource Name (ARN) of Transfer User

Declaration
public Output<string> Arn { get; }
Property Value
Type Description
Output<System.String>
View Source

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>
View Source

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>
View Source

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>
View Source

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>
View Source

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>>
View Source

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 Source

Get(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
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.