From e85aa20ec13a15efbd5aa7e7eade7a39fd423d15 Mon Sep 17 00:00:00 2001
From: Sean McCullough <44180881+seanmcc-msft@users.noreply.github.com>
Date: Fri, 18 Jun 2021 11:54:47 -0500
Subject: [PATCH 001/120] Added App Context and Env Var switch for
BlobRequestConditions validation (#21967)
---
.../Azure.Storage.Blobs/src/Azure.Storage.Blobs.csproj | 1 +
sdk/storage/Azure.Storage.Blobs/src/BlobExtensions.cs | 7 +++++++
sdk/storage/Azure.Storage.Common/src/Shared/Constants.cs | 3 +++
3 files changed, 11 insertions(+)
diff --git a/sdk/storage/Azure.Storage.Blobs/src/Azure.Storage.Blobs.csproj b/sdk/storage/Azure.Storage.Blobs/src/Azure.Storage.Blobs.csproj
index e512ca8c25e8b..b3ac3a36dac01 100644
--- a/sdk/storage/Azure.Storage.Blobs/src/Azure.Storage.Blobs.csproj
+++ b/sdk/storage/Azure.Storage.Blobs/src/Azure.Storage.Blobs.csproj
@@ -25,6 +25,7 @@
+
diff --git a/sdk/storage/Azure.Storage.Blobs/src/BlobExtensions.cs b/sdk/storage/Azure.Storage.Blobs/src/BlobExtensions.cs
index 78c83f08647c1..f5849ee4255c5 100644
--- a/sdk/storage/Azure.Storage.Blobs/src/BlobExtensions.cs
+++ b/sdk/storage/Azure.Storage.Blobs/src/BlobExtensions.cs
@@ -1377,6 +1377,13 @@ internal static BlobLegalHoldResult ToBlobLegalHoldInfo(this ResponseWithHeaders
#region ValidateConditionsNotPresent
internal static void ValidateConditionsNotPresent(this BlobRequestConditions requestConditions, BlobRequestConditionProperty invalidConditions)
{
+ if (AppContextSwitchHelper.GetConfigValue(
+ Constants.DisableRequestConditionsValidationSwitchName,
+ Constants.DisableRequestConditionsValidationEnvVar))
+ {
+ return;
+ }
+
if (requestConditions == null)
{
return;
diff --git a/sdk/storage/Azure.Storage.Common/src/Shared/Constants.cs b/sdk/storage/Azure.Storage.Common/src/Shared/Constants.cs
index b7bef9738e6fe..a07f2760fb7c8 100644
--- a/sdk/storage/Azure.Storage.Common/src/Shared/Constants.cs
+++ b/sdk/storage/Azure.Storage.Common/src/Shared/Constants.cs
@@ -104,6 +104,9 @@ internal static class Constants
public const string Iso8601Format = "yyyy'-'MM'-'dd'T'HH':'mm':'ssZ";
+ public const string DisableRequestConditionsValidationSwitchName = "Azure.Storage.DisableRequestConditionsValidation";
+ public const string DisableRequestConditionsValidationEnvVar = "AZURE_STORAGE_DISABLE_REQUEST_CONDITIONS_VALIDATION";
+
///
/// Storage Connection String constant values.
///
From 2bad3ff3fdac096175a98817f9e400e70ca69b05 Mon Sep 17 00:00:00 2001
From: Chidozie Ononiwu <31145988+chidozieononiwu@users.noreply.github.com>
Date: Fri, 18 Jun 2021 10:10:54 -0700
Subject: [PATCH 002/120] update hardcoded master to default branch (#21946)
---
eng/pipelines/aggregate-reports.yml | 3 ++-
eng/pipelines/mgmt.yml | 1 +
eng/pipelines/templates/jobs/ci.yml | 3 ++-
eng/scripts/Update-Mgmt-Yml.ps1 | 1 +
4 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/eng/pipelines/aggregate-reports.yml b/eng/pipelines/aggregate-reports.yml
index 4746a51e1f035..943fe6353be97 100644
--- a/eng/pipelines/aggregate-reports.yml
+++ b/eng/pipelines/aggregate-reports.yml
@@ -3,7 +3,7 @@ resources:
- pipeline: net-core
project: internal
source: net - core
- branch: master
+ branch: main
tags:
- scheduled
@@ -13,6 +13,7 @@ pr:
branches:
include:
- master
+ - main
paths:
include:
- eng/pipelines/aggregate-reports.yml
diff --git a/eng/pipelines/mgmt.yml b/eng/pipelines/mgmt.yml
index 6419664f1345f..42628c1d2a993 100644
--- a/eng/pipelines/mgmt.yml
+++ b/eng/pipelines/mgmt.yml
@@ -3,6 +3,7 @@ pr:
branches:
include:
- master
+ - main
- '*-preview'
- 'feature/cplat*'
paths:
diff --git a/eng/pipelines/templates/jobs/ci.yml b/eng/pipelines/templates/jobs/ci.yml
index cf92d54bd4cc4..678e5851e6ceb 100644
--- a/eng/pipelines/templates/jobs/ci.yml
+++ b/eng/pipelines/templates/jobs/ci.yml
@@ -48,10 +48,11 @@ jobs:
PackageName: "Azure.Template"
ServiceDirectory: "template"
TestPipeline: ${{ parameters.TestPipeline }}
+ - template: /eng/common/pipelines/templates/steps/set-default-branch.yml
- pwsh: |
echo "##vso[build.addbuildtag]Scheduled"
displayName: "Tag scheduled builds"
- condition: and(eq(variables['Build.SourceBranchName'],'master'),eq(variables['Build.Reason'],'Schedule'))
+ condition: and(eq(variables['Build.SourceBranchName'],variables['DefaultBranch']),eq(variables['Build.Reason'],'Schedule'))
- template: /eng/common/pipelines/templates/steps/daily-dev-build-variable.yml
parameters:
ServiceDirectory: ${{ parameters.ServiceDirectory }}
diff --git a/eng/scripts/Update-Mgmt-Yml.ps1 b/eng/scripts/Update-Mgmt-Yml.ps1
index d6fcf3d81ed0d..e4503df207e56 100644
--- a/eng/scripts/Update-Mgmt-Yml.ps1
+++ b/eng/scripts/Update-Mgmt-Yml.ps1
@@ -57,6 +57,7 @@ foreach ($Item in $MgmtDirs) {
# Ci and Pr section
$PrIncludes.Add('master')
+$PrIncludes.Add('main')
$PrIncludes.Add('*-preview')
$PrBranches.Add("include", $PrIncludes)
$PrPaths.Add("include", $Includes)
From 6c2d70003ba77ef2b82d661cf70c641d1fa62338 Mon Sep 17 00:00:00 2001
From: Kamil Sobol <61715331+kasobol-msft@users.noreply.github.com>
Date: Fri, 18 Jun 2021 10:27:29 -0700
Subject: [PATCH 003/120] [Storage][Webjobs] Honor custom value of
QueueOptions.MaxPollingInterval in Development env. (#21969)
* if not on defaults, honor custom value.
* changelog.
---
.../tests/TestHelpers.cs | 14 +++++---
.../CHANGELOG.md | 1 +
.../StorageQueuesWebJobsBuilderExtensions.cs | 2 +-
...rageQueuesWebJobsBuilderExtensionsTests.cs | 32 +++++++++++++++++++
4 files changed, 44 insertions(+), 5 deletions(-)
diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/tests/TestHelpers.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/tests/TestHelpers.cs
index 03aa87472d957..aa323077d94b8 100644
--- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/tests/TestHelpers.cs
+++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/tests/TestHelpers.cs
@@ -29,9 +29,9 @@ public static class TestHelpers
/// Delegate used to configure the target extension.
/// Set of test configuration values to apply.
///
- public static TOptions GetConfiguredOptions(Action configure, Dictionary configValues) where TOptions : class, new()
+ public static TOptions GetConfiguredOptions(Action configure, Dictionary configValues, string env = default) where TOptions : class, new()
{
- IHost host = new HostBuilder()
+ IHostBuilder hostBuilder = new HostBuilder()
.ConfigureDefaultTestHost(b =>
{
configure(b);
@@ -39,8 +39,14 @@ public static class TestHelpers
.ConfigureAppConfiguration(cb =>
{
cb.AddInMemoryCollection(configValues);
- })
- .Build();
+ });
+
+ if (env != default)
+ {
+ hostBuilder.UseEnvironment(env);
+ }
+
+ IHost host = hostBuilder.Build();
TOptions options = host.Services.GetRequiredService>().Value;
return options;
diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/CHANGELOG.md b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/CHANGELOG.md
index 8ab3d3ec87b27..c20a695f4db82 100644
--- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/CHANGELOG.md
+++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/CHANGELOG.md
@@ -1,6 +1,7 @@
# Release History
## 5.0.0-beta.5 (Unreleased)
+- QueuesOptions.MaxPollingInterval other than default is now honored in "Development" environment.
## 5.0.0-beta.4 (2021-05-18)
diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/StorageQueuesWebJobsBuilderExtensions.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/StorageQueuesWebJobsBuilderExtensions.cs
index 2841be5345fc9..50af1d956e676 100644
--- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/StorageQueuesWebJobsBuilderExtensions.cs
+++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/StorageQueuesWebJobsBuilderExtensions.cs
@@ -55,7 +55,7 @@ public static IWebJobsBuilder AddAzureStorageQueues(this IWebJobsBuilder builder
builder.Services.AddOptions()
.Configure((options, env) =>
{
- if (env.IsDevelopment())
+ if (env.IsDevelopment() && options.MaxPollingInterval == QueuePollingIntervals.DefaultMaximum)
{
options.MaxPollingInterval = TimeSpan.FromSeconds(2);
}
diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/tests/StorageQueuesWebJobsBuilderExtensionsTests.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/tests/StorageQueuesWebJobsBuilderExtensionsTests.cs
index 1784a992a37e0..661f458193370 100644
--- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/tests/StorageQueuesWebJobsBuilderExtensionsTests.cs
+++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/tests/StorageQueuesWebJobsBuilderExtensionsTests.cs
@@ -61,5 +61,37 @@ public void ConfigureOptions_AppliesValuesCorrectly_Queues()
Assert.AreEqual(10, options.MaxDequeueCount);
Assert.AreEqual(TimeSpan.FromSeconds(15), options.VisibilityTimeout);
}
+
+ [Test]
+ public void ConfigureOptions_SetsPollingIntervalToTwoSecondsInDevelopment()
+ {
+ var values = new Dictionary
+ {
+ };
+
+ QueuesOptions options = TestHelpers.GetConfiguredOptions(b =>
+ {
+ b.AddAzureStorageQueues();
+ }, values, env: "Development");
+
+ Assert.AreEqual(TimeSpan.FromSeconds(2), options.MaxPollingInterval);
+ }
+
+ [Test]
+ public void ConfigureOptions_HonorsExplicitlySetPollingIntervalInDevelopment()
+ {
+ string extensionPath = "AzureWebJobs:Extensions:Queues";
+ var values = new Dictionary
+ {
+ { $"{extensionPath}:MaxPollingInterval", "00:00:42" },
+ };
+
+ QueuesOptions options = TestHelpers.GetConfiguredOptions(b =>
+ {
+ b.AddAzureStorageQueues();
+ }, values, env: "Development");
+
+ Assert.AreEqual(TimeSpan.FromSeconds(42), options.MaxPollingInterval);
+ }
}
}
From 60a3daf1583c1fd89907bf70d3c5eef3724d70d5 Mon Sep 17 00:00:00 2001
From: Caio Saldanha
Date: Fri, 18 Jun 2021 10:39:03 -0700
Subject: [PATCH 004/120] [MetricsAdvisor] Minor API changes (#21949)
---
.../Azure.AI.MetricsAdvisor/CHANGELOG.md | 2 ++
.../Azure.AI.MetricsAdvisor.netstandard2.0.cs | 7 ++---
.../src/MetricsAdvisorClient.cs | 22 ++++++++--------
.../src/Models/TimeSeries/MetricSeriesData.cs | 18 ++++++++++---
.../AnomalyDetectionLiveTests.cs | 2 +-
.../AnomalyDetectionTests.cs | 26 +++++++++----------
.../TimeSeriesLiveTests.cs | 7 +++--
.../Sample09_QueryTimeSeriesInformation.cs | 6 ++---
8 files changed, 52 insertions(+), 38 deletions(-)
diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/CHANGELOG.md b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/CHANGELOG.md
index 0e258c5c5de4f..b438f70799afb 100644
--- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/CHANGELOG.md
+++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/CHANGELOG.md
@@ -8,12 +8,14 @@
- `DataFeedMissingDataPointFillSettings` constructor now takes the required `fillType` parameter. For this reason, the property `FillType` is not nullable anymore.
- `EmailNotificationHook` constructor now takes the required `name` parameter.
- `WebNotificationHook` constructor now takes the required `name` and `endpoint` parameters.
+- In `MetricSeriesData`, removed the `Definition` property. Now, properties `MetricId` and `SeriesKey` can be accessed directly from `MetricSeriesData`.
- In `DataPointAnomaly`, renamed property `AnomalyDetectionConfigurationId` to `DetectionConfigurationId`.
- In `DataFeedMetric`, renamed constructor parameter `metricName` to `name` only.
- In `DataFeedDimension`, renamed constructor parameter `dimensionName` to `name` only.
- Moved `GetAlertConfigurationsOptions`, `GetDatasourceCredentialsOptions`, and `GetDetectionConfigurationsOptions` to the `Azure.AI.MetricsAdvisor.Administration` namespace.
- Moved `DatasourceCredential`, `DataFeedSource`, `NotificationHook`, and all of their concrete child types to the `Azure.AI.MetricsAdvisor.Administration` namespace.
- Moved `MetricFeedback` and all of its concrete child types to the `Azure.AI.MetricsAdvisor` namespace.
+- Changed order of parameters of `MetricsAdvisorClient.GetMetricEnrichedSeriesData`. Now, `detectionConfigurationId` appears first.
## 1.0.0-beta.4 (2021-06-07)
diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/api/Azure.AI.MetricsAdvisor.netstandard2.0.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/api/Azure.AI.MetricsAdvisor.netstandard2.0.cs
index 80cf98d8eb260..09fdebdf631e2 100644
--- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/api/Azure.AI.MetricsAdvisor.netstandard2.0.cs
+++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/api/Azure.AI.MetricsAdvisor.netstandard2.0.cs
@@ -203,8 +203,8 @@ public MetricsAdvisorClient(System.Uri endpoint, Azure.Core.TokenCredential cred
public virtual Azure.AsyncPageable GetIncidentsAsync(string alertConfigurationId, string alertId, Azure.AI.MetricsAdvisor.GetIncidentsForAlertOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Pageable GetMetricDimensionValues(string metricId, string dimensionName, Azure.AI.MetricsAdvisor.GetMetricDimensionValuesOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.AsyncPageable GetMetricDimensionValuesAsync(string metricId, string dimensionName, Azure.AI.MetricsAdvisor.GetMetricDimensionValuesOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.Pageable GetMetricEnrichedSeriesData(System.Collections.Generic.IEnumerable seriesKeys, string detectionConfigurationId, System.DateTimeOffset startTime, System.DateTimeOffset endTime, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.AsyncPageable GetMetricEnrichedSeriesDataAsync(System.Collections.Generic.IEnumerable seriesKeys, string detectionConfigurationId, System.DateTimeOffset startTime, System.DateTimeOffset endTime, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Pageable GetMetricEnrichedSeriesData(string detectionConfigurationId, System.Collections.Generic.IEnumerable seriesKeys, System.DateTimeOffset startTime, System.DateTimeOffset endTime, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.AsyncPageable GetMetricEnrichedSeriesDataAsync(string detectionConfigurationId, System.Collections.Generic.IEnumerable seriesKeys, System.DateTimeOffset startTime, System.DateTimeOffset endTime, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Pageable GetMetricEnrichmentStatuses(string metricId, Azure.AI.MetricsAdvisor.GetMetricEnrichmentStatusesOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.AsyncPageable GetMetricEnrichmentStatusesAsync(string metricId, Azure.AI.MetricsAdvisor.GetMetricEnrichmentStatusesOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Pageable GetMetricSeriesData(string metricId, Azure.AI.MetricsAdvisor.GetMetricSeriesDataOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
@@ -1169,8 +1169,9 @@ internal MetricEnrichedSeriesData() { }
public partial class MetricSeriesData
{
internal MetricSeriesData() { }
- public Azure.AI.MetricsAdvisor.Models.MetricSeriesDefinition Definition { get { throw null; } }
+ public string MetricId { get { throw null; } }
public System.Collections.Generic.IReadOnlyList MetricValues { get { throw null; } }
+ public Azure.AI.MetricsAdvisor.Models.DimensionKey SeriesKey { get { throw null; } }
public System.Collections.Generic.IReadOnlyList Timestamps { get { throw null; } }
}
public partial class MetricSeriesDefinition
diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/MetricsAdvisorClient.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/MetricsAdvisorClient.cs
index 7f70792cfb541..0fcdede9a4775 100644
--- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/MetricsAdvisorClient.cs
+++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/MetricsAdvisorClient.cs
@@ -1309,18 +1309,18 @@ Page NextPageFunc(string nextLink, int? pageSizeHint)
///
/// Query series enriched by anomaly detection.
///
- /// The detection series keys.
/// The unique identifier of the .
+ /// The detection series keys.
/// Filters the result. Only data points after this point in time, in UTC, will be returned.
/// Filters the result. Only data points after this point in time, in UTC, will be returned.
/// A controlling the request lifetime.
/// An containing the collection of s.
- /// or is null.
- /// or is empty; or is not a valid GUID.
- public virtual AsyncPageable GetMetricEnrichedSeriesDataAsync(IEnumerable seriesKeys, string detectionConfigurationId, DateTimeOffset startTime, DateTimeOffset endTime, CancellationToken cancellationToken = default)
+ /// or is null.
+ /// or is empty; or is not a valid GUID.
+ public virtual AsyncPageable GetMetricEnrichedSeriesDataAsync(string detectionConfigurationId, IEnumerable seriesKeys, DateTimeOffset startTime, DateTimeOffset endTime, CancellationToken cancellationToken = default)
{
- Argument.AssertNotNullOrEmpty(seriesKeys, nameof(seriesKeys)); // TODO: add validation for seriesKeys.Dimension?
Argument.AssertNotNullOrEmpty(detectionConfigurationId, nameof(detectionConfigurationId));
+ Argument.AssertNotNullOrEmpty(seriesKeys, nameof(seriesKeys)); // TODO: add validation for seriesKeys.Dimension?
Guid detectionConfigurationGuid = ClientCommon.ValidateGuid(detectionConfigurationId, nameof(detectionConfigurationId));
IEnumerable seriesIdentities = seriesKeys.Select(key => key.ConvertToSeriesIdentity());
@@ -1349,18 +1349,18 @@ async Task> FirstPageFunc(int? pageSizeHint)
///
/// Query series enriched by anomaly detection.
///
- /// The detection series keys.
/// The unique identifier of the .
+ /// The detection series keys.
/// Filters the result. Only data points after this point in time, in UTC, will be returned.
/// Filters the result. Only data points after this point in time, in UTC, will be returned.
/// A controlling the request lifetime.
- /// A containing the collection of s.
- /// or is null.
- /// or is empty; or is not a valid GUID.
- public virtual Pageable GetMetricEnrichedSeriesData(IEnumerable seriesKeys, string detectionConfigurationId, DateTimeOffset startTime, DateTimeOffset endTime, CancellationToken cancellationToken = default)
+ /// An containing the collection of s.
+ /// or is null.
+ /// or is empty; or is not a valid GUID.
+ public virtual Pageable GetMetricEnrichedSeriesData(string detectionConfigurationId, IEnumerable seriesKeys, DateTimeOffset startTime, DateTimeOffset endTime, CancellationToken cancellationToken = default)
{
- Argument.AssertNotNullOrEmpty(seriesKeys, nameof(seriesKeys)); // TODO: add validation for seriesKeys.Dimension?
Argument.AssertNotNullOrEmpty(detectionConfigurationId, nameof(detectionConfigurationId));
+ Argument.AssertNotNullOrEmpty(seriesKeys, nameof(seriesKeys)); // TODO: add validation for seriesKeys.Dimension?
Guid detectionConfigurationGuid = ClientCommon.ValidateGuid(detectionConfigurationId, nameof(detectionConfigurationId));
IEnumerable seriesIdentities = seriesKeys.Select(key => key.ConvertToSeriesIdentity());
diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/TimeSeries/MetricSeriesData.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/TimeSeries/MetricSeriesData.cs
index efe0d5c682bf8..4b830c7947a34 100644
--- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/TimeSeries/MetricSeriesData.cs
+++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/TimeSeries/MetricSeriesData.cs
@@ -16,10 +16,16 @@ namespace Azure.AI.MetricsAdvisor.Models
public partial class MetricSeriesData
{
///
- /// Uniquely defines a time series within a .
+ /// The unique identifier of the associated with this
+ /// time series.
///
- [CodeGenMember("Id")]
- public MetricSeriesDefinition Definition { get; }
+ public string MetricId => Definition.MetricId;
+
+ ///
+ /// The key that, within a metric, uniquely identifies a time series. Every dimension
+ /// contained in the associated has been assigned a value.
+ ///
+ public DimensionKey SeriesKey => Definition.SeriesKey;
///
/// The timestamps, in UTC, of the data points present in this time series.
@@ -32,5 +38,11 @@ public partial class MetricSeriesData
///
[CodeGenMember("ValueList")]
public IReadOnlyList MetricValues { get; }
+
+ ///
+ /// Uniquely defines a time series within a .
+ ///
+ [CodeGenMember("Id")]
+ internal MetricSeriesDefinition Definition { get; }
}
}
diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorClient/AnomalyDetectionLiveTests.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorClient/AnomalyDetectionLiveTests.cs
index b7f0f1f7ef9b3..a1be74c82d3a2 100644
--- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorClient/AnomalyDetectionLiveTests.cs
+++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorClient/AnomalyDetectionLiveTests.cs
@@ -365,7 +365,7 @@ public async Task GetMetricEnrichedSeriesData(bool useTokenCredential)
var seriesKeys = new List() { seriesKey1, seriesKey2 };
var returnedKeys = new List();
- await foreach (MetricEnrichedSeriesData seriesData in client.GetMetricEnrichedSeriesDataAsync(seriesKeys, DetectionConfigurationId, SamplingStartTime, SamplingEndTime))
+ await foreach (MetricEnrichedSeriesData seriesData in client.GetMetricEnrichedSeriesDataAsync(DetectionConfigurationId, seriesKeys, SamplingStartTime, SamplingEndTime))
{
Assert.That(seriesData, Is.Not.Null);
Assert.That(seriesData.SeriesKey, Is.Not.Null);
diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorClient/AnomalyDetectionTests.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorClient/AnomalyDetectionTests.cs
index 88471504ad8c9..9d532f79e3677 100644
--- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorClient/AnomalyDetectionTests.cs
+++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorClient/AnomalyDetectionTests.cs
@@ -200,17 +200,17 @@ public void GetMetricEnrichedSeriesDataValidatesArguments()
var emptyList = new List();
var seriesKeys = new List() { new DimensionKey() };
- Assert.That(() => client.GetMetricEnrichedSeriesDataAsync(null, FakeGuid, default, default), Throws.InstanceOf());
- Assert.That(() => client.GetMetricEnrichedSeriesDataAsync(emptyList, FakeGuid, default, default), Throws.InstanceOf());
- Assert.That(() => client.GetMetricEnrichedSeriesDataAsync(seriesKeys, null, default, default), Throws.InstanceOf());
- Assert.That(() => client.GetMetricEnrichedSeriesDataAsync(seriesKeys, "", default, default), Throws.InstanceOf());
- Assert.That(() => client.GetMetricEnrichedSeriesDataAsync(seriesKeys, "configId", default, default), Throws.InstanceOf().With.InnerException.TypeOf(typeof(FormatException)));
-
- Assert.That(() => client.GetMetricEnrichedSeriesData(null, FakeGuid, default, default), Throws.InstanceOf());
- Assert.That(() => client.GetMetricEnrichedSeriesData(emptyList, FakeGuid, default, default), Throws.InstanceOf());
- Assert.That(() => client.GetMetricEnrichedSeriesData(seriesKeys, null, default, default), Throws.InstanceOf());
- Assert.That(() => client.GetMetricEnrichedSeriesData(seriesKeys, "", default, default), Throws.InstanceOf());
- Assert.That(() => client.GetMetricEnrichedSeriesData(seriesKeys, "configId", default, default), Throws.InstanceOf().With.InnerException.TypeOf(typeof(FormatException)));
+ Assert.That(() => client.GetMetricEnrichedSeriesDataAsync(FakeGuid, null, default, default), Throws.InstanceOf());
+ Assert.That(() => client.GetMetricEnrichedSeriesDataAsync(FakeGuid, emptyList, default, default), Throws.InstanceOf());
+ Assert.That(() => client.GetMetricEnrichedSeriesDataAsync(null, seriesKeys, default, default), Throws.InstanceOf());
+ Assert.That(() => client.GetMetricEnrichedSeriesDataAsync("", seriesKeys, default, default), Throws.InstanceOf());
+ Assert.That(() => client.GetMetricEnrichedSeriesDataAsync("configId", seriesKeys, default, default), Throws.InstanceOf().With.InnerException.TypeOf(typeof(FormatException)));
+
+ Assert.That(() => client.GetMetricEnrichedSeriesData(FakeGuid, null, default, default), Throws.InstanceOf());
+ Assert.That(() => client.GetMetricEnrichedSeriesData(FakeGuid, emptyList, default, default), Throws.InstanceOf());
+ Assert.That(() => client.GetMetricEnrichedSeriesData(null, seriesKeys, default, default), Throws.InstanceOf());
+ Assert.That(() => client.GetMetricEnrichedSeriesData("", seriesKeys, default, default), Throws.InstanceOf());
+ Assert.That(() => client.GetMetricEnrichedSeriesData("configId", seriesKeys, default, default), Throws.InstanceOf().With.InnerException.TypeOf(typeof(FormatException)));
}
[Test]
@@ -224,10 +224,10 @@ public void GetMetricEnrichedSeriesDataRespectsTheCancellationToken()
using var cancellationSource = new CancellationTokenSource();
cancellationSource.Cancel();
- IAsyncEnumerator asyncEnumerator = client.GetMetricEnrichedSeriesDataAsync(seriesKeys, FakeGuid, default, default, cancellationSource.Token).GetAsyncEnumerator();
+ IAsyncEnumerator asyncEnumerator = client.GetMetricEnrichedSeriesDataAsync(FakeGuid, seriesKeys, default, default, cancellationSource.Token).GetAsyncEnumerator();
Assert.That(async () => await asyncEnumerator.MoveNextAsync(), Throws.InstanceOf());
- IEnumerator enumerator = client.GetMetricEnrichedSeriesData(seriesKeys, FakeGuid, default, default, cancellationSource.Token).GetEnumerator();
+ IEnumerator enumerator = client.GetMetricEnrichedSeriesData(FakeGuid, seriesKeys, default, default, cancellationSource.Token).GetEnumerator();
Assert.That(() => enumerator.MoveNext(), Throws.InstanceOf());
}
diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorClient/TimeSeriesLiveTests.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorClient/TimeSeriesLiveTests.cs
index 42c64b588d129..5066072921cfc 100644
--- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorClient/TimeSeriesLiveTests.cs
+++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorClient/TimeSeriesLiveTests.cs
@@ -160,12 +160,11 @@ public async Task GetMetricSeriesData(bool useTokenCredential)
await foreach (MetricSeriesData seriesData in client.GetMetricSeriesDataAsync(MetricId, options))
{
Assert.That(seriesData, Is.Not.Null);
- Assert.That(seriesData.Definition, Is.Not.Null);
- Assert.That(seriesData.Definition.SeriesKey, Is.Not.Null);
+ Assert.That(seriesData.SeriesKey, Is.Not.Null);
Assert.That(seriesData.Timestamps, Is.Not.Null);
Assert.That(seriesData.MetricValues, Is.Not.Null);
- Assert.That(seriesData.Definition.MetricId, Is.EqualTo(MetricId));
+ Assert.That(seriesData.MetricId, Is.EqualTo(MetricId));
Assert.That(seriesData.Timestamps.Count, Is.EqualTo(seriesData.MetricValues.Count));
@@ -174,7 +173,7 @@ public async Task GetMetricSeriesData(bool useTokenCredential)
Assert.That(timestamp, Is.InRange(SamplingStartTime, SamplingEndTime));
}
- returnedKeys.Add(seriesData.Definition.SeriesKey);
+ returnedKeys.Add(seriesData.SeriesKey);
}
Assert.That(returnedKeys.Count, Is.EqualTo(2));
diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/Samples/Sample09_QueryTimeSeriesInformation.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/Samples/Sample09_QueryTimeSeriesInformation.cs
index 8500a9c956bee..edc5e81e15611 100644
--- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/Samples/Sample09_QueryTimeSeriesInformation.cs
+++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/Samples/Sample09_QueryTimeSeriesInformation.cs
@@ -180,10 +180,10 @@ public async Task GetMetricSeriesDataAsync()
await foreach (MetricSeriesData seriesData in client.GetMetricSeriesDataAsync(metricId, options))
{
- Console.WriteLine($"Time series metric ID: {seriesData.Definition.MetricId}");
+ Console.WriteLine($"Time series metric ID: {seriesData.MetricId}");
Console.WriteLine("Time series key:");
- foreach (KeyValuePair keyValuePair in seriesData.Definition.SeriesKey.AsDictionary())
+ foreach (KeyValuePair keyValuePair in seriesData.SeriesKey.AsDictionary())
{
Console.WriteLine($" Dimension '{keyValuePair.Key}': {keyValuePair.Value}");
}
@@ -229,7 +229,7 @@ public async Task GetMetricEnrichedSeriesDataAsync()
var startTime = DateTimeOffset.Parse("2020-01-01T00:00:00Z");
var endTime = DateTimeOffset.UtcNow;
- await foreach (MetricEnrichedSeriesData seriesData in client.GetMetricEnrichedSeriesDataAsync(seriesKeys, detectionConfigurationId, startTime, endTime))
+ await foreach (MetricEnrichedSeriesData seriesData in client.GetMetricEnrichedSeriesDataAsync(detectionConfigurationId, seriesKeys, startTime, endTime))
{
Console.WriteLine("Time series key:");
From 6a5198bc6d982a9f6b29f4a26d443dcb68f174ef Mon Sep 17 00:00:00 2001
From: Heath Stewart
Date: Fri, 18 Jun 2021 10:50:10 -0700
Subject: [PATCH 005/120] Remove Microsoft.Azure.KeyVault.sln (#21896)
Since track 1 SDKs are deprecated, remove the solution to avoid having
to type the solution name when building from sdk/keyvault each time.
This shouldn't affect the build which enumerates projects within service
directories.
---
sdk/keyvault/Microsoft.Azure.KeyVault.sln | 76 -----------------------
1 file changed, 76 deletions(-)
delete mode 100644 sdk/keyvault/Microsoft.Azure.KeyVault.sln
diff --git a/sdk/keyvault/Microsoft.Azure.KeyVault.sln b/sdk/keyvault/Microsoft.Azure.KeyVault.sln
deleted file mode 100644
index 86360ca17cb20..0000000000000
--- a/sdk/keyvault/Microsoft.Azure.KeyVault.sln
+++ /dev/null
@@ -1,76 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26430.16
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.KeyVault", "Microsoft.Azure.KeyVault\src\Microsoft.Azure.KeyVault.csproj", "{F0FBD614-4B4B-445B-B562-235CDB3844B7}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.KeyVault.Tests", "Microsoft.Azure.KeyVault\tests\Microsoft.Azure.KeyVault.Tests.csproj", "{6F5823CD-D1D7-4DF4-BE61-F07FD8134400}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.KeyVault.Core", "Microsoft.Azure.KeyVault.Core\src\Microsoft.Azure.KeyVault.Core.csproj", "{BE53CF33-9A3D-4101-9DFD-62AC09CADADA}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.KeyVault.Cryptography", "Microsoft.Azure.KeyVault.Cryptography\src\Microsoft.Azure.KeyVault.Cryptography.csproj", "{9021F320-DE06-433B-ADBC-25A5BC0AA43B}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.KeyVault.Cryptography.Tests", "Microsoft.Azure.KeyVault.Cryptography\tests\Microsoft.Azure.KeyVault.Cryptography.Tests.csproj", "{E01674C0-B8D7-4598-971C-48B0180E273F}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.KeyVault.Extensions", "Microsoft.Azure.KeyVault.Extensions\src\Microsoft.Azure.KeyVault.Extensions.csproj", "{9021F320-DE06-433B-ADBC-25A5BC0AA43C}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.KeyVault.Extensions.Tests", "Microsoft.Azure.KeyVault.Extensions\tests\Microsoft.Azure.KeyVault.Extensions.Tests.csproj", "{E01674C0-B8D7-4598-971C-48B0180E274A}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.KeyVault.TestFramework", "Microsoft.Azure.KeyVault\tests\TestFramework\Microsoft.Azure.KeyVault.TestFramework.csproj", "{6F5823CD-D1D7-4DF4-BE61-F07FD8134433}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.KeyVault.WebKey", "Microsoft.Azure.KeyVault.WebKey\src\Microsoft.Azure.KeyVault.WebKey.csproj", "{643372AD-2DBC-4395-95B9-61183D3F2904}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.KeyVault.WebKey.Tests", "Microsoft.Azure.KeyVault.WebKey\tests\Microsoft.Azure.KeyVault.WebKey.Tests.csproj", "{6F5823CD-D1D7-4DF4-BE61-F07FD813440A}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {F0FBD614-4B4B-445B-B562-235CDB3844B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {F0FBD614-4B4B-445B-B562-235CDB3844B7}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {F0FBD614-4B4B-445B-B562-235CDB3844B7}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {F0FBD614-4B4B-445B-B562-235CDB3844B7}.Release|Any CPU.Build.0 = Release|Any CPU
- {6F5823CD-D1D7-4DF4-BE61-F07FD8134400}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {6F5823CD-D1D7-4DF4-BE61-F07FD8134400}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {6F5823CD-D1D7-4DF4-BE61-F07FD8134400}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {6F5823CD-D1D7-4DF4-BE61-F07FD8134400}.Release|Any CPU.Build.0 = Release|Any CPU
- {BE53CF33-9A3D-4101-9DFD-62AC09CADADA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {BE53CF33-9A3D-4101-9DFD-62AC09CADADA}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {BE53CF33-9A3D-4101-9DFD-62AC09CADADA}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {BE53CF33-9A3D-4101-9DFD-62AC09CADADA}.Release|Any CPU.Build.0 = Release|Any CPU
- {9021F320-DE06-433B-ADBC-25A5BC0AA43B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {9021F320-DE06-433B-ADBC-25A5BC0AA43B}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {9021F320-DE06-433B-ADBC-25A5BC0AA43B}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {9021F320-DE06-433B-ADBC-25A5BC0AA43B}.Release|Any CPU.Build.0 = Release|Any CPU
- {E01674C0-B8D7-4598-971C-48B0180E273F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {E01674C0-B8D7-4598-971C-48B0180E273F}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {E01674C0-B8D7-4598-971C-48B0180E273F}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {E01674C0-B8D7-4598-971C-48B0180E273F}.Release|Any CPU.Build.0 = Release|Any CPU
- {9021F320-DE06-433B-ADBC-25A5BC0AA43C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {9021F320-DE06-433B-ADBC-25A5BC0AA43C}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {9021F320-DE06-433B-ADBC-25A5BC0AA43C}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {9021F320-DE06-433B-ADBC-25A5BC0AA43C}.Release|Any CPU.Build.0 = Release|Any CPU
- {E01674C0-B8D7-4598-971C-48B0180E274A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {E01674C0-B8D7-4598-971C-48B0180E274A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {E01674C0-B8D7-4598-971C-48B0180E274A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {E01674C0-B8D7-4598-971C-48B0180E274A}.Release|Any CPU.Build.0 = Release|Any CPU
- {6F5823CD-D1D7-4DF4-BE61-F07FD8134433}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {6F5823CD-D1D7-4DF4-BE61-F07FD8134433}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {6F5823CD-D1D7-4DF4-BE61-F07FD8134433}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {6F5823CD-D1D7-4DF4-BE61-F07FD8134433}.Release|Any CPU.Build.0 = Release|Any CPU
- {643372AD-2DBC-4395-95B9-61183D3F2904}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {643372AD-2DBC-4395-95B9-61183D3F2904}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {643372AD-2DBC-4395-95B9-61183D3F2904}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {643372AD-2DBC-4395-95B9-61183D3F2904}.Release|Any CPU.Build.0 = Release|Any CPU
- {6F5823CD-D1D7-4DF4-BE61-F07FD813440A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {6F5823CD-D1D7-4DF4-BE61-F07FD813440A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {6F5823CD-D1D7-4DF4-BE61-F07FD813440A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {6F5823CD-D1D7-4DF4-BE61-F07FD813440A}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
From a140aaf186ab157a2133cbbf3e4eccb9407640b6 Mon Sep 17 00:00:00 2001
From: Scott Addie <10702007+scottaddie@users.noreply.github.com>
Date: Fri, 18 Jun 2021 15:09:45 -0500
Subject: [PATCH 006/120] fix typo in Monitor Query package description
(#21752)
---
sdk/monitor/Azure.Monitor.Query/src/Azure.Monitor.Query.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sdk/monitor/Azure.Monitor.Query/src/Azure.Monitor.Query.csproj b/sdk/monitor/Azure.Monitor.Query/src/Azure.Monitor.Query.csproj
index 856c49c228c48..5925eea8a79b6 100644
--- a/sdk/monitor/Azure.Monitor.Query/src/Azure.Monitor.Query.csproj
+++ b/sdk/monitor/Azure.Monitor.Query/src/Azure.Monitor.Query.csproj
@@ -1,6 +1,6 @@
- This library allows querying logs and metrics from the Azure Motnitor service.
+ This library allows querying logs and metrics from the Azure Monitor service.
Azure Monitor Query client library
1.0.0-beta.2
Azure Monitor Query
From e5eab14f2554617127da8f44bc952742e94373d1 Mon Sep 17 00:00:00 2001
From: Sean McCullough <44180881+seanmcc-msft@users.noreply.github.com>
Date: Fri, 18 Jun 2021 15:17:42 -0500
Subject: [PATCH 007/120] [Storage] AppendBlobClient request validation
(#21974)
---
.../src/AppendBlobClient.cs | 20 ++++
.../Azure.Storage.Blobs/src/BlobExtensions.cs | 64 +++++++++--
.../Internal/BlobRequestConditionProperty.cs | 5 +-
.../tests/AppendBlobClientTests.cs | 108 +++++++++++++++++-
...stConditions(%IfAppendPositionEqual%).json | 6 +
...ditions(%IfAppendPositionEqual%)Async.json | 6 +
...onditions(%IfMaxSizeLessThanOrEqual%).json | 6 +
...ions(%IfMaxSizeLessThanOrEqual%)Async.json | 6 +
...lidSourceRequestConditions(%LeaseId%).json | 6 +
...urceRequestConditions(%LeaseId%)Async.json | 6 +
...rceRequestConditions(%TagConditions%).json | 6 +
...questConditions(%TagConditions%)Async.json | 6 +
...stConditions(%IfAppendPositionEqual%).json | 6 +
...ditions(%IfAppendPositionEqual%)Async.json | 6 +
...onditions(%IfMaxSizeLessThanOrEqual%).json | 6 +
...ions(%IfMaxSizeLessThanOrEqual%)Async.json | 6 +
...onditions(%IfMaxSizeLessThanOrEqual%).json | 6 +
...ions(%IfMaxSizeLessThanOrEqual%)Async.json | 6 +
...lidRequestConditions(%TagConditions%).json | 6 +
...questConditions(%TagConditions%)Async.json | 6 +
20 files changed, 283 insertions(+), 10 deletions(-)
create mode 100644 sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/AppendBlockFromUriAsync_InvalidSourceRequestConditions(%IfAppendPositionEqual%).json
create mode 100644 sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/AppendBlockFromUriAsync_InvalidSourceRequestConditions(%IfAppendPositionEqual%)Async.json
create mode 100644 sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/AppendBlockFromUriAsync_InvalidSourceRequestConditions(%IfMaxSizeLessThanOrEqual%).json
create mode 100644 sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/AppendBlockFromUriAsync_InvalidSourceRequestConditions(%IfMaxSizeLessThanOrEqual%)Async.json
create mode 100644 sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/AppendBlockFromUriAsync_InvalidSourceRequestConditions(%LeaseId%).json
create mode 100644 sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/AppendBlockFromUriAsync_InvalidSourceRequestConditions(%LeaseId%)Async.json
create mode 100644 sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/AppendBlockFromUriAsync_InvalidSourceRequestConditions(%TagConditions%).json
create mode 100644 sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/AppendBlockFromUriAsync_InvalidSourceRequestConditions(%TagConditions%)Async.json
create mode 100644 sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/CreateAsync_InvalidRequestConditions(%IfAppendPositionEqual%).json
create mode 100644 sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/CreateAsync_InvalidRequestConditions(%IfAppendPositionEqual%)Async.json
create mode 100644 sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/CreateAsync_InvalidRequestConditions(%IfMaxSizeLessThanOrEqual%).json
create mode 100644 sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/CreateAsync_InvalidRequestConditions(%IfMaxSizeLessThanOrEqual%)Async.json
create mode 100644 sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/SealAsync_InvalidRequestConditions(%IfMaxSizeLessThanOrEqual%).json
create mode 100644 sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/SealAsync_InvalidRequestConditions(%IfMaxSizeLessThanOrEqual%)Async.json
create mode 100644 sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/SealAsync_InvalidRequestConditions(%TagConditions%).json
create mode 100644 sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/SealAsync_InvalidRequestConditions(%TagConditions%)Async.json
diff --git a/sdk/storage/Azure.Storage.Blobs/src/AppendBlobClient.cs b/sdk/storage/Azure.Storage.Blobs/src/AppendBlobClient.cs
index e2ab12a22f7c2..e4512245fdd21 100644
--- a/sdk/storage/Azure.Storage.Blobs/src/AppendBlobClient.cs
+++ b/sdk/storage/Azure.Storage.Blobs/src/AppendBlobClient.cs
@@ -866,6 +866,10 @@ private async Task> CreateInternal(
DiagnosticScope scope = ClientConfiguration.ClientDiagnostics.CreateScope($"{nameof(AppendBlobClient)}.{nameof(Create)}");
+ conditions.ValidateConditionsNotPresent(
+ BlobRequestConditionProperty.IfAppendPositionEqual
+ | BlobRequestConditionProperty.IfMaxSizeLessThanOrEqual);
+
try
{
scope.Start();
@@ -1127,6 +1131,9 @@ internal async Task> AppendBlockInternal(
DiagnosticScope scope = ClientConfiguration.ClientDiagnostics.CreateScope($"{nameof(AppendBlobClient)}.{nameof(AppendBlock)}");
+ // All AppendBlobRequestConditions are valid.
+ conditions.ValidateConditionsNotPresent(BlobRequestConditionProperty.None);
+
try
{
scope.Start();
@@ -1522,6 +1529,15 @@ private async Task> AppendBlockFromUriInternal(
DiagnosticScope scope = ClientConfiguration.ClientDiagnostics.CreateScope($"{nameof(AppendBlobClient)}.{nameof(AppendBlockFromUri)}");
+ // All destination AppendBlobRequestConditions are valid.
+ conditions.ValidateConditionsNotPresent(BlobRequestConditionProperty.None);
+
+ sourceConditions.ValidateConditionsNotPresent(
+ BlobRequestConditionProperty.LeaseId
+ | BlobRequestConditionProperty.TagConditions
+ | BlobRequestConditionProperty.IfAppendPositionEqual
+ | BlobRequestConditionProperty.IfMaxSizeLessThanOrEqual);
+
try
{
scope.Start();
@@ -1691,6 +1707,10 @@ private async Task> SealInternal(
{
DiagnosticScope scope = ClientConfiguration.ClientDiagnostics.CreateScope($"{nameof(AppendBlobClient)}.{nameof(Seal)}");
+ conditions.ValidateConditionsNotPresent(
+ BlobRequestConditionProperty.IfMaxSizeLessThanOrEqual
+ | BlobRequestConditionProperty.TagConditions);
+
try
{
scope.Start();
diff --git a/sdk/storage/Azure.Storage.Blobs/src/BlobExtensions.cs b/sdk/storage/Azure.Storage.Blobs/src/BlobExtensions.cs
index f5849ee4255c5..9f6d0ad097d81 100644
--- a/sdk/storage/Azure.Storage.Blobs/src/BlobExtensions.cs
+++ b/sdk/storage/Azure.Storage.Blobs/src/BlobExtensions.cs
@@ -1375,7 +1375,7 @@ internal static BlobLegalHoldResult ToBlobLegalHoldInfo(this ResponseWithHeaders
#endregion
#region ValidateConditionsNotPresent
- internal static void ValidateConditionsNotPresent(this BlobRequestConditions requestConditions, BlobRequestConditionProperty invalidConditions)
+ internal static void ValidateConditionsNotPresent(this BlobLeaseRequestConditions requestConditions, BlobRequestConditionProperty invalidConditions)
{
if (AppContextSwitchHelper.GetConfigValue(
Constants.DisableRequestConditionsValidationSwitchName,
@@ -1389,12 +1389,6 @@ internal static void ValidateConditionsNotPresent(this BlobRequestConditions req
return;
}
- if ((invalidConditions & BlobRequestConditionProperty.LeaseId) == BlobRequestConditionProperty.LeaseId
- && requestConditions.LeaseId != null)
- {
- throw new ArgumentException($"{nameof(BlobRequestConditions.LeaseId)} is not applicable to this API.");
- }
-
if ((invalidConditions & BlobRequestConditionProperty.TagConditions) == BlobRequestConditionProperty.TagConditions
&& requestConditions.TagConditions != null)
{
@@ -1425,6 +1419,62 @@ internal static void ValidateConditionsNotPresent(this BlobRequestConditions req
throw new ArgumentException($"{nameof(BlobRequestConditions.IfNoneMatch)} is not applicable to this API.");
}
}
+
+ internal static void ValidateConditionsNotPresent(this BlobRequestConditions requestConditions, BlobRequestConditionProperty invalidConditions)
+ {
+ if (AppContextSwitchHelper.GetConfigValue(
+ Constants.DisableRequestConditionsValidationSwitchName,
+ Constants.DisableRequestConditionsValidationEnvVar))
+ {
+ return;
+ }
+
+ if (requestConditions == null)
+ {
+ return;
+ }
+
+ // Validate BlobLeaseRequestConditions conditions.
+ ((BlobLeaseRequestConditions)requestConditions).ValidateConditionsNotPresent(invalidConditions);
+
+ // Validate BlobRequestConditions specific conditions.
+ if ((invalidConditions & BlobRequestConditionProperty.LeaseId) == BlobRequestConditionProperty.LeaseId
+ && requestConditions.LeaseId != null)
+ {
+ throw new ArgumentException($"{nameof(BlobRequestConditions.LeaseId)} is not applicable to this API.");
+ }
+ }
+
+ internal static void ValidateConditionsNotPresent(this AppendBlobRequestConditions requestConditions, BlobRequestConditionProperty invalidConditions)
+ {
+ if (AppContextSwitchHelper.GetConfigValue(
+ Constants.DisableRequestConditionsValidationSwitchName,
+ Constants.DisableRequestConditionsValidationEnvVar))
+ {
+ return;
+ }
+
+ if (requestConditions == null)
+ {
+ return;
+ }
+
+ // Validate BlobRequestConditions
+ ((BlobRequestConditions)requestConditions).ValidateConditionsNotPresent(invalidConditions);
+
+ // Validate AppendBlobRequestConditions specific conditions.
+ if ((invalidConditions & BlobRequestConditionProperty.IfAppendPositionEqual) == BlobRequestConditionProperty.IfAppendPositionEqual
+ && requestConditions.IfAppendPositionEqual != null)
+ {
+ throw new ArgumentException($"{nameof(AppendBlobRequestConditions.IfAppendPositionEqual)} is not applicable to this API.");
+ }
+
+ if ((invalidConditions & BlobRequestConditionProperty.IfMaxSizeLessThanOrEqual) == BlobRequestConditionProperty.IfMaxSizeLessThanOrEqual
+ && requestConditions.IfMaxSizeLessThanOrEqual != null)
+ {
+ throw new ArgumentException($"{nameof(AppendBlobRequestConditions.IfMaxSizeLessThanOrEqual)} is not applicable to this API.");
+ }
+ }
#endregion
}
}
diff --git a/sdk/storage/Azure.Storage.Blobs/src/Models/Internal/BlobRequestConditionProperty.cs b/sdk/storage/Azure.Storage.Blobs/src/Models/Internal/BlobRequestConditionProperty.cs
index 3341d19d26b5b..7446cb3f16a73 100644
--- a/sdk/storage/Azure.Storage.Blobs/src/Models/Internal/BlobRequestConditionProperty.cs
+++ b/sdk/storage/Azure.Storage.Blobs/src/Models/Internal/BlobRequestConditionProperty.cs
@@ -5,11 +5,14 @@ namespace Azure.Storage.Blobs.Models
{
internal enum BlobRequestConditionProperty
{
+ None = 0,
LeaseId = 1,
TagConditions = 2,
IfModifiedSince = 4,
IfUnmodifiedSince = 8,
IfMatch = 16,
- IfNoneMatch = 32
+ IfNoneMatch = 32,
+ IfAppendPositionEqual = 64,
+ IfMaxSizeLessThanOrEqual = 128
}
}
diff --git a/sdk/storage/Azure.Storage.Blobs/tests/AppendBlobClientTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/AppendBlobClientTests.cs
index 044bafb36afa7..9c65b1a04bd4c 100644
--- a/sdk/storage/Azure.Storage.Blobs/tests/AppendBlobClientTests.cs
+++ b/sdk/storage/Azure.Storage.Blobs/tests/AppendBlobClientTests.cs
@@ -230,6 +230,39 @@ public async Task CreateAsync()
Assert.AreEqual(blobName, blobs.First().Name);
}
+ [RecordedTest]
+ [TestCase(nameof(AppendBlobRequestConditions.IfAppendPositionEqual))]
+ [TestCase(nameof(AppendBlobRequestConditions.IfMaxSizeLessThanOrEqual))]
+ public async Task CreateAsync_InvalidRequestConditions(string invalidCondition)
+ {
+ // Arrange
+ Uri uri = new Uri("https://www.doesntmatter.com");
+ AppendBlobClient appendBlobClient = new AppendBlobClient(uri, GetOptions());
+
+ AppendBlobRequestConditions conditions = new AppendBlobRequestConditions();
+
+ switch (invalidCondition)
+ {
+ case nameof(AppendBlobRequestConditions.IfAppendPositionEqual):
+ conditions.IfAppendPositionEqual = 0;
+ break;
+ case nameof(AppendBlobRequestConditions.IfMaxSizeLessThanOrEqual):
+ conditions.IfMaxSizeLessThanOrEqual = 0;
+ break;
+ }
+
+ AppendBlobCreateOptions options = new AppendBlobCreateOptions
+ {
+ Conditions = conditions
+ };
+
+ // Act
+ await TestHelper.AssertExpectedExceptionAsync(
+ appendBlobClient.CreateAsync(
+ options),
+ e => Assert.AreEqual($"{invalidCondition} is not applicable to this API.", e.Message));
+ }
+
[RecordedTest]
[ServiceVersion(Min = BlobClientOptions.ServiceVersion.V2019_12_12)]
public async Task CreateAsync_Tags()
@@ -962,6 +995,48 @@ public async Task AppendBlockFromUriAsync_Min()
}
}
+ [RecordedTest]
+ [TestCase(nameof(AppendBlobRequestConditions.LeaseId))]
+ [TestCase(nameof(AppendBlobRequestConditions.TagConditions))]
+ [TestCase(nameof(AppendBlobRequestConditions.IfAppendPositionEqual))]
+ [TestCase(nameof(AppendBlobRequestConditions.IfMaxSizeLessThanOrEqual))]
+ public async Task AppendBlockFromUriAsync_InvalidSourceRequestConditions(string invalidSourceCondition)
+ {
+ // Arrange
+ Uri uri = new Uri("https://www.doesntmatter.com");
+ AppendBlobClient appendBlobClient = new AppendBlobClient(uri, GetOptions());
+
+ AppendBlobRequestConditions sourceConditions = new AppendBlobRequestConditions();
+
+ switch (invalidSourceCondition)
+ {
+ case nameof(AppendBlobRequestConditions.LeaseId):
+ sourceConditions.LeaseId = "LeaseId";
+ break;
+ case nameof(AppendBlobRequestConditions.TagConditions):
+ sourceConditions.TagConditions = "TagConditions";
+ break;
+ case nameof(AppendBlobRequestConditions.IfAppendPositionEqual):
+ sourceConditions.IfAppendPositionEqual = 0;
+ break;
+ case nameof(AppendBlobRequestConditions.IfMaxSizeLessThanOrEqual):
+ sourceConditions.IfMaxSizeLessThanOrEqual = 0;
+ break;
+ }
+
+ AppendBlobAppendBlockFromUriOptions options = new AppendBlobAppendBlockFromUriOptions
+ {
+ SourceConditions = sourceConditions
+ };
+
+ // Act
+ await TestHelper.AssertExpectedExceptionAsync(
+ appendBlobClient.AppendBlockFromUriAsync(
+ uri,
+ options),
+ e => Assert.AreEqual($"{invalidSourceCondition} is not applicable to this API.", e.Message));
+ }
+
[RecordedTest]
public async Task AppendBlockFromUriAsync_CPK()
{
@@ -1472,6 +1547,35 @@ public async Task SealAsync()
Assert.IsTrue(blobs.First().Properties.IsSealed);
}
+ [RecordedTest]
+ [ServiceVersion(Min = BlobClientOptions.ServiceVersion.V2019_12_12)]
+ [TestCase(nameof(AppendBlobRequestConditions.IfMaxSizeLessThanOrEqual))]
+ [TestCase(nameof(AppendBlobRequestConditions.TagConditions))]
+ public async Task SealAsync_InvalidRequestConditions(string invalidCondition)
+ {
+ // Arrange
+ Uri uri = new Uri("https://www.doesntmatter.com");
+ AppendBlobClient appendBlobClient = new AppendBlobClient(uri, GetOptions());
+
+ AppendBlobRequestConditions conditions = new AppendBlobRequestConditions();
+
+ switch (invalidCondition)
+ {
+ case nameof(AppendBlobRequestConditions.IfMaxSizeLessThanOrEqual):
+ conditions.IfMaxSizeLessThanOrEqual = 0;
+ break;
+ case nameof(AppendBlobRequestConditions.TagConditions):
+ conditions.TagConditions = "TagConditions";
+ break;
+ }
+
+ // Act
+ await TestHelper.AssertExpectedExceptionAsync(
+ appendBlobClient.SealAsync(
+ conditions),
+ e => Assert.AreEqual($"{invalidCondition} is not applicable to this API.", e.Message));
+ }
+
[RecordedTest]
[ServiceVersion(Min = BlobClientOptions.ServiceVersion.V2019_12_12)]
public async Task SealAsync_Error()
@@ -1866,8 +1970,8 @@ public async Task OpenWriteAsync_AccessConditions(bool overwrite)
new AccessConditionParameters { Match = ReceivedETag },
new AccessConditionParameters { NoneMatch = GarbageETag },
new AccessConditionParameters { LeaseId = ReceivedLeaseId },
- new AccessConditionParameters { AppendPosE = 0 },
- new AccessConditionParameters { MaxSizeLTE = 100 }
+ new AccessConditionParameters { AppendPosE = overwrite ? null : 0 },
+ new AccessConditionParameters { MaxSizeLTE = overwrite ? null : 100 }
};
foreach (AccessConditionParameters parameters in testCases)
{
diff --git a/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/AppendBlockFromUriAsync_InvalidSourceRequestConditions(%IfAppendPositionEqual%).json b/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/AppendBlockFromUriAsync_InvalidSourceRequestConditions(%IfAppendPositionEqual%).json
new file mode 100644
index 0000000000000..22da0cc17f5aa
--- /dev/null
+++ b/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/AppendBlockFromUriAsync_InvalidSourceRequestConditions(%IfAppendPositionEqual%).json
@@ -0,0 +1,6 @@
+{
+ "Entries": [],
+ "Variables": {
+ "RandomSeed": "1066223535"
+ }
+}
\ No newline at end of file
diff --git a/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/AppendBlockFromUriAsync_InvalidSourceRequestConditions(%IfAppendPositionEqual%)Async.json b/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/AppendBlockFromUriAsync_InvalidSourceRequestConditions(%IfAppendPositionEqual%)Async.json
new file mode 100644
index 0000000000000..20c51ce5d0120
--- /dev/null
+++ b/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/AppendBlockFromUriAsync_InvalidSourceRequestConditions(%IfAppendPositionEqual%)Async.json
@@ -0,0 +1,6 @@
+{
+ "Entries": [],
+ "Variables": {
+ "RandomSeed": "1797526152"
+ }
+}
\ No newline at end of file
diff --git a/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/AppendBlockFromUriAsync_InvalidSourceRequestConditions(%IfMaxSizeLessThanOrEqual%).json b/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/AppendBlockFromUriAsync_InvalidSourceRequestConditions(%IfMaxSizeLessThanOrEqual%).json
new file mode 100644
index 0000000000000..f0d9bad075d41
--- /dev/null
+++ b/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/AppendBlockFromUriAsync_InvalidSourceRequestConditions(%IfMaxSizeLessThanOrEqual%).json
@@ -0,0 +1,6 @@
+{
+ "Entries": [],
+ "Variables": {
+ "RandomSeed": "1256587583"
+ }
+}
\ No newline at end of file
diff --git a/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/AppendBlockFromUriAsync_InvalidSourceRequestConditions(%IfMaxSizeLessThanOrEqual%)Async.json b/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/AppendBlockFromUriAsync_InvalidSourceRequestConditions(%IfMaxSizeLessThanOrEqual%)Async.json
new file mode 100644
index 0000000000000..64eac73588316
--- /dev/null
+++ b/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/AppendBlockFromUriAsync_InvalidSourceRequestConditions(%IfMaxSizeLessThanOrEqual%)Async.json
@@ -0,0 +1,6 @@
+{
+ "Entries": [],
+ "Variables": {
+ "RandomSeed": "2042257016"
+ }
+}
\ No newline at end of file
diff --git a/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/AppendBlockFromUriAsync_InvalidSourceRequestConditions(%LeaseId%).json b/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/AppendBlockFromUriAsync_InvalidSourceRequestConditions(%LeaseId%).json
new file mode 100644
index 0000000000000..4bd7b2c2d550d
--- /dev/null
+++ b/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/AppendBlockFromUriAsync_InvalidSourceRequestConditions(%LeaseId%).json
@@ -0,0 +1,6 @@
+{
+ "Entries": [],
+ "Variables": {
+ "RandomSeed": "332731075"
+ }
+}
\ No newline at end of file
diff --git a/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/AppendBlockFromUriAsync_InvalidSourceRequestConditions(%LeaseId%)Async.json b/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/AppendBlockFromUriAsync_InvalidSourceRequestConditions(%LeaseId%)Async.json
new file mode 100644
index 0000000000000..8606998e5c8a1
--- /dev/null
+++ b/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/AppendBlockFromUriAsync_InvalidSourceRequestConditions(%LeaseId%)Async.json
@@ -0,0 +1,6 @@
+{
+ "Entries": [],
+ "Variables": {
+ "RandomSeed": "831658752"
+ }
+}
\ No newline at end of file
diff --git a/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/AppendBlockFromUriAsync_InvalidSourceRequestConditions(%TagConditions%).json b/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/AppendBlockFromUriAsync_InvalidSourceRequestConditions(%TagConditions%).json
new file mode 100644
index 0000000000000..2ac2762abd556
--- /dev/null
+++ b/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/AppendBlockFromUriAsync_InvalidSourceRequestConditions(%TagConditions%).json
@@ -0,0 +1,6 @@
+{
+ "Entries": [],
+ "Variables": {
+ "RandomSeed": "15265864"
+ }
+}
\ No newline at end of file
diff --git a/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/AppendBlockFromUriAsync_InvalidSourceRequestConditions(%TagConditions%)Async.json b/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/AppendBlockFromUriAsync_InvalidSourceRequestConditions(%TagConditions%)Async.json
new file mode 100644
index 0000000000000..2c8b1b7c230e9
--- /dev/null
+++ b/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/AppendBlockFromUriAsync_InvalidSourceRequestConditions(%TagConditions%)Async.json
@@ -0,0 +1,6 @@
+{
+ "Entries": [],
+ "Variables": {
+ "RandomSeed": "828924827"
+ }
+}
\ No newline at end of file
diff --git a/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/CreateAsync_InvalidRequestConditions(%IfAppendPositionEqual%).json b/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/CreateAsync_InvalidRequestConditions(%IfAppendPositionEqual%).json
new file mode 100644
index 0000000000000..a8704853f0c27
--- /dev/null
+++ b/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/CreateAsync_InvalidRequestConditions(%IfAppendPositionEqual%).json
@@ -0,0 +1,6 @@
+{
+ "Entries": [],
+ "Variables": {
+ "RandomSeed": "216803847"
+ }
+}
\ No newline at end of file
diff --git a/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/CreateAsync_InvalidRequestConditions(%IfAppendPositionEqual%)Async.json b/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/CreateAsync_InvalidRequestConditions(%IfAppendPositionEqual%)Async.json
new file mode 100644
index 0000000000000..a1f711893da7a
--- /dev/null
+++ b/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/CreateAsync_InvalidRequestConditions(%IfAppendPositionEqual%)Async.json
@@ -0,0 +1,6 @@
+{
+ "Entries": [],
+ "Variables": {
+ "RandomSeed": "1259946500"
+ }
+}
\ No newline at end of file
diff --git a/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/CreateAsync_InvalidRequestConditions(%IfMaxSizeLessThanOrEqual%).json b/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/CreateAsync_InvalidRequestConditions(%IfMaxSizeLessThanOrEqual%).json
new file mode 100644
index 0000000000000..9ea39630616c8
--- /dev/null
+++ b/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/CreateAsync_InvalidRequestConditions(%IfMaxSizeLessThanOrEqual%).json
@@ -0,0 +1,6 @@
+{
+ "Entries": [],
+ "Variables": {
+ "RandomSeed": "29920996"
+ }
+}
\ No newline at end of file
diff --git a/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/CreateAsync_InvalidRequestConditions(%IfMaxSizeLessThanOrEqual%)Async.json b/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/CreateAsync_InvalidRequestConditions(%IfMaxSizeLessThanOrEqual%)Async.json
new file mode 100644
index 0000000000000..7476326be539e
--- /dev/null
+++ b/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/CreateAsync_InvalidRequestConditions(%IfMaxSizeLessThanOrEqual%)Async.json
@@ -0,0 +1,6 @@
+{
+ "Entries": [],
+ "Variables": {
+ "RandomSeed": "426807611"
+ }
+}
\ No newline at end of file
diff --git a/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/SealAsync_InvalidRequestConditions(%IfMaxSizeLessThanOrEqual%).json b/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/SealAsync_InvalidRequestConditions(%IfMaxSizeLessThanOrEqual%).json
new file mode 100644
index 0000000000000..b23ae4ecd4930
--- /dev/null
+++ b/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/SealAsync_InvalidRequestConditions(%IfMaxSizeLessThanOrEqual%).json
@@ -0,0 +1,6 @@
+{
+ "Entries": [],
+ "Variables": {
+ "RandomSeed": "1986047280"
+ }
+}
\ No newline at end of file
diff --git a/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/SealAsync_InvalidRequestConditions(%IfMaxSizeLessThanOrEqual%)Async.json b/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/SealAsync_InvalidRequestConditions(%IfMaxSizeLessThanOrEqual%)Async.json
new file mode 100644
index 0000000000000..12e96e033aee0
--- /dev/null
+++ b/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/SealAsync_InvalidRequestConditions(%IfMaxSizeLessThanOrEqual%)Async.json
@@ -0,0 +1,6 @@
+{
+ "Entries": [],
+ "Variables": {
+ "RandomSeed": "1848003368"
+ }
+}
\ No newline at end of file
diff --git a/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/SealAsync_InvalidRequestConditions(%TagConditions%).json b/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/SealAsync_InvalidRequestConditions(%TagConditions%).json
new file mode 100644
index 0000000000000..7fd148afd45a3
--- /dev/null
+++ b/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/SealAsync_InvalidRequestConditions(%TagConditions%).json
@@ -0,0 +1,6 @@
+{
+ "Entries": [],
+ "Variables": {
+ "RandomSeed": "1419599387"
+ }
+}
\ No newline at end of file
diff --git a/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/SealAsync_InvalidRequestConditions(%TagConditions%)Async.json b/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/SealAsync_InvalidRequestConditions(%TagConditions%)Async.json
new file mode 100644
index 0000000000000..692c9fdf4b114
--- /dev/null
+++ b/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/AppendBlobClientTests/SealAsync_InvalidRequestConditions(%TagConditions%)Async.json
@@ -0,0 +1,6 @@
+{
+ "Entries": [],
+ "Variables": {
+ "RandomSeed": "827513766"
+ }
+}
\ No newline at end of file
From 24135502ce03dc68e94efe4606f8e5268027dd72 Mon Sep 17 00:00:00 2001
From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com>
Date: Fri, 18 Jun 2021 13:44:34 -0700
Subject: [PATCH 008/120] Fix hard-coded master (#21970)
Co-authored-by: Chidozie Ononiwu
---
eng/common/pipelines/templates/steps/set-default-branch.yml | 4 ++--
eng/common/scripts/update-docs-metadata.ps1 | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/eng/common/pipelines/templates/steps/set-default-branch.yml b/eng/common/pipelines/templates/steps/set-default-branch.yml
index e3eed4512d977..491edaa8b68db 100644
--- a/eng/common/pipelines/templates/steps/set-default-branch.yml
+++ b/eng/common/pipelines/templates/steps/set-default-branch.yml
@@ -5,8 +5,8 @@ steps:
- pwsh: |
$setDefaultBranch = (git remote show ${{ parameters.RemoteRepo }} | Out-String) -replace "(?ms).*HEAD branch: (\w+).*", '$1'
if ($LASTEXITCODE -ne 0) {
- Write-Host "Not able to fetch the default branch from git command. Set to master."
- $setDefaultBranch = 'master'
+ Write-Host "Not able to fetch the default branch from git command. Set to main."
+ $setDefaultBranch = 'main'
}
Write-Host "Setting DefaultBranch=$setDefaultBranch"
Write-Host "##vso[task.setvariable variable=DefaultBranch]$setDefaultBranch"
diff --git a/eng/common/scripts/update-docs-metadata.ps1 b/eng/common/scripts/update-docs-metadata.ps1
index fc16fea9e5527..6154afd515916 100644
--- a/eng/common/scripts/update-docs-metadata.ps1
+++ b/eng/common/scripts/update-docs-metadata.ps1
@@ -24,7 +24,7 @@ param (
. (Join-Path $PSScriptRoot common.ps1)
-$releaseReplaceRegex = "(https://github.com/$RepoId/(?:blob|tree)/)master"
+$releaseReplaceRegex = "(https://github.com/$RepoId/(?:blob|tree)/)main"
function GetMetaData {
if (Test-Path Variable:MetadataUri) {
From 088f548a248ae9e1f0fc58ff28b889aa9695a41d Mon Sep 17 00:00:00 2001
From: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
Date: Fri, 18 Jun 2021 15:01:18 -0700
Subject: [PATCH 009/120] Add public ctor for SubscriptionValidationResponse
(#21975)
* Add public ctor for SubscriptionValidationResponse
* Comment out package reference.
---
.../Azure.Messaging.EventGrid.netstandard2.0.cs | 5 +++--
.../src/Customization/EventGridModelFactory.cs | 10 ++++++++++
.../src/Generated/EventGridModelFactory.cs | 8 --------
...ubscriptionValidationResponse.Serialization.cs | 15 +++++++++++++--
.../Models/SubscriptionValidationResponse.cs | 4 ++--
.../Azure.Messaging.EventGrid/src/autorest.md | 5 ++++-
...crosoft.Azure.WebJobs.Extensions.EventGrid.sln | 6 ++++++
...soft.Azure.WebJobs.Extensions.EventGrid.csproj | 8 +++++++-
.../src/TriggerBinding/HttpRequestProcessor.cs | 6 ++++--
.../SubscriptionValidationResponse.cs | 13 -------------
10 files changed, 49 insertions(+), 31 deletions(-)
delete mode 100644 sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/src/TriggerBinding/SubscriptionValidationResponse.cs
diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.netstandard2.0.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.netstandard2.0.cs
index 96421f735e1cd..9bc0184e334f2 100644
--- a/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.netstandard2.0.cs
+++ b/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.netstandard2.0.cs
@@ -147,6 +147,7 @@ public static partial class EventGridModelFactory
public static Azure.Messaging.EventGrid.SystemEvents.StorageLifecyclePolicyCompletedEventData StorageLifecyclePolicyCompletedEventData(string scheduleTime = null, Azure.Messaging.EventGrid.SystemEvents.StorageLifecyclePolicyActionSummaryDetail deleteSummary = null, Azure.Messaging.EventGrid.SystemEvents.StorageLifecyclePolicyActionSummaryDetail tierToCoolSummary = null, Azure.Messaging.EventGrid.SystemEvents.StorageLifecyclePolicyActionSummaryDetail tierToArchiveSummary = null) { throw null; }
public static Azure.Messaging.EventGrid.SystemEvents.SubscriptionDeletedEventData SubscriptionDeletedEventData(string eventSubscriptionId = null) { throw null; }
public static Azure.Messaging.EventGrid.SystemEvents.SubscriptionValidationEventData SubscriptionValidationEventData(string validationCode = null, string validationUrl = null) { throw null; }
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static Azure.Messaging.EventGrid.SystemEvents.SubscriptionValidationResponse SubscriptionValidationResponse(string validationResponse = null) { throw null; }
public static Azure.Messaging.EventGrid.SystemEvents.WebAppServicePlanUpdatedEventData WebAppServicePlanUpdatedEventData(Azure.Messaging.EventGrid.SystemEvents.AppServicePlanEventTypeDetail appServicePlanEventTypeDetail = null, Azure.Messaging.EventGrid.SystemEvents.WebAppServicePlanUpdatedEventDataSku sku = null, string name = null, string clientRequestId = null, string correlationRequestId = null, string requestId = null, string address = null, string verb = null) { throw null; }
public static Azure.Messaging.EventGrid.SystemEvents.WebAppServicePlanUpdatedEventDataSku WebAppServicePlanUpdatedEventDataSku(string name = null, string tier = null, string size = null, string family = null, string capacity = null) { throw null; }
@@ -1673,8 +1674,8 @@ internal SubscriptionValidationEventData() { }
}
public partial class SubscriptionValidationResponse
{
- internal SubscriptionValidationResponse() { }
- public string ValidationResponse { get { throw null; } }
+ public SubscriptionValidationResponse() { }
+ public string ValidationResponse { get { throw null; } set { } }
}
public partial class WebAppServicePlanUpdatedEventData
{
diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Customization/EventGridModelFactory.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Customization/EventGridModelFactory.cs
index c948e25c527b2..29c22c93eb135 100644
--- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Customization/EventGridModelFactory.cs
+++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Customization/EventGridModelFactory.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
+using System.ComponentModel;
using System.Text.Json;
using Azure.Core;
using Azure.Messaging.EventGrid.SystemEvents;
@@ -180,6 +181,15 @@ public static ResourceActionCancelEventData ResourceActionCancelEventData(string
{
return new(tenantId, subscriptionId, resourceGroup, resourceProvider, resourceUri, operationName, status, JsonDocument.Parse(authorization).RootElement, JsonDocument.Parse(claims).RootElement, correlationId, JsonDocument.Parse(httpRequest).RootElement);
}
+
+ /// Initializes new instance of SubscriptionValidationResponse class.
+ /// The validation response sent by the subscriber to Azure Event Grid to complete the validation of an event subscription.
+ /// A new instance for mocking.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static SubscriptionValidationResponse SubscriptionValidationResponse(string validationResponse = default)
+ {
+ return new(validationResponse);
+ }
}
#pragma warning restore CA1054 // URI-like parameters should not be strings
}
diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs
index 1cf4d75c0340c..bb4915a94facf 100644
--- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs
+++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs
@@ -204,14 +204,6 @@ public static SubscriptionValidationEventData SubscriptionValidationEventData(st
return new SubscriptionValidationEventData(validationCode, validationUrl);
}
- /// Initializes new instance of SubscriptionValidationResponse class.
- /// The validation response sent by the subscriber to Azure Event Grid to complete the validation of an event subscription.
- /// A new instance for mocking.
- public static SubscriptionValidationResponse SubscriptionValidationResponse(string validationResponse = default)
- {
- return new SubscriptionValidationResponse(validationResponse);
- }
-
/// Initializes new instance of SubscriptionDeletedEventData class.
/// The Azure resource ID of the deleted event subscription.
/// A new instance for mocking.
diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/SubscriptionValidationResponse.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/SubscriptionValidationResponse.Serialization.cs
index 1bee1720997f2..f6103c2c9781b 100644
--- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/SubscriptionValidationResponse.Serialization.cs
+++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/SubscriptionValidationResponse.Serialization.cs
@@ -13,8 +13,19 @@
namespace Azure.Messaging.EventGrid.SystemEvents
{
[JsonConverter(typeof(SubscriptionValidationResponseConverter))]
- public partial class SubscriptionValidationResponse
+ public partial class SubscriptionValidationResponse : IUtf8JsonSerializable
{
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ if (Optional.IsDefined(ValidationResponse))
+ {
+ writer.WritePropertyName("validationResponse");
+ writer.WriteStringValue(ValidationResponse);
+ }
+ writer.WriteEndObject();
+ }
+
internal static SubscriptionValidationResponse DeserializeSubscriptionValidationResponse(JsonElement element)
{
Optional validationResponse = default;
@@ -33,7 +44,7 @@ internal partial class SubscriptionValidationResponseConverter : JsonConverter Initializes a new instance of SubscriptionValidationResponse.
- internal SubscriptionValidationResponse()
+ public SubscriptionValidationResponse()
{
}
@@ -23,6 +23,6 @@ internal SubscriptionValidationResponse(string validationResponse)
}
/// The validation response sent by the subscriber to Azure Event Grid to complete the validation of an event subscription.
- public string ValidationResponse { get; }
+ public string ValidationResponse { get; set; }
}
}
diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md b/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md
index 68cc31e01460f..8240f33794863 100644
--- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md
+++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md
@@ -63,12 +63,15 @@ directive:
$[path]["x-namespace"] = namespace;
}
if (path.endsWith("EventData") ||
- path.endsWith("SubscriptionValidationResponse") ||
path.includes("EventGridEvent") ||
($[path]["x-ms-client-name"] && $[path]["x-ms-client-name"].endsWith("EventData")))
{
$[path]["x-csharp-usage"] = "model,output,converter";
}
+ if (path.endsWith("SubscriptionValidationResponse"))
+ {
+ $[path]["x-csharp-usage"] = "model,input,output,converter";
+ }
$[path]["x-csharp-formats"] = "json";
if (path.includes("WebAppServicePlanUpdatedEventData"))
{
diff --git a/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/Microsoft.Azure.WebJobs.Extensions.EventGrid.sln b/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/Microsoft.Azure.WebJobs.Extensions.EventGrid.sln
index da305ef0daa74..044ee1337edc0 100644
--- a/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/Microsoft.Azure.WebJobs.Extensions.EventGrid.sln
+++ b/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/Microsoft.Azure.WebJobs.Extensions.EventGrid.sln
@@ -7,6 +7,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.WebJobs.Ext
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.WebJobs.Extensions.EventGrid", "src\Microsoft.Azure.WebJobs.Extensions.EventGrid.csproj", "{9322A9CD-ADC3-4BF3-B3AA-063A66585113}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Messaging.EventGrid", "..\Azure.Messaging.EventGrid\src\Azure.Messaging.EventGrid.csproj", "{3E40026E-2DE9-4FE0-8E25-73F7B35F5D24}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -21,6 +23,10 @@ Global
{9322A9CD-ADC3-4BF3-B3AA-063A66585113}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9322A9CD-ADC3-4BF3-B3AA-063A66585113}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9322A9CD-ADC3-4BF3-B3AA-063A66585113}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3E40026E-2DE9-4FE0-8E25-73F7B35F5D24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3E40026E-2DE9-4FE0-8E25-73F7B35F5D24}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3E40026E-2DE9-4FE0-8E25-73F7B35F5D24}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3E40026E-2DE9-4FE0-8E25-73F7B35F5D24}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/src/Microsoft.Azure.WebJobs.Extensions.EventGrid.csproj b/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/src/Microsoft.Azure.WebJobs.Extensions.EventGrid.csproj
index 0623906be7d9c..9aa40b3bebb67 100644
--- a/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/src/Microsoft.Azure.WebJobs.Extensions.EventGrid.csproj
+++ b/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/src/Microsoft.Azure.WebJobs.Extensions.EventGrid.csproj
@@ -9,7 +9,13 @@
-
+
+
+
+
+
+
+
diff --git a/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/src/TriggerBinding/HttpRequestProcessor.cs b/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/src/TriggerBinding/HttpRequestProcessor.cs
index 9f6d1629aa2f4..da41927eab6b9 100644
--- a/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/src/TriggerBinding/HttpRequestProcessor.cs
+++ b/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/src/TriggerBinding/HttpRequestProcessor.cs
@@ -8,9 +8,10 @@
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
+using Azure.Messaging.EventGrid.SystemEvents;
using Microsoft.Extensions.Logging;
-using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
+using STJ = System.Text.Json;
namespace Microsoft.Azure.WebJobs.Extensions.EventGrid
{
@@ -69,7 +70,8 @@ internal async Task ProcessAsync(
SubscriptionValidationResponse validationResponse = new(){ ValidationResponse = validationCode };
var returnMessage = new HttpResponseMessage(HttpStatusCode.OK)
{
- Content = new StringContent(JsonConvert.SerializeObject(validationResponse))
+ // use System.Text.Json to leverage the custom converter so that the casing is correct.
+ Content = new StringContent(STJ.JsonSerializer.Serialize(validationResponse))
};
_logger.LogInformation($"perform handshake with eventGrid for function: {functionName}");
return returnMessage;
diff --git a/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/src/TriggerBinding/SubscriptionValidationResponse.cs b/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/src/TriggerBinding/SubscriptionValidationResponse.cs
deleted file mode 100644
index ec5cb4cba7187..0000000000000
--- a/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/src/TriggerBinding/SubscriptionValidationResponse.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-using Newtonsoft.Json;
-
-namespace Microsoft.Azure.WebJobs.Extensions.EventGrid
-{
- internal class SubscriptionValidationResponse
- {
- [JsonProperty(PropertyName = "validationResponse")]
- public string ValidationResponse { get; set; }
- }
-}
From b3a32b4755cfd28499f8b355d23401cecc79ad59 Mon Sep 17 00:00:00 2001
From: Magnus Gideryd
Date: Sat, 19 Jun 2021 01:27:51 +0200
Subject: [PATCH 010/120] TelemetryItem.Time format to keep time precision
(#20476)
---
.../src/TelemetryPartA.cs | 10 ++++++++--
.../TelemetryPartATests.cs | 4 ++--
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/TelemetryPartA.cs b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/TelemetryPartA.cs
index 755ea04dd5915..39b2e405a0460 100644
--- a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/TelemetryPartA.cs
+++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/TelemetryPartA.cs
@@ -18,6 +18,7 @@ namespace Azure.Monitor.OpenTelemetry.Exporter
///
internal class TelemetryPartA
{
+ private const string DateTimeFormat = "yyyy-MM-ddTHH:mm:ss.fffffffZ";
private static readonly IReadOnlyDictionary PartA_Name_Mapping = new Dictionary
{
[TelemetryType.Request] = "Request",
@@ -32,7 +33,7 @@ internal class TelemetryPartA
internal static TelemetryItem GetTelemetryItem(Activity activity, Resource resource, string instrumentationKey)
{
- TelemetryItem telemetryItem = new TelemetryItem(PartA_Name_Mapping[activity.GetTelemetryType()], activity.StartTimeUtc.ToString(CultureInfo.InvariantCulture))
+ TelemetryItem telemetryItem = new TelemetryItem(PartA_Name_Mapping[activity.GetTelemetryType()], FormatUtcTimestamp(activity.StartTimeUtc))
{
InstrumentationKey = instrumentationKey
};
@@ -55,7 +56,7 @@ internal static TelemetryItem GetTelemetryItem(Activity activity, Resource resou
internal static TelemetryItem GetTelemetryItem(LogRecord logRecord, string instrumentationKey)
{
var name = PartA_Name_Mapping[TelemetryType.Message];
- var time = logRecord.Timestamp.ToString(CultureInfo.InvariantCulture);
+ var time = FormatUtcTimestamp(logRecord.Timestamp);
TelemetryItem telemetryItem = new TelemetryItem(name, time)
{
@@ -122,5 +123,10 @@ internal static void InitRoleInfo(Resource resource)
RoleName = serviceName;
}
}
+
+ internal static string FormatUtcTimestamp(System.DateTime utcTimestamp)
+ {
+ return utcTimestamp.ToString(DateTimeFormat, CultureInfo.InvariantCulture);
+ }
}
}
diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/tests/Azure.Monitor.OpenTelemetry.Exporter.Tests/TelemetryPartATests.cs b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/tests/Azure.Monitor.OpenTelemetry.Exporter.Tests/TelemetryPartATests.cs
index c35cbd499fc83..45f7102f20388 100644
--- a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/tests/Azure.Monitor.OpenTelemetry.Exporter.Tests/TelemetryPartATests.cs
+++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/tests/Azure.Monitor.OpenTelemetry.Exporter.Tests/TelemetryPartATests.cs
@@ -116,7 +116,7 @@ public void GeneratePartAEnvelope_DefaultActivity_DefaultResource()
var telemetryItem = TelemetryPartA.GetTelemetryItem(activity, resource, null);
Assert.Equal("RemoteDependency", telemetryItem.Name);
- Assert.Equal(activity.StartTimeUtc.ToString(CultureInfo.InvariantCulture), telemetryItem.Time);
+ Assert.Equal(TelemetryPartA.FormatUtcTimestamp(activity.StartTimeUtc), telemetryItem.Time);
Assert.StartsWith("unknown_service", telemetryItem.Tags[ContextTagKeys.AiCloudRole.ToString()]);
Assert.Null(telemetryItem.Tags[ContextTagKeys.AiCloudRoleInstance.ToString()]);
Assert.NotNull(telemetryItem.Tags[ContextTagKeys.AiOperationId.ToString()]);
@@ -133,7 +133,7 @@ public void GeneratePartAEnvelope_Activity_WithResource()
var telemetryItem = TelemetryPartA.GetTelemetryItem(activity, resource, null);
Assert.Equal("RemoteDependency", telemetryItem.Name);
- Assert.Equal(activity.StartTimeUtc.ToString(CultureInfo.InvariantCulture), telemetryItem.Time);
+ Assert.Equal(TelemetryPartA.FormatUtcTimestamp(activity.StartTimeUtc), telemetryItem.Time);
Assert.Equal("my-service", telemetryItem.Tags[ContextTagKeys.AiCloudRole.ToString()]);
Assert.Equal("my-instance", telemetryItem.Tags[ContextTagKeys.AiCloudRoleInstance.ToString()]);
Assert.Equal(activity.TraceId.ToHexString(), telemetryItem.Tags[ContextTagKeys.AiOperationId.ToString()]);
From a111864584c84c8053ea4c4f7fe11d433395a1c6 Mon Sep 17 00:00:00 2001
From: Amit Singh <31076927+amisi01@users.noreply.github.com>
Date: Fri, 18 Jun 2021 16:31:25 -0700
Subject: [PATCH 011/120] Add Stable API Version for point-in-time restore.
(#21768)
* Add Stable API Version for point-in-time restore.
* Newly generated SDK from latest swagger
* Updating testcases to fix the CI break.
* Fixing test errors
* Fixed failing tests
* Updated SDK Version and updated release notes.
* Bumping up AssemblyVersion/AssemblyFileVersion("3.1.0.0") from ("3.0.0.0")
---
.../cosmos-db_resource-manager.txt | 9 +-
.../AzSdk.RP.props | 2 +-
.../Generated/CassandraResourcesOperations.cs | 64 -
.../src/Generated/CollectionOperations.cs | 12 -
.../CollectionPartitionOperations.cs | 8 -
.../CollectionPartitionRegionOperations.cs | 4 -
.../Generated/CollectionRegionOperations.cs | 4 -
.../src/Generated/CosmosDBManagementClient.cs | 50 +-
.../DatabaseAccountRegionOperations.cs | 4 -
.../Generated/DatabaseAccountsOperations.cs | 64 -
.../src/Generated/DatabaseOperations.cs | 12 -
.../Generated/GremlinResourcesOperations.cs | 64 -
.../Generated/ICosmosDBManagementClient.cs | 39 +-
.../IRestorableDatabaseAccountsOperations.cs | 105 +
...IRestorableMongodbCollectionsOperations.cs | 61 +
.../IRestorableMongodbDatabasesOperations.cs | 58 +
.../IRestorableMongodbResourcesOperations.cs | 64 +
.../IRestorableSqlContainersOperations.cs | 69 +
.../IRestorableSqlDatabasesOperations.cs | 58 +
.../IRestorableSqlResourcesOperations.cs | 64 +
.../src/Generated/ISqlResourcesOperations.cs | 68 +
.../Models/AnalyticalStorageConfiguration.cs | 54 +
.../Models/AnalyticalStorageSchemaType.cs | 22 +
.../src/Generated/Models/ApiType.cs | 26 +
.../src/Generated/Models/BackupInformation.cs | 52 +
.../src/Generated/Models/BackupPolicy.cs | 18 +
.../Models/BackupPolicyMigrationState.cs | 77 +
.../Models/BackupPolicyMigrationStatus.cs | 24 +
.../Models/ContinuousBackupInformation.cs | 54 +
.../Models/ContinuousBackupRestoreLocation.cs | 54 +
.../Models/ContinuousModeBackupPolicy.cs | 10 +
.../src/Generated/Models/CreateMode.cs | 22 +
.../src/Generated/Models/CreatedByType.cs | 24 +
.../DatabaseAccountCreateUpdateParameters.cs | 42 +-
.../Models/DatabaseAccountGetResults.cs | 60 +-
.../Models/DatabaseAccountUpdateParameters.cs | 22 +-
.../Models/DatabaseRestoreResource.cs | 63 +
.../src/Generated/Models/OperationType.cs | 24 +
.../Models/PeriodicModeBackupPolicy.cs | 5 +-
.../RestorableDatabaseAccountGetResult.cs | 136 +
.../Models/RestorableLocationResource.cs | 82 +
.../RestorableMongodbCollectionGetResult.cs | 83 +
...ableMongodbCollectionPropertiesResource.cs | 91 +
.../RestorableMongodbDatabaseGetResult.cs | 83 +
...orableMongodbDatabasePropertiesResource.cs | 91 +
.../Models/RestorableSqlContainerGetResult.cs | 95 +
...estorableSqlContainerPropertiesResource.cs | 113 +
...SqlContainerPropertiesResourceContainer.cs | 169 +
.../Models/RestorableSqlDatabaseGetResult.cs | 95 +
...RestorableSqlDatabasePropertiesResource.cs | 113 +
...leSqlDatabasePropertiesResourceDatabase.cs | 126 +
.../src/Generated/Models/RestoreMode.cs | 21 +
.../src/Generated/Models/RestoreParameters.cs | 86 +
.../src/Generated/Models/SystemData.cs | 103 +
.../Generated/MongoDBResourcesOperations.cs | 64 -
.../Generated/NotebookWorkspacesOperations.cs | 28 -
.../PartitionKeyRangeIdOperations.cs | 4 -
.../PartitionKeyRangeIdRegionOperations.cs | 4 -
.../src/Generated/PercentileOperations.cs | 4 -
.../PercentileSourceTargetOperations.cs | 4 -
.../Generated/PercentileTargetOperations.cs | 4 -
.../PrivateEndpointConnectionsOperations.cs | 16 -
.../PrivateLinkResourcesOperations.cs | 8 -
.../RestorableDatabaseAccountsOperations.cs | 666 +++
...bleDatabaseAccountsOperationsExtensions.cs | 147 +
.../RestorableMongodbCollectionsOperations.cs | 276 ++
...eMongodbCollectionsOperationsExtensions.cs | 81 +
.../RestorableMongodbDatabasesOperations.cs | 269 ++
...bleMongodbDatabasesOperationsExtensions.cs | 77 +
.../RestorableMongodbResourcesOperations.cs | 284 ++
...bleMongodbResourcesOperationsExtensions.cs | 87 +
.../RestorableSqlContainersOperations.cs | 292 ++
...orableSqlContainersOperationsExtensions.cs | 93 +
.../RestorableSqlDatabasesOperations.cs | 269 ++
...torableSqlDatabasesOperationsExtensions.cs | 77 +
.../RestorableSqlResourcesOperations.cs | 284 ++
...torableSqlResourcesOperationsExtensions.cs | 87 +
.../SdkInfo_CosmosDBManagementClient.cs | 55 +-
.../src/Generated/SqlResourcesOperations.cs | 443 +-
.../SqlResourcesOperationsExtensions.cs | 116 +
.../src/Generated/TableResourcesOperations.cs | 32 -
...Microsoft.Azure.Management.CosmosDB.csproj | 15 +-
.../src/Properties/AssemblyInfo.cs | 4 +-
.../DatabaseAccountOperationsTest.cs | 89 +-
.../MongoResourcesOperationsTests.cs | 4 +-
.../RestoreDatabaseAccountOperationsTests.cs | 186 +
...rieveSqlContainerBackupInformationTests.cs | 93 +
.../SqlResourcesOperationsTests.cs | 40 +-
.../CassandraCRUDTests.json | 572 +--
.../DatabaseAccountCRUDTests.json | 1796 +++-----
...RestorableSqlDatabaseResourceFeedTest.json | 3240 ++++++++++++++
.../GraphCRUDTests.json | 296 +-
.../ManagedCassandraCRUDTests.json | 3877 -----------------
.../MongoCRUDTests.json | 515 +--
.../OperationsTests/ListOperationsTest.json | 98 +-
.../RestorableMongodb32Tests.json | 197 -
.../RestorableMongodb36Tests.json | 197 -
.../RestorableSqlTests.json | 323 --
.../RestoreDatabaseAccountFeedTests.json | 580 ++-
.../RestoreDatabaseAccountTests.json | 963 ++--
.../RetrieveContinuousBackupInfoTest.json | 938 ++++
.../SqlCRUDTests.json | 812 ++--
.../SqlRoleTests.json | 700 +--
.../TableCRUDTests.json | 212 +-
104 files changed, 13443 insertions(+), 9098 deletions(-)
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/IRestorableDatabaseAccountsOperations.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/IRestorableMongodbCollectionsOperations.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/IRestorableMongodbDatabasesOperations.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/IRestorableMongodbResourcesOperations.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/IRestorableSqlContainersOperations.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/IRestorableSqlDatabasesOperations.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/IRestorableSqlResourcesOperations.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/AnalyticalStorageConfiguration.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/AnalyticalStorageSchemaType.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/ApiType.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/BackupInformation.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/BackupPolicyMigrationState.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/BackupPolicyMigrationStatus.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/ContinuousBackupInformation.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/ContinuousBackupRestoreLocation.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/CreateMode.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/CreatedByType.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/DatabaseRestoreResource.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/OperationType.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableDatabaseAccountGetResult.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableLocationResource.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableMongodbCollectionGetResult.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableMongodbCollectionPropertiesResource.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableMongodbDatabaseGetResult.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableMongodbDatabasePropertiesResource.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableSqlContainerGetResult.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableSqlContainerPropertiesResource.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableSqlContainerPropertiesResourceContainer.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableSqlDatabaseGetResult.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableSqlDatabasePropertiesResource.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableSqlDatabasePropertiesResourceDatabase.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestoreMode.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestoreParameters.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/SystemData.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/RestorableDatabaseAccountsOperations.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/RestorableDatabaseAccountsOperationsExtensions.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/RestorableMongodbCollectionsOperations.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/RestorableMongodbCollectionsOperationsExtensions.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/RestorableMongodbDatabasesOperations.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/RestorableMongodbDatabasesOperationsExtensions.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/RestorableMongodbResourcesOperations.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/RestorableMongodbResourcesOperationsExtensions.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/RestorableSqlContainersOperations.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/RestorableSqlContainersOperationsExtensions.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/RestorableSqlDatabasesOperations.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/RestorableSqlDatabasesOperationsExtensions.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/RestorableSqlResourcesOperations.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/RestorableSqlResourcesOperationsExtensions.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/tests/ScenarioTests/RestoreDatabaseAccountOperationsTests.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/tests/ScenarioTests/RetrieveSqlContainerBackupInformationTests.cs
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/tests/SessionRecords/DatabaseAccountOperationsTests/RestorableSqlDatabaseResourceFeedTest.json
delete mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/tests/SessionRecords/ManagedCassandraResourcesOperationsTests/ManagedCassandraCRUDTests.json
delete mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/tests/SessionRecords/RestorableMongoOperationsTests/RestorableMongodb32Tests.json
delete mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/tests/SessionRecords/RestorableMongoOperationsTests/RestorableMongodb36Tests.json
delete mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/tests/SessionRecords/RestorableSqlOperationsTests/RestorableSqlTests.json
create mode 100644 sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/tests/SessionRecords/RetrieveSqlContainerBackupInformationTests/RetrieveContinuousBackupInfoTest.json
diff --git a/eng/mgmt/mgmtmetadata/cosmos-db_resource-manager.txt b/eng/mgmt/mgmtmetadata/cosmos-db_resource-manager.txt
index a169c744260da..10e8f7e4e681e 100644
--- a/eng/mgmt/mgmtmetadata/cosmos-db_resource-manager.txt
+++ b/eng/mgmt/mgmtmetadata/cosmos-db_resource-manager.txt
@@ -3,12 +3,13 @@ AutoRest installed successfully.
Commencing code generation
Generating CSharp code
Executing AutoRest command
-cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/cosmos-db/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=D:\azure-sdk-for-net\sdk
-2021-04-27 17:09:09 UTC
+cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/cosmos-db/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=E:\azure-sdk-for-net\sdk
+Autorest CSharp Version: 2.3.82
+2021-06-15 23:57:32 UTC
Azure-rest-api-specs repository information
GitHub fork: Azure
Branch: master
-Commit: c1f66424b3b3636ec4cdb6c911dc75ca9abbe146
+Commit: b392b4e5d04c73acde2c02ed034247ac55b8892f
AutoRest information
Requested version: v2
-Bootstrapper version: autorest@3.1.4
+Bootstrapper version: autorest@2.0.4413
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/AzSdk.RP.props b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/AzSdk.RP.props
index 0c984b8893f1d..c479893ed2ab4 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/AzSdk.RP.props
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/AzSdk.RP.props
@@ -1,7 +1,7 @@
- CosmosDB_2021-04-15
+ CosmosDB_2021-06-15
$(PackageTags);$(CommonTags);$(AzureApiTag);
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CassandraResourcesOperations.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CassandraResourcesOperations.cs
index 3f02a6250fe74..ae3d1c82d4e32 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CassandraResourcesOperations.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CassandraResourcesOperations.cs
@@ -108,10 +108,6 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -352,10 +348,6 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -655,10 +647,6 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -986,10 +974,6 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -1239,10 +1223,6 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -1557,10 +1537,6 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -1905,10 +1881,6 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -2166,10 +2138,6 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -2401,10 +2369,6 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -2666,10 +2630,6 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -2916,10 +2876,6 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -3171,10 +3127,6 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -3441,10 +3393,6 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -3685,10 +3633,6 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -3959,10 +3903,6 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -4218,10 +4158,6 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CollectionOperations.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CollectionOperations.cs
index 9895b247cbbb6..034262f0468e4 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CollectionOperations.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CollectionOperations.cs
@@ -120,10 +120,6 @@ internal CollectionOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -392,10 +388,6 @@ internal CollectionOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -655,10 +647,6 @@ internal CollectionOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CollectionPartitionOperations.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CollectionPartitionOperations.cs
index 19e56cbd3001c..6e2217dd5eae2 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CollectionPartitionOperations.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CollectionPartitionOperations.cs
@@ -120,10 +120,6 @@ internal CollectionPartitionOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -393,10 +389,6 @@ internal CollectionPartitionOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CollectionPartitionRegionOperations.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CollectionPartitionRegionOperations.cs
index 920539d777ec8..0dbae254a8ec4 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CollectionPartitionRegionOperations.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CollectionPartitionRegionOperations.cs
@@ -123,10 +123,6 @@ internal CollectionPartitionRegionOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CollectionRegionOperations.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CollectionRegionOperations.cs
index 02ff8134dfe19..99bfdd323a00b 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CollectionRegionOperations.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CollectionRegionOperations.cs
@@ -123,10 +123,6 @@ internal CollectionRegionOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CosmosDBManagementClient.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CosmosDBManagementClient.cs
index 25b7694ddf45f..22336683cb881 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CosmosDBManagementClient.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CosmosDBManagementClient.cs
@@ -166,15 +166,50 @@ public partial class CosmosDBManagementClient : ServiceClient
public virtual INotebookWorkspacesOperations NotebookWorkspaces { get; private set; }
+ ///
+ /// Gets the IPrivateEndpointConnectionsOperations.
+ ///
+ public virtual IPrivateEndpointConnectionsOperations PrivateEndpointConnections { get; private set; }
+
///
/// Gets the IPrivateLinkResourcesOperations.
///
public virtual IPrivateLinkResourcesOperations PrivateLinkResources { get; private set; }
///
- /// Gets the IPrivateEndpointConnectionsOperations.
+ /// Gets the IRestorableDatabaseAccountsOperations.
///
- public virtual IPrivateEndpointConnectionsOperations PrivateEndpointConnections { get; private set; }
+ public virtual IRestorableDatabaseAccountsOperations RestorableDatabaseAccounts { get; private set; }
+
+ ///
+ /// Gets the IRestorableSqlDatabasesOperations.
+ ///
+ public virtual IRestorableSqlDatabasesOperations RestorableSqlDatabases { get; private set; }
+
+ ///
+ /// Gets the IRestorableSqlContainersOperations.
+ ///
+ public virtual IRestorableSqlContainersOperations RestorableSqlContainers { get; private set; }
+
+ ///
+ /// Gets the IRestorableSqlResourcesOperations.
+ ///
+ public virtual IRestorableSqlResourcesOperations RestorableSqlResources { get; private set; }
+
+ ///
+ /// Gets the IRestorableMongodbDatabasesOperations.
+ ///
+ public virtual IRestorableMongodbDatabasesOperations RestorableMongodbDatabases { get; private set; }
+
+ ///
+ /// Gets the IRestorableMongodbCollectionsOperations.
+ ///
+ public virtual IRestorableMongodbCollectionsOperations RestorableMongodbCollections { get; private set; }
+
+ ///
+ /// Gets the IRestorableMongodbResourcesOperations.
+ ///
+ public virtual IRestorableMongodbResourcesOperations RestorableMongodbResources { get; private set; }
///
/// Initializes a new instance of the CosmosDBManagementClient class.
@@ -436,10 +471,17 @@ private void Initialize()
CassandraResources = new CassandraResourcesOperations(this);
GremlinResources = new GremlinResourcesOperations(this);
NotebookWorkspaces = new NotebookWorkspacesOperations(this);
- PrivateLinkResources = new PrivateLinkResourcesOperations(this);
PrivateEndpointConnections = new PrivateEndpointConnectionsOperations(this);
+ PrivateLinkResources = new PrivateLinkResourcesOperations(this);
+ RestorableDatabaseAccounts = new RestorableDatabaseAccountsOperations(this);
+ RestorableSqlDatabases = new RestorableSqlDatabasesOperations(this);
+ RestorableSqlContainers = new RestorableSqlContainersOperations(this);
+ RestorableSqlResources = new RestorableSqlResourcesOperations(this);
+ RestorableMongodbDatabases = new RestorableMongodbDatabasesOperations(this);
+ RestorableMongodbCollections = new RestorableMongodbCollectionsOperations(this);
+ RestorableMongodbResources = new RestorableMongodbResourcesOperations(this);
BaseUri = new System.Uri("https://management.azure.com");
- ApiVersion = "2021-04-15";
+ ApiVersion = "2021-06-15";
AcceptLanguage = "en-US";
LongRunningOperationRetryTimeout = 30;
GenerateClientRequestId = true;
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/DatabaseAccountRegionOperations.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/DatabaseAccountRegionOperations.cs
index 49d1bc40cb2cc..17f4943dcb72c 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/DatabaseAccountRegionOperations.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/DatabaseAccountRegionOperations.cs
@@ -117,10 +117,6 @@ internal DatabaseAccountRegionOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/DatabaseAccountsOperations.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/DatabaseAccountsOperations.cs
index 22bfa79fb675e..07a55df535a2f 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/DatabaseAccountsOperations.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/DatabaseAccountsOperations.cs
@@ -107,10 +107,6 @@ internal DatabaseAccountsOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -629,10 +625,6 @@ internal DatabaseAccountsOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (Client.ApiVersion == null)
{
@@ -859,10 +851,6 @@ internal DatabaseAccountsOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -1100,10 +1088,6 @@ internal DatabaseAccountsOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -1393,10 +1377,6 @@ internal DatabaseAccountsOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -1634,10 +1614,6 @@ internal DatabaseAccountsOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -2093,10 +2069,6 @@ internal DatabaseAccountsOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -2347,10 +2319,6 @@ internal DatabaseAccountsOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -2592,10 +2560,6 @@ internal DatabaseAccountsOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -2835,10 +2799,6 @@ internal DatabaseAccountsOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -3090,10 +3050,6 @@ internal DatabaseAccountsOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -3342,10 +3298,6 @@ internal DatabaseAccountsOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -3568,10 +3520,6 @@ internal DatabaseAccountsOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -3806,10 +3754,6 @@ internal DatabaseAccountsOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -4039,10 +3983,6 @@ internal DatabaseAccountsOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -4272,10 +4212,6 @@ internal DatabaseAccountsOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/DatabaseOperations.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/DatabaseOperations.cs
index 9355f5c552bab..541d6775a12db 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/DatabaseOperations.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/DatabaseOperations.cs
@@ -117,10 +117,6 @@ internal DatabaseOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -380,10 +376,6 @@ internal DatabaseOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -634,10 +626,6 @@ internal DatabaseOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/GremlinResourcesOperations.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/GremlinResourcesOperations.cs
index fd62ef24aac7c..d18fa497c4a8b 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/GremlinResourcesOperations.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/GremlinResourcesOperations.cs
@@ -108,10 +108,6 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -352,10 +348,6 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -655,10 +647,6 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -985,10 +973,6 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -1237,10 +1221,6 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -1555,10 +1535,6 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -1903,10 +1879,6 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -2164,10 +2136,6 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -2399,10 +2367,6 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -2664,10 +2628,6 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -2914,10 +2874,6 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -3169,10 +3125,6 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -3439,10 +3391,6 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -3683,10 +3631,6 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -3957,10 +3901,6 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -4216,10 +4156,6 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/ICosmosDBManagementClient.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/ICosmosDBManagementClient.cs
index 6825f20dff2a9..70be011f245bb 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/ICosmosDBManagementClient.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/ICosmosDBManagementClient.cs
@@ -163,15 +163,50 @@ public partial interface ICosmosDBManagementClient : System.IDisposable
///
INotebookWorkspacesOperations NotebookWorkspaces { get; }
+ ///
+ /// Gets the IPrivateEndpointConnectionsOperations.
+ ///
+ IPrivateEndpointConnectionsOperations PrivateEndpointConnections { get; }
+
///
/// Gets the IPrivateLinkResourcesOperations.
///
IPrivateLinkResourcesOperations PrivateLinkResources { get; }
///
- /// Gets the IPrivateEndpointConnectionsOperations.
+ /// Gets the IRestorableDatabaseAccountsOperations.
///
- IPrivateEndpointConnectionsOperations PrivateEndpointConnections { get; }
+ IRestorableDatabaseAccountsOperations RestorableDatabaseAccounts { get; }
+
+ ///
+ /// Gets the IRestorableSqlDatabasesOperations.
+ ///
+ IRestorableSqlDatabasesOperations RestorableSqlDatabases { get; }
+
+ ///
+ /// Gets the IRestorableSqlContainersOperations.
+ ///
+ IRestorableSqlContainersOperations RestorableSqlContainers { get; }
+
+ ///
+ /// Gets the IRestorableSqlResourcesOperations.
+ ///
+ IRestorableSqlResourcesOperations RestorableSqlResources { get; }
+
+ ///
+ /// Gets the IRestorableMongodbDatabasesOperations.
+ ///
+ IRestorableMongodbDatabasesOperations RestorableMongodbDatabases { get; }
+
+ ///
+ /// Gets the IRestorableMongodbCollectionsOperations.
+ ///
+ IRestorableMongodbCollectionsOperations RestorableMongodbCollections { get; }
+
+ ///
+ /// Gets the IRestorableMongodbResourcesOperations.
+ ///
+ IRestorableMongodbResourcesOperations RestorableMongodbResources { get; }
}
}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/IRestorableDatabaseAccountsOperations.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/IRestorableDatabaseAccountsOperations.cs
new file mode 100644
index 0000000000000..e1a26f87e10b1
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/IRestorableDatabaseAccountsOperations.cs
@@ -0,0 +1,105 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// RestorableDatabaseAccountsOperations operations.
+ ///
+ public partial interface IRestorableDatabaseAccountsOperations
+ {
+ ///
+ /// Lists all the restorable Azure Cosmos DB database accounts
+ /// available under the subscription and in a region. This call
+ /// requires
+ /// 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read'
+ /// permission.
+ ///
+ ///
+ /// Cosmos DB region, with spaces between words and each word
+ /// capitalized.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListByLocationWithHttpMessagesAsync(string location, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Lists all the restorable Azure Cosmos DB database accounts
+ /// available under the subscription. This call requires
+ /// 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read'
+ /// permission.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Retrieves the properties of an existing Azure Cosmos DB restorable
+ /// database account. This call requires
+ /// 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read/*'
+ /// permission.
+ ///
+ ///
+ /// Cosmos DB region, with spaces between words and each word
+ /// capitalized.
+ ///
+ ///
+ /// The instanceId GUID of a restorable database account.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> GetByLocationWithHttpMessagesAsync(string location, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/IRestorableMongodbCollectionsOperations.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/IRestorableMongodbCollectionsOperations.cs
new file mode 100644
index 0000000000000..b37c85352e82b
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/IRestorableMongodbCollectionsOperations.cs
@@ -0,0 +1,61 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// RestorableMongodbCollectionsOperations operations.
+ ///
+ public partial interface IRestorableMongodbCollectionsOperations
+ {
+ ///
+ /// Show the event feed of all mutations done on all the Azure Cosmos
+ /// DB MongoDB collections under a specific database. This helps in
+ /// scenario where container was accidentally deleted. This API
+ /// requires
+ /// 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read'
+ /// permission
+ ///
+ ///
+ /// Cosmos DB region, with spaces between words and each word
+ /// capitalized.
+ ///
+ ///
+ /// The instanceId GUID of a restorable database account.
+ ///
+ ///
+ /// The resource ID of the MongoDB database.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListWithHttpMessagesAsync(string location, string instanceId, string restorableMongodbDatabaseRid = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/IRestorableMongodbDatabasesOperations.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/IRestorableMongodbDatabasesOperations.cs
new file mode 100644
index 0000000000000..e448a153744bd
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/IRestorableMongodbDatabasesOperations.cs
@@ -0,0 +1,58 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// RestorableMongodbDatabasesOperations operations.
+ ///
+ public partial interface IRestorableMongodbDatabasesOperations
+ {
+ ///
+ /// Show the event feed of all mutations done on all the Azure Cosmos
+ /// DB MongoDB databases under the restorable account. This helps in
+ /// scenario where database was accidentally deleted to get the
+ /// deletion time. This API requires
+ /// 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read'
+ /// permission
+ ///
+ ///
+ /// Cosmos DB region, with spaces between words and each word
+ /// capitalized.
+ ///
+ ///
+ /// The instanceId GUID of a restorable database account.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListWithHttpMessagesAsync(string location, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/IRestorableMongodbResourcesOperations.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/IRestorableMongodbResourcesOperations.cs
new file mode 100644
index 0000000000000..c218372523e05
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/IRestorableMongodbResourcesOperations.cs
@@ -0,0 +1,64 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// RestorableMongodbResourcesOperations operations.
+ ///
+ public partial interface IRestorableMongodbResourcesOperations
+ {
+ ///
+ /// Return a list of database and collection combo that exist on the
+ /// account at the given timestamp and location. This helps in
+ /// scenarios to validate what resources exist at given timestamp and
+ /// location. This API requires
+ /// 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read'
+ /// permission.
+ ///
+ ///
+ /// Cosmos DB region, with spaces between words and each word
+ /// capitalized.
+ ///
+ ///
+ /// The instanceId GUID of a restorable database account.
+ ///
+ ///
+ /// The location where the restorable resources are located.
+ ///
+ ///
+ /// The timestamp when the restorable resources existed.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListWithHttpMessagesAsync(string location, string instanceId, string restoreLocation = default(string), string restoreTimestampInUtc = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/IRestorableSqlContainersOperations.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/IRestorableSqlContainersOperations.cs
new file mode 100644
index 0000000000000..703b77b68312a
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/IRestorableSqlContainersOperations.cs
@@ -0,0 +1,69 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// RestorableSqlContainersOperations operations.
+ ///
+ public partial interface IRestorableSqlContainersOperations
+ {
+ ///
+ /// Show the event feed of all mutations done on all the Azure Cosmos
+ /// DB SQL containers under a specific database. This helps in
+ /// scenario where container was accidentally deleted. This API
+ /// requires
+ /// 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read'
+ /// permission
+ ///
+ ///
+ /// Cosmos DB region, with spaces between words and each word
+ /// capitalized.
+ ///
+ ///
+ /// The instanceId GUID of a restorable database account.
+ ///
+ ///
+ /// The resource ID of the SQL database.
+ ///
+ ///
+ /// The snapshot create timestamp after which snapshots need to be
+ /// listed.
+ ///
+ ///
+ /// The snapshot create timestamp before which snapshots need to be
+ /// listed.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListWithHttpMessagesAsync(string location, string instanceId, string restorableSqlDatabaseRid = default(string), string startTime = default(string), string endTime = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/IRestorableSqlDatabasesOperations.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/IRestorableSqlDatabasesOperations.cs
new file mode 100644
index 0000000000000..9e5f0df87d0f4
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/IRestorableSqlDatabasesOperations.cs
@@ -0,0 +1,58 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// RestorableSqlDatabasesOperations operations.
+ ///
+ public partial interface IRestorableSqlDatabasesOperations
+ {
+ ///
+ /// Show the event feed of all mutations done on all the Azure Cosmos
+ /// DB SQL databases under the restorable account. This helps in
+ /// scenario where database was accidentally deleted to get the
+ /// deletion time. This API requires
+ /// 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read'
+ /// permission
+ ///
+ ///
+ /// Cosmos DB region, with spaces between words and each word
+ /// capitalized.
+ ///
+ ///
+ /// The instanceId GUID of a restorable database account.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListWithHttpMessagesAsync(string location, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/IRestorableSqlResourcesOperations.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/IRestorableSqlResourcesOperations.cs
new file mode 100644
index 0000000000000..096ec270e22ab
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/IRestorableSqlResourcesOperations.cs
@@ -0,0 +1,64 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// RestorableSqlResourcesOperations operations.
+ ///
+ public partial interface IRestorableSqlResourcesOperations
+ {
+ ///
+ /// Return a list of database and container combo that exist on the
+ /// account at the given timestamp and location. This helps in
+ /// scenarios to validate what resources exist at given timestamp and
+ /// location. This API requires
+ /// 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read'
+ /// permission.
+ ///
+ ///
+ /// Cosmos DB region, with spaces between words and each word
+ /// capitalized.
+ ///
+ ///
+ /// The instanceId GUID of a restorable database account.
+ ///
+ ///
+ /// The location where the restorable resources are located.
+ ///
+ ///
+ /// The timestamp when the restorable resources existed.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListWithHttpMessagesAsync(string location, string instanceId, string restoreLocation = default(string), string restoreTimestampInUtc = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/ISqlResourcesOperations.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/ISqlResourcesOperations.cs
index 1c70deb2f9038..81ce9991bc6a3 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/ISqlResourcesOperations.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/ISqlResourcesOperations.cs
@@ -1133,6 +1133,40 @@ public partial interface ISqlResourcesOperations
///
Task>> ListSqlRoleAssignmentsWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
+ /// Retrieves continuous backup information for a container resource.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Cosmos DB database account name.
+ ///
+ ///
+ /// Cosmos DB database name.
+ ///
+ ///
+ /// Cosmos DB container name.
+ ///
+ ///
+ /// The name of the continuous backup restore location.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> RetrieveContinuousBackupInformationWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, string containerName, ContinuousBackupRestoreLocation location, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
/// Create or update an Azure Cosmos DB SQL database
///
///
@@ -1755,5 +1789,39 @@ public partial interface ISqlResourcesOperations
/// Thrown when a required parameter is null
///
Task BeginDeleteSqlRoleAssignmentWithHttpMessagesAsync(string roleAssignmentId, string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Retrieves continuous backup information for a container resource.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Cosmos DB database account name.
+ ///
+ ///
+ /// Cosmos DB database name.
+ ///
+ ///
+ /// Cosmos DB container name.
+ ///
+ ///
+ /// The name of the continuous backup restore location.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> BeginRetrieveContinuousBackupInformationWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, string containerName, ContinuousBackupRestoreLocation location, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/AnalyticalStorageConfiguration.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/AnalyticalStorageConfiguration.cs
new file mode 100644
index 0000000000000..e2f25b399e7d6
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/AnalyticalStorageConfiguration.cs
@@ -0,0 +1,54 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Analytical storage specific properties.
+ ///
+ public partial class AnalyticalStorageConfiguration
+ {
+ ///
+ /// Initializes a new instance of the AnalyticalStorageConfiguration
+ /// class.
+ ///
+ public AnalyticalStorageConfiguration()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the AnalyticalStorageConfiguration
+ /// class.
+ ///
+ /// Possible values include: 'WellDefined',
+ /// 'FullFidelity'
+ public AnalyticalStorageConfiguration(string schemaType = default(string))
+ {
+ SchemaType = schemaType;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets possible values include: 'WellDefined', 'FullFidelity'
+ ///
+ [JsonProperty(PropertyName = "schemaType")]
+ public string SchemaType { get; set; }
+
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/AnalyticalStorageSchemaType.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/AnalyticalStorageSchemaType.cs
new file mode 100644
index 0000000000000..4ae73b6f25675
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/AnalyticalStorageSchemaType.cs
@@ -0,0 +1,22 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+
+ ///
+ /// Defines values for AnalyticalStorageSchemaType.
+ ///
+ public static class AnalyticalStorageSchemaType
+ {
+ public const string WellDefined = "WellDefined";
+ public const string FullFidelity = "FullFidelity";
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/ApiType.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/ApiType.cs
new file mode 100644
index 0000000000000..b263e9b9ec11f
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/ApiType.cs
@@ -0,0 +1,26 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+
+ ///
+ /// Defines values for ApiType.
+ ///
+ public static class ApiType
+ {
+ public const string MongoDB = "MongoDB";
+ public const string Gremlin = "Gremlin";
+ public const string Cassandra = "Cassandra";
+ public const string Table = "Table";
+ public const string Sql = "Sql";
+ public const string GremlinV2 = "GremlinV2";
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/BackupInformation.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/BackupInformation.cs
new file mode 100644
index 0000000000000..fd6ce1be799a4
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/BackupInformation.cs
@@ -0,0 +1,52 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Backup information of a resource.
+ ///
+ public partial class BackupInformation
+ {
+ ///
+ /// Initializes a new instance of the BackupInformation class.
+ ///
+ public BackupInformation()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the BackupInformation class.
+ ///
+ /// Information about the
+ /// status of continuous backups.
+ public BackupInformation(ContinuousBackupInformation continuousBackupInformation = default(ContinuousBackupInformation))
+ {
+ ContinuousBackupInformation = continuousBackupInformation;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets information about the status of continuous backups.
+ ///
+ [JsonProperty(PropertyName = "continuousBackupInformation")]
+ public ContinuousBackupInformation ContinuousBackupInformation { get; set; }
+
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/BackupPolicy.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/BackupPolicy.cs
index 867cca31c5c90..f7840d7f6c170 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/BackupPolicy.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/BackupPolicy.cs
@@ -10,6 +10,7 @@
namespace Microsoft.Azure.Management.CosmosDB.Models
{
+ using Newtonsoft.Json;
using System.Linq;
///
@@ -25,11 +26,28 @@ public BackupPolicy()
CustomInit();
}
+ ///
+ /// Initializes a new instance of the BackupPolicy class.
+ ///
+ /// The object representing the state of
+ /// the migration between the backup policies.
+ public BackupPolicy(BackupPolicyMigrationState migrationState = default(BackupPolicyMigrationState))
+ {
+ MigrationState = migrationState;
+ CustomInit();
+ }
///
/// An initialization method that performs custom operations like setting defaults
///
partial void CustomInit();
+ ///
+ /// Gets or sets the object representing the state of the migration
+ /// between the backup policies.
+ ///
+ [JsonProperty(PropertyName = "migrationState")]
+ public BackupPolicyMigrationState MigrationState { get; set; }
+
}
}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/BackupPolicyMigrationState.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/BackupPolicyMigrationState.cs
new file mode 100644
index 0000000000000..b063b6fc10b2a
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/BackupPolicyMigrationState.cs
@@ -0,0 +1,77 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The object representing the state of the migration between the backup
+ /// policies.
+ ///
+ public partial class BackupPolicyMigrationState
+ {
+ ///
+ /// Initializes a new instance of the BackupPolicyMigrationState class.
+ ///
+ public BackupPolicyMigrationState()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the BackupPolicyMigrationState class.
+ ///
+ /// Describes the status of migration between
+ /// backup policy types. Possible values include: 'Invalid',
+ /// 'InProgress', 'Completed', 'Failed'
+ /// Describes the target backup policy type of
+ /// the backup policy migration. Possible values include: 'Periodic',
+ /// 'Continuous'
+ /// Time at which the backup policy migration
+ /// started (ISO-8601 format).
+ public BackupPolicyMigrationState(string status = default(string), string targetType = default(string), System.DateTime? startTime = default(System.DateTime?))
+ {
+ Status = status;
+ TargetType = targetType;
+ StartTime = startTime;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets describes the status of migration between backup
+ /// policy types. Possible values include: 'Invalid', 'InProgress',
+ /// 'Completed', 'Failed'
+ ///
+ [JsonProperty(PropertyName = "status")]
+ public string Status { get; set; }
+
+ ///
+ /// Gets or sets describes the target backup policy type of the backup
+ /// policy migration. Possible values include: 'Periodic', 'Continuous'
+ ///
+ [JsonProperty(PropertyName = "targetType")]
+ public string TargetType { get; set; }
+
+ ///
+ /// Gets or sets time at which the backup policy migration started
+ /// (ISO-8601 format).
+ ///
+ [JsonProperty(PropertyName = "startTime")]
+ public System.DateTime? StartTime { get; set; }
+
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/BackupPolicyMigrationStatus.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/BackupPolicyMigrationStatus.cs
new file mode 100644
index 0000000000000..c44e7638dbdb3
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/BackupPolicyMigrationStatus.cs
@@ -0,0 +1,24 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+
+ ///
+ /// Defines values for BackupPolicyMigrationStatus.
+ ///
+ public static class BackupPolicyMigrationStatus
+ {
+ public const string Invalid = "Invalid";
+ public const string InProgress = "InProgress";
+ public const string Completed = "Completed";
+ public const string Failed = "Failed";
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/ContinuousBackupInformation.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/ContinuousBackupInformation.cs
new file mode 100644
index 0000000000000..d3e1d0b8cbc47
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/ContinuousBackupInformation.cs
@@ -0,0 +1,54 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Information about the status of continuous backups.
+ ///
+ public partial class ContinuousBackupInformation
+ {
+ ///
+ /// Initializes a new instance of the ContinuousBackupInformation
+ /// class.
+ ///
+ public ContinuousBackupInformation()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ContinuousBackupInformation
+ /// class.
+ ///
+ /// The latest restorable
+ /// timestamp for a resource.
+ public ContinuousBackupInformation(string latestRestorableTimestamp = default(string))
+ {
+ LatestRestorableTimestamp = latestRestorableTimestamp;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the latest restorable timestamp for a resource.
+ ///
+ [JsonProperty(PropertyName = "latestRestorableTimestamp")]
+ public string LatestRestorableTimestamp { get; set; }
+
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/ContinuousBackupRestoreLocation.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/ContinuousBackupRestoreLocation.cs
new file mode 100644
index 0000000000000..7025ac59194e2
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/ContinuousBackupRestoreLocation.cs
@@ -0,0 +1,54 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Properties of the regional restorable account.
+ ///
+ public partial class ContinuousBackupRestoreLocation
+ {
+ ///
+ /// Initializes a new instance of the ContinuousBackupRestoreLocation
+ /// class.
+ ///
+ public ContinuousBackupRestoreLocation()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ContinuousBackupRestoreLocation
+ /// class.
+ ///
+ /// The name of the continuous backup restore
+ /// location.
+ public ContinuousBackupRestoreLocation(string location = default(string))
+ {
+ Location = location;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the name of the continuous backup restore location.
+ ///
+ [JsonProperty(PropertyName = "location")]
+ public string Location { get; set; }
+
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/ContinuousModeBackupPolicy.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/ContinuousModeBackupPolicy.cs
index 0c4e775c04e56..c581ca3506580 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/ContinuousModeBackupPolicy.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/ContinuousModeBackupPolicy.cs
@@ -27,6 +27,16 @@ public ContinuousModeBackupPolicy()
CustomInit();
}
+ ///
+ /// Initializes a new instance of the ContinuousModeBackupPolicy class.
+ ///
+ /// The object representing the state of
+ /// the migration between the backup policies.
+ public ContinuousModeBackupPolicy(BackupPolicyMigrationState migrationState = default(BackupPolicyMigrationState))
+ : base(migrationState)
+ {
+ CustomInit();
+ }
///
/// An initialization method that performs custom operations like setting defaults
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/CreateMode.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/CreateMode.cs
new file mode 100644
index 0000000000000..59efcacc27350
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/CreateMode.cs
@@ -0,0 +1,22 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+
+ ///
+ /// Defines values for CreateMode.
+ ///
+ public static class CreateMode
+ {
+ public const string Default = "Default";
+ public const string Restore = "Restore";
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/CreatedByType.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/CreatedByType.cs
new file mode 100644
index 0000000000000..53a064c23e09c
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/CreatedByType.cs
@@ -0,0 +1,24 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+
+ ///
+ /// Defines values for CreatedByType.
+ ///
+ public static class CreatedByType
+ {
+ public const string User = "User";
+ public const string Application = "Application";
+ public const string ManagedIdentity = "ManagedIdentity";
+ public const string Key = "Key";
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/DatabaseAccountCreateUpdateParameters.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/DatabaseAccountCreateUpdateParameters.cs
index e46e5b0b74bde..7e62fd3f2ca0e 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/DatabaseAccountCreateUpdateParameters.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/DatabaseAccountCreateUpdateParameters.cs
@@ -85,6 +85,10 @@ public DatabaseAccountCreateUpdateParameters()
/// supported only for MongoDB API.
/// Flag to indicate whether to
/// enable storage analytics.
+ /// Analytical storage
+ /// specific properties.
+ /// Enum to indicate the mode of account
+ /// creation. Possible values include: 'Default', 'Restore'
/// The object representing the policy for
/// taking backups on an account.
/// The CORS policy for the Cosmos DB database
@@ -95,7 +99,12 @@ public DatabaseAccountCreateUpdateParameters()
/// An array that contains
/// the Resource Ids for Network Acl Bypass for the Cosmos DB
/// account.
- public DatabaseAccountCreateUpdateParameters(IList locations, string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string kind = default(string), ManagedServiceIdentity identity = default(ManagedServiceIdentity), ConsistencyPolicy consistencyPolicy = default(ConsistencyPolicy), IList ipRules = default(IList), bool? isVirtualNetworkFilterEnabled = default(bool?), bool? enableAutomaticFailover = default(bool?), IList capabilities = default(IList), IList virtualNetworkRules = default(IList), bool? enableMultipleWriteLocations = default(bool?), bool? enableCassandraConnector = default(bool?), string connectorOffer = default(string), bool? disableKeyBasedMetadataWriteAccess = default(bool?), string keyVaultKeyUri = default(string), string defaultIdentity = default(string), string publicNetworkAccess = default(string), bool? enableFreeTier = default(bool?), ApiProperties apiProperties = default(ApiProperties), bool? enableAnalyticalStorage = default(bool?), BackupPolicy backupPolicy = default(BackupPolicy), IList cors = default(IList), NetworkAclBypass? networkAclBypass = default(NetworkAclBypass?), IList networkAclBypassResourceIds = default(IList))
+ /// Opt-out of local authentication and
+ /// ensure only MSI and AAD can be used exclusively for
+ /// authentication.
+ /// Parameters to indicate the
+ /// information about the restore.
+ public DatabaseAccountCreateUpdateParameters(IList locations, string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string kind = default(string), ManagedServiceIdentity identity = default(ManagedServiceIdentity), ConsistencyPolicy consistencyPolicy = default(ConsistencyPolicy), IList ipRules = default(IList), bool? isVirtualNetworkFilterEnabled = default(bool?), bool? enableAutomaticFailover = default(bool?), IList capabilities = default(IList), IList virtualNetworkRules = default(IList), bool? enableMultipleWriteLocations = default(bool?), bool? enableCassandraConnector = default(bool?), string connectorOffer = default(string), bool? disableKeyBasedMetadataWriteAccess = default(bool?), string keyVaultKeyUri = default(string), string defaultIdentity = default(string), string publicNetworkAccess = default(string), bool? enableFreeTier = default(bool?), ApiProperties apiProperties = default(ApiProperties), bool? enableAnalyticalStorage = default(bool?), AnalyticalStorageConfiguration analyticalStorageConfiguration = default(AnalyticalStorageConfiguration), string createMode = default(string), BackupPolicy backupPolicy = default(BackupPolicy), IList cors = default(IList), NetworkAclBypass? networkAclBypass = default(NetworkAclBypass?), IList networkAclBypassResourceIds = default(IList), bool? disableLocalAuth = default(bool?), RestoreParameters restoreParameters = default(RestoreParameters))
: base(id, name, type, location, tags)
{
Kind = kind;
@@ -117,10 +126,14 @@ public DatabaseAccountCreateUpdateParameters()
EnableFreeTier = enableFreeTier;
ApiProperties = apiProperties;
EnableAnalyticalStorage = enableAnalyticalStorage;
+ AnalyticalStorageConfiguration = analyticalStorageConfiguration;
+ CreateMode = createMode;
BackupPolicy = backupPolicy;
Cors = cors;
NetworkAclBypass = networkAclBypass;
NetworkAclBypassResourceIds = networkAclBypassResourceIds;
+ DisableLocalAuth = disableLocalAuth;
+ RestoreParameters = restoreParameters;
CustomInit();
}
///
@@ -266,6 +279,19 @@ static DatabaseAccountCreateUpdateParameters()
[JsonProperty(PropertyName = "properties.enableAnalyticalStorage")]
public bool? EnableAnalyticalStorage { get; set; }
+ ///
+ /// Gets or sets analytical storage specific properties.
+ ///
+ [JsonProperty(PropertyName = "properties.analyticalStorageConfiguration")]
+ public AnalyticalStorageConfiguration AnalyticalStorageConfiguration { get; set; }
+
+ ///
+ /// Gets or sets enum to indicate the mode of account creation.
+ /// Possible values include: 'Default', 'Restore'
+ ///
+ [JsonProperty(PropertyName = "properties.createMode")]
+ public string CreateMode { get; set; }
+
///
/// Gets or sets the object representing the policy for taking backups
/// on an account.
@@ -293,6 +319,20 @@ static DatabaseAccountCreateUpdateParameters()
[JsonProperty(PropertyName = "properties.networkAclBypassResourceIds")]
public IList NetworkAclBypassResourceIds { get; set; }
+ ///
+ /// Gets or sets opt-out of local authentication and ensure only MSI
+ /// and AAD can be used exclusively for authentication.
+ ///
+ [JsonProperty(PropertyName = "properties.disableLocalAuth")]
+ public bool? DisableLocalAuth { get; set; }
+
+ ///
+ /// Gets or sets parameters to indicate the information about the
+ /// restore.
+ ///
+ [JsonProperty(PropertyName = "properties.restoreParameters")]
+ public RestoreParameters RestoreParameters { get; set; }
+
///
/// The offer type for the database
///
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/DatabaseAccountGetResults.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/DatabaseAccountGetResults.cs
index 279ee25e45187..35d7da5ca5745 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/DatabaseAccountGetResults.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/DatabaseAccountGetResults.cs
@@ -95,6 +95,14 @@ public DatabaseAccountGetResults()
/// API specific properties.
/// Flag to indicate whether to
/// enable storage analytics.
+ /// Analytical storage
+ /// specific properties.
+ /// A unique identifier assigned to the
+ /// database account
+ /// Enum to indicate the mode of account
+ /// creation. Possible values include: 'Default', 'Restore'
+ /// Parameters to indicate the
+ /// information about the restore.
/// The object representing the policy for
/// taking backups on an account.
/// The CORS policy for the Cosmos DB database
@@ -105,7 +113,12 @@ public DatabaseAccountGetResults()
/// An array that contains
/// the Resource Ids for Network Acl Bypass for the Cosmos DB
/// account.
- public DatabaseAccountGetResults(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string kind = default(string), ManagedServiceIdentity identity = default(ManagedServiceIdentity), string provisioningState = default(string), string documentEndpoint = default(string), DatabaseAccountOfferType? databaseAccountOfferType = default(DatabaseAccountOfferType?), IList ipRules = default(IList), bool? isVirtualNetworkFilterEnabled = default(bool?), bool? enableAutomaticFailover = default(bool?), ConsistencyPolicy consistencyPolicy = default(ConsistencyPolicy), IList capabilities = default(IList), IList writeLocations = default(IList), IList readLocations = default(IList), IList locations = default(IList), IList failoverPolicies = default(IList), IList virtualNetworkRules = default(IList), IList privateEndpointConnections = default(IList), bool? enableMultipleWriteLocations = default(bool?), bool? enableCassandraConnector = default(bool?), string connectorOffer = default(string), bool? disableKeyBasedMetadataWriteAccess = default(bool?), string keyVaultKeyUri = default(string), string defaultIdentity = default(string), string publicNetworkAccess = default(string), bool? enableFreeTier = default(bool?), ApiProperties apiProperties = default(ApiProperties), bool? enableAnalyticalStorage = default(bool?), BackupPolicy backupPolicy = default(BackupPolicy), IList cors = default(IList), NetworkAclBypass? networkAclBypass = default(NetworkAclBypass?), IList networkAclBypassResourceIds = default(IList))
+ /// Opt-out of local authentication and
+ /// ensure only MSI and AAD can be used exclusively for
+ /// authentication.
+ /// The system meta data relating to this
+ /// resource.
+ public DatabaseAccountGetResults(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string kind = default(string), ManagedServiceIdentity identity = default(ManagedServiceIdentity), string provisioningState = default(string), string documentEndpoint = default(string), DatabaseAccountOfferType? databaseAccountOfferType = default(DatabaseAccountOfferType?), IList ipRules = default(IList), bool? isVirtualNetworkFilterEnabled = default(bool?), bool? enableAutomaticFailover = default(bool?), ConsistencyPolicy consistencyPolicy = default(ConsistencyPolicy), IList capabilities = default(IList), IList writeLocations = default(IList), IList readLocations = default(IList), IList locations = default(IList), IList failoverPolicies = default(IList), IList virtualNetworkRules = default(IList), IList privateEndpointConnections = default(IList), bool? enableMultipleWriteLocations = default(bool?), bool? enableCassandraConnector = default(bool?), string connectorOffer = default(string), bool? disableKeyBasedMetadataWriteAccess = default(bool?), string keyVaultKeyUri = default(string), string defaultIdentity = default(string), string publicNetworkAccess = default(string), bool? enableFreeTier = default(bool?), ApiProperties apiProperties = default(ApiProperties), bool? enableAnalyticalStorage = default(bool?), AnalyticalStorageConfiguration analyticalStorageConfiguration = default(AnalyticalStorageConfiguration), string instanceId = default(string), string createMode = default(string), RestoreParameters restoreParameters = default(RestoreParameters), BackupPolicy backupPolicy = default(BackupPolicy), IList cors = default(IList), NetworkAclBypass? networkAclBypass = default(NetworkAclBypass?), IList networkAclBypassResourceIds = default(IList), bool? disableLocalAuth = default(bool?), SystemData systemData = default(SystemData))
: base(id, name, type, location, tags)
{
Kind = kind;
@@ -134,10 +147,16 @@ public DatabaseAccountGetResults()
EnableFreeTier = enableFreeTier;
ApiProperties = apiProperties;
EnableAnalyticalStorage = enableAnalyticalStorage;
+ AnalyticalStorageConfiguration = analyticalStorageConfiguration;
+ InstanceId = instanceId;
+ CreateMode = createMode;
+ RestoreParameters = restoreParameters;
BackupPolicy = backupPolicy;
Cors = cors;
NetworkAclBypass = networkAclBypass;
NetworkAclBypassResourceIds = networkAclBypassResourceIds;
+ DisableLocalAuth = disableLocalAuth;
+ SystemData = systemData;
CustomInit();
}
@@ -322,6 +341,32 @@ public DatabaseAccountGetResults()
[JsonProperty(PropertyName = "properties.enableAnalyticalStorage")]
public bool? EnableAnalyticalStorage { get; set; }
+ ///
+ /// Gets or sets analytical storage specific properties.
+ ///
+ [JsonProperty(PropertyName = "properties.analyticalStorageConfiguration")]
+ public AnalyticalStorageConfiguration AnalyticalStorageConfiguration { get; set; }
+
+ ///
+ /// Gets a unique identifier assigned to the database account
+ ///
+ [JsonProperty(PropertyName = "properties.instanceId")]
+ public string InstanceId { get; private set; }
+
+ ///
+ /// Gets or sets enum to indicate the mode of account creation.
+ /// Possible values include: 'Default', 'Restore'
+ ///
+ [JsonProperty(PropertyName = "properties.createMode")]
+ public string CreateMode { get; set; }
+
+ ///
+ /// Gets or sets parameters to indicate the information about the
+ /// restore.
+ ///
+ [JsonProperty(PropertyName = "properties.restoreParameters")]
+ public RestoreParameters RestoreParameters { get; set; }
+
///
/// Gets or sets the object representing the policy for taking backups
/// on an account.
@@ -349,6 +394,19 @@ public DatabaseAccountGetResults()
[JsonProperty(PropertyName = "properties.networkAclBypassResourceIds")]
public IList NetworkAclBypassResourceIds { get; set; }
+ ///
+ /// Gets or sets opt-out of local authentication and ensure only MSI
+ /// and AAD can be used exclusively for authentication.
+ ///
+ [JsonProperty(PropertyName = "properties.disableLocalAuth")]
+ public bool? DisableLocalAuth { get; set; }
+
+ ///
+ /// Gets the system meta data relating to this resource.
+ ///
+ [JsonProperty(PropertyName = "systemData")]
+ public SystemData SystemData { get; private set; }
+
///
/// Validate the object.
///
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/DatabaseAccountUpdateParameters.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/DatabaseAccountUpdateParameters.cs
index 024a4c9e8ed05..b105d623d6b15 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/DatabaseAccountUpdateParameters.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/DatabaseAccountUpdateParameters.cs
@@ -78,6 +78,8 @@ public DatabaseAccountUpdateParameters()
/// supported only for MongoDB API.
/// Flag to indicate whether to
/// enable storage analytics.
+ /// Analytical storage
+ /// specific properties.
/// The object representing the policy for
/// taking backups on an account.
/// The CORS policy for the Cosmos DB database
@@ -88,7 +90,10 @@ public DatabaseAccountUpdateParameters()
/// An array that contains
/// the Resource Ids for Network Acl Bypass for the Cosmos DB
/// account.
- public DatabaseAccountUpdateParameters(IDictionary tags = default(IDictionary), string location = default(string), ManagedServiceIdentity identity = default(ManagedServiceIdentity), ConsistencyPolicy consistencyPolicy = default(ConsistencyPolicy), IList locations = default(IList), IList ipRules = default(IList), bool? isVirtualNetworkFilterEnabled = default(bool?), bool? enableAutomaticFailover = default(bool?), IList capabilities = default(IList), IList virtualNetworkRules = default(IList), bool? enableMultipleWriteLocations = default(bool?), bool? enableCassandraConnector = default(bool?), string connectorOffer = default(string), bool? disableKeyBasedMetadataWriteAccess = default(bool?), string keyVaultKeyUri = default(string), string defaultIdentity = default(string), string publicNetworkAccess = default(string), bool? enableFreeTier = default(bool?), ApiProperties apiProperties = default(ApiProperties), bool? enableAnalyticalStorage = default(bool?), BackupPolicy backupPolicy = default(BackupPolicy), IList cors = default(IList), NetworkAclBypass? networkAclBypass = default(NetworkAclBypass?), IList networkAclBypassResourceIds = default(IList))
+ /// Opt-out of local authentication and
+ /// ensure only MSI and AAD can be used exclusively for
+ /// authentication.
+ public DatabaseAccountUpdateParameters(IDictionary tags = default(IDictionary), string location = default(string), ManagedServiceIdentity identity = default(ManagedServiceIdentity), ConsistencyPolicy consistencyPolicy = default(ConsistencyPolicy), IList locations = default(IList), IList ipRules = default(IList), bool? isVirtualNetworkFilterEnabled = default(bool?), bool? enableAutomaticFailover = default(bool?), IList capabilities = default(IList), IList virtualNetworkRules = default(IList), bool? enableMultipleWriteLocations = default(bool?), bool? enableCassandraConnector = default(bool?), string connectorOffer = default(string), bool? disableKeyBasedMetadataWriteAccess = default(bool?), string keyVaultKeyUri = default(string), string defaultIdentity = default(string), string publicNetworkAccess = default(string), bool? enableFreeTier = default(bool?), ApiProperties apiProperties = default(ApiProperties), bool? enableAnalyticalStorage = default(bool?), AnalyticalStorageConfiguration analyticalStorageConfiguration = default(AnalyticalStorageConfiguration), BackupPolicy backupPolicy = default(BackupPolicy), IList cors = default(IList), NetworkAclBypass? networkAclBypass = default(NetworkAclBypass?), IList networkAclBypassResourceIds = default(IList), bool? disableLocalAuth = default(bool?))
{
Tags = tags;
Location = location;
@@ -110,10 +115,12 @@ public DatabaseAccountUpdateParameters()
EnableFreeTier = enableFreeTier;
ApiProperties = apiProperties;
EnableAnalyticalStorage = enableAnalyticalStorage;
+ AnalyticalStorageConfiguration = analyticalStorageConfiguration;
BackupPolicy = backupPolicy;
Cors = cors;
NetworkAclBypass = networkAclBypass;
NetworkAclBypassResourceIds = networkAclBypassResourceIds;
+ DisableLocalAuth = disableLocalAuth;
CustomInit();
}
@@ -256,6 +263,12 @@ public DatabaseAccountUpdateParameters()
[JsonProperty(PropertyName = "properties.enableAnalyticalStorage")]
public bool? EnableAnalyticalStorage { get; set; }
+ ///
+ /// Gets or sets analytical storage specific properties.
+ ///
+ [JsonProperty(PropertyName = "properties.analyticalStorageConfiguration")]
+ public AnalyticalStorageConfiguration AnalyticalStorageConfiguration { get; set; }
+
///
/// Gets or sets the object representing the policy for taking backups
/// on an account.
@@ -283,6 +296,13 @@ public DatabaseAccountUpdateParameters()
[JsonProperty(PropertyName = "properties.networkAclBypassResourceIds")]
public IList NetworkAclBypassResourceIds { get; set; }
+ ///
+ /// Gets or sets opt-out of local authentication and ensure only MSI
+ /// and AAD can be used exclusively for authentication.
+ ///
+ [JsonProperty(PropertyName = "properties.disableLocalAuth")]
+ public bool? DisableLocalAuth { get; set; }
+
///
/// Validate the object.
///
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/DatabaseRestoreResource.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/DatabaseRestoreResource.cs
new file mode 100644
index 0000000000000..1a34d450130d8
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/DatabaseRestoreResource.cs
@@ -0,0 +1,63 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Specific Databases to restore.
+ ///
+ public partial class DatabaseRestoreResource
+ {
+ ///
+ /// Initializes a new instance of the DatabaseRestoreResource class.
+ ///
+ public DatabaseRestoreResource()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the DatabaseRestoreResource class.
+ ///
+ /// The name of the database available for
+ /// restore.
+ /// The names of the collections
+ /// available for restore.
+ public DatabaseRestoreResource(string databaseName = default(string), IList collectionNames = default(IList))
+ {
+ DatabaseName = databaseName;
+ CollectionNames = collectionNames;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the name of the database available for restore.
+ ///
+ [JsonProperty(PropertyName = "databaseName")]
+ public string DatabaseName { get; set; }
+
+ ///
+ /// Gets or sets the names of the collections available for restore.
+ ///
+ [JsonProperty(PropertyName = "collectionNames")]
+ public IList CollectionNames { get; set; }
+
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/OperationType.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/OperationType.cs
new file mode 100644
index 0000000000000..8fd9dcaeff9b5
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/OperationType.cs
@@ -0,0 +1,24 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+
+ ///
+ /// Defines values for OperationType.
+ ///
+ public static class OperationType
+ {
+ public const string Create = "Create";
+ public const string Replace = "Replace";
+ public const string Delete = "Delete";
+ public const string SystemOperation = "SystemOperation";
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/PeriodicModeBackupPolicy.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/PeriodicModeBackupPolicy.cs
index 5415b93fbf75d..348975c8a6695 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/PeriodicModeBackupPolicy.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/PeriodicModeBackupPolicy.cs
@@ -30,9 +30,12 @@ public PeriodicModeBackupPolicy()
///
/// Initializes a new instance of the PeriodicModeBackupPolicy class.
///
+ /// The object representing the state of
+ /// the migration between the backup policies.
/// Configuration values for
/// periodic mode backup
- public PeriodicModeBackupPolicy(PeriodicModeProperties periodicModeProperties = default(PeriodicModeProperties))
+ public PeriodicModeBackupPolicy(BackupPolicyMigrationState migrationState = default(BackupPolicyMigrationState), PeriodicModeProperties periodicModeProperties = default(PeriodicModeProperties))
+ : base(migrationState)
{
PeriodicModeProperties = periodicModeProperties;
CustomInit();
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableDatabaseAccountGetResult.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableDatabaseAccountGetResult.cs
new file mode 100644
index 0000000000000..6b06cc51ff4d5
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableDatabaseAccountGetResult.cs
@@ -0,0 +1,136 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// A Azure Cosmos DB restorable database account.
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class RestorableDatabaseAccountGetResult
+ {
+ ///
+ /// Initializes a new instance of the
+ /// RestorableDatabaseAccountGetResult class.
+ ///
+ public RestorableDatabaseAccountGetResult()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// RestorableDatabaseAccountGetResult class.
+ ///
+ /// The name of the global database
+ /// account
+ /// The creation time of the restorable
+ /// database account (ISO-8601 format).
+ /// The time at which the restorable
+ /// database account has been deleted (ISO-8601 format).
+ /// The API type of the restorable database
+ /// account. Possible values include: 'MongoDB', 'Gremlin',
+ /// 'Cassandra', 'Table', 'Sql', 'GremlinV2'
+ /// List of regions where the of the
+ /// database account can be restored from.
+ /// The unique resource identifier of the ARM
+ /// resource.
+ /// The name of the ARM resource.
+ /// The type of Azure resource.
+ /// The location of the resource group to which
+ /// the resource belongs.
+ public RestorableDatabaseAccountGetResult(string accountName = default(string), System.DateTime? creationTime = default(System.DateTime?), System.DateTime? deletionTime = default(System.DateTime?), string apiType = default(string), IList restorableLocations = default(IList), string id = default(string), string name = default(string), string type = default(string), string location = default(string))
+ {
+ AccountName = accountName;
+ CreationTime = creationTime;
+ DeletionTime = deletionTime;
+ ApiType = apiType;
+ RestorableLocations = restorableLocations;
+ Id = id;
+ Name = name;
+ Type = type;
+ Location = location;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the name of the global database account
+ ///
+ [JsonProperty(PropertyName = "properties.accountName")]
+ public string AccountName { get; set; }
+
+ ///
+ /// Gets or sets the creation time of the restorable database account
+ /// (ISO-8601 format).
+ ///
+ [JsonProperty(PropertyName = "properties.creationTime")]
+ public System.DateTime? CreationTime { get; set; }
+
+ ///
+ /// Gets or sets the time at which the restorable database account has
+ /// been deleted (ISO-8601 format).
+ ///
+ [JsonProperty(PropertyName = "properties.deletionTime")]
+ public System.DateTime? DeletionTime { get; set; }
+
+ ///
+ /// Gets the API type of the restorable database account. Possible
+ /// values include: 'MongoDB', 'Gremlin', 'Cassandra', 'Table', 'Sql',
+ /// 'GremlinV2'
+ ///
+ [JsonProperty(PropertyName = "properties.apiType")]
+ public string ApiType { get; private set; }
+
+ ///
+ /// Gets list of regions where the of the database account can be
+ /// restored from.
+ ///
+ [JsonProperty(PropertyName = "properties.restorableLocations")]
+ public IList RestorableLocations { get; private set; }
+
+ ///
+ /// Gets the unique resource identifier of the ARM resource.
+ ///
+ [JsonProperty(PropertyName = "id")]
+ public string Id { get; private set; }
+
+ ///
+ /// Gets the name of the ARM resource.
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; private set; }
+
+ ///
+ /// Gets the type of Azure resource.
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public string Type { get; private set; }
+
+ ///
+ /// Gets or sets the location of the resource group to which the
+ /// resource belongs.
+ ///
+ [JsonProperty(PropertyName = "location")]
+ public string Location { get; set; }
+
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableLocationResource.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableLocationResource.cs
new file mode 100644
index 0000000000000..0c942ae55b611
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableLocationResource.cs
@@ -0,0 +1,82 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Properties of the regional restorable account.
+ ///
+ public partial class RestorableLocationResource
+ {
+ ///
+ /// Initializes a new instance of the RestorableLocationResource class.
+ ///
+ public RestorableLocationResource()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the RestorableLocationResource class.
+ ///
+ /// The location of the regional restorable
+ /// account.
+ /// The instance id of
+ /// the regional restorable account.
+ /// The creation time of the regional
+ /// restorable database account (ISO-8601 format).
+ /// The time at which the regional
+ /// restorable database account has been deleted (ISO-8601
+ /// format).
+ public RestorableLocationResource(string locationName = default(string), string regionalDatabaseAccountInstanceId = default(string), System.DateTime? creationTime = default(System.DateTime?), System.DateTime? deletionTime = default(System.DateTime?))
+ {
+ LocationName = locationName;
+ RegionalDatabaseAccountInstanceId = regionalDatabaseAccountInstanceId;
+ CreationTime = creationTime;
+ DeletionTime = deletionTime;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the location of the regional restorable account.
+ ///
+ [JsonProperty(PropertyName = "locationName")]
+ public string LocationName { get; private set; }
+
+ ///
+ /// Gets the instance id of the regional restorable account.
+ ///
+ [JsonProperty(PropertyName = "regionalDatabaseAccountInstanceId")]
+ public string RegionalDatabaseAccountInstanceId { get; private set; }
+
+ ///
+ /// Gets the creation time of the regional restorable database account
+ /// (ISO-8601 format).
+ ///
+ [JsonProperty(PropertyName = "creationTime")]
+ public System.DateTime? CreationTime { get; private set; }
+
+ ///
+ /// Gets the time at which the regional restorable database account has
+ /// been deleted (ISO-8601 format).
+ ///
+ [JsonProperty(PropertyName = "deletionTime")]
+ public System.DateTime? DeletionTime { get; private set; }
+
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableMongodbCollectionGetResult.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableMongodbCollectionGetResult.cs
new file mode 100644
index 0000000000000..4b39c95048b5f
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableMongodbCollectionGetResult.cs
@@ -0,0 +1,83 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// An Azure Cosmos DB MongoDB collection event
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class RestorableMongodbCollectionGetResult
+ {
+ ///
+ /// Initializes a new instance of the
+ /// RestorableMongodbCollectionGetResult class.
+ ///
+ public RestorableMongodbCollectionGetResult()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// RestorableMongodbCollectionGetResult class.
+ ///
+ /// The resource of an Azure Cosmos DB MongoDB
+ /// collection event
+ /// The unique resource Identifier of the ARM
+ /// resource.
+ /// The name of the ARM resource.
+ /// The type of Azure resource.
+ public RestorableMongodbCollectionGetResult(RestorableMongodbCollectionPropertiesResource resource = default(RestorableMongodbCollectionPropertiesResource), string id = default(string), string name = default(string), string type = default(string))
+ {
+ Resource = resource;
+ Id = id;
+ Name = name;
+ Type = type;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the resource of an Azure Cosmos DB MongoDB collection
+ /// event
+ ///
+ [JsonProperty(PropertyName = "properties.resource")]
+ public RestorableMongodbCollectionPropertiesResource Resource { get; set; }
+
+ ///
+ /// Gets the unique resource Identifier of the ARM resource.
+ ///
+ [JsonProperty(PropertyName = "id")]
+ public string Id { get; private set; }
+
+ ///
+ /// Gets the name of the ARM resource.
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; private set; }
+
+ ///
+ /// Gets the type of Azure resource.
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public string Type { get; private set; }
+
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableMongodbCollectionPropertiesResource.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableMongodbCollectionPropertiesResource.cs
new file mode 100644
index 0000000000000..463b850ec05ef
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableMongodbCollectionPropertiesResource.cs
@@ -0,0 +1,91 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The resource of an Azure Cosmos DB MongoDB collection event
+ ///
+ public partial class RestorableMongodbCollectionPropertiesResource
+ {
+ ///
+ /// Initializes a new instance of the
+ /// RestorableMongodbCollectionPropertiesResource class.
+ ///
+ public RestorableMongodbCollectionPropertiesResource()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// RestorableMongodbCollectionPropertiesResource class.
+ ///
+ /// A system generated property. A unique
+ /// identifier.
+ /// The operation type of this collection
+ /// event. Possible values include: 'Create', 'Replace', 'Delete',
+ /// 'SystemOperation'
+ /// The time when this collection event
+ /// happened.
+ /// The name of this MongoDB collection.
+ /// The resource ID of this MongoDB
+ /// collection.
+ public RestorableMongodbCollectionPropertiesResource(string _rid = default(string), string operationType = default(string), string eventTimestamp = default(string), string ownerId = default(string), string ownerResourceId = default(string))
+ {
+ this._rid = _rid;
+ OperationType = operationType;
+ EventTimestamp = eventTimestamp;
+ OwnerId = ownerId;
+ OwnerResourceId = ownerResourceId;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets a system generated property. A unique identifier.
+ ///
+ [JsonProperty(PropertyName = "_rid")]
+ public string _rid { get; private set; }
+
+ ///
+ /// Gets the operation type of this collection event. Possible values
+ /// include: 'Create', 'Replace', 'Delete', 'SystemOperation'
+ ///
+ [JsonProperty(PropertyName = "operationType")]
+ public string OperationType { get; private set; }
+
+ ///
+ /// Gets the time when this collection event happened.
+ ///
+ [JsonProperty(PropertyName = "eventTimestamp")]
+ public string EventTimestamp { get; private set; }
+
+ ///
+ /// Gets the name of this MongoDB collection.
+ ///
+ [JsonProperty(PropertyName = "ownerId")]
+ public string OwnerId { get; private set; }
+
+ ///
+ /// Gets the resource ID of this MongoDB collection.
+ ///
+ [JsonProperty(PropertyName = "ownerResourceId")]
+ public string OwnerResourceId { get; private set; }
+
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableMongodbDatabaseGetResult.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableMongodbDatabaseGetResult.cs
new file mode 100644
index 0000000000000..b002f0197c38f
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableMongodbDatabaseGetResult.cs
@@ -0,0 +1,83 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// An Azure Cosmos DB MongoDB database event
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class RestorableMongodbDatabaseGetResult
+ {
+ ///
+ /// Initializes a new instance of the
+ /// RestorableMongodbDatabaseGetResult class.
+ ///
+ public RestorableMongodbDatabaseGetResult()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// RestorableMongodbDatabaseGetResult class.
+ ///
+ /// The resource of an Azure Cosmos DB MongoDB
+ /// database event
+ /// The unique resource Identifier of the ARM
+ /// resource.
+ /// The name of the ARM resource.
+ /// The type of Azure resource.
+ public RestorableMongodbDatabaseGetResult(RestorableMongodbDatabasePropertiesResource resource = default(RestorableMongodbDatabasePropertiesResource), string id = default(string), string name = default(string), string type = default(string))
+ {
+ Resource = resource;
+ Id = id;
+ Name = name;
+ Type = type;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the resource of an Azure Cosmos DB MongoDB database
+ /// event
+ ///
+ [JsonProperty(PropertyName = "properties.resource")]
+ public RestorableMongodbDatabasePropertiesResource Resource { get; set; }
+
+ ///
+ /// Gets the unique resource Identifier of the ARM resource.
+ ///
+ [JsonProperty(PropertyName = "id")]
+ public string Id { get; private set; }
+
+ ///
+ /// Gets the name of the ARM resource.
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; private set; }
+
+ ///
+ /// Gets the type of Azure resource.
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public string Type { get; private set; }
+
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableMongodbDatabasePropertiesResource.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableMongodbDatabasePropertiesResource.cs
new file mode 100644
index 0000000000000..7c06c8643d716
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableMongodbDatabasePropertiesResource.cs
@@ -0,0 +1,91 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The resource of an Azure Cosmos DB MongoDB database event
+ ///
+ public partial class RestorableMongodbDatabasePropertiesResource
+ {
+ ///
+ /// Initializes a new instance of the
+ /// RestorableMongodbDatabasePropertiesResource class.
+ ///
+ public RestorableMongodbDatabasePropertiesResource()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// RestorableMongodbDatabasePropertiesResource class.
+ ///
+ /// A system generated property. A unique
+ /// identifier.
+ /// The operation type of this database
+ /// event. Possible values include: 'Create', 'Replace', 'Delete',
+ /// 'SystemOperation'
+ /// The time when this database event
+ /// happened.
+ /// The name of this MongoDB database.
+ /// The resource ID of this MongoDB
+ /// database.
+ public RestorableMongodbDatabasePropertiesResource(string _rid = default(string), string operationType = default(string), string eventTimestamp = default(string), string ownerId = default(string), string ownerResourceId = default(string))
+ {
+ this._rid = _rid;
+ OperationType = operationType;
+ EventTimestamp = eventTimestamp;
+ OwnerId = ownerId;
+ OwnerResourceId = ownerResourceId;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets a system generated property. A unique identifier.
+ ///
+ [JsonProperty(PropertyName = "_rid")]
+ public string _rid { get; private set; }
+
+ ///
+ /// Gets the operation type of this database event. Possible values
+ /// include: 'Create', 'Replace', 'Delete', 'SystemOperation'
+ ///
+ [JsonProperty(PropertyName = "operationType")]
+ public string OperationType { get; private set; }
+
+ ///
+ /// Gets the time when this database event happened.
+ ///
+ [JsonProperty(PropertyName = "eventTimestamp")]
+ public string EventTimestamp { get; private set; }
+
+ ///
+ /// Gets the name of this MongoDB database.
+ ///
+ [JsonProperty(PropertyName = "ownerId")]
+ public string OwnerId { get; private set; }
+
+ ///
+ /// Gets the resource ID of this MongoDB database.
+ ///
+ [JsonProperty(PropertyName = "ownerResourceId")]
+ public string OwnerResourceId { get; private set; }
+
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableSqlContainerGetResult.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableSqlContainerGetResult.cs
new file mode 100644
index 0000000000000..fa5bf9dc46d29
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableSqlContainerGetResult.cs
@@ -0,0 +1,95 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// An Azure Cosmos DB SQL container event
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class RestorableSqlContainerGetResult
+ {
+ ///
+ /// Initializes a new instance of the RestorableSqlContainerGetResult
+ /// class.
+ ///
+ public RestorableSqlContainerGetResult()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the RestorableSqlContainerGetResult
+ /// class.
+ ///
+ /// The resource of an Azure Cosmos DB SQL
+ /// container event
+ /// The unique resource Identifier of the ARM
+ /// resource.
+ /// The name of the ARM resource.
+ /// The type of Azure resource.
+ public RestorableSqlContainerGetResult(RestorableSqlContainerPropertiesResource resource = default(RestorableSqlContainerPropertiesResource), string id = default(string), string name = default(string), string type = default(string))
+ {
+ Resource = resource;
+ Id = id;
+ Name = name;
+ Type = type;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the resource of an Azure Cosmos DB SQL container event
+ ///
+ [JsonProperty(PropertyName = "properties.resource")]
+ public RestorableSqlContainerPropertiesResource Resource { get; set; }
+
+ ///
+ /// Gets the unique resource Identifier of the ARM resource.
+ ///
+ [JsonProperty(PropertyName = "id")]
+ public string Id { get; private set; }
+
+ ///
+ /// Gets the name of the ARM resource.
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; private set; }
+
+ ///
+ /// Gets the type of Azure resource.
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public string Type { get; private set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Resource != null)
+ {
+ Resource.Validate();
+ }
+ }
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableSqlContainerPropertiesResource.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableSqlContainerPropertiesResource.cs
new file mode 100644
index 0000000000000..511fea7331afa
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableSqlContainerPropertiesResource.cs
@@ -0,0 +1,113 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The resource of an Azure Cosmos DB SQL container event
+ ///
+ public partial class RestorableSqlContainerPropertiesResource
+ {
+ ///
+ /// Initializes a new instance of the
+ /// RestorableSqlContainerPropertiesResource class.
+ ///
+ public RestorableSqlContainerPropertiesResource()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// RestorableSqlContainerPropertiesResource class.
+ ///
+ /// A system generated property. A unique
+ /// identifier.
+ /// The operation type of this container
+ /// event. Possible values include: 'Create', 'Replace', 'Delete',
+ /// 'SystemOperation'
+ /// The when this container event
+ /// happened.
+ /// The name of this SQL container.
+ /// The resource ID of this SQL
+ /// container.
+ /// Cosmos DB SQL container resource
+ /// object
+ public RestorableSqlContainerPropertiesResource(string _rid = default(string), string operationType = default(string), string eventTimestamp = default(string), string ownerId = default(string), string ownerResourceId = default(string), RestorableSqlContainerPropertiesResourceContainer container = default(RestorableSqlContainerPropertiesResourceContainer))
+ {
+ this._rid = _rid;
+ OperationType = operationType;
+ EventTimestamp = eventTimestamp;
+ OwnerId = ownerId;
+ OwnerResourceId = ownerResourceId;
+ Container = container;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets a system generated property. A unique identifier.
+ ///
+ [JsonProperty(PropertyName = "_rid")]
+ public string _rid { get; private set; }
+
+ ///
+ /// Gets the operation type of this container event. Possible values
+ /// include: 'Create', 'Replace', 'Delete', 'SystemOperation'
+ ///
+ [JsonProperty(PropertyName = "operationType")]
+ public string OperationType { get; private set; }
+
+ ///
+ /// Gets the when this container event happened.
+ ///
+ [JsonProperty(PropertyName = "eventTimestamp")]
+ public string EventTimestamp { get; private set; }
+
+ ///
+ /// Gets the name of this SQL container.
+ ///
+ [JsonProperty(PropertyName = "ownerId")]
+ public string OwnerId { get; private set; }
+
+ ///
+ /// Gets the resource ID of this SQL container.
+ ///
+ [JsonProperty(PropertyName = "ownerResourceId")]
+ public string OwnerResourceId { get; private set; }
+
+ ///
+ /// Gets or sets cosmos DB SQL container resource object
+ ///
+ [JsonProperty(PropertyName = "container")]
+ public RestorableSqlContainerPropertiesResourceContainer Container { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Container != null)
+ {
+ Container.Validate();
+ }
+ }
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableSqlContainerPropertiesResourceContainer.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableSqlContainerPropertiesResourceContainer.cs
new file mode 100644
index 0000000000000..57f76559317f7
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableSqlContainerPropertiesResourceContainer.cs
@@ -0,0 +1,169 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+ using Microsoft.Rest;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Cosmos DB SQL container resource object
+ ///
+ public partial class RestorableSqlContainerPropertiesResourceContainer
+ {
+ ///
+ /// Initializes a new instance of the
+ /// RestorableSqlContainerPropertiesResourceContainer class.
+ ///
+ public RestorableSqlContainerPropertiesResourceContainer()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// RestorableSqlContainerPropertiesResourceContainer class.
+ ///
+ /// Name of the Cosmos DB SQL container
+ /// The configuration of the indexing
+ /// policy. By default, the indexing is automatic for all document
+ /// paths within the container
+ /// The configuration of the partition key
+ /// to be used for partitioning data into multiple partitions
+ /// Default time to live
+ /// The unique key policy configuration
+ /// for specifying uniqueness constraints on documents in the
+ /// collection in the Azure Cosmos DB service.
+ /// The conflict resolution
+ /// policy for the container.
+ /// Analytical TTL.
+ /// A system generated property. A unique
+ /// identifier.
+ /// A system generated property that denotes the last
+ /// updated timestamp of the resource.
+ /// A system generated property representing the
+ /// resource etag required for optimistic concurrency control.
+ /// A system generated property that specifies the
+ /// addressable path of the container resource.
+ public RestorableSqlContainerPropertiesResourceContainer(string id, IndexingPolicy indexingPolicy = default(IndexingPolicy), ContainerPartitionKey partitionKey = default(ContainerPartitionKey), int? defaultTtl = default(int?), UniqueKeyPolicy uniqueKeyPolicy = default(UniqueKeyPolicy), ConflictResolutionPolicy conflictResolutionPolicy = default(ConflictResolutionPolicy), long? analyticalStorageTtl = default(long?), string _rid = default(string), double? _ts = default(double?), string _etag = default(string), string _self = default(string))
+ {
+ Id = id;
+ IndexingPolicy = indexingPolicy;
+ PartitionKey = partitionKey;
+ DefaultTtl = defaultTtl;
+ UniqueKeyPolicy = uniqueKeyPolicy;
+ ConflictResolutionPolicy = conflictResolutionPolicy;
+ AnalyticalStorageTtl = analyticalStorageTtl;
+ this._rid = _rid;
+ this._ts = _ts;
+ this._etag = _etag;
+ this._self = _self;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets name of the Cosmos DB SQL container
+ ///
+ [JsonProperty(PropertyName = "id")]
+ public string Id { get; set; }
+
+ ///
+ /// Gets or sets the configuration of the indexing policy. By default,
+ /// the indexing is automatic for all document paths within the
+ /// container
+ ///
+ [JsonProperty(PropertyName = "indexingPolicy")]
+ public IndexingPolicy IndexingPolicy { get; set; }
+
+ ///
+ /// Gets or sets the configuration of the partition key to be used for
+ /// partitioning data into multiple partitions
+ ///
+ [JsonProperty(PropertyName = "partitionKey")]
+ public ContainerPartitionKey PartitionKey { get; set; }
+
+ ///
+ /// Gets or sets default time to live
+ ///
+ [JsonProperty(PropertyName = "defaultTtl")]
+ public int? DefaultTtl { get; set; }
+
+ ///
+ /// Gets or sets the unique key policy configuration for specifying
+ /// uniqueness constraints on documents in the collection in the Azure
+ /// Cosmos DB service.
+ ///
+ [JsonProperty(PropertyName = "uniqueKeyPolicy")]
+ public UniqueKeyPolicy UniqueKeyPolicy { get; set; }
+
+ ///
+ /// Gets or sets the conflict resolution policy for the container.
+ ///
+ [JsonProperty(PropertyName = "conflictResolutionPolicy")]
+ public ConflictResolutionPolicy ConflictResolutionPolicy { get; set; }
+
+ ///
+ /// Gets or sets analytical TTL.
+ ///
+ [JsonProperty(PropertyName = "analyticalStorageTtl")]
+ public long? AnalyticalStorageTtl { get; set; }
+
+ ///
+ /// Gets a system generated property. A unique identifier.
+ ///
+ [JsonProperty(PropertyName = "_rid")]
+ public string _rid { get; private set; }
+
+ ///
+ /// Gets a system generated property that denotes the last updated
+ /// timestamp of the resource.
+ ///
+ [JsonProperty(PropertyName = "_ts")]
+ public double? _ts { get; private set; }
+
+ ///
+ /// Gets a system generated property representing the resource etag
+ /// required for optimistic concurrency control.
+ ///
+ [JsonProperty(PropertyName = "_etag")]
+ public string _etag { get; private set; }
+
+ ///
+ /// Gets a system generated property that specifies the addressable
+ /// path of the container resource.
+ ///
+ [JsonProperty(PropertyName = "_self")]
+ public string _self { get; private set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Id == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Id");
+ }
+ if (PartitionKey != null)
+ {
+ PartitionKey.Validate();
+ }
+ }
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableSqlDatabaseGetResult.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableSqlDatabaseGetResult.cs
new file mode 100644
index 0000000000000..b9b9a715c3812
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableSqlDatabaseGetResult.cs
@@ -0,0 +1,95 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// An Azure Cosmos DB SQL database event
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class RestorableSqlDatabaseGetResult
+ {
+ ///
+ /// Initializes a new instance of the RestorableSqlDatabaseGetResult
+ /// class.
+ ///
+ public RestorableSqlDatabaseGetResult()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the RestorableSqlDatabaseGetResult
+ /// class.
+ ///
+ /// The resource of an Azure Cosmos DB SQL
+ /// database event
+ /// The unique resource Identifier of the ARM
+ /// resource.
+ /// The name of the ARM resource.
+ /// The type of Azure resource.
+ public RestorableSqlDatabaseGetResult(RestorableSqlDatabasePropertiesResource resource = default(RestorableSqlDatabasePropertiesResource), string id = default(string), string name = default(string), string type = default(string))
+ {
+ Resource = resource;
+ Id = id;
+ Name = name;
+ Type = type;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the resource of an Azure Cosmos DB SQL database event
+ ///
+ [JsonProperty(PropertyName = "properties.resource")]
+ public RestorableSqlDatabasePropertiesResource Resource { get; set; }
+
+ ///
+ /// Gets the unique resource Identifier of the ARM resource.
+ ///
+ [JsonProperty(PropertyName = "id")]
+ public string Id { get; private set; }
+
+ ///
+ /// Gets the name of the ARM resource.
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; private set; }
+
+ ///
+ /// Gets the type of Azure resource.
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public string Type { get; private set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Resource != null)
+ {
+ Resource.Validate();
+ }
+ }
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableSqlDatabasePropertiesResource.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableSqlDatabasePropertiesResource.cs
new file mode 100644
index 0000000000000..ba9bbcbdb6f95
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableSqlDatabasePropertiesResource.cs
@@ -0,0 +1,113 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The resource of an Azure Cosmos DB SQL database event
+ ///
+ public partial class RestorableSqlDatabasePropertiesResource
+ {
+ ///
+ /// Initializes a new instance of the
+ /// RestorableSqlDatabasePropertiesResource class.
+ ///
+ public RestorableSqlDatabasePropertiesResource()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// RestorableSqlDatabasePropertiesResource class.
+ ///
+ /// A system generated property. A unique
+ /// identifier.
+ /// The operation type of this database
+ /// event. Possible values include: 'Create', 'Replace', 'Delete',
+ /// 'SystemOperation'
+ /// The time when this database event
+ /// happened.
+ /// The name of the SQL database.
+ /// The resource ID of the SQL
+ /// database.
+ /// Cosmos DB SQL database resource
+ /// object
+ public RestorableSqlDatabasePropertiesResource(string _rid = default(string), string operationType = default(string), string eventTimestamp = default(string), string ownerId = default(string), string ownerResourceId = default(string), RestorableSqlDatabasePropertiesResourceDatabase database = default(RestorableSqlDatabasePropertiesResourceDatabase))
+ {
+ this._rid = _rid;
+ OperationType = operationType;
+ EventTimestamp = eventTimestamp;
+ OwnerId = ownerId;
+ OwnerResourceId = ownerResourceId;
+ Database = database;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets a system generated property. A unique identifier.
+ ///
+ [JsonProperty(PropertyName = "_rid")]
+ public string _rid { get; private set; }
+
+ ///
+ /// Gets the operation type of this database event. Possible values
+ /// include: 'Create', 'Replace', 'Delete', 'SystemOperation'
+ ///
+ [JsonProperty(PropertyName = "operationType")]
+ public string OperationType { get; private set; }
+
+ ///
+ /// Gets the time when this database event happened.
+ ///
+ [JsonProperty(PropertyName = "eventTimestamp")]
+ public string EventTimestamp { get; private set; }
+
+ ///
+ /// Gets the name of the SQL database.
+ ///
+ [JsonProperty(PropertyName = "ownerId")]
+ public string OwnerId { get; private set; }
+
+ ///
+ /// Gets the resource ID of the SQL database.
+ ///
+ [JsonProperty(PropertyName = "ownerResourceId")]
+ public string OwnerResourceId { get; private set; }
+
+ ///
+ /// Gets or sets cosmos DB SQL database resource object
+ ///
+ [JsonProperty(PropertyName = "database")]
+ public RestorableSqlDatabasePropertiesResourceDatabase Database { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Database != null)
+ {
+ Database.Validate();
+ }
+ }
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableSqlDatabasePropertiesResourceDatabase.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableSqlDatabasePropertiesResourceDatabase.cs
new file mode 100644
index 0000000000000..d17a30ea4a3e1
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableSqlDatabasePropertiesResourceDatabase.cs
@@ -0,0 +1,126 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+ using Microsoft.Rest;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Cosmos DB SQL database resource object
+ ///
+ public partial class RestorableSqlDatabasePropertiesResourceDatabase
+ {
+ ///
+ /// Initializes a new instance of the
+ /// RestorableSqlDatabasePropertiesResourceDatabase class.
+ ///
+ public RestorableSqlDatabasePropertiesResourceDatabase()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// RestorableSqlDatabasePropertiesResourceDatabase class.
+ ///
+ /// Name of the Cosmos DB SQL database
+ /// A system generated property. A unique
+ /// identifier.
+ /// A system generated property that denotes the last
+ /// updated timestamp of the resource.
+ /// A system generated property representing the
+ /// resource etag required for optimistic concurrency control.
+ /// A system generated property that specified the
+ /// addressable path of the collections resource.
+ /// A system generated property that specifies the
+ /// addressable path of the users resource.
+ /// A system generated property that specifies the
+ /// addressable path of the database resource.
+ public RestorableSqlDatabasePropertiesResourceDatabase(string id, string _rid = default(string), double? _ts = default(double?), string _etag = default(string), string _colls = default(string), string _users = default(string), string _self = default(string))
+ {
+ Id = id;
+ this._rid = _rid;
+ this._ts = _ts;
+ this._etag = _etag;
+ this._colls = _colls;
+ this._users = _users;
+ this._self = _self;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets name of the Cosmos DB SQL database
+ ///
+ [JsonProperty(PropertyName = "id")]
+ public string Id { get; set; }
+
+ ///
+ /// Gets a system generated property. A unique identifier.
+ ///
+ [JsonProperty(PropertyName = "_rid")]
+ public string _rid { get; private set; }
+
+ ///
+ /// Gets a system generated property that denotes the last updated
+ /// timestamp of the resource.
+ ///
+ [JsonProperty(PropertyName = "_ts")]
+ public double? _ts { get; private set; }
+
+ ///
+ /// Gets a system generated property representing the resource etag
+ /// required for optimistic concurrency control.
+ ///
+ [JsonProperty(PropertyName = "_etag")]
+ public string _etag { get; private set; }
+
+ ///
+ /// Gets a system generated property that specified the addressable
+ /// path of the collections resource.
+ ///
+ [JsonProperty(PropertyName = "_colls")]
+ public string _colls { get; private set; }
+
+ ///
+ /// Gets a system generated property that specifies the addressable
+ /// path of the users resource.
+ ///
+ [JsonProperty(PropertyName = "_users")]
+ public string _users { get; private set; }
+
+ ///
+ /// Gets a system generated property that specifies the addressable
+ /// path of the database resource.
+ ///
+ [JsonProperty(PropertyName = "_self")]
+ public string _self { get; private set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Id == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Id");
+ }
+ }
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestoreMode.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestoreMode.cs
new file mode 100644
index 0000000000000..347b1a4033f20
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestoreMode.cs
@@ -0,0 +1,21 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+
+ ///
+ /// Defines values for RestoreMode.
+ ///
+ public static class RestoreMode
+ {
+ public const string PointInTime = "PointInTime";
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestoreParameters.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestoreParameters.cs
new file mode 100644
index 0000000000000..2fd078b19f031
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestoreParameters.cs
@@ -0,0 +1,86 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Parameters to indicate the information about the restore.
+ ///
+ public partial class RestoreParameters
+ {
+ ///
+ /// Initializes a new instance of the RestoreParameters class.
+ ///
+ public RestoreParameters()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the RestoreParameters class.
+ ///
+ /// Describes the mode of the restore.
+ /// Possible values include: 'PointInTime'
+ /// The id of the restorable database
+ /// account from which the restore has to be initiated. For example:
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}
+ /// Time to which the account has
+ /// to be restored (ISO-8601 format).
+ /// List of specific databases
+ /// available for restore.
+ public RestoreParameters(string restoreMode = default(string), string restoreSource = default(string), System.DateTime? restoreTimestampInUtc = default(System.DateTime?), IList databasesToRestore = default(IList))
+ {
+ RestoreMode = restoreMode;
+ RestoreSource = restoreSource;
+ RestoreTimestampInUtc = restoreTimestampInUtc;
+ DatabasesToRestore = databasesToRestore;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets describes the mode of the restore. Possible values
+ /// include: 'PointInTime'
+ ///
+ [JsonProperty(PropertyName = "restoreMode")]
+ public string RestoreMode { get; set; }
+
+ ///
+ /// Gets or sets the id of the restorable database account from which
+ /// the restore has to be initiated. For example:
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}
+ ///
+ [JsonProperty(PropertyName = "restoreSource")]
+ public string RestoreSource { get; set; }
+
+ ///
+ /// Gets or sets time to which the account has to be restored (ISO-8601
+ /// format).
+ ///
+ [JsonProperty(PropertyName = "restoreTimestampInUtc")]
+ public System.DateTime? RestoreTimestampInUtc { get; set; }
+
+ ///
+ /// Gets or sets list of specific databases available for restore.
+ ///
+ [JsonProperty(PropertyName = "databasesToRestore")]
+ public IList DatabasesToRestore { get; set; }
+
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/SystemData.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/SystemData.cs
new file mode 100644
index 0000000000000..9cb1fb8254a0f
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/SystemData.cs
@@ -0,0 +1,103 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Metadata pertaining to creation and last modification of the resource.
+ ///
+ public partial class SystemData
+ {
+ ///
+ /// Initializes a new instance of the SystemData class.
+ ///
+ public SystemData()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SystemData class.
+ ///
+ /// The identity that created the
+ /// resource.
+ /// The type of identity that created the
+ /// resource. Possible values include: 'User', 'Application',
+ /// 'ManagedIdentity', 'Key'
+ /// The timestamp of resource creation
+ /// (UTC).
+ /// The identity that last modified the
+ /// resource.
+ /// The type of identity that last
+ /// modified the resource. Possible values include: 'User',
+ /// 'Application', 'ManagedIdentity', 'Key'
+ /// The timestamp of resource last
+ /// modification (UTC)
+ public SystemData(string createdBy = default(string), string createdByType = default(string), System.DateTime? createdAt = default(System.DateTime?), string lastModifiedBy = default(string), string lastModifiedByType = default(string), System.DateTime? lastModifiedAt = default(System.DateTime?))
+ {
+ CreatedBy = createdBy;
+ CreatedByType = createdByType;
+ CreatedAt = createdAt;
+ LastModifiedBy = lastModifiedBy;
+ LastModifiedByType = lastModifiedByType;
+ LastModifiedAt = lastModifiedAt;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the identity that created the resource.
+ ///
+ [JsonProperty(PropertyName = "createdBy")]
+ public string CreatedBy { get; set; }
+
+ ///
+ /// Gets or sets the type of identity that created the resource.
+ /// Possible values include: 'User', 'Application', 'ManagedIdentity',
+ /// 'Key'
+ ///
+ [JsonProperty(PropertyName = "createdByType")]
+ public string CreatedByType { get; set; }
+
+ ///
+ /// Gets or sets the timestamp of resource creation (UTC).
+ ///
+ [JsonProperty(PropertyName = "createdAt")]
+ public System.DateTime? CreatedAt { get; set; }
+
+ ///
+ /// Gets or sets the identity that last modified the resource.
+ ///
+ [JsonProperty(PropertyName = "lastModifiedBy")]
+ public string LastModifiedBy { get; set; }
+
+ ///
+ /// Gets or sets the type of identity that last modified the resource.
+ /// Possible values include: 'User', 'Application', 'ManagedIdentity',
+ /// 'Key'
+ ///
+ [JsonProperty(PropertyName = "lastModifiedByType")]
+ public string LastModifiedByType { get; set; }
+
+ ///
+ /// Gets or sets the timestamp of resource last modification (UTC)
+ ///
+ [JsonProperty(PropertyName = "lastModifiedAt")]
+ public System.DateTime? LastModifiedAt { get; set; }
+
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/MongoDBResourcesOperations.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/MongoDBResourcesOperations.cs
index 465fb26b1ef6b..18646bec6c93c 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/MongoDBResourcesOperations.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/MongoDBResourcesOperations.cs
@@ -108,10 +108,6 @@ internal MongoDBResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -352,10 +348,6 @@ internal MongoDBResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -655,10 +647,6 @@ internal MongoDBResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -986,10 +974,6 @@ internal MongoDBResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -1239,10 +1223,6 @@ internal MongoDBResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -1557,10 +1537,6 @@ internal MongoDBResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -1905,10 +1881,6 @@ internal MongoDBResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -2166,10 +2138,6 @@ internal MongoDBResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -2401,10 +2369,6 @@ internal MongoDBResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -2666,10 +2630,6 @@ internal MongoDBResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -2916,10 +2876,6 @@ internal MongoDBResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -3171,10 +3127,6 @@ internal MongoDBResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -3441,10 +3393,6 @@ internal MongoDBResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -3685,10 +3633,6 @@ internal MongoDBResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -3959,10 +3903,6 @@ internal MongoDBResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
@@ -4218,10 +4158,6 @@ internal MongoDBResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/NotebookWorkspacesOperations.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/NotebookWorkspacesOperations.cs
index cd345eace5e00..44f42b376404b 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/NotebookWorkspacesOperations.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/NotebookWorkspacesOperations.cs
@@ -107,10 +107,6 @@ internal NotebookWorkspacesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (Client.ApiVersion == null)
{
@@ -342,10 +338,6 @@ internal NotebookWorkspacesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (Client.ApiVersion == null)
{
@@ -624,10 +616,6 @@ internal NotebookWorkspacesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (Client.ApiVersion == null)
{
@@ -906,10 +894,6 @@ internal NotebookWorkspacesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (Client.ApiVersion == null)
{
@@ -1149,10 +1133,6 @@ internal NotebookWorkspacesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (Client.ApiVersion == null)
{
@@ -1366,10 +1346,6 @@ internal NotebookWorkspacesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (Client.ApiVersion == null)
{
@@ -1583,10 +1559,6 @@ internal NotebookWorkspacesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (Client.ApiVersion == null)
{
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/PartitionKeyRangeIdOperations.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/PartitionKeyRangeIdOperations.cs
index 1590e2151a3af..911e686adeae2 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/PartitionKeyRangeIdOperations.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/PartitionKeyRangeIdOperations.cs
@@ -123,10 +123,6 @@ internal PartitionKeyRangeIdOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/PartitionKeyRangeIdRegionOperations.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/PartitionKeyRangeIdRegionOperations.cs
index 6a118c9fda03a..1214ed73af459 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/PartitionKeyRangeIdRegionOperations.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/PartitionKeyRangeIdRegionOperations.cs
@@ -126,10 +126,6 @@ internal PartitionKeyRangeIdRegionOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/PercentileOperations.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/PercentileOperations.cs
index 8c37a40f2cb15..85cf19d0558a3 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/PercentileOperations.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/PercentileOperations.cs
@@ -114,10 +114,6 @@ internal PercentileOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/PercentileSourceTargetOperations.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/PercentileSourceTargetOperations.cs
index 125a8300bd6a6..80dc89af30339 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/PercentileSourceTargetOperations.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/PercentileSourceTargetOperations.cs
@@ -123,10 +123,6 @@ internal PercentileSourceTargetOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/PercentileTargetOperations.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/PercentileTargetOperations.cs
index 3170cdfc17540..8fdead41d1f2b 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/PercentileTargetOperations.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/PercentileTargetOperations.cs
@@ -118,10 +118,6 @@ internal PercentileTargetOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (accountName == null)
{
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/PrivateEndpointConnectionsOperations.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/PrivateEndpointConnectionsOperations.cs
index 04d3107596dfa..f0312253fad42 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/PrivateEndpointConnectionsOperations.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/PrivateEndpointConnectionsOperations.cs
@@ -107,10 +107,6 @@ internal PrivateEndpointConnectionsOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (Client.ApiVersion == null)
{
@@ -350,10 +346,6 @@ internal PrivateEndpointConnectionsOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (Client.ApiVersion == null)
{
@@ -653,10 +645,6 @@ internal PrivateEndpointConnectionsOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (Client.ApiVersion == null)
{
@@ -905,10 +893,6 @@ internal PrivateEndpointConnectionsOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (Client.ApiVersion == null)
{
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/PrivateLinkResourcesOperations.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/PrivateLinkResourcesOperations.cs
index 254571ca6f4d4..68094748b27b5 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/PrivateLinkResourcesOperations.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/PrivateLinkResourcesOperations.cs
@@ -108,10 +108,6 @@ internal PrivateLinkResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (Client.ApiVersion == null)
{
@@ -352,10 +348,6 @@ internal PrivateLinkResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (Client.ApiVersion == null)
{
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/RestorableDatabaseAccountsOperations.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/RestorableDatabaseAccountsOperations.cs
new file mode 100644
index 0000000000000..ff6c0c1e5ac15
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/RestorableDatabaseAccountsOperations.cs
@@ -0,0 +1,666 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Net;
+ using System.Net.Http;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// RestorableDatabaseAccountsOperations operations.
+ ///
+ internal partial class RestorableDatabaseAccountsOperations : IServiceOperations, IRestorableDatabaseAccountsOperations
+ {
+ ///
+ /// Initializes a new instance of the RestorableDatabaseAccountsOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal RestorableDatabaseAccountsOperations(CosmosDBManagementClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the CosmosDBManagementClient
+ ///
+ public CosmosDBManagementClient Client { get; private set; }
+
+ ///
+ /// Lists all the restorable Azure Cosmos DB database accounts available under
+ /// the subscription and in a region. This call requires
+ /// 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read'
+ /// permission.
+ ///
+ ///
+ /// Cosmos DB region, with spaces between words and each word capitalized.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListByLocationWithHttpMessagesAsync(string location, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
+ if (location == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "location");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("location", location);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListByLocation", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{location}", System.Uri.EscapeDataString(location));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Lists all the restorable Azure Cosmos DB database accounts available under
+ /// the subscription. This call requires
+ /// 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read'
+ /// permission.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/restorableDatabaseAccounts").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Retrieves the properties of an existing Azure Cosmos DB restorable database
+ /// account. This call requires
+ /// 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read/*'
+ /// permission.
+ ///
+ ///
+ /// Cosmos DB region, with spaces between words and each word capitalized.
+ ///
+ ///
+ /// The instanceId GUID of a restorable database account.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> GetByLocationWithHttpMessagesAsync(string location, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
+ if (location == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "location");
+ }
+ if (instanceId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "instanceId");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("location", location);
+ tracingParameters.Add("instanceId", instanceId);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "GetByLocation", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{location}", System.Uri.EscapeDataString(location));
+ _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/RestorableDatabaseAccountsOperationsExtensions.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/RestorableDatabaseAccountsOperationsExtensions.cs
new file mode 100644
index 0000000000000..3de1f9e51ec1b
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/RestorableDatabaseAccountsOperationsExtensions.cs
@@ -0,0 +1,147 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for RestorableDatabaseAccountsOperations.
+ ///
+ public static partial class RestorableDatabaseAccountsOperationsExtensions
+ {
+ ///
+ /// Lists all the restorable Azure Cosmos DB database accounts available under
+ /// the subscription and in a region. This call requires
+ /// 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read'
+ /// permission.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Cosmos DB region, with spaces between words and each word capitalized.
+ ///
+ public static IEnumerable ListByLocation(this IRestorableDatabaseAccountsOperations operations, string location)
+ {
+ return operations.ListByLocationAsync(location).GetAwaiter().GetResult();
+ }
+
+ ///