Skip to content

Commit

Permalink
feat(client-batch): This feature allows Batch to support configuratio…
Browse files Browse the repository at this point in the history
…n of ephemeral storage size for jobs running on FARGATE
  • Loading branch information
awstools committed Mar 23, 2023
1 parent aa94fc4 commit 5152fa9
Show file tree
Hide file tree
Showing 7 changed files with 2,385 additions and 2,665 deletions.
17 changes: 13 additions & 4 deletions clients/client-batch/src/Batch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,19 @@ import {
export class Batch extends BatchClient {
/**
* @public
* <p>Cancels a job in an Batch job queue. Jobs that are in the <code>SUBMITTED</code>, <code>PENDING</code>, or
* <code>RUNNABLE</code> state are canceled. Jobs that progressed to the <code>STARTING</code> or <code>RUNNING</code>
* state aren't canceled. However, the API operation still succeeds, even if no job is canceled. These jobs must be
* terminated with the <a>TerminateJob</a> operation.</p>
* <p>Cancels a job in an Batch job queue. Jobs that are in the
* <code>SUBMITTED</code>
* or
* <code>PENDING</code>
* are
* canceled. A job
* in<code>RUNNABLE</code> remains in <code>RUNNABLE</code> until it reaches the head of the
* job queue. Then the job status is updated to
* <code>FAILED</code>.</p>
* <p>Jobs that progressed to the <code>STARTING</code> or
* <code>RUNNING</code> state aren't canceled. However, the API operation still succeeds, even
* if no job is canceled. These jobs must be terminated with the <a>TerminateJob</a>
* operation.</p>
*/
public cancelJob(args: CancelJobCommandInput, options?: __HttpHandlerOptions): Promise<CancelJobCommandOutput>;
public cancelJob(args: CancelJobCommandInput, cb: (err: any, data?: CancelJobCommandOutput) => void): void;
Expand Down
17 changes: 13 additions & 4 deletions clients/client-batch/src/commands/CancelJobCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,19 @@ export interface CancelJobCommandOutput extends CancelJobResponse, __MetadataBea

/**
* @public
* <p>Cancels a job in an Batch job queue. Jobs that are in the <code>SUBMITTED</code>, <code>PENDING</code>, or
* <code>RUNNABLE</code> state are canceled. Jobs that progressed to the <code>STARTING</code> or <code>RUNNING</code>
* state aren't canceled. However, the API operation still succeeds, even if no job is canceled. These jobs must be
* terminated with the <a>TerminateJob</a> operation.</p>
* <p>Cancels a job in an Batch job queue. Jobs that are in the
* <code>SUBMITTED</code>
* or
* <code>PENDING</code>
* are
* canceled. A job
* in<code>RUNNABLE</code> remains in <code>RUNNABLE</code> until it reaches the head of the
* job queue. Then the job status is updated to
* <code>FAILED</code>.</p>
* <p>Jobs that progressed to the <code>STARTING</code> or
* <code>RUNNING</code> state aren't canceled. However, the API operation still succeeds, even
* if no job is canceled. These jobs must be terminated with the <a>TerminateJob</a>
* operation.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
2 changes: 1 addition & 1 deletion clients/client-batch/src/endpoint/EndpointParameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const resolveClientEndpointParameters = <T>(
};

export interface EndpointParameters extends __EndpointParameters {
Region: string;
Region?: string;
UseDualStack?: boolean;
UseFIPS?: boolean;
Endpoint?: string;
Expand Down
42 changes: 21 additions & 21 deletions clients/client-batch/src/endpoint/ruleset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,27 @@ import { RuleSetObject } from "@aws-sdk/util-endpoints";
or see "smithy.rules#endpointRuleSet"
in codegen/sdk-codegen/aws-models/batch.json */

const t="fn",
const s="required",
t="fn",
u="argv",
v="ref";
const a=true,
b=false,
c="String",
d="PartitionResult",
e="tree",
f="error",
g="endpoint",
h="stringEquals",
i={"required":true,"default":false,"type":"Boolean"},
j={[v]:"Endpoint"},
k={[t]:"booleanEquals",[u]:[{[v]:"UseFIPS"},true]},
l={[t]:"booleanEquals",[u]:[{[v]:"UseDualStack"},true]},
m={},
n={[t]:"booleanEquals",[u]:[true,{[t]:"getAttr",[u]:[{[v]:d},"supportsFIPS"]}]},
o={[t]:"booleanEquals",[u]:[true,{[t]:"getAttr",[u]:[{[v]:d},"supportsDualStack"]}]},
p={[t]:"getAttr",[u]:[{[v]:d},"name"]},
q={"url":"https://batch.{Region}.{PartitionResult#dnsSuffix}","properties":{},"headers":{}},
r=[k],
s=[l];
const _data={version:"1.0",parameters:{Region:{required:a,type:c},UseDualStack:i,UseFIPS:i,Endpoint:{required:b,type:c}},rules:[{conditions:[{[t]:"aws.partition",[u]:[{[v]:"Region"}],assign:d}],type:e,rules:[{conditions:[{[t]:"isSet",[u]:[j]}],type:e,rules:[{conditions:r,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:f},{type:e,rules:[{conditions:s,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:f},{endpoint:{url:j,properties:m,headers:m},type:g}]}]},{conditions:[k,l],type:e,rules:[{conditions:[n,o],type:e,rules:[{endpoint:{url:"https://batch-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:g}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:f}]},{conditions:r,type:e,rules:[{conditions:[n],type:e,rules:[{type:e,rules:[{conditions:[{[t]:h,[u]:["aws",p]}],endpoint:{url:"https://fips.batch.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:g},{conditions:[{[t]:h,[u]:["aws-us-gov",p]}],endpoint:q,type:g},{endpoint:{url:"https://batch-fips.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:g}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:f}]},{conditions:s,type:e,rules:[{conditions:[o],type:e,rules:[{endpoint:{url:"https://batch.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:g}]},{error:"DualStack is enabled but this partition does not support DualStack",type:f}]},{endpoint:q,type:g}]}]};
const a="isSet",
b="tree",
c="error",
d="endpoint",
e="PartitionResult",
f="stringEquals",
g={[s]:false,"type":"String"},
h={[s]:true,"default":false,"type":"Boolean"},
i={[v]:"Endpoint"},
j={[t]:"booleanEquals",[u]:[{[v]:"UseFIPS"},true]},
k={[t]:"booleanEquals",[u]:[{[v]:"UseDualStack"},true]},
l={},
m={[t]:"booleanEquals",[u]:[true,{[t]:"getAttr",[u]:[{[v]:e},"supportsFIPS"]}]},
n={[t]:"booleanEquals",[u]:[true,{[t]:"getAttr",[u]:[{[v]:e},"supportsDualStack"]}]},
o={[t]:"getAttr",[u]:[{[v]:e},"name"]},
p=[j],
q=[k],
r=[{[v]:"Region"}];
const _data={version:"1.0",parameters:{Region:g,UseDualStack:h,UseFIPS:h,Endpoint:g},rules:[{conditions:[{[t]:a,[u]:[i]}],type:b,rules:[{conditions:p,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:c},{type:b,rules:[{conditions:q,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:i,properties:l,headers:l},type:d}]}]},{type:b,rules:[{conditions:[{[t]:a,[u]:r}],type:b,rules:[{conditions:[{[t]:"aws.partition",[u]:r,assign:e}],type:b,rules:[{conditions:[j,k],type:b,rules:[{conditions:[m,n],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://batch-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:d}]}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:c}]},{conditions:p,type:b,rules:[{conditions:[m],type:b,rules:[{type:b,rules:[{conditions:[{[t]:f,[u]:["aws",o]}],endpoint:{url:"https://fips.batch.{Region}.amazonaws.com",properties:l,headers:l},type:d},{conditions:[{[t]:f,[u]:["aws-us-gov",o]}],endpoint:{url:"https://batch.{Region}.amazonaws.com",properties:l,headers:l},type:d},{endpoint:{url:"https://batch-fips.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:d}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:c}]},{conditions:q,type:b,rules:[{conditions:[n],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://batch.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:d}]}]},{error:"DualStack is enabled but this partition does not support DualStack",type:c}]},{type:b,rules:[{endpoint:{url:"https://batch.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:d}]}]}]},{error:"Invalid Configuration: Missing Region",type:c}]}]};
export const ruleSet: RuleSetObject = _data;
Loading

0 comments on commit 5152fa9

Please sign in to comment.