import * as core from "@terrascript/core"; export interface EvaluateOnExitArgs extends core.SchemaArgs { action: string | core.StringOut; onExitCode?: string | core.StringOut; onReason?: string | core.StringOut; onStatusReason?: string | core.StringOut; } export class EvaluateOnExit extends core.Schema { @core.attr(String) public action!: string | core.StringOut; @core.attr(String) public onExitCode?: string | core.StringOut; @core.attr(String) public onReason?: string | core.StringOut; @core.attr(String) public onStatusReason?: string | core.StringOut; } export interface RetryStrategyArgs extends core.SchemaArgs { attempts?: number | core.NumberOut; evaluateOnExit?: core.Array | core.ArrayOut; } export class RetryStrategy extends core.Schema { @core.attr(Number) public attempts?: number | core.NumberOut; @core.attr(EvaluateOnExit, { kind: "array" }) public evaluateOnExit?: | core.Array | core.ArrayOut; } export interface TimeoutArgs extends core.SchemaArgs { attemptDurationSeconds?: number | core.NumberOut; } export class Timeout extends core.Schema { @core.attr(Number) public attemptDurationSeconds?: number | core.NumberOut; } export interface JobDefinitionArgs extends core.ResourceArgs { /** * (Optional) A valid [container properties](http://docs.aws.amazon.com/batch/latest/APIReference/API_R * egisterJobDefinition.html) */ containerProperties?: string | core.StringOut; /** * (Required) Specifies the name of the job definition. */ name: string | core.StringOut; /** * (Optional) Specifies the parameter substitution placeholders to set in the job definition. */ parameters?: core.Map | core.MapOut; /** * (Optional) The platform capabilities required by the job definition. If no value is specified, it de * faults to `EC2`. To run the job on Fargate resources, specify `FARGATE`. */ platformCapabilities?: core.Array | core.ArrayOut; /** * (Optional) Specifies whether to propagate the tags from the job definition to the corresponding Amaz * on ECS task. Default is `false`. */ propagateTags?: boolean | core.BooleanOut; /** * (Optional) Specifies the retry strategy to use for failed jobs that are submitted with this job defi * nition. */ retryStrategy?: RetryStrategy; /** * (Optional) Key-value map of resource tags. If configured with a provider [`default_tags` configurati * on block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-configurati * on-block) present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block). */ tagsAll?: core.Map | core.MapOut; /** * (Optional) Specifies the timeout for jobs so that if a job runs longer, AWS Batch terminates the job * . Maximum number of `timeout` is `1`. Defined below. */ timeout?: Timeout; /** * (Required) The type of job definition. Must be `container`. */ type: string | core.StringOut; } export class JobDefinition extends core.Resource { /** * The Amazon Resource Name of the job definition. */ @core.attr(String, { computed: true }) public arn!: string | core.StringOut; /** * (Optional) A valid [container properties](http://docs.aws.amazon.com/batch/latest/APIReference/API_R * egisterJobDefinition.html) */ @core.attr(String) public containerProperties?: string | core.StringOut; @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (Required) Specifies the name of the job definition. */ @core.attr(String) public name!: string | core.StringOut; /** * (Optional) Specifies the parameter substitution placeholders to set in the job definition. */ @core.attr(String, { kind: "map" }) public parameters?: core.Map | core.MapOut; /** * (Optional) The platform capabilities required by the job definition. If no value is specified, it de * faults to `EC2`. To run the job on Fargate resources, specify `FARGATE`. */ @core.attr(String, { kind: "array" }) public platformCapabilities?: | core.Array | core.ArrayOut; /** * (Optional) Specifies whether to propagate the tags from the job definition to the corresponding Amaz * on ECS task. Default is `false`. */ @core.attr(Boolean) public propagateTags?: boolean | core.BooleanOut; /** * (Optional) Specifies the retry strategy to use for failed jobs that are submitted with this job defi * nition. */ @core.attr(RetryStrategy) public retryStrategy?: RetryStrategy; /** * The revision of the job definition. */ @core.attr(Number, { computed: true }) public revision!: number | core.NumberOut; /** * (Optional) Key-value map of resource tags. If configured with a provider [`default_tags` configurati * on block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-configurati * on-block) present, tags with matching keys will overwrite those defined at the provider-level. */ @core.attr(String, { kind: "map" }) public tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block). */ @core.attr(String, { computed: true, kind: "map" }) public tagsAll?: core.Map | core.MapOut; /** * (Optional) Specifies the timeout for jobs so that if a job runs longer, AWS Batch terminates the job * . Maximum number of `timeout` is `1`. Defined below. */ @core.attr(Timeout) public timeout?: Timeout; /** * (Required) The type of job definition. Must be `container`. */ @core.attr(String) public type!: string | core.StringOut; constructor(name: string, args?: JobDefinitionArgs) { super(name, "aws_batch_job_definition", args); } public override getNamespace(): string { return "aws_batch"; } }