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..143a84bdd6f0 100644 --- a/arm-redis/2016-04-01/swagger/redis.json +++ b/arm-redis/2016-04-01/swagger/redis.json @@ -34,6 +34,31 @@ } }, "paths": { + "/providers/Microsoft.Cache/operations": { + "get": { + "tags": [ + "Operations" + ], + "description": "Lists all of the available REST API operations of the Microsoft.Cache provider.", + "operationId": "Operations_List", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success. The response describes the list of operations.", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}": { "put": { "tags": [ @@ -174,10 +199,10 @@ ], "responses": { "200": { - "description": "" + "description": "Successfully deleted the cache." }, "204": { - "description": "" + "description": "Successfully deleted the cache." } } }, @@ -214,7 +239,7 @@ ], "responses": { "200": { - "description": "", + "description": "Successfully found the cache", "schema": { "$ref": "#/definitions/RedisResource" } @@ -287,7 +312,7 @@ } }, "x-ms-pageable": { - "nextLinkName": "nextLink" + "nextLinkName": "nextLink" } } }, @@ -545,6 +570,213 @@ } } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{cacheName}/firewallRules": { + "get": { + "tags": [ + "Redis", + "FirewallRules" + ], + "operationId": "FirewallRules_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/{ruleName}": { + "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 +1095,7 @@ } }, "description": "Parameters supplied to the Update Redis operation." - }, + }, "RedisAccessKeys": { "properties": { "primaryKey": { @@ -879,6 +1111,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": { @@ -1137,6 +1433,53 @@ } }, "description": "Response to force reboot for Redis cache." + }, + "Operation": { + "description": "REST API operation", + "type": "object", + "properties": { + "name": { + "description": "Operation name: {provider}/{resource}/{operation}", + "type": "string" + }, + "display": { + "description": "The object that describes the operation.", + "properties": { + "provider": { + "description": "Friendly name of the resource provider", + "type": "string" + }, + "operation": { + "description": "Operation type: read, write, delete, listKeys/action, etc.", + "type": "string" + }, + "resource": { + "description": "Resource type on which the operation is performed.", + "type": "string" + }, + "description": { + "description": "Friendly name of the operation", + "type": "string" + } + } + } + } + }, + "OperationListResult": { + "description": "Result of the request to list REST API operations. It contains a list of operations and a URL nextLink to get the next set of results.", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Operation" + }, + "description": "List of operations supported by the resource provider." + }, + "nextLink": { + "type": "string", + "description": "URL to get the next set of operation list results if there are any." + } + } } }, "parameters": { @@ -1155,4 +1498,4 @@ "description": "Client Api Version." } } -} \ No newline at end of file +}