transfer

package
v3.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LookupServerArgs

type LookupServerArgs struct {
	// ID for an SFTP server.
	ServerId string `pulumi:"serverId"`
}

A collection of arguments for invoking getServer.

type LookupServerResult

type LookupServerResult struct {
	// Amazon Resource Name (ARN) of Transfer Server
	Arn string `pulumi:"arn"`
	// The endpoint of the Transfer Server (e.g. `s-12345678.server.transfer.REGION.amazonaws.com`)
	Endpoint string `pulumi:"endpoint"`
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// The mode of authentication enabled for this service. The default value is `SERVICE_MANAGED`, which allows you to store and access SFTP user credentials within the service. `API_GATEWAY` indicates that user authentication requires a call to an API Gateway endpoint URL provided by you to integrate an identity provider of your choice.
	IdentityProviderType string `pulumi:"identityProviderType"`
	// Amazon Resource Name (ARN) of the IAM role used to authenticate the user account with an `identityProviderType` of `API_GATEWAY`.
	InvocationRole string `pulumi:"invocationRole"`
	// Amazon Resource Name (ARN) of an IAM role that allows the service to write your SFTP users’ activity to your Amazon CloudWatch logs for monitoring and auditing purposes.
	LoggingRole string `pulumi:"loggingRole"`
	ServerId    string `pulumi:"serverId"`
	// URL of the service endpoint used to authenticate users with an `identityProviderType` of `API_GATEWAY`.
	Url string `pulumi:"url"`
}

A collection of values returned by getServer.

func LookupServer

func LookupServer(ctx *pulumi.Context, args *LookupServerArgs, opts ...pulumi.InvokeOption) (*LookupServerResult, error)

Use this data source to get the ARN of an AWS Transfer Server for use in other resources.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-aws/sdk/v3/go/aws/transfer"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := transfer.LookupServer(ctx, &transfer.LookupServerArgs{
			ServerId: "s-1234567",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

```

type Server

type Server struct {
	pulumi.CustomResourceState

	// Amazon Resource Name (ARN) of Transfer Server
	Arn pulumi.StringOutput `pulumi:"arn"`
	// The endpoint of the Transfer Server (e.g. `s-12345678.server.transfer.REGION.amazonaws.com`)
	Endpoint pulumi.StringOutput `pulumi:"endpoint"`
	// The virtual private cloud (VPC) endpoint settings that you want to configure for your SFTP server. Fields documented below.
	EndpointDetails ServerEndpointDetailsPtrOutput `pulumi:"endpointDetails"`
	// The type of endpoint that you want your SFTP server connect to. If you connect to a `VPC_ENDPOINT`, your SFTP server isn't accessible over the public internet. If you want to connect your SFTP server via public internet, set `PUBLIC`.  Defaults to `PUBLIC`.
	EndpointType pulumi.StringPtrOutput `pulumi:"endpointType"`
	// A boolean that indicates all users associated with the server should be deleted so that the Server can be destroyed without error. The default value is `false`.
	ForceDestroy pulumi.BoolPtrOutput `pulumi:"forceDestroy"`
	// RSA private key (e.g. as generated by the `ssh-keygen -N "" -f my-new-server-key` command).
	HostKey pulumi.StringPtrOutput `pulumi:"hostKey"`
	// This value contains the message-digest algorithm (MD5) hash of the server's host key. This value is equivalent to the output of the `ssh-keygen -l -E md5 -f my-new-server-key` command.
	HostKeyFingerprint pulumi.StringOutput `pulumi:"hostKeyFingerprint"`
	// The mode of authentication enabled for this service. The default value is `SERVICE_MANAGED`, which allows you to store and access SFTP user credentials within the service. `API_GATEWAY` indicates that user authentication requires a call to an API Gateway endpoint URL provided by you to integrate an identity provider of your choice.
	IdentityProviderType pulumi.StringPtrOutput `pulumi:"identityProviderType"`
	// Amazon Resource Name (ARN) of the IAM role used to authenticate the user account with an `identityProviderType` of `API_GATEWAY`.
	InvocationRole pulumi.StringPtrOutput `pulumi:"invocationRole"`
	// Amazon Resource Name (ARN) of an IAM role that allows the service to write your SFTP users’ activity to your Amazon CloudWatch logs for monitoring and auditing purposes.
	LoggingRole pulumi.StringPtrOutput `pulumi:"loggingRole"`
	// A map of tags to assign to the resource.
	Tags pulumi.StringMapOutput `pulumi:"tags"`
	// - URL of the service endpoint used to authenticate users with an `identityProviderType` of `API_GATEWAY`.
	Url pulumi.StringPtrOutput `pulumi:"url"`
}

Provides a AWS Transfer Server resource.

```go package main

import (

"fmt"

"github.com/pulumi/pulumi-aws/sdk/v3/go/aws/iam"
"github.com/pulumi/pulumi-aws/sdk/v3/go/aws/transfer"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		fooRole, err := iam.NewRole(ctx, "fooRole", &iam.RoleArgs{
			AssumeRolePolicy: pulumi.String(fmt.Sprintf("%v%v%v%v%v%v%v%v%v%v%v%v", "{\n", "	\"Version\": \"2012-10-17\",\n", "	\"Statement\": [\n", "		{\n", "		\"Effect\": \"Allow\",\n", "		\"Principal\": {\n", "			\"Service\": \"transfer.amazonaws.com\"\n", "		},\n", "		\"Action\": \"sts:AssumeRole\"\n", "		}\n", "	]\n", "}\n")),
		})
		if err != nil {
			return err
		}
		_, err = iam.NewRolePolicy(ctx, "fooRolePolicy", &iam.RolePolicyArgs{
			Role: fooRole.ID(),
			Policy: pulumi.String(fmt.Sprintf("%v%v%v%v%v%v%v%v%v%v%v%v%v", "{\n", "	\"Version\": \"2012-10-17\",\n", "	\"Statement\": [\n", "		{\n", "		\"Sid\": \"AllowFullAccesstoCloudWatchLogs\",\n", "		\"Effect\": \"Allow\",\n", "		\"Action\": [\n", "			\"logs:*\"\n", "		],\n", "		\"Resource\": \"*\"\n", "		}\n", "	]\n", "}\n")),
		})
		if err != nil {
			return err
		}
		_, err = transfer.NewServer(ctx, "fooServer", &transfer.ServerArgs{
			IdentityProviderType: pulumi.String("SERVICE_MANAGED"),
			LoggingRole:          fooRole.Arn,
			Tags: pulumi.StringMap{
				"NAME": pulumi.String("tf-acc-test-transfer-server"),
				"ENV":  pulumi.String("test"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

func GetServer

func GetServer(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *ServerState, opts ...pulumi.ResourceOption) (*Server, error)

GetServer gets an existing Server resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewServer

func NewServer(ctx *pulumi.Context,
	name string, args *ServerArgs, opts ...pulumi.ResourceOption) (*Server, error)

NewServer registers a new resource with the given unique name, arguments, and options.

type ServerArgs

type ServerArgs struct {
	// The virtual private cloud (VPC) endpoint settings that you want to configure for your SFTP server. Fields documented below.
	EndpointDetails ServerEndpointDetailsPtrInput
	// The type of endpoint that you want your SFTP server connect to. If you connect to a `VPC_ENDPOINT`, your SFTP server isn't accessible over the public internet. If you want to connect your SFTP server via public internet, set `PUBLIC`.  Defaults to `PUBLIC`.
	EndpointType pulumi.StringPtrInput
	// A boolean that indicates all users associated with the server should be deleted so that the Server can be destroyed without error. The default value is `false`.
	ForceDestroy pulumi.BoolPtrInput
	// RSA private key (e.g. as generated by the `ssh-keygen -N "" -f my-new-server-key` command).
	HostKey pulumi.StringPtrInput
	// The mode of authentication enabled for this service. The default value is `SERVICE_MANAGED`, which allows you to store and access SFTP user credentials within the service. `API_GATEWAY` indicates that user authentication requires a call to an API Gateway endpoint URL provided by you to integrate an identity provider of your choice.
	IdentityProviderType pulumi.StringPtrInput
	// Amazon Resource Name (ARN) of the IAM role used to authenticate the user account with an `identityProviderType` of `API_GATEWAY`.
	InvocationRole pulumi.StringPtrInput
	// Amazon Resource Name (ARN) of an IAM role that allows the service to write your SFTP users’ activity to your Amazon CloudWatch logs for monitoring and auditing purposes.
	LoggingRole pulumi.StringPtrInput
	// A map of tags to assign to the resource.
	Tags pulumi.StringMapInput
	// - URL of the service endpoint used to authenticate users with an `identityProviderType` of `API_GATEWAY`.
	Url pulumi.StringPtrInput
}

The set of arguments for constructing a Server resource.

func (ServerArgs) ElementType

func (ServerArgs) ElementType() reflect.Type

type ServerEndpointDetails

type ServerEndpointDetails struct {
	// The ID of the VPC endpoint.
	VpcEndpointId string `pulumi:"vpcEndpointId"`
}

type ServerEndpointDetailsArgs

type ServerEndpointDetailsArgs struct {
	// The ID of the VPC endpoint.
	VpcEndpointId pulumi.StringInput `pulumi:"vpcEndpointId"`
}

func (ServerEndpointDetailsArgs) ElementType

func (ServerEndpointDetailsArgs) ElementType() reflect.Type

func (ServerEndpointDetailsArgs) ToServerEndpointDetailsOutput

func (i ServerEndpointDetailsArgs) ToServerEndpointDetailsOutput() ServerEndpointDetailsOutput

func (ServerEndpointDetailsArgs) ToServerEndpointDetailsOutputWithContext

func (i ServerEndpointDetailsArgs) ToServerEndpointDetailsOutputWithContext(ctx context.Context) ServerEndpointDetailsOutput

func (ServerEndpointDetailsArgs) ToServerEndpointDetailsPtrOutput

func (i ServerEndpointDetailsArgs) ToServerEndpointDetailsPtrOutput() ServerEndpointDetailsPtrOutput

func (ServerEndpointDetailsArgs) ToServerEndpointDetailsPtrOutputWithContext

func (i ServerEndpointDetailsArgs) ToServerEndpointDetailsPtrOutputWithContext(ctx context.Context) ServerEndpointDetailsPtrOutput

type ServerEndpointDetailsInput

type ServerEndpointDetailsInput interface {
	pulumi.Input

	ToServerEndpointDetailsOutput() ServerEndpointDetailsOutput
	ToServerEndpointDetailsOutputWithContext(context.Context) ServerEndpointDetailsOutput
}

ServerEndpointDetailsInput is an input type that accepts ServerEndpointDetailsArgs and ServerEndpointDetailsOutput values. You can construct a concrete instance of `ServerEndpointDetailsInput` via:

ServerEndpointDetailsArgs{...}

type ServerEndpointDetailsOutput

type ServerEndpointDetailsOutput struct{ *pulumi.OutputState }

func (ServerEndpointDetailsOutput) ElementType

func (ServerEndpointDetailsOutput) ToServerEndpointDetailsOutput

func (o ServerEndpointDetailsOutput) ToServerEndpointDetailsOutput() ServerEndpointDetailsOutput

func (ServerEndpointDetailsOutput) ToServerEndpointDetailsOutputWithContext

func (o ServerEndpointDetailsOutput) ToServerEndpointDetailsOutputWithContext(ctx context.Context) ServerEndpointDetailsOutput

func (ServerEndpointDetailsOutput) ToServerEndpointDetailsPtrOutput

func (o ServerEndpointDetailsOutput) ToServerEndpointDetailsPtrOutput() ServerEndpointDetailsPtrOutput

func (ServerEndpointDetailsOutput) ToServerEndpointDetailsPtrOutputWithContext

func (o ServerEndpointDetailsOutput) ToServerEndpointDetailsPtrOutputWithContext(ctx context.Context) ServerEndpointDetailsPtrOutput

func (ServerEndpointDetailsOutput) VpcEndpointId

The ID of the VPC endpoint.

type ServerEndpointDetailsPtrInput

type ServerEndpointDetailsPtrInput interface {
	pulumi.Input

	ToServerEndpointDetailsPtrOutput() ServerEndpointDetailsPtrOutput
	ToServerEndpointDetailsPtrOutputWithContext(context.Context) ServerEndpointDetailsPtrOutput
}

ServerEndpointDetailsPtrInput is an input type that accepts ServerEndpointDetailsArgs, ServerEndpointDetailsPtr and ServerEndpointDetailsPtrOutput values. You can construct a concrete instance of `ServerEndpointDetailsPtrInput` via:

        ServerEndpointDetailsArgs{...}

or:

        nil

type ServerEndpointDetailsPtrOutput

type ServerEndpointDetailsPtrOutput struct{ *pulumi.OutputState }

func (ServerEndpointDetailsPtrOutput) Elem

func (ServerEndpointDetailsPtrOutput) ElementType

func (ServerEndpointDetailsPtrOutput) ToServerEndpointDetailsPtrOutput

func (o ServerEndpointDetailsPtrOutput) ToServerEndpointDetailsPtrOutput() ServerEndpointDetailsPtrOutput

func (ServerEndpointDetailsPtrOutput) ToServerEndpointDetailsPtrOutputWithContext

func (o ServerEndpointDetailsPtrOutput) ToServerEndpointDetailsPtrOutputWithContext(ctx context.Context) ServerEndpointDetailsPtrOutput

func (ServerEndpointDetailsPtrOutput) VpcEndpointId

The ID of the VPC endpoint.

type ServerState

type ServerState struct {
	// Amazon Resource Name (ARN) of Transfer Server
	Arn pulumi.StringPtrInput
	// The endpoint of the Transfer Server (e.g. `s-12345678.server.transfer.REGION.amazonaws.com`)
	Endpoint pulumi.StringPtrInput
	// The virtual private cloud (VPC) endpoint settings that you want to configure for your SFTP server. Fields documented below.
	EndpointDetails ServerEndpointDetailsPtrInput
	// The type of endpoint that you want your SFTP server connect to. If you connect to a `VPC_ENDPOINT`, your SFTP server isn't accessible over the public internet. If you want to connect your SFTP server via public internet, set `PUBLIC`.  Defaults to `PUBLIC`.
	EndpointType pulumi.StringPtrInput
	// A boolean that indicates all users associated with the server should be deleted so that the Server can be destroyed without error. The default value is `false`.
	ForceDestroy pulumi.BoolPtrInput
	// RSA private key (e.g. as generated by the `ssh-keygen -N "" -f my-new-server-key` command).
	HostKey pulumi.StringPtrInput
	// This value contains the message-digest algorithm (MD5) hash of the server's host key. This value is equivalent to the output of the `ssh-keygen -l -E md5 -f my-new-server-key` command.
	HostKeyFingerprint pulumi.StringPtrInput
	// The mode of authentication enabled for this service. The default value is `SERVICE_MANAGED`, which allows you to store and access SFTP user credentials within the service. `API_GATEWAY` indicates that user authentication requires a call to an API Gateway endpoint URL provided by you to integrate an identity provider of your choice.
	IdentityProviderType pulumi.StringPtrInput
	// Amazon Resource Name (ARN) of the IAM role used to authenticate the user account with an `identityProviderType` of `API_GATEWAY`.
	InvocationRole pulumi.StringPtrInput
	// Amazon Resource Name (ARN) of an IAM role that allows the service to write your SFTP users’ activity to your Amazon CloudWatch logs for monitoring and auditing purposes.
	LoggingRole pulumi.StringPtrInput
	// A map of tags to assign to the resource.
	Tags pulumi.StringMapInput
	// - URL of the service endpoint used to authenticate users with an `identityProviderType` of `API_GATEWAY`.
	Url pulumi.StringPtrInput
}

func (ServerState) ElementType

func (ServerState) ElementType() reflect.Type

type SshKey

type SshKey struct {
	pulumi.CustomResourceState

	// The public key portion of an SSH key pair.
	Body pulumi.StringOutput `pulumi:"body"`
	// The Server ID of the Transfer Server (e.g. `s-12345678`)
	ServerId pulumi.StringOutput `pulumi:"serverId"`
	// The name of the user account that is assigned to one or more servers.
	UserName pulumi.StringOutput `pulumi:"userName"`
}

Provides a AWS Transfer User SSH Key resource.

```go package main

import (

"fmt"

"github.com/pulumi/pulumi-aws/sdk/v3/go/aws/iam"
"github.com/pulumi/pulumi-aws/sdk/v3/go/aws/transfer"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		fooServer, err := transfer.NewServer(ctx, "fooServer", &transfer.ServerArgs{
			IdentityProviderType: pulumi.String("SERVICE_MANAGED"),
			Tags: pulumi.StringMap{
				"NAME": pulumi.String("tf-acc-test-transfer-server"),
			},
		})
		if err != nil {
			return err
		}
		fooRole, err := iam.NewRole(ctx, "fooRole", &iam.RoleArgs{
			AssumeRolePolicy: pulumi.String(fmt.Sprintf("%v%v%v%v%v%v%v%v%v%v%v%v", "{\n", "	\"Version\": \"2012-10-17\",\n", "	\"Statement\": [\n", "		{\n", "		\"Effect\": \"Allow\",\n", "		\"Principal\": {\n", "			\"Service\": \"transfer.amazonaws.com\"\n", "		},\n", "		\"Action\": \"sts:AssumeRole\"\n", "		}\n", "	]\n", "}\n")),
		})
		if err != nil {
			return err
		}
		_, err = iam.NewRolePolicy(ctx, "fooRolePolicy", &iam.RolePolicyArgs{
			Role: fooRole.ID(),
			Policy: pulumi.String(fmt.Sprintf("%v%v%v%v%v%v%v%v%v%v%v%v%v", "{\n", "	\"Version\": \"2012-10-17\",\n", "	\"Statement\": [\n", "		{\n", "			\"Sid\": \"AllowFullAccesstoS3\",\n", "			\"Effect\": \"Allow\",\n", "			\"Action\": [\n", "				\"s3:*\"\n", "			],\n", "			\"Resource\": \"*\"\n", "		}\n", "	]\n", "}\n")),
		})
		if err != nil {
			return err
		}
		fooUser, err := transfer.NewUser(ctx, "fooUser", &transfer.UserArgs{
			ServerId: fooServer.ID(),
			UserName: pulumi.String("tftestuser"),
			Role:     fooRole.Arn,
			Tags: pulumi.StringMap{
				"NAME": pulumi.String("tftestuser"),
			},
		})
		if err != nil {
			return err
		}
		_, err = transfer.NewSshKey(ctx, "fooSshKey", &transfer.SshKeyArgs{
			ServerId: fooServer.ID(),
			UserName: fooUser.UserName,
			Body:     pulumi.String("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD3F6tyPEFEzV0LX3X8BsXdMsQz1x2cEikKDEY0aIj41qgxMCP/iteneqXSIFZBp5vizPvaoIR3Um9xK7PGoW8giupGn+EPuxIA4cDM4vzOqOkiMPhz5XK0whEjkVzTo4+S0puvDZuwIsdiW9mxhJc7tgBNL0cYlWSYVkz4G/fslNfRPW5mYAM49f4fhtxPb5ok4Q2Lg9dPKVHO/Bgeu5woMc7RY0p1ej6D4CKFE6lymSDJpW0YHX/wqE9+cfEauh7xZcG0q9t2ta6F6fmX0agvpFyZo8aFbXeUBr7osSCJNgvavWbM/06niWrOvYX2xwWdhXmXSrbX8ZbabVohBK41 example@example.com"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

func GetSshKey

func GetSshKey(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *SshKeyState, opts ...pulumi.ResourceOption) (*SshKey, error)

GetSshKey gets an existing SshKey resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewSshKey

func NewSshKey(ctx *pulumi.Context,
	name string, args *SshKeyArgs, opts ...pulumi.ResourceOption) (*SshKey, error)

NewSshKey registers a new resource with the given unique name, arguments, and options.

type SshKeyArgs

type SshKeyArgs struct {
	// The public key portion of an SSH key pair.
	Body pulumi.StringInput
	// The Server ID of the Transfer Server (e.g. `s-12345678`)
	ServerId pulumi.StringInput
	// The name of the user account that is assigned to one or more servers.
	UserName pulumi.StringInput
}

The set of arguments for constructing a SshKey resource.

func (SshKeyArgs) ElementType

func (SshKeyArgs) ElementType() reflect.Type

type SshKeyState

type SshKeyState struct {
	// The public key portion of an SSH key pair.
	Body pulumi.StringPtrInput
	// The Server ID of the Transfer Server (e.g. `s-12345678`)
	ServerId pulumi.StringPtrInput
	// The name of the user account that is assigned to one or more servers.
	UserName pulumi.StringPtrInput
}

func (SshKeyState) ElementType

func (SshKeyState) ElementType() reflect.Type

type User

type User struct {
	pulumi.CustomResourceState

	// Amazon Resource Name (ARN) of Transfer User
	Arn pulumi.StringOutput `pulumi:"arn"`
	// 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`.
	HomeDirectory pulumi.StringPtrOutput `pulumi:"homeDirectory"`
	// 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.
	Policy pulumi.StringPtrOutput `pulumi:"policy"`
	// Amazon Resource Name (ARN) of an IAM role that allows the service to controls your user’s access to your Amazon S3 bucket.
	Role pulumi.StringOutput `pulumi:"role"`
	// The Server ID of the Transfer Server (e.g. `s-12345678`)
	ServerId pulumi.StringOutput `pulumi:"serverId"`
	// A map of tags to assign to the resource.
	Tags pulumi.StringMapOutput `pulumi:"tags"`
	// The name used for log in to your SFTP server.
	UserName pulumi.StringOutput `pulumi:"userName"`
}

Provides a AWS Transfer User resource. Managing SSH keys can be accomplished with the `transfer.SshKey` resource.

```go package main

import (

"fmt"

"github.com/pulumi/pulumi-aws/sdk/v3/go/aws/iam"
"github.com/pulumi/pulumi-aws/sdk/v3/go/aws/transfer"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		fooServer, err := transfer.NewServer(ctx, "fooServer", &transfer.ServerArgs{
			IdentityProviderType: pulumi.String("SERVICE_MANAGED"),
			Tags: pulumi.StringMap{
				"NAME": pulumi.String("tf-acc-test-transfer-server"),
			},
		})
		if err != nil {
			return err
		}
		fooRole, err := iam.NewRole(ctx, "fooRole", &iam.RoleArgs{
			AssumeRolePolicy: pulumi.String(fmt.Sprintf("%v%v%v%v%v%v%v%v%v%v%v%v", "{\n", "	\"Version\": \"2012-10-17\",\n", "	\"Statement\": [\n", "		{\n", "		\"Effect\": \"Allow\",\n", "		\"Principal\": {\n", "			\"Service\": \"transfer.amazonaws.com\"\n", "		},\n", "		\"Action\": \"sts:AssumeRole\"\n", "		}\n", "	]\n", "}\n")),
		})
		if err != nil {
			return err
		}
		_, err = iam.NewRolePolicy(ctx, "fooRolePolicy", &iam.RolePolicyArgs{
			Role: fooRole.ID(),
			Policy: pulumi.String(fmt.Sprintf("%v%v%v%v%v%v%v%v%v%v%v%v%v", "{\n", "	\"Version\": \"2012-10-17\",\n", "	\"Statement\": [\n", "		{\n", "			\"Sid\": \"AllowFullAccesstoS3\",\n", "			\"Effect\": \"Allow\",\n", "			\"Action\": [\n", "				\"s3:*\"\n", "			],\n", "			\"Resource\": \"*\"\n", "		}\n", "	]\n", "}\n")),
		})
		if err != nil {
			return err
		}
		_, err = transfer.NewUser(ctx, "fooUser", &transfer.UserArgs{
			ServerId: fooServer.ID(),
			UserName: pulumi.String("tftestuser"),
			Role:     fooRole.Arn,
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

func GetUser

func GetUser(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *UserState, opts ...pulumi.ResourceOption) (*User, error)

GetUser gets an existing User resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewUser

func NewUser(ctx *pulumi.Context,
	name string, args *UserArgs, opts ...pulumi.ResourceOption) (*User, error)

NewUser registers a new resource with the given unique name, arguments, and options.

type UserArgs

type UserArgs struct {
	// 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`.
	HomeDirectory pulumi.StringPtrInput
	// 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.
	Policy pulumi.StringPtrInput
	// Amazon Resource Name (ARN) of an IAM role that allows the service to controls your user’s access to your Amazon S3 bucket.
	Role pulumi.StringInput
	// The Server ID of the Transfer Server (e.g. `s-12345678`)
	ServerId pulumi.StringInput
	// A map of tags to assign to the resource.
	Tags pulumi.StringMapInput
	// The name used for log in to your SFTP server.
	UserName pulumi.StringInput
}

The set of arguments for constructing a User resource.

func (UserArgs) ElementType

func (UserArgs) ElementType() reflect.Type

type UserState

type UserState struct {
	// Amazon Resource Name (ARN) of Transfer User
	Arn pulumi.StringPtrInput
	// 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`.
	HomeDirectory pulumi.StringPtrInput
	// 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.
	Policy pulumi.StringPtrInput
	// Amazon Resource Name (ARN) of an IAM role that allows the service to controls your user’s access to your Amazon S3 bucket.
	Role pulumi.StringPtrInput
	// The Server ID of the Transfer Server (e.g. `s-12345678`)
	ServerId pulumi.StringPtrInput
	// A map of tags to assign to the resource.
	Tags pulumi.StringMapInput
	// The name used for log in to your SFTP server.
	UserName pulumi.StringPtrInput
}

func (UserState) ElementType

func (UserState) ElementType() reflect.Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL