S3Location

class S3Location : KotlinCustomResource

Manages an S3 Location within AWS DataSync.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.datasync.S3Location("example", {
s3BucketArn: exampleAwsS3Bucket.arn,
subdirectory: "/example/prefix",
s3Config: {
bucketAccessRoleArn: exampleAwsIamRole.arn,
},
});
import pulumi
import pulumi_aws as aws
example = aws.datasync.S3Location("example",
s3_bucket_arn=example_aws_s3_bucket["arn"],
subdirectory="/example/prefix",
s3_config=aws.datasync.S3LocationS3ConfigArgs(
bucket_access_role_arn=example_aws_iam_role["arn"],
))
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.DataSync.S3Location("example", new()
{
S3BucketArn = exampleAwsS3Bucket.Arn,
Subdirectory = "/example/prefix",
S3Config = new Aws.DataSync.Inputs.S3LocationS3ConfigArgs
{
BucketAccessRoleArn = exampleAwsIamRole.Arn,
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/datasync"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := datasync.NewS3Location(ctx, "example", &datasync.S3LocationArgs{
S3BucketArn: pulumi.Any(exampleAwsS3Bucket.Arn),
Subdirectory: pulumi.String("/example/prefix"),
S3Config: &datasync.S3LocationS3ConfigArgs{
BucketAccessRoleArn: pulumi.Any(exampleAwsIamRole.Arn),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.datasync.S3Location;
import com.pulumi.aws.datasync.S3LocationArgs;
import com.pulumi.aws.datasync.inputs.S3LocationS3ConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new S3Location("example", S3LocationArgs.builder()
.s3BucketArn(exampleAwsS3Bucket.arn())
.subdirectory("/example/prefix")
.s3Config(S3LocationS3ConfigArgs.builder()
.bucketAccessRoleArn(exampleAwsIamRole.arn())
.build())
.build());
}
}
resources:
example:
type: aws:datasync:S3Location
properties:
s3BucketArn: ${exampleAwsS3Bucket.arn}
subdirectory: /example/prefix
s3Config:
bucketAccessRoleArn: ${exampleAwsIamRole.arn}

Import

Using pulumi import, import aws_datasync_location_s3 using the DataSync Task Amazon Resource Name (ARN). For example:

$ pulumi import aws:datasync/s3Location:S3Location example arn:aws:datasync:us-east-1:123456789012:location/loc-12345678901234567

Properties

Link copied to clipboard
val agentArns: Output<List<String>>?

A list of DataSync Agent ARNs with which this location will be associated.

Link copied to clipboard
val arn: Output<String>

Amazon Resource Name (ARN) of the DataSync Location.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val s3BucketArn: Output<String>

Amazon Resource Name (ARN) of the S3 Bucket.

Link copied to clipboard

Configuration block containing information for connecting to S3.

Link copied to clipboard
val s3StorageClass: Output<String>

The Amazon S3 storage class that you want to store your files in when this location is used as a task destination. Valid values

Link copied to clipboard
val subdirectory: Output<String>

Prefix to perform actions as source or destination.

Link copied to clipboard
val tags: Output<Map<String, String>>?

Key-value pairs of resource tags to assign to the DataSync Location. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Link copied to clipboard
val tagsAll: Output<Map<String, String>>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Link copied to clipboard
val uri: Output<String>
Link copied to clipboard
val urn: Output<String>