@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
299 lines (298 loc) • 12.4 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* Manages an AWS DataSync Task, which represents a configuration for synchronization. Starting an execution of these DataSync Tasks (actually synchronizing files) is performed outside of this resource.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.datasync.Task("example", {
* destinationLocationArn: destination.arn,
* name: "example",
* sourceLocationArn: source.arn,
* options: {
* bytesPerSecond: -1,
* },
* });
* ```
*
* ### With Scheduling
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.datasync.Task("example", {
* destinationLocationArn: destination.arn,
* name: "example",
* sourceLocationArn: source.arn,
* schedule: {
* scheduleExpression: "cron(0 12 ? * SUN,WED *)",
* },
* });
* ```
*
* ### With Filtering
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.datasync.Task("example", {
* destinationLocationArn: destination.arn,
* name: "example",
* sourceLocationArn: source.arn,
* excludes: {
* filterType: "SIMPLE_PATTERN",
* value: "/folder1|/folder2",
* },
* includes: {
* filterType: "SIMPLE_PATTERN",
* value: "/folder1|/folder2",
* },
* });
* ```
*
* ### With Enhanced Task Mode
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.datasync.Task("example", {
* destinationLocationArn: destination.arn,
* name: "example",
* sourceLocationArn: source.arn,
* taskMode: "ENHANCED",
* options: {
* gid: "NONE",
* posixPermissions: "NONE",
* uid: "NONE",
* verifyMode: "ONLY_FILES_TRANSFERRED",
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import `aws_datasync_task` using the DataSync Task Amazon Resource Name (ARN). For example:
*
* ```sh
* $ pulumi import aws:datasync/task:Task example arn:aws:datasync:us-east-1:123456789012:task/task-12345678901234567
* ```
*/
export declare class Task extends pulumi.CustomResource {
/**
* Get an existing Task resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: TaskState, opts?: pulumi.CustomResourceOptions): Task;
/**
* Returns true if the given object is an instance of Task. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is Task;
/**
* Amazon Resource Name (ARN) of the DataSync Task.
*/
readonly arn: pulumi.Output<string>;
/**
* Amazon Resource Name (ARN) of the CloudWatch Log Group that is used to monitor and log events in the sync task.
*/
readonly cloudwatchLogGroupArn: pulumi.Output<string | undefined>;
/**
* Amazon Resource Name (ARN) of destination DataSync Location.
*/
readonly destinationLocationArn: pulumi.Output<string>;
/**
* Filter rules that determines which files to exclude from a task.
*/
readonly excludes: pulumi.Output<outputs.datasync.TaskExcludes | undefined>;
/**
* Filter rules that determines which files to include in a task.
*/
readonly includes: pulumi.Output<outputs.datasync.TaskIncludes | undefined>;
/**
* Name of the DataSync Task.
*/
readonly name: pulumi.Output<string>;
/**
* Configuration block containing option that controls the default behavior when you start an execution of this DataSync Task. For each individual task execution, you can override these options by specifying an overriding configuration in those executions.
*/
readonly options: pulumi.Output<outputs.datasync.TaskOptions | undefined>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
readonly region: pulumi.Output<string>;
/**
* Specifies a schedule used to periodically transfer files from a source to a destination location.
*/
readonly schedule: pulumi.Output<outputs.datasync.TaskSchedule | undefined>;
/**
* Amazon Resource Name (ARN) of source DataSync Location.
*/
readonly sourceLocationArn: pulumi.Output<string>;
/**
* Key-value pairs of resource tags to assign to the DataSync Task. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
readonly tags: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
*/
readonly tagsAll: pulumi.Output<{
[key: string]: string;
}>;
/**
* One of the following task modes for your data transfer:
* * `BASIC` (default) - Transfer files or objects between Amazon Web Services storage and on-premises, edge, or other cloud storage.
* * `ENHANCED` - Transfer virtually unlimited numbers of objects with enhanced metrics, more detailed logs, and higher performance than Basic mode. Currently available for transfers between Amazon S3 locations.
*/
readonly taskMode: pulumi.Output<string>;
/**
* Configuration block containing the configuration of a DataSync Task Report. See `taskReportConfig` below.
*/
readonly taskReportConfig: pulumi.Output<outputs.datasync.TaskTaskReportConfig | undefined>;
/**
* Create a Task resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: TaskArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Task resources.
*/
export interface TaskState {
/**
* Amazon Resource Name (ARN) of the DataSync Task.
*/
arn?: pulumi.Input<string>;
/**
* Amazon Resource Name (ARN) of the CloudWatch Log Group that is used to monitor and log events in the sync task.
*/
cloudwatchLogGroupArn?: pulumi.Input<string>;
/**
* Amazon Resource Name (ARN) of destination DataSync Location.
*/
destinationLocationArn?: pulumi.Input<string>;
/**
* Filter rules that determines which files to exclude from a task.
*/
excludes?: pulumi.Input<inputs.datasync.TaskExcludes>;
/**
* Filter rules that determines which files to include in a task.
*/
includes?: pulumi.Input<inputs.datasync.TaskIncludes>;
/**
* Name of the DataSync Task.
*/
name?: pulumi.Input<string>;
/**
* Configuration block containing option that controls the default behavior when you start an execution of this DataSync Task. For each individual task execution, you can override these options by specifying an overriding configuration in those executions.
*/
options?: pulumi.Input<inputs.datasync.TaskOptions>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
/**
* Specifies a schedule used to periodically transfer files from a source to a destination location.
*/
schedule?: pulumi.Input<inputs.datasync.TaskSchedule>;
/**
* Amazon Resource Name (ARN) of source DataSync Location.
*/
sourceLocationArn?: pulumi.Input<string>;
/**
* Key-value pairs of resource tags to assign to the DataSync Task. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
*/
tagsAll?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* One of the following task modes for your data transfer:
* * `BASIC` (default) - Transfer files or objects between Amazon Web Services storage and on-premises, edge, or other cloud storage.
* * `ENHANCED` - Transfer virtually unlimited numbers of objects with enhanced metrics, more detailed logs, and higher performance than Basic mode. Currently available for transfers between Amazon S3 locations.
*/
taskMode?: pulumi.Input<string>;
/**
* Configuration block containing the configuration of a DataSync Task Report. See `taskReportConfig` below.
*/
taskReportConfig?: pulumi.Input<inputs.datasync.TaskTaskReportConfig>;
}
/**
* The set of arguments for constructing a Task resource.
*/
export interface TaskArgs {
/**
* Amazon Resource Name (ARN) of the CloudWatch Log Group that is used to monitor and log events in the sync task.
*/
cloudwatchLogGroupArn?: pulumi.Input<string>;
/**
* Amazon Resource Name (ARN) of destination DataSync Location.
*/
destinationLocationArn: pulumi.Input<string>;
/**
* Filter rules that determines which files to exclude from a task.
*/
excludes?: pulumi.Input<inputs.datasync.TaskExcludes>;
/**
* Filter rules that determines which files to include in a task.
*/
includes?: pulumi.Input<inputs.datasync.TaskIncludes>;
/**
* Name of the DataSync Task.
*/
name?: pulumi.Input<string>;
/**
* Configuration block containing option that controls the default behavior when you start an execution of this DataSync Task. For each individual task execution, you can override these options by specifying an overriding configuration in those executions.
*/
options?: pulumi.Input<inputs.datasync.TaskOptions>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
/**
* Specifies a schedule used to periodically transfer files from a source to a destination location.
*/
schedule?: pulumi.Input<inputs.datasync.TaskSchedule>;
/**
* Amazon Resource Name (ARN) of source DataSync Location.
*/
sourceLocationArn: pulumi.Input<string>;
/**
* Key-value pairs of resource tags to assign to the DataSync Task. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* One of the following task modes for your data transfer:
* * `BASIC` (default) - Transfer files or objects between Amazon Web Services storage and on-premises, edge, or other cloud storage.
* * `ENHANCED` - Transfer virtually unlimited numbers of objects with enhanced metrics, more detailed logs, and higher performance than Basic mode. Currently available for transfers between Amazon S3 locations.
*/
taskMode?: pulumi.Input<string>;
/**
* Configuration block containing the configuration of a DataSync Task Report. See `taskReportConfig` below.
*/
taskReportConfig?: pulumi.Input<inputs.datasync.TaskTaskReportConfig>;
}