{
  "swagger": "2.0",
  "schemes": [
    "https"
  ],
  "host": "management.azure.com",
  "info": {
    "description": "REST API for Azure Redis Cache Service.",
    "title": "RedisManagementClient",
    "version": "2015-08-01",
    "x-apisguru-categories": [
      "cloud"
    ],
    "x-logo": {
      "url": "https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png"
    },
    "x-origin": [
      {
        "format": "swagger",
        "url": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/redis/resource-manager/Microsoft.Cache/stable/2015-08-01/redis.json",
        "version": "2.0"
      }
    ],
    "x-preferred": false,
    "x-providerName": "azure.com",
    "x-serviceName": "redis",
    "x-tags": [
      "Azure",
      "Microsoft"
    ]
  },
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "securityDefinitions": {
    "azure_auth": {
      "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
      "description": "Azure Active Directory OAuth2 Flow.",
      "flow": "implicit",
      "scopes": {
        "user_impersonation": "impersonate your user account"
      },
      "type": "oauth2"
    }
  },
  "security": [
    {
      "azure_auth": [
        "user_impersonation"
      ]
    }
  ],
  "parameters": {
    "ApiVersionParameter": {
      "description": "Client API Version.",
      "in": "query",
      "name": "api-version",
      "required": true,
      "type": "string"
    },
    "SubscriptionIdParameter": {
      "description": "Gets subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.",
      "in": "path",
      "name": "subscriptionId",
      "required": true,
      "type": "string"
    }
  },
  "paths": {
    "/subscriptions/{subscriptionId}/providers/Microsoft.Cache/Redis/": {
      "get": {
        "description": "Gets all Redis caches in the specified subscription.",
        "operationId": "Redis_List",
        "parameters": [
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "schema": {
              "$ref": "#/definitions/RedisListResult"
            }
          }
        },
        "tags": [
          "Redis"
        ],
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/": {
      "get": {
        "description": "Gets all Redis caches in a resource group.",
        "operationId": "Redis_ListByResourceGroup",
        "parameters": [
          {
            "description": "The name of the resource group.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "schema": {
              "$ref": "#/definitions/RedisListResult"
            }
          }
        },
        "tags": [
          "Redis"
        ],
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}": {
      "delete": {
        "description": "Deletes a Redis cache.",
        "operationId": "Redis_Delete",
        "parameters": [
          {
            "description": "The name of the resource group.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "description": "The name of the Redis cache.",
            "in": "path",
            "name": "name",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "202": {
            "description": ""
          },
          "404": {
            "description": ""
          }
        },
        "tags": [
          "Redis"
        ]
      },
      "get": {
        "description": "Gets a Redis cache (resource description).",
        "operationId": "Redis_Get",
        "parameters": [
          {
            "description": "The name of the resource group.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "description": "The name of the Redis cache.",
            "in": "path",
            "name": "name",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "schema": {
              "$ref": "#/definitions/RedisResource"
            }
          }
        },
        "tags": [
          "Redis"
        ]
      },
      "put": {
        "description": "Create a Redis cache, or replace (overwrite/recreate, with potential downtime) an existing cache.",
        "operationId": "Redis_CreateOrUpdate",
        "parameters": [
          {
            "description": "The name of the resource group.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "description": "The name of the Redis cache.",
            "in": "path",
            "name": "name",
            "required": true,
            "type": "string"
          },
          {
            "description": "Parameters supplied to the CreateOrUpdate Redis operation.",
            "in": "body",
            "name": "parameters",
            "required": true,
            "schema": {
              "$ref": "#/definitions/RedisCreateOrUpdateParameters"
            }
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "schema": {
              "$ref": "#/definitions/RedisResourceWithAccessKey"
            }
          },
          "201": {
            "description": "",
            "schema": {
              "$ref": "#/definitions/RedisResourceWithAccessKey"
            }
          }
        },
        "tags": [
          "Redis"
        ]
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/forceReboot": {
      "post": {
        "description": "Reboot specified Redis node(s). This operation requires write permission to the cache resource. There can be potential data loss.",
        "operationId": "Redis_ForceReboot",
        "parameters": [
          {
            "description": "The name of the resource group.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "description": "The name of the Redis cache.",
            "in": "path",
            "name": "name",
            "required": true,
            "type": "string"
          },
          {
            "description": "Specifies which Redis node(s) to reboot.",
            "in": "body",
            "name": "parameters",
            "required": true,
            "schema": {
              "$ref": "#/definitions/RedisRebootParameters"
            }
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "202": {
            "description": ""
          },
          "404": {
            "description": ""
          }
        },
        "tags": [
          "Redis"
        ]
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/listKeys": {
      "post": {
        "description": "Retrieve a Redis cache's access keys. This operation requires write permission to the cache resource.",
        "operationId": "Redis_ListKeys",
        "parameters": [
          {
            "description": "The name of the resource group.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "description": "The name of the Redis cache.",
            "in": "path",
            "name": "name",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Lists the keys for a Redis Cache.",
            "schema": {
              "$ref": "#/definitions/RedisListKeysResult"
            }
          }
        },
        "tags": [
          "Redis"
        ]
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/regenerateKey": {
      "post": {
        "description": "Regenerate the access keys for a Redis cache. This operation requires write permission to the cache resource.",
        "operationId": "Redis_RegenerateKey",
        "parameters": [
          {
            "description": "The name of the resource group.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "description": "The name of the Redis cache.",
            "in": "path",
            "name": "name",
            "required": true,
            "type": "string"
          },
          {
            "description": "Specifies which key to reset.",
            "in": "body",
            "name": "parameters",
            "required": true,
            "schema": {
              "$ref": "#/definitions/RedisRegenerateKeyParameters"
            }
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Lists the regenerated keys for a Redis Cache.",
            "schema": {
              "$ref": "#/definitions/RedisListKeysResult"
            }
          }
        },
        "tags": [
          "Redis"
        ]
      }
    }
  },
  "definitions": {
    "RedisAccessKeys": {
      "description": "Redis cache access keys.",
      "properties": {
        "primaryKey": {
          "description": "The current primary key that clients can use to authenticate with Redis cache.",
          "type": "string"
        },
        "secondaryKey": {
          "description": "The current secondary key that clients can use to authenticate with Redis cache.",
          "type": "string"
        }
      }
    },
    "RedisCreateOrUpdateParameters": {
      "allOf": [
        {
          "$ref": "#/definitions/Resource"
        }
      ],
      "description": "Parameters supplied to the CreateOrUpdate Redis operation.",
      "properties": {
        "properties": {
          "$ref": "#/definitions/RedisProperties",
          "description": "Redis cache properties.",
          "x-ms-client-flatten": true
        }
      },
      "required": [
        "properties"
      ]
    },
    "RedisListKeysResult": {
      "description": "The response of Redis list keys operation.",
      "properties": {
        "primaryKey": {
          "description": "The current primary key that clients can use to authenticate with Redis cache.",
          "type": "string"
        },
        "secondaryKey": {
          "description": "The current secondary key that clients can use to authenticate with Redis cache.",
          "type": "string"
        }
      }
    },
    "RedisListResult": {
      "description": "The response of list Redis operation.",
      "properties": {
        "nextLink": {
          "description": "Link for next set of locations.",
          "type": "string"
        },
        "value": {
          "description": "Results of the list operation.",
          "items": {
            "$ref": "#/definitions/RedisResource"
          },
          "type": "array"
        }
      }
    },
    "RedisProperties": {
      "description": "Parameters supplied to CreateOrUpdate Redis operation.",
      "properties": {
        "enableNonSslPort": {
          "description": "If the value is true, then the non-SLL Redis server port (6379) will be enabled.",
          "type": "boolean"
        },
        "redisConfiguration": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc.",
          "type": "object"
        },
        "redisVersion": {
          "description": "RedisVersion parameter has been deprecated. As such, it is no longer necessary to provide this parameter and any value specified is ignored.",
          "type": "string"
        },
        "shardCount": {
          "description": "The number of shards to be created on a Premium Cluster Cache.",
          "format": "int32",
          "type": "integer"
        },
        "sku": {
          "$ref": "#/definitions/Sku",
          "description": "What SKU of Redis cache to deploy."
        },
        "staticIP": {
          "description": "Required when deploying a Redis cache inside an existing Azure Virtual Network.",
          "type": "string"
        },
        "subnet": {
          "description": "Required when deploying a Redis cache inside an existing Azure Virtual Network.",
          "type": "string"
        },
        "tenantSettings": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "tenantSettings",
          "type": "object"
        },
        "virtualNetwork": {
          "description": "The exact ARM resource ID of the virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.ClassicNetwork/VirtualNetworks/vnet1",
          "type": "string"
        }
      },
      "required": [
        "sku"
      ]
    },
    "RedisReadableProperties": {
      "allOf": [
        {
          "$ref": "#/definitions/RedisProperties"
        }
      ],
      "description": "Parameters describing a Redis instance",
      "properties": {
        "hostName": {
          "description": "Redis host name.",
          "type": "string"
        },
        "port": {
          "description": "Redis non-SSL port.",
          "format": "int32",
          "type": "integer"
        },
        "provisioningState": {
          "description": "Redis instance provisioning status.",
          "type": "string"
        },
        "sslPort": {
          "description": "Redis SSL port.",
          "format": "int32",
          "type": "integer"
        }
      }
    },
    "RedisReadablePropertiesWithAccessKey": {
      "allOf": [
        {
          "$ref": "#/definitions/RedisReadableProperties"
        }
      ],
      "description": "Properties generated only in response to CreateOrUpdate Redis operation.",
      "properties": {
        "accessKeys": {
          "$ref": "#/definitions/RedisAccessKeys",
          "description": "Redis cache access keys."
        }
      }
    },
    "RedisRebootParameters": {
      "description": "Specifies which Redis node(s) to reboot.",
      "properties": {
        "rebootType": {
          "description": "Which Redis node(s) to reboot. Depending on this value data loss is possible.",
          "enum": [
            "PrimaryNode",
            "SecondaryNode",
            "AllNodes"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": false,
            "name": "RebootType"
          }
        },
        "shardId": {
          "description": "If clustering is enabled, the ID of the shared be rebooted.",
          "format": "int32",
          "type": "integer"
        }
      },
      "required": [
        "rebootType"
      ]
    },
    "RedisRegenerateKeyParameters": {
      "description": "Specifies which Redis access keys to reset.",
      "properties": {
        "keyType": {
          "description": "Which Redis access key to reset.",
          "enum": [
            "Primary",
            "Secondary"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": false,
            "name": "RedisKeyType"
          }
        }
      },
      "required": [
        "keyType"
      ]
    },
    "RedisResource": {
      "allOf": [
        {
          "$ref": "#/definitions/Resource"
        }
      ],
      "description": "A single Redis item in List or Get Operation.",
      "properties": {
        "properties": {
          "$ref": "#/definitions/RedisReadableProperties",
          "description": "Redis cache properties.",
          "x-ms-client-flatten": true
        }
      }
    },
    "RedisResourceWithAccessKey": {
      "allOf": [
        {
          "$ref": "#/definitions/Resource"
        }
      ],
      "description": "A Redis item in CreateOrUpdate Operation response.",
      "properties": {
        "properties": {
          "$ref": "#/definitions/RedisReadablePropertiesWithAccessKey",
          "description": "Redis cache properties.",
          "x-ms-client-flatten": true
        }
      }
    },
    "Resource": {
      "properties": {
        "id": {
          "description": "Resource ID.",
          "readOnly": true,
          "type": "string"
        },
        "location": {
          "description": "Resource location.",
          "type": "string"
        },
        "name": {
          "description": "Resource name.",
          "readOnly": true,
          "type": "string"
        },
        "tags": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Resource tags.",
          "type": "object"
        },
        "type": {
          "description": "Resource type.",
          "readOnly": true,
          "type": "string"
        }
      },
      "required": [
        "location"
      ],
      "x-ms-azure-resource": true
    },
    "Sku": {
      "description": "SKU parameters supplied to the create Redis operation.",
      "properties": {
        "capacity": {
          "description": "What size of Redis cache to deploy. Valid values: for C family (0, 1, 2, 3, 4, 5, 6), for P family (1, 2, 3, 4).",
          "format": "int32",
          "type": "integer"
        },
        "family": {
          "description": "Which family to use. Valid values: (C, P).",
          "enum": [
            "C",
            "P"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "SkuFamily"
          }
        },
        "name": {
          "description": "What type of Redis cache to deploy. Valid values: (Basic, Standard, Premium).",
          "enum": [
            "Basic",
            "Standard",
            "Premium"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "SkuName"
          }
        }
      },
      "required": [
        "name",
        "family",
        "capacity"
      ]
    }
  }
}