updateJobFromSourceControl method
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.
This API supports optional parameters which take in the repository information.
May throw AccessDeniedException.
May throw AlreadyExistsException.
May throw EntityNotFoundException.
May throw InternalServiceException.
May throw InvalidInputException.
May throw OperationTimeoutException.
May throw ValidationException.
Parameter authStrategy :
The type of authentication, which can be an authentication token stored in
Amazon Web Services Secrets Manager, or a personal access token.
Parameter authToken :
The value of the authorization token.
Parameter branchName :
An optional branch in the remote repository.
Parameter commitId :
A commit ID for a commit in the remote repository.
Parameter folder :
An optional folder in the remote repository.
Parameter jobName :
The name of the Glue job to be synchronized to or from the remote
repository.
Parameter provider :
The provider for the remote repository. Possible values: GITHUB,
AWS_CODE_COMMIT, GITLAB, BITBUCKET.
Parameter repositoryName :
The name of the remote repository that contains the job artifacts. For
BitBucket providers, RepositoryName should include
WorkspaceName. Use the format
.
Parameter repositoryOwner :
The owner of the remote repository that contains the job artifacts.
Implementation
Future<UpdateJobFromSourceControlResponse> updateJobFromSourceControl({
SourceControlAuthStrategy? authStrategy,
String? authToken,
String? branchName,
String? commitId,
String? folder,
String? jobName,
SourceControlProvider? provider,
String? repositoryName,
String? repositoryOwner,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSGlue.UpdateJobFromSourceControl'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (authStrategy != null) 'AuthStrategy': authStrategy.value,
if (authToken != null) 'AuthToken': authToken,
if (branchName != null) 'BranchName': branchName,
if (commitId != null) 'CommitId': commitId,
if (folder != null) 'Folder': folder,
if (jobName != null) 'JobName': jobName,
if (provider != null) 'Provider': provider.value,
if (repositoryName != null) 'RepositoryName': repositoryName,
if (repositoryOwner != null) 'RepositoryOwner': repositoryOwner,
},
);
return UpdateJobFromSourceControlResponse.fromJson(jsonResponse.body);
}