Skip to content

Commit e2fcaab

Browse files
author
awstools
committed
feat(client-m2): Add AuthSecretsManagerArn optional parameter to batch job APIs, expand batch parameter limits, and introduce clientToken constraints.
1 parent 2caa046 commit e2fcaab

File tree

7 files changed

+115
-41
lines changed

7 files changed

+115
-41
lines changed

clients/client-m2/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ continuous delivery (CI/CD) of the applications.</p>
1414

1515
## Installing
1616

17-
To install the this package, simply type add or install @aws-sdk/client-m2
17+
To install this package, simply type add or install @aws-sdk/client-m2
1818
using your favorite package manager:
1919

2020
- `npm install @aws-sdk/client-m2`

clients/client-m2/src/commands/CancelBatchJobExecutionCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export interface CancelBatchJobExecutionCommandOutput extends CancelBatchJobExec
3838
* const input = { // CancelBatchJobExecutionRequest
3939
* applicationId: "STRING_VALUE", // required
4040
* executionId: "STRING_VALUE", // required
41+
* authSecretsManagerArn: "STRING_VALUE",
4142
* };
4243
* const command = new CancelBatchJobExecutionCommand(input);
4344
* const response = await client.send(command);

clients/client-m2/src/commands/ListBatchJobRestartPointsCommand.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export interface ListBatchJobRestartPointsCommandInput extends ListBatchJobResta
2828
export interface ListBatchJobRestartPointsCommandOutput extends ListBatchJobRestartPointsResponse, __MetadataBearer {}
2929

3030
/**
31-
* <p>Lists all the job steps for JCL files to restart a batch job. This is only applicable for Micro Focus engine with versions 8.0.6 and above.</p>
31+
* <p>Lists all the job steps for a JCL file to restart a batch job. This is only applicable for Micro Focus engine with versions 8.0.6 and above.</p>
3232
* @example
3333
* Use a bare-bones client and the command you need to make an API call.
3434
* ```javascript
@@ -38,6 +38,7 @@ export interface ListBatchJobRestartPointsCommandOutput extends ListBatchJobRest
3838
* const input = { // ListBatchJobRestartPointsRequest
3939
* applicationId: "STRING_VALUE", // required
4040
* executionId: "STRING_VALUE", // required
41+
* authSecretsManagerArn: "STRING_VALUE",
4142
* };
4243
* const command = new ListBatchJobRestartPointsCommand(input);
4344
* const response = await client.send(command);

clients/client-m2/src/commands/StartBatchJobCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ export interface StartBatchJobCommandOutput extends StartBatchJobResponse, __Met
6767
* jobParams: { // BatchJobParametersMap
6868
* "<keys>": "STRING_VALUE",
6969
* },
70+
* authSecretsManagerArn: "STRING_VALUE",
7071
* };
7172
* const command = new StartBatchJobCommand(input);
7273
* const response = await client.send(command);

clients/client-m2/src/models/models_0.ts

Lines changed: 33 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@ export interface CancelBatchJobExecutionRequest {
7272
* @public
7373
*/
7474
executionId: string | undefined;
75+
76+
/**
77+
* <p>The Amazon Web Services Secrets Manager containing user's credentials for authentication and authorization for Cancel Batch Job Execution operation.</p>
78+
* @public
79+
*/
80+
authSecretsManagerArn?: string;
7581
}
7682

7783
/**
@@ -392,11 +398,8 @@ export interface CreateApplicationRequest {
392398
tags?: Record<string, string>;
393399

394400
/**
395-
* <p>Unique, case-sensitive identifier the service generates to ensure the idempotency of the
396-
* request to create an application. The service generates the clientToken when the API call
397-
* is triggered. The token expires after one hour, so if you retry the API within this
398-
* timeframe with the same clientToken, you will get the same response. The service also
399-
* handles deleting the clientToken after it expires. </p>
401+
* <p>A client token is a unique, case-sensitive string of up to 128 ASCII characters with ASCII values of 33-126 inclusive.
402+
* It's generated by the client to ensure idempotent operations, allowing for safe retries without unintended side effects.</p>
400403
* @public
401404
*/
402405
clientToken?: string;
@@ -1372,24 +1375,24 @@ export interface FileBatchJobIdentifier {
13721375
}
13731376

13741377
/**
1375-
* <p>Provides restart step information for the most recent restart operation.</p>
1378+
* <p>Provides step/procedure step information for a restart batch job operation.</p>
13761379
* @public
13771380
*/
13781381
export interface JobStepRestartMarker {
13791382
/**
1380-
* <p>The step name that a batch job restart was from.</p>
1383+
* <p>The step name that a batch job was restarted from.</p>
13811384
* @public
13821385
*/
13831386
fromStep: string | undefined;
13841387

13851388
/**
1386-
* <p>The procedure step name that a job was restarted from.</p>
1389+
* <p>The procedure step name that a batch job was restarted from.</p>
13871390
* @public
13881391
*/
13891392
fromProcStep?: string;
13901393

13911394
/**
1392-
* <p>The step name that a job was restarted to.</p>
1395+
* <p>The step name that a batch job was restarted to.</p>
13931396
* @public
13941397
*/
13951398
toStep?: string;
@@ -1402,18 +1405,18 @@ export interface JobStepRestartMarker {
14021405
}
14031406

14041407
/**
1405-
* <p>An identifier for the StartBatchJob API to show that it is a restart operation.</p>
1408+
* <p>An identifier for the <code>StartBatchJob</code> API to show that it is a restart operation.</p>
14061409
* @public
14071410
*/
14081411
export interface RestartBatchJobIdentifier {
14091412
/**
1410-
* <p>The executionId from the StartBatchJob response when the job ran for the first time.</p>
1413+
* <p>The <code>executionId</code> from the <code>StartBatchJob</code> response when the job ran for the first time.</p>
14111414
* @public
14121415
*/
14131416
executionId: string | undefined;
14141417

14151418
/**
1416-
* <p>The restart step information for the most recent restart operation.</p>
1419+
* <p>The step/procedure step information for a restart batch job operation.</p>
14171420
* @public
14181421
*/
14191422
jobStepRestartMarker: JobStepRestartMarker | undefined;
@@ -1564,7 +1567,7 @@ export namespace BatchJobIdentifier {
15641567
}
15651568

15661569
/**
1567-
* <p>Specifies the required information for restart, including execution ID and jobsteprestartmarker.</p>
1570+
* <p>Specifies the required information for restart, including <code>executionId</code> and <code>JobStepRestartMarker</code>.</p>
15681571
* @public
15691572
*/
15701573
export interface RestartBatchJobIdentifierMember {
@@ -1722,7 +1725,7 @@ export interface GetBatchJobExecutionResponse {
17221725
batchJobIdentifier?: BatchJobIdentifier;
17231726

17241727
/**
1725-
* <p>The restart steps information for the most recent restart operation.</p>
1728+
* <p>The step/procedure step information for the restart batch job operation.</p>
17261729
* @public
17271730
*/
17281731
jobStepRestartMarker?: JobStepRestartMarker;
@@ -2681,10 +2684,16 @@ export interface ListBatchJobRestartPointsRequest {
26812684
applicationId: string | undefined;
26822685

26832686
/**
2684-
* <p>The unique identifier of each batch job execution.</p>
2687+
* <p>The unique identifier of the batch job execution.</p>
26852688
* @public
26862689
*/
26872690
executionId: string | undefined;
2691+
2692+
/**
2693+
* <p>The Amazon Web Services Secrets Manager containing user's credentials for authentication and authorization for List Batch Job Restart Points operation.</p>
2694+
* @public
2695+
*/
2696+
authSecretsManagerArn?: string;
26882697
}
26892698

26902699
/**
@@ -3043,6 +3052,12 @@ export interface StartBatchJobRequest {
30433052
* @public
30443053
*/
30453054
jobParams?: Record<string, string>;
3055+
3056+
/**
3057+
* <p>The Amazon Web Services Secrets Manager containing user's credentials for authentication and authorization for Start Batch Job execution operation.</p>
3058+
* @public
3059+
*/
3060+
authSecretsManagerArn?: string;
30463061
}
30473062

30483063
/**
@@ -3401,6 +3416,7 @@ export const EnvironmentLifecycle = {
34013416
CREATING: "Creating",
34023417
DELETING: "Deleting",
34033418
FAILED: "Failed",
3419+
UNHEALTHY: "UnHealthy",
34043420
UPDATING: "Updating",
34053421
} as const;
34063422

@@ -3444,7 +3460,8 @@ export interface GetEnvironmentResponse {
34443460
instanceType: string | undefined;
34453461

34463462
/**
3447-
* <p>The status of the runtime environment.</p>
3463+
* <p>The status of the runtime environment. If the Amazon Web Services Mainframe Modernization environment is missing a connection to
3464+
* the customer owned dependent resource, the status will be <code>Unhealthy</code>.</p>
34483465
* @public
34493466
*/
34503467
status: EnvironmentLifecycle | undefined;

clients/client-m2/src/protocols/Aws_restJson1.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,18 @@ export const se_CancelBatchJobExecutionCommand = async (
160160
context: __SerdeContext
161161
): Promise<__HttpRequest> => {
162162
const b = rb(input, context);
163-
const headers: any = {};
163+
const headers: any = {
164+
"content-type": "application/json",
165+
};
164166
b.bp("/applications/{applicationId}/batch-job-executions/{executionId}/cancel");
165167
b.p("applicationId", () => input.applicationId!, "{applicationId}", false);
166168
b.p("executionId", () => input.executionId!, "{executionId}", false);
167169
let body: any;
170+
body = JSON.stringify(
171+
take(input, {
172+
authSecretsManagerArn: [],
173+
})
174+
);
168175
b.m("POST").h(headers).b(body);
169176
return b.build();
170177
};
@@ -562,8 +569,11 @@ export const se_ListBatchJobRestartPointsCommand = async (
562569
b.bp("/applications/{applicationId}/batch-job-executions/{executionId}/steps");
563570
b.p("applicationId", () => input.applicationId!, "{applicationId}", false);
564571
b.p("executionId", () => input.executionId!, "{executionId}", false);
572+
const query: any = map({
573+
[_aSMA]: [, input[_aSMA]!],
574+
});
565575
let body: any;
566-
b.m("GET").h(headers).b(body);
576+
b.m("GET").h(headers).q(query).b(body);
567577
return b.build();
568578
};
569579

@@ -718,6 +728,7 @@ export const se_StartBatchJobCommand = async (
718728
let body: any;
719729
body = JSON.stringify(
720730
take(input, {
731+
authSecretsManagerArn: [],
721732
batchJobIdentifier: (_) => _json(_),
722733
jobParams: (_) => _json(_),
723734
})
@@ -2263,6 +2274,7 @@ const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
22632274
const collectBodyString = (streamBody: any, context: __SerdeContext): Promise<string> =>
22642275
collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
22652276

2277+
const _aSMA = "authSecretsManagerArn";
22662278
const _eI = "environmentId";
22672279
const _eIx = "executionIds";
22682280
const _eT = "engineType";

0 commit comments

Comments
 (0)