question

RaviTejaManchikanti-5724 avatar image
RaviTejaManchikanti-5724 asked ·

Cant we use Key Valut URI from an API to create cosmos DB Account ?

When I invoke the api with the payload containing keyvaulturi parameter I get the status failed.

Failed to refresh the collection list. Please try again later.

Can any one help please

azure-cosmos-db
3 comments
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Are you using a Customer-managed key to create the Cosmos Account?
Please confirm the REST API version you are using so that we can verify this at our end.

0 Votes 0 · ·

@RaviTejaManchikanti-5724 Just checking in to see if the answer(s) helped.

If you found a response helpful, please “Accept Answer” and Up-Vote for the same which might be beneficial to other community members reading this thread.

0 Votes 0 · ·
MarkBrownMSFT avatar image
MarkBrownMSFT answered ·

There is a bug in those docs that incorrectly states to use that api version.

Change your api version to 2020-04-01 and it will work.

Thanks for reporting the issue with the docs. Will get that corrected.

1 comment Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you very much. I guess there are lot of changes with the input names as well. We are purely depending on that document. Is it possible to provide the updated document ?

0 Votes 0 · ·
RaviTejaManchikanti-5724 avatar image
RaviTejaManchikanti-5724 answered ·

When I use with the new Api-version for the below payload

{
"kind": "GlobalDocumentDB",
"location": "centralus",
"tags": {
"dept": "finance"
},
"properties": {
"isVirtualNetworkFilterEnabled": true,
"databaseAccountOfferType": "Standard",
"ipRules": "10.0.0.0,20.0.0.0",
"capabilities": [],
"virtualNetworkRules": [{
"id": "/subscriptions/<sub_id>/resourceGroups/<resource>/providers/Microsoft.Network/virtualNetworks/<network/subnets/subnettwo",
"ignoreMissingVNetServiceEndpoint": false
}],
"locations": [{
"failoverPriority": "0",
"locationName": "centralus"
}, {
"failoverPriority": "1",
"locationName": "eastus"
}],
"keyVaultKeyUri": "https://<name>.vault.azure.net/keys/my-cosmos-db-key/";
}
}


Im getting Below Error

"message": "Unable to parse request payload. \r\nActivityId: a3924c98-5a26-4232-9c25-bca8754b12ce, Microsoft.Azure.Documents.Common/2.11.0"

1 comment Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Can you remove the semi-colon in keyVaultUri?

0 Votes 0 · ·