fn create_software_update_job(
        &self,
        input: CreateSoftwareUpdateJobRequest,
    ) -> RusotoFuture<CreateSoftwareUpdateJobResponse, CreateSoftwareUpdateJobError> {
        let request_uri = "/greengrass/updates";

        let mut request = SignedRequest::new("POST", "greengrass", &self.region, &request_uri);
        request.set_content_type("application/x-amz-json-1.1".to_owned());

        let encoded = Some(serde_json::to_vec(&input).unwrap());
        request.set_payload(encoded);

        if let Some(ref amzn_client_token) = input.amzn_client_token {
            request.add_header("X-Amzn-Client-Token", &amzn_client_token.to_string());
        }

        self.client.sign_and_dispatch(request, |response| {
            if response.status.as_u16() == 200 {
                Box::new(response.buffer().from_err().map(|response| {
                    let mut body = response.body;

                    if body == b"null" || body.is_empty() {
                        body = b"{}".to_vec();
                    }

                    debug!("Response body: {:?}", body);
                    debug!("Response status: {}", response.status);
                    let result =
                        serde_json::from_slice::<CreateSoftwareUpdateJobResponse>(&body).unwrap();

                    result
                }))
            } else {
                Box::new(response.buffer().from_err().and_then(|response| {
                    Err(CreateSoftwareUpdateJobError::from_response(response))
                }))
            }
        })
    }
/// <p>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.</p>
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.
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 .
fn create_software_update_job(
        &self,
        input: CreateSoftwareUpdateJobRequest,
    ) -> RusotoFuture<CreateSoftwareUpdateJobResponse, CreateSoftwareUpdateJobError> {
        let request_uri = "/greengrass/updates";
        let mut request = SignedRequest::new("POST", "greengrass", &self.region, &request_uri);
        request.set_content_type("application/x-amz-json-1.1".to_owned());
        let encoded = Some(serde_json::to_vec(&input).unwrap());
        request.set_payload(encoded);
        if let Some(ref amzn_client_token) = input.amzn_client_token {
            request.add_header("X-Amzn-Client-Token", &amzn_client_token.to_string());
        }
        self.client.sign_and_dispatch(request, |response| {
            if response.status.as_u16() == 200 {
                Box::new(response.buffer().from_err().map(|response| {
                    let mut body = response.body;
                    if body == b"null" || body.is_empty() {
                        body = b"{}".to_vec();
                    }
                    debug!("Response body: {:?}", body);
                    debug!("Response status: {}", response.status);
                    let result =
                        serde_json::from_slice::<CreateSoftwareUpdateJobResponse>(&body).unwrap();
                    result
                }))
            } else {
                Box::new(response.buffer().from_err().and_then(|response| {
                    Err(CreateSoftwareUpdateJobError::from_response(response))
                }))
            }
        })
    }
fn create_software_update_job ( & self , input : CreateSoftwareUpdateJobRequest , ) -> RusotoFuture < CreateSoftwareUpdateJobResponse , CreateSoftwareUpdateJobError > { let request_uri = " " ; let mut request = SignedRequest :: new ( " " , " " , & self . region , & request_uri ) ; request . set_content_type ( " " . to_owned ( ) ) ; let encoded = Some ( serde_json :: to_vec ( & input ) . unwrap ( ) ) ; request . set_payload ( encoded ) ; if let Some ( ref amzn_client_token ) = input . amzn_client_token { request . add_header ( " " , & amzn_client_token . to_string ( ) ) ; } self . client . sign_and_dispatch ( request , | response | { if response . status . as_u16 ( ) == 200 { Box :: new ( response . buffer ( ) . from_err ( ) . map ( | response | { let mut body = response . body ; if body == b" " || body . is_empty ( ) { body = b" " . to_vec ( ) ; } debug ! ( " " body ) ; debug ! ( " " response status ) ; let result = serde_json :: from_slice :: < CreateSoftwareUpdateJobResponse > ( & body ) . unwrap ( ) ; result } ) ) } else { Box :: new ( response . buffer ( ) . from_err ( ) . and_then ( | response | { Err ( CreateSoftwareUpdateJobError :: from_response ( response ) ) } ) ) } } ) }
<p>Creates a software update for a core or group of cores (specified as an IoT thing group.)
<p > Creates a software update for a core or group of cores ( specified as an IoT thing group . )
&self
input
CreateSoftwareUpdateJobRequest
&self
input
CreateSoftwareUpdateJobRequest