-
Notifications
You must be signed in to change notification settings - Fork 582
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(client-glue): This SDK release adds support to sync glue jobs wi…
…th source control provider. Additionally, a new parameter called SourceControlDetails will be added to Job model.
- Loading branch information
awstools
committed
Oct 5, 2022
1 parent
435b5de
commit 4b78fcd
Showing
13 changed files
with
1,243 additions
and
234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
106 changes: 106 additions & 0 deletions
106
clients/client-glue/src/commands/UpdateJobFromSourceControlCommand.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
// smithy-typescript generated code | ||
import { getSerdePlugin } from "@aws-sdk/middleware-serde"; | ||
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; | ||
import { Command as $Command } from "@aws-sdk/smithy-client"; | ||
import { | ||
FinalizeHandlerArguments, | ||
Handler, | ||
HandlerExecutionContext, | ||
HttpHandlerOptions as __HttpHandlerOptions, | ||
MetadataBearer as __MetadataBearer, | ||
MiddlewareStack, | ||
SerdeContext as __SerdeContext, | ||
} from "@aws-sdk/types"; | ||
|
||
import { GlueClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GlueClient"; | ||
import { | ||
UpdateJobFromSourceControlRequest, | ||
UpdateJobFromSourceControlRequestFilterSensitiveLog, | ||
UpdateJobFromSourceControlResponse, | ||
UpdateJobFromSourceControlResponseFilterSensitiveLog, | ||
} from "../models/models_2"; | ||
import { | ||
deserializeAws_json1_1UpdateJobFromSourceControlCommand, | ||
serializeAws_json1_1UpdateJobFromSourceControlCommand, | ||
} from "../protocols/Aws_json1_1"; | ||
|
||
export interface UpdateJobFromSourceControlCommandInput extends UpdateJobFromSourceControlRequest {} | ||
export interface UpdateJobFromSourceControlCommandOutput extends UpdateJobFromSourceControlResponse, __MetadataBearer {} | ||
|
||
/** | ||
* <p>Synchronizes a job from the source control repository. This operation takes the job artifacts that are located in the remote repository and updates the Glue internal stores with these artifacts.</p> | ||
* | ||
* <p>This API supports optional parameters which take in the repository information.</p> | ||
* @example | ||
* Use a bare-bones client and the command you need to make an API call. | ||
* ```javascript | ||
* import { GlueClient, UpdateJobFromSourceControlCommand } from "@aws-sdk/client-glue"; // ES Modules import | ||
* // const { GlueClient, UpdateJobFromSourceControlCommand } = require("@aws-sdk/client-glue"); // CommonJS import | ||
* const client = new GlueClient(config); | ||
* const command = new UpdateJobFromSourceControlCommand(input); | ||
* const response = await client.send(command); | ||
* ``` | ||
* | ||
* @see {@link UpdateJobFromSourceControlCommandInput} for command's `input` shape. | ||
* @see {@link UpdateJobFromSourceControlCommandOutput} for command's `response` shape. | ||
* @see {@link GlueClientResolvedConfig | config} for GlueClient's `config` shape. | ||
* | ||
*/ | ||
export class UpdateJobFromSourceControlCommand extends $Command< | ||
UpdateJobFromSourceControlCommandInput, | ||
UpdateJobFromSourceControlCommandOutput, | ||
GlueClientResolvedConfig | ||
> { | ||
// Start section: command_properties | ||
// End section: command_properties | ||
|
||
constructor(readonly input: UpdateJobFromSourceControlCommandInput) { | ||
// Start section: command_constructor | ||
super(); | ||
// End section: command_constructor | ||
} | ||
|
||
/** | ||
* @internal | ||
*/ | ||
resolveMiddleware( | ||
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, | ||
configuration: GlueClientResolvedConfig, | ||
options?: __HttpHandlerOptions | ||
): Handler<UpdateJobFromSourceControlCommandInput, UpdateJobFromSourceControlCommandOutput> { | ||
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); | ||
|
||
const stack = clientStack.concat(this.middlewareStack); | ||
|
||
const { logger } = configuration; | ||
const clientName = "GlueClient"; | ||
const commandName = "UpdateJobFromSourceControlCommand"; | ||
const handlerExecutionContext: HandlerExecutionContext = { | ||
logger, | ||
clientName, | ||
commandName, | ||
inputFilterSensitiveLog: UpdateJobFromSourceControlRequestFilterSensitiveLog, | ||
outputFilterSensitiveLog: UpdateJobFromSourceControlResponseFilterSensitiveLog, | ||
}; | ||
const { requestHandler } = configuration; | ||
return stack.resolve( | ||
(request: FinalizeHandlerArguments<any>) => | ||
requestHandler.handle(request.request as __HttpRequest, options || {}), | ||
handlerExecutionContext | ||
); | ||
} | ||
|
||
private serialize(input: UpdateJobFromSourceControlCommandInput, context: __SerdeContext): Promise<__HttpRequest> { | ||
return serializeAws_json1_1UpdateJobFromSourceControlCommand(input, context); | ||
} | ||
|
||
private deserialize( | ||
output: __HttpResponse, | ||
context: __SerdeContext | ||
): Promise<UpdateJobFromSourceControlCommandOutput> { | ||
return deserializeAws_json1_1UpdateJobFromSourceControlCommand(output, context); | ||
} | ||
|
||
// Start section: command_body_extra | ||
// End section: command_body_extra | ||
} |
106 changes: 106 additions & 0 deletions
106
clients/client-glue/src/commands/UpdateSourceControlFromJobCommand.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
// smithy-typescript generated code | ||
import { getSerdePlugin } from "@aws-sdk/middleware-serde"; | ||
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; | ||
import { Command as $Command } from "@aws-sdk/smithy-client"; | ||
import { | ||
FinalizeHandlerArguments, | ||
Handler, | ||
HandlerExecutionContext, | ||
HttpHandlerOptions as __HttpHandlerOptions, | ||
MetadataBearer as __MetadataBearer, | ||
MiddlewareStack, | ||
SerdeContext as __SerdeContext, | ||
} from "@aws-sdk/types"; | ||
|
||
import { GlueClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GlueClient"; | ||
import { | ||
UpdateSourceControlFromJobRequest, | ||
UpdateSourceControlFromJobRequestFilterSensitiveLog, | ||
UpdateSourceControlFromJobResponse, | ||
UpdateSourceControlFromJobResponseFilterSensitiveLog, | ||
} from "../models/models_2"; | ||
import { | ||
deserializeAws_json1_1UpdateSourceControlFromJobCommand, | ||
serializeAws_json1_1UpdateSourceControlFromJobCommand, | ||
} from "../protocols/Aws_json1_1"; | ||
|
||
export interface UpdateSourceControlFromJobCommandInput extends UpdateSourceControlFromJobRequest {} | ||
export interface UpdateSourceControlFromJobCommandOutput extends UpdateSourceControlFromJobResponse, __MetadataBearer {} | ||
|
||
/** | ||
* <p>Synchronizes a job to the source control repository. This operation takes the job artifacts from the Glue internal stores and makes a commit to the remote repository that is configured on the job.</p> | ||
* | ||
* <p>This API supports optional parameters which take in the repository information.</p> | ||
* @example | ||
* Use a bare-bones client and the command you need to make an API call. | ||
* ```javascript | ||
* import { GlueClient, UpdateSourceControlFromJobCommand } from "@aws-sdk/client-glue"; // ES Modules import | ||
* // const { GlueClient, UpdateSourceControlFromJobCommand } = require("@aws-sdk/client-glue"); // CommonJS import | ||
* const client = new GlueClient(config); | ||
* const command = new UpdateSourceControlFromJobCommand(input); | ||
* const response = await client.send(command); | ||
* ``` | ||
* | ||
* @see {@link UpdateSourceControlFromJobCommandInput} for command's `input` shape. | ||
* @see {@link UpdateSourceControlFromJobCommandOutput} for command's `response` shape. | ||
* @see {@link GlueClientResolvedConfig | config} for GlueClient's `config` shape. | ||
* | ||
*/ | ||
export class UpdateSourceControlFromJobCommand extends $Command< | ||
UpdateSourceControlFromJobCommandInput, | ||
UpdateSourceControlFromJobCommandOutput, | ||
GlueClientResolvedConfig | ||
> { | ||
// Start section: command_properties | ||
// End section: command_properties | ||
|
||
constructor(readonly input: UpdateSourceControlFromJobCommandInput) { | ||
// Start section: command_constructor | ||
super(); | ||
// End section: command_constructor | ||
} | ||
|
||
/** | ||
* @internal | ||
*/ | ||
resolveMiddleware( | ||
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, | ||
configuration: GlueClientResolvedConfig, | ||
options?: __HttpHandlerOptions | ||
): Handler<UpdateSourceControlFromJobCommandInput, UpdateSourceControlFromJobCommandOutput> { | ||
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); | ||
|
||
const stack = clientStack.concat(this.middlewareStack); | ||
|
||
const { logger } = configuration; | ||
const clientName = "GlueClient"; | ||
const commandName = "UpdateSourceControlFromJobCommand"; | ||
const handlerExecutionContext: HandlerExecutionContext = { | ||
logger, | ||
clientName, | ||
commandName, | ||
inputFilterSensitiveLog: UpdateSourceControlFromJobRequestFilterSensitiveLog, | ||
outputFilterSensitiveLog: UpdateSourceControlFromJobResponseFilterSensitiveLog, | ||
}; | ||
const { requestHandler } = configuration; | ||
return stack.resolve( | ||
(request: FinalizeHandlerArguments<any>) => | ||
requestHandler.handle(request.request as __HttpRequest, options || {}), | ||
handlerExecutionContext | ||
); | ||
} | ||
|
||
private serialize(input: UpdateSourceControlFromJobCommandInput, context: __SerdeContext): Promise<__HttpRequest> { | ||
return serializeAws_json1_1UpdateSourceControlFromJobCommand(input, context); | ||
} | ||
|
||
private deserialize( | ||
output: __HttpResponse, | ||
context: __SerdeContext | ||
): Promise<UpdateSourceControlFromJobCommandOutput> { | ||
return deserializeAws_json1_1UpdateSourceControlFromJobCommand(output, context); | ||
} | ||
|
||
// Start section: command_body_extra | ||
// End section: command_body_extra | ||
} |
Oops, something went wrong.