S3Location
Manages an S3 Location within AWS DataSync.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = new Aws.DataSync.S3Location("example", new Aws.DataSync.S3LocationArgs
{
S3BucketArn = aws_s3_bucket.Example.Arn,
S3Config = new Aws.DataSync.Inputs.S3LocationS3ConfigArgs
{
BucketAccessRoleArn = aws_iam_role.Example.Arn,
},
Subdirectory = "/example/prefix",
});
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/datasync"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := datasync.NewS3Location(ctx, "example", &datasync.S3LocationArgs{
S3BucketArn: pulumi.String(aws_s3_bucket.Example.Arn),
S3Config: &datasync.S3LocationS3ConfigArgs{
BucketAccessRoleArn: pulumi.String(aws_iam_role.Example.Arn),
},
Subdirectory: pulumi.String("/example/prefix"),
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
example = aws.datasync.S3Location("example",
s3_bucket_arn=aws_s3_bucket["example"]["arn"],
s3_config={
"bucketAccessRoleArn": aws_iam_role["example"]["arn"],
},
subdirectory="/example/prefix")import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.datasync.S3Location("example", {
s3BucketArn: aws_s3_bucket_example.arn,
s3Config: {
bucketAccessRoleArn: aws_iam_role_example.arn,
},
subdirectory: "/example/prefix",
});Create a S3Location Resource
new S3Location(name: string, args: S3LocationArgs, opts?: CustomResourceOptions);def S3Location(resource_name, opts=None, s3_bucket_arn=None, s3_config=None, subdirectory=None, tags=None, __props__=None);func NewS3Location(ctx *Context, name string, args S3LocationArgs, opts ...ResourceOption) (*S3Location, error)public S3Location(string name, S3LocationArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args S3LocationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args S3LocationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args S3LocationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
S3Location Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The S3Location resource accepts the following input properties:
- S3Bucket
Arn string Amazon Resource Name (ARN) of the S3 Bucket.
- S3Config
S3Location
S3Config Args Configuration block containing information for connecting to S3.
- Subdirectory string
Prefix to perform actions as source or destination.
- Dictionary<string, string>
Key-value pairs of resource tags to assign to the DataSync Location.
- S3Bucket
Arn string Amazon Resource Name (ARN) of the S3 Bucket.
- S3Config
S3Location
S3Config Configuration block containing information for connecting to S3.
- Subdirectory string
Prefix to perform actions as source or destination.
- map[string]string
Key-value pairs of resource tags to assign to the DataSync Location.
- s3Bucket
Arn ARN Amazon Resource Name (ARN) of the S3 Bucket.
- s3Config
S3Location
S3Config Configuration block containing information for connecting to S3.
- subdirectory string
Prefix to perform actions as source or destination.
- {[key: string]: string}
Key-value pairs of resource tags to assign to the DataSync Location.
- s3_
bucket_ strarn Amazon Resource Name (ARN) of the S3 Bucket.
- s3_
config Dict[S3LocationS3Config] Configuration block containing information for connecting to S3.
- subdirectory str
Prefix to perform actions as source or destination.
- Dict[str, str]
Key-value pairs of resource tags to assign to the DataSync Location.
Outputs
All input properties are implicitly available as output properties. Additionally, the S3Location resource produces the following output properties:
Look up an Existing S3Location Resource
Get an existing S3Location resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: S3LocationState, opts?: CustomResourceOptions): S3Locationstatic get(resource_name, id, opts=None, arn=None, s3_bucket_arn=None, s3_config=None, subdirectory=None, tags=None, uri=None, __props__=None);func GetS3Location(ctx *Context, name string, id IDInput, state *S3LocationState, opts ...ResourceOption) (*S3Location, error)public static S3Location Get(string name, Input<string> id, S3LocationState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Arn string
Amazon Resource Name (ARN) of the DataSync Location.
- S3Bucket
Arn string Amazon Resource Name (ARN) of the S3 Bucket.
- S3Config
S3Location
S3Config Args Configuration block containing information for connecting to S3.
- Subdirectory string
Prefix to perform actions as source or destination.
- Dictionary<string, string>
Key-value pairs of resource tags to assign to the DataSync Location.
- Uri string
- Arn string
Amazon Resource Name (ARN) of the DataSync Location.
- S3Bucket
Arn string Amazon Resource Name (ARN) of the S3 Bucket.
- S3Config
S3Location
S3Config Configuration block containing information for connecting to S3.
- Subdirectory string
Prefix to perform actions as source or destination.
- map[string]string
Key-value pairs of resource tags to assign to the DataSync Location.
- Uri string
- arn string
Amazon Resource Name (ARN) of the DataSync Location.
- s3Bucket
Arn ARN Amazon Resource Name (ARN) of the S3 Bucket.
- s3Config
S3Location
S3Config Configuration block containing information for connecting to S3.
- subdirectory string
Prefix to perform actions as source or destination.
- {[key: string]: string}
Key-value pairs of resource tags to assign to the DataSync Location.
- uri string
- arn str
Amazon Resource Name (ARN) of the DataSync Location.
- s3_
bucket_ strarn Amazon Resource Name (ARN) of the S3 Bucket.
- s3_
config Dict[S3LocationS3Config] Configuration block containing information for connecting to S3.
- subdirectory str
Prefix to perform actions as source or destination.
- Dict[str, str]
Key-value pairs of resource tags to assign to the DataSync Location.
- uri str
Supporting Types
S3LocationS3Config
- Bucket
Access stringRole Arn Amazon Resource Names (ARN) of the IAM Role used to connect to the S3 Bucket.
- Bucket
Access stringRole Arn Amazon Resource Names (ARN) of the IAM Role used to connect to the S3 Bucket.
- bucket
Access stringRole Arn Amazon Resource Names (ARN) of the IAM Role used to connect to the S3 Bucket.
- bucket
Access strRole Arn Amazon Resource Names (ARN) of the IAM Role used to connect to the S3 Bucket.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.