/AWS1/IF_IOI=>CREATEVEHICLE()¶
About CreateVehicle¶
Creates a vehicle, which is an instance of a vehicle model (model manifest). Vehicles created from the same vehicle model consist of the same signals inherited from the vehicle model.
If you have an existing Amazon Web Services IoT thing, you can use Amazon Web Services IoT FleetWise to create a vehicle and collect data from your thing.
For more information, see Create a vehicle (AWS CLI) in the Amazon Web Services IoT FleetWise Developer Guide.
Method Signature¶
METHODS /AWS1/IF_IOI~CREATEVEHICLE
IMPORTING
!IV_VEHICLENAME TYPE /AWS1/IOIVEHICLENAME OPTIONAL
!IV_MODELMANIFESTARN TYPE /AWS1/IOIARN OPTIONAL
!IV_DECODERMANIFESTARN TYPE /AWS1/IOIARN OPTIONAL
!IT_ATTRIBUTES TYPE /AWS1/CL_IOIATTRIBUTESMAP_W=>TT_ATTRIBUTESMAP OPTIONAL
!IV_ASSOCIATIONBEHAVIOR TYPE /AWS1/IOIVEHICLEASSOCIATIONBEH OPTIONAL
!IT_TAGS TYPE /AWS1/CL_IOITAG=>TT_TAGLIST OPTIONAL
!IT_STATETEMPLATES TYPE /AWS1/CL_IOISTATETMPLASSOCIA00=>TT_STATETEMPLATEASSOCIATIONS OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ioicreatevehiclersp
RAISING
/AWS1/CX_IOIINTERNALSERVEREX
/AWS1/CX_IOIACCESSDENIEDEX
/AWS1/CX_IOICONFLICTEXCEPTION
/AWS1/CX_IOILIMITEXCEEDEDEX
/AWS1/CX_IOIRESOURCENOTFOUNDEX
/AWS1/CX_IOITHROTTLINGEX
/AWS1/CX_IOIVALIDATIONEX
/AWS1/CX_IOICLIENTEXC
/AWS1/CX_IOISERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_vehiclename TYPE /AWS1/IOIVEHICLENAME /AWS1/IOIVEHICLENAME¶
The unique ID of the vehicle to create.
iv_modelmanifestarn TYPE /AWS1/IOIARN /AWS1/IOIARN¶
The Amazon Resource Name ARN of a vehicle model.
iv_decodermanifestarn TYPE /AWS1/IOIARN /AWS1/IOIARN¶
The ARN of a decoder manifest.
Optional arguments:¶
it_attributes TYPE /AWS1/CL_IOIATTRIBUTESMAP_W=>TT_ATTRIBUTESMAP TT_ATTRIBUTESMAP¶
Static information about a vehicle in a key-value pair. For example:
"engineType":"1.3 L R2"To use attributes with Campaigns or State Templates, you must include them using the request parameters
dataExtraDimensionsand/ormetadataExtraDimensions(for state templates only) when creating your campaign/state template.
iv_associationbehavior TYPE /AWS1/IOIVEHICLEASSOCIATIONBEH /AWS1/IOIVEHICLEASSOCIATIONBEH¶
An option to create a new Amazon Web Services IoT thing when creating a vehicle, or to validate an existing Amazon Web Services IoT thing as a vehicle.
Default:
it_tags TYPE /AWS1/CL_IOITAG=>TT_TAGLIST TT_TAGLIST¶
Metadata that can be used to manage the vehicle.
it_statetemplates TYPE /AWS1/CL_IOISTATETMPLASSOCIA00=>TT_STATETEMPLATEASSOCIATIONS TT_STATETEMPLATEASSOCIATIONS¶
Associate state templates with the vehicle. You can monitor the last known state of the vehicle in near real time.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_ioicreatevehiclersp /AWS1/CL_IOICREATEVEHICLERSP¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->createvehicle(
it_attributes = VALUE /aws1/cl_ioiattributesmap_w=>tt_attributesmap(
(
VALUE /aws1/cl_ioiattributesmap_w=>ts_attributesmap_maprow(
key = |string|
value = new /aws1/cl_ioiattributesmap_w( |string| )
)
)
)
it_statetemplates = VALUE /aws1/cl_ioistatetmplassocia00=>tt_statetemplateassociations(
(
new /aws1/cl_ioistatetmplassocia00(
io_statetmplupdatestrategy = new /aws1/cl_ioistatetmplupdstrag(
io_onchange = new /aws1/cl_ioionchangestatetmp00( )
io_periodic = new /aws1/cl_ioipericstatetmplup00(
io_statetemplateupdaterate = new /aws1/cl_ioitimeperiod(
iv_unit = |string|
iv_value = 123
)
)
)
iv_identifier = |string|
)
)
)
it_tags = VALUE /aws1/cl_ioitag=>tt_taglist(
(
new /aws1/cl_ioitag(
iv_key = |string|
iv_value = |string|
)
)
)
iv_associationbehavior = |string|
iv_decodermanifestarn = |string|
iv_modelmanifestarn = |string|
iv_vehiclename = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_vehiclename = lo_result->get_vehiclename( ).
lv_arn = lo_result->get_arn( ).
lv_arn = lo_result->get_thingarn( ).
ENDIF.