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 |
Creates an asset model from specified property and hierarchy definitions. You create assets from asset models. With asset models, you can easily create assets of the same type that have standardized definitions. Each asset created from a model inherits the asset model's property and hierarchy definitions. For more information, see Defining asset models in the IoT SiteWise User Guide.
Synopsis
- data CreateAssetModel = CreateAssetModel' {
- clientToken :: Maybe Text
- assetModelDescription :: Maybe Text
- assetModelProperties :: Maybe [AssetModelPropertyDefinition]
- assetModelCompositeModels :: Maybe [AssetModelCompositeModelDefinition]
- assetModelHierarchies :: Maybe [AssetModelHierarchyDefinition]
- tags :: Maybe (HashMap Text Text)
- assetModelName :: Text
- newCreateAssetModel :: Text -> CreateAssetModel
- createAssetModel_clientToken :: Lens' CreateAssetModel (Maybe Text)
- createAssetModel_assetModelDescription :: Lens' CreateAssetModel (Maybe Text)
- createAssetModel_assetModelProperties :: Lens' CreateAssetModel (Maybe [AssetModelPropertyDefinition])
- createAssetModel_assetModelCompositeModels :: Lens' CreateAssetModel (Maybe [AssetModelCompositeModelDefinition])
- createAssetModel_assetModelHierarchies :: Lens' CreateAssetModel (Maybe [AssetModelHierarchyDefinition])
- createAssetModel_tags :: Lens' CreateAssetModel (Maybe (HashMap Text Text))
- createAssetModel_assetModelName :: Lens' CreateAssetModel Text
- data CreateAssetModelResponse = CreateAssetModelResponse' {}
- newCreateAssetModelResponse :: Int -> Text -> Text -> AssetModelStatus -> CreateAssetModelResponse
- createAssetModelResponse_httpStatus :: Lens' CreateAssetModelResponse Int
- createAssetModelResponse_assetModelId :: Lens' CreateAssetModelResponse Text
- createAssetModelResponse_assetModelArn :: Lens' CreateAssetModelResponse Text
- createAssetModelResponse_assetModelStatus :: Lens' CreateAssetModelResponse AssetModelStatus
Creating a Request
data CreateAssetModel Source #
See: newCreateAssetModel
smart constructor.
CreateAssetModel' | |
|
Instances
Create a value of CreateAssetModel
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:CreateAssetModel'
, createAssetModel_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:CreateAssetModel'
, createAssetModel_assetModelDescription
- A description for the asset model.
$sel:assetModelProperties:CreateAssetModel'
, createAssetModel_assetModelProperties
- The 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:CreateAssetModel'
, createAssetModel_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:CreateAssetModel'
, createAssetModel_assetModelHierarchies
- The 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:tags:CreateAssetModel'
, createAssetModel_tags
- A list of key-value pairs that contain metadata for the asset model. For
more information, see
Tagging your IoT SiteWise resources
in the IoT SiteWise User Guide.
$sel:assetModelName:CreateAssetModel'
, createAssetModel_assetModelName
- A unique, friendly name for the asset model.
Request Lenses
createAssetModel_clientToken :: Lens' CreateAssetModel (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.
createAssetModel_assetModelDescription :: Lens' CreateAssetModel (Maybe Text) Source #
A description for the asset model.
createAssetModel_assetModelProperties :: Lens' CreateAssetModel (Maybe [AssetModelPropertyDefinition]) Source #
The 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.
createAssetModel_assetModelCompositeModels :: Lens' CreateAssetModel (Maybe [AssetModelCompositeModelDefinition]) 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.
createAssetModel_assetModelHierarchies :: Lens' CreateAssetModel (Maybe [AssetModelHierarchyDefinition]) Source #
The 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.
createAssetModel_tags :: Lens' CreateAssetModel (Maybe (HashMap Text Text)) Source #
A list of key-value pairs that contain metadata for the asset model. For more information, see Tagging your IoT SiteWise resources in the IoT SiteWise User Guide.
createAssetModel_assetModelName :: Lens' CreateAssetModel Text Source #
A unique, friendly name for the asset model.
Destructuring the Response
data CreateAssetModelResponse Source #
See: newCreateAssetModelResponse
smart constructor.
CreateAssetModelResponse' | |
|
Instances
newCreateAssetModelResponse Source #
:: Int | |
-> Text | |
-> Text | |
-> AssetModelStatus | |
-> CreateAssetModelResponse |
Create a value of CreateAssetModelResponse
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:CreateAssetModelResponse'
, createAssetModelResponse_httpStatus
- The response's http status code.
$sel:assetModelId:CreateAssetModelResponse'
, createAssetModelResponse_assetModelId
- The ID of the asset model. You can use this ID when you call other IoT
SiteWise APIs.
$sel:assetModelArn:CreateAssetModelResponse'
, createAssetModelResponse_assetModelArn
- The
ARN
of the asset model, which has the following format.
arn:${Partition}:iotsitewise:${Region}:${Account}:asset-model/${AssetModelId}
$sel:assetModelStatus:CreateAssetModelResponse'
, createAssetModelResponse_assetModelStatus
- The status of the asset model, which contains a state (CREATING
after
successfully calling this operation) and any error message.
Response Lenses
createAssetModelResponse_httpStatus :: Lens' CreateAssetModelResponse Int Source #
The response's http status code.
createAssetModelResponse_assetModelId :: Lens' CreateAssetModelResponse Text Source #
The ID of the asset model. You can use this ID when you call other IoT SiteWise APIs.
createAssetModelResponse_assetModelArn :: Lens' CreateAssetModelResponse Text Source #
The ARN of the asset model, which has the following format.
arn:${Partition}:iotsitewise:${Region}:${Account}:asset-model/${AssetModelId}
createAssetModelResponse_assetModelStatus :: Lens' CreateAssetModelResponse AssetModelStatus Source #
The status of the asset model, which contains a state (CREATING
after
successfully calling this operation) and any error message.