{ "swagger": "2.0", "info": { "title": "SqlManagementClient", "version": "2025-01-01", "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.", "x-typespec-generated": [ { "emitter": "@azure-tools/typespec-autorest" } ] }, "schemes": [ "https" ], "host": "management.azure.com", "produces": [ "application/json" ], "consumes": [ "application/json" ], "security": [ { "azure_auth": [ "user_impersonation" ] } ], "securityDefinitions": { "azure_auth": { "type": "oauth2", "description": "Azure Active Directory OAuth2 Flow.", "flow": "implicit", "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "scopes": { "user_impersonation": "impersonate your user account" } } }, "tags": [ { "name": "ServerTrustCertificates" } ], "paths": { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverTrustCertificates": { "get": { "operationId": "ServerTrustCertificates_ListByInstance", "tags": [ "ServerTrustCertificates" ], "description": "Gets a list of the server trust certificates used to secure communication between SQL Server and the specified SQL Managed Instance", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "managedInstanceName", "in": "path", "description": "The name of the managed instance.", "required": true, "type": "string" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/ServerTrustCertificatesListResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Gets a list of server trust certificates on a given server.": { "$ref": "./examples/ServerTrustCertificatesListByInstance.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverTrustCertificates/{certificateName}": { "get": { "operationId": "ServerTrustCertificates_Get", "tags": [ "ServerTrustCertificates" ], "description": "Gets a server trust certificate that was uploaded from SQL Server to SQL Managed Instance.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "managedInstanceName", "in": "path", "description": "The name of the managed instance.", "required": true, "type": "string" }, { "name": "certificateName", "in": "path", "description": "Name of of the certificate to get.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/ServerTrustCertificate" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Gets server trust certificate.": { "$ref": "./examples/ServerTrustCertificatesGet.json" } } }, "put": { "operationId": "ServerTrustCertificates_CreateOrUpdate", "tags": [ "ServerTrustCertificates" ], "description": "Uploads a server trust certificate from SQL Server to SQL Managed Instance.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "managedInstanceName", "in": "path", "description": "The name of the managed instance.", "required": true, "type": "string" }, { "name": "certificateName", "in": "path", "description": "Name of of the certificate to get.", "required": true, "type": "string" }, { "name": "parameters", "in": "body", "description": "The server trust certificate info.", "required": true, "schema": { "$ref": "#/definitions/ServerTrustCertificate" } } ], "responses": { "200": { "description": "Resource 'ServerTrustCertificate' update operation succeeded", "schema": { "$ref": "#/definitions/ServerTrustCertificate" } }, "201": { "description": "Resource 'ServerTrustCertificate' create operation succeeded", "schema": { "$ref": "#/definitions/ServerTrustCertificate" }, "headers": { "Location": { "type": "string", "description": "The Location header contains the URL where the status of the long running operation can be checked." }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." } } }, "202": { "description": "Resource operation accepted.", "headers": { "Location": { "type": "string", "description": "The Location header contains the URL where the status of the long running operation can be checked." }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." } } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Create server trust certificate.": { "$ref": "./examples/ServerTrustCertificatesCreate.json" } }, "x-ms-long-running-operation-options": { "final-state-via": "location", "final-state-schema": "#/definitions/ServerTrustCertificate" }, "x-ms-long-running-operation": true }, "delete": { "operationId": "ServerTrustCertificates_Delete", "tags": [ "ServerTrustCertificates" ], "description": "Deletes a server trust certificate that was uploaded from SQL Server to SQL Managed Instance.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "managedInstanceName", "in": "path", "description": "The name of the managed instance.", "required": true, "type": "string" }, { "name": "certificateName", "in": "path", "description": "Name of of the certificate to get.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Resource deleted successfully." }, "202": { "description": "Resource deletion accepted.", "headers": { "Location": { "type": "string", "description": "The Location header contains the URL where the status of the long running operation can be checked." }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." } } }, "204": { "description": "Resource does not exist." }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Delete server trust certificate.": { "$ref": "./examples/ServerTrustCertificatesDelete.json" } }, "x-ms-long-running-operation-options": { "final-state-via": "location" }, "x-ms-long-running-operation": true } } }, "definitions": { "ServerTrustCertificate": { "type": "object", "description": "Server trust certificate imported from box to enable connection between box and Sql Managed Instance.", "properties": { "properties": { "$ref": "#/definitions/ServerTrustCertificateProperties", "description": "Resource properties.", "x-ms-client-flatten": true } }, "allOf": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" } ] }, "ServerTrustCertificateProperties": { "type": "object", "description": "The properties of a server trust certificate.", "properties": { "publicBlob": { "type": "string", "description": "The certificate public blob" }, "thumbprint": { "type": "string", "description": "The certificate thumbprint", "readOnly": true }, "certificateName": { "type": "string", "description": "The certificate name", "readOnly": true } } }, "ServerTrustCertificatesListResult": { "type": "object", "description": "A list of server trust certificates in instance.", "properties": { "value": { "type": "array", "description": "Array of results.", "items": { "$ref": "#/definitions/ServerTrustCertificate" }, "readOnly": true }, "nextLink": { "type": "string", "description": "Link to retrieve next page of results.", "readOnly": true } } } }, "parameters": {} }