Skip to content

Commit

Permalink
feat(client-m2): Add AuthSecretsManagerArn optional parameter to batc…
Browse files Browse the repository at this point in the history
…h job APIs, expand batch parameter limits, and introduce clientToken constraints.
  • Loading branch information
awstools committed Oct 22, 2024
1 parent 2caa046 commit e2fcaab
Show file tree
Hide file tree
Showing 7 changed files with 115 additions and 41 deletions.
2 changes: 1 addition & 1 deletion clients/client-m2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ continuous delivery (CI/CD) of the applications.</p>

## Installing

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

- `npm install @aws-sdk/client-m2`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export interface CancelBatchJobExecutionCommandOutput extends CancelBatchJobExec
* const input = { // CancelBatchJobExecutionRequest
* applicationId: "STRING_VALUE", // required
* executionId: "STRING_VALUE", // required
* authSecretsManagerArn: "STRING_VALUE",
* };
* const command = new CancelBatchJobExecutionCommand(input);
* const response = await client.send(command);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export interface ListBatchJobRestartPointsCommandInput extends ListBatchJobResta
export interface ListBatchJobRestartPointsCommandOutput extends ListBatchJobRestartPointsResponse, __MetadataBearer {}

/**
* <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>
* <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>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand All @@ -38,6 +38,7 @@ export interface ListBatchJobRestartPointsCommandOutput extends ListBatchJobRest
* const input = { // ListBatchJobRestartPointsRequest
* applicationId: "STRING_VALUE", // required
* executionId: "STRING_VALUE", // required
* authSecretsManagerArn: "STRING_VALUE",
* };
* const command = new ListBatchJobRestartPointsCommand(input);
* const response = await client.send(command);
Expand Down
1 change: 1 addition & 0 deletions clients/client-m2/src/commands/StartBatchJobCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export interface StartBatchJobCommandOutput extends StartBatchJobResponse, __Met
* jobParams: { // BatchJobParametersMap
* "<keys>": "STRING_VALUE",
* },
* authSecretsManagerArn: "STRING_VALUE",
* };
* const command = new StartBatchJobCommand(input);
* const response = await client.send(command);
Expand Down
49 changes: 33 additions & 16 deletions clients/client-m2/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ export interface CancelBatchJobExecutionRequest {
* @public
*/
executionId: string | undefined;

/**
* <p>The Amazon Web Services Secrets Manager containing user's credentials for authentication and authorization for Cancel Batch Job Execution operation.</p>
* @public
*/
authSecretsManagerArn?: string;
}

/**
Expand Down Expand Up @@ -392,11 +398,8 @@ export interface CreateApplicationRequest {
tags?: Record<string, string>;

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

/**
* <p>Provides restart step information for the most recent restart operation.</p>
* <p>Provides step/procedure step information for a restart batch job operation.</p>
* @public
*/
export interface JobStepRestartMarker {
/**
* <p>The step name that a batch job restart was from.</p>
* <p>The step name that a batch job was restarted from.</p>
* @public
*/
fromStep: string | undefined;

/**
* <p>The procedure step name that a job was restarted from.</p>
* <p>The procedure step name that a batch job was restarted from.</p>
* @public
*/
fromProcStep?: string;

/**
* <p>The step name that a job was restarted to.</p>
* <p>The step name that a batch job was restarted to.</p>
* @public
*/
toStep?: string;
Expand All @@ -1402,18 +1405,18 @@ export interface JobStepRestartMarker {
}

/**
* <p>An identifier for the StartBatchJob API to show that it is a restart operation.</p>
* <p>An identifier for the <code>StartBatchJob</code> API to show that it is a restart operation.</p>
* @public
*/
export interface RestartBatchJobIdentifier {
/**
* <p>The executionId from the StartBatchJob response when the job ran for the first time.</p>
* <p>The <code>executionId</code> from the <code>StartBatchJob</code> response when the job ran for the first time.</p>
* @public
*/
executionId: string | undefined;

/**
* <p>The restart step information for the most recent restart operation.</p>
* <p>The step/procedure step information for a restart batch job operation.</p>
* @public
*/
jobStepRestartMarker: JobStepRestartMarker | undefined;
Expand Down Expand Up @@ -1564,7 +1567,7 @@ export namespace BatchJobIdentifier {
}

/**
* <p>Specifies the required information for restart, including execution ID and jobsteprestartmarker.</p>
* <p>Specifies the required information for restart, including <code>executionId</code> and <code>JobStepRestartMarker</code>.</p>
* @public
*/
export interface RestartBatchJobIdentifierMember {
Expand Down Expand Up @@ -1722,7 +1725,7 @@ export interface GetBatchJobExecutionResponse {
batchJobIdentifier?: BatchJobIdentifier;

/**
* <p>The restart steps information for the most recent restart operation.</p>
* <p>The step/procedure step information for the restart batch job operation.</p>
* @public
*/
jobStepRestartMarker?: JobStepRestartMarker;
Expand Down Expand Up @@ -2681,10 +2684,16 @@ export interface ListBatchJobRestartPointsRequest {
applicationId: string | undefined;

/**
* <p>The unique identifier of each batch job execution.</p>
* <p>The unique identifier of the batch job execution.</p>
* @public
*/
executionId: string | undefined;

/**
* <p>The Amazon Web Services Secrets Manager containing user's credentials for authentication and authorization for List Batch Job Restart Points operation.</p>
* @public
*/
authSecretsManagerArn?: string;
}

/**
Expand Down Expand Up @@ -3043,6 +3052,12 @@ export interface StartBatchJobRequest {
* @public
*/
jobParams?: Record<string, string>;

/**
* <p>The Amazon Web Services Secrets Manager containing user's credentials for authentication and authorization for Start Batch Job execution operation.</p>
* @public
*/
authSecretsManagerArn?: string;
}

/**
Expand Down Expand Up @@ -3401,6 +3416,7 @@ export const EnvironmentLifecycle = {
CREATING: "Creating",
DELETING: "Deleting",
FAILED: "Failed",
UNHEALTHY: "UnHealthy",
UPDATING: "Updating",
} as const;

Expand Down Expand Up @@ -3444,7 +3460,8 @@ export interface GetEnvironmentResponse {
instanceType: string | undefined;

/**
* <p>The status of the runtime environment.</p>
* <p>The status of the runtime environment. If the Amazon Web Services Mainframe Modernization environment is missing a connection to
* the customer owned dependent resource, the status will be <code>Unhealthy</code>.</p>
* @public
*/
status: EnvironmentLifecycle | undefined;
Expand Down
16 changes: 14 additions & 2 deletions clients/client-m2/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,18 @@ export const se_CancelBatchJobExecutionCommand = async (
context: __SerdeContext
): Promise<__HttpRequest> => {
const b = rb(input, context);
const headers: any = {};
const headers: any = {
"content-type": "application/json",
};
b.bp("/applications/{applicationId}/batch-job-executions/{executionId}/cancel");
b.p("applicationId", () => input.applicationId!, "{applicationId}", false);
b.p("executionId", () => input.executionId!, "{executionId}", false);
let body: any;
body = JSON.stringify(
take(input, {
authSecretsManagerArn: [],
})
);
b.m("POST").h(headers).b(body);
return b.build();
};
Expand Down Expand Up @@ -562,8 +569,11 @@ export const se_ListBatchJobRestartPointsCommand = async (
b.bp("/applications/{applicationId}/batch-job-executions/{executionId}/steps");
b.p("applicationId", () => input.applicationId!, "{applicationId}", false);
b.p("executionId", () => input.executionId!, "{executionId}", false);
const query: any = map({
[_aSMA]: [, input[_aSMA]!],
});
let body: any;
b.m("GET").h(headers).b(body);
b.m("GET").h(headers).q(query).b(body);
return b.build();
};

Expand Down Expand Up @@ -718,6 +728,7 @@ export const se_StartBatchJobCommand = async (
let body: any;
body = JSON.stringify(
take(input, {
authSecretsManagerArn: [],
batchJobIdentifier: (_) => _json(_),
jobParams: (_) => _json(_),
})
Expand Down Expand Up @@ -2263,6 +2274,7 @@ const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
const collectBodyString = (streamBody: any, context: __SerdeContext): Promise<string> =>
collectBody(streamBody, context).then((body) => context.utf8Encoder(body));

const _aSMA = "authSecretsManagerArn";
const _eI = "environmentId";
const _eIx = "executionIds";
const _eT = "engineType";
Expand Down
Loading

0 comments on commit e2fcaab

Please sign in to comment.