Skip to content

batch_get_commits async

batch_get_commits(
    commit_ids: CommitIdsInputList,
    repository_name: RepositoryName,
    *,
    config_overrides: Optional[AsyncCodeCommitClientConfig] = None,
) -> BatchGetCommitsOutput

Returns information about the contents of one or more commits in a repository.

Parameters:

  • commit_ids (CommitIdsInputList) –

    The full commit IDs of the commits to get information about.

    You must supply the full SHA IDs of each commit. You cannot use shortened SHA IDs.

  • repository_name (RepositoryName) –

    The name of the repository that contains the commits.

Raises:

Source code in docs_src/capo_codecommit/_services/async_code_commit.py
async def batch_get_commits(
    self,
    commit_ids: "capo_codecommit.types.commit_ids_input_list.CommitIdsInputList",
    repository_name: "capo_codecommit.types.repository_name.RepositoryName",
    *,
    config_overrides: Optional[AsyncCodeCommitClientConfig] = None,
) -> "capo_codecommit.types.batch_get_commits_output.BatchGetCommitsOutput":
    """<p>Returns information about the contents of one or more commits in a repository.</p>

    Args:
        commit_ids: <p>The full commit IDs of the commits to get information about.</p> <note> <p>You must supply the full SHA IDs of each commit. You cannot use shortened SHA IDs.</p> </note>
        repository_name: <p>The name of the repository that contains the commits.</p>

    Raises:
        capo_codecommit.errors.commit_ids_limit_exceeded_exception.CommitIdsLimitExceededException: <p>The maximum number of allowed commit IDs in a batch request is 100. Verify that your batch requests contains no more than 100 commit IDs, and then try again.</p>
        capo_codecommit.errors.commit_ids_list_required_exception.CommitIdsListRequiredException: <p>A list of commit IDs is required, but was either not specified or the list was empty.</p>
        capo_codecommit.errors.encryption_integrity_checks_failed_exception.EncryptionIntegrityChecksFailedException: <p>An encryption integrity check failed.</p>
        capo_codecommit.errors.encryption_key_access_denied_exception.EncryptionKeyAccessDeniedException: <p>An encryption key could not be accessed.</p>
        capo_codecommit.errors.encryption_key_disabled_exception.EncryptionKeyDisabledException: <p>The encryption key is disabled.</p>
        capo_codecommit.errors.encryption_key_not_found_exception.EncryptionKeyNotFoundException: <p>No encryption key was found.</p>
        capo_codecommit.errors.encryption_key_unavailable_exception.EncryptionKeyUnavailableException: <p>The encryption key is not available.</p>
        capo_codecommit.errors.invalid_repository_name_exception.InvalidRepositoryNameException: <p>A specified repository name is not valid.</p> <note> <p>This exception occurs only when a specified repository name is not valid. Other exceptions occur when a required repository parameter is missing, or when a specified repository does not exist.</p> </note>
        capo_codecommit.errors.repository_does_not_exist_exception.RepositoryDoesNotExistException: <p>The specified repository does not exist.</p>
        capo_codecommit.errors.repository_name_required_exception.RepositoryNameRequiredException: <p>A repository name is required, but was not specified.</p>
        capo_codecommit.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_codecommit.types.batch_get_commits_input.BatchGetCommitsInput]",
    ) -> AsyncOperationResponse[
        "capo_codecommit.types.batch_get_commits_output.BatchGetCommitsOutput"
    ]:
        import capo_codecommit._operations.code_commit_20150413.batch_get_commits

        (
            output,
            http_response,
        ) = await capo_codecommit._operations.code_commit_20150413.batch_get_commits.async_batch_get_commits(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("BatchGetCommits")
    )
    input_: capo_codecommit.types.batch_get_commits_input.BatchGetCommitsInput = {
        "commit_ids": commit_ids,
        "repository_name": repository_name,
    }

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