diff --git a/eng/mgmt/mgmtmetadata/postgresql_resource-manager.txt b/eng/mgmt/mgmtmetadata/postgresql_resource-manager.txt
new file mode 100644
index 0000000000000..a51d959b948f8
--- /dev/null
+++ b/eng/mgmt/mgmtmetadata/postgresql_resource-manager.txt
@@ -0,0 +1,14 @@
+Installing AutoRest version: v2
+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/postgresql/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp.namespace=Microsoft.Azure.Management.PostgreSQL.FlexibleServers --tag=package-2020-02-14-privatepreview --csharp.output-folder=C:\z\azure-sdk-for-net\sdk\postgresql\Microsoft.Azure.Management.PostgreSQL\src\postgresqlflexibleservers\Generated
+2020-09-11 22:12:52 UTC
+Azure-rest-api-specs repository information
+GitHub fork: Azure
+Branch: master
+Commit: faf8e1c19e3b36e6d16622bf168369a838b04a7f
+AutoRest information
+Requested version: v2
+Bootstrapper version: autorest@2.0.4413
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/AzSdk.RP.props b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/AzSdk.RP.props
index 3f57db183b4f7..65a711a104300 100644
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/AzSdk.RP.props
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/AzSdk.RP.props
@@ -1,7 +1,7 @@
- DBforPostgreSQL_2017-12-01;
+ DBforPostgreSQL_2017-12-01;DBforPostgreSQL_2018-06-01;DBforPostgreSQL_2020-01-01;DBforPostgreSQL_2020-02-14-privatepreview;
$(PackageTags);$(CommonTags);$(AzureApiTag);
\ No newline at end of file
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/SdkInfo_PostgreSQLManagementClient.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/SdkInfo_PostgreSQLManagementClient.cs
deleted file mode 100644
index de96637c193f0..0000000000000
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/SdkInfo_PostgreSQLManagementClient.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-
-//
-// 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.PostgreSQL
-{
- using System;
- using System.Collections.Generic;
- using System.Linq;
-
- internal static partial class SdkInfo
- {
- public static IEnumerable> ApiInfo_PostgreSQLManagementClient
- {
- get
- {
- return new Tuple[]
- {
- new Tuple("DBforPostgreSQL", "CheckNameAvailability", "2017-12-01"),
- new Tuple("DBforPostgreSQL", "Configurations", "2017-12-01"),
- new Tuple("DBforPostgreSQL", "Databases", "2017-12-01"),
- new Tuple("DBforPostgreSQL", "FirewallRules", "2017-12-01"),
- new Tuple("DBforPostgreSQL", "LocationBasedPerformanceTier", "2017-12-01"),
- new Tuple("DBforPostgreSQL", "LogFiles", "2017-12-01"),
- new Tuple("DBforPostgreSQL", "Operations", "2017-12-01"),
- new Tuple("DBforPostgreSQL", "Replicas", "2017-12-01"),
- new Tuple("DBforPostgreSQL", "ServerSecurityAlertPolicies", "2017-12-01"),
- new Tuple("DBforPostgreSQL", "Servers", "2017-12-01"),
- new Tuple("DBforPostgreSQL", "VirtualNetworkRules", "2017-12-01"),
- }.AsEnumerable();
- }
- }
- }
-}
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Microsoft.Azure.Management.PostgreSQL.csproj b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Microsoft.Azure.Management.PostgreSQL.csproj
index 1a9c3553c79dd..7027224f3f202 100644
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Microsoft.Azure.Management.PostgreSQL.csproj
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Microsoft.Azure.Management.PostgreSQL.csproj
@@ -6,13 +6,14 @@
Microsoft.Azure.Management.PostgreSQL
Provides developers with libraries for the Azure Database for PostgreSQL under Azure Resource manager to deploy an instance of PostgreSQL. Create, Update, Delete, Restore, and more.
- 0.9.0-preview
+ 0.9.5-preview
Microsoft.Azure.Management.PostgreSQL
PostgreSQL;Azure Database for PostgreSQL;
+ This is a public release of the Azure Database for PostgreSQL SDK. This release includes management libraries for managing
+ New deployment type called Flexible-Servers (refer aka.ms/postgresflexibleserver for more info)
+ ]]>
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Properties/AssemblyInfo.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Properties/AssemblyInfo.cs
index 2ec69f30faac0..5eb22e554d330 100644
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Properties/AssemblyInfo.cs
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Properties/AssemblyInfo.cs
@@ -7,8 +7,8 @@
[assembly: AssemblyTitle("Microsoft Azure Database for PostgreSQL Management Library")]
[assembly: AssemblyDescription("Provides management functionality for Microsoft Azure Database for PostgreSQL Resources.")]
-[assembly: AssemblyVersion("0.9.0")]
-[assembly: AssemblyFileVersion("0.9.0")]
+[assembly: AssemblyVersion("0.9.5")]
+[assembly: AssemblyFileVersion("0.9.5")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("Microsoft Azure .NET SDK")]
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/generate.ps1 b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/generate.ps1
index a07665f48e0fe..1133b214c10d6 100644
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/generate.ps1
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/generate.ps1
@@ -1 +1,2 @@
-Start-AutoRestCodeGeneration -ResourceProvider "postgresql/resource-manager" -AutoRestVersion "v2"
+Start-AutoRestCodeGeneration -ResourceProvider "postgresql/resource-manager" -AutoRestVersion "v2" -SdkGenerationDirectory "$PSScriptRoot\postgresql\Generated"
+Start-AutoRestCodeGeneration -ResourceProvider "postgresql/resource-manager" -AutoRestVersion "v2" -SdkGenerationDirectory "$PSScriptRoot\postgresqlflexibleservers\Generated" -ConfigFileTag "package-2020-02-14-privatepreview" -Namespace "Microsoft.Azure.Management.PostgreSQL.FlexibleServers"
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/CheckNameAvailabilityOperations.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/CheckNameAvailabilityOperations.cs
similarity index 95%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/CheckNameAvailabilityOperations.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/CheckNameAvailabilityOperations.cs
index 05f96f4f27b53..28c3e6068754a 100644
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/CheckNameAvailabilityOperations.cs
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/CheckNameAvailabilityOperations.cs
@@ -79,14 +79,17 @@ internal CheckNameAvailabilityOperations(PostgreSQLManagementClient client)
///
public async Task> ExecuteWithHttpMessagesAsync(NameAvailabilityRequest nameAvailabilityRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
- if (Client.ApiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
- }
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 (nameAvailabilityRequest == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "nameAvailabilityRequest");
@@ -95,6 +98,7 @@ internal CheckNameAvailabilityOperations(PostgreSQLManagementClient client)
{
nameAvailabilityRequest.Validate();
}
+ string apiVersion = "2017-12-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -102,18 +106,19 @@ internal CheckNameAvailabilityOperations(PostgreSQLManagementClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("nameAvailabilityRequest", nameAvailabilityRequest);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "Execute", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/checkNameAvailability").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.DBForPostgreSQL/checkNameAvailability").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
List _queryParameters = new List();
- if (Client.ApiVersion != null)
+ if (apiVersion != null)
{
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
}
if (_queryParameters.Count > 0)
{
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/CheckNameAvailabilityOperationsExtensions.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/CheckNameAvailabilityOperationsExtensions.cs
similarity index 100%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/CheckNameAvailabilityOperationsExtensions.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/CheckNameAvailabilityOperationsExtensions.cs
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/ConfigurationsOperations.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/ConfigurationsOperations.cs
similarity index 88%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/ConfigurationsOperations.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/ConfigurationsOperations.cs
index a28796d077951..68cafb36067b4 100644
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/ConfigurationsOperations.cs
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/ConfigurationsOperations.cs
@@ -54,8 +54,7 @@ internal ConfigurationsOperations(PostgreSQLManagementClient client)
/// Updates a configuration of a server.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -83,8 +82,7 @@ internal ConfigurationsOperations(PostgreSQLManagementClient client)
/// Gets information about a configuration of server.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -115,18 +113,36 @@ internal ConfigurationsOperations(PostgreSQLManagementClient client)
///
public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string configurationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
- if (Client.ApiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
- }
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 (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
if (serverName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "serverName");
@@ -135,6 +151,7 @@ internal ConfigurationsOperations(PostgreSQLManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "configurationName");
}
+ string apiVersion = "2017-12-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -142,6 +159,7 @@ internal ConfigurationsOperations(PostgreSQLManagementClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("serverName", serverName);
tracingParameters.Add("configurationName", configurationName);
@@ -150,15 +168,15 @@ internal ConfigurationsOperations(PostgreSQLManagementClient client)
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/configurations/{configurationName}").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/configurations/{configurationName}").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
_url = _url.Replace("{configurationName}", System.Uri.EscapeDataString(configurationName));
List _queryParameters = new List();
- if (Client.ApiVersion != null)
+ if (apiVersion != null)
{
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
}
if (_queryParameters.Count > 0)
{
@@ -289,8 +307,7 @@ internal ConfigurationsOperations(PostgreSQLManagementClient client)
/// List all the configurations in a given server.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -318,22 +335,41 @@ internal ConfigurationsOperations(PostgreSQLManagementClient client)
///
public async Task>> ListByServerWithHttpMessagesAsync(string resourceGroupName, string serverName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
- if (Client.ApiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
- }
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 (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
if (serverName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "serverName");
}
+ string apiVersion = "2017-12-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -341,6 +377,7 @@ internal ConfigurationsOperations(PostgreSQLManagementClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("serverName", serverName);
tracingParameters.Add("cancellationToken", cancellationToken);
@@ -348,14 +385,14 @@ internal ConfigurationsOperations(PostgreSQLManagementClient client)
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/configurations").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/configurations").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
List _queryParameters = new List();
- if (Client.ApiVersion != null)
+ if (apiVersion != null)
{
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
}
if (_queryParameters.Count > 0)
{
@@ -486,8 +523,7 @@ internal ConfigurationsOperations(PostgreSQLManagementClient client)
/// Updates a configuration of a server.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -521,18 +557,36 @@ internal ConfigurationsOperations(PostgreSQLManagementClient client)
///
public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string configurationName, Configuration parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
- if (Client.ApiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
- }
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 (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
if (serverName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "serverName");
@@ -545,6 +599,7 @@ internal ConfigurationsOperations(PostgreSQLManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
}
+ string apiVersion = "2017-12-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -552,6 +607,7 @@ internal ConfigurationsOperations(PostgreSQLManagementClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("serverName", serverName);
tracingParameters.Add("configurationName", configurationName);
@@ -561,15 +617,15 @@ internal ConfigurationsOperations(PostgreSQLManagementClient client)
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/configurations/{configurationName}").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/configurations/{configurationName}").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
_url = _url.Replace("{configurationName}", System.Uri.EscapeDataString(configurationName));
List _queryParameters = new List();
- if (Client.ApiVersion != null)
+ if (apiVersion != null)
{
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
}
if (_queryParameters.Count > 0)
{
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/ConfigurationsOperationsExtensions.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/ConfigurationsOperationsExtensions.cs
similarity index 87%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/ConfigurationsOperationsExtensions.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/ConfigurationsOperationsExtensions.cs
index 2867544747893..baa28212f6495 100644
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/ConfigurationsOperationsExtensions.cs
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/ConfigurationsOperationsExtensions.cs
@@ -30,8 +30,7 @@ public static partial class ConfigurationsOperationsExtensions
/// The operations group for this extension method.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -54,8 +53,7 @@ public static Configuration CreateOrUpdate(this IConfigurationsOperations operat
/// The operations group for this extension method.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -84,8 +82,7 @@ public static Configuration CreateOrUpdate(this IConfigurationsOperations operat
/// The operations group for this extension method.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -105,8 +102,7 @@ public static Configuration Get(this IConfigurationsOperations operations, strin
/// The operations group for this extension method.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -132,8 +128,7 @@ public static Configuration Get(this IConfigurationsOperations operations, strin
/// The operations group for this extension method.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -150,8 +145,7 @@ public static IEnumerable ListByServer(this IConfigurationsOperat
/// The operations group for this extension method.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -174,8 +168,7 @@ public static IEnumerable ListByServer(this IConfigurationsOperat
/// The operations group for this extension method.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -198,8 +191,7 @@ public static Configuration BeginCreateOrUpdate(this IConfigurationsOperations o
/// The operations group for this extension method.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/DatabasesOperations.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/DatabasesOperations.cs
similarity index 88%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/DatabasesOperations.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/DatabasesOperations.cs
index be297d9d571a1..288e2cf275ea9 100644
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/DatabasesOperations.cs
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/DatabasesOperations.cs
@@ -54,8 +54,7 @@ internal DatabasesOperations(PostgreSQLManagementClient client)
/// Creates a new database or updates an existing database.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -83,8 +82,7 @@ internal DatabasesOperations(PostgreSQLManagementClient client)
/// Deletes a database.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -109,8 +107,7 @@ internal DatabasesOperations(PostgreSQLManagementClient client)
/// Gets information about a database.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -141,18 +138,36 @@ internal DatabasesOperations(PostgreSQLManagementClient client)
///
public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
- if (Client.ApiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
- }
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 (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
if (serverName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "serverName");
@@ -161,6 +176,7 @@ internal DatabasesOperations(PostgreSQLManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "databaseName");
}
+ string apiVersion = "2017-12-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -168,6 +184,7 @@ internal DatabasesOperations(PostgreSQLManagementClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("serverName", serverName);
tracingParameters.Add("databaseName", databaseName);
@@ -176,15 +193,15 @@ internal DatabasesOperations(PostgreSQLManagementClient client)
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/databases/{databaseName}").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/databases/{databaseName}").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
_url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName));
List _queryParameters = new List();
- if (Client.ApiVersion != null)
+ if (apiVersion != null)
{
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
}
if (_queryParameters.Count > 0)
{
@@ -315,8 +332,7 @@ internal DatabasesOperations(PostgreSQLManagementClient client)
/// List all the databases in a given server.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -344,22 +360,41 @@ internal DatabasesOperations(PostgreSQLManagementClient client)
///
public async Task>> ListByServerWithHttpMessagesAsync(string resourceGroupName, string serverName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
- if (Client.ApiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
- }
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 (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
if (serverName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "serverName");
}
+ string apiVersion = "2017-12-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -367,6 +402,7 @@ internal DatabasesOperations(PostgreSQLManagementClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("serverName", serverName);
tracingParameters.Add("cancellationToken", cancellationToken);
@@ -374,14 +410,14 @@ internal DatabasesOperations(PostgreSQLManagementClient client)
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/databases").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/databases").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
List _queryParameters = new List();
- if (Client.ApiVersion != null)
+ if (apiVersion != null)
{
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
}
if (_queryParameters.Count > 0)
{
@@ -512,8 +548,7 @@ internal DatabasesOperations(PostgreSQLManagementClient client)
/// Creates a new database or updates an existing database.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -547,18 +582,36 @@ internal DatabasesOperations(PostgreSQLManagementClient client)
///
public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Database parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
- if (Client.ApiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
- }
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 (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
if (serverName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "serverName");
@@ -571,6 +624,7 @@ internal DatabasesOperations(PostgreSQLManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
}
+ string apiVersion = "2017-12-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -578,6 +632,7 @@ internal DatabasesOperations(PostgreSQLManagementClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("serverName", serverName);
tracingParameters.Add("databaseName", databaseName);
@@ -587,15 +642,15 @@ internal DatabasesOperations(PostgreSQLManagementClient client)
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/databases/{databaseName}").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/databases/{databaseName}").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
_url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName));
List _queryParameters = new List();
- if (Client.ApiVersion != null)
+ if (apiVersion != null)
{
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
}
if (_queryParameters.Count > 0)
{
@@ -750,8 +805,7 @@ internal DatabasesOperations(PostgreSQLManagementClient client)
/// Deletes a database.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -779,18 +833,36 @@ internal DatabasesOperations(PostgreSQLManagementClient client)
///
public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
- if (Client.ApiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
- }
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 (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
if (serverName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "serverName");
@@ -799,6 +871,7 @@ internal DatabasesOperations(PostgreSQLManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "databaseName");
}
+ string apiVersion = "2017-12-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -806,6 +879,7 @@ internal DatabasesOperations(PostgreSQLManagementClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("serverName", serverName);
tracingParameters.Add("databaseName", databaseName);
@@ -814,15 +888,15 @@ internal DatabasesOperations(PostgreSQLManagementClient client)
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/databases/{databaseName}").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/databases/{databaseName}").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
_url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName));
List _queryParameters = new List();
- if (Client.ApiVersion != null)
+ if (apiVersion != null)
{
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
}
if (_queryParameters.Count > 0)
{
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/DatabasesOperationsExtensions.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/DatabasesOperationsExtensions.cs
similarity index 86%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/DatabasesOperationsExtensions.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/DatabasesOperationsExtensions.cs
index eb413e9f87d67..f3a1a5e17b8b2 100644
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/DatabasesOperationsExtensions.cs
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/DatabasesOperationsExtensions.cs
@@ -30,8 +30,7 @@ public static partial class DatabasesOperationsExtensions
/// The operations group for this extension method.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -54,8 +53,7 @@ public static Database CreateOrUpdate(this IDatabasesOperations operations, stri
/// The operations group for this extension method.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -84,8 +82,7 @@ public static Database CreateOrUpdate(this IDatabasesOperations operations, stri
/// The operations group for this extension method.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -105,8 +102,7 @@ public static void Delete(this IDatabasesOperations operations, string resourceG
/// The operations group for this extension method.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -129,8 +125,7 @@ public static void Delete(this IDatabasesOperations operations, string resourceG
/// The operations group for this extension method.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -150,8 +145,7 @@ public static Database Get(this IDatabasesOperations operations, string resource
/// The operations group for this extension method.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -177,8 +171,7 @@ public static Database Get(this IDatabasesOperations operations, string resource
/// The operations group for this extension method.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -195,8 +188,7 @@ public static IEnumerable ListByServer(this IDatabasesOperations opera
/// The operations group for this extension method.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -219,8 +211,7 @@ public static IEnumerable ListByServer(this IDatabasesOperations opera
/// The operations group for this extension method.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -243,8 +234,7 @@ public static Database BeginCreateOrUpdate(this IDatabasesOperations operations,
/// The operations group for this extension method.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -273,8 +263,7 @@ public static Database BeginCreateOrUpdate(this IDatabasesOperations operations,
/// The operations group for this extension method.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -294,8 +283,7 @@ public static void BeginDelete(this IDatabasesOperations operations, string reso
/// The operations group for this extension method.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/FirewallRulesOperations.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/FirewallRulesOperations.cs
similarity index 88%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/FirewallRulesOperations.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/FirewallRulesOperations.cs
index 3c2b301597c9f..a3dc237bccb0a 100644
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/FirewallRulesOperations.cs
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/FirewallRulesOperations.cs
@@ -54,8 +54,7 @@ internal FirewallRulesOperations(PostgreSQLManagementClient client)
/// Creates a new firewall rule or updates an existing firewall rule.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -83,8 +82,7 @@ internal FirewallRulesOperations(PostgreSQLManagementClient client)
/// Deletes a server firewall rule.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -109,8 +107,7 @@ internal FirewallRulesOperations(PostgreSQLManagementClient client)
/// Gets information about a server firewall rule.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -141,18 +138,36 @@ internal FirewallRulesOperations(PostgreSQLManagementClient client)
///
public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string firewallRuleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
- if (Client.ApiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
- }
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 (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
if (serverName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "serverName");
@@ -161,6 +176,7 @@ internal FirewallRulesOperations(PostgreSQLManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "firewallRuleName");
}
+ string apiVersion = "2017-12-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -168,6 +184,7 @@ internal FirewallRulesOperations(PostgreSQLManagementClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("serverName", serverName);
tracingParameters.Add("firewallRuleName", firewallRuleName);
@@ -176,15 +193,15 @@ internal FirewallRulesOperations(PostgreSQLManagementClient client)
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/firewallRules/{firewallRuleName}").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/firewallRules/{firewallRuleName}").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
_url = _url.Replace("{firewallRuleName}", System.Uri.EscapeDataString(firewallRuleName));
List _queryParameters = new List();
- if (Client.ApiVersion != null)
+ if (apiVersion != null)
{
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
}
if (_queryParameters.Count > 0)
{
@@ -315,8 +332,7 @@ internal FirewallRulesOperations(PostgreSQLManagementClient client)
/// List all the firewall rules in a given server.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -344,22 +360,41 @@ internal FirewallRulesOperations(PostgreSQLManagementClient client)
///
public async Task>> ListByServerWithHttpMessagesAsync(string resourceGroupName, string serverName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
- if (Client.ApiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
- }
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 (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
if (serverName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "serverName");
}
+ string apiVersion = "2017-12-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -367,6 +402,7 @@ internal FirewallRulesOperations(PostgreSQLManagementClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("serverName", serverName);
tracingParameters.Add("cancellationToken", cancellationToken);
@@ -374,14 +410,14 @@ internal FirewallRulesOperations(PostgreSQLManagementClient client)
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/firewallRules").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/firewallRules").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
List _queryParameters = new List();
- if (Client.ApiVersion != null)
+ if (apiVersion != null)
{
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
}
if (_queryParameters.Count > 0)
{
@@ -512,8 +548,7 @@ internal FirewallRulesOperations(PostgreSQLManagementClient client)
/// Creates a new firewall rule or updates an existing firewall rule.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -547,18 +582,36 @@ internal FirewallRulesOperations(PostgreSQLManagementClient client)
///
public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string firewallRuleName, FirewallRule parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
- if (Client.ApiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
- }
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 (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
if (serverName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "serverName");
@@ -575,6 +628,7 @@ internal FirewallRulesOperations(PostgreSQLManagementClient client)
{
parameters.Validate();
}
+ string apiVersion = "2017-12-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -582,6 +636,7 @@ internal FirewallRulesOperations(PostgreSQLManagementClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("serverName", serverName);
tracingParameters.Add("firewallRuleName", firewallRuleName);
@@ -591,15 +646,15 @@ internal FirewallRulesOperations(PostgreSQLManagementClient client)
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/firewallRules/{firewallRuleName}").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/firewallRules/{firewallRuleName}").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
_url = _url.Replace("{firewallRuleName}", System.Uri.EscapeDataString(firewallRuleName));
List _queryParameters = new List();
- if (Client.ApiVersion != null)
+ if (apiVersion != null)
{
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
}
if (_queryParameters.Count > 0)
{
@@ -754,8 +809,7 @@ internal FirewallRulesOperations(PostgreSQLManagementClient client)
/// Deletes a server firewall rule.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -783,18 +837,36 @@ internal FirewallRulesOperations(PostgreSQLManagementClient client)
///
public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string firewallRuleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
- if (Client.ApiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
- }
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 (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
if (serverName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "serverName");
@@ -803,6 +875,7 @@ internal FirewallRulesOperations(PostgreSQLManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "firewallRuleName");
}
+ string apiVersion = "2017-12-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -810,6 +883,7 @@ internal FirewallRulesOperations(PostgreSQLManagementClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("serverName", serverName);
tracingParameters.Add("firewallRuleName", firewallRuleName);
@@ -818,15 +892,15 @@ internal FirewallRulesOperations(PostgreSQLManagementClient client)
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/firewallRules/{firewallRuleName}").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/firewallRules/{firewallRuleName}").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
_url = _url.Replace("{firewallRuleName}", System.Uri.EscapeDataString(firewallRuleName));
List _queryParameters = new List();
- if (Client.ApiVersion != null)
+ if (apiVersion != null)
{
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
}
if (_queryParameters.Count > 0)
{
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/FirewallRulesOperationsExtensions.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/FirewallRulesOperationsExtensions.cs
similarity index 86%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/FirewallRulesOperationsExtensions.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/FirewallRulesOperationsExtensions.cs
index a510a677024f7..e8caebc5390f1 100644
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/FirewallRulesOperationsExtensions.cs
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/FirewallRulesOperationsExtensions.cs
@@ -30,8 +30,7 @@ public static partial class FirewallRulesOperationsExtensions
/// The operations group for this extension method.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -54,8 +53,7 @@ public static FirewallRule CreateOrUpdate(this IFirewallRulesOperations operatio
/// The operations group for this extension method.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -84,8 +82,7 @@ public static FirewallRule CreateOrUpdate(this IFirewallRulesOperations operatio
/// The operations group for this extension method.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -105,8 +102,7 @@ public static void Delete(this IFirewallRulesOperations operations, string resou
/// The operations group for this extension method.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -129,8 +125,7 @@ public static void Delete(this IFirewallRulesOperations operations, string resou
/// The operations group for this extension method.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -150,8 +145,7 @@ public static FirewallRule Get(this IFirewallRulesOperations operations, string
/// The operations group for this extension method.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -177,8 +171,7 @@ public static FirewallRule Get(this IFirewallRulesOperations operations, string
/// The operations group for this extension method.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -195,8 +188,7 @@ public static IEnumerable ListByServer(this IFirewallRulesOperatio
/// The operations group for this extension method.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -219,8 +211,7 @@ public static IEnumerable ListByServer(this IFirewallRulesOperatio
/// The operations group for this extension method.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -243,8 +234,7 @@ public static FirewallRule BeginCreateOrUpdate(this IFirewallRulesOperations ope
/// The operations group for this extension method.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -273,8 +263,7 @@ public static FirewallRule BeginCreateOrUpdate(this IFirewallRulesOperations ope
/// The operations group for this extension method.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -294,8 +283,7 @@ public static void BeginDelete(this IFirewallRulesOperations operations, string
/// The operations group for this extension method.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/ICheckNameAvailabilityOperations.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/ICheckNameAvailabilityOperations.cs
similarity index 100%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/ICheckNameAvailabilityOperations.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/ICheckNameAvailabilityOperations.cs
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/IConfigurationsOperations.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/IConfigurationsOperations.cs
similarity index 90%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/IConfigurationsOperations.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/IConfigurationsOperations.cs
index 7ef80e7971f9f..3aa3766785555 100644
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/IConfigurationsOperations.cs
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/IConfigurationsOperations.cs
@@ -27,9 +27,7 @@ public partial interface IConfigurationsOperations
/// Updates a configuration of a server.
///
///
- /// The name of the resource group that contains the resource. You can
- /// obtain this value from the Azure Resource Manager API or the
- /// portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -60,9 +58,7 @@ public partial interface IConfigurationsOperations
/// Gets information about a configuration of server.
///
///
- /// The name of the resource group that contains the resource. You can
- /// obtain this value from the Azure Resource Manager API or the
- /// portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -90,9 +86,7 @@ public partial interface IConfigurationsOperations
/// List all the configurations in a given server.
///
///
- /// The name of the resource group that contains the resource. You can
- /// obtain this value from the Azure Resource Manager API or the
- /// portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -117,9 +111,7 @@ public partial interface IConfigurationsOperations
/// Updates a configuration of a server.
///
///
- /// The name of the resource group that contains the resource. You can
- /// obtain this value from the Azure Resource Manager API or the
- /// portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/IDatabasesOperations.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/IDatabasesOperations.cs
similarity index 89%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/IDatabasesOperations.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/IDatabasesOperations.cs
index 0d733ac50ff34..51caa9ffa029c 100644
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/IDatabasesOperations.cs
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/IDatabasesOperations.cs
@@ -27,9 +27,7 @@ public partial interface IDatabasesOperations
/// Creates a new database or updates an existing database.
///
///
- /// The name of the resource group that contains the resource. You can
- /// obtain this value from the Azure Resource Manager API or the
- /// portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -60,9 +58,7 @@ public partial interface IDatabasesOperations
/// Deletes a database.
///
///
- /// The name of the resource group that contains the resource. You can
- /// obtain this value from the Azure Resource Manager API or the
- /// portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -87,9 +83,7 @@ public partial interface IDatabasesOperations
/// Gets information about a database.
///
///
- /// The name of the resource group that contains the resource. You can
- /// obtain this value from the Azure Resource Manager API or the
- /// portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -117,9 +111,7 @@ public partial interface IDatabasesOperations
/// List all the databases in a given server.
///
///
- /// The name of the resource group that contains the resource. You can
- /// obtain this value from the Azure Resource Manager API or the
- /// portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -144,9 +136,7 @@ public partial interface IDatabasesOperations
/// Creates a new database or updates an existing database.
///
///
- /// The name of the resource group that contains the resource. You can
- /// obtain this value from the Azure Resource Manager API or the
- /// portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -177,9 +167,7 @@ public partial interface IDatabasesOperations
/// Deletes a database.
///
///
- /// The name of the resource group that contains the resource. You can
- /// obtain this value from the Azure Resource Manager API or the
- /// portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/IFirewallRulesOperations.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/IFirewallRulesOperations.cs
similarity index 89%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/IFirewallRulesOperations.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/IFirewallRulesOperations.cs
index 7101fab1cf807..b7d0052b84ba0 100644
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/IFirewallRulesOperations.cs
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/IFirewallRulesOperations.cs
@@ -27,9 +27,7 @@ public partial interface IFirewallRulesOperations
/// Creates a new firewall rule or updates an existing firewall rule.
///
///
- /// The name of the resource group that contains the resource. You can
- /// obtain this value from the Azure Resource Manager API or the
- /// portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -60,9 +58,7 @@ public partial interface IFirewallRulesOperations
/// Deletes a server firewall rule.
///
///
- /// The name of the resource group that contains the resource. You can
- /// obtain this value from the Azure Resource Manager API or the
- /// portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -87,9 +83,7 @@ public partial interface IFirewallRulesOperations
/// Gets information about a server firewall rule.
///
///
- /// The name of the resource group that contains the resource. You can
- /// obtain this value from the Azure Resource Manager API or the
- /// portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -117,9 +111,7 @@ public partial interface IFirewallRulesOperations
/// List all the firewall rules in a given server.
///
///
- /// The name of the resource group that contains the resource. You can
- /// obtain this value from the Azure Resource Manager API or the
- /// portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -144,9 +136,7 @@ public partial interface IFirewallRulesOperations
/// Creates a new firewall rule or updates an existing firewall rule.
///
///
- /// The name of the resource group that contains the resource. You can
- /// obtain this value from the Azure Resource Manager API or the
- /// portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -177,9 +167,7 @@ public partial interface IFirewallRulesOperations
/// Deletes a server firewall rule.
///
///
- /// The name of the resource group that contains the resource. You can
- /// obtain this value from the Azure Resource Manager API or the
- /// portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/ILocationBasedPerformanceTierOperations.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/ILocationBasedPerformanceTierOperations.cs
similarity index 100%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/ILocationBasedPerformanceTierOperations.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/ILocationBasedPerformanceTierOperations.cs
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/ILogFilesOperations.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/ILogFilesOperations.cs
similarity index 91%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/ILogFilesOperations.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/ILogFilesOperations.cs
index 2c84402fe14e7..86dce1f84e0d9 100644
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/ILogFilesOperations.cs
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/ILogFilesOperations.cs
@@ -27,9 +27,7 @@ public partial interface ILogFilesOperations
/// List all the log files in a given server.
///
///
- /// The name of the resource group that contains the resource. You can
- /// obtain this value from the Azure Resource Manager API or the
- /// portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/IOperations.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/IOperations.cs
similarity index 100%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/IOperations.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/IOperations.cs
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/IPostgreSQLManagementClient.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/IPostgreSQLManagementClient.cs
similarity index 85%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/IPostgreSQLManagementClient.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/IPostgreSQLManagementClient.cs
index 5b49358512be0..6735268b4da60 100644
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/IPostgreSQLManagementClient.cs
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/IPostgreSQLManagementClient.cs
@@ -44,15 +44,10 @@ public partial interface IPostgreSQLManagementClient : System.IDisposable
ServiceClientCredentials Credentials { get; }
///
- /// The subscription ID that identifies an Azure subscription.
+ /// The ID of the target subscription.
///
string SubscriptionId { get; set; }
- ///
- /// The API version to use for the request.
- ///
- string ApiVersion { get; }
-
///
/// The preferred language for the response.
///
@@ -107,6 +102,11 @@ public partial interface IPostgreSQLManagementClient : System.IDisposable
///
ILogFilesOperations LogFiles { get; }
+ ///
+ /// Gets the IServerAdministratorsOperations.
+ ///
+ IServerAdministratorsOperations ServerAdministrators { get; }
+
///
/// Gets the ILocationBasedPerformanceTierOperations.
///
@@ -117,15 +117,30 @@ public partial interface IPostgreSQLManagementClient : System.IDisposable
///
ICheckNameAvailabilityOperations CheckNameAvailability { get; }
+ ///
+ /// Gets the IOperations.
+ ///
+ IOperations Operations { get; }
+
///
/// Gets the IServerSecurityAlertPoliciesOperations.
///
IServerSecurityAlertPoliciesOperations ServerSecurityAlertPolicies { get; }
///
- /// Gets the IOperations.
+ /// Gets the IPrivateEndpointConnectionsOperations.
///
- IOperations Operations { get; }
+ IPrivateEndpointConnectionsOperations PrivateEndpointConnections { get; }
+
+ ///
+ /// Gets the IPrivateLinkResourcesOperations.
+ ///
+ IPrivateLinkResourcesOperations PrivateLinkResources { get; }
+
+ ///
+ /// Gets the IServerKeysOperations.
+ ///
+ IServerKeysOperations ServerKeys { get; }
}
}
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/IPrivateEndpointConnectionsOperations.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/IPrivateEndpointConnectionsOperations.cs
new file mode 100644
index 0000000000000..f08e2ede0a8e2
--- /dev/null
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/IPrivateEndpointConnectionsOperations.cs
@@ -0,0 +1,276 @@
+//
+// 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.PostgreSQL
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// PrivateEndpointConnectionsOperations operations.
+ ///
+ public partial interface IPrivateEndpointConnectionsOperations
+ {
+ ///
+ /// Gets a private endpoint connection.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the private endpoint connection.
+ ///
+ ///
+ /// 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> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Approve or reject a private endpoint connection with a given name.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// 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> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string privateEndpointConnectionName, PrivateEndpointConnection parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes a private endpoint connection with a given name.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task DeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Updates tags on private endpoint connection.
+ ///
+ ///
+ /// Updates private endpoint connection with the specified tags.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ ///
+ ///
+ /// Parameters supplied to the Update private endpoint connection Tags
+ /// operation.
+ ///
+ ///
+ /// 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> UpdateTagsWithHttpMessagesAsync(string resourceGroupName, string serverName, string privateEndpointConnectionName, TagsObject parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets all private endpoint connections on a server.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// 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>> ListByServerWithHttpMessagesAsync(string resourceGroupName, string serverName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Approve or reject a private endpoint connection with a given name.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// 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> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string privateEndpointConnectionName, PrivateEndpointConnection parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes a private endpoint connection with a given name.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Updates tags on private endpoint connection.
+ ///
+ ///
+ /// Updates private endpoint connection with the specified tags.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ ///
+ ///
+ /// Parameters supplied to the Update private endpoint connection Tags
+ /// operation.
+ ///
+ ///
+ /// 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> BeginUpdateTagsWithHttpMessagesAsync(string resourceGroupName, string serverName, string privateEndpointConnectionName, TagsObject parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets all private endpoint connections on a server.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// 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>> ListByServerNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/IPrivateLinkResourcesOperations.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/IPrivateLinkResourcesOperations.cs
new file mode 100644
index 0000000000000..1f1943b06c37d
--- /dev/null
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/IPrivateLinkResourcesOperations.cs
@@ -0,0 +1,102 @@
+//
+// 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.PostgreSQL
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// PrivateLinkResourcesOperations operations.
+ ///
+ public partial interface IPrivateLinkResourcesOperations
+ {
+ ///
+ /// Gets the private link resources for PostgreSQL server.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// 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>> ListByServerWithHttpMessagesAsync(string resourceGroupName, string serverName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets a private link resource for PostgreSQL server.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the private link resource.
+ ///
+ ///
+ /// 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> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string groupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets the private link resources for PostgreSQL server.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// 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>> ListByServerNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/IReplicasOperations.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/IReplicasOperations.cs
similarity index 91%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/IReplicasOperations.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/IReplicasOperations.cs
index ab17e45748a35..9a64ff3150b60 100644
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/IReplicasOperations.cs
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/IReplicasOperations.cs
@@ -27,9 +27,7 @@ public partial interface IReplicasOperations
/// List all the replicas for a given server.
///
///
- /// The name of the resource group that contains the resource. You can
- /// obtain this value from the Azure Resource Manager API or the
- /// portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/IServerAdministratorsOperations.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/IServerAdministratorsOperations.cs
new file mode 100644
index 0000000000000..1e3c61b5a9dbd
--- /dev/null
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/IServerAdministratorsOperations.cs
@@ -0,0 +1,183 @@
+//
+// 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.PostgreSQL
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// ServerAdministratorsOperations operations.
+ ///
+ public partial interface IServerAdministratorsOperations
+ {
+ ///
+ /// Gets information about a AAD server administrator.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// 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> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Creates or update active directory administrator on an existing
+ /// server. The update action will overwrite the existing
+ /// administrator.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The required parameters for creating or updating an AAD server
+ /// administrator.
+ ///
+ ///
+ /// 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> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, ServerAdministratorResource properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes server active directory administrator.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task DeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Returns a list of server Administrators.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// 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 resourceGroupName, string serverName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Creates or update active directory administrator on an existing
+ /// server. The update action will overwrite the existing
+ /// administrator.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The required parameters for creating or updating an AAD server
+ /// administrator.
+ ///
+ ///
+ /// 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> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, ServerAdministratorResource properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes server active directory administrator.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/IServerKeysOperations.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/IServerKeysOperations.cs
new file mode 100644
index 0000000000000..d7eb0a9635f4f
--- /dev/null
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/IServerKeysOperations.cs
@@ -0,0 +1,216 @@
+//
+// 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.PostgreSQL
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// ServerKeysOperations operations.
+ ///
+ public partial interface IServerKeysOperations
+ {
+ ///
+ /// Gets a list of Server keys.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// 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 resourceGroupName, string serverName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets a PostgreSQL Server key.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the PostgreSQL Server key to be retrieved.
+ ///
+ ///
+ /// 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> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string keyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Creates or updates a PostgreSQL Server key.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the PostgreSQL Server key to be operated on (updated or
+ /// created).
+ ///
+ ///
+ /// The requested PostgreSQL Server key resource state.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// 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> CreateOrUpdateWithHttpMessagesAsync(string serverName, string keyName, ServerKey parameters, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes the PostgreSQL Server key with the given name.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the PostgreSQL Server key to be deleted.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task DeleteWithHttpMessagesAsync(string serverName, string keyName, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Creates or updates a PostgreSQL Server key.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the PostgreSQL Server key to be operated on (updated or
+ /// created).
+ ///
+ ///
+ /// The requested PostgreSQL Server key resource state.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// 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> BeginCreateOrUpdateWithHttpMessagesAsync(string serverName, string keyName, ServerKey parameters, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes the PostgreSQL Server key with the given name.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the PostgreSQL Server key to be deleted.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task BeginDeleteWithHttpMessagesAsync(string serverName, string keyName, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets a list of Server keys.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// 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>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/IServerSecurityAlertPoliciesOperations.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/IServerSecurityAlertPoliciesOperations.cs
similarity index 90%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/IServerSecurityAlertPoliciesOperations.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/IServerSecurityAlertPoliciesOperations.cs
index fcb33f3308c61..cdfb5c56c6a9d 100644
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/IServerSecurityAlertPoliciesOperations.cs
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/IServerSecurityAlertPoliciesOperations.cs
@@ -27,9 +27,7 @@ public partial interface IServerSecurityAlertPoliciesOperations
/// Get a server's security alert policy.
///
///
- /// The name of the resource group that contains the resource. You can
- /// obtain this value from the Azure Resource Manager API or the
- /// portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -54,9 +52,7 @@ public partial interface IServerSecurityAlertPoliciesOperations
/// Creates or updates a threat detection policy.
///
///
- /// The name of the resource group that contains the resource. You can
- /// obtain this value from the Azure Resource Manager API or the
- /// portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -84,9 +80,7 @@ public partial interface IServerSecurityAlertPoliciesOperations
/// Creates or updates a threat detection policy.
///
///
- /// The name of the resource group that contains the resource. You can
- /// obtain this value from the Azure Resource Manager API or the
- /// portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/IServersOperations.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/IServersOperations.cs
similarity index 88%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/IServersOperations.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/IServersOperations.cs
index 7d3c9ace6d574..8d164f836cfc8 100644
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/IServersOperations.cs
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/IServersOperations.cs
@@ -27,9 +27,7 @@ public partial interface IServersOperations
/// Creates a new server, or will overwrite an existing server.
///
///
- /// The name of the resource group that contains the resource. You can
- /// obtain this value from the Azure Resource Manager API or the
- /// portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -58,9 +56,7 @@ public partial interface IServersOperations
/// many of the properties present in the normal server definition.
///
///
- /// The name of the resource group that contains the resource. You can
- /// obtain this value from the Azure Resource Manager API or the
- /// portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -88,9 +84,7 @@ public partial interface IServersOperations
/// Deletes a server.
///
///
- /// The name of the resource group that contains the resource. You can
- /// obtain this value from the Azure Resource Manager API or the
- /// portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -112,9 +106,7 @@ public partial interface IServersOperations
/// Gets information about a server.
///
///
- /// The name of the resource group that contains the resource. You can
- /// obtain this value from the Azure Resource Manager API or the
- /// portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -139,9 +131,7 @@ public partial interface IServersOperations
/// List all the servers in a given resource group.
///
///
- /// The name of the resource group that contains the resource. You can
- /// obtain this value from the Azure Resource Manager API or the
- /// portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The headers that will be added to request.
@@ -182,9 +172,7 @@ public partial interface IServersOperations
/// Restarts a server.
///
///
- /// The name of the resource group that contains the resource. You can
- /// obtain this value from the Azure Resource Manager API or the
- /// portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -206,9 +194,7 @@ public partial interface IServersOperations
/// Creates a new server, or will overwrite an existing server.
///
///
- /// The name of the resource group that contains the resource. You can
- /// obtain this value from the Azure Resource Manager API or the
- /// portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -237,9 +223,7 @@ public partial interface IServersOperations
/// many of the properties present in the normal server definition.
///
///
- /// The name of the resource group that contains the resource. You can
- /// obtain this value from the Azure Resource Manager API or the
- /// portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -267,9 +251,7 @@ public partial interface IServersOperations
/// Deletes a server.
///
///
- /// The name of the resource group that contains the resource. You can
- /// obtain this value from the Azure Resource Manager API or the
- /// portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -291,9 +273,7 @@ public partial interface IServersOperations
/// Restarts a server.
///
///
- /// The name of the resource group that contains the resource. You can
- /// obtain this value from the Azure Resource Manager API or the
- /// portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/IVirtualNetworkRulesOperations.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/IVirtualNetworkRulesOperations.cs
similarity index 90%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/IVirtualNetworkRulesOperations.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/IVirtualNetworkRulesOperations.cs
index de6ab786ebbf9..379c985193de5 100644
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/IVirtualNetworkRulesOperations.cs
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/IVirtualNetworkRulesOperations.cs
@@ -27,9 +27,7 @@ public partial interface IVirtualNetworkRulesOperations
/// Gets a virtual network rule.
///
///
- /// The name of the resource group that contains the resource. You can
- /// obtain this value from the Azure Resource Manager API or the
- /// portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -57,9 +55,7 @@ public partial interface IVirtualNetworkRulesOperations
/// Creates or updates an existing virtual network rule.
///
///
- /// The name of the resource group that contains the resource. You can
- /// obtain this value from the Azure Resource Manager API or the
- /// portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -90,9 +86,7 @@ public partial interface IVirtualNetworkRulesOperations
/// Deletes the virtual network rule with the given name.
///
///
- /// The name of the resource group that contains the resource. You can
- /// obtain this value from the Azure Resource Manager API or the
- /// portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -117,9 +111,7 @@ public partial interface IVirtualNetworkRulesOperations
/// Gets a list of virtual network rules in a server.
///
///
- /// The name of the resource group that contains the resource. You can
- /// obtain this value from the Azure Resource Manager API or the
- /// portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -144,9 +136,7 @@ public partial interface IVirtualNetworkRulesOperations
/// Creates or updates an existing virtual network rule.
///
///
- /// The name of the resource group that contains the resource. You can
- /// obtain this value from the Azure Resource Manager API or the
- /// portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -177,9 +167,7 @@ public partial interface IVirtualNetworkRulesOperations
/// Deletes the virtual network rule with the given name.
///
///
- /// The name of the resource group that contains the resource. You can
- /// obtain this value from the Azure Resource Manager API or the
- /// portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/LocationBasedPerformanceTierOperations.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/LocationBasedPerformanceTierOperations.cs
similarity index 95%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/LocationBasedPerformanceTierOperations.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/LocationBasedPerformanceTierOperations.cs
index 1e532b64a474a..5c0729a036d4a 100644
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/LocationBasedPerformanceTierOperations.cs
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/LocationBasedPerformanceTierOperations.cs
@@ -80,18 +80,22 @@ internal LocationBasedPerformanceTierOperations(PostgreSQLManagementClient clien
///
public async Task>> ListWithHttpMessagesAsync(string locationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
- if (Client.ApiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
- }
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 (locationName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "locationName");
}
+ string apiVersion = "2017-12-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -99,19 +103,20 @@ internal LocationBasedPerformanceTierOperations(PostgreSQLManagementClient clien
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("locationName", locationName);
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.DBforPostgreSQL/locations/{locationName}/performanceTiers").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.DBForPostgreSQL/locations/{locationName}/performanceTiers").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
_url = _url.Replace("{locationName}", System.Uri.EscapeDataString(locationName));
List _queryParameters = new List();
- if (Client.ApiVersion != null)
+ if (apiVersion != null)
{
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
}
if (_queryParameters.Count > 0)
{
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/LocationBasedPerformanceTierOperationsExtensions.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/LocationBasedPerformanceTierOperationsExtensions.cs
similarity index 100%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/LocationBasedPerformanceTierOperationsExtensions.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/LocationBasedPerformanceTierOperationsExtensions.cs
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/LogFilesOperations.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/LogFilesOperations.cs
similarity index 89%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/LogFilesOperations.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/LogFilesOperations.cs
index 2c03293c34e7f..ba9fb0c480cd1 100644
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/LogFilesOperations.cs
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/LogFilesOperations.cs
@@ -54,8 +54,7 @@ internal LogFilesOperations(PostgreSQLManagementClient client)
/// List all the log files in a given server.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -83,22 +82,41 @@ internal LogFilesOperations(PostgreSQLManagementClient client)
///
public async Task>> ListByServerWithHttpMessagesAsync(string resourceGroupName, string serverName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
- if (Client.ApiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
- }
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 (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
if (serverName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "serverName");
}
+ string apiVersion = "2017-12-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -106,6 +124,7 @@ internal LogFilesOperations(PostgreSQLManagementClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("serverName", serverName);
tracingParameters.Add("cancellationToken", cancellationToken);
@@ -113,14 +132,14 @@ internal LogFilesOperations(PostgreSQLManagementClient client)
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/logFiles").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/logFiles").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
List _queryParameters = new List();
- if (Client.ApiVersion != null)
+ if (apiVersion != null)
{
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
}
if (_queryParameters.Count > 0)
{
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/LogFilesOperationsExtensions.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/LogFilesOperationsExtensions.cs
similarity index 88%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/LogFilesOperationsExtensions.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/LogFilesOperationsExtensions.cs
index 17f489ccaec0b..53640a18d0b3c 100644
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/LogFilesOperationsExtensions.cs
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/LogFilesOperationsExtensions.cs
@@ -30,8 +30,7 @@ public static partial class LogFilesOperationsExtensions
/// The operations group for this extension method.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
@@ -48,8 +47,7 @@ public static IEnumerable ListByServer(this ILogFilesOperations operati
/// The operations group for this extension method.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The name of the resource group. The name is case insensitive.
///
///
/// The name of the server.
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/AzureEntityResource.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/AzureEntityResource.cs
new file mode 100644
index 0000000000000..f2a5a62dd650d
--- /dev/null
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/AzureEntityResource.cs
@@ -0,0 +1,59 @@
+//
+// 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.PostgreSQL.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The resource model definition for a Azure Resource Manager resource
+ /// with an etag.
+ ///
+ public partial class AzureEntityResource : Resource
+ {
+ ///
+ /// Initializes a new instance of the AzureEntityResource class.
+ ///
+ public AzureEntityResource()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the AzureEntityResource class.
+ ///
+ /// Fully qualified resource Id for the resource. Ex -
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ /// The name of the resource
+ /// The type of the resource. Ex-
+ /// Microsoft.Compute/virtualMachines or
+ /// Microsoft.Storage/storageAccounts.
+ /// Resource Etag.
+ public AzureEntityResource(string id = default(string), string name = default(string), string type = default(string), string etag = default(string))
+ : base(id, name, type)
+ {
+ Etag = etag;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets resource Etag.
+ ///
+ [JsonProperty(PropertyName = "etag")]
+ public string Etag { get; private set; }
+
+ }
+}
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/Configuration.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/Configuration.cs
similarity index 88%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/Configuration.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/Configuration.cs
index 8f040f9393cf8..e41b79330b4b9 100644
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/Configuration.cs
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/Configuration.cs
@@ -32,9 +32,12 @@ public Configuration()
///
/// Initializes a new instance of the Configuration class.
///
- /// Resource ID
- /// Resource name.
- /// Resource type.
+ /// Fully qualified resource Id for the resource. Ex -
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ /// The name of the resource
+ /// The type of the resource. Ex-
+ /// Microsoft.Compute/virtualMachines or
+ /// Microsoft.Storage/storageAccounts.
/// Value of the configuration.
/// Description of the configuration.
/// Default value of the
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/Database.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/Database.cs
similarity index 81%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/Database.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/Database.cs
index a62cddc775c70..b27e69c298d5a 100644
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/Database.cs
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/Database.cs
@@ -32,9 +32,12 @@ public Database()
///
/// Initializes a new instance of the Database class.
///
- /// Resource ID
- /// Resource name.
- /// Resource type.
+ /// Fully qualified resource Id for the resource. Ex -
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ /// The name of the resource
+ /// The type of the resource. Ex-
+ /// Microsoft.Compute/virtualMachines or
+ /// Microsoft.Storage/storageAccounts.
/// The charset of the database.
/// The collation of the database.
public Database(string id = default(string), string name = default(string), string type = default(string), string charset = default(string), string collation = default(string))
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ErrorAdditionalInfo.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ErrorAdditionalInfo.cs
new file mode 100644
index 0000000000000..e14d43ba90608
--- /dev/null
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ErrorAdditionalInfo.cs
@@ -0,0 +1,59 @@
+//
+// 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.PostgreSQL.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The resource management error additional info.
+ ///
+ public partial class ErrorAdditionalInfo
+ {
+ ///
+ /// Initializes a new instance of the ErrorAdditionalInfo class.
+ ///
+ public ErrorAdditionalInfo()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ErrorAdditionalInfo class.
+ ///
+ /// The additional info type.
+ /// The additional info.
+ public ErrorAdditionalInfo(string type = default(string), object info = default(object))
+ {
+ Type = type;
+ Info = info;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the additional info type.
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public string Type { get; private set; }
+
+ ///
+ /// Gets the additional info.
+ ///
+ [JsonProperty(PropertyName = "info")]
+ public object Info { get; private set; }
+
+ }
+}
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ErrorResponse.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ErrorResponse.cs
new file mode 100644
index 0000000000000..83a64fe687016
--- /dev/null
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ErrorResponse.cs
@@ -0,0 +1,85 @@
+//
+// 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.PostgreSQL.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// The resource management error response.
+ ///
+ public partial class ErrorResponse
+ {
+ ///
+ /// Initializes a new instance of the ErrorResponse class.
+ ///
+ public ErrorResponse()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ErrorResponse class.
+ ///
+ /// The error code.
+ /// The error message.
+ /// The error target.
+ /// The error details.
+ /// The error additional info.
+ public ErrorResponse(string code = default(string), string message = default(string), string target = default(string), IList details = default(IList), IList additionalInfo = default(IList))
+ {
+ Code = code;
+ Message = message;
+ Target = target;
+ Details = details;
+ AdditionalInfo = additionalInfo;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the error code.
+ ///
+ [JsonProperty(PropertyName = "code")]
+ public string Code { get; private set; }
+
+ ///
+ /// Gets the error message.
+ ///
+ [JsonProperty(PropertyName = "message")]
+ public string Message { get; private set; }
+
+ ///
+ /// Gets the error target.
+ ///
+ [JsonProperty(PropertyName = "target")]
+ public string Target { get; private set; }
+
+ ///
+ /// Gets the error details.
+ ///
+ [JsonProperty(PropertyName = "details")]
+ public IList Details { get; private set; }
+
+ ///
+ /// Gets the error additional info.
+ ///
+ [JsonProperty(PropertyName = "additionalInfo")]
+ public IList AdditionalInfo { get; private set; }
+
+ }
+}
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/FirewallRule.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/FirewallRule.cs
similarity index 89%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/FirewallRule.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/FirewallRule.cs
index 607d1e43dd9d4..5603a81676a6c 100644
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/FirewallRule.cs
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/FirewallRule.cs
@@ -36,9 +36,12 @@ public FirewallRule()
/// firewall rule. Must be IPv4 format.
/// The end IP address of the server
/// firewall rule. Must be IPv4 format.
- /// Resource ID
- /// Resource name.
- /// Resource type.
+ /// Fully qualified resource Id for the resource. Ex -
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ /// The name of the resource
+ /// The type of the resource. Ex-
+ /// Microsoft.Compute/virtualMachines or
+ /// Microsoft.Storage/storageAccounts.
public FirewallRule(string startIpAddress, string endIpAddress, string id = default(string), string name = default(string), string type = default(string))
: base(id, name, type)
{
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/GeoRedundantBackup.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/GeoRedundantBackup.cs
similarity index 100%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/GeoRedundantBackup.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/GeoRedundantBackup.cs
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/IdentityType.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/IdentityType.cs
new file mode 100644
index 0000000000000..7825c32e71e4a
--- /dev/null
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/IdentityType.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.PostgreSQL.Models
+{
+
+ ///
+ /// Defines values for IdentityType.
+ ///
+ public static class IdentityType
+ {
+ public const string SystemAssigned = "SystemAssigned";
+ }
+}
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/InfrastructureEncryption.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/InfrastructureEncryption.cs
new file mode 100644
index 0000000000000..90aed8cf0982d
--- /dev/null
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/InfrastructureEncryption.cs
@@ -0,0 +1,28 @@
+//
+// 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.PostgreSQL.Models
+{
+
+ ///
+ /// Defines values for InfrastructureEncryption.
+ ///
+ public static class InfrastructureEncryption
+ {
+ ///
+ /// Default value for single layer of encryption for data at rest.
+ ///
+ public const string Enabled = "Enabled";
+ ///
+ /// Additional (2nd) layer of encryption for data at rest
+ ///
+ public const string Disabled = "Disabled";
+ }
+}
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/LogFile.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/LogFile.cs
similarity index 87%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/LogFile.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/LogFile.cs
index a536fd9f5e8bd..f2d928126710c 100644
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/LogFile.cs
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/LogFile.cs
@@ -32,9 +32,12 @@ public LogFile()
///
/// Initializes a new instance of the LogFile class.
///
- /// Resource ID
- /// Resource name.
- /// Resource type.
+ /// Fully qualified resource Id for the resource. Ex -
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ /// The name of the resource
+ /// The type of the resource. Ex-
+ /// Microsoft.Compute/virtualMachines or
+ /// Microsoft.Storage/storageAccounts.
/// Size of the log file.
/// Creation timestamp of the log
/// file.
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/MinimalTlsVersionEnum.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/MinimalTlsVersionEnum.cs
new file mode 100644
index 0000000000000..2652830dff36b
--- /dev/null
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/MinimalTlsVersionEnum.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.PostgreSQL.Models
+{
+
+ ///
+ /// Defines values for MinimalTlsVersionEnum.
+ ///
+ public static class MinimalTlsVersionEnum
+ {
+ public const string TLS10 = "TLS1_0";
+ public const string TLS11 = "TLS1_1";
+ public const string TLS12 = "TLS1_2";
+ public const string TLSEnforcementDisabled = "TLSEnforcementDisabled";
+ }
+}
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/NameAvailability.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/NameAvailability.cs
similarity index 100%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/NameAvailability.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/NameAvailability.cs
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/NameAvailabilityRequest.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/NameAvailabilityRequest.cs
similarity index 100%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/NameAvailabilityRequest.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/NameAvailabilityRequest.cs
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/Operation.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/Operation.cs
similarity index 100%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/Operation.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/Operation.cs
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/OperationDisplay.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/OperationDisplay.cs
similarity index 100%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/OperationDisplay.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/OperationDisplay.cs
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/OperationListResult.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/OperationListResult.cs
similarity index 100%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/OperationListResult.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/OperationListResult.cs
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/OperationOrigin.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/OperationOrigin.cs
similarity index 100%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/OperationOrigin.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/OperationOrigin.cs
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/Page.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/Page.cs
similarity index 100%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/Page.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/Page.cs
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/Page1.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/Page1.cs
similarity index 100%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/Page1.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/Page1.cs
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/PerformanceTierProperties.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/PerformanceTierProperties.cs
similarity index 100%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/PerformanceTierProperties.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/PerformanceTierProperties.cs
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/PerformanceTierServiceLevelObjectives.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/PerformanceTierServiceLevelObjectives.cs
similarity index 100%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/PerformanceTierServiceLevelObjectives.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/PerformanceTierServiceLevelObjectives.cs
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/PrivateEndpointConnection.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/PrivateEndpointConnection.cs
new file mode 100644
index 0000000000000..d0f5e74f37c6b
--- /dev/null
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/PrivateEndpointConnection.cs
@@ -0,0 +1,93 @@
+//
+// 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.PostgreSQL.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// A private endpoint connection
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class PrivateEndpointConnection : ProxyResource
+ {
+ ///
+ /// Initializes a new instance of the PrivateEndpointConnection class.
+ ///
+ public PrivateEndpointConnection()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the PrivateEndpointConnection class.
+ ///
+ /// Fully qualified resource Id for the resource. Ex -
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ /// The name of the resource
+ /// The type of the resource. Ex-
+ /// Microsoft.Compute/virtualMachines or
+ /// Microsoft.Storage/storageAccounts.
+ /// Private endpoint which the connection
+ /// belongs to.
+ /// Connection state of
+ /// the private endpoint connection.
+ /// State of the private endpoint
+ /// connection.
+ public PrivateEndpointConnection(string id = default(string), string name = default(string), string type = default(string), PrivateEndpointProperty privateEndpoint = default(PrivateEndpointProperty), PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState = default(PrivateLinkServiceConnectionStateProperty), string provisioningState = default(string))
+ : base(id, name, type)
+ {
+ PrivateEndpoint = privateEndpoint;
+ PrivateLinkServiceConnectionState = privateLinkServiceConnectionState;
+ ProvisioningState = provisioningState;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets private endpoint which the connection belongs to.
+ ///
+ [JsonProperty(PropertyName = "properties.privateEndpoint")]
+ public PrivateEndpointProperty PrivateEndpoint { get; set; }
+
+ ///
+ /// Gets or sets connection state of the private endpoint connection.
+ ///
+ [JsonProperty(PropertyName = "properties.privateLinkServiceConnectionState")]
+ public PrivateLinkServiceConnectionStateProperty PrivateLinkServiceConnectionState { get; set; }
+
+ ///
+ /// Gets state of the private endpoint connection.
+ ///
+ [JsonProperty(PropertyName = "properties.provisioningState")]
+ public string ProvisioningState { get; private set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (PrivateLinkServiceConnectionState != null)
+ {
+ PrivateLinkServiceConnectionState.Validate();
+ }
+ }
+ }
+}
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/PrivateEndpointProperty.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/PrivateEndpointProperty.cs
new file mode 100644
index 0000000000000..505e7303626ef
--- /dev/null
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/PrivateEndpointProperty.cs
@@ -0,0 +1,50 @@
+//
+// 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.PostgreSQL.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ public partial class PrivateEndpointProperty : IResource
+ {
+ ///
+ /// Initializes a new instance of the PrivateEndpointProperty class.
+ ///
+ public PrivateEndpointProperty()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the PrivateEndpointProperty class.
+ ///
+ /// Resource id of the private endpoint.
+ public PrivateEndpointProperty(string id = default(string))
+ {
+ Id = id;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets resource id of the private endpoint.
+ ///
+ [JsonProperty(PropertyName = "id")]
+ public string Id { get; set; }
+
+ }
+}
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/PrivateEndpointProvisioningState.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/PrivateEndpointProvisioningState.cs
new file mode 100644
index 0000000000000..f00516eae0445
--- /dev/null
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/PrivateEndpointProvisioningState.cs
@@ -0,0 +1,25 @@
+//
+// 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.PostgreSQL.Models
+{
+
+ ///
+ /// Defines values for PrivateEndpointProvisioningState.
+ ///
+ public static class PrivateEndpointProvisioningState
+ {
+ public const string Approving = "Approving";
+ public const string Ready = "Ready";
+ public const string Dropping = "Dropping";
+ public const string Failed = "Failed";
+ public const string Rejecting = "Rejecting";
+ }
+}
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/PrivateLinkResource.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/PrivateLinkResource.cs
new file mode 100644
index 0000000000000..d6071c15d6c7e
--- /dev/null
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/PrivateLinkResource.cs
@@ -0,0 +1,59 @@
+//
+// 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.PostgreSQL.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// A private link resource
+ ///
+ public partial class PrivateLinkResource : ProxyResource
+ {
+ ///
+ /// Initializes a new instance of the PrivateLinkResource class.
+ ///
+ public PrivateLinkResource()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the PrivateLinkResource class.
+ ///
+ /// Fully qualified resource Id for the resource. Ex -
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ /// The name of the resource
+ /// The type of the resource. Ex-
+ /// Microsoft.Compute/virtualMachines or
+ /// Microsoft.Storage/storageAccounts.
+ /// The private link resource group
+ /// id.
+ public PrivateLinkResource(string id = default(string), string name = default(string), string type = default(string), PrivateLinkResourceProperties properties = default(PrivateLinkResourceProperties))
+ : base(id, name, type)
+ {
+ Properties = properties;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the private link resource group id.
+ ///
+ [JsonProperty(PropertyName = "properties")]
+ public PrivateLinkResourceProperties Properties { get; private set; }
+
+ }
+}
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/PrivateLinkResourceProperties.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/PrivateLinkResourceProperties.cs
new file mode 100644
index 0000000000000..6760ae16c1ced
--- /dev/null
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/PrivateLinkResourceProperties.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.PostgreSQL.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Properties of a private link resource.
+ ///
+ public partial class PrivateLinkResourceProperties
+ {
+ ///
+ /// Initializes a new instance of the PrivateLinkResourceProperties
+ /// class.
+ ///
+ public PrivateLinkResourceProperties()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the PrivateLinkResourceProperties
+ /// class.
+ ///
+ /// The private link resource group id.
+ /// The private link resource required
+ /// member names.
+ public PrivateLinkResourceProperties(string groupId = default(string), IList requiredMembers = default(IList))
+ {
+ GroupId = groupId;
+ RequiredMembers = requiredMembers;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the private link resource group id.
+ ///
+ [JsonProperty(PropertyName = "groupId")]
+ public string GroupId { get; private set; }
+
+ ///
+ /// Gets the private link resource required member names.
+ ///
+ [JsonProperty(PropertyName = "requiredMembers")]
+ public IList RequiredMembers { get; private set; }
+
+ }
+}
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/PrivateLinkServiceConnectionStateActionsRequire.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/PrivateLinkServiceConnectionStateActionsRequire.cs
new file mode 100644
index 0000000000000..e1620432e5279
--- /dev/null
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/PrivateLinkServiceConnectionStateActionsRequire.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.PostgreSQL.Models
+{
+
+ ///
+ /// Defines values for PrivateLinkServiceConnectionStateActionsRequire.
+ ///
+ public static class PrivateLinkServiceConnectionStateActionsRequire
+ {
+ public const string None = "None";
+ }
+}
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/PrivateLinkServiceConnectionStateProperty.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/PrivateLinkServiceConnectionStateProperty.cs
new file mode 100644
index 0000000000000..feab0c488c4c6
--- /dev/null
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/PrivateLinkServiceConnectionStateProperty.cs
@@ -0,0 +1,87 @@
+//
+// 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.PostgreSQL.Models
+{
+ using Microsoft.Rest;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ public partial class PrivateLinkServiceConnectionStateProperty
+ {
+ ///
+ /// Initializes a new instance of the
+ /// PrivateLinkServiceConnectionStateProperty class.
+ ///
+ public PrivateLinkServiceConnectionStateProperty()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// PrivateLinkServiceConnectionStateProperty class.
+ ///
+ /// The private link service connection
+ /// status.
+ /// The private link service connection
+ /// description.
+ /// The actions required for private link
+ /// service connection.
+ public PrivateLinkServiceConnectionStateProperty(string status, string description, string actionsRequired = default(string))
+ {
+ Status = status;
+ Description = description;
+ ActionsRequired = actionsRequired;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the private link service connection status.
+ ///
+ [JsonProperty(PropertyName = "status")]
+ public string Status { get; set; }
+
+ ///
+ /// Gets or sets the private link service connection description.
+ ///
+ [JsonProperty(PropertyName = "description")]
+ public string Description { get; set; }
+
+ ///
+ /// Gets the actions required for private link service connection.
+ ///
+ [JsonProperty(PropertyName = "actionsRequired")]
+ public string ActionsRequired { get; private set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Status == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Status");
+ }
+ if (Description == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Description");
+ }
+ }
+ }
+}
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/PrivateLinkServiceConnectionStateStatus.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/PrivateLinkServiceConnectionStateStatus.cs
new file mode 100644
index 0000000000000..c9992315e6d06
--- /dev/null
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/PrivateLinkServiceConnectionStateStatus.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.PostgreSQL.Models
+{
+
+ ///
+ /// Defines values for PrivateLinkServiceConnectionStateStatus.
+ ///
+ public static class PrivateLinkServiceConnectionStateStatus
+ {
+ public const string Approved = "Approved";
+ public const string Pending = "Pending";
+ public const string Rejected = "Rejected";
+ public const string Disconnected = "Disconnected";
+ }
+}
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/ProxyResource.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ProxyResource.cs
similarity index 55%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/ProxyResource.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ProxyResource.cs
index 6b8b2bda7980e..2218086919479 100644
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/ProxyResource.cs
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ProxyResource.cs
@@ -10,15 +10,13 @@
namespace Microsoft.Azure.Management.PostgreSQL.Models
{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Newtonsoft.Json;
using System.Linq;
///
- /// Resource properties.
+ /// The resource model definition for a ARM proxy resource. It will have
+ /// everything other than required location and tags
///
- public partial class ProxyResource : IResource
+ public partial class ProxyResource : Resource
{
///
/// Initializes a new instance of the ProxyResource class.
@@ -31,14 +29,15 @@ public ProxyResource()
///
/// Initializes a new instance of the ProxyResource class.
///
- /// Resource ID
- /// Resource name.
- /// Resource type.
+ /// Fully qualified resource Id for the resource. Ex -
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ /// The name of the resource
+ /// The type of the resource. Ex-
+ /// Microsoft.Compute/virtualMachines or
+ /// Microsoft.Storage/storageAccounts.
public ProxyResource(string id = default(string), string name = default(string), string type = default(string))
+ : base(id, name, type)
{
- Id = id;
- Name = name;
- Type = type;
CustomInit();
}
@@ -47,23 +46,5 @@ public ProxyResource()
///
partial void CustomInit();
- ///
- /// Gets resource ID
- ///
- [JsonProperty(PropertyName = "id")]
- public string Id { get; private set; }
-
- ///
- /// Gets resource name.
- ///
- [JsonProperty(PropertyName = "name")]
- public string Name { get; private set; }
-
- ///
- /// Gets resource type.
- ///
- [JsonProperty(PropertyName = "type")]
- public string Type { get; private set; }
-
}
}
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/PublicNetworkAccessEnum.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/PublicNetworkAccessEnum.cs
new file mode 100644
index 0000000000000..304db450b0c41
--- /dev/null
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/PublicNetworkAccessEnum.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.PostgreSQL.Models
+{
+
+ ///
+ /// Defines values for PublicNetworkAccessEnum.
+ ///
+ public static class PublicNetworkAccessEnum
+ {
+ public const string Enabled = "Enabled";
+ public const string Disabled = "Disabled";
+ }
+}
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/Resource.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/Resource.cs
new file mode 100644
index 0000000000000..00ee8d855eb5e
--- /dev/null
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/Resource.cs
@@ -0,0 +1,72 @@
+//
+// 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.PostgreSQL.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ public partial class Resource : IResource
+ {
+ ///
+ /// Initializes a new instance of the Resource class.
+ ///
+ public Resource()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the Resource class.
+ ///
+ /// Fully qualified resource Id for the resource. Ex -
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ /// The name of the resource
+ /// The type of the resource. Ex-
+ /// Microsoft.Compute/virtualMachines or
+ /// Microsoft.Storage/storageAccounts.
+ public Resource(string id = default(string), string name = default(string), string type = default(string))
+ {
+ Id = id;
+ Name = name;
+ Type = type;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets fully qualified resource Id for the resource. Ex -
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ ///
+ [JsonProperty(PropertyName = "id")]
+ public string Id { get; private set; }
+
+ ///
+ /// Gets the name of the resource
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; private set; }
+
+ ///
+ /// Gets the type of the resource. Ex-
+ /// Microsoft.Compute/virtualMachines or
+ /// Microsoft.Storage/storageAccounts.
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public string Type { get; private set; }
+
+ }
+}
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ResourceIdentity.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ResourceIdentity.cs
new file mode 100644
index 0000000000000..01acfc21d8273
--- /dev/null
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ResourceIdentity.cs
@@ -0,0 +1,75 @@
+//
+// 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.PostgreSQL.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Azure Active Directory identity configuration for a resource.
+ ///
+ public partial class ResourceIdentity
+ {
+ ///
+ /// Initializes a new instance of the ResourceIdentity class.
+ ///
+ public ResourceIdentity()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ResourceIdentity class.
+ ///
+ /// The Azure Active Directory principal
+ /// id.
+ /// The identity type. Set this to 'SystemAssigned'
+ /// in order to automatically create and assign an Azure Active
+ /// Directory principal for the resource. Possible values include:
+ /// 'SystemAssigned'
+ /// The Azure Active Directory tenant
+ /// id.
+ public ResourceIdentity(System.Guid? principalId = default(System.Guid?), string type = default(string), System.Guid? tenantId = default(System.Guid?))
+ {
+ PrincipalId = principalId;
+ Type = type;
+ TenantId = tenantId;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the Azure Active Directory principal id.
+ ///
+ [JsonProperty(PropertyName = "principalId")]
+ public System.Guid? PrincipalId { get; private set; }
+
+ ///
+ /// Gets or sets the identity type. Set this to 'SystemAssigned' in
+ /// order to automatically create and assign an Azure Active Directory
+ /// principal for the resource. Possible values include:
+ /// 'SystemAssigned'
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public string Type { get; set; }
+
+ ///
+ /// Gets the Azure Active Directory tenant id.
+ ///
+ [JsonProperty(PropertyName = "tenantId")]
+ public System.Guid? TenantId { get; private set; }
+
+ }
+}
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/Server.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/Server.cs
similarity index 58%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/Server.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/Server.cs
index d957bbfe887d6..5cb4f611fe041 100644
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/Server.cs
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/Server.cs
@@ -34,25 +34,37 @@ public Server()
///
/// Initializes a new instance of the Server class.
///
- /// The location the resource resides
- /// in.
- /// Resource ID
- /// Resource name.
- /// Resource type.
- /// Application-specific metadata in the form of
- /// key-value pairs.
+ /// The geo-location where the resource
+ /// lives
+ /// Fully qualified resource Id for the resource. Ex -
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ /// The name of the resource
+ /// The type of the resource. Ex-
+ /// Microsoft.Compute/virtualMachines or
+ /// Microsoft.Storage/storageAccounts.
+ /// Resource tags.
+ /// The Azure Active Directory identity of the
+ /// server.
/// The SKU (pricing tier) of the server.
/// The administrator's login name of
/// a server. Can only be specified when the server is being created
/// (and is required for creation).
/// Server version. Possible values include:
- /// '9.5', '9.6', '10', '10.0', '10.2'
+ /// '9.5', '9.6', '10', '10.0', '10.2', '11'
/// Enable ssl enforcement or not when
/// connect to server. Possible values include: 'Enabled',
/// 'Disabled'
+ /// Enforce a minimal Tls version for
+ /// the server. Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2',
+ /// 'TLSEnforcementDisabled'
+ /// Status showing whether the server
+ /// data encryption is enabled with customer-managed keys.
+ /// Status showing whether the
+ /// server enabled infrastructure encryption. Possible values include:
+ /// 'Enabled', 'Disabled'
/// A state of a server that is visible
- /// to user. Possible values include: 'Ready', 'Dropping',
- /// 'Disabled'
+ /// to user. Possible values include: 'Ready', 'Dropping', 'Disabled',
+ /// 'Inaccessible'
/// The fully qualified domain
/// name of a server.
/// Earliest restore point creation
@@ -64,13 +76,23 @@ public Server()
/// server.
/// The maximum number of replicas that a
/// master server can have.
- public Server(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), Sku sku = default(Sku), string administratorLogin = default(string), string version = default(string), SslEnforcementEnum? sslEnforcement = default(SslEnforcementEnum?), string userVisibleState = default(string), string fullyQualifiedDomainName = default(string), System.DateTime? earliestRestoreDate = default(System.DateTime?), StorageProfile storageProfile = default(StorageProfile), string replicationRole = default(string), string masterServerId = default(string), int? replicaCapacity = default(int?))
+ /// Whether or not public network
+ /// access is allowed for this server. Value is optional but if passed
+ /// in, must be 'Enabled' or 'Disabled'. Possible values include:
+ /// 'Enabled', 'Disabled'
+ /// List of private endpoint
+ /// connections on a server
+ public Server(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), ResourceIdentity identity = default(ResourceIdentity), Sku sku = default(Sku), string administratorLogin = default(string), string version = default(string), SslEnforcementEnum? sslEnforcement = default(SslEnforcementEnum?), string minimalTlsVersion = default(string), string byokEnforcement = default(string), string infrastructureEncryption = default(string), string userVisibleState = default(string), string fullyQualifiedDomainName = default(string), System.DateTime? earliestRestoreDate = default(System.DateTime?), StorageProfile storageProfile = default(StorageProfile), string replicationRole = default(string), string masterServerId = default(string), int? replicaCapacity = default(int?), string publicNetworkAccess = default(string), IList privateEndpointConnections = default(IList))
: base(location, id, name, type, tags)
{
+ Identity = identity;
Sku = sku;
AdministratorLogin = administratorLogin;
Version = version;
SslEnforcement = sslEnforcement;
+ MinimalTlsVersion = minimalTlsVersion;
+ ByokEnforcement = byokEnforcement;
+ InfrastructureEncryption = infrastructureEncryption;
UserVisibleState = userVisibleState;
FullyQualifiedDomainName = fullyQualifiedDomainName;
EarliestRestoreDate = earliestRestoreDate;
@@ -78,6 +100,8 @@ public Server()
ReplicationRole = replicationRole;
MasterServerId = masterServerId;
ReplicaCapacity = replicaCapacity;
+ PublicNetworkAccess = publicNetworkAccess;
+ PrivateEndpointConnections = privateEndpointConnections;
CustomInit();
}
@@ -86,6 +110,12 @@ public Server()
///
partial void CustomInit();
+ ///
+ /// Gets or sets the Azure Active Directory identity of the server.
+ ///
+ [JsonProperty(PropertyName = "identity")]
+ public ResourceIdentity Identity { get; set; }
+
///
/// Gets or sets the SKU (pricing tier) of the server.
///
@@ -102,7 +132,7 @@ public Server()
///
/// Gets or sets server version. Possible values include: '9.5', '9.6',
- /// '10', '10.0', '10.2'
+ /// '10', '10.0', '10.2', '11'
///
[JsonProperty(PropertyName = "properties.version")]
public string Version { get; set; }
@@ -114,9 +144,32 @@ public Server()
[JsonProperty(PropertyName = "properties.sslEnforcement")]
public SslEnforcementEnum? SslEnforcement { get; set; }
+ ///
+ /// Gets or sets enforce a minimal Tls version for the server. Possible
+ /// values include: 'TLS1_0', 'TLS1_1', 'TLS1_2',
+ /// 'TLSEnforcementDisabled'
+ ///
+ [JsonProperty(PropertyName = "properties.minimalTlsVersion")]
+ public string MinimalTlsVersion { get; set; }
+
+ ///
+ /// Gets status showing whether the server data encryption is enabled
+ /// with customer-managed keys.
+ ///
+ [JsonProperty(PropertyName = "properties.byokEnforcement")]
+ public string ByokEnforcement { get; private set; }
+
+ ///
+ /// Gets or sets status showing whether the server enabled
+ /// infrastructure encryption. Possible values include: 'Enabled',
+ /// 'Disabled'
+ ///
+ [JsonProperty(PropertyName = "properties.infrastructureEncryption")]
+ public string InfrastructureEncryption { get; set; }
+
///
/// Gets or sets a state of a server that is visible to user. Possible
- /// values include: 'Ready', 'Dropping', 'Disabled'
+ /// values include: 'Ready', 'Dropping', 'Disabled', 'Inaccessible'
///
[JsonProperty(PropertyName = "properties.userVisibleState")]
public string UserVisibleState { get; set; }
@@ -158,6 +211,20 @@ public Server()
[JsonProperty(PropertyName = "properties.replicaCapacity")]
public int? ReplicaCapacity { get; set; }
+ ///
+ /// Gets or sets whether or not public network access is allowed for
+ /// this server. Value is optional but if passed in, must be 'Enabled'
+ /// or 'Disabled'. Possible values include: 'Enabled', 'Disabled'
+ ///
+ [JsonProperty(PropertyName = "properties.publicNetworkAccess")]
+ public string PublicNetworkAccess { get; set; }
+
+ ///
+ /// Gets list of private endpoint connections on a server
+ ///
+ [JsonProperty(PropertyName = "properties.privateEndpointConnections")]
+ public IList PrivateEndpointConnections { get; private set; }
+
///
/// Validate the object.
///
@@ -175,6 +242,16 @@ public override void Validate()
{
throw new ValidationException(ValidationRules.InclusiveMinimum, "ReplicaCapacity", 0);
}
+ if (PrivateEndpointConnections != null)
+ {
+ foreach (var element in PrivateEndpointConnections)
+ {
+ if (element != null)
+ {
+ element.Validate();
+ }
+ }
+ }
}
}
}
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerAdministratorResource.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerAdministratorResource.cs
new file mode 100644
index 0000000000000..c410cd4202dbc
--- /dev/null
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerAdministratorResource.cs
@@ -0,0 +1,107 @@
+//
+// 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.PostgreSQL.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Represents a and external administrator to be created.
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class ServerAdministratorResource : ProxyResource
+ {
+ ///
+ /// Initializes a new instance of the ServerAdministratorResource
+ /// class.
+ ///
+ public ServerAdministratorResource()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ServerAdministratorResource
+ /// class.
+ ///
+ /// The server administrator login account
+ /// name.
+ /// The server administrator Sid (Secure ID).
+ /// The server Active Directory Administrator
+ /// tenant id.
+ /// Fully qualified resource Id for the resource. Ex -
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ /// The name of the resource
+ /// The type of the resource. Ex-
+ /// Microsoft.Compute/virtualMachines or
+ /// Microsoft.Storage/storageAccounts.
+ public ServerAdministratorResource(string login, System.Guid sid, System.Guid tenantId, string id = default(string), string name = default(string), string type = default(string))
+ : base(id, name, type)
+ {
+ Login = login;
+ Sid = sid;
+ TenantId = tenantId;
+ CustomInit();
+ }
+ ///
+ /// Static constructor for ServerAdministratorResource class.
+ ///
+ static ServerAdministratorResource()
+ {
+ AdministratorType = "ActiveDirectory";
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the server administrator login account name.
+ ///
+ [JsonProperty(PropertyName = "properties.login")]
+ public string Login { get; set; }
+
+ ///
+ /// Gets or sets the server administrator Sid (Secure ID).
+ ///
+ [JsonProperty(PropertyName = "properties.sid")]
+ public System.Guid Sid { get; set; }
+
+ ///
+ /// Gets or sets the server Active Directory Administrator tenant id.
+ ///
+ [JsonProperty(PropertyName = "properties.tenantId")]
+ public System.Guid TenantId { get; set; }
+
+ ///
+ /// The type of administrator.
+ ///
+ [JsonProperty(PropertyName = "properties.administratorType")]
+ public static string AdministratorType { get; private set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Login == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Login");
+ }
+ }
+ }
+}
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/ServerForCreate.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerForCreate.cs
similarity index 85%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/ServerForCreate.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerForCreate.cs
index 9b7ee4c4a4b58..78a7a2a70fbac 100644
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/ServerForCreate.cs
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerForCreate.cs
@@ -35,11 +35,14 @@ public ServerForCreate()
/// Properties of the server.
/// The location the resource resides
/// in.
+ /// The Azure Active Directory identity of the
+ /// server.
/// The SKU (pricing tier) of the server.
/// Application-specific metadata in the form of
/// key-value pairs.
- public ServerForCreate(ServerPropertiesForCreate properties, string location, Sku sku = default(Sku), IDictionary tags = default(IDictionary))
+ public ServerForCreate(ServerPropertiesForCreate properties, string location, ResourceIdentity identity = default(ResourceIdentity), Sku sku = default(Sku), IDictionary tags = default(IDictionary))
{
+ Identity = identity;
Sku = sku;
Properties = properties;
Location = location;
@@ -52,6 +55,12 @@ public ServerForCreate()
///
partial void CustomInit();
+ ///
+ /// Gets or sets the Azure Active Directory identity of the server.
+ ///
+ [JsonProperty(PropertyName = "identity")]
+ public ResourceIdentity Identity { get; set; }
+
///
/// Gets or sets the SKU (pricing tier) of the server.
///
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerKey.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerKey.cs
new file mode 100644
index 0000000000000..113635eb5fd6a
--- /dev/null
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerKey.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.PostgreSQL.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// A PostgreSQL Server key.
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class ServerKey : ProxyResource
+ {
+ ///
+ /// Initializes a new instance of the ServerKey class.
+ ///
+ public ServerKey()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ServerKey class.
+ ///
+ /// Fully qualified resource Id for the resource. Ex -
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ /// The name of the resource
+ /// The type of the resource. Ex-
+ /// Microsoft.Compute/virtualMachines or
+ /// Microsoft.Storage/storageAccounts.
+ /// Kind of encryption protector used to protect the
+ /// key.
+ /// The URI of the key.
+ /// The key creation date.
+ public ServerKey(string id = default(string), string name = default(string), string type = default(string), string kind = default(string), string uri = default(string), System.DateTime? creationDate = default(System.DateTime?))
+ : base(id, name, type)
+ {
+ Kind = kind;
+ Uri = uri;
+ CreationDate = creationDate;
+ CustomInit();
+ }
+ ///
+ /// Static constructor for ServerKey class.
+ ///
+ static ServerKey()
+ {
+ ServerKeyType = "AzureKeyVault";
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets kind of encryption protector used to protect the key.
+ ///
+ [JsonProperty(PropertyName = "kind")]
+ public string Kind { get; private set; }
+
+ ///
+ /// Gets or sets the URI of the key.
+ ///
+ [JsonProperty(PropertyName = "properties.uri")]
+ public string Uri { get; set; }
+
+ ///
+ /// Gets the key creation date.
+ ///
+ [JsonProperty(PropertyName = "properties.creationDate")]
+ public System.DateTime? CreationDate { get; private set; }
+
+ ///
+ /// The key type like 'AzureKeyVault'.
+ ///
+ [JsonProperty(PropertyName = "properties.serverKeyType")]
+ public static string ServerKeyType { get; private set; }
+
+ }
+}
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerPrivateEndpointConnection.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerPrivateEndpointConnection.cs
new file mode 100644
index 0000000000000..b711754ebf94b
--- /dev/null
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerPrivateEndpointConnection.cs
@@ -0,0 +1,76 @@
+//
+// 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.PostgreSQL.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// A private endpoint connection under a server
+ ///
+ public partial class ServerPrivateEndpointConnection
+ {
+ ///
+ /// Initializes a new instance of the ServerPrivateEndpointConnection
+ /// class.
+ ///
+ public ServerPrivateEndpointConnection()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ServerPrivateEndpointConnection
+ /// class.
+ ///
+ /// Resource ID of the Private Endpoint
+ /// Connection.
+ /// Private endpoint connection
+ /// properties
+ public ServerPrivateEndpointConnection(string id = default(string), ServerPrivateEndpointConnectionProperties properties = default(ServerPrivateEndpointConnectionProperties))
+ {
+ Id = id;
+ Properties = properties;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets resource ID of the Private Endpoint Connection.
+ ///
+ [JsonProperty(PropertyName = "id")]
+ public string Id { get; private set; }
+
+ ///
+ /// Gets private endpoint connection properties
+ ///
+ [JsonProperty(PropertyName = "properties")]
+ public ServerPrivateEndpointConnectionProperties Properties { get; private set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Properties != null)
+ {
+ Properties.Validate();
+ }
+ }
+ }
+}
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerPrivateEndpointConnectionProperties.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerPrivateEndpointConnectionProperties.cs
new file mode 100644
index 0000000000000..915658ad2375f
--- /dev/null
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerPrivateEndpointConnectionProperties.cs
@@ -0,0 +1,87 @@
+//
+// 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.PostgreSQL.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Properties of a private endpoint connection.
+ ///
+ public partial class ServerPrivateEndpointConnectionProperties
+ {
+ ///
+ /// Initializes a new instance of the
+ /// ServerPrivateEndpointConnectionProperties class.
+ ///
+ public ServerPrivateEndpointConnectionProperties()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// ServerPrivateEndpointConnectionProperties class.
+ ///
+ /// Private endpoint which the connection
+ /// belongs to.
+ /// Connection state of
+ /// the private endpoint connection.
+ /// State of the private endpoint
+ /// connection. Possible values include: 'Approving', 'Ready',
+ /// 'Dropping', 'Failed', 'Rejecting'
+ public ServerPrivateEndpointConnectionProperties(PrivateEndpointProperty privateEndpoint = default(PrivateEndpointProperty), ServerPrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState = default(ServerPrivateLinkServiceConnectionStateProperty), string provisioningState = default(string))
+ {
+ PrivateEndpoint = privateEndpoint;
+ PrivateLinkServiceConnectionState = privateLinkServiceConnectionState;
+ ProvisioningState = provisioningState;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets private endpoint which the connection belongs to.
+ ///
+ [JsonProperty(PropertyName = "privateEndpoint")]
+ public PrivateEndpointProperty PrivateEndpoint { get; set; }
+
+ ///
+ /// Gets or sets connection state of the private endpoint connection.
+ ///
+ [JsonProperty(PropertyName = "privateLinkServiceConnectionState")]
+ public ServerPrivateLinkServiceConnectionStateProperty PrivateLinkServiceConnectionState { get; set; }
+
+ ///
+ /// Gets state of the private endpoint connection. Possible values
+ /// include: 'Approving', 'Ready', 'Dropping', 'Failed', 'Rejecting'
+ ///
+ [JsonProperty(PropertyName = "provisioningState")]
+ public string ProvisioningState { get; private set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (PrivateLinkServiceConnectionState != null)
+ {
+ PrivateLinkServiceConnectionState.Validate();
+ }
+ }
+ }
+}
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerPrivateLinkServiceConnectionStateProperty.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerPrivateLinkServiceConnectionStateProperty.cs
new file mode 100644
index 0000000000000..fe0849058efd2
--- /dev/null
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerPrivateLinkServiceConnectionStateProperty.cs
@@ -0,0 +1,90 @@
+//
+// 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.PostgreSQL.Models
+{
+ using Microsoft.Rest;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ public partial class ServerPrivateLinkServiceConnectionStateProperty
+ {
+ ///
+ /// Initializes a new instance of the
+ /// ServerPrivateLinkServiceConnectionStateProperty class.
+ ///
+ public ServerPrivateLinkServiceConnectionStateProperty()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// ServerPrivateLinkServiceConnectionStateProperty class.
+ ///
+ /// The private link service connection status.
+ /// Possible values include: 'Approved', 'Pending', 'Rejected',
+ /// 'Disconnected'
+ /// The private link service connection
+ /// description.
+ /// The actions required for private link
+ /// service connection. Possible values include: 'None'
+ public ServerPrivateLinkServiceConnectionStateProperty(string status, string description, string actionsRequired = default(string))
+ {
+ Status = status;
+ Description = description;
+ ActionsRequired = actionsRequired;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the private link service connection status. Possible
+ /// values include: 'Approved', 'Pending', 'Rejected', 'Disconnected'
+ ///
+ [JsonProperty(PropertyName = "status")]
+ public string Status { get; set; }
+
+ ///
+ /// Gets or sets the private link service connection description.
+ ///
+ [JsonProperty(PropertyName = "description")]
+ public string Description { get; set; }
+
+ ///
+ /// Gets the actions required for private link service connection.
+ /// Possible values include: 'None'
+ ///
+ [JsonProperty(PropertyName = "actionsRequired")]
+ public string ActionsRequired { get; private set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Status == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Status");
+ }
+ if (Description == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Description");
+ }
+ }
+ }
+}
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/ServerPropertiesForCreate.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerPropertiesForCreate.cs
similarity index 52%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/ServerPropertiesForCreate.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerPropertiesForCreate.cs
index a88781652d684..2f0292d2b4630 100644
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/ServerPropertiesForCreate.cs
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerPropertiesForCreate.cs
@@ -30,15 +30,28 @@ public ServerPropertiesForCreate()
/// Initializes a new instance of the ServerPropertiesForCreate class.
///
/// Server version. Possible values include:
- /// '9.5', '9.6', '10', '10.0', '10.2'
+ /// '9.5', '9.6', '10', '10.0', '10.2', '11'
/// Enable ssl enforcement or not when
/// connect to server. Possible values include: 'Enabled',
/// 'Disabled'
+ /// Enforce a minimal Tls version for
+ /// the server. Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2',
+ /// 'TLSEnforcementDisabled'
+ /// Status showing whether the
+ /// server enabled infrastructure encryption. Possible values include:
+ /// 'Enabled', 'Disabled'
+ /// Whether or not public network
+ /// access is allowed for this server. Value is optional but if passed
+ /// in, must be 'Enabled' or 'Disabled'. Possible values include:
+ /// 'Enabled', 'Disabled'
/// Storage profile of a server.
- public ServerPropertiesForCreate(string version = default(string), SslEnforcementEnum? sslEnforcement = default(SslEnforcementEnum?), StorageProfile storageProfile = default(StorageProfile))
+ public ServerPropertiesForCreate(string version = default(string), SslEnforcementEnum? sslEnforcement = default(SslEnforcementEnum?), string minimalTlsVersion = default(string), string infrastructureEncryption = default(string), string publicNetworkAccess = default(string), StorageProfile storageProfile = default(StorageProfile))
{
Version = version;
SslEnforcement = sslEnforcement;
+ MinimalTlsVersion = minimalTlsVersion;
+ InfrastructureEncryption = infrastructureEncryption;
+ PublicNetworkAccess = publicNetworkAccess;
StorageProfile = storageProfile;
CustomInit();
}
@@ -50,7 +63,7 @@ public ServerPropertiesForCreate()
///
/// Gets or sets server version. Possible values include: '9.5', '9.6',
- /// '10', '10.0', '10.2'
+ /// '10', '10.0', '10.2', '11'
///
[JsonProperty(PropertyName = "version")]
public string Version { get; set; }
@@ -62,6 +75,30 @@ public ServerPropertiesForCreate()
[JsonProperty(PropertyName = "sslEnforcement")]
public SslEnforcementEnum? SslEnforcement { get; set; }
+ ///
+ /// Gets or sets enforce a minimal Tls version for the server. Possible
+ /// values include: 'TLS1_0', 'TLS1_1', 'TLS1_2',
+ /// 'TLSEnforcementDisabled'
+ ///
+ [JsonProperty(PropertyName = "minimalTlsVersion")]
+ public string MinimalTlsVersion { get; set; }
+
+ ///
+ /// Gets or sets status showing whether the server enabled
+ /// infrastructure encryption. Possible values include: 'Enabled',
+ /// 'Disabled'
+ ///
+ [JsonProperty(PropertyName = "infrastructureEncryption")]
+ public string InfrastructureEncryption { get; set; }
+
+ ///
+ /// Gets or sets whether or not public network access is allowed for
+ /// this server. Value is optional but if passed in, must be 'Enabled'
+ /// or 'Disabled'. Possible values include: 'Enabled', 'Disabled'
+ ///
+ [JsonProperty(PropertyName = "publicNetworkAccess")]
+ public string PublicNetworkAccess { get; set; }
+
///
/// Gets or sets storage profile of a server.
///
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/ServerPropertiesForDefaultCreate.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerPropertiesForDefaultCreate.cs
similarity index 76%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/ServerPropertiesForDefaultCreate.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerPropertiesForDefaultCreate.cs
index e53f9da95499f..788f62930bd3e 100644
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/ServerPropertiesForDefaultCreate.cs
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerPropertiesForDefaultCreate.cs
@@ -39,13 +39,23 @@ public ServerPropertiesForDefaultCreate()
/// The password of the
/// administrator login.
/// Server version. Possible values include:
- /// '9.5', '9.6', '10', '10.0', '10.2'
+ /// '9.5', '9.6', '10', '10.0', '10.2', '11'
/// Enable ssl enforcement or not when
/// connect to server. Possible values include: 'Enabled',
/// 'Disabled'
+ /// Enforce a minimal Tls version for
+ /// the server. Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2',
+ /// 'TLSEnforcementDisabled'
+ /// Status showing whether the
+ /// server enabled infrastructure encryption. Possible values include:
+ /// 'Enabled', 'Disabled'
+ /// Whether or not public network
+ /// access is allowed for this server. Value is optional but if passed
+ /// in, must be 'Enabled' or 'Disabled'. Possible values include:
+ /// 'Enabled', 'Disabled'
/// Storage profile of a server.
- public ServerPropertiesForDefaultCreate(string administratorLogin, string administratorLoginPassword, string version = default(string), SslEnforcementEnum? sslEnforcement = default(SslEnforcementEnum?), StorageProfile storageProfile = default(StorageProfile))
- : base(version, sslEnforcement, storageProfile)
+ public ServerPropertiesForDefaultCreate(string administratorLogin, string administratorLoginPassword, string version = default(string), SslEnforcementEnum? sslEnforcement = default(SslEnforcementEnum?), string minimalTlsVersion = default(string), string infrastructureEncryption = default(string), string publicNetworkAccess = default(string), StorageProfile storageProfile = default(StorageProfile))
+ : base(version, sslEnforcement, minimalTlsVersion, infrastructureEncryption, publicNetworkAccess, storageProfile)
{
AdministratorLogin = administratorLogin;
AdministratorLoginPassword = administratorLoginPassword;
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/ServerPropertiesForGeoRestore.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerPropertiesForGeoRestore.cs
similarity index 70%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/ServerPropertiesForGeoRestore.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerPropertiesForGeoRestore.cs
index 95e48dfb3a82c..8e52f7d9b1239 100644
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/ServerPropertiesForGeoRestore.cs
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerPropertiesForGeoRestore.cs
@@ -37,13 +37,23 @@ public ServerPropertiesForGeoRestore()
/// The source server id to restore
/// from.
/// Server version. Possible values include:
- /// '9.5', '9.6', '10', '10.0', '10.2'
+ /// '9.5', '9.6', '10', '10.0', '10.2', '11'
/// Enable ssl enforcement or not when
/// connect to server. Possible values include: 'Enabled',
/// 'Disabled'
+ /// Enforce a minimal Tls version for
+ /// the server. Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2',
+ /// 'TLSEnforcementDisabled'
+ /// Status showing whether the
+ /// server enabled infrastructure encryption. Possible values include:
+ /// 'Enabled', 'Disabled'
+ /// Whether or not public network
+ /// access is allowed for this server. Value is optional but if passed
+ /// in, must be 'Enabled' or 'Disabled'. Possible values include:
+ /// 'Enabled', 'Disabled'
/// Storage profile of a server.
- public ServerPropertiesForGeoRestore(string sourceServerId, string version = default(string), SslEnforcementEnum? sslEnforcement = default(SslEnforcementEnum?), StorageProfile storageProfile = default(StorageProfile))
- : base(version, sslEnforcement, storageProfile)
+ public ServerPropertiesForGeoRestore(string sourceServerId, string version = default(string), SslEnforcementEnum? sslEnforcement = default(SslEnforcementEnum?), string minimalTlsVersion = default(string), string infrastructureEncryption = default(string), string publicNetworkAccess = default(string), StorageProfile storageProfile = default(StorageProfile))
+ : base(version, sslEnforcement, minimalTlsVersion, infrastructureEncryption, publicNetworkAccess, storageProfile)
{
SourceServerId = sourceServerId;
CustomInit();
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/ServerPropertiesForReplica.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerPropertiesForReplica.cs
similarity index 69%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/ServerPropertiesForReplica.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerPropertiesForReplica.cs
index 994f08f9b9e6c..263423778b47b 100644
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/ServerPropertiesForReplica.cs
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerPropertiesForReplica.cs
@@ -34,13 +34,23 @@ public ServerPropertiesForReplica()
/// The master server id to create replica
/// from.
/// Server version. Possible values include:
- /// '9.5', '9.6', '10', '10.0', '10.2'
+ /// '9.5', '9.6', '10', '10.0', '10.2', '11'
/// Enable ssl enforcement or not when
/// connect to server. Possible values include: 'Enabled',
/// 'Disabled'
+ /// Enforce a minimal Tls version for
+ /// the server. Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2',
+ /// 'TLSEnforcementDisabled'
+ /// Status showing whether the
+ /// server enabled infrastructure encryption. Possible values include:
+ /// 'Enabled', 'Disabled'
+ /// Whether or not public network
+ /// access is allowed for this server. Value is optional but if passed
+ /// in, must be 'Enabled' or 'Disabled'. Possible values include:
+ /// 'Enabled', 'Disabled'
/// Storage profile of a server.
- public ServerPropertiesForReplica(string sourceServerId, string version = default(string), SslEnforcementEnum? sslEnforcement = default(SslEnforcementEnum?), StorageProfile storageProfile = default(StorageProfile))
- : base(version, sslEnforcement, storageProfile)
+ public ServerPropertiesForReplica(string sourceServerId, string version = default(string), SslEnforcementEnum? sslEnforcement = default(SslEnforcementEnum?), string minimalTlsVersion = default(string), string infrastructureEncryption = default(string), string publicNetworkAccess = default(string), StorageProfile storageProfile = default(StorageProfile))
+ : base(version, sslEnforcement, minimalTlsVersion, infrastructureEncryption, publicNetworkAccess, storageProfile)
{
SourceServerId = sourceServerId;
CustomInit();
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/ServerPropertiesForRestore.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerPropertiesForRestore.cs
similarity index 74%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/ServerPropertiesForRestore.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerPropertiesForRestore.cs
index 534c4017d197a..267d2054da1c1 100644
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/ServerPropertiesForRestore.cs
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerPropertiesForRestore.cs
@@ -36,13 +36,23 @@ public ServerPropertiesForRestore()
/// Restore point creation time
/// (ISO8601 format), specifying the time to restore from.
/// Server version. Possible values include:
- /// '9.5', '9.6', '10', '10.0', '10.2'
+ /// '9.5', '9.6', '10', '10.0', '10.2', '11'
/// Enable ssl enforcement or not when
/// connect to server. Possible values include: 'Enabled',
/// 'Disabled'
+ /// Enforce a minimal Tls version for
+ /// the server. Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2',
+ /// 'TLSEnforcementDisabled'
+ /// Status showing whether the
+ /// server enabled infrastructure encryption. Possible values include:
+ /// 'Enabled', 'Disabled'
+ /// Whether or not public network
+ /// access is allowed for this server. Value is optional but if passed
+ /// in, must be 'Enabled' or 'Disabled'. Possible values include:
+ /// 'Enabled', 'Disabled'
/// Storage profile of a server.
- public ServerPropertiesForRestore(string sourceServerId, System.DateTime restorePointInTime, string version = default(string), SslEnforcementEnum? sslEnforcement = default(SslEnforcementEnum?), StorageProfile storageProfile = default(StorageProfile))
- : base(version, sslEnforcement, storageProfile)
+ public ServerPropertiesForRestore(string sourceServerId, System.DateTime restorePointInTime, string version = default(string), SslEnforcementEnum? sslEnforcement = default(SslEnforcementEnum?), string minimalTlsVersion = default(string), string infrastructureEncryption = default(string), string publicNetworkAccess = default(string), StorageProfile storageProfile = default(StorageProfile))
+ : base(version, sslEnforcement, minimalTlsVersion, infrastructureEncryption, publicNetworkAccess, storageProfile)
{
SourceServerId = sourceServerId;
RestorePointInTime = restorePointInTime;
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/ServerSecurityAlertPolicy.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerSecurityAlertPolicy.cs
similarity index 92%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/ServerSecurityAlertPolicy.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerSecurityAlertPolicy.cs
index c6c4368fc399e..06b616df3135d 100644
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/ServerSecurityAlertPolicy.cs
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerSecurityAlertPolicy.cs
@@ -37,9 +37,12 @@ public ServerSecurityAlertPolicy()
/// Specifies the state of the policy, whether it
/// is enabled or disabled. Possible values include: 'Enabled',
/// 'Disabled'
- /// Resource ID
- /// Resource name.
- /// Resource type.
+ /// Fully qualified resource Id for the resource. Ex -
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ /// The name of the resource
+ /// The type of the resource. Ex-
+ /// Microsoft.Compute/virtualMachines or
+ /// Microsoft.Storage/storageAccounts.
/// Specifies an array of alerts that are
/// disabled. Allowed values are: Sql_Injection,
/// Sql_Injection_Vulnerability, Access_Anomaly
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/ServerSecurityAlertPolicyState.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerSecurityAlertPolicyState.cs
similarity index 100%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/ServerSecurityAlertPolicyState.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerSecurityAlertPolicyState.cs
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/ServerState.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerState.cs
similarity index 92%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/ServerState.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerState.cs
index a3b2bf28dbb47..024c8530e8bf0 100644
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/ServerState.cs
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerState.cs
@@ -19,5 +19,6 @@ public static class ServerState
public const string Ready = "Ready";
public const string Dropping = "Dropping";
public const string Disabled = "Disabled";
+ public const string Inaccessible = "Inaccessible";
}
}
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/ServerUpdateParameters.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerUpdateParameters.cs
similarity index 65%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/ServerUpdateParameters.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerUpdateParameters.cs
index 125c70a21b090..52022e31dfcb1 100644
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/ServerUpdateParameters.cs
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerUpdateParameters.cs
@@ -34,26 +34,38 @@ public ServerUpdateParameters()
///
/// Initializes a new instance of the ServerUpdateParameters class.
///
+ /// The Azure Active Directory identity of the
+ /// server.
/// The SKU (pricing tier) of the server.
/// Storage profile of a server.
/// The password of the
/// administrator login.
/// The version of a server. Possible values
- /// include: '9.5', '9.6', '10', '10.0', '10.2'
+ /// include: '9.5', '9.6', '10', '10.0', '10.2', '11'
/// Enable ssl enforcement or not when
/// connect to server. Possible values include: 'Enabled',
/// 'Disabled'
+ /// Enforce a minimal Tls version for
+ /// the server. Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2',
+ /// 'TLSEnforcementDisabled'
+ /// Whether or not public network
+ /// access is allowed for this server. Value is optional but if passed
+ /// in, must be 'Enabled' or 'Disabled'. Possible values include:
+ /// 'Enabled', 'Disabled'
/// The replication role of the
/// server.
/// Application-specific metadata in the form of
/// key-value pairs.
- public ServerUpdateParameters(Sku sku = default(Sku), StorageProfile storageProfile = default(StorageProfile), string administratorLoginPassword = default(string), string version = default(string), SslEnforcementEnum? sslEnforcement = default(SslEnforcementEnum?), string replicationRole = default(string), IDictionary tags = default(IDictionary))
+ public ServerUpdateParameters(ResourceIdentity identity = default(ResourceIdentity), Sku sku = default(Sku), StorageProfile storageProfile = default(StorageProfile), string administratorLoginPassword = default(string), string version = default(string), SslEnforcementEnum? sslEnforcement = default(SslEnforcementEnum?), string minimalTlsVersion = default(string), string publicNetworkAccess = default(string), string replicationRole = default(string), IDictionary tags = default(IDictionary))
{
+ Identity = identity;
Sku = sku;
StorageProfile = storageProfile;
AdministratorLoginPassword = administratorLoginPassword;
Version = version;
SslEnforcement = sslEnforcement;
+ MinimalTlsVersion = minimalTlsVersion;
+ PublicNetworkAccess = publicNetworkAccess;
ReplicationRole = replicationRole;
Tags = tags;
CustomInit();
@@ -64,6 +76,12 @@ public ServerUpdateParameters()
///
partial void CustomInit();
+ ///
+ /// Gets or sets the Azure Active Directory identity of the server.
+ ///
+ [JsonProperty(PropertyName = "identity")]
+ public ResourceIdentity Identity { get; set; }
+
///
/// Gets or sets the SKU (pricing tier) of the server.
///
@@ -84,7 +102,7 @@ public ServerUpdateParameters()
///
/// Gets or sets the version of a server. Possible values include:
- /// '9.5', '9.6', '10', '10.0', '10.2'
+ /// '9.5', '9.6', '10', '10.0', '10.2', '11'
///
[JsonProperty(PropertyName = "properties.version")]
public string Version { get; set; }
@@ -96,6 +114,22 @@ public ServerUpdateParameters()
[JsonProperty(PropertyName = "properties.sslEnforcement")]
public SslEnforcementEnum? SslEnforcement { get; set; }
+ ///
+ /// Gets or sets enforce a minimal Tls version for the server. Possible
+ /// values include: 'TLS1_0', 'TLS1_1', 'TLS1_2',
+ /// 'TLSEnforcementDisabled'
+ ///
+ [JsonProperty(PropertyName = "properties.minimalTlsVersion")]
+ public string MinimalTlsVersion { get; set; }
+
+ ///
+ /// Gets or sets whether or not public network access is allowed for
+ /// this server. Value is optional but if passed in, must be 'Enabled'
+ /// or 'Disabled'. Possible values include: 'Enabled', 'Disabled'
+ ///
+ [JsonProperty(PropertyName = "properties.publicNetworkAccess")]
+ public string PublicNetworkAccess { get; set; }
+
///
/// Gets or sets the replication role of the server.
///
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/ServerVersion.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerVersion.cs
similarity index 94%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/ServerVersion.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerVersion.cs
index 7b9d6a2352fbf..195c933c4628a 100644
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/ServerVersion.cs
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/ServerVersion.cs
@@ -21,5 +21,6 @@ public static class ServerVersion
public const string OneZero = "10";
public const string OneZeroFullStopZero = "10.0";
public const string OneZeroFullStopTwo = "10.2";
+ public const string OneOne = "11";
}
}
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/Sku.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/Sku.cs
similarity index 91%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/Sku.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/Sku.cs
index 05ac437482873..a38e9ed36c75f 100644
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/Sku.cs
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/Sku.cs
@@ -40,7 +40,7 @@ public Sku()
/// The size code, to be interpreted by resource as
/// appropriate.
/// The family of hardware.
- public Sku(string name = default(string), string tier = default(string), int? capacity = default(int?), string size = default(string), string family = default(string))
+ public Sku(string name, string tier = default(string), int? capacity = default(int?), string size = default(string), string family = default(string))
{
Name = name;
Tier = tier;
@@ -97,6 +97,10 @@ public Sku()
///
public virtual void Validate()
{
+ if (Name == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Name");
+ }
if (Capacity < 0)
{
throw new ValidationException(ValidationRules.InclusiveMinimum, "Capacity", 0);
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/SkuTier.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/SkuTier.cs
similarity index 100%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/SkuTier.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/SkuTier.cs
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/SslEnforcementEnum.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/SslEnforcementEnum.cs
similarity index 100%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/SslEnforcementEnum.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/SslEnforcementEnum.cs
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/StorageAutogrow.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/StorageAutogrow.cs
new file mode 100644
index 0000000000000..4fb501782f93d
--- /dev/null
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/StorageAutogrow.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.PostgreSQL.Models
+{
+
+ ///
+ /// Defines values for StorageAutogrow.
+ ///
+ public static class StorageAutogrow
+ {
+ public const string Enabled = "Enabled";
+ public const string Disabled = "Disabled";
+ }
+}
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/StorageProfile.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/StorageProfile.cs
similarity index 82%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/StorageProfile.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/StorageProfile.cs
index e4b5fa78e581f..568db7f42c3ba 100644
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/StorageProfile.cs
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/StorageProfile.cs
@@ -35,11 +35,14 @@ public StorageProfile()
/// server backup. Possible values include: 'Enabled',
/// 'Disabled'
/// Max storage allowed for a server.
- public StorageProfile(int? backupRetentionDays = default(int?), string geoRedundantBackup = default(string), int? storageMB = default(int?))
+ /// Enable Storage Auto Grow. Possible
+ /// values include: 'Enabled', 'Disabled'
+ public StorageProfile(int? backupRetentionDays = default(int?), string geoRedundantBackup = default(string), int? storageMB = default(int?), string storageAutogrow = default(string))
{
BackupRetentionDays = backupRetentionDays;
GeoRedundantBackup = geoRedundantBackup;
StorageMB = storageMB;
+ StorageAutogrow = storageAutogrow;
CustomInit();
}
@@ -67,5 +70,12 @@ public StorageProfile()
[JsonProperty(PropertyName = "storageMB")]
public int? StorageMB { get; set; }
+ ///
+ /// Gets or sets enable Storage Auto Grow. Possible values include:
+ /// 'Enabled', 'Disabled'
+ ///
+ [JsonProperty(PropertyName = "storageAutogrow")]
+ public string StorageAutogrow { get; set; }
+
}
}
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/TagsObject.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/TagsObject.cs
new file mode 100644
index 0000000000000..b1b7e3cfab0a2
--- /dev/null
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/TagsObject.cs
@@ -0,0 +1,53 @@
+//
+// 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.PostgreSQL.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Tags object for patch operations.
+ ///
+ public partial class TagsObject
+ {
+ ///
+ /// Initializes a new instance of the TagsObject class.
+ ///
+ public TagsObject()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the TagsObject class.
+ ///
+ /// Resource tags.
+ public TagsObject(IDictionary tags = default(IDictionary))
+ {
+ Tags = tags;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets resource tags.
+ ///
+ [JsonProperty(PropertyName = "tags")]
+ public IDictionary Tags { get; set; }
+
+ }
+}
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/TrackedResource.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/TrackedResource.cs
similarity index 71%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/TrackedResource.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/TrackedResource.cs
index 4231b126e6c89..f76bdf2825eca 100644
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/TrackedResource.cs
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/TrackedResource.cs
@@ -17,9 +17,9 @@ namespace Microsoft.Azure.Management.PostgreSQL.Models
using System.Linq;
///
- /// Resource properties including location and tags for track resources.
+ /// The resource model definition for a ARM tracked top level resource
///
- public partial class TrackedResource : ProxyResource
+ public partial class TrackedResource : Resource
{
///
/// Initializes a new instance of the TrackedResource class.
@@ -32,18 +32,20 @@ public TrackedResource()
///
/// Initializes a new instance of the TrackedResource class.
///
- /// The location the resource resides
- /// in.
- /// Resource ID
- /// Resource name.
- /// Resource type.
- /// Application-specific metadata in the form of
- /// key-value pairs.
+ /// The geo-location where the resource
+ /// lives
+ /// Fully qualified resource Id for the resource. Ex -
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ /// The name of the resource
+ /// The type of the resource. Ex-
+ /// Microsoft.Compute/virtualMachines or
+ /// Microsoft.Storage/storageAccounts.
+ /// Resource tags.
public TrackedResource(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary))
: base(id, name, type)
{
- Location = location;
Tags = tags;
+ Location = location;
CustomInit();
}
@@ -53,17 +55,16 @@ public TrackedResource()
partial void CustomInit();
///
- /// Gets or sets the location the resource resides in.
+ /// Gets or sets resource tags.
///
- [JsonProperty(PropertyName = "location")]
- public string Location { get; set; }
+ [JsonProperty(PropertyName = "tags")]
+ public IDictionary Tags { get; set; }
///
- /// Gets or sets application-specific metadata in the form of key-value
- /// pairs.
+ /// Gets or sets the geo-location where the resource lives
///
- [JsonProperty(PropertyName = "tags")]
- public IDictionary Tags { get; set; }
+ [JsonProperty(PropertyName = "location")]
+ public string Location { get; set; }
///
/// Validate the object.
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/VirtualNetworkRule.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/VirtualNetworkRule.cs
similarity index 88%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/VirtualNetworkRule.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/VirtualNetworkRule.cs
index 8f132417371eb..cffba1a1967da 100644
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/VirtualNetworkRule.cs
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/VirtualNetworkRule.cs
@@ -34,9 +34,12 @@ public VirtualNetworkRule()
///
/// The ARM resource id of the
/// virtual network subnet.
- /// Resource ID
- /// Resource name.
- /// Resource type.
+ /// Fully qualified resource Id for the resource. Ex -
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ /// The name of the resource
+ /// The type of the resource. Ex-
+ /// Microsoft.Compute/virtualMachines or
+ /// Microsoft.Storage/storageAccounts.
/// Create firewall rule
/// before the virtual network has vnet service endpoint
/// enabled.
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/VirtualNetworkRuleState.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/VirtualNetworkRuleState.cs
similarity index 100%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/Models/VirtualNetworkRuleState.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Models/VirtualNetworkRuleState.cs
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Operations.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Operations.cs
new file mode 100644
index 0000000000000..e27b3730208bd
--- /dev/null
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/Operations.cs
@@ -0,0 +1,219 @@
+//
+// 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.PostgreSQL
+{
+ 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;
+
+ ///
+ /// Operations operations.
+ ///
+ internal partial class Operations : IServiceOperations, IOperations
+ {
+ ///
+ /// Initializes a new instance of the Operations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal Operations(PostgreSQLManagementClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the PostgreSQLManagementClient
+ ///
+ public PostgreSQLManagementClient Client { get; private set; }
+
+ ///
+ /// Lists all of the available REST API operations.
+ ///
+ ///
+ /// 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
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ string apiVersion = "2017-12-01";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
+ 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("/") ? "" : "/")), "providers/Microsoft.DBForPostgreSQL/operations").ToString();
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(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/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/OperationsExtensions.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/OperationsExtensions.cs
similarity index 100%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/OperationsExtensions.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/OperationsExtensions.cs
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/PostgreSQLManagementClient.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/PostgreSQLManagementClient.cs
similarity index 94%
rename from sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/PostgreSQLManagementClient.cs
rename to sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/PostgreSQLManagementClient.cs
index 8354f1114cdca..0c38d863f8a79 100644
--- a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/Generated/PostgreSQLManagementClient.cs
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/PostgreSQLManagementClient.cs
@@ -50,15 +50,10 @@ public partial class PostgreSQLManagementClient : ServiceClient
- /// The subscription ID that identifies an Azure subscription.
+ /// The ID of the target subscription.
///
public string SubscriptionId { get; set; }
- ///
- /// The API version to use for the request.
- ///
- public string ApiVersion { get; private set; }
-
///
/// The preferred language for the response.
///
@@ -112,6 +107,11 @@ public partial class PostgreSQLManagementClient : ServiceClient
public virtual ILogFilesOperations LogFiles { get; private set; }
+ ///
+ /// Gets the IServerAdministratorsOperations.
+ ///
+ public virtual IServerAdministratorsOperations ServerAdministrators { get; private set; }
+
///
/// Gets the ILocationBasedPerformanceTierOperations.
///
@@ -122,15 +122,30 @@ public partial class PostgreSQLManagementClient : ServiceClient
public virtual ICheckNameAvailabilityOperations CheckNameAvailability { get; private set; }
+ ///
+ /// Gets the IOperations.
+ ///
+ public virtual IOperations Operations { get; private set; }
+
///
/// Gets the IServerSecurityAlertPoliciesOperations.
///
public virtual IServerSecurityAlertPoliciesOperations ServerSecurityAlertPolicies { get; private set; }
///
- /// Gets the IOperations.
+ /// Gets the IPrivateEndpointConnectionsOperations.
///
- public virtual IOperations Operations { get; private set; }
+ public virtual IPrivateEndpointConnectionsOperations PrivateEndpointConnections { get; private set; }
+
+ ///
+ /// Gets the IPrivateLinkResourcesOperations.
+ ///
+ public virtual IPrivateLinkResourcesOperations PrivateLinkResources { get; private set; }
+
+ ///
+ /// Gets the IServerKeysOperations.
+ ///
+ public virtual IServerKeysOperations ServerKeys { get; private set; }
///
/// Initializes a new instance of the PostgreSQLManagementClient class.
@@ -380,12 +395,15 @@ private void Initialize()
Databases = new DatabasesOperations(this);
Configurations = new ConfigurationsOperations(this);
LogFiles = new LogFilesOperations(this);
+ ServerAdministrators = new ServerAdministratorsOperations(this);
LocationBasedPerformanceTier = new LocationBasedPerformanceTierOperations(this);
CheckNameAvailability = new CheckNameAvailabilityOperations(this);
- ServerSecurityAlertPolicies = new ServerSecurityAlertPoliciesOperations(this);
Operations = new Operations(this);
+ ServerSecurityAlertPolicies = new ServerSecurityAlertPoliciesOperations(this);
+ PrivateEndpointConnections = new PrivateEndpointConnectionsOperations(this);
+ PrivateLinkResources = new PrivateLinkResourcesOperations(this);
+ ServerKeys = new ServerKeysOperations(this);
BaseUri = new System.Uri("https://management.azure.com");
- ApiVersion = "2017-12-01";
AcceptLanguage = "en-US";
LongRunningOperationRetryTimeout = 30;
GenerateClientRequestId = true;
diff --git a/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/PrivateEndpointConnectionsOperations.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/PrivateEndpointConnectionsOperations.cs
new file mode 100644
index 0000000000000..ce6bec612f892
--- /dev/null
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/PrivateEndpointConnectionsOperations.cs
@@ -0,0 +1,1435 @@
+//
+// 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.PostgreSQL
+{
+ 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;
+
+ ///
+ /// PrivateEndpointConnectionsOperations operations.
+ ///
+ internal partial class PrivateEndpointConnectionsOperations : IServiceOperations, IPrivateEndpointConnectionsOperations
+ {
+ ///
+ /// Initializes a new instance of the PrivateEndpointConnectionsOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal PrivateEndpointConnectionsOperations(PostgreSQLManagementClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the PostgreSQLManagementClient
+ ///
+ public PostgreSQLManagementClient Client { get; private set; }
+
+ ///
+ /// Gets a private endpoint connection.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the private endpoint connection.
+ ///
+ ///
+ /// 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> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (serverName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "serverName");
+ }
+ if (privateEndpointConnectionName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName");
+ }
+ 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);
+ }
+ }
+ string apiVersion = "2018-06-01";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("serverName", serverName);
+ tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName);
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
+ _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(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;
+ }
+
+ ///
+ /// Approve or reject a private endpoint connection with a given name.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string privateEndpointConnectionName, PrivateEndpointConnection parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send Request
+ AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, privateEndpointConnectionName, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Deletes a private endpoint connection with a given name.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send request
+ AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, serverName, privateEndpointConnectionName, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Updates tags on private endpoint connection.
+ ///
+ ///
+ /// Updates private endpoint connection with the specified tags.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ ///
+ ///
+ /// Parameters supplied to the Update private endpoint connection Tags
+ /// operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task> UpdateTagsWithHttpMessagesAsync(string resourceGroupName, string serverName, string privateEndpointConnectionName, TagsObject parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send Request
+ AzureOperationResponse _response = await BeginUpdateTagsWithHttpMessagesAsync(resourceGroupName, serverName, privateEndpointConnectionName, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Gets all private endpoint connections on a server.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// 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>> ListByServerWithHttpMessagesAsync(string resourceGroupName, string serverName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (serverName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "serverName");
+ }
+ 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);
+ }
+ }
+ string apiVersion = "2018-06-01";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("serverName", serverName);
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListByServer", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/privateEndpointConnections").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(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;
+ }
+
+ ///
+ /// Approve or reject a private endpoint connection with a given name.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// 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> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string privateEndpointConnectionName, PrivateEndpointConnection parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (serverName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "serverName");
+ }
+ if (privateEndpointConnectionName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName");
+ }
+ if (parameters == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
+ }
+ if (parameters != null)
+ {
+ parameters.Validate();
+ }
+ 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);
+ }
+ }
+ string apiVersion = "2018-06-01";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("serverName", serverName);
+ tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName);
+ tracingParameters.Add("parameters", parameters);
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
+ _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(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("PUT");
+ _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;
+ if(parameters != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
+ // 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 && (int)_statusCode != 202)
+ {
+ 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;
+ }
+
+ ///
+ /// Deletes a private endpoint connection with a given name.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// 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 BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (serverName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "serverName");
+ }
+ if (privateEndpointConnectionName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName");
+ }
+ 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);
+ }
+ }
+ string apiVersion = "2018-06-01";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("serverName", serverName);
+ tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName);
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
+ _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(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("DELETE");
+ _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 && (int)_statusCode != 202 && (int)_statusCode != 204)
+ {
+ 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();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Updates tags on private endpoint connection.
+ ///
+ ///
+ /// Updates private endpoint connection with the specified tags.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ ///
+ ///
+ /// Parameters supplied to the Update private endpoint connection Tags
+ /// operation.
+ ///
+ ///
+ /// 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> BeginUpdateTagsWithHttpMessagesAsync(string resourceGroupName, string serverName, string privateEndpointConnectionName, TagsObject parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ 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 (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (serverName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "serverName");
+ }
+ if (privateEndpointConnectionName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName");
+ }
+ if (parameters == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
+ }
+ string apiVersion = "2018-06-01";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("serverName", serverName);
+ tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName);
+ tracingParameters.Add("parameters", parameters);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginUpdateTags", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
+ _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName));
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(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("PATCH");
+ _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;
+ if(parameters != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
+ // 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;
+ }
+
+ ///
+ /// Gets all private endpoint connections on a server.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// 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>> ListByServerNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (nextPageLink == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("nextPageLink", nextPageLink);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListByServerNext", tracingParameters);
+ }
+ // Construct URL
+ string _url = "{nextLink}";
+ _url = _url.Replace("{nextLink}", nextPageLink);
+ List _queryParameters = new List();
+ 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/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/PrivateEndpointConnectionsOperationsExtensions.cs b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/PrivateEndpointConnectionsOperationsExtensions.cs
new file mode 100644
index 0000000000000..2d26956c7dc8d
--- /dev/null
+++ b/sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/postgresql/Generated/PrivateEndpointConnectionsOperationsExtensions.cs
@@ -0,0 +1,439 @@
+//
+// 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.PostgreSQL
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for PrivateEndpointConnectionsOperations.
+ ///
+ public static partial class PrivateEndpointConnectionsOperationsExtensions
+ {
+ ///
+ /// Gets a private endpoint connection.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the private endpoint connection.
+ ///
+ public static PrivateEndpointConnection Get(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string serverName, string privateEndpointConnectionName)
+ {
+ return operations.GetAsync(resourceGroupName, serverName, privateEndpointConnectionName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets a private endpoint connection.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the private endpoint connection.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task GetAsync(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string serverName, string privateEndpointConnectionName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Approve or reject a private endpoint connection with a given name.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static PrivateEndpointConnection CreateOrUpdate(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string serverName, string privateEndpointConnectionName, PrivateEndpointConnection parameters)
+ {
+ return operations.CreateOrUpdateAsync(resourceGroupName, serverName, privateEndpointConnectionName, parameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Approve or reject a private endpoint connection with a given name.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task CreateOrUpdateAsync(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string serverName, string privateEndpointConnectionName, PrivateEndpointConnection parameters, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, privateEndpointConnectionName, parameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Deletes a private endpoint connection with a given name.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ ///
+ public static void Delete(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string serverName, string privateEndpointConnectionName)
+ {
+ operations.DeleteAsync(resourceGroupName, serverName, privateEndpointConnectionName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Deletes a private endpoint connection with a given name.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task DeleteAsync(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string serverName, string privateEndpointConnectionName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serverName, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ ///
+ /// Updates tags on private endpoint connection.
+ ///
+ ///
+ /// Updates private endpoint connection with the specified tags.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ ///
+ ///
+ /// Parameters supplied to the Update private endpoint connection Tags
+ /// operation.
+ ///
+ public static PrivateEndpointConnection UpdateTags(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string serverName, string privateEndpointConnectionName, TagsObject parameters)
+ {
+ return operations.UpdateTagsAsync(resourceGroupName, serverName, privateEndpointConnectionName, parameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Updates tags on private endpoint connection.
+ ///
+ ///
+ /// Updates private endpoint connection with the specified tags.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ ///
+ ///
+ /// Parameters supplied to the Update private endpoint connection Tags
+ /// operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task UpdateTagsAsync(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string serverName, string privateEndpointConnectionName, TagsObject parameters, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.UpdateTagsWithHttpMessagesAsync(resourceGroupName, serverName, privateEndpointConnectionName, parameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Gets all private endpoint connections on a server.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ public static IPage ListByServer(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string serverName)
+ {
+ return operations.ListByServerAsync(resourceGroupName, serverName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets all private endpoint connections on a server.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListByServerAsync(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string serverName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListByServerWithHttpMessagesAsync(resourceGroupName, serverName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Approve or reject a private endpoint connection with a given name.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static PrivateEndpointConnection BeginCreateOrUpdate(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string serverName, string privateEndpointConnectionName, PrivateEndpointConnection parameters)
+ {
+ return operations.BeginCreateOrUpdateAsync(resourceGroupName, serverName, privateEndpointConnectionName, parameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Approve or reject a private endpoint connection with a given name.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginCreateOrUpdateAsync(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string serverName, string privateEndpointConnectionName, PrivateEndpointConnection parameters, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, privateEndpointConnectionName, parameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Deletes a private endpoint connection with a given name.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ ///
+ public static void BeginDelete(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string serverName, string privateEndpointConnectionName)
+ {
+ operations.BeginDeleteAsync(resourceGroupName, serverName, privateEndpointConnectionName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Deletes a private endpoint connection with a given name.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginDeleteAsync(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string serverName, string privateEndpointConnectionName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, serverName, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ ///
+ /// Updates tags on private endpoint connection.
+ ///
+ ///
+ /// Updates private endpoint connection with the specified tags.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ ///
+ ///
+ /// Parameters supplied to the Update private endpoint connection Tags
+ /// operation.
+ ///
+ public static PrivateEndpointConnection BeginUpdateTags(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string serverName, string privateEndpointConnectionName, TagsObject parameters)
+ {
+ return operations.BeginUpdateTagsAsync(resourceGroupName, serverName, privateEndpointConnectionName, parameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Updates tags on private endpoint connection.
+ ///
+ ///
+ /// Updates private endpoint connection with the specified tags.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ ///
+ ///
+ /// Parameters supplied to the Update private endpoint connection Tags
+ /// operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginUpdateTagsAsync(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string serverName, string privateEndpointConnectionName, TagsObject parameters, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.BeginUpdateTagsWithHttpMessagesAsync(resourceGroupName, serverName, privateEndpointConnectionName, parameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Gets all private endpoint connections on a server.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ public static IPage ListByServerNext(this IPrivateEndpointConnectionsOperations operations, string nextPageLink)
+ {
+ return operations.ListByServerNextAsync(nextPageLink).GetAwaiter().GetResult();
+ }
+
+ ///