{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-iot-fleetwise/json-schema/amazon-iot-fleetwise-create-vehicle-request-schema.json",
  "title": "CreateVehicleRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-iot-fleetwise-aws-iot-fleetwise-api-openapi.yml#/components/schemas/CreateVehicleRequest",
  "type": "object",
  "properties": {
    "vehicleName": {
      "type": "string",
      "description": "The unique ID of the vehicle to create."
    },
    "modelManifestArn": {
      "type": "string",
      "description": "The Amazon Resource Name ARN of a vehicle model."
    },
    "decoderManifestArn": {
      "type": "string",
      "description": "The ARN of a decoder manifest."
    },
    "attributes": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "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 dataExtraDimensions and/or metadataExtraDimensions (for state templates only) when creating your campaign/state template."
    },
    "associationBehavior": {
      "type": "string",
      "enum": [
        "CreateIotThing",
        "ValidateIotThingExists"
      ],
      "description": "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:"
    },
    "tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "description": "Metadata that can be used to manage the vehicle."
    },
    "stateTemplates": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/StateTemplateAssociation"
      },
      "description": "Associate state templates with the vehicle. You can monitor the last known state of the vehicle in near real time."
    }
  },
  "required": [
    "vehicleName",
    "modelManifestArn",
    "decoderManifestArn"
  ],
  "$defs": {
    "OnChangeStateTemplateUpdateStrategy": {
      "type": "object",
      "properties": {}
    },
    "PeriodicStateTemplateUpdateStrategy": {
      "type": "object",
      "properties": {
        "stateTemplateUpdateRate": {
          "$ref": "#/$defs/TimePeriod"
        }
      },
      "required": [
        "stateTemplateUpdateRate"
      ]
    },
    "StateTemplateAssociation": {
      "type": "object",
      "properties": {
        "identifier": {
          "type": "string",
          "description": "The unique ID of the state template."
        },
        "stateTemplateUpdateStrategy": {
          "$ref": "#/$defs/StateTemplateUpdateStrategy"
        }
      },
      "required": [
        "identifier",
        "stateTemplateUpdateStrategy"
      ]
    },
    "StateTemplateUpdateStrategy": {
      "type": "object",
      "properties": {
        "periodic": {
          "$ref": "#/$defs/PeriodicStateTemplateUpdateStrategy"
        },
        "onChange": {
          "$ref": "#/$defs/OnChangeStateTemplateUpdateStrategy"
        }
      },
      "description": "Exactly one member is set."
    },
    "Tag": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "The tag's key."
        },
        "Value": {
          "type": "string",
          "description": "The tag's value."
        }
      },
      "required": [
        "Key",
        "Value"
      ]
    },
    "TimePeriod": {
      "type": "object",
      "properties": {
        "unit": {
          "type": "string",
          "enum": [
            "MILLISECOND",
            "SECOND",
            "MINUTE",
            "HOUR"
          ],
          "description": "A unit of time."
        },
        "value": {
          "type": "integer",
          "description": "A number of time units."
        }
      },
      "required": [
        "unit",
        "value"
      ]
    }
  }
}