-
Notifications
You must be signed in to change notification settings - Fork 514
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle all BYOK errors from Cosmos DB (#1014)
* Handle all BYOK errors from Cosmos DB * Addressed PR comments * Moved CustomerManagedKeyException into Microsoft.Health.Fhir.CosmosDb * Revert "Moved CustomerManagedKeyException into Microsoft.Health.Fhir.CosmosDb" This reverts commit 0122a1e. * Address PR comments * Reverting code to commit #2 of this branch (792fcd6), and also resolve a couple PR comments * Remove circular reference by moving KnownCosmosDbCmkSubStatusValue into Core. * Fix build error * - per offline feedback, move the code that determines the CMK error message from Core and into CosmosDb. This removes any Cosmos-related knownledge from Core - Cosmos DB has published documentation on BYOK substatus codes: https://docs.microsoft.com/en-us/rest/api/cosmos-db/http-status-codes-for-cosmosdb. Updating Resources to better aligned with the Cosmos wording. * Fix spacing changes accidentally included in previous commit. * CMK exception should call base ctor
- Loading branch information
Showing
11 changed files
with
229 additions
and
39 deletions.
There are no files selected for viewing
12 changes: 0 additions & 12 deletions
12
src/Microsoft.Health.CosmosDb/Features/Storage/CosmosDbSubStatusValues.cs
This file was deleted.
Oops, something went wrong.
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
25 changes: 25 additions & 0 deletions
25
src/Microsoft.Health.Fhir.CosmosDb/Features/Storage/KnownCosmosDbCmkSubStatusValue.cs
This file contains 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,25 @@ | ||
// ------------------------------------------------------------------------------------------------- | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. | ||
// ------------------------------------------------------------------------------------------------- | ||
|
||
namespace Microsoft.Health.Fhir.CosmosDb.Features.Storage | ||
{ | ||
/// <summary> | ||
/// Cosmos DB customer-managed key (CMK) sub status values | ||
/// </summary> | ||
public enum KnownCosmosDbCmkSubStatusValue | ||
{ | ||
// Customer-Managed Key (CMK) values | ||
AadClientCredentialsGrantFailure = 4000, | ||
AadServiceUnavailable = 4001, | ||
KeyVaultAuthenticationFailure = 4002, | ||
KeyVaultKeyNotFound = 4003, | ||
KeyVaultServiceUnavailable = 4004, | ||
KeyVaultWrapUnwrapFailure = 4005, | ||
InvalidKeyVaultKeyUri = 4006, | ||
InvalidInputBytes = 4007, | ||
KeyVaultInternalServerError = 4008, | ||
KeyVaultDnsNotResolved = 4009, | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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