-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Fix Az.CosmosDB Syntax Errors #17547
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
Conversation
| ### Example 3 | ||
| ```powershell | ||
| New-AzCosmosDBAccount -ResourceGroupName resourceGroupName -Name restored-account-name -Location "West US" -FromPointInTimeBackup -SourceDatabaseAccountName source-database-account-name -RestoreTimesampInUtc 2020-07-20T17:19:25+0000 | ||
| New-AzCosmosDBAccount -ResourceGroupName resourceGroupName -Name restored-account-name -Location "West US" -FromPointInTimeBackup -Name source-database-account-name |
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.
Two "-Name" parameters.
| ### Example 2 | ||
| ```powershell | ||
| New-AzCosmosDBAccount -ResourceGroupName resourceGroupName -Name restored-account-name -Location "West US" -FromPointInTimeBackup -RestoreSourceId /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/restorableDatabaseAccounts/{instance-id} -RestoreTimesampInUtc 2020-07-20T17:19:25+0000 | ||
| New-AzCosmosDBAccount -ResourceGroupName resourceGroupName -Name restored-account-name -Location "West US" -FromPointInTimeBackup |
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.
Strange, it can associate parameter name "RestoreTimestampInUtc", but it do be not in the parameters 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.
As RestoreTimestampInUtc is bounded as dynamic parameter
| restoreContext = new RestoreRequestDynamicParameters(); |
azure-powershell/src/CosmosDB/CosmosDB/CosmosDBAccount/RestoreRequestDynamicParameters.cs
Lines 28 to 35 in 864448b
| [Parameter(Mandatory = false, HelpMessage = Constants.RestoreSourceIdHelpMessage)] | |
| public string SourceRestorableDatabaseAccountId { get; set; } | |
| [Parameter(Mandatory = false, HelpMessage = Constants.RestoreSourceDatabaseAccountNameHelpMessage)] | |
| public string SourceDatabaseAccountName { get; set; } | |
| [Parameter(Mandatory = true, HelpMessage = Constants.RestoreTimestampHelpMessage)] | |
| public DateTimeOffset RestoreTimestampInUtc { get; set; } |
cd94859 to
7d8a514
Compare
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
CI will be fixed by #17708 |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Description
Checklist
CONTRIBUTING.mdChangeLog.mdfile(s) has been updated:ChangeLog.mdfile can be found atsrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md## Upcoming Releaseheader -- no new version header should be added