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 from an existing asset model. For more information, see Creating assets in the IoT SiteWise User Guide.
Synopsis
- data CreateAsset = CreateAsset' {}
- newCreateAsset :: Text -> Text -> CreateAsset
- 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.
CreateAsset' | |
|
Instances
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: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 unique, friendly name for the asset.
$sel:assetModelId:CreateAsset'
, createAsset_assetModelId
- The ID of the asset model from which to create the asset.
Request Lenses
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 unique, 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.
CreateAssetResponse' | |
|
Instances
newCreateAssetResponse Source #
:: 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.
$sel:assetId: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.