Skip to content

update_vehicle async

update_vehicle(
    vehicle_name: vehicleName,
    *,
    config_overrides: Optional[AsyncIoTFleetWiseClientConfig] = None,
    model_manifest_arn: Optional[arn] = None,
    decoder_manifest_arn: Optional[arn] = None,
    attributes: Optional[attributesMap] = None,
    attribute_update_mode: Optional[UpdateMode] = None,
    state_templates_to_add: Optional[StateTemplateAssociations] = None,
    state_templates_to_remove: Optional[StateTemplateAssociationIdentifiers] = None,
    state_templates_to_update: Optional[StateTemplateAssociations] = None,
) -> UpdateVehicleResponse

Updates a vehicle.

Access to certain Amazon Web Services IoT FleetWise features is currently gated. For more information, see Amazon Web Services Region and feature availability in the Amazon Web Services IoT FleetWise Developer Guide.

Parameters:

  • vehicle_name (vehicleName) –

    The unique ID of the vehicle to update.

  • model_manifest_arn (Optional[arn], default: None ) –

    The ARN of a vehicle model (model manifest) associated with the vehicle.

  • decoder_manifest_arn (Optional[arn], default: None ) –

    The ARN of the decoder manifest associated with this vehicle.

  • attributes (Optional[attributesMap], default: None ) –

    Static information about a vehicle in a key-value pair. For example:

    "engineType" : "1.3 L R2"

  • attribute_update_mode (Optional[UpdateMode], default: None ) –

    The method the specified attributes will update the existing attributes on the vehicle. UseOverwite to replace the vehicle attributes with the specified attributes. Or use Merge to combine all attributes.

    This is required if attributes are present in the input.

  • state_templates_to_add (Optional[StateTemplateAssociations], default: None ) –

    Associate state templates with the vehicle.

  • state_templates_to_remove (Optional[StateTemplateAssociationIdentifiers], default: None ) –

    Remove state templates from the vehicle.

  • state_templates_to_update (Optional[StateTemplateAssociations], default: None ) –

    Change the stateTemplateUpdateStrategy of state templates already associated with the vehicle.

Raises:

Source code in docs_src/capo_iotfleetwise/_services/async_io_t_fleet_wise.py
async def update_vehicle(
    self,
    vehicle_name: "capo_iotfleetwise.types.vehicle_name.vehicleName",
    *,
    config_overrides: Optional[AsyncIoTFleetWiseClientConfig] = None,
    model_manifest_arn: Optional["capo_iotfleetwise.types.arn.arn"] = None,
    decoder_manifest_arn: Optional["capo_iotfleetwise.types.arn.arn"] = None,
    attributes: Optional[
        "capo_iotfleetwise.types.attributes_map.attributesMap"
    ] = None,
    attribute_update_mode: Optional[
        "capo_iotfleetwise.types.update_mode.UpdateMode"
    ] = None,
    state_templates_to_add: Optional[
        "capo_iotfleetwise.types.state_template_associations.StateTemplateAssociations"
    ] = None,
    state_templates_to_remove: Optional[
        "capo_iotfleetwise.types.state_template_association_identifiers.StateTemplateAssociationIdentifiers"
    ] = None,
    state_templates_to_update: Optional[
        "capo_iotfleetwise.types.state_template_associations.StateTemplateAssociations"
    ] = None,
) -> "capo_iotfleetwise.types.update_vehicle_response.UpdateVehicleResponse":
    """<p> Updates a vehicle.</p> <important> <p>Access to certain Amazon Web Services IoT FleetWise features is currently gated. For more information, see <a href="https://docs.aws.amazon.com/iot-fleetwise/latest/developerguide/fleetwise-regions.html">Amazon Web Services Region and feature availability</a> in the <i>Amazon Web Services IoT FleetWise Developer Guide</i>.</p> </important>

    Args:
        vehicle_name: <p>The unique ID of the vehicle to update.</p>
        model_manifest_arn: <p>The ARN of a vehicle model (model manifest) associated with the vehicle.</p>
        decoder_manifest_arn: <p>The ARN of the decoder manifest associated with this vehicle.</p>
        attributes: <p>Static information about a vehicle in a key-value pair. For example:</p> <p> <code>"engineType"</code> : <code>"1.3 L R2"</code> </p>
        attribute_update_mode: <p>The method the specified attributes will update the existing attributes on the vehicle. Use<code>Overwite</code> to replace the vehicle attributes with the specified attributes. Or use <code>Merge</code> to combine all attributes.</p> <p>This is required if attributes are present in the input.</p>
        state_templates_to_add: <p>Associate state templates with the vehicle.</p>
        state_templates_to_remove: <p>Remove state templates from the vehicle.</p>
        state_templates_to_update: <p>Change the <code>stateTemplateUpdateStrategy</code> of state templates already associated with the vehicle.</p>

    Raises:
        capo_iotfleetwise.errors.internal_server_exception.InternalServerException: <p>The request couldn't be completed because the server temporarily failed.</p>
        capo_iotfleetwise.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient permission to perform this action.</p>
        capo_iotfleetwise.errors.conflict_exception.ConflictException: <p>The request has conflicting operations. This can occur if you're trying to perform more than one operation on the same resource at the same time.</p>
        capo_iotfleetwise.errors.limit_exceeded_exception.LimitExceededException: <p>A service quota was exceeded. </p>
        capo_iotfleetwise.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource wasn't found.</p>
        capo_iotfleetwise.errors.throttling_exception.ThrottlingException: <p>The request couldn't be completed due to throttling.</p>
        capo_iotfleetwise.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_iotfleetwise.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_iotfleetwise.types.update_vehicle_request.UpdateVehicleRequest]",
    ) -> AsyncOperationResponse[
        "capo_iotfleetwise.types.update_vehicle_response.UpdateVehicleResponse"
    ]:
        import capo_iotfleetwise._operations.io_t_autobahn_control_plane.update_vehicle

        (
            output,
            http_response,
        ) = await capo_iotfleetwise._operations.io_t_autobahn_control_plane.update_vehicle.async_update_vehicle(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateVehicle")
    )
    input_: capo_iotfleetwise.types.update_vehicle_request.UpdateVehicleRequest = {
        "vehicle_name": vehicle_name
    }
    if model_manifest_arn is not None:
        input_["model_manifest_arn"] = model_manifest_arn
    if decoder_manifest_arn is not None:
        input_["decoder_manifest_arn"] = decoder_manifest_arn
    if attributes is not None:
        input_["attributes"] = attributes
    if attribute_update_mode is not None:
        input_["attribute_update_mode"] = attribute_update_mode
    if state_templates_to_add is not None:
        input_["state_templates_to_add"] = state_templates_to_add
    if state_templates_to_remove is not None:
        input_["state_templates_to_remove"] = state_templates_to_remove
    if state_templates_to_update is not None:
        input_["state_templates_to_update"] = state_templates_to_update

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output