Creates a software update for a core or group of cores (specified as an IoT thing group.) Use this to update the OTA Agent as well as the Greengrass core software. It makes use of the IoT Jobs feature which provides additional commands to manage a Greengrass core software update job.
Parameters:
-
amzn_client_token
(Optional[__string], default:
None
)
–
A client token used to correlate requests and responses.
Raises:
Source code in docs_src/capo_greengrass/_services/greengrass.py
| def create_software_update_job(
self,
*,
config_overrides: Optional[GreengrassClientConfig] = None,
amzn_client_token: Optional["capo_greengrass.types.__string.__string"] = None,
s3_url_signer_role: Optional[
"capo_greengrass.types.s3_url_signer_role.S3UrlSignerRole"
] = None,
software_to_update: Optional[
"capo_greengrass.types.software_to_update.SoftwareToUpdate"
] = None,
update_agent_log_level: Optional[
"capo_greengrass.types.update_agent_log_level.UpdateAgentLogLevel"
] = None,
update_targets: Optional[
"capo_greengrass.types.update_targets.UpdateTargets"
] = None,
update_targets_architecture: Optional[
"capo_greengrass.types.update_targets_architecture.UpdateTargetsArchitecture"
] = None,
update_targets_operating_system: Optional[
"capo_greengrass.types.update_targets_operating_system.UpdateTargetsOperatingSystem"
] = None,
) -> "capo_greengrass.types.create_software_update_job_response.CreateSoftwareUpdateJobResponse":
"""Creates a software update for a core or group of cores (specified as an IoT thing group.) Use this to update the OTA Agent as well as the Greengrass core software. It makes use of the IoT Jobs feature which provides additional commands to manage a Greengrass core software update job.
Args:
amzn_client_token: A client token used to correlate requests and responses.
Raises:
capo_greengrass.errors.bad_request_exception.BadRequestException: General error information.
capo_greengrass.errors.internal_server_error_exception.InternalServerErrorException: 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.create_software_update_job_request.CreateSoftwareUpdateJobRequest]",
) -> OperationResponse[
"capo_greengrass.types.create_software_update_job_response.CreateSoftwareUpdateJobResponse"
]:
import capo_greengrass._operations.greengrass.create_software_update_job
output, http_response = (
capo_greengrass._operations.greengrass.create_software_update_job.create_software_update_job(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CreateSoftwareUpdateJob")
)
input_: capo_greengrass.types.create_software_update_job_request.CreateSoftwareUpdateJobRequest = {}
if amzn_client_token is not None:
input_["amzn_client_token"] = amzn_client_token
if s3_url_signer_role is not None:
input_["s3_url_signer_role"] = s3_url_signer_role
if software_to_update is not None:
input_["software_to_update"] = software_to_update
if update_agent_log_level is not None:
input_["update_agent_log_level"] = update_agent_log_level
if update_targets is not None:
input_["update_targets"] = update_targets
if update_targets_architecture is not None:
input_["update_targets_architecture"] = update_targets_architecture
if update_targets_operating_system is not None:
input_["update_targets_operating_system"] = update_targets_operating_system
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|