github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/batch/jobDefinition.go (about)

     1  // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
     2  // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
     3  
     4  package batch
     5  
     6  import (
     7  	"context"
     8  	"reflect"
     9  
    10  	"errors"
    11  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    12  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    13  )
    14  
    15  // Provides a Batch Job Definition resource.
    16  //
    17  // ## Example Usage
    18  //
    19  // ### Job definition of type container
    20  //
    21  // <!--Start PulumiCodeChooser -->
    22  // ```go
    23  // package main
    24  //
    25  // import (
    26  //
    27  //	"encoding/json"
    28  //
    29  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/batch"
    30  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    31  //
    32  // )
    33  //
    34  //	func main() {
    35  //		pulumi.Run(func(ctx *pulumi.Context) error {
    36  //			tmpJSON0, err := json.Marshal(map[string]interface{}{
    37  //				"command": []string{
    38  //					"ls",
    39  //					"-la",
    40  //				},
    41  //				"image": "busybox",
    42  //				"resourceRequirements": []map[string]interface{}{
    43  //					map[string]interface{}{
    44  //						"type":  "VCPU",
    45  //						"value": "0.25",
    46  //					},
    47  //					map[string]interface{}{
    48  //						"type":  "MEMORY",
    49  //						"value": "512",
    50  //					},
    51  //				},
    52  //				"volumes": []map[string]interface{}{
    53  //					map[string]interface{}{
    54  //						"host": map[string]interface{}{
    55  //							"sourcePath": "/tmp",
    56  //						},
    57  //						"name": "tmp",
    58  //					},
    59  //				},
    60  //				"environment": []map[string]interface{}{
    61  //					map[string]interface{}{
    62  //						"name":  "VARNAME",
    63  //						"value": "VARVAL",
    64  //					},
    65  //				},
    66  //				"mountPoints": []map[string]interface{}{
    67  //					map[string]interface{}{
    68  //						"sourceVolume":  "tmp",
    69  //						"containerPath": "/tmp",
    70  //						"readOnly":      false,
    71  //					},
    72  //				},
    73  //				"ulimits": []map[string]interface{}{
    74  //					map[string]interface{}{
    75  //						"hardLimit": 1024,
    76  //						"name":      "nofile",
    77  //						"softLimit": 1024,
    78  //					},
    79  //				},
    80  //			})
    81  //			if err != nil {
    82  //				return err
    83  //			}
    84  //			json0 := string(tmpJSON0)
    85  //			_, err = batch.NewJobDefinition(ctx, "test", &batch.JobDefinitionArgs{
    86  //				Name:                pulumi.String("my_test_batch_job_definition"),
    87  //				Type:                pulumi.String("container"),
    88  //				ContainerProperties: pulumi.String(json0),
    89  //			})
    90  //			if err != nil {
    91  //				return err
    92  //			}
    93  //			return nil
    94  //		})
    95  //	}
    96  //
    97  // ```
    98  // <!--End PulumiCodeChooser -->
    99  //
   100  // ### Job definition of type multinode
   101  //
   102  // <!--Start PulumiCodeChooser -->
   103  // ```go
   104  // package main
   105  //
   106  // import (
   107  //
   108  //	"encoding/json"
   109  //
   110  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/batch"
   111  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   112  //
   113  // )
   114  //
   115  //	func main() {
   116  //		pulumi.Run(func(ctx *pulumi.Context) error {
   117  //			tmpJSON0, err := json.Marshal(map[string]interface{}{
   118  //				"mainNode": 0,
   119  //				"nodeRangeProperties": []map[string]interface{}{
   120  //					map[string]interface{}{
   121  //						"container": map[string]interface{}{
   122  //							"command": []string{
   123  //								"ls",
   124  //								"-la",
   125  //							},
   126  //							"image":  "busybox",
   127  //							"memory": 128,
   128  //							"vcpus":  1,
   129  //						},
   130  //						"targetNodes": "0:",
   131  //					},
   132  //					map[string]interface{}{
   133  //						"container": map[string]interface{}{
   134  //							"command": []string{
   135  //								"echo",
   136  //								"test",
   137  //							},
   138  //							"image":  "busybox",
   139  //							"memory": 128,
   140  //							"vcpus":  1,
   141  //						},
   142  //						"targetNodes": "1:",
   143  //					},
   144  //				},
   145  //				"numNodes": 2,
   146  //			})
   147  //			if err != nil {
   148  //				return err
   149  //			}
   150  //			json0 := string(tmpJSON0)
   151  //			_, err = batch.NewJobDefinition(ctx, "test", &batch.JobDefinitionArgs{
   152  //				Name:           pulumi.String("tf_test_batch_job_definition_multinode"),
   153  //				Type:           pulumi.String("multinode"),
   154  //				NodeProperties: pulumi.String(json0),
   155  //			})
   156  //			if err != nil {
   157  //				return err
   158  //			}
   159  //			return nil
   160  //		})
   161  //	}
   162  //
   163  // ```
   164  // <!--End PulumiCodeChooser -->
   165  //
   166  // ### Job Definitionn of type EKS
   167  //
   168  // <!--Start PulumiCodeChooser -->
   169  // ```go
   170  // package main
   171  //
   172  // import (
   173  //
   174  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/batch"
   175  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   176  //
   177  // )
   178  //
   179  //	func main() {
   180  //		pulumi.Run(func(ctx *pulumi.Context) error {
   181  //			_, err := batch.NewJobDefinition(ctx, "test", &batch.JobDefinitionArgs{
   182  //				Name: pulumi.String(" tf_test_batch_job_definition_eks"),
   183  //				Type: pulumi.String("container"),
   184  //				EksProperties: &batch.JobDefinitionEksPropertiesArgs{
   185  //					PodProperties: &batch.JobDefinitionEksPropertiesPodPropertiesArgs{
   186  //						HostNetwork: pulumi.Bool(true),
   187  //						Containers: &batch.JobDefinitionEksPropertiesPodPropertiesContainersArgs{
   188  //							Image: pulumi.String("public.ecr.aws/amazonlinux/amazonlinux:1"),
   189  //							Commands: pulumi.StringArray{
   190  //								pulumi.String("sleep"),
   191  //								pulumi.String("60"),
   192  //							},
   193  //							Resources: &batch.JobDefinitionEksPropertiesPodPropertiesContainersResourcesArgs{
   194  //								Limits: pulumi.StringMap{
   195  //									"cpu":    pulumi.String("1"),
   196  //									"memory": pulumi.String("1024Mi"),
   197  //								},
   198  //							},
   199  //						},
   200  //						Metadata: &batch.JobDefinitionEksPropertiesPodPropertiesMetadataArgs{
   201  //							Labels: pulumi.StringMap{
   202  //								"environment": pulumi.String("test"),
   203  //							},
   204  //						},
   205  //					},
   206  //				},
   207  //			})
   208  //			if err != nil {
   209  //				return err
   210  //			}
   211  //			return nil
   212  //		})
   213  //	}
   214  //
   215  // ```
   216  // <!--End PulumiCodeChooser -->
   217  //
   218  // ### Fargate Platform Capability
   219  //
   220  // <!--Start PulumiCodeChooser -->
   221  // ```go
   222  // package main
   223  //
   224  // import (
   225  //
   226  //	"encoding/json"
   227  //
   228  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/batch"
   229  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
   230  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   231  //
   232  // )
   233  //
   234  //	func main() {
   235  //		pulumi.Run(func(ctx *pulumi.Context) error {
   236  //			assumeRolePolicy, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{
   237  //				Statements: []iam.GetPolicyDocumentStatement{
   238  //					{
   239  //						Actions: []string{
   240  //							"sts:AssumeRole",
   241  //						},
   242  //						Principals: []iam.GetPolicyDocumentStatementPrincipal{
   243  //							{
   244  //								Type: "Service",
   245  //								Identifiers: []string{
   246  //									"ecs-tasks.amazonaws.com",
   247  //								},
   248  //							},
   249  //						},
   250  //					},
   251  //				},
   252  //			}, nil)
   253  //			if err != nil {
   254  //				return err
   255  //			}
   256  //			ecsTaskExecutionRole, err := iam.NewRole(ctx, "ecs_task_execution_role", &iam.RoleArgs{
   257  //				Name:             pulumi.String("my_test_batch_exec_role"),
   258  //				AssumeRolePolicy: pulumi.String(assumeRolePolicy.Json),
   259  //			})
   260  //			if err != nil {
   261  //				return err
   262  //			}
   263  //			_, err = iam.NewRolePolicyAttachment(ctx, "ecs_task_execution_role_policy", &iam.RolePolicyAttachmentArgs{
   264  //				Role:      ecsTaskExecutionRole.Name,
   265  //				PolicyArn: pulumi.String("arn:aws:iam::aws:policy/service-role/AmazonECSTaskExecutionRolePolicy"),
   266  //			})
   267  //			if err != nil {
   268  //				return err
   269  //			}
   270  //			_, err = batch.NewJobDefinition(ctx, "test", &batch.JobDefinitionArgs{
   271  //				Name: pulumi.String("my_test_batch_job_definition"),
   272  //				Type: pulumi.String("container"),
   273  //				PlatformCapabilities: pulumi.StringArray{
   274  //					pulumi.String("FARGATE"),
   275  //				},
   276  //				ContainerProperties: ecsTaskExecutionRole.Arn.ApplyT(func(arn string) (pulumi.String, error) {
   277  //					var _zero pulumi.String
   278  //					tmpJSON0, err := json.Marshal(map[string]interface{}{
   279  //						"command": []string{
   280  //							"echo",
   281  //							"test",
   282  //						},
   283  //						"image":      "busybox",
   284  //						"jobRoleArn": "arn:aws:iam::123456789012:role/AWSBatchS3ReadOnly",
   285  //						"fargatePlatformConfiguration": map[string]interface{}{
   286  //							"platformVersion": "LATEST",
   287  //						},
   288  //						"resourceRequirements": []map[string]interface{}{
   289  //							map[string]interface{}{
   290  //								"type":  "VCPU",
   291  //								"value": "0.25",
   292  //							},
   293  //							map[string]interface{}{
   294  //								"type":  "MEMORY",
   295  //								"value": "512",
   296  //							},
   297  //						},
   298  //						"executionRoleArn": arn,
   299  //					})
   300  //					if err != nil {
   301  //						return _zero, err
   302  //					}
   303  //					json0 := string(tmpJSON0)
   304  //					return pulumi.String(json0), nil
   305  //				}).(pulumi.StringOutput),
   306  //			})
   307  //			if err != nil {
   308  //				return err
   309  //			}
   310  //			return nil
   311  //		})
   312  //	}
   313  //
   314  // ```
   315  // <!--End PulumiCodeChooser -->
   316  //
   317  // ## Import
   318  //
   319  // Using `pulumi import`, import Batch Job Definition using the `arn`. For example:
   320  //
   321  // ```sh
   322  // $ pulumi import aws:batch/jobDefinition:JobDefinition test arn:aws:batch:us-east-1:123456789012:job-definition/sample
   323  // ```
   324  type JobDefinition struct {
   325  	pulumi.CustomResourceState
   326  
   327  	// The Amazon Resource Name of the job definition, includes revision (`:#`).
   328  	Arn pulumi.StringOutput `pulumi:"arn"`
   329  	// The ARN without the revision number.
   330  	ArnPrefix pulumi.StringOutput `pulumi:"arnPrefix"`
   331  	// A valid [container properties](http://docs.aws.amazon.com/batch/latest/APIReference/API_RegisterJobDefinition.html)
   332  	// provided as a single valid JSON document. This parameter is only valid if the `type` parameter is `container`.
   333  	ContainerProperties pulumi.StringPtrOutput `pulumi:"containerProperties"`
   334  	// When updating a job definition a new revision is created. This parameter determines if the previous version is `deregistered` (`INACTIVE`) or left  `ACTIVE`. Defaults to `true`.
   335  	DeregisterOnNewRevision pulumi.BoolPtrOutput `pulumi:"deregisterOnNewRevision"`
   336  	// A valid eks properties. This parameter is only valid if the `type` parameter is `container`.
   337  	EksProperties JobDefinitionEksPropertiesPtrOutput `pulumi:"eksProperties"`
   338  	// Specifies the name of the job definition.
   339  	Name pulumi.StringOutput `pulumi:"name"`
   340  	// A valid [node properties](http://docs.aws.amazon.com/batch/latest/APIReference/API_RegisterJobDefinition.html)
   341  	// provided as a single valid JSON document. This parameter is required if the `type` parameter is `multinode`.
   342  	NodeProperties pulumi.StringPtrOutput `pulumi:"nodeProperties"`
   343  	// Specifies the parameter substitution placeholders to set in the job definition.
   344  	Parameters pulumi.StringMapOutput `pulumi:"parameters"`
   345  	// The platform capabilities required by the job definition. If no value is specified, it defaults to `EC2`. To run the job on Fargate resources, specify `FARGATE`.
   346  	PlatformCapabilities pulumi.StringArrayOutput `pulumi:"platformCapabilities"`
   347  	// Specifies whether to propagate the tags from the job definition to the corresponding Amazon ECS task. Default is `false`.
   348  	PropagateTags pulumi.BoolPtrOutput `pulumi:"propagateTags"`
   349  	// Specifies the retry strategy to use for failed jobs that are submitted with this job definition.
   350  	// Maximum number of `retryStrategy` is `1`.  Defined below.
   351  	RetryStrategy JobDefinitionRetryStrategyPtrOutput `pulumi:"retryStrategy"`
   352  	// The revision of the job definition.
   353  	Revision pulumi.IntOutput `pulumi:"revision"`
   354  	// The scheduling priority of the job definition. This only affects jobs in job queues with a fair share policy. Jobs with a higher scheduling priority are scheduled before jobs with a lower scheduling priority. Allowed values `0` through `9999`.
   355  	SchedulingPriority pulumi.IntPtrOutput `pulumi:"schedulingPriority"`
   356  	// 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.
   357  	Tags pulumi.StringMapOutput `pulumi:"tags"`
   358  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   359  	//
   360  	// Deprecated: Please use `tags` instead.
   361  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
   362  	// 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.
   363  	Timeout JobDefinitionTimeoutPtrOutput `pulumi:"timeout"`
   364  	// The type of job definition. Must be `container` or `multinode`.
   365  	//
   366  	// The following arguments are optional:
   367  	Type pulumi.StringOutput `pulumi:"type"`
   368  }
   369  
   370  // NewJobDefinition registers a new resource with the given unique name, arguments, and options.
   371  func NewJobDefinition(ctx *pulumi.Context,
   372  	name string, args *JobDefinitionArgs, opts ...pulumi.ResourceOption) (*JobDefinition, error) {
   373  	if args == nil {
   374  		return nil, errors.New("missing one or more required arguments")
   375  	}
   376  
   377  	if args.Type == nil {
   378  		return nil, errors.New("invalid value for required argument 'Type'")
   379  	}
   380  	opts = internal.PkgResourceDefaultOpts(opts)
   381  	var resource JobDefinition
   382  	err := ctx.RegisterResource("aws:batch/jobDefinition:JobDefinition", name, args, &resource, opts...)
   383  	if err != nil {
   384  		return nil, err
   385  	}
   386  	return &resource, nil
   387  }
   388  
   389  // GetJobDefinition gets an existing JobDefinition resource's state with the given name, ID, and optional
   390  // state properties that are used to uniquely qualify the lookup (nil if not required).
   391  func GetJobDefinition(ctx *pulumi.Context,
   392  	name string, id pulumi.IDInput, state *JobDefinitionState, opts ...pulumi.ResourceOption) (*JobDefinition, error) {
   393  	var resource JobDefinition
   394  	err := ctx.ReadResource("aws:batch/jobDefinition:JobDefinition", name, id, state, &resource, opts...)
   395  	if err != nil {
   396  		return nil, err
   397  	}
   398  	return &resource, nil
   399  }
   400  
   401  // Input properties used for looking up and filtering JobDefinition resources.
   402  type jobDefinitionState struct {
   403  	// The Amazon Resource Name of the job definition, includes revision (`:#`).
   404  	Arn *string `pulumi:"arn"`
   405  	// The ARN without the revision number.
   406  	ArnPrefix *string `pulumi:"arnPrefix"`
   407  	// A valid [container properties](http://docs.aws.amazon.com/batch/latest/APIReference/API_RegisterJobDefinition.html)
   408  	// provided as a single valid JSON document. This parameter is only valid if the `type` parameter is `container`.
   409  	ContainerProperties *string `pulumi:"containerProperties"`
   410  	// When updating a job definition a new revision is created. This parameter determines if the previous version is `deregistered` (`INACTIVE`) or left  `ACTIVE`. Defaults to `true`.
   411  	DeregisterOnNewRevision *bool `pulumi:"deregisterOnNewRevision"`
   412  	// A valid eks properties. This parameter is only valid if the `type` parameter is `container`.
   413  	EksProperties *JobDefinitionEksProperties `pulumi:"eksProperties"`
   414  	// Specifies the name of the job definition.
   415  	Name *string `pulumi:"name"`
   416  	// A valid [node properties](http://docs.aws.amazon.com/batch/latest/APIReference/API_RegisterJobDefinition.html)
   417  	// provided as a single valid JSON document. This parameter is required if the `type` parameter is `multinode`.
   418  	NodeProperties *string `pulumi:"nodeProperties"`
   419  	// Specifies the parameter substitution placeholders to set in the job definition.
   420  	Parameters map[string]string `pulumi:"parameters"`
   421  	// The platform capabilities required by the job definition. If no value is specified, it defaults to `EC2`. To run the job on Fargate resources, specify `FARGATE`.
   422  	PlatformCapabilities []string `pulumi:"platformCapabilities"`
   423  	// Specifies whether to propagate the tags from the job definition to the corresponding Amazon ECS task. Default is `false`.
   424  	PropagateTags *bool `pulumi:"propagateTags"`
   425  	// Specifies the retry strategy to use for failed jobs that are submitted with this job definition.
   426  	// Maximum number of `retryStrategy` is `1`.  Defined below.
   427  	RetryStrategy *JobDefinitionRetryStrategy `pulumi:"retryStrategy"`
   428  	// The revision of the job definition.
   429  	Revision *int `pulumi:"revision"`
   430  	// The scheduling priority of the job definition. This only affects jobs in job queues with a fair share policy. Jobs with a higher scheduling priority are scheduled before jobs with a lower scheduling priority. Allowed values `0` through `9999`.
   431  	SchedulingPriority *int `pulumi:"schedulingPriority"`
   432  	// 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.
   433  	Tags map[string]string `pulumi:"tags"`
   434  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   435  	//
   436  	// Deprecated: Please use `tags` instead.
   437  	TagsAll map[string]string `pulumi:"tagsAll"`
   438  	// 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.
   439  	Timeout *JobDefinitionTimeout `pulumi:"timeout"`
   440  	// The type of job definition. Must be `container` or `multinode`.
   441  	//
   442  	// The following arguments are optional:
   443  	Type *string `pulumi:"type"`
   444  }
   445  
   446  type JobDefinitionState struct {
   447  	// The Amazon Resource Name of the job definition, includes revision (`:#`).
   448  	Arn pulumi.StringPtrInput
   449  	// The ARN without the revision number.
   450  	ArnPrefix pulumi.StringPtrInput
   451  	// A valid [container properties](http://docs.aws.amazon.com/batch/latest/APIReference/API_RegisterJobDefinition.html)
   452  	// provided as a single valid JSON document. This parameter is only valid if the `type` parameter is `container`.
   453  	ContainerProperties pulumi.StringPtrInput
   454  	// When updating a job definition a new revision is created. This parameter determines if the previous version is `deregistered` (`INACTIVE`) or left  `ACTIVE`. Defaults to `true`.
   455  	DeregisterOnNewRevision pulumi.BoolPtrInput
   456  	// A valid eks properties. This parameter is only valid if the `type` parameter is `container`.
   457  	EksProperties JobDefinitionEksPropertiesPtrInput
   458  	// Specifies the name of the job definition.
   459  	Name pulumi.StringPtrInput
   460  	// A valid [node properties](http://docs.aws.amazon.com/batch/latest/APIReference/API_RegisterJobDefinition.html)
   461  	// provided as a single valid JSON document. This parameter is required if the `type` parameter is `multinode`.
   462  	NodeProperties pulumi.StringPtrInput
   463  	// Specifies the parameter substitution placeholders to set in the job definition.
   464  	Parameters pulumi.StringMapInput
   465  	// The platform capabilities required by the job definition. If no value is specified, it defaults to `EC2`. To run the job on Fargate resources, specify `FARGATE`.
   466  	PlatformCapabilities pulumi.StringArrayInput
   467  	// Specifies whether to propagate the tags from the job definition to the corresponding Amazon ECS task. Default is `false`.
   468  	PropagateTags pulumi.BoolPtrInput
   469  	// Specifies the retry strategy to use for failed jobs that are submitted with this job definition.
   470  	// Maximum number of `retryStrategy` is `1`.  Defined below.
   471  	RetryStrategy JobDefinitionRetryStrategyPtrInput
   472  	// The revision of the job definition.
   473  	Revision pulumi.IntPtrInput
   474  	// The scheduling priority of the job definition. This only affects jobs in job queues with a fair share policy. Jobs with a higher scheduling priority are scheduled before jobs with a lower scheduling priority. Allowed values `0` through `9999`.
   475  	SchedulingPriority pulumi.IntPtrInput
   476  	// 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.
   477  	Tags pulumi.StringMapInput
   478  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   479  	//
   480  	// Deprecated: Please use `tags` instead.
   481  	TagsAll pulumi.StringMapInput
   482  	// 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.
   483  	Timeout JobDefinitionTimeoutPtrInput
   484  	// The type of job definition. Must be `container` or `multinode`.
   485  	//
   486  	// The following arguments are optional:
   487  	Type pulumi.StringPtrInput
   488  }
   489  
   490  func (JobDefinitionState) ElementType() reflect.Type {
   491  	return reflect.TypeOf((*jobDefinitionState)(nil)).Elem()
   492  }
   493  
   494  type jobDefinitionArgs struct {
   495  	// A valid [container properties](http://docs.aws.amazon.com/batch/latest/APIReference/API_RegisterJobDefinition.html)
   496  	// provided as a single valid JSON document. This parameter is only valid if the `type` parameter is `container`.
   497  	ContainerProperties *string `pulumi:"containerProperties"`
   498  	// When updating a job definition a new revision is created. This parameter determines if the previous version is `deregistered` (`INACTIVE`) or left  `ACTIVE`. Defaults to `true`.
   499  	DeregisterOnNewRevision *bool `pulumi:"deregisterOnNewRevision"`
   500  	// A valid eks properties. This parameter is only valid if the `type` parameter is `container`.
   501  	EksProperties *JobDefinitionEksProperties `pulumi:"eksProperties"`
   502  	// Specifies the name of the job definition.
   503  	Name *string `pulumi:"name"`
   504  	// A valid [node properties](http://docs.aws.amazon.com/batch/latest/APIReference/API_RegisterJobDefinition.html)
   505  	// provided as a single valid JSON document. This parameter is required if the `type` parameter is `multinode`.
   506  	NodeProperties *string `pulumi:"nodeProperties"`
   507  	// Specifies the parameter substitution placeholders to set in the job definition.
   508  	Parameters map[string]string `pulumi:"parameters"`
   509  	// The platform capabilities required by the job definition. If no value is specified, it defaults to `EC2`. To run the job on Fargate resources, specify `FARGATE`.
   510  	PlatformCapabilities []string `pulumi:"platformCapabilities"`
   511  	// Specifies whether to propagate the tags from the job definition to the corresponding Amazon ECS task. Default is `false`.
   512  	PropagateTags *bool `pulumi:"propagateTags"`
   513  	// Specifies the retry strategy to use for failed jobs that are submitted with this job definition.
   514  	// Maximum number of `retryStrategy` is `1`.  Defined below.
   515  	RetryStrategy *JobDefinitionRetryStrategy `pulumi:"retryStrategy"`
   516  	// The scheduling priority of the job definition. This only affects jobs in job queues with a fair share policy. Jobs with a higher scheduling priority are scheduled before jobs with a lower scheduling priority. Allowed values `0` through `9999`.
   517  	SchedulingPriority *int `pulumi:"schedulingPriority"`
   518  	// 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.
   519  	Tags map[string]string `pulumi:"tags"`
   520  	// 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.
   521  	Timeout *JobDefinitionTimeout `pulumi:"timeout"`
   522  	// The type of job definition. Must be `container` or `multinode`.
   523  	//
   524  	// The following arguments are optional:
   525  	Type string `pulumi:"type"`
   526  }
   527  
   528  // The set of arguments for constructing a JobDefinition resource.
   529  type JobDefinitionArgs struct {
   530  	// A valid [container properties](http://docs.aws.amazon.com/batch/latest/APIReference/API_RegisterJobDefinition.html)
   531  	// provided as a single valid JSON document. This parameter is only valid if the `type` parameter is `container`.
   532  	ContainerProperties pulumi.StringPtrInput
   533  	// When updating a job definition a new revision is created. This parameter determines if the previous version is `deregistered` (`INACTIVE`) or left  `ACTIVE`. Defaults to `true`.
   534  	DeregisterOnNewRevision pulumi.BoolPtrInput
   535  	// A valid eks properties. This parameter is only valid if the `type` parameter is `container`.
   536  	EksProperties JobDefinitionEksPropertiesPtrInput
   537  	// Specifies the name of the job definition.
   538  	Name pulumi.StringPtrInput
   539  	// A valid [node properties](http://docs.aws.amazon.com/batch/latest/APIReference/API_RegisterJobDefinition.html)
   540  	// provided as a single valid JSON document. This parameter is required if the `type` parameter is `multinode`.
   541  	NodeProperties pulumi.StringPtrInput
   542  	// Specifies the parameter substitution placeholders to set in the job definition.
   543  	Parameters pulumi.StringMapInput
   544  	// The platform capabilities required by the job definition. If no value is specified, it defaults to `EC2`. To run the job on Fargate resources, specify `FARGATE`.
   545  	PlatformCapabilities pulumi.StringArrayInput
   546  	// Specifies whether to propagate the tags from the job definition to the corresponding Amazon ECS task. Default is `false`.
   547  	PropagateTags pulumi.BoolPtrInput
   548  	// Specifies the retry strategy to use for failed jobs that are submitted with this job definition.
   549  	// Maximum number of `retryStrategy` is `1`.  Defined below.
   550  	RetryStrategy JobDefinitionRetryStrategyPtrInput
   551  	// The scheduling priority of the job definition. This only affects jobs in job queues with a fair share policy. Jobs with a higher scheduling priority are scheduled before jobs with a lower scheduling priority. Allowed values `0` through `9999`.
   552  	SchedulingPriority pulumi.IntPtrInput
   553  	// 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.
   554  	Tags pulumi.StringMapInput
   555  	// 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.
   556  	Timeout JobDefinitionTimeoutPtrInput
   557  	// The type of job definition. Must be `container` or `multinode`.
   558  	//
   559  	// The following arguments are optional:
   560  	Type pulumi.StringInput
   561  }
   562  
   563  func (JobDefinitionArgs) ElementType() reflect.Type {
   564  	return reflect.TypeOf((*jobDefinitionArgs)(nil)).Elem()
   565  }
   566  
   567  type JobDefinitionInput interface {
   568  	pulumi.Input
   569  
   570  	ToJobDefinitionOutput() JobDefinitionOutput
   571  	ToJobDefinitionOutputWithContext(ctx context.Context) JobDefinitionOutput
   572  }
   573  
   574  func (*JobDefinition) ElementType() reflect.Type {
   575  	return reflect.TypeOf((**JobDefinition)(nil)).Elem()
   576  }
   577  
   578  func (i *JobDefinition) ToJobDefinitionOutput() JobDefinitionOutput {
   579  	return i.ToJobDefinitionOutputWithContext(context.Background())
   580  }
   581  
   582  func (i *JobDefinition) ToJobDefinitionOutputWithContext(ctx context.Context) JobDefinitionOutput {
   583  	return pulumi.ToOutputWithContext(ctx, i).(JobDefinitionOutput)
   584  }
   585  
   586  // JobDefinitionArrayInput is an input type that accepts JobDefinitionArray and JobDefinitionArrayOutput values.
   587  // You can construct a concrete instance of `JobDefinitionArrayInput` via:
   588  //
   589  //	JobDefinitionArray{ JobDefinitionArgs{...} }
   590  type JobDefinitionArrayInput interface {
   591  	pulumi.Input
   592  
   593  	ToJobDefinitionArrayOutput() JobDefinitionArrayOutput
   594  	ToJobDefinitionArrayOutputWithContext(context.Context) JobDefinitionArrayOutput
   595  }
   596  
   597  type JobDefinitionArray []JobDefinitionInput
   598  
   599  func (JobDefinitionArray) ElementType() reflect.Type {
   600  	return reflect.TypeOf((*[]*JobDefinition)(nil)).Elem()
   601  }
   602  
   603  func (i JobDefinitionArray) ToJobDefinitionArrayOutput() JobDefinitionArrayOutput {
   604  	return i.ToJobDefinitionArrayOutputWithContext(context.Background())
   605  }
   606  
   607  func (i JobDefinitionArray) ToJobDefinitionArrayOutputWithContext(ctx context.Context) JobDefinitionArrayOutput {
   608  	return pulumi.ToOutputWithContext(ctx, i).(JobDefinitionArrayOutput)
   609  }
   610  
   611  // JobDefinitionMapInput is an input type that accepts JobDefinitionMap and JobDefinitionMapOutput values.
   612  // You can construct a concrete instance of `JobDefinitionMapInput` via:
   613  //
   614  //	JobDefinitionMap{ "key": JobDefinitionArgs{...} }
   615  type JobDefinitionMapInput interface {
   616  	pulumi.Input
   617  
   618  	ToJobDefinitionMapOutput() JobDefinitionMapOutput
   619  	ToJobDefinitionMapOutputWithContext(context.Context) JobDefinitionMapOutput
   620  }
   621  
   622  type JobDefinitionMap map[string]JobDefinitionInput
   623  
   624  func (JobDefinitionMap) ElementType() reflect.Type {
   625  	return reflect.TypeOf((*map[string]*JobDefinition)(nil)).Elem()
   626  }
   627  
   628  func (i JobDefinitionMap) ToJobDefinitionMapOutput() JobDefinitionMapOutput {
   629  	return i.ToJobDefinitionMapOutputWithContext(context.Background())
   630  }
   631  
   632  func (i JobDefinitionMap) ToJobDefinitionMapOutputWithContext(ctx context.Context) JobDefinitionMapOutput {
   633  	return pulumi.ToOutputWithContext(ctx, i).(JobDefinitionMapOutput)
   634  }
   635  
   636  type JobDefinitionOutput struct{ *pulumi.OutputState }
   637  
   638  func (JobDefinitionOutput) ElementType() reflect.Type {
   639  	return reflect.TypeOf((**JobDefinition)(nil)).Elem()
   640  }
   641  
   642  func (o JobDefinitionOutput) ToJobDefinitionOutput() JobDefinitionOutput {
   643  	return o
   644  }
   645  
   646  func (o JobDefinitionOutput) ToJobDefinitionOutputWithContext(ctx context.Context) JobDefinitionOutput {
   647  	return o
   648  }
   649  
   650  // The Amazon Resource Name of the job definition, includes revision (`:#`).
   651  func (o JobDefinitionOutput) Arn() pulumi.StringOutput {
   652  	return o.ApplyT(func(v *JobDefinition) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   653  }
   654  
   655  // The ARN without the revision number.
   656  func (o JobDefinitionOutput) ArnPrefix() pulumi.StringOutput {
   657  	return o.ApplyT(func(v *JobDefinition) pulumi.StringOutput { return v.ArnPrefix }).(pulumi.StringOutput)
   658  }
   659  
   660  // A valid [container properties](http://docs.aws.amazon.com/batch/latest/APIReference/API_RegisterJobDefinition.html)
   661  // provided as a single valid JSON document. This parameter is only valid if the `type` parameter is `container`.
   662  func (o JobDefinitionOutput) ContainerProperties() pulumi.StringPtrOutput {
   663  	return o.ApplyT(func(v *JobDefinition) pulumi.StringPtrOutput { return v.ContainerProperties }).(pulumi.StringPtrOutput)
   664  }
   665  
   666  // When updating a job definition a new revision is created. This parameter determines if the previous version is `deregistered` (`INACTIVE`) or left  `ACTIVE`. Defaults to `true`.
   667  func (o JobDefinitionOutput) DeregisterOnNewRevision() pulumi.BoolPtrOutput {
   668  	return o.ApplyT(func(v *JobDefinition) pulumi.BoolPtrOutput { return v.DeregisterOnNewRevision }).(pulumi.BoolPtrOutput)
   669  }
   670  
   671  // A valid eks properties. This parameter is only valid if the `type` parameter is `container`.
   672  func (o JobDefinitionOutput) EksProperties() JobDefinitionEksPropertiesPtrOutput {
   673  	return o.ApplyT(func(v *JobDefinition) JobDefinitionEksPropertiesPtrOutput { return v.EksProperties }).(JobDefinitionEksPropertiesPtrOutput)
   674  }
   675  
   676  // Specifies the name of the job definition.
   677  func (o JobDefinitionOutput) Name() pulumi.StringOutput {
   678  	return o.ApplyT(func(v *JobDefinition) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
   679  }
   680  
   681  // A valid [node properties](http://docs.aws.amazon.com/batch/latest/APIReference/API_RegisterJobDefinition.html)
   682  // provided as a single valid JSON document. This parameter is required if the `type` parameter is `multinode`.
   683  func (o JobDefinitionOutput) NodeProperties() pulumi.StringPtrOutput {
   684  	return o.ApplyT(func(v *JobDefinition) pulumi.StringPtrOutput { return v.NodeProperties }).(pulumi.StringPtrOutput)
   685  }
   686  
   687  // Specifies the parameter substitution placeholders to set in the job definition.
   688  func (o JobDefinitionOutput) Parameters() pulumi.StringMapOutput {
   689  	return o.ApplyT(func(v *JobDefinition) pulumi.StringMapOutput { return v.Parameters }).(pulumi.StringMapOutput)
   690  }
   691  
   692  // The platform capabilities required by the job definition. If no value is specified, it defaults to `EC2`. To run the job on Fargate resources, specify `FARGATE`.
   693  func (o JobDefinitionOutput) PlatformCapabilities() pulumi.StringArrayOutput {
   694  	return o.ApplyT(func(v *JobDefinition) pulumi.StringArrayOutput { return v.PlatformCapabilities }).(pulumi.StringArrayOutput)
   695  }
   696  
   697  // Specifies whether to propagate the tags from the job definition to the corresponding Amazon ECS task. Default is `false`.
   698  func (o JobDefinitionOutput) PropagateTags() pulumi.BoolPtrOutput {
   699  	return o.ApplyT(func(v *JobDefinition) pulumi.BoolPtrOutput { return v.PropagateTags }).(pulumi.BoolPtrOutput)
   700  }
   701  
   702  // Specifies the retry strategy to use for failed jobs that are submitted with this job definition.
   703  // Maximum number of `retryStrategy` is `1`.  Defined below.
   704  func (o JobDefinitionOutput) RetryStrategy() JobDefinitionRetryStrategyPtrOutput {
   705  	return o.ApplyT(func(v *JobDefinition) JobDefinitionRetryStrategyPtrOutput { return v.RetryStrategy }).(JobDefinitionRetryStrategyPtrOutput)
   706  }
   707  
   708  // The revision of the job definition.
   709  func (o JobDefinitionOutput) Revision() pulumi.IntOutput {
   710  	return o.ApplyT(func(v *JobDefinition) pulumi.IntOutput { return v.Revision }).(pulumi.IntOutput)
   711  }
   712  
   713  // The scheduling priority of the job definition. This only affects jobs in job queues with a fair share policy. Jobs with a higher scheduling priority are scheduled before jobs with a lower scheduling priority. Allowed values `0` through `9999`.
   714  func (o JobDefinitionOutput) SchedulingPriority() pulumi.IntPtrOutput {
   715  	return o.ApplyT(func(v *JobDefinition) pulumi.IntPtrOutput { return v.SchedulingPriority }).(pulumi.IntPtrOutput)
   716  }
   717  
   718  // 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.
   719  func (o JobDefinitionOutput) Tags() pulumi.StringMapOutput {
   720  	return o.ApplyT(func(v *JobDefinition) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   721  }
   722  
   723  // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   724  //
   725  // Deprecated: Please use `tags` instead.
   726  func (o JobDefinitionOutput) TagsAll() pulumi.StringMapOutput {
   727  	return o.ApplyT(func(v *JobDefinition) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   728  }
   729  
   730  // 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.
   731  func (o JobDefinitionOutput) Timeout() JobDefinitionTimeoutPtrOutput {
   732  	return o.ApplyT(func(v *JobDefinition) JobDefinitionTimeoutPtrOutput { return v.Timeout }).(JobDefinitionTimeoutPtrOutput)
   733  }
   734  
   735  // The type of job definition. Must be `container` or `multinode`.
   736  //
   737  // The following arguments are optional:
   738  func (o JobDefinitionOutput) Type() pulumi.StringOutput {
   739  	return o.ApplyT(func(v *JobDefinition) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput)
   740  }
   741  
   742  type JobDefinitionArrayOutput struct{ *pulumi.OutputState }
   743  
   744  func (JobDefinitionArrayOutput) ElementType() reflect.Type {
   745  	return reflect.TypeOf((*[]*JobDefinition)(nil)).Elem()
   746  }
   747  
   748  func (o JobDefinitionArrayOutput) ToJobDefinitionArrayOutput() JobDefinitionArrayOutput {
   749  	return o
   750  }
   751  
   752  func (o JobDefinitionArrayOutput) ToJobDefinitionArrayOutputWithContext(ctx context.Context) JobDefinitionArrayOutput {
   753  	return o
   754  }
   755  
   756  func (o JobDefinitionArrayOutput) Index(i pulumi.IntInput) JobDefinitionOutput {
   757  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *JobDefinition {
   758  		return vs[0].([]*JobDefinition)[vs[1].(int)]
   759  	}).(JobDefinitionOutput)
   760  }
   761  
   762  type JobDefinitionMapOutput struct{ *pulumi.OutputState }
   763  
   764  func (JobDefinitionMapOutput) ElementType() reflect.Type {
   765  	return reflect.TypeOf((*map[string]*JobDefinition)(nil)).Elem()
   766  }
   767  
   768  func (o JobDefinitionMapOutput) ToJobDefinitionMapOutput() JobDefinitionMapOutput {
   769  	return o
   770  }
   771  
   772  func (o JobDefinitionMapOutput) ToJobDefinitionMapOutputWithContext(ctx context.Context) JobDefinitionMapOutput {
   773  	return o
   774  }
   775  
   776  func (o JobDefinitionMapOutput) MapIndex(k pulumi.StringInput) JobDefinitionOutput {
   777  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *JobDefinition {
   778  		return vs[0].(map[string]*JobDefinition)[vs[1].(string)]
   779  	}).(JobDefinitionOutput)
   780  }
   781  
   782  func init() {
   783  	pulumi.RegisterInputType(reflect.TypeOf((*JobDefinitionInput)(nil)).Elem(), &JobDefinition{})
   784  	pulumi.RegisterInputType(reflect.TypeOf((*JobDefinitionArrayInput)(nil)).Elem(), JobDefinitionArray{})
   785  	pulumi.RegisterInputType(reflect.TypeOf((*JobDefinitionMapInput)(nil)).Elem(), JobDefinitionMap{})
   786  	pulumi.RegisterOutputType(JobDefinitionOutput{})
   787  	pulumi.RegisterOutputType(JobDefinitionArrayOutput{})
   788  	pulumi.RegisterOutputType(JobDefinitionMapOutput{})
   789  }