Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Updates an asset model and all of the assets that were created from the model. Each asset created from the model inherits the updated asset model's property and hierarchy definitions. For more information, see Updating assets and models in the IoT SiteWise User Guide.
This operation overwrites the existing model with the provided model. To avoid deleting your asset model's properties or hierarchies, you must include their IDs and definitions in the updated asset model payload. For more information, see DescribeAssetModel.
If you remove a property from an asset model, IoT SiteWise deletes all previous data for that property. If you remove a hierarchy definition from an asset model, IoT SiteWise disassociates every asset associated with that hierarchy. You can't change the type or data type of an existing property.
Synopsis
- data UpdateAssetModel = UpdateAssetModel' {}
- newUpdateAssetModel :: Text -> Text -> UpdateAssetModel
- updateAssetModel_clientToken :: Lens' UpdateAssetModel (Maybe Text)
- updateAssetModel_assetModelDescription :: Lens' UpdateAssetModel (Maybe Text)
- updateAssetModel_assetModelProperties :: Lens' UpdateAssetModel (Maybe [AssetModelProperty])
- updateAssetModel_assetModelCompositeModels :: Lens' UpdateAssetModel (Maybe [AssetModelCompositeModel])
- updateAssetModel_assetModelHierarchies :: Lens' UpdateAssetModel (Maybe [AssetModelHierarchy])
- updateAssetModel_assetModelId :: Lens' UpdateAssetModel Text
- updateAssetModel_assetModelName :: Lens' UpdateAssetModel Text
- data UpdateAssetModelResponse = UpdateAssetModelResponse' {}
- newUpdateAssetModelResponse :: Int -> AssetModelStatus -> UpdateAssetModelResponse
- updateAssetModelResponse_httpStatus :: Lens' UpdateAssetModelResponse Int
- updateAssetModelResponse_assetModelStatus :: Lens' UpdateAssetModelResponse AssetModelStatus
Creating a Request
data UpdateAssetModel Source #
See: newUpdateAssetModel
smart constructor.
UpdateAssetModel' | |
|
Instances
:: Text | |
-> Text | |
-> UpdateAssetModel |
Create a value of UpdateAssetModel
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:clientToken:UpdateAssetModel'
, updateAssetModel_clientToken
- A unique case-sensitive identifier that you can provide to ensure the
idempotency of the request. Don't reuse this client token if a new
idempotent request is required.
$sel:assetModelDescription:UpdateAssetModel'
, updateAssetModel_assetModelDescription
- A description for the asset model.
$sel:assetModelProperties:UpdateAssetModel'
, updateAssetModel_assetModelProperties
- The updated property definitions of the asset model. For more
information, see
Asset properties
in the IoT SiteWise User Guide.
You can specify up to 200 properties per asset model. For more information, see Quotas in the IoT SiteWise User Guide.
$sel:assetModelCompositeModels:UpdateAssetModel'
, updateAssetModel_assetModelCompositeModels
- The composite asset models that are part of this asset model. Composite
asset models are asset models that contain specific properties. Each
composite model has a type that defines the properties that the
composite model supports. Use composite asset models to define alarms on
this asset model.
$sel:assetModelHierarchies:UpdateAssetModel'
, updateAssetModel_assetModelHierarchies
- The updated hierarchy definitions of the asset model. Each hierarchy
specifies an asset model whose assets can be children of any other
assets created from this asset model. For more information, see
Asset hierarchies
in the IoT SiteWise User Guide.
You can specify up to 10 hierarchies per asset model. For more information, see Quotas in the IoT SiteWise User Guide.
$sel:assetModelId:UpdateAssetModel'
, updateAssetModel_assetModelId
- The ID of the asset model to update.
$sel:assetModelName:UpdateAssetModel'
, updateAssetModel_assetModelName
- A unique, friendly name for the asset model.
Request Lenses
updateAssetModel_clientToken :: Lens' UpdateAssetModel (Maybe Text) Source #
A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.
updateAssetModel_assetModelDescription :: Lens' UpdateAssetModel (Maybe Text) Source #
A description for the asset model.
updateAssetModel_assetModelProperties :: Lens' UpdateAssetModel (Maybe [AssetModelProperty]) Source #
The updated property definitions of the asset model. For more information, see Asset properties in the IoT SiteWise User Guide.
You can specify up to 200 properties per asset model. For more information, see Quotas in the IoT SiteWise User Guide.
updateAssetModel_assetModelCompositeModels :: Lens' UpdateAssetModel (Maybe [AssetModelCompositeModel]) Source #
The composite asset models that are part of this asset model. Composite asset models are asset models that contain specific properties. Each composite model has a type that defines the properties that the composite model supports. Use composite asset models to define alarms on this asset model.
updateAssetModel_assetModelHierarchies :: Lens' UpdateAssetModel (Maybe [AssetModelHierarchy]) Source #
The updated hierarchy definitions of the asset model. Each hierarchy specifies an asset model whose assets can be children of any other assets created from this asset model. For more information, see Asset hierarchies in the IoT SiteWise User Guide.
You can specify up to 10 hierarchies per asset model. For more information, see Quotas in the IoT SiteWise User Guide.
updateAssetModel_assetModelId :: Lens' UpdateAssetModel Text Source #
The ID of the asset model to update.
updateAssetModel_assetModelName :: Lens' UpdateAssetModel Text Source #
A unique, friendly name for the asset model.
Destructuring the Response
data UpdateAssetModelResponse Source #
See: newUpdateAssetModelResponse
smart constructor.
UpdateAssetModelResponse' | |
|
Instances
newUpdateAssetModelResponse Source #
Create a value of UpdateAssetModelResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:httpStatus:UpdateAssetModelResponse'
, updateAssetModelResponse_httpStatus
- The response's http status code.
$sel:assetModelStatus:UpdateAssetModelResponse'
, updateAssetModelResponse_assetModelStatus
- The status of the asset model, which contains a state (UPDATING
after
successfully calling this operation) and any error message.
Response Lenses
updateAssetModelResponse_httpStatus :: Lens' UpdateAssetModelResponse Int Source #
The response's http status code.
updateAssetModelResponse_assetModelStatus :: Lens' UpdateAssetModelResponse AssetModelStatus Source #
The status of the asset model, which contains a state (UPDATING
after
successfully calling this operation) and any error message.