import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages a revision of an ECS daemon task definition for use with daemon scheduling strategy. * * ## Example Usage * * ### Basic Example * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.ecs.DaemonTaskDefinition("example", { * containerDefinitions: [{ * name: "app", * image: "nginx:latest", * cpu: 256, * memory: 512, * essential: true, * }], * family: "my-daemon-service", * cpu: "512", * memory: "1024", * }); * ``` * * ### With IAM Roles * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const taskExecution = new aws.iam.Role("task_execution", { * name: "daemon-task-execution-role", * assumeRolePolicy: JSON.stringify({ * Version: "2012-10-17", * Statement: [{ * Action: "sts:AssumeRole", * Effect: "Allow", * Principal: { * Service: "ecs-tasks.amazonaws.com", * }, * }], * }), * }); * const task = new aws.iam.Role("task", { * name: "daemon-task-role", * assumeRolePolicy: JSON.stringify({ * Version: "2012-10-17", * Statement: [{ * Action: "sts:AssumeRole", * Effect: "Allow", * Principal: { * Service: "ecs-tasks.amazonaws.com", * }, * }], * }), * }); * const example = new aws.ecs.DaemonTaskDefinition("example", { * containerDefinitions: [{ * name: "app", * image: "nginx:latest", * cpu: 256, * memory: 512, * essential: true, * }], * family: "my-daemon-service", * executionRoleArn: taskExecution.arn, * taskRoleArn: task.arn, * cpu: "512", * memory: "1024", * }); * ``` * * ### With Volumes * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.ecs.DaemonTaskDefinition("example", { * containerDefinitions: [{ * name: "app", * image: "nginx:latest", * cpu: 256, * memory: 512, * essential: true, * }], * volumes: [ * { * hosts: [{ * sourcePath: "/data", * }], * name: "data-volume", * }, * { * hosts: [{ * sourcePath: "/var/log", * }], * name: "logs-volume", * }, * ], * family: "my-daemon-service", * cpu: "512", * memory: "1024", * }); * ``` * * ### With Multiple Containers * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.ecs.DaemonTaskDefinition("example", { * containerDefinitions: [ * { * name: "app", * image: "my-app:latest", * cpu: 256, * memory: 512, * essential: true, * }, * { * name: "sidecar", * image: "datadog/agent:latest", * cpu: 128, * memory: 256, * essential: false, * }, * ], * family: "my-daemon-service", * cpu: "512", * memory: "1024", * }); * ``` * * ## Import * * ### Identity Schema * * #### Required * * * `arn` (String) ARN of the ECS Daemon Task Definition. * * Using `pulumi import`, import ECS Daemon Task Definitions using their ARNs. For example: * * ```sh * $ pulumi import aws:ecs/daemonTaskDefinition:DaemonTaskDefinition example arn:aws:ecs:us-east-1:012345678910:daemon-task-definition/mydaemonfamily:123 * ``` */ export declare class DaemonTaskDefinition extends pulumi.CustomResource { /** * Get an existing DaemonTaskDefinition 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, state?: DaemonTaskDefinitionState, opts?: pulumi.CustomResourceOptions): DaemonTaskDefinition; /** * Returns true if the given object is an instance of DaemonTaskDefinition. 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 DaemonTaskDefinition; /** * Full ARN of the Daemon Task Definition (including both `family` and `revision`). */ readonly arn: pulumi.Output; /** * One or more container definition blocks. Detailed below. */ readonly containerDefinitions: pulumi.Output; /** * Number of CPU units used by the task. */ readonly cpu: pulumi.Output; /** * ARN of the task execution role that the Amazon ECS container agent and the Docker daemon can assume. */ readonly executionRoleArn: pulumi.Output; /** * Unique name for your daemon task definition. * * The following arguments are optional: */ readonly family: pulumi.Output; /** * Amount (in MiB) of memory used by the task. */ readonly memory: pulumi.Output; /** * 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; /** * Revision of the task in a particular family. */ readonly revision: pulumi.Output; /** * Status of the daemon task definition. */ readonly status: pulumi.Output; /** * Key-value map of resource tags. 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>; /** * Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ readonly tagsAll: pulumi.Output<{ [key: string]: string; }>; /** * ARN of IAM role that allows your Amazon ECS container task to make calls to other AWS services. */ readonly taskRoleArn: pulumi.Output; /** * Repeatable configuration block for volumes that containers in your task may use. Detailed below. */ readonly volumes: pulumi.Output; /** * Create a DaemonTaskDefinition 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: DaemonTaskDefinitionArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering DaemonTaskDefinition resources. */ export interface DaemonTaskDefinitionState { /** * Full ARN of the Daemon Task Definition (including both `family` and `revision`). */ arn?: pulumi.Input; /** * One or more container definition blocks. Detailed below. */ containerDefinitions?: pulumi.Input[] | undefined>; /** * Number of CPU units used by the task. */ cpu?: pulumi.Input; /** * ARN of the task execution role that the Amazon ECS container agent and the Docker daemon can assume. */ executionRoleArn?: pulumi.Input; /** * Unique name for your daemon task definition. * * The following arguments are optional: */ family?: pulumi.Input; /** * Amount (in MiB) of memory used by the task. */ memory?: pulumi.Input; /** * 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; /** * Revision of the task in a particular family. */ revision?: pulumi.Input; /** * Status of the daemon task definition. */ status?: pulumi.Input; /** * Key-value map of resource tags. 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; } | undefined>; /** * Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ tagsAll?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * ARN of IAM role that allows your Amazon ECS container task to make calls to other AWS services. */ taskRoleArn?: pulumi.Input; /** * Repeatable configuration block for volumes that containers in your task may use. Detailed below. */ volumes?: pulumi.Input[] | undefined>; } /** * The set of arguments for constructing a DaemonTaskDefinition resource. */ export interface DaemonTaskDefinitionArgs { /** * One or more container definition blocks. Detailed below. */ containerDefinitions: pulumi.Input[]>; /** * Number of CPU units used by the task. */ cpu?: pulumi.Input; /** * ARN of the task execution role that the Amazon ECS container agent and the Docker daemon can assume. */ executionRoleArn?: pulumi.Input; /** * Unique name for your daemon task definition. * * The following arguments are optional: */ family: pulumi.Input; /** * Amount (in MiB) of memory used by the task. */ memory?: pulumi.Input; /** * 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; /** * Key-value map of resource tags. 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; } | undefined>; /** * ARN of IAM role that allows your Amazon ECS container task to make calls to other AWS services. */ taskRoleArn?: pulumi.Input; /** * Repeatable configuration block for volumes that containers in your task may use. Detailed below. */ volumes?: pulumi.Input[] | undefined>; } //# sourceMappingURL=daemonTaskDefinition.d.ts.map