Skip to content

list_command_executions_for_sandbox

list_command_executions_for_sandbox(
    sandbox_id: NonEmptyString,
    *,
    config_overrides: Optional[CodeBuildClientConfig] = None,
    max_results: Optional[PageSize] = None,
    sort_order: Optional[SortOrderType] = None,
    next_token: Optional[SensitiveString] = None,
) -> ListCommandExecutionsForSandboxOutput

Gets a list of command executions for a sandbox.

Parameters:

  • sandbox_id (NonEmptyString) –

    A sandboxId or sandboxArn.

  • max_results (Optional[PageSize], default: None ) –

    The maximum number of sandbox records to be retrieved.

  • sort_order (Optional[SortOrderType], default: None ) –

    The order in which sandbox records should be retrieved.

  • next_token (Optional[SensitiveString], default: None ) –

    The next token, if any, to get paginated results. You will get this value from previous execution of list sandboxes.

Raises:

Source code in docs_src/capo_codebuild/_services/code_build.py
def list_command_executions_for_sandbox(
    self,
    sandbox_id: "capo_codebuild.types.non_empty_string.NonEmptyString",
    *,
    config_overrides: Optional[CodeBuildClientConfig] = None,
    max_results: Optional["capo_codebuild.types.page_size.PageSize"] = None,
    sort_order: Optional[
        "capo_codebuild.types.sort_order_type.SortOrderType"
    ] = None,
    next_token: Optional[
        "capo_codebuild.types.sensitive_string.SensitiveString"
    ] = None,
) -> "capo_codebuild.types.list_command_executions_for_sandbox_output.ListCommandExecutionsForSandboxOutput":
    """<p>Gets a list of command executions for a sandbox.</p>

    Args:
        sandbox_id: <p>A <code>sandboxId</code> or <code>sandboxArn</code>.</p>
        max_results: <p>The maximum number of sandbox records to be retrieved.</p>
        sort_order: <p>The order in which sandbox records should be retrieved.</p>
        next_token: <p>The next token, if any, to get paginated results. You will get this value from previous execution of list sandboxes.</p>

    Raises:
        capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
        capo_codebuild.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified Amazon Web Services resource cannot be found.</p>
        capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_codebuild.types.list_command_executions_for_sandbox_input.ListCommandExecutionsForSandboxInput]",
    ) -> OperationResponse[
        "capo_codebuild.types.list_command_executions_for_sandbox_output.ListCommandExecutionsForSandboxOutput"
    ]:
        import capo_codebuild._operations.code_build_20161006.list_command_executions_for_sandbox

        output, http_response = (
            capo_codebuild._operations.code_build_20161006.list_command_executions_for_sandbox.list_command_executions_for_sandbox(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_codebuild.types.list_command_executions_for_sandbox_input.ListCommandExecutionsForSandboxInput",
    ) -> dict[str, Any]:
        import capo_codebuild.types.list_command_executions_for_sandbox_input

        return capo_codebuild.types.list_command_executions_for_sandbox_input.redact_sensitive(
            input_
        )

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

        return capo_codebuild.types.list_command_executions_for_sandbox_output.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "ListCommandExecutionsForSandbox",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_codebuild.types.list_command_executions_for_sandbox_input.ListCommandExecutionsForSandboxInput = {
        "sandbox_id": sandbox_id
    }
    if max_results is not None:
        input_["max_results"] = max_results
    if sort_order is not None:
        input_["sort_order"] = sort_order
    if next_token is not None:
        input_["next_token"] = next_token

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output