| Copyright | (c) 2013-2023 Brendan Hay |
|---|---|
| License | Mozilla Public License, v. 2.0. |
| Maintainer | Brendan Hay |
| Stability | auto-generated |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Amazonka.IoTSiteWise.CreateAsset
Description
Creates an asset from an existing asset model. For more information, see Creating assets in the IoT SiteWise User Guide.
Synopsis
- data CreateAsset = CreateAsset' {
- assetDescription :: Maybe Text
- clientToken :: Maybe Text
- tags :: Maybe (HashMap Text Text)
- assetName :: Text
- assetModelId :: Text
- newCreateAsset :: Text -> Text -> CreateAsset
- createAsset_assetDescription :: Lens' CreateAsset (Maybe Text)
- createAsset_clientToken :: Lens' CreateAsset (Maybe Text)
- createAsset_tags :: Lens' CreateAsset (Maybe (HashMap Text Text))
- createAsset_assetName :: Lens' CreateAsset Text
- createAsset_assetModelId :: Lens' CreateAsset Text
- data CreateAssetResponse = CreateAssetResponse' {
- httpStatus :: Int
- assetId :: Text
- assetArn :: Text
- assetStatus :: AssetStatus
- newCreateAssetResponse :: Int -> Text -> Text -> AssetStatus -> CreateAssetResponse
- createAssetResponse_httpStatus :: Lens' CreateAssetResponse Int
- createAssetResponse_assetId :: Lens' CreateAssetResponse Text
- createAssetResponse_assetArn :: Lens' CreateAssetResponse Text
- createAssetResponse_assetStatus :: Lens' CreateAssetResponse AssetStatus
Creating a Request
data CreateAsset Source #
See: newCreateAsset smart constructor.
Constructors
| CreateAsset' | |
Fields
| |
Instances
Arguments
| :: Text | |
| -> Text | |
| -> CreateAsset |
Create a value of CreateAsset 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:assetDescription:CreateAsset', createAsset_assetDescription - A description for the asset.
$sel:clientToken:CreateAsset', createAsset_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:tags:CreateAsset', createAsset_tags - A list of key-value pairs that contain metadata for the asset. For more
information, see
Tagging your IoT SiteWise resources
in the IoT SiteWise User Guide.
$sel:assetName:CreateAsset', createAsset_assetName - A friendly name for the asset.
CreateAsset, createAsset_assetModelId - The ID of the asset model from which to create the asset.
Request Lenses
createAsset_assetDescription :: Lens' CreateAsset (Maybe Text) Source #
A description for the asset.
createAsset_clientToken :: Lens' CreateAsset (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.
createAsset_tags :: Lens' CreateAsset (Maybe (HashMap Text Text)) Source #
A list of key-value pairs that contain metadata for the asset. For more information, see Tagging your IoT SiteWise resources in the IoT SiteWise User Guide.
createAsset_assetName :: Lens' CreateAsset Text Source #
A friendly name for the asset.
createAsset_assetModelId :: Lens' CreateAsset Text Source #
The ID of the asset model from which to create the asset.
Destructuring the Response
data CreateAssetResponse Source #
See: newCreateAssetResponse smart constructor.
Constructors
| CreateAssetResponse' | |
Fields
| |
Instances
newCreateAssetResponse Source #
Arguments
| :: Int | |
| -> Text | |
| -> Text | |
| -> AssetStatus | |
| -> CreateAssetResponse |
Create a value of CreateAssetResponse 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:CreateAssetResponse', createAssetResponse_httpStatus - The response's http status code.
CreateAssetResponse, createAssetResponse_assetId - The ID of the asset. This ID uniquely identifies the asset within IoT
SiteWise and can be used with other IoT SiteWise APIs.
$sel:assetArn:CreateAssetResponse', createAssetResponse_assetArn - The
ARN
of the asset, which has the following format.
arn:${Partition}:iotsitewise:${Region}:${Account}:asset/${AssetId}$sel:assetStatus:CreateAssetResponse', createAssetResponse_assetStatus - The status of the asset, which contains a state (CREATING after
successfully calling this operation) and any error message.
Response Lenses
createAssetResponse_httpStatus :: Lens' CreateAssetResponse Int Source #
The response's http status code.
createAssetResponse_assetId :: Lens' CreateAssetResponse Text Source #
The ID of the asset. This ID uniquely identifies the asset within IoT SiteWise and can be used with other IoT SiteWise APIs.
createAssetResponse_assetArn :: Lens' CreateAssetResponse Text Source #
The ARN of the asset, which has the following format.
arn:${Partition}:iotsitewise:${Region}:${Account}:asset/${AssetId}createAssetResponse_assetStatus :: Lens' CreateAssetResponse AssetStatus Source #
The status of the asset, which contains a state (CREATING after
successfully calling this operation) and any error message.