Skip to content

update_source_control_from_job async

update_source_control_from_job(
    *,
    config_overrides: Optional[AsyncGlueClientConfig] = None,
    job_name: Optional[NameString] = None,
    provider: Optional[SourceControlProvider] = None,
    repository_name: Optional[NameString] = None,
    repository_owner: Optional[NameString] = None,
    branch_name: Optional[NameString] = None,
    folder: Optional[NameString] = None,
    commit_id: Optional[CommitIdString] = None,
    auth_strategy: Optional[SourceControlAuthStrategy] = None,
    auth_token: Optional[AuthTokenString] = None,
) -> UpdateSourceControlFromJobResponse

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.

This API supports optional parameters which take in the repository information.

Parameters:

  • job_name (Optional[NameString], default: None ) –

    The name of the Glue job to be synchronized to or from the remote repository.

  • provider (Optional[SourceControlProvider], default: None ) –

    The provider for the remote repository. Possible values: GITHUB, AWS_CODE_COMMIT, GITLAB, BITBUCKET.

  • repository_name (Optional[NameString], default: None ) –

    The name of the remote repository that contains the job artifacts. For BitBucket providers, RepositoryName should include WorkspaceName. Use the format /.

  • repository_owner (Optional[NameString], default: None ) –

    The owner of the remote repository that contains the job artifacts.

  • branch_name (Optional[NameString], default: None ) –

    An optional branch in the remote repository.

  • folder (Optional[NameString], default: None ) –

    An optional folder in the remote repository.

  • commit_id (Optional[CommitIdString], default: None ) –

    A commit ID for a commit in the remote repository.

  • auth_strategy (Optional[SourceControlAuthStrategy], default: None ) –

    The type of authentication, which can be an authentication token stored in Amazon Web Services Secrets Manager, or a personal access token.

  • auth_token (Optional[AuthTokenString], default: None ) –

    The value of the authorization token.

Raises:

Source code in docs_src/capo_glue/_services/async_glue.py
async def update_source_control_from_job(
    self,
    *,
    config_overrides: Optional[AsyncGlueClientConfig] = None,
    job_name: Optional["capo_glue.types.name_string.NameString"] = None,
    provider: Optional[
        "capo_glue.types.source_control_provider.SourceControlProvider"
    ] = None,
    repository_name: Optional["capo_glue.types.name_string.NameString"] = None,
    repository_owner: Optional["capo_glue.types.name_string.NameString"] = None,
    branch_name: Optional["capo_glue.types.name_string.NameString"] = None,
    folder: Optional["capo_glue.types.name_string.NameString"] = None,
    commit_id: Optional["capo_glue.types.commit_id_string.CommitIdString"] = None,
    auth_strategy: Optional[
        "capo_glue.types.source_control_auth_strategy.SourceControlAuthStrategy"
    ] = None,
    auth_token: Optional[
        "capo_glue.types.auth_token_string.AuthTokenString"
    ] = None,
) -> "capo_glue.types.update_source_control_from_job_response.UpdateSourceControlFromJobResponse":
    """<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>

    Args:
        job_name: <p>The name of the Glue job to be synchronized to or from the remote repository.</p>
        provider: <p> The provider for the remote repository. Possible values: GITHUB, AWS_CODE_COMMIT, GITLAB, BITBUCKET. </p>
        repository_name: <p>The name of the remote repository that contains the job artifacts. For BitBucket providers, <code>RepositoryName</code> should include <code>WorkspaceName</code>. Use the format <code><WorkspaceName>/<RepositoryName></code>. </p>
        repository_owner: <p>The owner of the remote repository that contains the job artifacts.</p>
        branch_name: <p>An optional branch in the remote repository.</p>
        folder: <p>An optional folder in the remote repository.</p>
        commit_id: <p>A commit ID for a commit in the remote repository.</p>
        auth_strategy: <p>The type of authentication, which can be an authentication token stored in Amazon Web Services Secrets Manager, or a personal access token.</p>
        auth_token: <p>The value of the authorization token.</p>

    Raises:
        capo_glue.errors.access_denied_exception.AccessDeniedException: <p>Access to a resource was denied.</p>
        capo_glue.errors.already_exists_exception.AlreadyExistsException: <p>A resource to be created or added already exists.</p>
        capo_glue.errors.entity_not_found_exception.EntityNotFoundException: <p>A specified entity does not exist</p>
        capo_glue.errors.internal_service_exception.InternalServiceException: <p>An internal service error occurred.</p>
        capo_glue.errors.invalid_input_exception.InvalidInputException: <p>The input provided was not valid.</p>
        capo_glue.errors.operation_timeout_exception.OperationTimeoutException: <p>The operation timed out.</p>
        capo_glue.errors.validation_exception.ValidationException: <p>A value could not be validated.</p>
        capo_glue.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_glue.types.update_source_control_from_job_request.UpdateSourceControlFromJobRequest]",
    ) -> AsyncOperationResponse[
        "capo_glue.types.update_source_control_from_job_response.UpdateSourceControlFromJobResponse"
    ]:
        import capo_glue._operations.aws_glue.update_source_control_from_job

        (
            output,
            http_response,
        ) = await capo_glue._operations.aws_glue.update_source_control_from_job.async_update_source_control_from_job(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateSourceControlFromJob")
    )
    input_: capo_glue.types.update_source_control_from_job_request.UpdateSourceControlFromJobRequest = {}
    if job_name is not None:
        input_["job_name"] = job_name
    if provider is not None:
        input_["provider"] = provider
    if repository_name is not None:
        input_["repository_name"] = repository_name
    if repository_owner is not None:
        input_["repository_owner"] = repository_owner
    if branch_name is not None:
        input_["branch_name"] = branch_name
    if folder is not None:
        input_["folder"] = folder
    if commit_id is not None:
        input_["commit_id"] = commit_id
    if auth_strategy is not None:
        input_["auth_strategy"] = auth_strategy
    if auth_token is not None:
        input_["auth_token"] = auth_token

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output