diff --git a/arm-redis/2016-04-01/examples/RedisCacheFirewallRuleCreate.json b/arm-redis/2016-04-01/examples/RedisCacheFirewallRuleCreate.json new file mode 100644 index 000000000000..8f031e23901f --- /dev/null +++ b/arm-redis/2016-04-01/examples/RedisCacheFirewallRuleCreate.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "ruleName": "rule1", + "cacheName": "cache1", + "resourceGroupName": "rg1", + "api-version": "2016-04-01", + "subscriptionId": "subid", + "parameters": { + "properties": { + "startIP": "192.168.1.1", + "endIP": "192.168.1.4" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/firewallRules/rule1", + "name": "cache1/rule1", + "type": "Microsoft.Cache/Redis/firewallRules", + "properties": { + "startIP": "192.168.1.1", + "endIP": "192.168.1.4" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/firewallRules/rule1", + "name": "cache1/rule1", + "type": "Microsoft.Cache/Redis/firewallRules", + "properties": { + "startIP": "192.168.1.1", + "endIP": "192.168.1.4" + } + } + } + } +} \ No newline at end of file diff --git a/arm-redis/2016-04-01/examples/RedisCacheFirewallRuleDelete.json b/arm-redis/2016-04-01/examples/RedisCacheFirewallRuleDelete.json new file mode 100644 index 000000000000..b3d113624314 --- /dev/null +++ b/arm-redis/2016-04-01/examples/RedisCacheFirewallRuleDelete.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "ruleName": "rule1", + "cacheName": "cache1", + "resourceGroupName": "rg1", + "api-version": "2016-04-01", + "subscriptionId": "subid" + }, + "responses": { + "200": { + }, + "204": { + } + } +} \ No newline at end of file diff --git a/arm-redis/2016-04-01/examples/RedisCacheFirewallRuleGet.json b/arm-redis/2016-04-01/examples/RedisCacheFirewallRuleGet.json new file mode 100644 index 000000000000..6238d11443d7 --- /dev/null +++ b/arm-redis/2016-04-01/examples/RedisCacheFirewallRuleGet.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "ruleName": "rule1", + "cacheName": "cache1", + "resourceGroupName": "rg1", + "api-version": "2016-04-01", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/firewallRules/rule1", + "name": "cache1/rule1", + "type": "Microsoft.Cache/Redis/firewallRules", + "properties": { + "startIP": "192.168.1.1", + "endIP": "192.168.1.4" + } + } + } + } +} \ No newline at end of file diff --git a/arm-redis/2016-04-01/examples/RedisCacheFirewallRulesList.json b/arm-redis/2016-04-01/examples/RedisCacheFirewallRulesList.json new file mode 100644 index 000000000000..6e9c1546c18d --- /dev/null +++ b/arm-redis/2016-04-01/examples/RedisCacheFirewallRulesList.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "cacheName": "cache1", + "resourceGroupName": "rg1", + "api-version": "2016-04-01", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/firewallRules/rule1", + "name": "rule1", + "type": "Microsoft.Cache/Redis/firewallRules", + "properties": { + "startIP": "192.168.1.1", + "endIP": "192.168.1.4" + } + }, + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/firewallRules/rule2", + "name": "rule2", + "type": "Microsoft.Cache/Redis/firewallRules", + "properties": { + "startIP": "192.169.1.0", + "endIP": "192.169.1.255" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/arm-redis/2016-04-01/swagger/redis.json b/arm-redis/2016-04-01/swagger/redis.json index ab9b35dc1a09..1f6669926a74 100644 --- a/arm-redis/2016-04-01/swagger/redis.json +++ b/arm-redis/2016-04-01/swagger/redis.json @@ -174,10 +174,10 @@ ], "responses": { "200": { - "description": "" + "description": "Successfully deleted the cache." }, "204": { - "description": "" + "description": "Successfully deleted the cache." } } }, @@ -214,7 +214,7 @@ ], "responses": { "200": { - "description": "", + "description": "Successfully found the cache", "schema": { "$ref": "#/definitions/RedisResource" } @@ -287,7 +287,7 @@ } }, "x-ms-pageable": { - "nextLinkName": "nextLink" + "nextLinkName": "nextLink" } } }, @@ -545,6 +545,213 @@ } } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/firewallRules/": { + "get": { + "tags": [ + "Redis", + "FirewallRules" + ], + "operationId": "RedisFirewallRules_List", + "description": "Gets all firewall rules in the specified redis cache.", + "x-ms-examples": { + "RedisCacheFirewallRulesList": { "$ref": "../examples/RedisCacheFirewallRulesList.json" } + }, + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "cacheName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Redis cache." + } + ], + "responses": { + "200": { + "description": "Successfully got the current rules", + "schema": { + "$ref": "#/definitions/RedisFirewallRuleListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{cacheName}/firewallRules/{rule}": { + "put": { + "tags": [ + "Redis", + "FirewallRules" + ], + "operationId": "RedisFirewallRule_CreateOrUpdate", + "description": "Create or update a redis cache firewall rule", + "x-ms-examples": { + "RedisCacheFirewallRuleCreate": { "$ref": "../examples/RedisCacheFirewallRuleCreate.json" } + }, + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "cacheName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Redis cache." + }, + { + "name": "ruleName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the firewall rule." + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/RedisFirewallRule" + }, + "description": "Parameters supplied to the create or update redis firewall rule operation." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Resource was successfully updated", + "schema": { + "$ref": "#/definitions/RedisFirewallRule" + } + }, + "201": { + "description": "Resource was successfully created", + "schema": { + "$ref": "#/definitions/RedisFirewallRule" + } + } + } + }, + "get": { + "tags": [ + "Redis", + "FirewallRules" + ], + "operationId": "RedisFirewallRule_Get", + "description": "Gets a single firewall rule in a specified redis cache.", + "x-ms-examples": { + "RedisCacheFirewallRuleGet": { "$ref": "../examples/RedisCacheFirewallRuleGet.json" } + }, + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "cacheName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Redis cache." + }, + { + "name": "ruleName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the firewall rule." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Successfully found the rule", + "schema": { + "$ref": "#/definitions/RedisFirewallRule" + } + } + } + }, + "delete": { + "tags": [ + "Redis", + "FirewallRules" + ], + "operationId": "RedisFirewallRule_Delete", + "description": "Deletes a single firewall rule in a specified redis cache.", + "x-ms-examples": { + "RedisCacheFirewallRuleDelete": { "$ref": "../examples/RedisCacheFirewallRuleDelete.json" } + }, + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "cacheName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Redis cache." + }, + { + "name": "ruleName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the firewall rule." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the rule" + }, + "204": { + "description": "Successfully deleted the rule" + } + } + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/patchSchedules/default": { "put": { "tags": [ @@ -863,7 +1070,7 @@ } }, "description": "Parameters supplied to the Update Redis operation." - }, + }, "RedisAccessKeys": { "properties": { "primaryKey": { @@ -879,6 +1086,70 @@ }, "description": "Redis cache access keys." }, + "RedisFirewallRule": { + "description": "A firewall rule on a redis cache has a name, and describes a contiguous range of IP addresses permitted to connect", + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "resource ID (of the firewall rule)" + }, + "name": { + "type": "string", + "readOnly": true, + "description": "name of the firewall rule" + }, + "type": { + "type": "string", + "readOnly": true, + "description": "type (of the firewall rule resource = 'Microsoft.Cache/redis/firewallRule')" + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/RedisFirewallRuleProperties", + "description": "redis cache firewall rule properties" + } + }, + "required": [ + "properties" + ] + }, + "RedisFirewallRuleProperties": { + "description": "Specifies a range of IP addresses permitted to connect to the cache", + "properties": { + "startIP": { + "type": "string", + "description": "lowest IP address included in the range" + }, + "endIP": { + "type": "string", + "description": "highest IP address included in the range" + } + }, + "required": [ + "startIP", + "endIP" + ] + }, + "RedisFirewallRuleListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/RedisFirewallRule" + }, + "description": "Results of the list firewall rules operation." + }, + "nextLink": { + "type": "string", + "description": "Link for next set of locations." + } + }, + "description": "The response of list firewall rules Redis operation.", + "required": [ + "value" + ] + }, "RedisResourceProperties": { "properties": { "sku": { @@ -1155,4 +1426,4 @@ "description": "Client Api Version." } } -} \ No newline at end of file +}