From 3005cdf14deab4cd280d06332c60aa2542d89cc5 Mon Sep 17 00:00:00 2001 From: TimLovellSmith Date: Mon, 22 Feb 2021 21:48:39 -0800 Subject: [PATCH 1/5] Add Microsoft.Cache/redisEnterprise to autogenlist (intention is to support just api version 2021-03-01) and update rp-label-to-contact for Cache RP. And reference Microsoft.Cache/redis and redisEnterprise from 2019-04-01/deploymentTemplate.json --- generator/autogenlist.ts | 4 + rp-label-to-contact.md | 1 + schemas/2019-04-01/deploymentTemplate.json | 4 +- schemas/2021-03-01/Microsoft.Cache.json | 578 +++++++++++++++++++++ schemas/common/autogeneratedResources.json | 9 + 5 files changed, 595 insertions(+), 1 deletion(-) create mode 100644 schemas/2021-03-01/Microsoft.Cache.json diff --git a/generator/autogenlist.ts b/generator/autogenlist.ts index f2231dcac2..ebec940f07 100644 --- a/generator/autogenlist.ts +++ b/generator/autogenlist.ts @@ -243,6 +243,10 @@ const autogenlist: AutogenlistConfig[] = [ basePath: 'redis/resource-manager', namespace: 'Microsoft.Cache', }, + { + basePath: 'redisEnterprise/resource-manager', + namespace: 'Microsoft.Cache', + }, { basePath: 'hardwaresecuritymodules/resource-manager', namespace: 'Microsoft.HardwareSecurityModules', diff --git a/rp-label-to-contact.md b/rp-label-to-contact.md index 7fae91c39b..bae76ea695 100644 --- a/rp-label-to-contact.md +++ b/rp-label-to-contact.md @@ -16,6 +16,7 @@ This table specifies what GitHub handle our bot is currently configured to notif | RP:Batch | mksuni, bgklein, mscurrell | | RP:Blueprint | alex-frankel, filizt | | RP:BotService | sgellock | +| RP:Cache | TimLovellSmith, MECHANDR, greenms | | RP:ClusterConfiguration | nanthi, nizlati, safeerm | | RP:Communication | bviglietta, usvoyager | | RP:Compute | viabhav-agar, avirishuv, amjads1 | diff --git a/schemas/2019-04-01/deploymentTemplate.json b/schemas/2019-04-01/deploymentTemplate.json index 6ff52995da..13016ed5d4 100644 --- a/schemas/2019-04-01/deploymentTemplate.json +++ b/schemas/2019-04-01/deploymentTemplate.json @@ -1557,7 +1557,9 @@ { "$ref": "https://schema.management.azure.com/schemas/2014-04-01/Microsoft.Insights.json#/resourceDefinitions/alertrules" }, { "$ref": "https://schema.management.azure.com/schemas/2014-04-01/Microsoft.Insights.json#/resourceDefinitions/components" }, { "$ref": "https://schema.management.azure.com/schemas/2014-04-01/Microsoft.Insights.json#/resourceDefinitions/autoscalesettings" }, - { "$ref": "https://schema.management.azure.com/schemas/2014-04-01/Microsoft.Insights.json#/resourceDefinitions/webtests" } + { "$ref": "https://schema.management.azure.com/schemas/2014-04-01/Microsoft.Insights.json#/resourceDefinitions/webtests" }, + { "$ref": "https://schema.management.azure.com/schemas/2020-06-01/Microsoft.Cache.json#/resourceDefinitions/redis" }, + { "$ref": "https://schema.management.azure.com/schemas/2021-03-01/Microsoft.Cache.json#/resourceDefinitions/redisEnterprise" } ] } ] diff --git a/schemas/2021-03-01/Microsoft.Cache.json b/schemas/2021-03-01/Microsoft.Cache.json new file mode 100644 index 0000000000..4e38537839 --- /dev/null +++ b/schemas/2021-03-01/Microsoft.Cache.json @@ -0,0 +1,578 @@ +{ + "id": "https://schema.management.azure.com/schemas/2021-03-01/Microsoft.Cache.json#", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Microsoft.Cache", + "description": "Microsoft Cache Resource Types", + "resourceDefinitions": { + "redisEnterprise": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2021-03-01" + ] + }, + "location": { + "type": "string", + "description": "The geo-location where the resource lives" + }, + "name": { + "type": "string", + "description": "The name of the RedisEnterprise cluster." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/ClusterProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Properties of RedisEnterprise clusters, as opposed to general resource properties like location, tags" + }, + "resources": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/redisEnterprise_databases_childResource" + }, + { + "$ref": "#/definitions/redisEnterprise_privateEndpointConnections_childResource" + } + ] + } + }, + "sku": { + "oneOf": [ + { + "$ref": "#/definitions/Sku" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "SKU parameters supplied to the create RedisEnterprise operation." + }, + "tags": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Resource tags." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Cache/redisEnterprise" + ] + }, + "zones": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The Availability Zones where this cluster will be deployed." + } + }, + "required": [ + "apiVersion", + "location", + "name", + "properties", + "sku", + "type" + ], + "description": "Microsoft.Cache/redisEnterprise" + }, + "redisEnterprise_databases": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2021-03-01" + ] + }, + "name": { + "type": "string", + "description": "The name of the database." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/DatabaseProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Properties of RedisEnterprise databases, as opposed to general resource properties like location, tags" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Cache/redisEnterprise/databases" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.Cache/redisEnterprise/databases" + }, + "redisEnterprise_privateEndpointConnections": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2021-03-01" + ] + }, + "name": { + "type": "string", + "description": "The name of the private endpoint connection associated with the Azure resource" + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/PrivateEndpointConnectionProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Properties of the PrivateEndpointConnectProperties." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Cache/redisEnterprise/privateEndpointConnections" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.Cache/redisEnterprise/privateEndpointConnections" + } + }, + "definitions": { + "ClusterProperties": { + "type": "object", + "properties": { + "minimumTlsVersion": { + "oneOf": [ + { + "type": "string", + "enum": [ + "1.0", + "1.1", + "1.2" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The minimum TLS version for the cluster to support, e.g. '1.2'." + } + }, + "description": "Properties of RedisEnterprise clusters, as opposed to general resource properties like location, tags" + }, + "DatabaseProperties": { + "type": "object", + "properties": { + "clientProtocol": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Encrypted", + "Plaintext" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols. Default is TLS-encrypted." + }, + "clusteringPolicy": { + "oneOf": [ + { + "type": "string", + "enum": [ + "EnterpriseCluster", + "OSSCluster" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Clustering policy - default is OSSCluster. Specified at create time." + }, + "evictionPolicy": { + "oneOf": [ + { + "type": "string", + "enum": [ + "AllKeysLFU", + "AllKeysLRU", + "AllKeysRandom", + "VolatileLRU", + "VolatileLFU", + "VolatileTTL", + "VolatileRandom", + "NoEviction" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Redis eviction policy - default is VolatileLRU." + }, + "modules": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/Module" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Optional set of redis modules to enable in this database - modules can only be added at creation time." + }, + "persistence": { + "oneOf": [ + { + "$ref": "#/definitions/Persistence" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Persistence-related configuration for the RedisEnterprise database" + }, + "port": { + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "TCP port of the database endpoint. Specified at create time. Defaults to an available port." + } + }, + "description": "Properties of RedisEnterprise databases, as opposed to general resource properties like location, tags" + }, + "Module": { + "type": "object", + "properties": { + "args": { + "type": "string", + "description": "Configuration options for the module, e.g. 'ERROR_RATE 0.00 INITIAL_SIZE 400'." + }, + "name": { + "type": "string", + "description": "The name of the module, e.g. 'RedisBloom', 'RediSearch', 'RedisTimeSeries'" + } + }, + "required": [ + "name" + ], + "description": "Specifies configuration of a redis module" + }, + "Persistence": { + "type": "object", + "properties": { + "aofEnabled": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Sets whether AOF is enabled." + }, + "aofFrequency": { + "oneOf": [ + { + "type": "string", + "enum": [ + "1s", + "always" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Sets the frequency at which data is written to disk." + }, + "rdbEnabled": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Sets whether RDB is enabled." + }, + "rdbFrequency": { + "oneOf": [ + { + "type": "string", + "enum": [ + "1h", + "6h", + "12h" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Sets the frequency at which a snapshot of the database is created." + } + }, + "description": "Persistence-related configuration for the RedisEnterprise database" + }, + "PrivateEndpoint": { + "type": "object", + "properties": {}, + "description": "The Private Endpoint resource." + }, + "PrivateEndpointConnectionProperties": { + "type": "object", + "properties": { + "privateEndpoint": { + "oneOf": [ + { + "$ref": "#/definitions/PrivateEndpoint" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The Private Endpoint resource." + }, + "privateLinkServiceConnectionState": { + "oneOf": [ + { + "$ref": "#/definitions/PrivateLinkServiceConnectionState" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "A collection of information about the state of the connection between service consumer and provider." + }, + "provisioningState": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Succeeded", + "Creating", + "Deleting", + "Failed" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The provisioning state of the private endpoint connection resource." + } + }, + "required": [ + "privateLinkServiceConnectionState" + ], + "description": "Properties of the PrivateEndpointConnectProperties." + }, + "PrivateLinkServiceConnectionState": { + "type": "object", + "properties": { + "actionsRequired": { + "type": "string", + "description": "A message indicating if changes on the service provider require any updates on the consumer." + }, + "description": { + "type": "string", + "description": "The reason for approval/rejection of the connection." + }, + "status": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Pending", + "Approved", + "Rejected" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service." + } + }, + "description": "A collection of information about the state of the connection between service consumer and provider." + }, + "redisEnterprise_databases_childResource": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2021-03-01" + ] + }, + "name": { + "type": "string", + "description": "The name of the database." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/DatabaseProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Properties of RedisEnterprise databases, as opposed to general resource properties like location, tags" + }, + "type": { + "type": "string", + "enum": [ + "databases" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.Cache/redisEnterprise/databases" + }, + "redisEnterprise_privateEndpointConnections_childResource": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2021-03-01" + ] + }, + "name": { + "type": "string", + "description": "The name of the private endpoint connection associated with the Azure resource" + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/PrivateEndpointConnectionProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Properties of the PrivateEndpointConnectProperties." + }, + "type": { + "type": "string", + "enum": [ + "privateEndpointConnections" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.Cache/redisEnterprise/privateEndpointConnections" + }, + "Sku": { + "type": "object", + "properties": { + "capacity": { + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The size of the RedisEnterprise cluster. Defaults to 2 or 3 depending on SKU. Valid values are (2, 4, 6, ...) for Enterprise SKUs and (3, 9, 15, ...) for Flash SKUs." + }, + "name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Enterprise_E10", + "Enterprise_E20", + "Enterprise_E50", + "Enterprise_E100", + "EnterpriseFlash_F300", + "EnterpriseFlash_F700", + "EnterpriseFlash_F1500" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The type of RedisEnterprise cluster to deploy. Possible values: (Enterprise_E10, EnterpriseFlash_F300 etc.)." + } + }, + "required": [ + "name" + ], + "description": "SKU parameters supplied to the create RedisEnterprise operation." + } + } +} \ No newline at end of file diff --git a/schemas/common/autogeneratedResources.json b/schemas/common/autogeneratedResources.json index 703b1920f7..e3903838e3 100644 --- a/schemas/common/autogeneratedResources.json +++ b/schemas/common/autogeneratedResources.json @@ -1741,6 +1741,15 @@ { "$ref": "https://schema.management.azure.com/schemas/2020-06-01/Microsoft.Cache.json#/resourceDefinitions/redis_privateEndpointConnections" }, + { + "$ref": "https://schema.management.azure.com/schemas/2021-03-01/Microsoft.Cache.json#/resourceDefinitions/redisEnterprise" + }, + { + "$ref": "https://schema.management.azure.com/schemas/2021-03-01/Microsoft.Cache.json#/resourceDefinitions/redisEnterprise_databases" + }, + { + "$ref": "https://schema.management.azure.com/schemas/2021-03-01/Microsoft.Cache.json#/resourceDefinitions/redisEnterprise_privateEndpointConnections" + }, { "$ref": "https://schema.management.azure.com/schemas/2015-06-01/Microsoft.Cdn.json#/resourceDefinitions/profiles" }, From 68c21f24f26b991f698240ab6d4047a1250bafc0 Mon Sep 17 00:00:00 2001 From: TimLovellSmith Date: Tue, 23 Feb 2021 06:48:12 -0800 Subject: [PATCH 2/5] Revert the change to deploymentTemplate since autogenerated schemas are meant to be automatically included, not manually added. --- schemas/2019-04-01/deploymentTemplate.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/schemas/2019-04-01/deploymentTemplate.json b/schemas/2019-04-01/deploymentTemplate.json index 13016ed5d4..6ff52995da 100644 --- a/schemas/2019-04-01/deploymentTemplate.json +++ b/schemas/2019-04-01/deploymentTemplate.json @@ -1557,9 +1557,7 @@ { "$ref": "https://schema.management.azure.com/schemas/2014-04-01/Microsoft.Insights.json#/resourceDefinitions/alertrules" }, { "$ref": "https://schema.management.azure.com/schemas/2014-04-01/Microsoft.Insights.json#/resourceDefinitions/components" }, { "$ref": "https://schema.management.azure.com/schemas/2014-04-01/Microsoft.Insights.json#/resourceDefinitions/autoscalesettings" }, - { "$ref": "https://schema.management.azure.com/schemas/2014-04-01/Microsoft.Insights.json#/resourceDefinitions/webtests" }, - { "$ref": "https://schema.management.azure.com/schemas/2020-06-01/Microsoft.Cache.json#/resourceDefinitions/redis" }, - { "$ref": "https://schema.management.azure.com/schemas/2021-03-01/Microsoft.Cache.json#/resourceDefinitions/redisEnterprise" } + { "$ref": "https://schema.management.azure.com/schemas/2014-04-01/Microsoft.Insights.json#/resourceDefinitions/webtests" } ] } ] From 6964503579290b0cb0121e495f118ebd642d8175 Mon Sep 17 00:00:00 2001 From: TimLovellSmith Date: Tue, 23 Feb 2021 06:58:38 -0800 Subject: [PATCH 3/5] Use suffix Enterprise to avoid conflicts between Cache schema filenames. --- generator/autogenlist.ts | 1 + .../{Microsoft.Cache.json => Microsoft.Cache.Enterprise.json} | 0 2 files changed, 1 insertion(+) rename schemas/2021-03-01/{Microsoft.Cache.json => Microsoft.Cache.Enterprise.json} (100%) diff --git a/generator/autogenlist.ts b/generator/autogenlist.ts index ebec940f07..afb3b1cceb 100644 --- a/generator/autogenlist.ts +++ b/generator/autogenlist.ts @@ -246,6 +246,7 @@ const autogenlist: AutogenlistConfig[] = [ { basePath: 'redisEnterprise/resource-manager', namespace: 'Microsoft.Cache', + suffix: 'Enterprise' }, { basePath: 'hardwaresecuritymodules/resource-manager', diff --git a/schemas/2021-03-01/Microsoft.Cache.json b/schemas/2021-03-01/Microsoft.Cache.Enterprise.json similarity index 100% rename from schemas/2021-03-01/Microsoft.Cache.json rename to schemas/2021-03-01/Microsoft.Cache.Enterprise.json From 5767471e4af0da70bc6642610f91c07a0f6ea174 Mon Sep 17 00:00:00 2001 From: Anthony Martin Date: Wed, 24 Feb 2021 09:45:58 -0500 Subject: [PATCH 4/5] Update Microsoft.Cache.Enterprise.json --- schemas/2021-03-01/Microsoft.Cache.Enterprise.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/schemas/2021-03-01/Microsoft.Cache.Enterprise.json b/schemas/2021-03-01/Microsoft.Cache.Enterprise.json index 4e38537839..ff8eba403d 100644 --- a/schemas/2021-03-01/Microsoft.Cache.Enterprise.json +++ b/schemas/2021-03-01/Microsoft.Cache.Enterprise.json @@ -1,5 +1,5 @@ { - "id": "https://schema.management.azure.com/schemas/2021-03-01/Microsoft.Cache.json#", + "id": "https://schema.management.azure.com/schemas/2021-03-01/Microsoft.Cache.Enterprise.json#", "$schema": "http://json-schema.org/draft-04/schema#", "title": "Microsoft.Cache", "description": "Microsoft Cache Resource Types", @@ -575,4 +575,4 @@ "description": "SKU parameters supplied to the create RedisEnterprise operation." } } -} \ No newline at end of file +} From bc8245ca25c013f3245e6f4008a0b50fb3c23874 Mon Sep 17 00:00:00 2001 From: Anthony Martin Date: Thu, 25 Feb 2021 16:45:31 -0500 Subject: [PATCH 5/5] Update autogeneratedResources.json --- schemas/common/autogeneratedResources.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/schemas/common/autogeneratedResources.json b/schemas/common/autogeneratedResources.json index e3903838e3..513b846f80 100644 --- a/schemas/common/autogeneratedResources.json +++ b/schemas/common/autogeneratedResources.json @@ -1742,13 +1742,13 @@ "$ref": "https://schema.management.azure.com/schemas/2020-06-01/Microsoft.Cache.json#/resourceDefinitions/redis_privateEndpointConnections" }, { - "$ref": "https://schema.management.azure.com/schemas/2021-03-01/Microsoft.Cache.json#/resourceDefinitions/redisEnterprise" + "$ref": "https://schema.management.azure.com/schemas/2021-03-01/Microsoft.Cache.Enterprise.json#/resourceDefinitions/redisEnterprise" }, { - "$ref": "https://schema.management.azure.com/schemas/2021-03-01/Microsoft.Cache.json#/resourceDefinitions/redisEnterprise_databases" + "$ref": "https://schema.management.azure.com/schemas/2021-03-01/Microsoft.Cache.Enterprise.json#/resourceDefinitions/redisEnterprise_databases" }, { - "$ref": "https://schema.management.azure.com/schemas/2021-03-01/Microsoft.Cache.json#/resourceDefinitions/redisEnterprise_privateEndpointConnections" + "$ref": "https://schema.management.azure.com/schemas/2021-03-01/Microsoft.Cache.Enterprise.json#/resourceDefinitions/redisEnterprise_privateEndpointConnections" }, { "$ref": "https://schema.management.azure.com/schemas/2015-06-01/Microsoft.Cdn.json#/resourceDefinitions/profiles" @@ -6865,4 +6865,4 @@ ] } ] -} \ No newline at end of file +}