Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swagger Documentation For Ledger Digest Upload #13871

Original file line number Diff line number Diff line change
@@ -0,0 +1,331 @@
{
"swagger": "2.0",
"info": {
"version": "2021-02-01-preview",
"title": "SqlManagementClient",
"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."
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/ledgerDigestUploads/{ledgerDigestUploads}": {
"get": {
"tags": [
"LedgerDigestUploads"
],
"description": "Gets the current ledger digest upload configuration for a database.",
"operationId": "LedgerDigestUploads_Get",
"parameters": [
{
"$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
},
{
"$ref": "#/parameters/DatabaseNameParameter"
},
{
"name": "ledgerDigestUploads",
"in": "path",
"required": true,
"type": "string",
"enum": [
"current"
],
"x-ms-enum": {
"name": "LedgerDigestUploadsName",
"modelAsString": true
}
},
{
"$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "Successfully retrieved the ledger digest configuration.",
"schema": {
"$ref": "#/definitions/LedgerDigestUploads"
}
},
"default": {
"description": "*** Error Responses: ***\n\n * 400 LedgerInvalidDigestStorageTargetUpdateRequest - The database ledger digest storage upload request does not exist or has no properties object.\n\n * 400 InvalidDigestStorageEndpoint - The specified digestStorageEndpoint is invalid. It must be an Azure blob storage endpoint.\n\n * 400 MalformedDigestStorageEndpoint - The specified digest storage endpoint is a malformed URI.\n\n * 400 InvalidLedgerDigestUploadsName - The ledger digest upload name is not supported. Please use the key name “current”.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found"
}
},
"x-ms-examples": {
"Gets the current ledger digest upload configuration for a database.": {
"$ref": "./examples/LedgerDigestUploadsGet.json"
}
}
},
"put": {
"tags": [
"LedgerDigestUploads"
],
"description": "Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance.",
"operationId": "LedgerDigestUploads_CreateOrUpdate",
"parameters": [
{
"$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
},
{
"$ref": "#/parameters/DatabaseNameParameter"
},
{
"name": "ledgerDigestUploads",
"in": "path",
"required": true,
"type": "string",
"enum": [
"current"
],
"x-ms-enum": {
"name": "LedgerDigestUploadsName",
"modelAsString": true
}
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/LedgerDigestUploads"
}
},
{
"$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "Successfully updated the ledger digest upload configuration",
"schema": {
"$ref": "#/definitions/LedgerDigestUploads"
}
},
"default": {
"description": "*** Error Responses: ***\n\n * 400 LedgerInvalidDigestStorageTargetUpdateRequest - The database ledger digest storage upload request does not exist or has no properties object.\n\n * 400 InvalidDigestStorageEndpoint - The specified digestStorageEndpoint is invalid. It must be an Azure blob storage endpoint.\n\n * 400 MalformedDigestStorageEndpoint - The specified digest storage endpoint is a malformed URI.\n\n * 400 InvalidLedgerDigestUploadsName - The ledger digest upload name is not supported. Please use the key name “current”.\n\n * 400 NoServerIdentity - No identity is configured for specified server. For information on how to configure an identity for the server see https://go.microsoft.com/fwlink/?linkid=2156804\n\n * 400 InsufficientStorageAccountPermissions - Read or write operations are not allowed on the storage account {0}.\n\n * 400 StorageAccountIsDisabled - The storage account {0} is disabled.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered. The error message from Active Directory Authentication library (ADAL) is {0}.\n\n * 400 SubscriptionDoesNotHaveServer - Subscription {0} does not contain server {1}.\n\n * 400 InvalidStorageAccountName - The specified storage account is not valid or does not exist.\n\n * 404 SourceDatabaseNotFound - Specified database does not exist.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found"
},
"202": {
"description": "Updating the ledger digest upload configuration is in progress."
}
},
"x-ms-examples": {
"Enables ledger digest upload configuration for a database": {
"$ref": "./examples/LedgerDigestUploadsEnable.json"
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/ledgerDigestUploads": {
"get": {
"tags": [
"LedgerDigestUploads"
],
"description": "Gets all ledger digest upload settings on a database.",
"operationId": "LedgerDigestUploads_ListByDatabase",
"parameters": [
{
"$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
},
{
"$ref": "#/parameters/DatabaseNameParameter"
},
{
"$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "Successfully retrieved ledger upload settings.",
"schema": {
"$ref": "#/definitions/LedgerDigestUploadsListResult"
}
},
"default": {
"description": "*** Error Responses: ***\n\n * 400 LedgerInvalidDigestStorageTargetUpdateRequest - The database ledger digest storage upload request does not exist or has no properties object.\n\n * 400 InvalidDigestStorageEndpoint - The specified digestStorageEndpoint is invalid. It must be an Azure blob storage endpoint.\n\n * 400 MalformedDigestStorageEndpoint - The specified digest storage endpoint is a malformed URI.\n\n * 400 InvalidLedgerDigestUploadsName - The ledger digest upload name is not supported. Please use the key name “current”.\n\n * 404 ResourceNotFound - The requested resource was not found."
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"Gets list of ledger digest upload settings on a database.": {
"$ref": "./examples/LedgerDigestUploadsList.json"
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/ledgerDigestUploads/{ledgerDigestUploads}/disable": {
"post": {
"tags": [
"LedgerDigestUploads"
],
"description": "Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance.",
"operationId": "LedgerDigestUploads_Disable",
"parameters": [
{
"$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
},
{
"$ref": "#/parameters/DatabaseNameParameter"
},
{
"name": "ledgerDigestUploads",
"in": "path",
"required": true,
"type": "string",
"enum": [
"current"
],
"x-ms-enum": {
"name": "LedgerDigestUploadsName",
"modelAsString": true
}
},
{
"$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "Successfully disabled uploading ledger digests",
"schema": {
"$ref": "#/definitions/LedgerDigestUploads"
}
},
"default": {
"description": "*** Error Responses: ***\n\n * 400 LedgerInvalidDigestStorageTargetUpdateRequest - The database ledger digest storage upload request does not exist or has no properties object.\n\n * 400 InvalidDigestStorageEndpoint - The specified digestStorageEndpoint is invalid. It must be an Azure blob storage endpoint.\n\n * 400 MalformedDigestStorageEndpoint - The specified digest storage endpoint is a malformed URI.\n\n * 400 InvalidLedgerDigestUploadsName - The ledger digest upload name is not supported. Please use the key name “current”.\n\n * 400 NoServerIdentity - No identity is configured for specified server. For information on how to configure an identity for the server see https://go.microsoft.com/fwlink/?linkid=2156804\n\n * 400 InsufficientStorageAccountPermissions - Read or write operations are not allowed on the storage account {0}.\n\n * 400 StorageAccountIsDisabled - The storage account {0} is disabled.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered. The error message from Active Directory Authentication library (ADAL) is {0}.\n\n * 400 SubscriptionDoesNotHaveServer - Subscription {0} does not contain server {1}.\n\n * 400 InvalidStorageAccountName - The specified storage account is not valid or does not exist.\n\n * 404 SourceDatabaseNotFound - Specified database does not exist.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found"
},
"202": {
"description": "Disabling the ledger digest upload is in progress."
}
},
"x-ms-examples": {
"Disables uploading ledger digests for a database": {
"$ref": "./examples/LedgerDigestUploadsDisable.json"
}
}
}
}
},
"definitions": {
"LedgerDigestUploadsProperties": {
"description": "The properties of a database ledger digest upload settings.",
"type": "object",
"properties": {
"digestStorageEndpoint": {
"description": "The digest storage endpoint, which must be either an Azure blob storage endpoint or an URI for Azure Confidential Ledger.",
"type": "string"
},
"state": {
"description": "Specifies the state of ledger digest upload.",
"enum": [
"Enabled",
"Disabled"
],
"type": "string",
"readOnly": true,
"x-ms-enum": {
"name": "LedgerDigestUploadsState",
"modelAsString": false
}
}
}
},
"LedgerDigestUploads": {
"description": "Azure SQL Database ledger digest upload settings.",
"type": "object",
"allOf": [
{
"$ref": "../../../common/v1/types.json#/definitions/ProxyResource"
}
],
"properties": {
"properties": {
"$ref": "#/definitions/LedgerDigestUploadsProperties",
"description": "Resource properties.",
"x-ms-client-flatten": true
}
}
},
"LedgerDigestUploadsListResult": {
"description": "A list of ledger digest upload settings.",
"type": "object",
"properties": {
"value": {
"description": "Array of results.",
"type": "array",
"items": {
"$ref": "#/definitions/LedgerDigestUploads"
},
"readOnly": true
},
"nextLink": {
"description": "Link to retrieve next page of results.",
"type": "string",
"readOnly": true
}
}
}
},
"parameters": {
"ServerNameParameter": {
"name": "serverName",
"in": "path",
"description": "The name of the server.",
"required": true,
"type": "string",
"x-ms-parameter-location": "method"
},
"DatabaseNameParameter": {
"name": "databaseName",
"in": "path",
"description": "The name of the database.",
"required": true,
"type": "string",
"x-ms-parameter-location": "method"
}
},
"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"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"resourceGroupName": "ledgertestrg",
"serverName": "ledgertestserver",
"databaseName": "testdb",
"ledgerDigestUploads": "current",
"api-version": "2021-02-01-preview"
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/ledgertestrg/providers/Microsoft.Sql/servers/ledgertestserver/databases/testdb/ledgerDigestUpload/current/disable",
"name": "current",
"type": "Microsoft.Sql/servers/databases/ledgerDigestUploads",
"properties": {
"state": "Disabled"
}
}
},
"202": {
"headers": {
"Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/ledgertestrg/providers/Microsoft.Sql/locations/eastus/ledgerDigestUploadOperationResults/11111111-1111-1111-1111-111111111111"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"resourceGroupName": "ledgertestrg",
"serverName": "ledgertestserver",
"databaseName": "testdb",
"ledgerDigestUploads": "current",
"api-version": "2021-02-01-preview",
"parameters": {
"properties": {
"digestStorageEndpoint": "https://MyAccount.blob.core.windows.net"
}
}
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/ledgertestrg/providers/Microsoft.Sql/servers/ledgertestserver/databases/testdb/ledgerDigestUpload/current",
"name": "current",
"type": "Microsoft.Sql/servers/databases/ledgerDigestUploads",
"properties": {
"digestStorageEndpoint": "https://mystorage.blob.core.windows.net",
"state": "Enabled"
}
}
},
"202": {
"headers": {
"Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/ledgertestrg/providers/Microsoft.Sql/locations/eastus/ledgerDigestUploadOperationResults/11111111-1111-1111-1111-111111111111"
}
}
}
}
Loading