update_asset_model_composite_model
¶
update_asset_model_composite_model(
asset_model_id: CustomID,
asset_model_composite_model_id: CustomID,
asset_model_composite_model_name: Name,
*,
config_overrides: Optional[IoTSiteWiseClientConfig] = None,
asset_model_composite_model_external_id: Optional[ExternalId] = None,
asset_model_composite_model_description: Optional[Description] = None,
client_token: Optional[ClientToken] = None,
asset_model_composite_model_properties: Optional[AssetModelProperties] = None,
if_match: Optional[ETag] = None,
if_none_match: Optional[SelectAll] = None,
match_for_version_type: Optional[AssetModelVersionType] = None,
) -> UpdateAssetModelCompositeModelResponse
Updates a composite 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.
If you remove a property from a composite asset model, IoT SiteWise deletes all previous data for that property. You can’t change the type or data type of an existing property.
To replace an existing composite asset model property with a new one with the same name, do the following:
-
Submit an
UpdateAssetModelCompositeModelrequest with the entire existing property removed. -
Submit a second
UpdateAssetModelCompositeModelrequest that includes the new property. The new asset property will have the samenameas the previous one and IoT SiteWise will generate a new uniqueid.
Parameters:
-
asset_model_id(CustomID) –The ID of the asset model, in UUID format.
-
asset_model_composite_model_id(CustomID) –The ID of a composite model on this asset model.
-
asset_model_composite_model_external_id(Optional[ExternalId], default:None) –An external ID to assign to the asset model. You can only set the external ID of the asset model if it wasn't set when it was created, or you're setting it to the exact same thing as when it was created.
-
asset_model_composite_model_description(Optional[Description], default:None) –A description for the composite model.
-
asset_model_composite_model_name(Name) –A unique name for the composite model.
-
client_token(Optional[ClientToken], default:None) –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.
-
asset_model_composite_model_properties(Optional[AssetModelProperties], default:None) –The property definitions of the composite model. For more information, see Inline custom composite models in the IoT SiteWise User Guide.
You can specify up to 200 properties per composite model. For more information, see Quotas in the IoT SiteWise User Guide.
-
if_match(Optional[ETag], default:None) –The expected current entity tag (ETag) for the asset model’s latest or active version (specified using
matchForVersionType). The update request is rejected if the tag does not match the latest or active version's current entity tag. See Optimistic locking for asset model writes in the IoT SiteWise User Guide. -
if_none_match(Optional[SelectAll], default:None) –Accepts * to reject the update request if an active version (specified using
matchForVersionTypeasACTIVE) already exists for the asset model. -
match_for_version_type(Optional[AssetModelVersionType], default:None) –Specifies the asset model version type (
LATESTorACTIVE) used in conjunction withIf-MatchorIf-None-Matchheaders to determine the target ETag for the update operation.
Raises:
-
ConflictingOperationException–Your request has conflicting operations. This can occur if you're trying to perform more than one operation on the same resource at the same time.
-
InternalFailureException–IoT SiteWise can't process your request right now. Try again later.
-
InvalidRequestException–The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters. Check your request and try again.
-
LimitExceededException–You've reached the quota for a resource. For example, this can occur if you're trying to associate more than the allowed number of child assets or attempting to create more than the allowed number of properties for an asset model.
For more information, see Quotas in the IoT SiteWise User Guide.
-
PreconditionFailedException–The precondition in one or more of the request-header fields evaluated to
FALSE. -
ResourceAlreadyExistsException–The resource already exists.
-
ResourceNotFoundException–The requested resource can't be found.
-
ThrottlingException–Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise assets that can be created per second, the allowed number of messages per second, and so on.
For more information, see Quotas in the IoT SiteWise User Guide.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_iotsitewise/_services/io_t_site_wise.py
10811 10812 10813 10814 10815 10816 10817 10818 10819 10820 10821 10822 10823 10824 10825 10826 10827 10828 10829 10830 10831 10832 10833 10834 10835 10836 10837 10838 10839 10840 10841 10842 10843 10844 10845 10846 10847 10848 10849 10850 10851 10852 10853 10854 10855 10856 10857 10858 10859 10860 10861 10862 10863 10864 10865 10866 10867 10868 10869 10870 10871 10872 10873 10874 10875 10876 10877 10878 10879 10880 10881 10882 10883 10884 10885 10886 10887 10888 10889 10890 10891 10892 10893 10894 10895 10896 10897 10898 10899 10900 10901 10902 10903 10904 10905 10906 10907 10908 10909 10910 10911 10912 | |