-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Swagger Documentation For Ledger Digest Upload #13871
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
Merged
akning-ms
merged 9 commits into
Azure:dev-sql-Microsoft.Sql-2021-02-01-preview
from
rewongmicrosoft:rewongledger
Apr 25, 2021
Merged
Changes from 6 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
2d0b5dc
adding ledger api
rewongmicrosoft f6e11e0
Fixes from validation
rewongmicrosoft f79a105
removing required endpoint parameter, adding ledgerName (current) to id
rewongmicrosoft 73c969b
removing 201 response from resource, renaming ledgerName
rewongmicrosoft 6a4fb6e
adding location to 202 results
rewongmicrosoft e21df11
fixing 202 response location
rewongmicrosoft e1e5f7b
renaming files
rewongmicrosoft 90f3104
updating files with new controller name + correct entity name
rewongmicrosoft a07988b
fixing readme
rewongmicrosoft File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
331 changes: 331 additions & 0 deletions
331
...ion/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/LedgerDigestUpload.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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}/ledgerDigestUpload/{ledgerName}": { | ||
|
rewongmicrosoft marked this conversation as resolved.
Outdated
|
||
| "get": { | ||
|
rewongmicrosoft marked this conversation as resolved.
|
||
| "tags": [ | ||
| "LedgerDigestUpload" | ||
| ], | ||
| "description": "Gets the current ledger digest upload configuration for a database.", | ||
| "operationId": "LedgerDigestUpload_Get", | ||
| "parameters": [ | ||
| { | ||
| "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/ServerNameParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/DatabaseNameParameter" | ||
| }, | ||
| { | ||
| "name": "ledgerName", | ||
| "in": "path", | ||
| "required": true, | ||
| "type": "string", | ||
| "enum": [ | ||
| "current" | ||
| ], | ||
| "x-ms-enum": { | ||
| "name": "LedgerDigestUploadName", | ||
| "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/LedgerDigestUpload" | ||
| } | ||
| }, | ||
| "default": { | ||
|
rewongmicrosoft marked this conversation as resolved.
|
||
| "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 InvalidLedgerDigestUploadName - 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/LedgerDigestUploadGet.json" | ||
| } | ||
| } | ||
| }, | ||
| "put": { | ||
| "tags": [ | ||
| "LedgerDigestUpload" | ||
| ], | ||
| "description": "Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance.", | ||
| "operationId": "LedgerDigestUpload_CreateOrUpdate", | ||
| "parameters": [ | ||
| { | ||
| "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/ServerNameParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/DatabaseNameParameter" | ||
| }, | ||
| { | ||
| "name": "ledgerName", | ||
| "in": "path", | ||
| "required": true, | ||
| "type": "string", | ||
| "enum": [ | ||
| "current" | ||
| ], | ||
| "x-ms-enum": { | ||
| "name": "LedgerDigestUploadName", | ||
| "modelAsString": true | ||
| } | ||
| }, | ||
| { | ||
| "name": "parameters", | ||
| "in": "body", | ||
| "required": true, | ||
| "schema": { | ||
| "$ref": "#/definitions/LedgerDigestUpload" | ||
| } | ||
| }, | ||
| { | ||
| "$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/LedgerDigestUpload" | ||
| } | ||
| }, | ||
| "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 InvalidLedgerDigestUploadName - 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/LedgerDigestUploadEnable.json" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/ledgerDigestUpload": { | ||
| "get": { | ||
| "tags": [ | ||
| "LedgerDigestUpload" | ||
| ], | ||
| "description": "Gets all ledger digest upload settings on a database.", | ||
| "operationId": "LedgerDigestUpload_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/LedgerDigestUploadListResult" | ||
| } | ||
| }, | ||
| "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 InvalidLedgerDigestUploadName - 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/LedgerDigestUploadList.json" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/ledgerDigestUpload/{ledgerName}/disable": { | ||
| "post": { | ||
| "tags": [ | ||
| "LedgerDigestUpload" | ||
| ], | ||
| "description": "Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance.", | ||
| "operationId": "LedgerDigestUpload_Disable", | ||
| "parameters": [ | ||
| { | ||
| "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/ServerNameParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/DatabaseNameParameter" | ||
| }, | ||
| { | ||
| "name": "ledgerName", | ||
| "in": "path", | ||
| "required": true, | ||
| "type": "string", | ||
| "enum": [ | ||
| "current" | ||
| ], | ||
| "x-ms-enum": { | ||
| "name": "LedgerDigestUploadName", | ||
| "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/LedgerDigestUpload" | ||
| } | ||
| }, | ||
| "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 InvalidLedgerDigestUploadName - 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/LedgerDigestUploadDisable.json" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "definitions": { | ||
| "LedgerDigestUploadProperties": { | ||
| "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, | ||
|
rewongmicrosoft marked this conversation as resolved.
|
||
| "x-ms-enum": { | ||
| "name": "LedgerDigestUploadState", | ||
| "modelAsString": false | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "LedgerDigestUpload": { | ||
| "description": "Azure SQL Database ledger digest upload settings.", | ||
| "type": "object", | ||
| "allOf": [ | ||
| { | ||
| "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" | ||
| } | ||
| ], | ||
| "properties": { | ||
| "properties": { | ||
| "$ref": "#/definitions/LedgerDigestUploadProperties", | ||
| "description": "Resource properties.", | ||
| "x-ms-client-flatten": true | ||
| } | ||
| } | ||
| }, | ||
| "LedgerDigestUploadListResult": { | ||
| "description": "A list of ledger digest upload settings.", | ||
| "type": "object", | ||
| "properties": { | ||
| "value": { | ||
| "description": "Array of results.", | ||
| "type": "array", | ||
| "items": { | ||
| "$ref": "#/definitions/LedgerDigestUpload" | ||
| }, | ||
| "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" | ||
| } | ||
| } | ||
| } | ||
| } | ||
27 changes: 27 additions & 0 deletions
27
...-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LedgerDigestUploadDisable.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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", | ||
| "ledgerDigestUpload": "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/ledgerDigestUpload", | ||
| "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" | ||
| } | ||
| } | ||
| } | ||
| } |
33 changes: 33 additions & 0 deletions
33
...e-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LedgerDigestUploadEnable.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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", | ||
| "ledgerDigestUpload": "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/ledgerDigestUpload", | ||
| "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" | ||
| } | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.