MICROSOFT.ELASTICSAN

ElasticSans_Create

enum_ElasticSanPropertiesPublicNetworkAccess := [ "Enabled", "Disabled" ]
enum_SkuName := [ "Premium_LRS", "Premium_ZRS" ]
enum_SkuTier := [ "Premium" ]

valid {
    input.Body.properties.sku.name == enum_SkuName[_]
    input.Body.properties.sku.tier == enum_SkuTier[_]
    input.Body.properties.availabilityZones[_] == STRING
    input.Body.properties.baseSizeTiB == INTEGER
    input.Body.properties.extendedCapacitySizeTiB == INTEGER
    input.Body.properties.publicNetworkAccess == enum_ElasticSanPropertiesPublicNetworkAccess[_]
    input.Body.tags.STRING == STRING
    input.Body.location == STRING
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.elasticSanName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

ElasticSans_Delete

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

ElasticSans_Get

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

ElasticSans_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
}

ElasticSans_ListBySubscription

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

ElasticSans_Update

enum_ElasticSanUpdatePropertiesPublicNetworkAccess := [ "Enabled", "Disabled" ]

valid {
    input.Body.properties.baseSizeTiB == INTEGER
    input.Body.properties.extendedCapacitySizeTiB == INTEGER
    input.Body.properties.publicNetworkAccess == enum_ElasticSanUpdatePropertiesPublicNetworkAccess[_]
    input.Body.tags.STRING == STRING
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.elasticSanName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

Operations_List

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

PrivateEndpointConnections_Create

enum_PrivateEndpointServiceConnectionStatus := [ "Pending", "Approved", "Failed", "Rejected" ]

valid {
    input.Body.properties.privateEndpoint == {}
    input.Body.properties.privateLinkServiceConnectionState.status == enum_PrivateEndpointServiceConnectionStatus[_]
    input.Body.properties.privateLinkServiceConnectionState.description == STRING
    input.Body.properties.privateLinkServiceConnectionState.actionsRequired == STRING
    input.Body.properties.groupIds[_] == STRING
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.elasticSanName == STRING
    input.ReqMap.privateEndpointConnectionName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

PrivateEndpointConnections_Delete

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

PrivateEndpointConnections_Get

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

PrivateEndpointConnections_List

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

PrivateLinkResources_ListByElasticSan

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

Skus_List

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

VolumeGroups_Create

enum_EncryptionType := [ "EncryptionAtRestWithPlatformKey", "EncryptionAtRestWithCustomerManagedKey" ]
enum_IdentityType := [ "None", "SystemAssigned", "UserAssigned" ]
enum_StorageTargetType := [ "Iscsi", "None" ]
enum_VirtualNetworkRuleAction := [ "Allow" ]

valid {
    input.Body.identity.type == enum_IdentityType[_]
    input.Body.identity.userAssignedIdentities.STRING == {}
    input.Body.properties.protocolType == enum_StorageTargetType[_]
    input.Body.properties.encryption == enum_EncryptionType[_]
    input.Body.properties.encryptionProperties.keyVaultProperties.keyName == STRING
    input.Body.properties.encryptionProperties.keyVaultProperties.keyVersion == STRING
    input.Body.properties.encryptionProperties.keyVaultProperties.keyVaultUri == STRING
    input.Body.properties.encryptionProperties.identity.userAssignedIdentity == STRING
    input.Body.properties.networkAcls.virtualNetworkRules[_].id == STRING
    input.Body.properties.networkAcls.virtualNetworkRules[_].action == enum_VirtualNetworkRuleAction[_]
    input.Body.STRING == STRING
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.elasticSanName == STRING
    input.ReqMap.volumeGroupName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

VolumeGroups_Delete

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

VolumeGroups_Get

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

VolumeGroups_ListByElasticSan

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

VolumeGroups_Update

enum_EncryptionType := [ "EncryptionAtRestWithPlatformKey", "EncryptionAtRestWithCustomerManagedKey" ]
enum_IdentityType := [ "None", "SystemAssigned", "UserAssigned" ]
enum_StorageTargetType := [ "Iscsi", "None" ]
enum_VirtualNetworkRuleAction := [ "Allow" ]

valid {
    input.Body.identity.type == enum_IdentityType[_]
    input.Body.identity.userAssignedIdentities.STRING == {}
    input.Body.properties.protocolType == enum_StorageTargetType[_]
    input.Body.properties.encryption == enum_EncryptionType[_]
    input.Body.properties.encryptionProperties.keyVaultProperties.keyName == STRING
    input.Body.properties.encryptionProperties.keyVaultProperties.keyVersion == STRING
    input.Body.properties.encryptionProperties.keyVaultProperties.keyVaultUri == STRING
    input.Body.properties.encryptionProperties.identity.userAssignedIdentity == STRING
    input.Body.properties.networkAcls.virtualNetworkRules[_].id == STRING
    input.Body.properties.networkAcls.virtualNetworkRules[_].action == enum_VirtualNetworkRuleAction[_]
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.elasticSanName == STRING
    input.ReqMap.volumeGroupName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

VolumeSnapshots_Create

valid {
    input.Body.properties.creationData.sourceId == STRING
    input.Body.STRING == STRING
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.elasticSanName == STRING
    input.ReqMap.volumeGroupName == STRING
    input.ReqMap.snapshotName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

VolumeSnapshots_Delete

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

VolumeSnapshots_Get

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

VolumeSnapshots_ListByVolumeGroup

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

Volumes_Create

enum_SourceCreationDataCreateSource := [ "None", "VolumeSnapshot", "DiskSnapshot", "Disk", "DiskRestorePoint" ]

valid {
    input.Body.properties.creationData.createSource == enum_SourceCreationDataCreateSource[_]
    input.Body.properties.creationData.sourceId == STRING
    input.Body.properties.sizeGiB == INTEGER
    input.Body.properties.managedBy.resourceId == STRING
    input.Body.STRING == STRING
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.elasticSanName == STRING
    input.ReqMap.volumeGroupName == STRING
    input.ReqMap.volumeName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

Volumes_Delete

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

Volumes_Get

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

Volumes_ListByVolumeGroup

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

Volumes_Update

valid {
    input.Body.properties.sizeGiB == INTEGER
    input.Body.properties.managedBy.resourceId == STRING
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.elasticSanName == STRING
    input.ReqMap.volumeGroupName == STRING
    input.ReqMap.volumeName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}