Return a list of operations that occurred on an App Runner service.
The resulting list of OperationSummary objects is sorted in reverse chronological order. The first object on the list represents the last started operation.
Parameters:
-
service_arn
(AppRunnerResourceArn)
–
The Amazon Resource Name (ARN) of the App Runner service that you want a list of operations for.
-
next_token
(Optional[String], default:
None
)
–
A token from a previous result page. It's used for a paginated request. The request retrieves the next result page. All other parameter values must be identical to the ones specified in the initial request.
If you don't specify NextToken, the request retrieves the first result page.
-
max_results
(Optional[ListOperationsMaxResults], default:
None
)
–
The maximum number of results to include in each response (result page). It's used for a paginated request.
If you don't specify MaxResults, the request retrieves all available results in a single response.
Raises:
Source code in docs_src/capo_apprunner/_services/app_runner.py
| def list_operations(
self,
service_arn: "capo_apprunner.types.app_runner_resource_arn.AppRunnerResourceArn",
*,
config_overrides: Optional[AppRunnerClientConfig] = None,
next_token: Optional["capo_apprunner.types.string.String"] = None,
max_results: Optional[
"capo_apprunner.types.list_operations_max_results.ListOperationsMaxResults"
] = None,
) -> "capo_apprunner.types.list_operations_response.ListOperationsResponse":
"""<p>Return a list of operations that occurred on an App Runner service.</p> <p>The resulting list of <a>OperationSummary</a> objects is sorted in reverse chronological order. The first object on the list represents the last started operation.</p>
Args:
service_arn: <p>The Amazon Resource Name (ARN) of the App Runner service that you want a list of operations for.</p>
next_token: <p>A token from a previous result page. It's used for a paginated request. The request retrieves the next result page. All other parameter values must be identical to the ones specified in the initial request.</p> <p>If you don't specify <code>NextToken</code>, the request retrieves the first result page.</p>
max_results: <p>The maximum number of results to include in each response (result page). It's used for a paginated request.</p> <p>If you don't specify <code>MaxResults</code>, the request retrieves all available results in a single response.</p>
Raises:
capo_apprunner.errors.internal_service_error_exception.InternalServiceErrorException: <p>An unexpected service exception occurred.</p>
capo_apprunner.errors.invalid_request_exception.InvalidRequestException: <p>One or more input parameters aren't valid. Refer to the API action's document page, correct the input parameters, and try the action again.</p>
capo_apprunner.errors.resource_not_found_exception.ResourceNotFoundException: <p>A resource doesn't exist for the specified Amazon Resource Name (ARN) in your Amazon Web Services account.</p>
capo_apprunner.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_apprunner.types.list_operations_request.ListOperationsRequest]",
) -> OperationResponse[
"capo_apprunner.types.list_operations_response.ListOperationsResponse"
]:
import capo_apprunner._operations.app_runner.list_operations
output, http_response = (
capo_apprunner._operations.app_runner.list_operations.list_operations(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListOperations")
)
input_: capo_apprunner.types.list_operations_request.ListOperationsRequest = {
"service_arn": service_arn
}
if next_token is not None:
input_["next_token"] = next_token
if max_results is not None:
input_["max_results"] = max_results
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|