MICROSOFT.DEVICEREGISTRY

AssetEndpointProfiles_CreateOrReplace

enum_UserAuthenticationMode := [ "Anonymous", "Certificate", "UsernamePassword" ]

valid {
    input.Body.properties.targetAddress == STRING
    input.Body.properties.userAuthentication.mode == enum_UserAuthenticationMode[_]
    input.Body.properties.userAuthentication.usernamePasswordCredentials.usernameReference == STRING
    input.Body.properties.userAuthentication.usernamePasswordCredentials.passwordReference == STRING
    input.Body.properties.userAuthentication.x509Credentials.certificateReference == STRING
    input.Body.properties.transportAuthentication.ownCertificates[_].certThumbprint == STRING
    input.Body.properties.transportAuthentication.ownCertificates[_].certSecretReference == STRING
    input.Body.properties.transportAuthentication.ownCertificates[_].certPasswordReference == STRING
    input.Body.properties.additionalConfiguration == STRING
    input.Body.extendedLocation.type == STRING
    input.Body.extendedLocation.name == STRING
    input.Body.tags.STRING == STRING
    input.Body.location == STRING
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.assetEndpointProfileName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

AssetEndpointProfiles_Delete

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.assetEndpointProfileName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

AssetEndpointProfiles_Get

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.assetEndpointProfileName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

AssetEndpointProfiles_ListByResourceGroup

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

AssetEndpointProfiles_ListBySubscription

valid {
    input.ReqMap.SubscriptionID == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
}

AssetEndpointProfiles_Update

enum_UserAuthenticationUpdateMode := [ "Anonymous", "Certificate", "UsernamePassword" ]

valid {
    input.Body.tags.STRING == STRING
    input.Body.properties.targetAddress == STRING
    input.Body.properties.userAuthentication.mode == enum_UserAuthenticationUpdateMode[_]
    input.Body.properties.userAuthentication.usernamePasswordCredentials.usernameReference == STRING
    input.Body.properties.userAuthentication.usernamePasswordCredentials.passwordReference == STRING
    input.Body.properties.userAuthentication.x509Credentials.certificateReference == STRING
    input.Body.properties.transportAuthentication.ownCertificates[_].certThumbprint == STRING
    input.Body.properties.transportAuthentication.ownCertificates[_].certSecretReference == STRING
    input.Body.properties.transportAuthentication.ownCertificates[_].certPasswordReference == STRING
    input.Body.properties.additionalConfiguration == STRING
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.assetEndpointProfileName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

Assets_CreateOrReplace

enum_DataPointObservabilityMode := [ "none", "counter", "gauge", "histogram", "log" ]
enum_EventObservabilityMode := [ "none", "log" ]

valid {
    input.Body.properties.assetType == STRING
    input.Body.properties.enabled == BOOLEAN
    input.Body.properties.externalAssetId == STRING
    input.Body.properties.displayName == STRING
    input.Body.properties.description == STRING
    input.Body.properties.assetEndpointProfileUri == STRING
    input.Body.properties.manufacturer == STRING
    input.Body.properties.manufacturerUri == STRING
    input.Body.properties.model == STRING
    input.Body.properties.productCode == STRING
    input.Body.properties.hardwareRevision == STRING
    input.Body.properties.softwareRevision == STRING
    input.Body.properties.documentationUri == STRING
    input.Body.properties.serialNumber == STRING
    input.Body.properties.attributes.STRING == STRING
    input.Body.properties.defaultDataPointsConfiguration == STRING
    input.Body.properties.defaultEventsConfiguration == STRING
    input.Body.properties.dataPoints[_].name == STRING
    input.Body.properties.dataPoints[_].dataSource == STRING
    input.Body.properties.dataPoints[_].capabilityId == STRING
    input.Body.properties.dataPoints[_].observabilityMode == enum_DataPointObservabilityMode[_]
    input.Body.properties.dataPoints[_].dataPointConfiguration == STRING
    input.Body.properties.events[_].name == STRING
    input.Body.properties.events[_].eventNotifier == STRING
    input.Body.properties.events[_].capabilityId == STRING
    input.Body.properties.events[_].observabilityMode == enum_EventObservabilityMode[_]
    input.Body.properties.events[_].eventConfiguration == STRING
    input.Body.extendedLocation.type == STRING
    input.Body.extendedLocation.name == STRING
    input.Body.tags.STRING == STRING
    input.Body.location == STRING
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.assetName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

Assets_Delete

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.assetName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

Assets_Get

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.assetName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

Assets_ListByResourceGroup

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

Assets_ListBySubscription

valid {
    input.ReqMap.SubscriptionID == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
}

Assets_Update

enum_DataPointObservabilityMode := [ "none", "counter", "gauge", "histogram", "log" ]
enum_EventObservabilityMode := [ "none", "log" ]

valid {
    input.Body.tags.STRING == STRING
    input.Body.properties.assetType == STRING
    input.Body.properties.enabled == BOOLEAN
    input.Body.properties.displayName == STRING
    input.Body.properties.description == STRING
    input.Body.properties.manufacturer == STRING
    input.Body.properties.manufacturerUri == STRING
    input.Body.properties.model == STRING
    input.Body.properties.productCode == STRING
    input.Body.properties.hardwareRevision == STRING
    input.Body.properties.softwareRevision == STRING
    input.Body.properties.documentationUri == STRING
    input.Body.properties.serialNumber == STRING
    input.Body.properties.attributes.STRING == STRING
    input.Body.properties.defaultDataPointsConfiguration == STRING
    input.Body.properties.defaultEventsConfiguration == STRING
    input.Body.properties.dataPoints[_].name == STRING
    input.Body.properties.dataPoints[_].dataSource == STRING
    input.Body.properties.dataPoints[_].capabilityId == STRING
    input.Body.properties.dataPoints[_].observabilityMode == enum_DataPointObservabilityMode[_]
    input.Body.properties.dataPoints[_].dataPointConfiguration == STRING
    input.Body.properties.events[_].name == STRING
    input.Body.properties.events[_].eventNotifier == STRING
    input.Body.properties.events[_].capabilityId == STRING
    input.Body.properties.events[_].observabilityMode == enum_EventObservabilityMode[_]
    input.Body.properties.events[_].eventConfiguration == STRING
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.assetName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

OperationStatus_Get

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.location == STRING
    input.ReqMap.operationId == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
}

Operations_List

valid {
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
}