aws-sdk-batch 1.110.0 → 1.111.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -686,9 +686,9 @@ module Aws::Batch
686
686
  #
687
687
  # @option params [Integer] :unmanagedv_cpus
688
688
  # The maximum number of vCPUs for an unmanaged compute environment. This
689
- # parameter is only used for fair-share scheduling to reserve vCPU
689
+ # parameter is only used for fair share scheduling to reserve vCPU
690
690
  # capacity for new share identifiers. If this parameter isn't provided
691
- # for a fair-share job queue, no vCPU capacity is reserved.
691
+ # for a fair share job queue, no vCPU capacity is reserved.
692
692
  #
693
693
  # <note markdown="1"> This parameter is only supported when the `type` parameter is set to
694
694
  # `UNMANAGED`.
@@ -924,6 +924,84 @@ module Aws::Batch
924
924
  req.send_request(options)
925
925
  end
926
926
 
927
+ # Creates an Batch consumable resource.
928
+ #
929
+ # @option params [required, String] :consumable_resource_name
930
+ # The name of the consumable resource. Must be unique.
931
+ #
932
+ # @option params [Integer] :total_quantity
933
+ # The total amount of the consumable resource that is available. Must be
934
+ # non-negative.
935
+ #
936
+ # @option params [String] :resource_type
937
+ # Indicates whether the resource is available to be re-used after a job
938
+ # completes. Can be one of:
939
+ #
940
+ # * `REPLENISHABLE` (default)
941
+ #
942
+ # * `NON_REPLENISHABLE`
943
+ #
944
+ # @option params [Hash<String,String>] :tags
945
+ # The tags that you apply to the consumable resource to help you
946
+ # categorize and organize your resources. Each tag consists of a key and
947
+ # an optional value. For more information, see [Tagging your Batch
948
+ # resources][1].
949
+ #
950
+ #
951
+ #
952
+ # [1]: https://docs.aws.amazon.com/batch/latest/userguide/using-tags.html
953
+ #
954
+ # @return [Types::CreateConsumableResourceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
955
+ #
956
+ # * {Types::CreateConsumableResourceResponse#consumable_resource_name #consumable_resource_name} => String
957
+ # * {Types::CreateConsumableResourceResponse#consumable_resource_arn #consumable_resource_arn} => String
958
+ #
959
+ #
960
+ # @example Example: To create a consumable resource
961
+ #
962
+ # # Creates a Batch consumable resource.
963
+ #
964
+ # resp = client.create_consumable_resource({
965
+ # consumable_resource_name: "myConsumableResource",
966
+ # resource_type: "REPLENISHABLE",
967
+ # tags: {
968
+ # "Department" => "Engineering",
969
+ # "User" => "JaneDoe",
970
+ # },
971
+ # total_quantity: 123,
972
+ # })
973
+ #
974
+ # resp.to_h outputs the following:
975
+ # {
976
+ # consumable_resource_arn: "arn:aws:batch:us-east-1:012345678910:consumable-resource/myConsumableResource",
977
+ # consumable_resource_name: "myConsumableResource",
978
+ # }
979
+ #
980
+ # @example Request syntax with placeholder values
981
+ #
982
+ # resp = client.create_consumable_resource({
983
+ # consumable_resource_name: "String", # required
984
+ # total_quantity: 1,
985
+ # resource_type: "String",
986
+ # tags: {
987
+ # "TagKey" => "TagValue",
988
+ # },
989
+ # })
990
+ #
991
+ # @example Response structure
992
+ #
993
+ # resp.consumable_resource_name #=> String
994
+ # resp.consumable_resource_arn #=> String
995
+ #
996
+ # @see http://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/CreateConsumableResource AWS API Documentation
997
+ #
998
+ # @overload create_consumable_resource(params = {})
999
+ # @param [Hash] params ({})
1000
+ def create_consumable_resource(params = {}, options = {})
1001
+ req = build_request(:create_consumable_resource, params)
1002
+ req.send_request(options)
1003
+ end
1004
+
927
1005
  # Creates an Batch job queue. When you create a job queue, you associate
928
1006
  # one or more compute environments to the queue and assign an order of
929
1007
  # preference for the compute environments.
@@ -946,11 +1024,10 @@ module Aws::Batch
946
1024
  # finish.
947
1025
  #
948
1026
  # @option params [String] :scheduling_policy_arn
949
- # The Amazon Resource Name (ARN) of the fair-share scheduling policy.
950
- # Job queues that don't have a fair-share scheduling policy are
951
- # scheduled in a first-in, first-out (FIFO) model. After a job queue has
952
- # a fair-share scheduling policy, it can be replaced but can't be
953
- # removed.
1027
+ # The Amazon Resource Name (ARN) of the fair share scheduling policy.
1028
+ # Job queues that don't have a scheduling policy are scheduled in a
1029
+ # first-in, first-out (FIFO) model. After a job queue has a scheduling
1030
+ # policy, it can be replaced but can't be removed.
954
1031
  #
955
1032
  # The format is
956
1033
  # `aws:Partition:batch:Region:Account:scheduling-policy/Name `.
@@ -958,11 +1035,11 @@ module Aws::Batch
958
1035
  # An example is
959
1036
  # `aws:aws:batch:us-west-2:123456789012:scheduling-policy/MySchedulingPolicy`.
960
1037
  #
961
- # A job queue without a fair-share scheduling policy is scheduled as a
962
- # FIFO job queue and can't have a fair-share scheduling policy added.
963
- # Jobs queues with a fair-share scheduling policy can have a maximum of
964
- # 500 active share identifiers. When the limit has been reached,
965
- # submissions of any jobs that add a new share identifier fail.
1038
+ # A job queue without a scheduling policy is scheduled as a FIFO job
1039
+ # queue and can't have a scheduling policy added. Jobs queues with a
1040
+ # scheduling policy can have a maximum of 500 active fair share
1041
+ # identifiers. When the limit has been reached, submissions of any jobs
1042
+ # that add a new fair share identifier fail.
966
1043
  #
967
1044
  # @option params [required, Integer] :priority
968
1045
  # The priority of the job queue. Job queues with a higher priority (or a
@@ -1105,12 +1182,12 @@ module Aws::Batch
1105
1182
  # Creates an Batch scheduling policy.
1106
1183
  #
1107
1184
  # @option params [required, String] :name
1108
- # The name of the fair-share scheduling policy. It can be up to 128
1109
- # letters long. It can contain uppercase and lowercase letters, numbers,
1110
- # hyphens (-), and underscores (\_).
1185
+ # The name of the scheduling policy. It can be up to 128 letters long.
1186
+ # It can contain uppercase and lowercase letters, numbers, hyphens (-),
1187
+ # and underscores (\_).
1111
1188
  #
1112
1189
  # @option params [Types::FairsharePolicy] :fairshare_policy
1113
- # The fair-share scheduling policy details.
1190
+ # The fair share policy of the scheduling policy.
1114
1191
  #
1115
1192
  # @option params [Hash<String,String>] :tags
1116
1193
  # The tags that you apply to the scheduling policy to help you
@@ -1209,6 +1286,41 @@ module Aws::Batch
1209
1286
  req.send_request(options)
1210
1287
  end
1211
1288
 
1289
+ # Deletes the specified consumable resource.
1290
+ #
1291
+ # @option params [required, String] :consumable_resource
1292
+ # The name or ARN of the consumable resource that will be deleted.
1293
+ #
1294
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1295
+ #
1296
+ #
1297
+ # @example Example: To delete a consumable resource
1298
+ #
1299
+ # # Deletes the specified consumable resource.
1300
+ #
1301
+ # resp = client.delete_consumable_resource({
1302
+ # consumable_resource: "myConsumableResource",
1303
+ # })
1304
+ #
1305
+ # resp.to_h outputs the following:
1306
+ # {
1307
+ # }
1308
+ #
1309
+ # @example Request syntax with placeholder values
1310
+ #
1311
+ # resp = client.delete_consumable_resource({
1312
+ # consumable_resource: "String", # required
1313
+ # })
1314
+ #
1315
+ # @see http://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DeleteConsumableResource AWS API Documentation
1316
+ #
1317
+ # @overload delete_consumable_resource(params = {})
1318
+ # @param [Hash] params ({})
1319
+ def delete_consumable_resource(params = {}, options = {})
1320
+ req = build_request(:delete_consumable_resource, params)
1321
+ req.send_request(options)
1322
+ end
1323
+
1212
1324
  # Deletes the specified job queue. You must first disable submissions
1213
1325
  # for a queue with the UpdateJobQueue operation. All jobs in the queue
1214
1326
  # are eventually terminated when you delete a job queue. The jobs are
@@ -1474,6 +1586,74 @@ module Aws::Batch
1474
1586
  req.send_request(options)
1475
1587
  end
1476
1588
 
1589
+ # Returns a description of the specified consumable resource.
1590
+ #
1591
+ # @option params [required, String] :consumable_resource
1592
+ # The name or ARN of the consumable resource whose description will be
1593
+ # returned.
1594
+ #
1595
+ # @return [Types::DescribeConsumableResourceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1596
+ #
1597
+ # * {Types::DescribeConsumableResourceResponse#consumable_resource_name #consumable_resource_name} => String
1598
+ # * {Types::DescribeConsumableResourceResponse#consumable_resource_arn #consumable_resource_arn} => String
1599
+ # * {Types::DescribeConsumableResourceResponse#total_quantity #total_quantity} => Integer
1600
+ # * {Types::DescribeConsumableResourceResponse#in_use_quantity #in_use_quantity} => Integer
1601
+ # * {Types::DescribeConsumableResourceResponse#available_quantity #available_quantity} => Integer
1602
+ # * {Types::DescribeConsumableResourceResponse#resource_type #resource_type} => String
1603
+ # * {Types::DescribeConsumableResourceResponse#created_at #created_at} => Integer
1604
+ # * {Types::DescribeConsumableResourceResponse#tags #tags} => Hash&lt;String,String&gt;
1605
+ #
1606
+ #
1607
+ # @example Example: To get a description of a consumable resource
1608
+ #
1609
+ # # Returns a description of the specified consumable resource.
1610
+ #
1611
+ # resp = client.describe_consumable_resource({
1612
+ # consumable_resource: "myConsumableResource",
1613
+ # })
1614
+ #
1615
+ # resp.to_h outputs the following:
1616
+ # {
1617
+ # available_quantity: 123,
1618
+ # consumable_resource_arn: "arn:aws:batch:us-east-1:012345678910:consumable-resource/myConsumableResource",
1619
+ # consumable_resource_name: "myConsumableResource",
1620
+ # created_at: 123,
1621
+ # in_use_quantity: 123,
1622
+ # resource_type: "REPLENISHABLE",
1623
+ # tags: {
1624
+ # "Department" => "Engineering",
1625
+ # "User" => "JaneDoe",
1626
+ # },
1627
+ # total_quantity: 123,
1628
+ # }
1629
+ #
1630
+ # @example Request syntax with placeholder values
1631
+ #
1632
+ # resp = client.describe_consumable_resource({
1633
+ # consumable_resource: "String", # required
1634
+ # })
1635
+ #
1636
+ # @example Response structure
1637
+ #
1638
+ # resp.consumable_resource_name #=> String
1639
+ # resp.consumable_resource_arn #=> String
1640
+ # resp.total_quantity #=> Integer
1641
+ # resp.in_use_quantity #=> Integer
1642
+ # resp.available_quantity #=> Integer
1643
+ # resp.resource_type #=> String
1644
+ # resp.created_at #=> Integer
1645
+ # resp.tags #=> Hash
1646
+ # resp.tags["TagKey"] #=> String
1647
+ #
1648
+ # @see http://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeConsumableResource AWS API Documentation
1649
+ #
1650
+ # @overload describe_consumable_resource(params = {})
1651
+ # @param [Hash] params ({})
1652
+ def describe_consumable_resource(params = {}, options = {})
1653
+ req = build_request(:describe_consumable_resource, params)
1654
+ req.send_request(options)
1655
+ end
1656
+
1477
1657
  # Describes a list of job definitions. You can specify a `status` (such
1478
1658
  # as `ACTIVE`) to only return job definitions that match that status.
1479
1659
  #
@@ -1868,6 +2048,9 @@ module Aws::Batch
1868
2048
  # resp.job_definitions[0].node_properties.node_range_properties[0].eks_properties.pod_properties.metadata.annotations["String"] #=> String
1869
2049
  # resp.job_definitions[0].node_properties.node_range_properties[0].eks_properties.pod_properties.metadata.namespace #=> String
1870
2050
  # resp.job_definitions[0].node_properties.node_range_properties[0].eks_properties.pod_properties.share_process_namespace #=> Boolean
2051
+ # resp.job_definitions[0].node_properties.node_range_properties[0].consumable_resource_properties.consumable_resource_list #=> Array
2052
+ # resp.job_definitions[0].node_properties.node_range_properties[0].consumable_resource_properties.consumable_resource_list[0].consumable_resource #=> String
2053
+ # resp.job_definitions[0].node_properties.node_range_properties[0].consumable_resource_properties.consumable_resource_list[0].quantity #=> Integer
1871
2054
  # resp.job_definitions[0].tags #=> Hash
1872
2055
  # resp.job_definitions[0].tags["TagKey"] #=> String
1873
2056
  # resp.job_definitions[0].propagate_tags #=> Boolean
@@ -2015,6 +2198,9 @@ module Aws::Batch
2015
2198
  # resp.job_definitions[0].eks_properties.pod_properties.metadata.namespace #=> String
2016
2199
  # resp.job_definitions[0].eks_properties.pod_properties.share_process_namespace #=> Boolean
2017
2200
  # resp.job_definitions[0].container_orchestration_type #=> String, one of "ECS", "EKS"
2201
+ # resp.job_definitions[0].consumable_resource_properties.consumable_resource_list #=> Array
2202
+ # resp.job_definitions[0].consumable_resource_properties.consumable_resource_list[0].consumable_resource #=> String
2203
+ # resp.job_definitions[0].consumable_resource_properties.consumable_resource_list[0].quantity #=> Integer
2018
2204
  # resp.next_token #=> String
2019
2205
  #
2020
2206
  # @see http://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeJobDefinitions AWS API Documentation
@@ -2531,6 +2717,9 @@ module Aws::Batch
2531
2717
  # resp.jobs[0].node_properties.node_range_properties[0].eks_properties.pod_properties.metadata.annotations["String"] #=> String
2532
2718
  # resp.jobs[0].node_properties.node_range_properties[0].eks_properties.pod_properties.metadata.namespace #=> String
2533
2719
  # resp.jobs[0].node_properties.node_range_properties[0].eks_properties.pod_properties.share_process_namespace #=> Boolean
2720
+ # resp.jobs[0].node_properties.node_range_properties[0].consumable_resource_properties.consumable_resource_list #=> Array
2721
+ # resp.jobs[0].node_properties.node_range_properties[0].consumable_resource_properties.consumable_resource_list[0].consumable_resource #=> String
2722
+ # resp.jobs[0].node_properties.node_range_properties[0].consumable_resource_properties.consumable_resource_list[0].quantity #=> Integer
2534
2723
  # resp.jobs[0].array_properties.status_summary #=> Hash
2535
2724
  # resp.jobs[0].array_properties.status_summary["String"] #=> Integer
2536
2725
  # resp.jobs[0].array_properties.size #=> Integer
@@ -2717,6 +2906,9 @@ module Aws::Batch
2717
2906
  # resp.jobs[0].ecs_properties.task_properties[0].volumes[0].efs_volume_configuration.authorization_config.iam #=> String, one of "ENABLED", "DISABLED"
2718
2907
  # resp.jobs[0].is_cancelled #=> Boolean
2719
2908
  # resp.jobs[0].is_terminated #=> Boolean
2909
+ # resp.jobs[0].consumable_resource_properties.consumable_resource_list #=> Array
2910
+ # resp.jobs[0].consumable_resource_properties.consumable_resource_list[0].consumable_resource #=> String
2911
+ # resp.jobs[0].consumable_resource_properties.consumable_resource_list[0].quantity #=> Integer
2720
2912
  #
2721
2913
  # @see http://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeJobs AWS API Documentation
2722
2914
  #
@@ -2797,6 +2989,112 @@ module Aws::Batch
2797
2989
  req.send_request(options)
2798
2990
  end
2799
2991
 
2992
+ # Returns a list of Batch consumable resources.
2993
+ #
2994
+ # @option params [Array<Types::KeyValuesPair>] :filters
2995
+ # The filters to apply to the consumable resource list query. If used,
2996
+ # only those consumable resources that match the filter are listed.
2997
+ # Filter names and values can be:
2998
+ #
2999
+ # * name: `CONSUMABLE_RESOURCE_NAME `
3000
+ #
3001
+ # values: case-insensitive matches for the consumable resource name.
3002
+ # If a filter value ends with an asterisk (*), it matches any
3003
+ # consumable resource name that begins with the string before the
3004
+ # '*'.
3005
+ #
3006
+ # @option params [Integer] :max_results
3007
+ # The maximum number of results returned by `ListConsumableResources` in
3008
+ # paginated output. When this parameter is used,
3009
+ # `ListConsumableResources` only returns `maxResults` results in a
3010
+ # single page and a `nextToken` response element. The remaining results
3011
+ # of the initial request can be seen by sending another
3012
+ # `ListConsumableResources` request with the returned `nextToken` value.
3013
+ # This value can be between 1 and 100. If this parameter isn't used,
3014
+ # then `ListConsumableResources` returns up to 100 results and a
3015
+ # `nextToken` value if applicable.
3016
+ #
3017
+ # @option params [String] :next_token
3018
+ # The `nextToken` value returned from a previous paginated
3019
+ # `ListConsumableResources` request where `maxResults` was used and the
3020
+ # results exceeded the value of that parameter. Pagination continues
3021
+ # from the end of the previous results that returned the `nextToken`
3022
+ # value. This value is `null` when there are no more results to return.
3023
+ #
3024
+ # <note markdown="1"> Treat this token as an opaque identifier that's only used to retrieve
3025
+ # the next items in a list and not for other programmatic purposes.
3026
+ #
3027
+ # </note>
3028
+ #
3029
+ # @return [Types::ListConsumableResourcesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
3030
+ #
3031
+ # * {Types::ListConsumableResourcesResponse#consumable_resources #consumable_resources} => Array&lt;Types::ConsumableResourceSummary&gt;
3032
+ # * {Types::ListConsumableResourcesResponse#next_token #next_token} => String
3033
+ #
3034
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
3035
+ #
3036
+ #
3037
+ # @example Example: To get a list of a consumable resources
3038
+ #
3039
+ # # Returns a list of the consumable resources for your account.
3040
+ #
3041
+ # resp = client.list_consumable_resources({
3042
+ # filters: [
3043
+ # {
3044
+ # name: "CONSUMABLE_RESOURCE_NAME",
3045
+ # values: [
3046
+ # "my*",
3047
+ # ],
3048
+ # },
3049
+ # ],
3050
+ # max_results: 123,
3051
+ # })
3052
+ #
3053
+ # resp.to_h outputs the following:
3054
+ # {
3055
+ # consumable_resources: [
3056
+ # {
3057
+ # consumable_resource_arn: "arn:aws:batch:us-east-1:012345678910:consumable-resource/myConsumableResource",
3058
+ # consumable_resource_name: "myConsumableResource",
3059
+ # in_use_quantity: 12,
3060
+ # resource_type: "REPLENISHABLE",
3061
+ # total_quantity: 123,
3062
+ # },
3063
+ # ],
3064
+ # }
3065
+ #
3066
+ # @example Request syntax with placeholder values
3067
+ #
3068
+ # resp = client.list_consumable_resources({
3069
+ # filters: [
3070
+ # {
3071
+ # name: "String",
3072
+ # values: ["String"],
3073
+ # },
3074
+ # ],
3075
+ # max_results: 1,
3076
+ # next_token: "String",
3077
+ # })
3078
+ #
3079
+ # @example Response structure
3080
+ #
3081
+ # resp.consumable_resources #=> Array
3082
+ # resp.consumable_resources[0].consumable_resource_arn #=> String
3083
+ # resp.consumable_resources[0].consumable_resource_name #=> String
3084
+ # resp.consumable_resources[0].total_quantity #=> Integer
3085
+ # resp.consumable_resources[0].in_use_quantity #=> Integer
3086
+ # resp.consumable_resources[0].resource_type #=> String
3087
+ # resp.next_token #=> String
3088
+ #
3089
+ # @see http://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/ListConsumableResources AWS API Documentation
3090
+ #
3091
+ # @overload list_consumable_resources(params = {})
3092
+ # @param [Hash] params ({})
3093
+ def list_consumable_resources(params = {}, options = {})
3094
+ req = build_request(:list_consumable_resources, params)
3095
+ req.send_request(options)
3096
+ end
3097
+
2800
3098
  # Returns a list of Batch jobs.
2801
3099
  #
2802
3100
  # You must specify only one of the following items:
@@ -3002,6 +3300,141 @@ module Aws::Batch
3002
3300
  req.send_request(options)
3003
3301
  end
3004
3302
 
3303
+ # Returns a list of Batch jobs that require a specific consumable
3304
+ # resource.
3305
+ #
3306
+ # @option params [required, String] :consumable_resource
3307
+ # The name or ARN of the consumable resource.
3308
+ #
3309
+ # @option params [Array<Types::KeyValuesPair>] :filters
3310
+ # The filters to apply to the job list query. If used, only those jobs
3311
+ # requiring the specified consumable resource (`consumableResource`) and
3312
+ # that match the value of the filters are listed. The filter names and
3313
+ # values can be:
3314
+ #
3315
+ # * name: `JOB_STATUS`
3316
+ #
3317
+ # values: `SUBMITTED | PENDING | RUNNABLE | STARTING | RUNNING |
3318
+ # SUCCEEDED | FAILED`
3319
+ #
3320
+ # * name: `JOB_NAME `
3321
+ #
3322
+ # The values are case-insensitive matches for the job name. If a
3323
+ # filter value ends with an asterisk (*), it matches any job name
3324
+ # that begins with the string before the '*'.
3325
+ #
3326
+ # @option params [Integer] :max_results
3327
+ # The maximum number of results returned by
3328
+ # `ListJobsByConsumableResource` in paginated output. When this
3329
+ # parameter is used, `ListJobsByConsumableResource` only returns
3330
+ # `maxResults` results in a single page and a `nextToken` response
3331
+ # element. The remaining results of the initial request can be seen by
3332
+ # sending another `ListJobsByConsumableResource` request with the
3333
+ # returned `nextToken` value. This value can be between 1 and 100. If
3334
+ # this parameter isn't used, then `ListJobsByConsumableResource`
3335
+ # returns up to 100 results and a `nextToken` value if applicable.
3336
+ #
3337
+ # @option params [String] :next_token
3338
+ # The `nextToken` value returned from a previous paginated
3339
+ # `ListJobsByConsumableResource` request where `maxResults` was used and
3340
+ # the results exceeded the value of that parameter. Pagination continues
3341
+ # from the end of the previous results that returned the `nextToken`
3342
+ # value. This value is `null` when there are no more results to return.
3343
+ #
3344
+ # <note markdown="1"> Treat this token as an opaque identifier that's only used to retrieve
3345
+ # the next items in a list and not for other programmatic purposes.
3346
+ #
3347
+ # </note>
3348
+ #
3349
+ # @return [Types::ListJobsByConsumableResourceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
3350
+ #
3351
+ # * {Types::ListJobsByConsumableResourceResponse#jobs #jobs} => Array&lt;Types::ListJobsByConsumableResourceSummary&gt;
3352
+ # * {Types::ListJobsByConsumableResourceResponse#next_token #next_token} => String
3353
+ #
3354
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
3355
+ #
3356
+ #
3357
+ # @example Example: To get a list of Batch jobs by consumable resource
3358
+ #
3359
+ # # Returns a list of Batch jobs that require a specific consumable resource.
3360
+ #
3361
+ # resp = client.list_jobs_by_consumable_resource({
3362
+ # consumable_resource: "myConsumableResource",
3363
+ # filters: [
3364
+ # {
3365
+ # name: "CONSUMABLE_RESOURCE_NAME",
3366
+ # values: [
3367
+ # "my*",
3368
+ # ],
3369
+ # },
3370
+ # ],
3371
+ # max_results: 123,
3372
+ # })
3373
+ #
3374
+ # resp.to_h outputs the following:
3375
+ # {
3376
+ # jobs: [
3377
+ # {
3378
+ # consumable_resource_properties: {
3379
+ # consumable_resource_list: [
3380
+ # {
3381
+ # consumable_resource: "myConsumableResource",
3382
+ # quantity: 123,
3383
+ # },
3384
+ # ],
3385
+ # },
3386
+ # created_at: 1480460782010,
3387
+ # job_arn: "arn:aws:batch:us-east-1:012345678910:job/myJob",
3388
+ # job_definition_arn: "arn:aws:batch:us-east-1:012345678910:job-definition/myJobDef",
3389
+ # job_name: "myJob",
3390
+ # job_queue_arn: "arn:aws:batch:us-east-1:012345678910:job-queue/myJobQueue",
3391
+ # job_status: "PENDING",
3392
+ # quantity: 123,
3393
+ # },
3394
+ # ],
3395
+ # }
3396
+ #
3397
+ # @example Request syntax with placeholder values
3398
+ #
3399
+ # resp = client.list_jobs_by_consumable_resource({
3400
+ # consumable_resource: "String", # required
3401
+ # filters: [
3402
+ # {
3403
+ # name: "String",
3404
+ # values: ["String"],
3405
+ # },
3406
+ # ],
3407
+ # max_results: 1,
3408
+ # next_token: "String",
3409
+ # })
3410
+ #
3411
+ # @example Response structure
3412
+ #
3413
+ # resp.jobs #=> Array
3414
+ # resp.jobs[0].job_arn #=> String
3415
+ # resp.jobs[0].job_queue_arn #=> String
3416
+ # resp.jobs[0].job_name #=> String
3417
+ # resp.jobs[0].job_definition_arn #=> String
3418
+ # resp.jobs[0].share_identifier #=> String
3419
+ # resp.jobs[0].job_status #=> String
3420
+ # resp.jobs[0].quantity #=> Integer
3421
+ # resp.jobs[0].status_reason #=> String
3422
+ # resp.jobs[0].started_at #=> Integer
3423
+ # resp.jobs[0].created_at #=> Integer
3424
+ # resp.jobs[0].consumable_resource_properties.consumable_resource_list #=> Array
3425
+ # resp.jobs[0].consumable_resource_properties.consumable_resource_list[0].consumable_resource #=> String
3426
+ # resp.jobs[0].consumable_resource_properties.consumable_resource_list[0].quantity #=> Integer
3427
+ # resp.next_token #=> String
3428
+ #
3429
+ # @see http://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/ListJobsByConsumableResource AWS API Documentation
3430
+ #
3431
+ # @overload list_jobs_by_consumable_resource(params = {})
3432
+ # @param [Hash] params ({})
3433
+ def list_jobs_by_consumable_resource(params = {}, options = {})
3434
+ req = build_request(:list_jobs_by_consumable_resource, params)
3435
+ req.send_request(options)
3436
+ end
3437
+
3005
3438
  # Returns a list of Batch scheduling policies.
3006
3439
  #
3007
3440
  # @option params [Integer] :max_results
@@ -3144,7 +3577,7 @@ module Aws::Batch
3144
3577
  #
3145
3578
  # @option params [Integer] :scheduling_priority
3146
3579
  # The scheduling priority for jobs that are submitted with this job
3147
- # definition. This only affects jobs in job queues with a fair-share
3580
+ # definition. This only affects jobs in job queues with a fair share
3148
3581
  # policy. Jobs with a higher scheduling priority are scheduled before
3149
3582
  # jobs with a lower scheduling priority.
3150
3583
  #
@@ -3244,6 +3677,9 @@ module Aws::Batch
3244
3677
  # An object with properties that are specific to Amazon ECS-based jobs.
3245
3678
  # This must not be specified for Amazon EKS-based job definitions.
3246
3679
  #
3680
+ # @option params [Types::ConsumableResourceProperties] :consumable_resource_properties
3681
+ # Contains a list of consumable resources required by the job.
3682
+ #
3247
3683
  # @return [Types::RegisterJobDefinitionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
3248
3684
  #
3249
3685
  # * {Types::RegisterJobDefinitionResponse#job_definition_name #job_definition_name} => String
@@ -3800,6 +4236,14 @@ module Aws::Batch
3800
4236
  # share_process_namespace: false,
3801
4237
  # },
3802
4238
  # },
4239
+ # consumable_resource_properties: {
4240
+ # consumable_resource_list: [
4241
+ # {
4242
+ # consumable_resource: "String",
4243
+ # quantity: 1,
4244
+ # },
4245
+ # ],
4246
+ # },
3803
4247
  # },
3804
4248
  # ],
3805
4249
  # },
@@ -4065,6 +4509,14 @@ module Aws::Batch
4065
4509
  # },
4066
4510
  # ],
4067
4511
  # },
4512
+ # consumable_resource_properties: {
4513
+ # consumable_resource_list: [
4514
+ # {
4515
+ # consumable_resource: "String",
4516
+ # quantity: 1,
4517
+ # },
4518
+ # ],
4519
+ # },
4068
4520
  # })
4069
4521
  #
4070
4522
  # @example Response structure
@@ -4091,8 +4543,8 @@ module Aws::Batch
4091
4543
  # parameters in a `resourceRequirements` object that's included in the
4092
4544
  # `containerOverrides` parameter.
4093
4545
  #
4094
- # <note markdown="1"> Job queues with a scheduling policy are limited to 500 active share
4095
- # identifiers at a time.
4546
+ # <note markdown="1"> Job queues with a scheduling policy are limited to 500 active fair
4547
+ # share identifiers at a time.
4096
4548
  #
4097
4549
  # </note>
4098
4550
  #
@@ -4111,16 +4563,15 @@ module Aws::Batch
4111
4563
  #
4112
4564
  # @option params [String] :share_identifier
4113
4565
  # The share identifier for the job. Don't specify this parameter if the
4114
- # job queue doesn't have a fair-share scheduling policy. If the job
4115
- # queue has a fair-share scheduling policy, then this parameter must be
4116
- # specified.
4566
+ # job queue doesn't have a scheduling policy. If the job queue has a
4567
+ # scheduling policy, then this parameter must be specified.
4117
4568
  #
4118
4569
  # This string is limited to 255 alphanumeric characters, and can be
4119
4570
  # followed by an asterisk (*).
4120
4571
  #
4121
4572
  # @option params [Integer] :scheduling_priority_override
4122
4573
  # The scheduling priority for the job. This only affects jobs in job
4123
- # queues with a fair-share policy. Jobs with a higher scheduling
4574
+ # queues with a fair share policy. Jobs with a higher scheduling
4124
4575
  # priority are scheduled before jobs with a lower scheduling priority.
4125
4576
  # This overrides any scheduling priority in the job definition and works
4126
4577
  # only within a single share identifier.
@@ -4232,6 +4683,10 @@ module Aws::Batch
4232
4683
  # definition, can only be specified for jobs that are run on Amazon ECS
4233
4684
  # resources.
4234
4685
  #
4686
+ # @option params [Types::ConsumableResourceProperties] :consumable_resource_properties_override
4687
+ # An object that contains overrides for the consumable resources of a
4688
+ # job.
4689
+ #
4235
4690
  # @return [Types::SubmitJobResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
4236
4691
  #
4237
4692
  # * {Types::SubmitJobResponse#job_arn #job_arn} => String
@@ -4398,6 +4853,14 @@ module Aws::Batch
4398
4853
  # },
4399
4854
  # },
4400
4855
  # },
4856
+ # consumable_resource_properties_override: {
4857
+ # consumable_resource_list: [
4858
+ # {
4859
+ # consumable_resource: "String",
4860
+ # quantity: 1,
4861
+ # },
4862
+ # ],
4863
+ # },
4401
4864
  # },
4402
4865
  # ],
4403
4866
  # },
@@ -4500,6 +4963,14 @@ module Aws::Batch
4500
4963
  # },
4501
4964
  # ],
4502
4965
  # },
4966
+ # consumable_resource_properties_override: {
4967
+ # consumable_resource_list: [
4968
+ # {
4969
+ # consumable_resource: "String",
4970
+ # quantity: 1,
4971
+ # },
4972
+ # ],
4973
+ # },
4503
4974
  # })
4504
4975
  #
4505
4976
  # @example Response structure
@@ -4712,9 +5183,9 @@ module Aws::Batch
4712
5183
  # @option params [Integer] :unmanagedv_cpus
4713
5184
  # The maximum number of vCPUs expected to be used for an unmanaged
4714
5185
  # compute environment. Don't specify this parameter for a managed
4715
- # compute environment. This parameter is only used for fair-share
5186
+ # compute environment. This parameter is only used for fair share
4716
5187
  # scheduling to reserve vCPU capacity for new share identifiers. If this
4717
- # parameter isn't provided for a fair-share job queue, no vCPU capacity
5188
+ # parameter isn't provided for a fair share job queue, no vCPU capacity
4718
5189
  # is reserved.
4719
5190
  #
4720
5191
  # @option params [Types::ComputeResourceUpdate] :compute_resources
@@ -4859,6 +5330,94 @@ module Aws::Batch
4859
5330
  req.send_request(options)
4860
5331
  end
4861
5332
 
5333
+ # Updates a consumable resource.
5334
+ #
5335
+ # @option params [required, String] :consumable_resource
5336
+ # The name or ARN of the consumable resource to be updated.
5337
+ #
5338
+ # @option params [String] :operation
5339
+ # Indicates how the quantity of the consumable resource will be updated.
5340
+ # Must be one of:
5341
+ #
5342
+ # * `SET`
5343
+ #
5344
+ # Sets the quantity of the resource to the value specified by the
5345
+ # `quantity` parameter.
5346
+ #
5347
+ # * `ADD`
5348
+ #
5349
+ # Increases the quantity of the resource by the value specified by the
5350
+ # `quantity` parameter.
5351
+ #
5352
+ # * `REMOVE`
5353
+ #
5354
+ # Reduces the quantity of the resource by the value specified by the
5355
+ # `quantity` parameter.
5356
+ #
5357
+ # @option params [Integer] :quantity
5358
+ # The change in the total quantity of the consumable resource. The
5359
+ # `operation` parameter determines whether the value specified here will
5360
+ # be the new total quantity, or the amount by which the total quantity
5361
+ # will be increased or reduced. Must be a non-negative value.
5362
+ #
5363
+ # @option params [String] :client_token
5364
+ # If this parameter is specified and two update requests with identical
5365
+ # payloads and `clientToken`s are received, these requests are
5366
+ # considered the same request and the second request is rejected. A
5367
+ # `clientToken` is valid for 8 hours or until one hour after the
5368
+ # consumable resource is deleted, whichever is less.
5369
+ #
5370
+ # **A suitable default value is auto-generated.** You should normally
5371
+ # not need to pass this option.**
5372
+ #
5373
+ # @return [Types::UpdateConsumableResourceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
5374
+ #
5375
+ # * {Types::UpdateConsumableResourceResponse#consumable_resource_name #consumable_resource_name} => String
5376
+ # * {Types::UpdateConsumableResourceResponse#consumable_resource_arn #consumable_resource_arn} => String
5377
+ # * {Types::UpdateConsumableResourceResponse#total_quantity #total_quantity} => Integer
5378
+ #
5379
+ #
5380
+ # @example Example: To update a consumable resource
5381
+ #
5382
+ # # Updates a consumable resource.
5383
+ #
5384
+ # resp = client.update_consumable_resource({
5385
+ # consumable_resource: "myConsumableResource",
5386
+ # operation: "ADD",
5387
+ # quantity: 12,
5388
+ # })
5389
+ #
5390
+ # resp.to_h outputs the following:
5391
+ # {
5392
+ # consumable_resource_arn: "arn:aws:batch:us-east-1:012345678910:consumable-resource/myConsumableResource",
5393
+ # consumable_resource_name: "myConsumableResource",
5394
+ # total_quantity: 135,
5395
+ # }
5396
+ #
5397
+ # @example Request syntax with placeholder values
5398
+ #
5399
+ # resp = client.update_consumable_resource({
5400
+ # consumable_resource: "String", # required
5401
+ # operation: "String",
5402
+ # quantity: 1,
5403
+ # client_token: "ClientRequestToken",
5404
+ # })
5405
+ #
5406
+ # @example Response structure
5407
+ #
5408
+ # resp.consumable_resource_name #=> String
5409
+ # resp.consumable_resource_arn #=> String
5410
+ # resp.total_quantity #=> Integer
5411
+ #
5412
+ # @see http://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/UpdateConsumableResource AWS API Documentation
5413
+ #
5414
+ # @overload update_consumable_resource(params = {})
5415
+ # @param [Hash] params ({})
5416
+ def update_consumable_resource(params = {}, options = {})
5417
+ req = build_request(:update_consumable_resource, params)
5418
+ req.send_request(options)
5419
+ end
5420
+
4862
5421
  # Updates a job queue.
4863
5422
  #
4864
5423
  # @option params [required, String] :job_queue
@@ -4871,8 +5430,8 @@ module Aws::Batch
4871
5430
  # the queue can finish.
4872
5431
  #
4873
5432
  # @option params [String] :scheduling_policy_arn
4874
- # Amazon Resource Name (ARN) of the fair-share scheduling policy. Once a
4875
- # job queue is created, the fair-share scheduling policy can be replaced
5433
+ # Amazon Resource Name (ARN) of the fair share scheduling policy. Once a
5434
+ # job queue is created, the fair share scheduling policy can be replaced
4876
5435
  # but not removed. The format is
4877
5436
  # `aws:Partition:batch:Region:Account:scheduling-policy/Name `. For
4878
5437
  # example,
@@ -4975,7 +5534,7 @@ module Aws::Batch
4975
5534
  # The Amazon Resource Name (ARN) of the scheduling policy to update.
4976
5535
  #
4977
5536
  # @option params [Types::FairsharePolicy] :fairshare_policy
4978
- # The fair-share policy scheduling details.
5537
+ # The fair share policy.
4979
5538
  #
4980
5539
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
4981
5540
  #
@@ -5022,7 +5581,7 @@ module Aws::Batch
5022
5581
  tracer: tracer
5023
5582
  )
5024
5583
  context[:gem_name] = 'aws-sdk-batch'
5025
- context[:gem_version] = '1.110.0'
5584
+ context[:gem_version] = '1.111.0'
5026
5585
  Seahorse::Client::Request.new(handlers, context)
5027
5586
  end
5028
5587