SqlManagementClient icon

SqlManagementClient

The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases

COMMUNITYBEARER0 INSTALLS
OpenAPI Specificationv3.0
{
  "swagger": "2.0",
  "schemes": [
    "https"
  ],
  "host": "management.azure.com",
  "info": {
    "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities.",
    "title": "SqlManagementClient",
    "version": "2015-05-01-preview",
    "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/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/virtualclusters.json",
        "version": "2.0"
      }
    ],
    "x-providerName": "azure.com",
    "x-serviceName": "sql-virtualclusters",
    "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"
    }
  },
  "parameters": {
    "ApiVersionParameter": {
      "description": "The API version to use for the request.",
      "in": "query",
      "name": "api-version",
      "required": true,
      "type": "string",
      "x-ms-parameter-location": "client"
    },
    "BlobAuditingPolicyNameParameter": {
      "description": "The name of the blob auditing policy.",
      "enum": [
        "default"
      ],
      "in": "path",
      "name": "blobAuditingPolicyName",
      "required": true,
      "type": "string",
      "x-ms-parameter-location": "method"
    },
    "DatabaseNameParameter": {
      "description": "The name of the database.",
      "in": "path",
      "name": "databaseName",
      "required": true,
      "type": "string",
      "x-ms-parameter-location": "method"
    },
    "ManagedInstanceNameParameter": {
      "description": "The name of the managed instance.",
      "in": "path",
      "name": "managedInstanceName",
      "required": true,
      "type": "string",
      "x-ms-parameter-location": "method"
    },
    "ResourceGroupParameter": {
      "description": "The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.",
      "in": "path",
      "name": "resourceGroupName",
      "required": true,
      "type": "string",
      "x-ms-parameter-location": "method"
    },
    "ServerNameParameter": {
      "description": "The name of the server.",
      "in": "path",
      "name": "serverName",
      "required": true,
      "type": "string",
      "x-ms-parameter-location": "method"
    },
    "SqlVirtualMachineContainerNameParameter": {
      "description": "The name of the SqlVirtualMachineContainer.",
      "in": "path",
      "name": "sqlVirtualMachineContainerName",
      "required": true,
      "type": "string",
      "x-ms-parameter-location": "method"
    },
    "SqlVirtualMachineInstanceNameParameter": {
      "description": "The name of the SqlVirtualMachineInstance.",
      "in": "path",
      "name": "sqlVirtualMachineInstanceName",
      "required": true,
      "type": "string",
      "x-ms-parameter-location": "method"
    },
    "SubscriptionIdParameter": {
      "description": "The subscription ID that identifies an Azure subscription.",
      "in": "path",
      "name": "subscriptionId",
      "required": true,
      "type": "string",
      "x-ms-parameter-location": "client"
    },
    "VirtualClusterNameParameter": {
      "description": "The name of the virtual cluster.",
      "in": "path",
      "name": "virtualClusterName",
      "required": true,
      "type": "string",
      "x-ms-parameter-location": "method"
    }
  },
  "paths": {
    "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/virtualClusters": {
      "get": {
        "description": "Gets a list of all virtualClusters in the subscription.",
        "operationId": "VirtualClusters_List",
        "parameters": [
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved the list of virtual clusters.",
            "schema": {
              "$ref": "#/definitions/VirtualClusterListResult"
            }
          },
          "default": {
            "description": "*** Error Responses: ***"
          }
        },
        "tags": [
          "VirtualClusters"
        ],
        "x-ms-examples": {
          "List virtualClusters": {
            "parameters": {
              "api-version": "2015-05-01-preview",
              "subscriptionId": "20d7082a-0fc7-4468-82bd-542694d5042b"
            },
            "responses": {
              "200": {
                "body": {
                  "value": [
                    {
                      "id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2",
                      "location": "westeurope",
                      "name": "vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2",
                      "properties": {
                        "childResources": [
                          "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance1",
                          "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance2"
                        ],
                        "family": "Gen4",
                        "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"
                      },
                      "type": "Microsoft.Sql/virtualClusters"
                    },
                    {
                      "id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/vc-subnet2-14b795bd-9c8f-46ec-adb8-2b8eff56ac16",
                      "location": "westeurope",
                      "name": "vc-subnet1-14b795bd-9c8f-46ec-adb8-2b8eff56ac16",
                      "properties": {
                        "childResources": [
                          "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance3",
                          "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance4"
                        ],
                        "family": "Gen5",
                        "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/subnet2"
                      },
                      "type": "Microsoft.Sql/virtualClusters"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters": {
      "get": {
        "description": "Gets a list of virtual clusters in a resource group.",
        "operationId": "VirtualClusters_ListByResourceGroup",
        "parameters": [
          {
            "$ref": "#/parameters/ResourceGroupParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved the list of virtual clusters.",
            "schema": {
              "$ref": "#/definitions/VirtualClusterListResult"
            }
          },
          "default": {
            "description": "*** Error Responses: ***\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 400 ManagementServiceFeatureDisabled - User attempted to use a feature which is disabled.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 VirtualClusterNotInSubscriptionResourceGroup - specified virtual cluster does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveVirtualCluster - The requested virtual cluster was not found\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 ConflictingVirtualClusterOperation - An operation is currently in progress for the virtual cluster.\n\n * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription."
          }
        },
        "tags": [
          "VirtualClusters"
        ],
        "x-ms-examples": {
          "List virtual clusters by resource group": {
            "parameters": {
              "api-version": "2015-05-01-preview",
              "resourceGroupName": "testrg",
              "subscriptionId": "20d7082a-0fc7-4468-82bd-542694d5042b"
            },
            "responses": {
              "200": {
                "body": {
                  "value": [
                    {
                      "id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2",
                      "location": "westeurope",
                      "name": "vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2",
                      "properties": {
                        "childResources": [
                          "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance1",
                          "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance2"
                        ],
                        "family": "Gen4",
                        "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"
                      },
                      "type": "Microsoft.Sql/virtualClusters"
                    },
                    {
                      "id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/vc-subnet2-14b795bd-9c8f-46ec-adb8-2b8eff56ac16",
                      "location": "westeurope",
                      "name": "vc-subnet1-14b795bd-9c8f-46ec-adb8-2b8eff56ac16",
                      "properties": {
                        "childResources": [
                          "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance3",
                          "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance4"
                        ],
                        "family": "Gen4",
                        "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/subnet2"
                      },
                      "type": "Microsoft.Sql/virtualClusters"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters/{virtualClusterName}": {
      "delete": {
        "description": "Deletes a virtual cluster.",
        "operationId": "VirtualClusters_Delete",
        "parameters": [
          {
            "$ref": "#/parameters/ResourceGroupParameter"
          },
          {
            "$ref": "#/parameters/VirtualClusterNameParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully deleted the virtual cluster."
          },
          "202": {
            "description": "Deleting the virtual cluster is in progress."
          },
          "204": {
            "description": "The specified virtual cluster does not exist."
          },
          "default": {
            "description": "*** Error Responses: ***\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 400 ManagementServiceFeatureDisabled - User attempted to use a feature which is disabled.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 VirtualClusterNotInSubscriptionResourceGroup - specified virtual cluster does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveVirtualCluster - The requested virtual cluster was not found\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 ConflictingVirtualClusterOperation - An operation is currently in progress for the virtual cluster.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation."
          }
        },
        "tags": [
          "VirtualClusters"
        ],
        "x-ms-examples": {
          "Delete virtual cluster": {
            "parameters": {
              "api-version": "2015-05-01-preview",
              "resourceGroupName": "testrg",
              "subscriptionId": "20d7082a-0fc7-4468-82bd-542694d5042b",
              "virtualClusterName": "vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2"
            },
            "responses": {
              "200": {},
              "202": {},
              "204": {}
            }
          }
        },
        "x-ms-long-running-operation": true
      },
      "get": {
        "description": "Gets a virtual cluster.",
        "operationId": "VirtualClusters_Get",
        "parameters": [
          {
            "$ref": "#/parameters/ResourceGroupParameter"
          },
          {
            "$ref": "#/parameters/VirtualClusterNameParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved the specified virtual cluster.",
            "schema": {
              "$ref": "#/definitions/VirtualCluster"
            }
          },
          "default": {
            "description": "*** Error Responses: ***\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 400 ManagementServiceFeatureDisabled - User attempted to use a feature which is disabled.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 VirtualClusterNotInSubscriptionResourceGroup - specified virtual cluster does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveVirtualCluster - The requested virtual cluster was not found\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 ConflictingVirtualClusterOperation - An operation is currently in progress for the virtual cluster.\n\n * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription."
          }
        },
        "tags": [
          "VirtualClusters"
        ],
        "x-ms-examples": {
          "Get virtual cluster": {
            "parameters": {
              "api-version": "2015-05-01-preview",
              "resourceGroupName": "testrg",
              "subscriptionId": "20d7082a-0fc7-4468-82bd-542694d5042b",
              "virtualClusterName": "vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2",
                  "location": "westeurope",
                  "name": "vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2",
                  "properties": {
                    "childResources": [
                      "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance1",
                      "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance2"
                    ],
                    "family": "Gen4",
                    "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"
                  },
                  "type": "Microsoft.Sql/virtualClusters"
                }
              }
            }
          }
        }
      },
      "patch": {
        "description": "Updates a virtual cluster.",
        "operationId": "VirtualClusters_Update",
        "parameters": [
          {
            "$ref": "#/parameters/ResourceGroupParameter"
          },
          {
            "$ref": "#/parameters/VirtualClusterNameParameter"
          },
          {
            "description": "The requested managed instance resource state.",
            "in": "body",
            "name": "parameters",
            "required": true,
            "schema": {
              "$ref": "#/definitions/VirtualClusterUpdate"
            }
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully updated the virtual cluster.",
            "schema": {
              "$ref": "#/definitions/VirtualCluster"
            }
          },
          "202": {
            "description": "Accepted"
          },
          "default": {
            "description": "*** Error Responses: ***\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 400 ManagementServiceFeatureDisabled - User attempted to use a feature which is disabled.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 VirtualClusterNotInSubscriptionResourceGroup - specified virtual cluster does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveVirtualCluster - The requested virtual cluster was not found\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 ConflictingVirtualClusterOperation - An operation is currently in progress for the virtual cluster.\n\n * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription."
          }
        },
        "tags": [
          "VirtualClusters"
        ],
        "x-ms-examples": {
          "Update virtual cluster with tags": {
            "parameters": {
              "api-version": "2015-05-01-preview",
              "parameters": {
                "tags": {
                  "tagKey1": "TagValue1"
                }
              },
              "resourceGroupName": "testrg",
              "subscriptionId": "20d7082a-0fc7-4468-82bd-542694d5042b",
              "virtualClusterName": "vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2",
                  "location": "westeurope",
                  "name": "vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2",
                  "properties": {
                    "childResources": [
                      "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance1",
                      "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance2"
                    ],
                    "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"
                  },
                  "tags": {
                    "tagKey1": "TagValue1"
                  },
                  "type": "Microsoft.Sql/virtualClusters"
                }
              },
              "202": {}
            }
          }
        },
        "x-ms-long-running-operation": true
      }
    }
  },
  "definitions": {
    "Resource": {
      "description": "ARM resource.",
      "properties": {
        "id": {
          "description": "Resource ID.",
          "readOnly": true,
          "type": "string"
        },
        "name": {
          "description": "Resource name.",
          "readOnly": true,
          "type": "string"
        },
        "type": {
          "description": "Resource type.",
          "readOnly": true,
          "type": "string"
        }
      },
      "type": "object",
      "x-ms-azure-resource": true
    },
    "TrackedResource": {
      "allOf": [
        {
          "$ref": "#/definitions/Resource"
        }
      ],
      "description": "ARM tracked top level resource.",
      "properties": {
        "location": {
          "description": "Resource location.",
          "type": "string",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "tags": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Resource tags.",
          "type": "object"
        }
      },
      "required": [
        "location"
      ],
      "type": "object"
    },
    "VirtualCluster": {
      "allOf": [
        {
          "$ref": "#/definitions/TrackedResource"
        }
      ],
      "description": "An Azure SQL virtual cluster.",
      "properties": {
        "properties": {
          "$ref": "#/definitions/VirtualClusterProperties",
          "description": "Resource properties.",
          "x-ms-client-flatten": true
        }
      },
      "required": [
        "location"
      ],
      "type": "object"
    },
    "VirtualClusterListResult": {
      "description": "A list of virtual clusters.",
      "properties": {
        "nextLink": {
          "description": "Link to retrieve next page of results.",
          "readOnly": true,
          "type": "string"
        },
        "value": {
          "description": "Array of results.",
          "items": {
            "$ref": "#/definitions/VirtualCluster"
          },
          "readOnly": true,
          "type": "array"
        }
      },
      "type": "object"
    },
    "VirtualClusterProperties": {
      "description": "The properties of a virtual cluster.",
      "properties": {
        "childResources": {
          "description": "List of resources in this virtual cluster.",
          "items": {
            "type": "string"
          },
          "readOnly": true,
          "type": "array"
        },
        "family": {
          "description": "If the service has different generations of hardware, for the same SKU, then that can be captured here.",
          "type": "string"
        },
        "subnetId": {
          "description": "Subnet resource ID for the virtual cluster.",
          "readOnly": true,
          "type": "string"
        }
      },
      "type": "object"
    },
    "VirtualClusterUpdate": {
      "description": "An update request for an Azure SQL Database virtual cluster.",
      "properties": {
        "properties": {
          "$ref": "#/definitions/VirtualClusterProperties",
          "description": "Resource properties.",
          "x-ms-client-flatten": true
        },
        "tags": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Resource tags.",
          "type": "object"
        }
      },
      "type": "object"
    }
  }
}