aws-sdk-batch 1.53.0 → 1.57.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -27,6 +27,7 @@ require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
27
27
  require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
28
28
  require 'aws-sdk-core/plugins/transfer_encoding.rb'
29
29
  require 'aws-sdk-core/plugins/http_checksum.rb'
30
+ require 'aws-sdk-core/plugins/defaults_mode.rb'
30
31
  require 'aws-sdk-core/plugins/signature_v4.rb'
31
32
  require 'aws-sdk-core/plugins/protocols/rest_json.rb'
32
33
 
@@ -73,6 +74,7 @@ module Aws::Batch
73
74
  add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
74
75
  add_plugin(Aws::Plugins::TransferEncoding)
75
76
  add_plugin(Aws::Plugins::HttpChecksum)
77
+ add_plugin(Aws::Plugins::DefaultsMode)
76
78
  add_plugin(Aws::Plugins::SignatureV4)
77
79
  add_plugin(Aws::Plugins::Protocols::RestJson)
78
80
 
@@ -119,7 +121,9 @@ module Aws::Batch
119
121
  # * EC2/ECS IMDS instance profile - When used by default, the timeouts
120
122
  # are very aggressive. Construct and pass an instance of
121
123
  # `Aws::InstanceProfileCredentails` or `Aws::ECSCredentials` to
122
- # enable retries and extended timeouts.
124
+ # enable retries and extended timeouts. Instance profile credential
125
+ # fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
126
+ # to true.
123
127
  #
124
128
  # @option options [required, String] :region
125
129
  # The AWS region to connect to. The configured `:region` is
@@ -173,6 +177,10 @@ module Aws::Batch
173
177
  # Used only in `standard` and adaptive retry modes. Specifies whether to apply
174
178
  # a clock skew correction and retry requests with skewed client clocks.
175
179
  #
180
+ # @option options [String] :defaults_mode ("legacy")
181
+ # See {Aws::DefaultsModeConfiguration} for a list of the
182
+ # accepted modes and the configuration defaults that are included.
183
+ #
176
184
  # @option options [Boolean] :disable_host_prefix_injection (false)
177
185
  # Set to true to disable SDK automatically adding host prefix
178
186
  # to default service endpoint when available.
@@ -295,7 +303,7 @@ module Aws::Batch
295
303
  # seconds to wait when opening a HTTP session before raising a
296
304
  # `Timeout::Error`.
297
305
  #
298
- # @option options [Integer] :http_read_timeout (60) The default
306
+ # @option options [Float] :http_read_timeout (60) The default
299
307
  # number of seconds to wait for response data. This value can
300
308
  # safely be set per-request on the session.
301
309
  #
@@ -311,6 +319,9 @@ module Aws::Batch
311
319
  # disables this behaviour. This value can safely be set per
312
320
  # request on the session.
313
321
  #
322
+ # @option options [Float] :ssl_timeout (nil) Sets the SSL timeout
323
+ # in seconds.
324
+ #
314
325
  # @option options [Boolean] :http_wire_trace (false) When `true`,
315
326
  # HTTP debug output will be sent to the `:logger`.
316
327
  #
@@ -439,8 +450,9 @@ module Aws::Batch
439
450
  # [3]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_container_instance.html
440
451
  #
441
452
  # @option params [required, String] :compute_environment_name
442
- # The name for your compute environment. Up to 128 letters (uppercase
443
- # and lowercase), numbers, hyphens, and underscores are allowed.
453
+ # The name for your compute environment. It can be up to 128 letters
454
+ # long. It can contain uppercase and lowercase letters, numbers, hyphens
455
+ # (-), and underscores (\_).
444
456
  #
445
457
  # @option params [required, String] :type
446
458
  # The type of the compute environment: `MANAGED` or `UNMANAGED`. For
@@ -468,6 +480,17 @@ module Aws::Batch
468
480
  # environments in the `DISABLED` state don't scale out. However, they
469
481
  # scale in to `minvCpus` value after instances become idle.
470
482
  #
483
+ # @option params [Integer] :unmanagedv_cpus
484
+ # The maximum number of vCPUs for an unmanaged compute environment. This
485
+ # parameter is only used for fair share scheduling to reserve vCPU
486
+ # capacity for new share identifiers. If this parameter isn't provided
487
+ # for a fair share job queue, no vCPU capacity is reserved.
488
+ #
489
+ # <note markdown="1"> This parameter is only supported when the `type` parameter is set to
490
+ # `UNMANAGED`/
491
+ #
492
+ # </note>
493
+ #
471
494
  # @option params [Types::ComputeResource] :compute_resources
472
495
  # Details about the compute resources managed by the compute
473
496
  # environment. This parameter is required for managed compute
@@ -626,6 +649,7 @@ module Aws::Batch
626
649
  # compute_environment_name: "String", # required
627
650
  # type: "MANAGED", # required, accepts MANAGED, UNMANAGED
628
651
  # state: "ENABLED", # accepts ENABLED, DISABLED
652
+ # unmanagedv_cpus: 1,
629
653
  # compute_resources: {
630
654
  # type: "EC2", # required, accepts EC2, SPOT, FARGATE, FARGATE_SPOT
631
655
  # allocation_strategy: "BEST_FIT", # accepts BEST_FIT, BEST_FIT_PROGRESSIVE, SPOT_CAPACITY_OPTIMIZED
@@ -687,8 +711,9 @@ module Aws::Batch
687
711
  # preference for scheduling jobs to that compute environment.
688
712
  #
689
713
  # @option params [required, String] :job_queue_name
690
- # The name of the job queue. Up to 128 letters (uppercase and
691
- # lowercase), numbers, and underscores are allowed.
714
+ # The name of the job queue. It can be up to 128 letters long. It can
715
+ # contain uppercase and lowercase letters, numbers, hyphens (-), and
716
+ # underscores (\_).
692
717
  #
693
718
  # @option params [String] :state
694
719
  # The state of the job queue. If the job queue state is `ENABLED`, it is
@@ -696,6 +721,17 @@ module Aws::Batch
696
721
  # can't be added to the queue, but jobs already in the queue can
697
722
  # finish.
698
723
  #
724
+ # @option params [String] :scheduling_policy_arn
725
+ # The Amazon Resource Name (ARN) of the fair share scheduling policy. If
726
+ # this parameter is specified, the job queue uses a fair share
727
+ # scheduling policy. If this parameter isn't specified, the job queue
728
+ # uses a first in, first out (FIFO) scheduling policy. After a job queue
729
+ # is created, you can replace but can't remove the fair share
730
+ # scheduling policy. The format is
731
+ # `aws:Partition:batch:Region:Account:scheduling-policy/Name `. An
732
+ # example is
733
+ # `aws:aws:batch:us-west-2:012345678910:scheduling-policy/MySchedulingPolicy`.
734
+ #
699
735
  # @option params [required, Integer] :priority
700
736
  # The priority of the job queue. Job queues with a higher priority (or a
701
737
  # higher integer value for the `priority` parameter) are evaluated first
@@ -792,6 +828,7 @@ module Aws::Batch
792
828
  # resp = client.create_job_queue({
793
829
  # job_queue_name: "String", # required
794
830
  # state: "ENABLED", # accepts ENABLED, DISABLED
831
+ # scheduling_policy_arn: "String",
795
832
  # priority: 1, # required
796
833
  # compute_environment_order: [ # required
797
834
  # {
@@ -818,6 +855,69 @@ module Aws::Batch
818
855
  req.send_request(options)
819
856
  end
820
857
 
858
+ # Creates an Batch scheduling policy.
859
+ #
860
+ # @option params [required, String] :name
861
+ # The name of the scheduling policy. It can be up to 128 letters long.
862
+ # It can contain uppercase and lowercase letters, numbers, hyphens (-),
863
+ # and underscores (\_).
864
+ #
865
+ # @option params [Types::FairsharePolicy] :fairshare_policy
866
+ # The fair share policy of the scheduling policy.
867
+ #
868
+ # @option params [Hash<String,String>] :tags
869
+ # The tags that you apply to the scheduling policy to help you
870
+ # categorize and organize your resources. Each tag consists of a key and
871
+ # an optional value. For more information, see [Tagging Amazon Web
872
+ # Services Resources][1] in *Amazon Web Services General Reference*.
873
+ #
874
+ # These tags can be updated or removed using the [TagResource][2] and
875
+ # [UntagResource][3] API operations.
876
+ #
877
+ #
878
+ #
879
+ # [1]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html
880
+ # [2]: https://docs.aws.amazon.com/batch/latest/APIReference/API_TagResource.html
881
+ # [3]: https://docs.aws.amazon.com/batch/latest/APIReference/API_UntagResource.html
882
+ #
883
+ # @return [Types::CreateSchedulingPolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
884
+ #
885
+ # * {Types::CreateSchedulingPolicyResponse#name #name} => String
886
+ # * {Types::CreateSchedulingPolicyResponse#arn #arn} => String
887
+ #
888
+ # @example Request syntax with placeholder values
889
+ #
890
+ # resp = client.create_scheduling_policy({
891
+ # name: "String", # required
892
+ # fairshare_policy: {
893
+ # share_decay_seconds: 1,
894
+ # compute_reservation: 1,
895
+ # share_distribution: [
896
+ # {
897
+ # share_identifier: "String", # required
898
+ # weight_factor: 1.0,
899
+ # },
900
+ # ],
901
+ # },
902
+ # tags: {
903
+ # "TagKey" => "TagValue",
904
+ # },
905
+ # })
906
+ #
907
+ # @example Response structure
908
+ #
909
+ # resp.name #=> String
910
+ # resp.arn #=> String
911
+ #
912
+ # @see http://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/CreateSchedulingPolicy AWS API Documentation
913
+ #
914
+ # @overload create_scheduling_policy(params = {})
915
+ # @param [Hash] params ({})
916
+ def create_scheduling_policy(params = {}, options = {})
917
+ req = build_request(:create_scheduling_policy, params)
918
+ req.send_request(options)
919
+ end
920
+
821
921
  # Deletes an Batch compute environment.
822
922
  #
823
923
  # Before you can delete a compute environment, you must set its state to
@@ -904,6 +1004,30 @@ module Aws::Batch
904
1004
  req.send_request(options)
905
1005
  end
906
1006
 
1007
+ # Deletes the specified scheduling policy.
1008
+ #
1009
+ # You can't delete a scheduling policy that's used in any job queues.
1010
+ #
1011
+ # @option params [required, String] :arn
1012
+ # The Amazon Resource Name (ARN) of the scheduling policy to delete.
1013
+ #
1014
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1015
+ #
1016
+ # @example Request syntax with placeholder values
1017
+ #
1018
+ # resp = client.delete_scheduling_policy({
1019
+ # arn: "String", # required
1020
+ # })
1021
+ #
1022
+ # @see http://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DeleteSchedulingPolicy AWS API Documentation
1023
+ #
1024
+ # @overload delete_scheduling_policy(params = {})
1025
+ # @param [Hash] params ({})
1026
+ def delete_scheduling_policy(params = {}, options = {})
1027
+ req = build_request(:delete_scheduling_policy, params)
1028
+ req.send_request(options)
1029
+ end
1030
+
907
1031
  # Deregisters an Batch job definition. Job definitions are permanently
908
1032
  # deleted after 180 days.
909
1033
  #
@@ -1045,6 +1169,7 @@ module Aws::Batch
1045
1169
  # resp.compute_environments #=> Array
1046
1170
  # resp.compute_environments[0].compute_environment_name #=> String
1047
1171
  # resp.compute_environments[0].compute_environment_arn #=> String
1172
+ # resp.compute_environments[0].unmanagedv_cpus #=> Integer
1048
1173
  # resp.compute_environments[0].ecs_cluster_arn #=> String
1049
1174
  # resp.compute_environments[0].tags #=> Hash
1050
1175
  # resp.compute_environments[0].tags["TagKey"] #=> String
@@ -1094,7 +1219,7 @@ module Aws::Batch
1094
1219
  #
1095
1220
  # @option params [Array<String>] :job_definitions
1096
1221
  # A list of up to 100 job definitions. Each entry in the list can either
1097
- # be an ARN of the form
1222
+ # be an ARN in the format
1098
1223
  # `arn:aws:batch:$\{Region\}:$\{Account\}:job-definition/$\{JobDefinitionName\}:$\{Revision\}`
1099
1224
  # or a short version using the form
1100
1225
  # `$\{JobDefinitionName\}:$\{Revision\}`.
@@ -1158,12 +1283,20 @@ module Aws::Batch
1158
1283
  # environment: [
1159
1284
  # ],
1160
1285
  # image: "busybox",
1161
- # memory: 128,
1162
1286
  # mount_points: [
1163
1287
  # ],
1288
+ # resource_requirements: [
1289
+ # {
1290
+ # type: "MEMORY",
1291
+ # value: "128",
1292
+ # },
1293
+ # {
1294
+ # type: "VCPU",
1295
+ # value: "1",
1296
+ # },
1297
+ # ],
1164
1298
  # ulimits: [
1165
1299
  # ],
1166
- # vcpus: 1,
1167
1300
  # volumes: [
1168
1301
  # ],
1169
1302
  # },
@@ -1193,6 +1326,7 @@ module Aws::Batch
1193
1326
  # resp.job_definitions[0].revision #=> Integer
1194
1327
  # resp.job_definitions[0].status #=> String
1195
1328
  # resp.job_definitions[0].type #=> String
1329
+ # resp.job_definitions[0].scheduling_priority #=> Integer
1196
1330
  # resp.job_definitions[0].parameters #=> Hash
1197
1331
  # resp.job_definitions[0].parameters["String"] #=> String
1198
1332
  # resp.job_definitions[0].retry_strategy.attempts #=> Integer
@@ -1421,6 +1555,7 @@ module Aws::Batch
1421
1555
  # resp.job_queues[0].job_queue_name #=> String
1422
1556
  # resp.job_queues[0].job_queue_arn #=> String
1423
1557
  # resp.job_queues[0].state #=> String, one of "ENABLED", "DISABLED"
1558
+ # resp.job_queues[0].scheduling_policy_arn #=> String
1424
1559
  # resp.job_queues[0].status #=> String, one of "CREATING", "UPDATING", "DELETING", "DELETED", "VALID", "INVALID"
1425
1560
  # resp.job_queues[0].status_reason #=> String
1426
1561
  # resp.job_queues[0].priority #=> Integer
@@ -1513,6 +1648,8 @@ module Aws::Batch
1513
1648
  # resp.jobs[0].job_id #=> String
1514
1649
  # resp.jobs[0].job_queue #=> String
1515
1650
  # resp.jobs[0].status #=> String, one of "SUBMITTED", "PENDING", "RUNNABLE", "STARTING", "RUNNING", "SUCCEEDED", "FAILED"
1651
+ # resp.jobs[0].share_identifier #=> String
1652
+ # resp.jobs[0].scheduling_priority #=> Integer
1516
1653
  # resp.jobs[0].attempts #=> Array
1517
1654
  # resp.jobs[0].attempts[0].container.container_instance_arn #=> String
1518
1655
  # resp.jobs[0].attempts[0].container.task_arn #=> String
@@ -1695,6 +1832,44 @@ module Aws::Batch
1695
1832
  req.send_request(options)
1696
1833
  end
1697
1834
 
1835
+ # Describes one or more of your scheduling policies.
1836
+ #
1837
+ # @option params [required, Array<String>] :arns
1838
+ # A list of up to 100 scheduling policy Amazon Resource Name (ARN)
1839
+ # entries.
1840
+ #
1841
+ # @return [Types::DescribeSchedulingPoliciesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1842
+ #
1843
+ # * {Types::DescribeSchedulingPoliciesResponse#scheduling_policies #scheduling_policies} => Array&lt;Types::SchedulingPolicyDetail&gt;
1844
+ #
1845
+ # @example Request syntax with placeholder values
1846
+ #
1847
+ # resp = client.describe_scheduling_policies({
1848
+ # arns: ["String"], # required
1849
+ # })
1850
+ #
1851
+ # @example Response structure
1852
+ #
1853
+ # resp.scheduling_policies #=> Array
1854
+ # resp.scheduling_policies[0].name #=> String
1855
+ # resp.scheduling_policies[0].arn #=> String
1856
+ # resp.scheduling_policies[0].fairshare_policy.share_decay_seconds #=> Integer
1857
+ # resp.scheduling_policies[0].fairshare_policy.compute_reservation #=> Integer
1858
+ # resp.scheduling_policies[0].fairshare_policy.share_distribution #=> Array
1859
+ # resp.scheduling_policies[0].fairshare_policy.share_distribution[0].share_identifier #=> String
1860
+ # resp.scheduling_policies[0].fairshare_policy.share_distribution[0].weight_factor #=> Float
1861
+ # resp.scheduling_policies[0].tags #=> Hash
1862
+ # resp.scheduling_policies[0].tags["TagKey"] #=> String
1863
+ #
1864
+ # @see http://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeSchedulingPolicies AWS API Documentation
1865
+ #
1866
+ # @overload describe_scheduling_policies(params = {})
1867
+ # @param [Hash] params ({})
1868
+ def describe_scheduling_policies(params = {}, options = {})
1869
+ req = build_request(:describe_scheduling_policies, params)
1870
+ req.send_request(options)
1871
+ end
1872
+
1698
1873
  # Returns a list of Batch jobs.
1699
1874
  #
1700
1875
  # You must specify only one of the following items:
@@ -1789,15 +1964,15 @@ module Aws::Batch
1789
1964
  #
1790
1965
  # : The value for the filter is the time that's before the job was
1791
1966
  # created. This corresponds to the `createdAt` value. The value is a
1792
- # string representation of the number of seconds since 00:00:00 UTC
1793
- # (midnight) on January 1, 1970.
1967
+ # string representation of the number of milliseconds since 00:00:00
1968
+ # UTC (midnight) on January 1, 1970.
1794
1969
  #
1795
1970
  # AFTER\_CREATED\_AT
1796
1971
  #
1797
1972
  # : The value for the filter is the time that's after the job was
1798
1973
  # created. This corresponds to the `createdAt` value. The value is a
1799
- # string representation of the number of seconds since 00:00:00 UTC
1800
- # (midnight) on January 1, 1970.
1974
+ # string representation of the number of milliseconds since 00:00:00
1975
+ # UTC (midnight) on January 1, 1970.
1801
1976
  #
1802
1977
  # @return [Types::ListJobsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1803
1978
  #
@@ -1891,16 +2066,72 @@ module Aws::Batch
1891
2066
  req.send_request(options)
1892
2067
  end
1893
2068
 
2069
+ # Returns a list of Batch scheduling policies.
2070
+ #
2071
+ # @option params [Integer] :max_results
2072
+ # The maximum number of results that's returned by
2073
+ # `ListSchedulingPolicies` in paginated output. When this parameter is
2074
+ # used, `ListSchedulingPolicies` only returns `maxResults` results in a
2075
+ # single page and a `nextToken` response element. You can see the
2076
+ # remaining results of the initial request by sending another
2077
+ # `ListSchedulingPolicies` request with the returned `nextToken` value.
2078
+ # This value can be between 1 and 100. If this parameter isn't used,
2079
+ # `ListSchedulingPolicies` returns up to 100 results and a `nextToken`
2080
+ # value if applicable.
2081
+ #
2082
+ # @option params [String] :next_token
2083
+ # The `nextToken` value that's returned from a previous paginated
2084
+ # `ListSchedulingPolicies` request where `maxResults` was used and the
2085
+ # results exceeded the value of that parameter. Pagination continues
2086
+ # from the end of the previous results that returned the `nextToken`
2087
+ # value. This value is `null` when there are no more results to return.
2088
+ #
2089
+ # <note markdown="1"> This token should be treated as an opaque identifier that's only used
2090
+ # to retrieve the next items in a list and not for other programmatic
2091
+ # purposes.
2092
+ #
2093
+ # </note>
2094
+ #
2095
+ # @return [Types::ListSchedulingPoliciesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2096
+ #
2097
+ # * {Types::ListSchedulingPoliciesResponse#scheduling_policies #scheduling_policies} => Array&lt;Types::SchedulingPolicyListingDetail&gt;
2098
+ # * {Types::ListSchedulingPoliciesResponse#next_token #next_token} => String
2099
+ #
2100
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
2101
+ #
2102
+ # @example Request syntax with placeholder values
2103
+ #
2104
+ # resp = client.list_scheduling_policies({
2105
+ # max_results: 1,
2106
+ # next_token: "String",
2107
+ # })
2108
+ #
2109
+ # @example Response structure
2110
+ #
2111
+ # resp.scheduling_policies #=> Array
2112
+ # resp.scheduling_policies[0].arn #=> String
2113
+ # resp.next_token #=> String
2114
+ #
2115
+ # @see http://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/ListSchedulingPolicies AWS API Documentation
2116
+ #
2117
+ # @overload list_scheduling_policies(params = {})
2118
+ # @param [Hash] params ({})
2119
+ def list_scheduling_policies(params = {}, options = {})
2120
+ req = build_request(:list_scheduling_policies, params)
2121
+ req.send_request(options)
2122
+ end
2123
+
1894
2124
  # Lists the tags for an Batch resource. Batch resources that support
1895
- # tags are compute environments, jobs, job definitions, and job queues.
1896
- # ARNs for child jobs of array and multi-node parallel (MNP) jobs are
1897
- # not supported.
2125
+ # tags are compute environments, jobs, job definitions, job queues, and
2126
+ # scheduling policies. ARNs for child jobs of array and multi-node
2127
+ # parallel (MNP) jobs are not supported.
1898
2128
  #
1899
2129
  # @option params [required, String] :resource_arn
1900
2130
  # The Amazon Resource Name (ARN) that identifies the resource that tags
1901
2131
  # are listed for. Batch resources that support tags are compute
1902
- # environments, jobs, job definitions, and job queues. ARNs for child
1903
- # jobs of array and multi-node parallel (MNP) jobs are not supported.
2132
+ # environments, jobs, job definitions, job queues, and scheduling
2133
+ # policies. ARNs for child jobs of array and multi-node parallel (MNP)
2134
+ # jobs are not supported.
1904
2135
  #
1905
2136
  # @return [Types::ListTagsForResourceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1906
2137
  #
@@ -1947,9 +2178,9 @@ module Aws::Batch
1947
2178
  # Registers an Batch job definition.
1948
2179
  #
1949
2180
  # @option params [required, String] :job_definition_name
1950
- # The name of the job definition to register. Up to 128 letters
1951
- # (uppercase and lowercase), numbers, hyphens, and underscores are
1952
- # allowed.
2181
+ # The name of the job definition to register. It can be up to 128
2182
+ # letters long. It can contain uppercase and lowercase letters, numbers,
2183
+ # hyphens (-), and underscores (\_).
1953
2184
  #
1954
2185
  # @option params [required, String] :type
1955
2186
  # The type of job definition. For more information about multi-node
@@ -1971,6 +2202,15 @@ module Aws::Batch
1971
2202
  # Parameters in a `SubmitJob` request override any corresponding
1972
2203
  # parameter defaults from the job definition.
1973
2204
  #
2205
+ # @option params [Integer] :scheduling_priority
2206
+ # The scheduling priority for jobs that are submitted with this job
2207
+ # definition. This will only affect jobs in job queues with a fair share
2208
+ # policy. Jobs with a higher scheduling priority will be scheduled
2209
+ # before jobs with a lower scheduling priority.
2210
+ #
2211
+ # The minimum supported value is 0 and the maximum supported value is
2212
+ # 9999.
2213
+ #
1974
2214
  # @option params [Types::ContainerProperties] :container_properties
1975
2215
  # An object with various properties specific to single-node
1976
2216
  # container-based jobs. If the job definition's `type` parameter is
@@ -2061,8 +2301,16 @@ module Aws::Batch
2061
2301
  # "10",
2062
2302
  # ],
2063
2303
  # image: "busybox",
2064
- # memory: 128,
2065
- # vcpus: 1,
2304
+ # resource_requirements: [
2305
+ # {
2306
+ # type: "MEMORY",
2307
+ # value: "128",
2308
+ # },
2309
+ # {
2310
+ # type: "VCPU",
2311
+ # value: "1",
2312
+ # },
2313
+ # ],
2066
2314
  # },
2067
2315
  # job_definition_name: "sleep10",
2068
2316
  # })
@@ -2086,8 +2334,16 @@ module Aws::Batch
2086
2334
  # "30",
2087
2335
  # ],
2088
2336
  # image: "busybox",
2089
- # memory: 128,
2090
- # vcpus: 1,
2337
+ # resource_requirements: [
2338
+ # {
2339
+ # type: "MEMORY",
2340
+ # value: "128",
2341
+ # },
2342
+ # {
2343
+ # type: "VCPU",
2344
+ # value: "1",
2345
+ # },
2346
+ # ],
2091
2347
  # },
2092
2348
  # job_definition_name: "sleep30",
2093
2349
  # tags: {
@@ -2111,6 +2367,7 @@ module Aws::Batch
2111
2367
  # parameters: {
2112
2368
  # "String" => "String",
2113
2369
  # },
2370
+ # scheduling_priority: 1,
2114
2371
  # container_properties: {
2115
2372
  # image: "String",
2116
2373
  # vcpus: 1,
@@ -2359,25 +2616,43 @@ module Aws::Batch
2359
2616
  # Submits an Batch job from a job definition. Parameters that are
2360
2617
  # specified during SubmitJob override parameters defined in the job
2361
2618
  # definition. vCPU and memory requirements that are specified in the
2362
- # `ResourceRequirements` objects in the job definition are the
2619
+ # `resourceRequirements` objects in the job definition are the
2363
2620
  # exception. They can't be overridden this way using the `memory` and
2364
2621
  # `vcpus` parameters. Rather, you must specify updates to job definition
2365
2622
  # parameters in a `ResourceRequirements` object that's included in the
2366
2623
  # `containerOverrides` parameter.
2367
2624
  #
2625
+ # <note markdown="1"> Job queues with a scheduling policy are limited to 500 active fair
2626
+ # share identifiers at a time.
2627
+ #
2628
+ # </note>
2629
+ #
2368
2630
  # Jobs that run on Fargate resources can't be guaranteed to run for
2369
2631
  # more than 14 days. This is because, after 14 days, Fargate resources
2370
2632
  # might become unavailable and job might be terminated.
2371
2633
  #
2372
2634
  # @option params [required, String] :job_name
2373
- # The name of the job. The first character must be alphanumeric, and up
2374
- # to 128 letters (uppercase and lowercase), numbers, hyphens, and
2375
- # underscores are allowed.
2635
+ # The name of the job. It can be up to 128 letters long. The first
2636
+ # character must be alphanumeric, can contain uppercase and lowercase
2637
+ # letters, numbers, hyphens (-), and underscores (\_).
2376
2638
  #
2377
2639
  # @option params [required, String] :job_queue
2378
2640
  # The job queue where the job is submitted. You can specify either the
2379
2641
  # name or the Amazon Resource Name (ARN) of the queue.
2380
2642
  #
2643
+ # @option params [String] :share_identifier
2644
+ # The share identifier for the job.
2645
+ #
2646
+ # @option params [Integer] :scheduling_priority_override
2647
+ # The scheduling priority for the job. This will only affect jobs in job
2648
+ # queues with a fair share policy. Jobs with a higher scheduling
2649
+ # priority will be scheduled before jobs with a lower scheduling
2650
+ # priority. This will override any scheduling priority in the job
2651
+ # definition.
2652
+ #
2653
+ # The minimum supported value is 0 and the maximum supported value is
2654
+ # 9999.
2655
+ #
2381
2656
  # @option params [Types::ArrayProperties] :array_properties
2382
2657
  # The array properties for the submitted job, such as the size of the
2383
2658
  # array. The array size can be between 2 and 10,000. If you specify
@@ -2496,6 +2771,8 @@ module Aws::Batch
2496
2771
  # resp = client.submit_job({
2497
2772
  # job_name: "String", # required
2498
2773
  # job_queue: "String", # required
2774
+ # share_identifier: "String",
2775
+ # scheduling_priority_override: 1,
2499
2776
  # array_properties: {
2500
2777
  # size: 1,
2501
2778
  # },
@@ -2593,14 +2870,14 @@ module Aws::Batch
2593
2870
  # request parameters, they aren't changed. When a resource is deleted,
2594
2871
  # the tags that are associated with that resource are deleted as well.
2595
2872
  # Batch resources that support tags are compute environments, jobs, job
2596
- # definitions, and job queues. ARNs for child jobs of array and
2597
- # multi-node parallel (MNP) jobs are not supported.
2873
+ # definitions, job queues, and scheduling policies. ARNs for child jobs
2874
+ # of array and multi-node parallel (MNP) jobs are not supported.
2598
2875
  #
2599
2876
  # @option params [required, String] :resource_arn
2600
2877
  # The Amazon Resource Name (ARN) of the resource that tags are added to.
2601
2878
  # Batch resources that support tags are compute environments, jobs, job
2602
- # definitions, and job queues. ARNs for child jobs of array and
2603
- # multi-node parallel (MNP) jobs are not supported.
2879
+ # definitions, job queues, and scheduling policies. ARNs for child jobs
2880
+ # of array and multi-node parallel (MNP) jobs are not supported.
2604
2881
  #
2605
2882
  # @option params [required, Hash<String,String>] :tags
2606
2883
  # The tags that you apply to the resource to help you categorize and
@@ -2698,8 +2975,9 @@ module Aws::Batch
2698
2975
  # @option params [required, String] :resource_arn
2699
2976
  # The Amazon Resource Name (ARN) of the resource from which to delete
2700
2977
  # tags. Batch resources that support tags are compute environments,
2701
- # jobs, job definitions, and job queues. ARNs for child jobs of array
2702
- # and multi-node parallel (MNP) jobs are not supported.
2978
+ # jobs, job definitions, job queues, and scheduling policies. ARNs for
2979
+ # child jobs of array and multi-node parallel (MNP) jobs are not
2980
+ # supported.
2703
2981
  #
2704
2982
  # @option params [required, Array<String>] :tag_keys
2705
2983
  # The keys of the tags to be removed.
@@ -2761,6 +3039,14 @@ module Aws::Batch
2761
3039
  # environments in the `DISABLED` state don't scale out. However, they
2762
3040
  # scale in to `minvCpus` value after instances become idle.
2763
3041
  #
3042
+ # @option params [Integer] :unmanagedv_cpus
3043
+ # The maximum number of vCPUs expected to be used for an unmanaged
3044
+ # compute environment. This parameter should not be specified for a
3045
+ # managed compute environment. This parameter is only used for fair
3046
+ # share scheduling to reserve vCPU capacity for new share identifiers.
3047
+ # If this parameter is not provided for a fair share job queue, no vCPU
3048
+ # capacity will be reserved.
3049
+ #
2764
3050
  # @option params [Types::ComputeResourceUpdate] :compute_resources
2765
3051
  # Details of the compute resources managed by the compute environment.
2766
3052
  # Required for a managed compute environment. For more information, see
@@ -2824,6 +3110,7 @@ module Aws::Batch
2824
3110
  # resp = client.update_compute_environment({
2825
3111
  # compute_environment: "String", # required
2826
3112
  # state: "ENABLED", # accepts ENABLED, DISABLED
3113
+ # unmanagedv_cpus: 1,
2827
3114
  # compute_resources: {
2828
3115
  # minv_cpus: 1,
2829
3116
  # maxv_cpus: 1,
@@ -2859,6 +3146,14 @@ module Aws::Batch
2859
3146
  # `DISABLED`, new jobs can't be added to the queue, but jobs already in
2860
3147
  # the queue can finish.
2861
3148
  #
3149
+ # @option params [String] :scheduling_policy_arn
3150
+ # Amazon Resource Name (ARN) of the fair share scheduling policy. Once a
3151
+ # job queue is created, the fair share scheduling policy can be replaced
3152
+ # but not removed. The format is
3153
+ # `aws:Partition:batch:Region:Account:scheduling-policy/Name `. For
3154
+ # example,
3155
+ # `aws:aws:batch:us-west-2:012345678910:scheduling-policy/MySchedulingPolicy`.
3156
+ #
2862
3157
  # @option params [Integer] :priority
2863
3158
  # The priority of the job queue. Job queues with a higher priority (or a
2864
3159
  # higher integer value for the `priority` parameter) are evaluated first
@@ -2911,6 +3206,7 @@ module Aws::Batch
2911
3206
  # resp = client.update_job_queue({
2912
3207
  # job_queue: "String", # required
2913
3208
  # state: "ENABLED", # accepts ENABLED, DISABLED
3209
+ # scheduling_policy_arn: "String",
2914
3210
  # priority: 1,
2915
3211
  # compute_environment_order: [
2916
3212
  # {
@@ -2934,6 +3230,41 @@ module Aws::Batch
2934
3230
  req.send_request(options)
2935
3231
  end
2936
3232
 
3233
+ # Updates a scheduling policy.
3234
+ #
3235
+ # @option params [required, String] :arn
3236
+ # The Amazon Resource Name (ARN) of the scheduling policy to update.
3237
+ #
3238
+ # @option params [Types::FairsharePolicy] :fairshare_policy
3239
+ # The fair share policy.
3240
+ #
3241
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
3242
+ #
3243
+ # @example Request syntax with placeholder values
3244
+ #
3245
+ # resp = client.update_scheduling_policy({
3246
+ # arn: "String", # required
3247
+ # fairshare_policy: {
3248
+ # share_decay_seconds: 1,
3249
+ # compute_reservation: 1,
3250
+ # share_distribution: [
3251
+ # {
3252
+ # share_identifier: "String", # required
3253
+ # weight_factor: 1.0,
3254
+ # },
3255
+ # ],
3256
+ # },
3257
+ # })
3258
+ #
3259
+ # @see http://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/UpdateSchedulingPolicy AWS API Documentation
3260
+ #
3261
+ # @overload update_scheduling_policy(params = {})
3262
+ # @param [Hash] params ({})
3263
+ def update_scheduling_policy(params = {}, options = {})
3264
+ req = build_request(:update_scheduling_policy, params)
3265
+ req.send_request(options)
3266
+ end
3267
+
2937
3268
  # @!endgroup
2938
3269
 
2939
3270
  # @param params ({})
@@ -2947,7 +3278,7 @@ module Aws::Batch
2947
3278
  params: params,
2948
3279
  config: config)
2949
3280
  context[:gem_name] = 'aws-sdk-batch'
2950
- context[:gem_version] = '1.53.0'
3281
+ context[:gem_version] = '1.57.0'
2951
3282
  Seahorse::Client::Request.new(handlers, context)
2952
3283
  end
2953
3284