Returns a history of deployments for the group.
Parameters:
-
group_id
(__string)
–
The ID of the Greengrass group.
-
max_results
(Optional[__string], default:
None
)
–
The maximum number of results to be returned per request.
-
next_token
(Optional[__string], default:
None
)
–
The token for the next set of results, or ''null'' if there are no additional results.
Raises:
Source code in docs_src/capo_greengrass/_services/greengrass.py
| def list_deployments(
self,
group_id: "capo_greengrass.types.__string.__string",
*,
config_overrides: Optional[GreengrassClientConfig] = None,
max_results: Optional["capo_greengrass.types.__string.__string"] = None,
next_token: Optional["capo_greengrass.types.__string.__string"] = None,
) -> "capo_greengrass.types.list_deployments_response.ListDeploymentsResponse":
"""Returns a history of deployments for the group.
Args:
group_id: The ID of the Greengrass group.
max_results: The maximum number of results to be returned per request.
next_token: The token for the next set of results, or ''null'' if there are no additional results.
Raises:
capo_greengrass.errors.bad_request_exception.BadRequestException: General error information.
capo_greengrass.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_greengrass.types.list_deployments_request.ListDeploymentsRequest]",
) -> OperationResponse[
"capo_greengrass.types.list_deployments_response.ListDeploymentsResponse"
]:
import capo_greengrass._operations.greengrass.list_deployments
output, http_response = (
capo_greengrass._operations.greengrass.list_deployments.list_deployments(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListDeployments")
)
input_: capo_greengrass.types.list_deployments_request.ListDeploymentsRequest = {
"group_id": group_id
}
if max_results is not None:
input_["max_results"] = max_results
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
|