-
Notifications
You must be signed in to change notification settings - Fork 504
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
Partition key validation on CreateContainerIfNotExistsAsync and code documentation update #572
Partition key validation on CreateContainerIfNotExistsAsync and code documentation update #572
Conversation
/// <para>Check if a database exists, and if it doesn't, create it. | ||
/// Only the database id is used to verify if there is an existing database. Other database properties such as throughput are not validated and can be different then the passed properties.</para> | ||
/// | ||
/// Status code 201: New database is created. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// <returns>
/// A <see cref="Task"/> containing a <see cref="DatabaseResponse"/> which wraps a <see cref="DatabaseProperties"/> containing the read resource record.
/// </returns>
/// <exception cref="CosmosException">This exception can encapsulate many different types of errors. To determine the specific error always look at the StatusCode property. Some common codes you may get when creating a Document are:
/// <list>
/// <listheader>
/// <term>StatusCode</term><description>Reason for exception</description>
/// </listheader>
/// <item>
/// <term>404</term><description>NotFound - This means the resource you tried to read did not exist.</description>
/// </item>
/// <item>
/// <term>429</term><description>TooManyRequests - This means you have exceeded the number of request units per second.</description>
/// </item>
/// </list>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
StatusCode representation consistency with other places
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
404 is not applicable in case of createifnotexist
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed a new iteration using the list format for the status codes.
…teApiDocumentUpdate
…ub.com/Azure/azure-cosmos-dotnet-v3 into users/nakumars/createApiDocumentUpdate
This PR will add the code for comparing partition key definition retrieved from server on CreateContainerIfNotExistsAsync api with the one provided by user and throw exception if they are not equal.
Also updating code documentation for CreateIfNotExistsAsync both for container and database.
Closing issues
closes #549