update_asset_model_composite_model
async
¶
update_asset_model_composite_model(
asset_model_id: CustomID,
asset_model_composite_model_id: CustomID,
asset_model_composite_model_name: Name,
*,
config_overrides: Optional[AsyncIoTSiteWiseClientConfig] = 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/async_io_t_site_wise.py
10953 10954 10955 10956 10957 10958 10959 10960 10961 10962 10963 10964 10965 10966 10967 10968 10969 10970 10971 10972 10973 10974 10975 10976 10977 10978 10979 10980 10981 10982 10983 10984 10985 10986 10987 10988 10989 10990 10991 10992 10993 10994 10995 10996 10997 10998 10999 11000 11001 11002 11003 11004 11005 11006 11007 11008 11009 11010 11011 11012 11013 11014 11015 11016 11017 11018 11019 11020 11021 11022 11023 11024 11025 11026 11027 11028 11029 11030 11031 11032 11033 11034 11035 11036 11037 11038 11039 11040 11041 11042 11043 11044 11045 11046 11047 11048 11049 11050 11051 11052 11053 11054 11055 | |