libZSservicesZSamazonka-iotsitewiseZSamazonka-iotsitewise
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.IoTSiteWise.UpdateAssetModel

Description

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

Creating a Request

data UpdateAssetModel Source #

See: newUpdateAssetModel smart constructor.

Constructors

UpdateAssetModel' 

Fields

  • clientToken :: Maybe Text

    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.

  • assetModelDescription :: Maybe Text

    A description for the asset model.

  • assetModelProperties :: Maybe [AssetModelProperty]

    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.

  • assetModelCompositeModels :: Maybe [AssetModelCompositeModel]

    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.

  • assetModelHierarchies :: Maybe [AssetModelHierarchy]

    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.

  • assetModelId :: Text

    The ID of the asset model to update.

  • assetModelName :: Text

    A unique, friendly name for the asset model.

Instances

Instances details
Eq UpdateAssetModel Source # 
Instance details

Defined in Amazonka.IoTSiteWise.UpdateAssetModel

Read UpdateAssetModel Source # 
Instance details

Defined in Amazonka.IoTSiteWise.UpdateAssetModel

Show UpdateAssetModel Source # 
Instance details

Defined in Amazonka.IoTSiteWise.UpdateAssetModel

Generic UpdateAssetModel Source # 
Instance details

Defined in Amazonka.IoTSiteWise.UpdateAssetModel

Associated Types

type Rep UpdateAssetModel :: Type -> Type #

NFData UpdateAssetModel Source # 
Instance details

Defined in Amazonka.IoTSiteWise.UpdateAssetModel

Methods

rnf :: UpdateAssetModel -> () #

Hashable UpdateAssetModel Source # 
Instance details

Defined in Amazonka.IoTSiteWise.UpdateAssetModel

ToJSON UpdateAssetModel Source # 
Instance details

Defined in Amazonka.IoTSiteWise.UpdateAssetModel

AWSRequest UpdateAssetModel Source # 
Instance details

Defined in Amazonka.IoTSiteWise.UpdateAssetModel

Associated Types

type AWSResponse UpdateAssetModel #

ToHeaders UpdateAssetModel Source # 
Instance details

Defined in Amazonka.IoTSiteWise.UpdateAssetModel

ToPath UpdateAssetModel Source # 
Instance details

Defined in Amazonka.IoTSiteWise.UpdateAssetModel

ToQuery UpdateAssetModel Source # 
Instance details

Defined in Amazonka.IoTSiteWise.UpdateAssetModel

type Rep UpdateAssetModel Source # 
Instance details

Defined in Amazonka.IoTSiteWise.UpdateAssetModel

type Rep UpdateAssetModel = D1 ('MetaData "UpdateAssetModel" "Amazonka.IoTSiteWise.UpdateAssetModel" "libZSservicesZSamazonka-iotsitewiseZSamazonka-iotsitewise" 'False) (C1 ('MetaCons "UpdateAssetModel'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "clientToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "assetModelDescription") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "assetModelProperties") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [AssetModelProperty])))) :*: ((S1 ('MetaSel ('Just "assetModelCompositeModels") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [AssetModelCompositeModel])) :*: S1 ('MetaSel ('Just "assetModelHierarchies") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [AssetModelHierarchy]))) :*: (S1 ('MetaSel ('Just "assetModelId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "assetModelName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))
type AWSResponse UpdateAssetModel Source # 
Instance details

Defined in Amazonka.IoTSiteWise.UpdateAssetModel

newUpdateAssetModel Source #

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_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.

Constructors

UpdateAssetModelResponse' 

Fields

Instances

Instances details
Eq UpdateAssetModelResponse Source # 
Instance details

Defined in Amazonka.IoTSiteWise.UpdateAssetModel

Read UpdateAssetModelResponse Source # 
Instance details

Defined in Amazonka.IoTSiteWise.UpdateAssetModel

Show UpdateAssetModelResponse Source # 
Instance details

Defined in Amazonka.IoTSiteWise.UpdateAssetModel

Generic UpdateAssetModelResponse Source # 
Instance details

Defined in Amazonka.IoTSiteWise.UpdateAssetModel

Associated Types

type Rep UpdateAssetModelResponse :: Type -> Type #

NFData UpdateAssetModelResponse Source # 
Instance details

Defined in Amazonka.IoTSiteWise.UpdateAssetModel

type Rep UpdateAssetModelResponse Source # 
Instance details

Defined in Amazonka.IoTSiteWise.UpdateAssetModel

type Rep UpdateAssetModelResponse = D1 ('MetaData "UpdateAssetModelResponse" "Amazonka.IoTSiteWise.UpdateAssetModel" "libZSservicesZSamazonka-iotsitewiseZSamazonka-iotsitewise" 'False) (C1 ('MetaCons "UpdateAssetModelResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "assetModelStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 AssetModelStatus)))

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_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.