Skip to content

Commit 3194301

Browse files
Add API action to refresh external governance status. (#21946)
* add a field to create update api getter * add newlines to eof * Add newline to eof * fix LRO issue * change field from boolean to enum * fix LRO for serverDelete * fix lro and prettier issues * fix syntax * fix LRO in other example files * update network isolation files * add refresh external gov api * fix swagger errors * remove changes from readme * address code review comments * fix syntax error * update LRO tag
1 parent edf870e commit 3194301

File tree

3 files changed

+130
-2
lines changed

3 files changed

+130
-2
lines changed

specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/Servers.json

Lines changed: 100 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@
393393
}
394394
},
395395
"default": {
396-
"description": "*** Error Responses: ***\n\n * 400 MissingImportExportInputParameters - Missing ImportExport input parameters.\n\n * 400 InvalidImportExportInputParameter - The import/export request failed due to an invalid input parameter.\n\n * 400 PolybaseImportAuthenticationTypeNotSupported - Authentication type parameter is not support for PolybaseImport operation.\n\n * 400 DatabaseExtensionsInvalidOperationMode - Invalid operationMode parameter for database extension.\n\n * 400 DatabaseExtensionsInvalidStorageKeyType - The storage key type must by 'StorageAccessKey'.\n\n * 400 DatabaseExtensionsMissingStorageUri - Storage URI cannot be empty.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidTierSkuCombination - The specified tier does not support the specified sku.\n\n * 400 InvalidImportExportOperationResourceLocks - The Import/Export request is invalid due to locks on the Private Link resources.\n\n * 400 DatabaseInvalidSkuPropertyCombination - The properties of the requested sku are inconsistent. Please check that a valid combination is specified. See https://docs.microsoft.com/en-us/rest/api/sql/capabilities/listbylocation#serviceobjectivecapability for more details.\n\n * 400 InvalidMaxSizeTierCombination - The specified tier does not support the specified database max size.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 InvalidImportExportParameter - The Import/Export request failed due to an invalid input parameter.\n\n * 400 InvalidTier - The user specified an invalid tier.\n\n * 400 ImportExportJobError - The ImportExport operation has failed.\n\n * 400 InvalidOperationType - Provide a valid operation type.\n\n * 400 BlockedByOutboundFirewall - The outbound firewall rules blocked the request.\n\n * 404 ResourceNotFound - Invalid request specifying a non-existent resource.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ImportExportOperationIdNotFound - The operation Id for import or export cannot be found.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ImportExportOperationInProgress - There is an import or export operation in progress on the database.\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 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources."
396+
"description": "*** Error Responses: ***\n\n * 400 MissingImportExportInputParameters - Missing ImportExport input parameters.\n\n * 400 InvalidImportExportInputParameter - The import/export request failed due to an invalid input parameter.\n\n * 400 PolybaseImportAuthenticationTypeNotSupported - Authentication type parameter is not support for PolybaseImport operation.\n\n * 400 DatabaseExtensionsInvalidOperationMode - Invalid operationMode parameter for database extension.\n\n * 400 DatabaseExtensionsInvalidStorageKeyType - The storage key type must by 'StorageAccessKey'.\n\n * 400 DatabaseExtensionsMissingStorageUri - Storage URI cannot be empty.\n\n * 400 InvalidSqlAuthType - ImportExport operation failed because the sql authentication type is invalid\n\n * 400 BlobAlreadyExist - ImportExport operation failed because the storage blob is already exists\n\n * 400 InvalidImportExportOperationResourceLocks - The Import/Export request is invalid due to locks on the Private Link resources.\n\n * 400 DatabaseInvalidSkuPropertyCombination - The properties of the requested sku are inconsistent. Please check that a valid combination is specified. See https://docs.microsoft.com/en-us/rest/api/sql/capabilities/listbylocation#serviceobjectivecapability for more details.\n\n * 400 ImportExportJobError - The ImportExport operation has failed.\n\n * 400 BlockedByOutboundFirewall - The outbound firewall rules blocked the request.\n\n * 400 InvalidOperationType - Provide a valid operation type.\n\n * 400 InvalidMaxSizeTierCombination - The specified tier does not support the specified database max size.\n\n * 400 InvalidTier - The user specified an invalid tier.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidImportExportParameter - The Import/Export request failed due to an invalid input parameter.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidTierSkuCombination - The specified tier does not support the specified sku.\n\n * 400 InvalidImportExportStorageCredentials - Import/Export operation failed due to invalid storage credentials\n\n * 400 InvalidImportExportStorageAuthType - Import/Export operation failed due to invalid storage auth type\n\n * 400 InvalidImportExportStorageKeyFormat - Import/Export operation failed due to invalid storage key format\n\n * 400 LongImportExportStorageUri - Import/Export operation failed due to long storage URI\n\n * 400 LargeExportDatabaseSize - Export operation failed because database is larger than max supported size\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 UnSupportedImportExportEdition - ImportExport operation failed because it is targeting a invalid edition\n\n * 400 InvalidImportExportStorageURI - ImportExport operation failed because storage URI is invalid\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - Invalid request specifying a non-existent resource.\n\n * 404 ImportExportOperationIdNotFound - The operation Id for import or export cannot be found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ImportExportOperationInProgress - There is an import or export operation in progress on the database.\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 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources."
397397
},
398398
"202": {
399399
"description": "Importing the database is in progress."
@@ -409,6 +409,52 @@
409409
}
410410
}
411411
}
412+
},
413+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/refreshExternalGovernanceStatus": {
414+
"post": {
415+
"tags": [
416+
"Servers"
417+
],
418+
"description": "Refresh external governance enablement status.",
419+
"operationId": "Servers_RefreshStatus",
420+
"parameters": [
421+
{
422+
"$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter"
423+
},
424+
{
425+
"$ref": "#/parameters/ServerNameParameter"
426+
},
427+
{
428+
"$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter"
429+
},
430+
{
431+
"$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter"
432+
}
433+
],
434+
"responses": {
435+
"200": {
436+
"description": "Successfully refreshed external governance enablement status.",
437+
"schema": {
438+
"$ref": "#/definitions/RefreshExternalGovernanceStatusOperationResult"
439+
}
440+
},
441+
"default": {
442+
"description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\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\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\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 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources."
443+
},
444+
"202": {
445+
"description": "Refreshing external governance enablement status."
446+
}
447+
},
448+
"x-ms-long-running-operation": true,
449+
"x-ms-long-running-operation-options": {
450+
"final-state-via": "location"
451+
},
452+
"x-ms-examples": {
453+
"Refresh external governance enablement status.": {
454+
"$ref": "./examples/RefreshExternalGovernanceStatus.json"
455+
}
456+
}
457+
}
412458
}
413459
},
414460
"definitions": {
@@ -772,6 +818,59 @@
772818
}
773819
}
774820
},
821+
"RefreshExternalGovernanceStatusOperationResult": {
822+
"description": "An RefreshExternalGovernanceStatus operation result resource.",
823+
"type": "object",
824+
"allOf": [
825+
{
826+
"$ref": "../../../common/v1/types.json#/definitions/ProxyResource"
827+
}
828+
],
829+
"properties": {
830+
"properties": {
831+
"$ref": "#/definitions/RefreshExternalGovernanceStatusOperationResultProperties",
832+
"description": "Resource properties.",
833+
"x-ms-client-flatten": true
834+
}
835+
}
836+
},
837+
"RefreshExternalGovernanceStatusOperationResultProperties": {
838+
"description": "Contains the operation result properties for refresh external governance status operation.",
839+
"type": "object",
840+
"properties": {
841+
"requestId": {
842+
"format": "uuid",
843+
"description": "Request Id.",
844+
"type": "string",
845+
"readOnly": true
846+
},
847+
"requestType": {
848+
"description": "Request type.",
849+
"type": "string",
850+
"readOnly": true
851+
},
852+
"queuedTime": {
853+
"description": "Queued time.",
854+
"type": "string",
855+
"readOnly": true
856+
},
857+
"serverName": {
858+
"description": "Server name.",
859+
"type": "string",
860+
"readOnly": true
861+
},
862+
"status": {
863+
"description": "Operation status.",
864+
"type": "string",
865+
"readOnly": true
866+
},
867+
"errorMessage": {
868+
"description": "Error message.",
869+
"type": "string",
870+
"readOnly": true
871+
}
872+
}
873+
},
775874
"Server": {
776875
"description": "An Azure SQL Database server.",
777876
"required": [
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "00000000-1111-2222-3333-444444444444",
4+
"resourceGroupName": "sqlcrudtest-7398",
5+
"serverName": "sqlcrudtest-4645",
6+
"api-version": "2022-08-01-preview"
7+
},
8+
"responses": {
9+
"200": {
10+
"body": {
11+
"properties": {
12+
"requestId": "00000000-0000-0000-0000-000000000000",
13+
"requestType": "UpdatePurviewMetadata",
14+
"queuedTime": "2/12/2022 8:33:27 PM",
15+
"serverName": "testsvr.database.windows.net",
16+
"status": "Completed"
17+
},
18+
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myResourceGroup/providers/Microsoft.Sql/locations/japaneast/refreshExternalGovernanceStatusOperationResults/9d9a794a-5cec-4f23-af70-d29511b522a4",
19+
"name": "9d9a794a-5cec-4f23-af70-d29511b522a4",
20+
"type": "Microsoft.Sql/locations/refreshExternalGovernanceStatusOperationResults"
21+
}
22+
},
23+
"202": {
24+
"headers": {
25+
"Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myResourceGroup/providers/Microsoft.Sql/locations/japaneast/refreshExternalGovernanceStatusOperationResults/00000000-0000-0000-0000-000000000000?api-version=2022-08-01"
26+
}
27+
}
28+
}
29+
}

specification/sql/resource-manager/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,6 @@ input-file:
805805
- ./Microsoft.Sql/preview/2021-02-01-preview/DatabaseUsages.json
806806
- ./Microsoft.Sql/preview/2021-02-01-preview/LedgerDigestUploads.json
807807
- ./Microsoft.Sql/preview/2021-02-01-preview/OutboundFirewallRules.json
808-
- ./Microsoft.Sql/preview/2021-02-01-preview/Servers.json
809808
- ./Microsoft.Sql/preview/2021-02-01-preview/Usages.json
810809
- ./Microsoft.Sql/preview/2021-05-01-preview/LongTermRetentionBackups.json
811810
- ./Microsoft.Sql/preview/2021-05-01-preview/LongTermRetentionManagedInstanceBackups.json
@@ -850,6 +849,7 @@ input-file:
850849
- ./Microsoft.Sql/preview/2022-08-01-preview/DatabaseEncryptionProtectorRevalidate.json
851850
- ./Microsoft.Sql/preview/2022-08-01-preview/DatabaseEncryptionProtectorRevert.json
852851
- ./Microsoft.Sql/preview/2022-08-01-preview/ManagedLedgerDigestUploads.json
852+
- ./Microsoft.Sql/preview/2022-08-01-preview/Servers.json
853853
- ./Microsoft.Sql/preview/2022-08-01-preview/DatabaseEncryptionProtectorRevalidate.json
854854
- ./Microsoft.Sql/preview/2022-08-01-preview/DatabaseEncryptionProtectorRevert.json
855855
- ./Microsoft.Sql/preview/2022-08-01-preview/StartStopManagedInstanceSchedules.json

0 commit comments

Comments
 (0)