delete_asset_model
¶
delete_asset_model(
asset_model_id: CustomID,
*,
config_overrides: Optional[IoTSiteWiseClientConfig] = None,
client_token: Optional[ClientToken] = None,
if_match: Optional[ETag] = None,
if_none_match: Optional[SelectAll] = None,
match_for_version_type: Optional[AssetModelVersionType] = None,
) -> DeleteAssetModelResponse
Deletes an asset model. This action can't be undone. You must delete all assets created from an asset model before you can delete the model. Also, you can't delete an asset model if a parent asset model exists that contains a property formula expression that depends on the asset model that you want to delete. For more information, see Deleting assets and models in the IoT SiteWise User Guide.
Parameters:
-
asset_model_id(CustomID) –The ID of the asset model to delete. This can be either the actual ID in UUID format, or else
externalId:followed by the external ID, if it has one. For more information, see Referencing objects with external IDs in the IoT SiteWise User Guide. -
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.
-
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 delete 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 delete 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 delete 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.
-
PreconditionFailedException–The precondition in one or more of the request-header fields evaluated to
FALSE. -
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
3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 | |