Skip to content

batch_get_command_executions async

batch_get_command_executions(
    sandbox_id: NonEmptyString,
    command_execution_ids: CommandExecutionIds,
    *,
    config_overrides: Optional[AsyncCodeBuildClientConfig] = None,
) -> BatchGetCommandExecutionsOutput

Gets information about the command executions.

Parameters:

Raises:

Source code in docs_src/capo_codebuild/_services/async_code_build.py
async def batch_get_command_executions(
    self,
    sandbox_id: "capo_codebuild.types.non_empty_string.NonEmptyString",
    command_execution_ids: "capo_codebuild.types.command_execution_ids.CommandExecutionIds",
    *,
    config_overrides: Optional[AsyncCodeBuildClientConfig] = None,
) -> "capo_codebuild.types.batch_get_command_executions_output.BatchGetCommandExecutionsOutput":
    """<p>Gets information about the command executions.</p>

    Args:
        sandbox_id: <p>A <code>sandboxId</code> or <code>sandboxArn</code>.</p>
        command_execution_ids: <p>A comma separated list of <code>commandExecutionIds</code>.</p>

    Raises:
        capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
        capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_codebuild.types.batch_get_command_executions_input.BatchGetCommandExecutionsInput]",
    ) -> AsyncOperationResponse[
        "capo_codebuild.types.batch_get_command_executions_output.BatchGetCommandExecutionsOutput"
    ]:
        import capo_codebuild._operations.code_build_20161006.batch_get_command_executions

        (
            output,
            http_response,
        ) = await capo_codebuild._operations.code_build_20161006.batch_get_command_executions.async_batch_get_command_executions(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_codebuild.types.batch_get_command_executions_output.BatchGetCommandExecutionsOutput",
    ) -> dict[str, Any]:
        import capo_codebuild.types.batch_get_command_executions_output

        return capo_codebuild.types.batch_get_command_executions_output.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("BatchGetCommandExecutions", redact_output=_redact_output),
    )
    input_: capo_codebuild.types.batch_get_command_executions_input.BatchGetCommandExecutionsInput = {
        "sandbox_id": sandbox_id,
        "command_execution_ids": command_execution_ids,
    }

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