diff --git a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/AttestationManagementClient.cs b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/AttestationManagementClient.cs
index dbdd7cceb407..005c9252916e 100644
--- a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/AttestationManagementClient.cs
+++ b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/AttestationManagementClient.cs
@@ -23,7 +23,7 @@ namespace Microsoft.Azure.Management.Attestation
///
/// Various APIs for managing resources in attestation service. This
- /// primarily encompasses per-tenant instance management.
+ /// primarily encompasses per-provider management.
///
public partial class AttestationManagementClient : ServiceClient, IAttestationManagementClient, IAzureClient
{
@@ -48,7 +48,7 @@ public partial class AttestationManagementClient : ServiceClient
- /// Client API version.
+ /// Client API version. Current version is 2020-10-01
///
public string ApiVersion { get; private set; }
@@ -85,6 +85,11 @@ public partial class AttestationManagementClient : ServiceClient
public virtual IAttestationProvidersOperations AttestationProviders { get; private set; }
+ ///
+ /// Gets the IPrivateEndpointConnectionsOperations.
+ ///
+ public virtual IPrivateEndpointConnectionsOperations PrivateEndpointConnections { get; private set; }
+
///
/// Initializes a new instance of the AttestationManagementClient class.
///
@@ -328,8 +333,9 @@ private void Initialize()
{
Operations = new Operations(this);
AttestationProviders = new AttestationProvidersOperations(this);
+ PrivateEndpointConnections = new PrivateEndpointConnectionsOperations(this);
BaseUri = new System.Uri("https://management.azure.com");
- ApiVersion = "2018-09-01-preview";
+ ApiVersion = "2020-10-01";
AcceptLanguage = "en-US";
LongRunningOperationRetryTimeout = 30;
GenerateClientRequestId = true;
diff --git a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/AttestationProvidersOperations.cs b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/AttestationProvidersOperations.cs
index 927bcba2b4c8..e99cda595879 100644
--- a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/AttestationProvidersOperations.cs
+++ b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/AttestationProvidersOperations.cs
@@ -57,7 +57,7 @@ internal AttestationProvidersOperations(AttestationManagementClient client)
/// The name of the resource group. The name is case insensitive.
///
///
- /// Name of the attestation service instance
+ /// Name of the attestation provider.
///
///
/// Headers that will be added to request.
@@ -107,15 +107,15 @@ internal AttestationProvidersOperations(AttestationManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (providerName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "providerName");
}
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -265,13 +265,13 @@ internal AttestationProvidersOperations(AttestationManagementClient client)
}
///
- /// Creates or updates the Attestation Provider.
+ /// Creates a new Attestation Provider.
///
///
/// The name of the resource group. The name is case insensitive.
///
///
- /// Name of the attestation service
+ /// Name of the attestation provider.
///
///
/// Client supplied parameters.
@@ -324,15 +324,15 @@ internal AttestationProvidersOperations(AttestationManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (providerName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "providerName");
}
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
if (creationParams == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "creationParams");
@@ -521,7 +521,7 @@ internal AttestationProvidersOperations(AttestationManagementClient client)
/// The name of the resource group. The name is case insensitive.
///
///
- /// Name of the attestation service
+ /// Name of the attestation provider.
///
///
/// Client supplied parameters.
@@ -574,15 +574,15 @@ internal AttestationProvidersOperations(AttestationManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (providerName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "providerName");
}
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
if (updateParams == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "updateParams");
@@ -796,15 +796,15 @@ internal AttestationProvidersOperations(AttestationManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
}
if (providerName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "providerName");
}
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -961,6 +961,10 @@ internal AttestationProvidersOperations(AttestationManagementClient client)
///
public async Task> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
@@ -1159,10 +1163,10 @@ internal AttestationProvidersOperations(AttestationManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
if (Client.SubscriptionId == null)
{
@@ -1347,6 +1351,10 @@ internal AttestationProvidersOperations(AttestationManagementClient client)
///
public async Task> ListDefaultWithHttpMessagesAsync(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");
@@ -1542,6 +1550,10 @@ internal AttestationProvidersOperations(AttestationManagementClient client)
throw new ValidationException(ValidationRules.MinLength, "location", 1);
}
}
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
diff --git a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/AttestationProvidersOperationsExtensions.cs b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/AttestationProvidersOperationsExtensions.cs
index 7110e4299d72..6804dfa1ce4d 100644
--- a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/AttestationProvidersOperationsExtensions.cs
+++ b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/AttestationProvidersOperationsExtensions.cs
@@ -31,7 +31,7 @@ public static partial class AttestationProvidersOperationsExtensions
/// The name of the resource group. The name is case insensitive.
///
///
- /// Name of the attestation service instance
+ /// Name of the attestation provider.
///
public static AttestationProvider Get(this IAttestationProvidersOperations operations, string resourceGroupName, string providerName)
{
@@ -48,7 +48,7 @@ public static AttestationProvider Get(this IAttestationProvidersOperations opera
/// The name of the resource group. The name is case insensitive.
///
///
- /// Name of the attestation service instance
+ /// Name of the attestation provider.
///
///
/// The cancellation token.
@@ -62,7 +62,7 @@ public static AttestationProvider Get(this IAttestationProvidersOperations opera
}
///
- /// Creates or updates the Attestation Provider.
+ /// Creates a new Attestation Provider.
///
///
/// The operations group for this extension method.
@@ -71,7 +71,7 @@ public static AttestationProvider Get(this IAttestationProvidersOperations opera
/// The name of the resource group. The name is case insensitive.
///
///
- /// Name of the attestation service
+ /// Name of the attestation provider.
///
///
/// Client supplied parameters.
@@ -82,7 +82,7 @@ public static AttestationProvider Create(this IAttestationProvidersOperations op
}
///
- /// Creates or updates the Attestation Provider.
+ /// Creates a new Attestation Provider.
///
///
/// The operations group for this extension method.
@@ -91,7 +91,7 @@ public static AttestationProvider Create(this IAttestationProvidersOperations op
/// The name of the resource group. The name is case insensitive.
///
///
- /// Name of the attestation service
+ /// Name of the attestation provider.
///
///
/// Client supplied parameters.
@@ -117,7 +117,7 @@ public static AttestationProvider Create(this IAttestationProvidersOperations op
/// The name of the resource group. The name is case insensitive.
///
///
- /// Name of the attestation service
+ /// Name of the attestation provider.
///
///
/// Client supplied parameters.
@@ -137,7 +137,7 @@ public static AttestationProvider Update(this IAttestationProvidersOperations op
/// The name of the resource group. The name is case insensitive.
///
///
- /// Name of the attestation service
+ /// Name of the attestation provider.
///
///
/// Client supplied parameters.
diff --git a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/IAttestationManagementClient.cs b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/IAttestationManagementClient.cs
index 89861c1868bc..8be84d0e2c2e 100644
--- a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/IAttestationManagementClient.cs
+++ b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/IAttestationManagementClient.cs
@@ -17,7 +17,7 @@ namespace Microsoft.Azure.Management.Attestation
///
/// Various APIs for managing resources in attestation service. This
- /// primarily encompasses per-tenant instance management.
+ /// primarily encompasses per-provider management.
///
public partial interface IAttestationManagementClient : System.IDisposable
{
@@ -42,7 +42,7 @@ public partial interface IAttestationManagementClient : System.IDisposable
ServiceClientCredentials Credentials { get; }
///
- /// Client API version.
+ /// Client API version. Current version is 2020-10-01
///
string ApiVersion { get; }
@@ -80,5 +80,10 @@ public partial interface IAttestationManagementClient : System.IDisposable
///
IAttestationProvidersOperations AttestationProviders { get; }
+ ///
+ /// Gets the IPrivateEndpointConnectionsOperations.
+ ///
+ IPrivateEndpointConnectionsOperations PrivateEndpointConnections { get; }
+
}
}
diff --git a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/IAttestationProvidersOperations.cs b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/IAttestationProvidersOperations.cs
index b937381183c6..95de9df47a7f 100644
--- a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/IAttestationProvidersOperations.cs
+++ b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/IAttestationProvidersOperations.cs
@@ -30,7 +30,7 @@ public partial interface IAttestationProvidersOperations
/// The name of the resource group. The name is case insensitive.
///
///
- /// Name of the attestation service instance
+ /// Name of the attestation provider.
///
///
/// The headers that will be added to request.
@@ -49,13 +49,13 @@ public partial interface IAttestationProvidersOperations
///
Task> GetWithHttpMessagesAsync(string resourceGroupName, string providerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Creates or updates the Attestation Provider.
+ /// Creates a new Attestation Provider.
///
///
/// The name of the resource group. The name is case insensitive.
///
///
- /// Name of the attestation service
+ /// Name of the attestation provider.
///
///
/// Client supplied parameters.
@@ -83,7 +83,7 @@ public partial interface IAttestationProvidersOperations
/// The name of the resource group. The name is case insensitive.
///
///
- /// Name of the attestation service
+ /// Name of the attestation provider.
///
///
/// Client supplied parameters.
diff --git a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/IPrivateEndpointConnectionsOperations.cs b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/IPrivateEndpointConnectionsOperations.cs
new file mode 100644
index 000000000000..a7f7293c2eaf
--- /dev/null
+++ b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/IPrivateEndpointConnectionsOperations.cs
@@ -0,0 +1,143 @@
+//
+// 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.Attestation
+{
+ 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
+ {
+ ///
+ /// List all the private endpoint connections associated with the
+ /// attestation provider.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the attestation provider.
+ ///
+ ///
+ /// 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 providerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets the specified private endpoint connection associated with the
+ /// attestation provider.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the attestation provider.
+ ///
+ ///
+ /// Name of the private endpoint connection associated with the
+ /// attestation providers.
+ ///
+ ///
+ /// 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 providerName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Update the state of specified private endpoint connection
+ /// associated with the attestation provider.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the attestation provider.
+ ///
+ ///
+ /// Name of the private endpoint connection associated with the
+ /// attestation providers.
+ ///
+ ///
+ /// The private endpoint connection properties.
+ ///
+ ///
+ /// 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> CreateWithHttpMessagesAsync(string resourceGroupName, string providerName, string privateEndpointConnectionName, PrivateEndpointConnection properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes the specified private endpoint connection associated with
+ /// the attestation provider.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the attestation provider.
+ ///
+ ///
+ /// Name of the private endpoint connection associated with the
+ /// attestation providers.
+ ///
+ ///
+ /// 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 providerName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/AttestationProvider.cs b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/AttestationProvider.cs
index f62c9c9d8376..1e7af4a31a98 100644
--- a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/AttestationProvider.cs
+++ b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/AttestationProvider.cs
@@ -36,24 +36,30 @@ public AttestationProvider()
///
/// The geo-location where the resource
/// lives
- /// Status of attestation service. Possible values
- /// include: 'Ready', 'NotReady', 'Error'
- /// Fully qualified resource Id for the resource. Ex -
+ /// 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 type of the resource. E.g.
+ /// "Microsoft.Compute/virtualMachines" or
+ /// "Microsoft.Storage/storageAccounts"
/// Resource tags.
- /// Trust model for the attestation service
- /// instance.
+ /// The system metadata relating to this
+ /// resource
+ /// Trust model for the attestation
+ /// provider.
+ /// Status of attestation service. Possible values
+ /// include: 'Ready', 'NotReady', 'Error'
/// Gets the uri of attestation service
- public AttestationProvider(string location, string status, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string trustModel = default(string), string attestUri = default(string))
+ /// List of private endpoint
+ /// connections associated with the attestation provider.
+ public AttestationProvider(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), SystemData systemData = default(SystemData), string trustModel = default(string), string status = default(string), string attestUri = default(string), IList privateEndpointConnections = default(IList))
: base(location, id, name, type, tags)
{
+ SystemData = systemData;
TrustModel = trustModel;
Status = status;
AttestUri = attestUri;
+ PrivateEndpointConnections = privateEndpointConnections;
CustomInit();
}
@@ -63,7 +69,13 @@ public AttestationProvider()
partial void CustomInit();
///
- /// Gets or sets trust model for the attestation service instance.
+ /// Gets the system metadata relating to this resource
+ ///
+ [JsonProperty(PropertyName = "systemData")]
+ public SystemData SystemData { get; private set; }
+
+ ///
+ /// Gets or sets trust model for the attestation provider.
///
[JsonProperty(PropertyName = "properties.trustModel")]
public string TrustModel { get; set; }
@@ -81,6 +93,13 @@ public AttestationProvider()
[JsonProperty(PropertyName = "properties.attestUri")]
public string AttestUri { get; set; }
+ ///
+ /// Gets list of private endpoint connections associated with the
+ /// attestation provider.
+ ///
+ [JsonProperty(PropertyName = "properties.privateEndpointConnections")]
+ public IList PrivateEndpointConnections { get; private set; }
+
///
/// Validate the object.
///
@@ -90,9 +109,15 @@ public AttestationProvider()
public override void Validate()
{
base.Validate();
- if (Status == null)
+ if (PrivateEndpointConnections != null)
{
- throw new ValidationException(ValidationRules.CannotBeNull, "Status");
+ foreach (var element in PrivateEndpointConnections)
+ {
+ if (element != null)
+ {
+ element.Validate();
+ }
+ }
}
}
}
diff --git a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/AttestationProviderListResult.cs b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/AttestationProviderListResult.cs
index 6c7ea60b0b58..8ad2a021cda6 100644
--- a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/AttestationProviderListResult.cs
+++ b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/AttestationProviderListResult.cs
@@ -33,9 +33,12 @@ public AttestationProviderListResult()
/// Initializes a new instance of the AttestationProviderListResult
/// class.
///
+ /// The system metadata relating to this
+ /// resource
/// Attestation Provider array.
- public AttestationProviderListResult(IList value = default(IList))
+ public AttestationProviderListResult(SystemData systemData = default(SystemData), IList value = default(IList))
{
+ SystemData = systemData;
Value = value;
CustomInit();
}
@@ -45,6 +48,12 @@ public AttestationProviderListResult()
///
partial void CustomInit();
+ ///
+ /// Gets the system metadata relating to this resource
+ ///
+ [JsonProperty(PropertyName = "systemData")]
+ public SystemData SystemData { get; private set; }
+
///
/// Gets or sets attestation Provider array.
///
diff --git a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/AttestationServiceCreationParams.cs b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/AttestationServiceCreationParams.cs
index 8f6f8d969aaa..ae1a35418f07 100644
--- a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/AttestationServiceCreationParams.cs
+++ b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/AttestationServiceCreationParams.cs
@@ -18,7 +18,7 @@ namespace Microsoft.Azure.Management.Attestation.Models
using System.Linq;
///
- /// Parameters for creating an attestation service instance
+ /// Parameters for creating an attestation provider
///
public partial class AttestationServiceCreationParams : IResource
{
@@ -36,11 +36,11 @@ public AttestationServiceCreationParams()
/// class.
///
/// The supported Azure location where the
- /// attestation service instance should be created.
- /// Properties of the attestation service
- /// instance
+ /// attestation provider should be created.
+ /// Properties of the attestation
+ /// provider
/// The tags that will be assigned to the
- /// attestation service instance.
+ /// attestation provider.
public AttestationServiceCreationParams(string location, AttestationServiceCreationSpecificParams properties, IDictionary tags = default(IDictionary))
{
Location = location;
@@ -56,20 +56,20 @@ public AttestationServiceCreationParams()
///
/// Gets or sets the supported Azure location where the attestation
- /// service instance should be created.
+ /// provider should be created.
///
[JsonProperty(PropertyName = "location")]
public string Location { get; set; }
///
/// Gets or sets the tags that will be assigned to the attestation
- /// service instance.
+ /// provider.
///
[JsonProperty(PropertyName = "tags")]
public IDictionary Tags { get; set; }
///
- /// Gets or sets properties of the attestation service instance
+ /// Gets or sets properties of the attestation provider
///
[JsonProperty(PropertyName = "properties")]
public AttestationServiceCreationSpecificParams Properties { get; set; }
diff --git a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/AttestationServiceCreationSpecificParams.cs b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/AttestationServiceCreationSpecificParams.cs
index b9ba66c064bd..441718ffbb5a 100644
--- a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/AttestationServiceCreationSpecificParams.cs
+++ b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/AttestationServiceCreationSpecificParams.cs
@@ -14,8 +14,7 @@ namespace Microsoft.Azure.Management.Attestation.Models
using System.Linq;
///
- /// Client supplied parameters used to create a new attestation service
- /// instance.
+ /// Client supplied parameters used to create a new attestation provider.
///
public partial class AttestationServiceCreationSpecificParams
{
@@ -32,14 +31,12 @@ public AttestationServiceCreationSpecificParams()
/// Initializes a new instance of the
/// AttestationServiceCreationSpecificParams class.
///
- /// Name of attestation policy.
/// JSON Web Key Set defining a
/// set of X.509 Certificates that will represent the parent
/// certificate for the signing certificate used for policy
/// operations
- public AttestationServiceCreationSpecificParams(string attestationPolicy = default(string), JSONWebKeySet policySigningCertificates = default(JSONWebKeySet))
+ public AttestationServiceCreationSpecificParams(JSONWebKeySet policySigningCertificates = default(JSONWebKeySet))
{
- AttestationPolicy = attestationPolicy;
PolicySigningCertificates = policySigningCertificates;
CustomInit();
}
@@ -49,12 +46,6 @@ public AttestationServiceCreationSpecificParams()
///
partial void CustomInit();
- ///
- /// Gets or sets name of attestation policy.
- ///
- [JsonProperty(PropertyName = "attestationPolicy")]
- public string AttestationPolicy { get; set; }
-
///
/// Gets or sets JSON Web Key Set defining a set of X.509 Certificates
/// that will represent the parent certificate for the signing
diff --git a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/AttestationServicePatchParams.cs b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/AttestationServicePatchParams.cs
index 4aedda355225..6958d5ec5c2e 100644
--- a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/AttestationServicePatchParams.cs
+++ b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/AttestationServicePatchParams.cs
@@ -18,7 +18,7 @@ namespace Microsoft.Azure.Management.Attestation.Models
using System.Linq;
///
- /// Parameters for patching an attestation service instance
+ /// Parameters for patching an attestation provider
///
public partial class AttestationServicePatchParams : IResource
{
@@ -36,7 +36,7 @@ public AttestationServicePatchParams()
/// class.
///
/// The tags that will be assigned to the
- /// attestation service instance.
+ /// attestation provider.
public AttestationServicePatchParams(IDictionary tags = default(IDictionary))
{
Tags = tags;
@@ -50,7 +50,7 @@ public AttestationServicePatchParams()
///
/// Gets or sets the tags that will be assigned to the attestation
- /// service instance.
+ /// provider.
///
[JsonProperty(PropertyName = "tags")]
public IDictionary Tags { get; set; }
diff --git a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/AzureEntityResource.cs b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/AzureEntityResource.cs
index f266b983e24c..ad07bb6e5020 100644
--- a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/AzureEntityResource.cs
+++ b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/AzureEntityResource.cs
@@ -14,9 +14,12 @@ namespace Microsoft.Azure.Management.Attestation.Models
using System.Linq;
///
- /// The resource model definition for a Azure Resource Manager resource
- /// with an etag.
+ /// Entity Resource
///
+ ///
+ /// The resource model definition for an Azure Resource Manager resource
+ /// with an etag.
+ ///
public partial class AzureEntityResource : Resource
{
///
@@ -30,12 +33,12 @@ public AzureEntityResource()
///
/// Initializes a new instance of the AzureEntityResource class.
///
- /// Fully qualified resource Id for the resource. Ex -
+ /// 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 type of the resource. E.g.
+ /// "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)
diff --git a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/CreatedByType.cs b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/CreatedByType.cs
new file mode 100644
index 000000000000..5e9aca7ba4ce
--- /dev/null
+++ b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/CreatedByType.cs
@@ -0,0 +1,24 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Attestation.Models
+{
+
+ ///
+ /// Defines values for CreatedByType.
+ ///
+ public static class CreatedByType
+ {
+ public const string User = "User";
+ public const string Application = "Application";
+ public const string ManagedIdentity = "ManagedIdentity";
+ public const string Key = "Key";
+ }
+}
diff --git a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/JSONWebKey.cs b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/JSONWebKey.cs
index 71a4b0aa1ac8..0d9c2aa55d20 100644
--- a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/JSONWebKey.cs
+++ b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/JSONWebKey.cs
@@ -29,6 +29,14 @@ public JSONWebKey()
///
/// Initializes a new instance of the JSONWebKey class.
///
+ /// The "kty" (key type) parameter identifies the
+ /// cryptographic algorithm
+ /// family used with the key, such as "RSA" or "EC". "kty" values
+ /// should
+ /// either be registered in the IANA "JSON Web Key Types" registry
+ /// established by [JWA] or be a value that contains a Collision-
+ /// Resistant Name. The "kty" value is a case-sensitive
+ /// string.
/// The "alg" (algorithm) parameter identifies the
/// algorithm intended for
/// use with the key. The values used should either be registered in
@@ -36,6 +44,13 @@ public JSONWebKey()
/// IANA "JSON Web Signature and Encryption Algorithms" registry
/// established by [JWA] or be a value that contains a Collision-
/// Resistant Name.
+ /// The "crv" (curve) parameter identifies the curve
+ /// type
+ /// RSA private exponent or ECC private key
+ /// RSA Private Key Parameter
+ /// RSA Private Key Parameter
+ /// RSA public exponent, in Base64
+ /// Symmetric key
/// The "kid" (key ID) parameter is used to match a
/// specific key. This
/// is used, for instance, to choose among a set of keys within a JWK
@@ -50,31 +65,16 @@ public JSONWebKey()
/// be
/// equivalent alternatives by the application using them.) The "kid"
/// value is a case-sensitive string.
- /// The "kty" (key type) parameter identifies the
- /// cryptographic algorithm
- /// family used with the key, such as "RSA" or "EC". "kty" values
- /// should
- /// either be registered in the IANA "JSON Web Key Types" registry
- /// established by [JWA] or be a value that contains a Collision-
- /// Resistant Name. The "kty" value is a case-sensitive
- /// string.
+ /// RSA modulus, in Base64
+ /// RSA secret prime
+ /// RSA secret prime, with p < q
+ /// RSA Private Key Parameter
/// Use ("public key use") identifies the intended
/// use of
/// the public key. The "use" parameter is employed to indicate whether
/// a public key is used for encrypting data or verifying the signature
/// on data. Values are commonly "sig" (signature) or "enc"
/// (encryption).
- /// The "crv" (curve) parameter identifies the curve
- /// type
- /// RSA private exponent or ECC private key
- /// RSA Private Key Parameter
- /// RSA Private Key Parameter
- /// RSA public exponent, in Base64
- /// Symmetric key
- /// RSA modulus, in Base64
- /// RSA secret prime
- /// RSA secret prime, with p < q
- /// RSA Private Key Parameter
/// X coordinate for the Elliptic Curve point
/// The "x5c" (X.509 certificate chain) parameter
/// contains a chain of one
@@ -85,7 +85,7 @@ public JSONWebKey()
/// The PKIX certificate containing the key value MUST be the first
/// certificate.
/// Y coordinate for the Elliptic Curve point
- public JSONWebKey(string alg, string kid, string kty, string use, string crv = default(string), string d = default(string), string dp = default(string), string dq = default(string), string e = default(string), string k = default(string), string n = default(string), string p = default(string), string q = default(string), string qi = default(string), string x = default(string), IList x5c = default(IList), string y = default(string))
+ public JSONWebKey(string kty, string alg = default(string), string crv = default(string), string d = default(string), string dp = default(string), string dq = default(string), string e = default(string), string k = default(string), string kid = default(string), string n = default(string), string p = default(string), string q = default(string), string qi = default(string), string use = default(string), string x = default(string), IList x5c = default(IList), string y = default(string))
{
Alg = alg;
Crv = crv;
@@ -258,22 +258,10 @@ public JSONWebKey()
///
public virtual void Validate()
{
- if (Alg == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "Alg");
- }
- if (Kid == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "Kid");
- }
if (Kty == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Kty");
}
- if (Use == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "Use");
- }
}
}
}
diff --git a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/OperationList.cs b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/OperationList.cs
index 3ffcb68ab59b..5d2ea19d10fc 100644
--- a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/OperationList.cs
+++ b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/OperationList.cs
@@ -31,9 +31,12 @@ public OperationList()
///
/// Initializes a new instance of the OperationList class.
///
+ /// The system metadata relating to this
+ /// resource
/// List of supported operations.
- public OperationList(IList value = default(IList))
+ public OperationList(SystemData systemData = default(SystemData), IList value = default(IList))
{
+ SystemData = systemData;
Value = value;
CustomInit();
}
@@ -43,6 +46,12 @@ public OperationList()
///
partial void CustomInit();
+ ///
+ /// Gets the system metadata relating to this resource
+ ///
+ [JsonProperty(PropertyName = "systemData")]
+ public SystemData SystemData { get; private set; }
+
///
/// Gets or sets list of supported operations.
///
diff --git a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/Page.cs b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/Page.cs
new file mode 100644
index 000000000000..db61fe55ea08
--- /dev/null
+++ b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/Page.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.Attestation.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+
+ ///
+ /// Defines a page in Azure responses.
+ ///
+ /// Type of the page content items
+ [JsonObject]
+ public class Page : IPage
+ {
+ ///
+ /// Gets the link to the next page.
+ ///
+ [JsonProperty("")]
+ public string NextPageLink { get; private set; }
+
+ [JsonProperty("value")]
+ private IList Items{ get; set; }
+
+ ///
+ /// Returns an enumerator that iterates through the collection.
+ ///
+ /// A an enumerator that can be used to iterate through the collection.
+ public IEnumerator GetEnumerator()
+ {
+ return Items == null ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator();
+ }
+
+ ///
+ /// Returns an enumerator that iterates through the collection.
+ ///
+ /// A an enumerator that can be used to iterate through the collection.
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetEnumerator();
+ }
+ }
+}
diff --git a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/PrivateEndpoint.cs b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/PrivateEndpoint.cs
new file mode 100644
index 000000000000..33c67d71b245
--- /dev/null
+++ b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/PrivateEndpoint.cs
@@ -0,0 +1,51 @@
+//
+// 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.Attestation.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The Private Endpoint resource.
+ ///
+ public partial class PrivateEndpoint
+ {
+ ///
+ /// Initializes a new instance of the PrivateEndpoint class.
+ ///
+ public PrivateEndpoint()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the PrivateEndpoint class.
+ ///
+ /// The ARM identifier for Private Endpoint
+ public PrivateEndpoint(string id = default(string))
+ {
+ Id = id;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the ARM identifier for Private Endpoint
+ ///
+ [JsonProperty(PropertyName = "id")]
+ public string Id { get; private set; }
+
+ }
+}
diff --git a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/PrivateEndpointConnection.cs b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/PrivateEndpointConnection.cs
new file mode 100644
index 000000000000..63b95a287e18
--- /dev/null
+++ b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/PrivateEndpointConnection.cs
@@ -0,0 +1,98 @@
+//
+// 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.Attestation.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The Private Endpoint Connection resource.
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class PrivateEndpointConnection : Resource
+ {
+ ///
+ /// Initializes a new instance of the PrivateEndpointConnection class.
+ ///
+ public PrivateEndpointConnection()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the PrivateEndpointConnection class.
+ ///
+ /// A collection of
+ /// information about the state of the connection between service
+ /// consumer and provider.
+ /// 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. E.g.
+ /// "Microsoft.Compute/virtualMachines" or
+ /// "Microsoft.Storage/storageAccounts"
+ /// The resource of private end
+ /// point.
+ /// The provisioning state of the
+ /// private endpoint connection resource. Possible values include:
+ /// 'Succeeded', 'Creating', 'Deleting', 'Failed'
+ public PrivateEndpointConnection(PrivateLinkServiceConnectionState privateLinkServiceConnectionState, string id = default(string), string name = default(string), string type = default(string), PrivateEndpoint privateEndpoint = default(PrivateEndpoint), 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 the resource of private end point.
+ ///
+ [JsonProperty(PropertyName = "properties.privateEndpoint")]
+ public PrivateEndpoint PrivateEndpoint { get; set; }
+
+ ///
+ /// Gets or sets a collection of information about the state of the
+ /// connection between service consumer and provider.
+ ///
+ [JsonProperty(PropertyName = "properties.privateLinkServiceConnectionState")]
+ public PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get; set; }
+
+ ///
+ /// Gets or sets the provisioning state of the private endpoint
+ /// connection resource. Possible values include: 'Succeeded',
+ /// 'Creating', 'Deleting', 'Failed'
+ ///
+ [JsonProperty(PropertyName = "properties.provisioningState")]
+ public string ProvisioningState { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (PrivateLinkServiceConnectionState == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "PrivateLinkServiceConnectionState");
+ }
+ }
+ }
+}
diff --git a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/PrivateEndpointConnectionProvisioningState.cs b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/PrivateEndpointConnectionProvisioningState.cs
new file mode 100644
index 000000000000..58881ace6289
--- /dev/null
+++ b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/PrivateEndpointConnectionProvisioningState.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.Attestation.Models
+{
+
+ ///
+ /// Defines values for PrivateEndpointConnectionProvisioningState.
+ ///
+ public static class PrivateEndpointConnectionProvisioningState
+ {
+ public const string Succeeded = "Succeeded";
+ public const string Creating = "Creating";
+ public const string Deleting = "Deleting";
+ public const string Failed = "Failed";
+ }
+}
diff --git a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/PrivateEndpointServiceConnectionStatus.cs b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/PrivateEndpointServiceConnectionStatus.cs
new file mode 100644
index 000000000000..6bb70257f73c
--- /dev/null
+++ b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/PrivateEndpointServiceConnectionStatus.cs
@@ -0,0 +1,23 @@
+//
+// 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.Attestation.Models
+{
+
+ ///
+ /// Defines values for PrivateEndpointServiceConnectionStatus.
+ ///
+ public static class PrivateEndpointServiceConnectionStatus
+ {
+ public const string Pending = "Pending";
+ public const string Approved = "Approved";
+ public const string Rejected = "Rejected";
+ }
+}
diff --git a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/PrivateLinkServiceConnectionState.cs b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/PrivateLinkServiceConnectionState.cs
new file mode 100644
index 000000000000..4e2f5493cefa
--- /dev/null
+++ b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/PrivateLinkServiceConnectionState.cs
@@ -0,0 +1,77 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Attestation.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// A collection of information about the state of the connection between
+ /// service consumer and provider.
+ ///
+ public partial class PrivateLinkServiceConnectionState
+ {
+ ///
+ /// Initializes a new instance of the PrivateLinkServiceConnectionState
+ /// class.
+ ///
+ public PrivateLinkServiceConnectionState()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the PrivateLinkServiceConnectionState
+ /// class.
+ ///
+ /// Indicates whether the connection has been
+ /// Approved/Rejected/Removed by the owner of the service. Possible
+ /// values include: 'Pending', 'Approved', 'Rejected'
+ /// The reason for approval/rejection of the
+ /// connection.
+ /// A message indicating if changes on
+ /// the service provider require any updates on the consumer.
+ public PrivateLinkServiceConnectionState(string status = default(string), string description = default(string), 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 indicates whether the connection has been
+ /// Approved/Rejected/Removed by the owner of the service. Possible
+ /// values include: 'Pending', 'Approved', 'Rejected'
+ ///
+ [JsonProperty(PropertyName = "status")]
+ public string Status { get; set; }
+
+ ///
+ /// Gets or sets the reason for approval/rejection of the connection.
+ ///
+ [JsonProperty(PropertyName = "description")]
+ public string Description { get; set; }
+
+ ///
+ /// Gets or sets a message indicating if changes on the service
+ /// provider require any updates on the consumer.
+ ///
+ [JsonProperty(PropertyName = "actionsRequired")]
+ public string ActionsRequired { get; set; }
+
+ }
+}
diff --git a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/ProxyResource.cs b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/ProxyResource.cs
index 33568a455565..9b0ccb3895e5 100644
--- a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/ProxyResource.cs
+++ b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/ProxyResource.cs
@@ -13,9 +13,12 @@ namespace Microsoft.Azure.Management.Attestation.Models
using System.Linq;
///
- /// The resource model definition for a ARM proxy resource. It will have
- /// everything other than required location and tags
+ /// Proxy Resource
///
+ ///
+ /// The resource model definition for a Azure Resource Manager proxy
+ /// resource. It will not have tags and a location
+ ///
public partial class ProxyResource : Resource
{
///
@@ -29,12 +32,12 @@ public ProxyResource()
///
/// Initializes a new instance of the ProxyResource class.
///
- /// Fully qualified resource Id for the resource. Ex -
+ /// 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 type of the resource. E.g.
+ /// "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)
{
diff --git a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/Resource.cs b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/Resource.cs
index ad230afd4868..6aff00f39463 100644
--- a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/Resource.cs
+++ b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/Resource.cs
@@ -15,6 +15,13 @@ namespace Microsoft.Azure.Management.Attestation.Models
using Newtonsoft.Json;
using System.Linq;
+ ///
+ /// Resource
+ ///
+ ///
+ /// Common fields that are returned in the response for all Azure Resource
+ /// Manager resources
+ ///
public partial class Resource : IResource
{
///
@@ -28,12 +35,12 @@ public Resource()
///
/// Initializes a new instance of the Resource class.
///
- /// Fully qualified resource Id for the resource. Ex -
+ /// 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 type of the resource. E.g.
+ /// "Microsoft.Compute/virtualMachines" or
+ /// "Microsoft.Storage/storageAccounts"
public Resource(string id = default(string), string name = default(string), string type = default(string))
{
Id = id;
@@ -48,7 +55,7 @@ public Resource()
partial void CustomInit();
///
- /// Gets fully qualified resource Id for the resource. Ex -
+ /// Gets fully qualified resource ID for the resource. Ex -
/// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
///
[JsonProperty(PropertyName = "id")]
@@ -61,9 +68,9 @@ public Resource()
public string Name { get; private set; }
///
- /// Gets the type of the resource. Ex-
- /// Microsoft.Compute/virtualMachines or
- /// Microsoft.Storage/storageAccounts.
+ /// Gets the type of the resource. E.g.
+ /// "Microsoft.Compute/virtualMachines" or
+ /// "Microsoft.Storage/storageAccounts"
///
[JsonProperty(PropertyName = "type")]
public string Type { get; private set; }
diff --git a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/SystemData.cs b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/SystemData.cs
new file mode 100644
index 000000000000..4a94248cda48
--- /dev/null
+++ b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/SystemData.cs
@@ -0,0 +1,103 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Attestation.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Metadata pertaining to creation and last modification of the resource.
+ ///
+ public partial class SystemData
+ {
+ ///
+ /// Initializes a new instance of the SystemData class.
+ ///
+ public SystemData()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SystemData class.
+ ///
+ /// The identity that created the
+ /// resource.
+ /// The type of identity that created the
+ /// resource. Possible values include: 'User', 'Application',
+ /// 'ManagedIdentity', 'Key'
+ /// The timestamp of resource creation
+ /// (UTC).
+ /// The identity that last modified the
+ /// resource.
+ /// The type of identity that last
+ /// modified the resource. Possible values include: 'User',
+ /// 'Application', 'ManagedIdentity', 'Key'
+ /// The timestamp of resource last
+ /// modification (UTC)
+ public SystemData(string createdBy = default(string), string createdByType = default(string), System.DateTime? createdAt = default(System.DateTime?), string lastModifiedBy = default(string), string lastModifiedByType = default(string), System.DateTime? lastModifiedAt = default(System.DateTime?))
+ {
+ CreatedBy = createdBy;
+ CreatedByType = createdByType;
+ CreatedAt = createdAt;
+ LastModifiedBy = lastModifiedBy;
+ LastModifiedByType = lastModifiedByType;
+ LastModifiedAt = lastModifiedAt;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the identity that created the resource.
+ ///
+ [JsonProperty(PropertyName = "createdBy")]
+ public string CreatedBy { get; set; }
+
+ ///
+ /// Gets or sets the type of identity that created the resource.
+ /// Possible values include: 'User', 'Application', 'ManagedIdentity',
+ /// 'Key'
+ ///
+ [JsonProperty(PropertyName = "createdByType")]
+ public string CreatedByType { get; set; }
+
+ ///
+ /// Gets or sets the timestamp of resource creation (UTC).
+ ///
+ [JsonProperty(PropertyName = "createdAt")]
+ public System.DateTime? CreatedAt { get; set; }
+
+ ///
+ /// Gets or sets the identity that last modified the resource.
+ ///
+ [JsonProperty(PropertyName = "lastModifiedBy")]
+ public string LastModifiedBy { get; set; }
+
+ ///
+ /// Gets or sets the type of identity that last modified the resource.
+ /// Possible values include: 'User', 'Application', 'ManagedIdentity',
+ /// 'Key'
+ ///
+ [JsonProperty(PropertyName = "lastModifiedByType")]
+ public string LastModifiedByType { get; set; }
+
+ ///
+ /// Gets or sets the timestamp of resource last modification (UTC)
+ ///
+ [JsonProperty(PropertyName = "lastModifiedAt")]
+ public System.DateTime? LastModifiedAt { get; set; }
+
+ }
+}
diff --git a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/TrackedResource.cs b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/TrackedResource.cs
index 27a26309d751..7a9c10840b9c 100644
--- a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/TrackedResource.cs
+++ b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/TrackedResource.cs
@@ -17,8 +17,12 @@ namespace Microsoft.Azure.Management.Attestation.Models
using System.Linq;
///
- /// The resource model definition for a ARM tracked top level resource
+ /// Tracked Resource
///
+ ///
+ /// The resource model definition for an Azure Resource Manager tracked top
+ /// level resource which has 'tags' and a 'location'
+ ///
public partial class TrackedResource : Resource
{
///
@@ -34,12 +38,12 @@ public TrackedResource()
///
/// The geo-location where the resource
/// lives
- /// Fully qualified resource Id for the resource. Ex -
+ /// 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 type of the resource. E.g.
+ /// "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)
diff --git a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Operations.cs b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Operations.cs
index 01412dc4fd9c..05b1d9d7b7cb 100644
--- a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Operations.cs
+++ b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Operations.cs
@@ -65,11 +65,21 @@ internal Operations(AttestationManagementClient client)
///
/// Thrown when unable to deserialize the response
///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
///
/// A response object containing the response body and response headers.
///
public async Task> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/PrivateEndpointConnectionsOperations.cs b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/PrivateEndpointConnectionsOperations.cs
new file mode 100644
index 000000000000..806179a3684c
--- /dev/null
+++ b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/PrivateEndpointConnectionsOperations.cs
@@ -0,0 +1,969 @@
+//
+// 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.Attestation
+{
+ 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(AttestationManagementClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the AttestationManagementClient
+ ///
+ public AttestationManagementClient Client { get; private set; }
+
+ ///
+ /// List all the private endpoint connections associated with the attestation
+ /// provider.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the attestation provider.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string providerName, 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 (providerName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "providerName");
+ }
+ if (providerName != null)
+ {
+ if (!System.Text.RegularExpressions.Regex.IsMatch(providerName, "^[a-zA-Z0-9-]{3,24}$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "providerName", "^[a-zA-Z0-9-]{3,24}$");
+ }
+ }
+ 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);
+ }
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("providerName", providerName);
+ 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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProvider/{providerName}/privateEndpointConnections").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{providerName}", System.Uri.EscapeDataString(providerName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Gets the specified private endpoint connection associated with the
+ /// attestation provider.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the attestation provider.
+ ///
+ ///
+ /// Name of the private endpoint connection associated with the attestation
+ /// providers.
+ ///
+ ///
+ /// 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 providerName, 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 (providerName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "providerName");
+ }
+ if (providerName != null)
+ {
+ if (!System.Text.RegularExpressions.Regex.IsMatch(providerName, "^[a-zA-Z0-9-]{3,24}$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "providerName", "^[a-zA-Z0-9-]{3,24}$");
+ }
+ }
+ 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 (privateEndpointConnectionName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("providerName", providerName);
+ tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName);
+ 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.Attestation/attestationProviders/{providerName}/privateEndpointConnections/{privateEndpointConnectionName}").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{providerName}", System.Uri.EscapeDataString(providerName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Update the state of specified private endpoint connection associated with
+ /// the attestation provider.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the attestation provider.
+ ///
+ ///
+ /// Name of the private endpoint connection associated with the attestation
+ /// providers.
+ ///
+ ///
+ /// The private endpoint connection properties.
+ ///
+ ///
+ /// 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> CreateWithHttpMessagesAsync(string resourceGroupName, string providerName, string privateEndpointConnectionName, PrivateEndpointConnection properties, 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 (providerName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "providerName");
+ }
+ if (providerName != null)
+ {
+ if (!System.Text.RegularExpressions.Regex.IsMatch(providerName, "^[a-zA-Z0-9-]{3,24}$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "providerName", "^[a-zA-Z0-9-]{3,24}$");
+ }
+ }
+ 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 (privateEndpointConnectionName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName");
+ }
+ if (properties == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "properties");
+ }
+ if (properties != null)
+ {
+ properties.Validate();
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("providerName", providerName);
+ tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName);
+ tracingParameters.Add("properties", properties);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "Create", 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.Attestation/attestationProviders/{providerName}/privateEndpointConnections/{privateEndpointConnectionName}").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{providerName}", System.Uri.EscapeDataString(providerName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("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(properties != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(properties, 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;
+ }
+
+ ///
+ /// Deletes the specified private endpoint connection associated with the
+ /// attestation provider.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the attestation provider.
+ ///
+ ///
+ /// Name of the private endpoint connection associated with the attestation
+ /// providers.
+ ///
+ ///
+ /// 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 DeleteWithHttpMessagesAsync(string resourceGroupName, string providerName, 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 (providerName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "providerName");
+ }
+ if (providerName != null)
+ {
+ if (!System.Text.RegularExpressions.Regex.IsMatch(providerName, "^[a-zA-Z0-9-]{3,24}$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "providerName", "^[a-zA-Z0-9-]{3,24}$");
+ }
+ }
+ 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 (privateEndpointConnectionName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("providerName", providerName);
+ tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "Delete", 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.Attestation/attestationProviders/{providerName}/privateEndpointConnections/{privateEndpointConnectionName}").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{providerName}", System.Uri.EscapeDataString(providerName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("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 != 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;
+ }
+
+ }
+}
diff --git a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/PrivateEndpointConnectionsOperationsExtensions.cs b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/PrivateEndpointConnectionsOperationsExtensions.cs
new file mode 100644
index 000000000000..14eb4b23c24d
--- /dev/null
+++ b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/PrivateEndpointConnectionsOperationsExtensions.cs
@@ -0,0 +1,222 @@
+//
+// 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.Attestation
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for PrivateEndpointConnectionsOperations.
+ ///
+ public static partial class PrivateEndpointConnectionsOperationsExtensions
+ {
+ ///
+ /// List all the private endpoint connections associated with the attestation
+ /// provider.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the attestation provider.
+ ///
+ public static IEnumerable List(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string providerName)
+ {
+ return operations.ListAsync(resourceGroupName, providerName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// List all the private endpoint connections associated with the attestation
+ /// provider.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the attestation provider.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListAsync(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string providerName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, providerName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Gets the specified private endpoint connection associated with the
+ /// attestation provider.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the attestation provider.
+ ///
+ ///
+ /// Name of the private endpoint connection associated with the attestation
+ /// providers.
+ ///
+ public static PrivateEndpointConnection Get(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string providerName, string privateEndpointConnectionName)
+ {
+ return operations.GetAsync(resourceGroupName, providerName, privateEndpointConnectionName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets the specified private endpoint connection associated with the
+ /// attestation provider.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the attestation provider.
+ ///
+ ///
+ /// Name of the private endpoint connection associated with the attestation
+ /// providers.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task GetAsync(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string providerName, string privateEndpointConnectionName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, providerName, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Update the state of specified private endpoint connection associated with
+ /// the attestation provider.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the attestation provider.
+ ///
+ ///
+ /// Name of the private endpoint connection associated with the attestation
+ /// providers.
+ ///
+ ///
+ /// The private endpoint connection properties.
+ ///
+ public static PrivateEndpointConnection Create(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string providerName, string privateEndpointConnectionName, PrivateEndpointConnection properties)
+ {
+ return operations.CreateAsync(resourceGroupName, providerName, privateEndpointConnectionName, properties).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Update the state of specified private endpoint connection associated with
+ /// the attestation provider.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the attestation provider.
+ ///
+ ///
+ /// Name of the private endpoint connection associated with the attestation
+ /// providers.
+ ///
+ ///
+ /// The private endpoint connection properties.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task CreateAsync(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string providerName, string privateEndpointConnectionName, PrivateEndpointConnection properties, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, providerName, privateEndpointConnectionName, properties, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Deletes the specified private endpoint connection associated with the
+ /// attestation provider.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the attestation provider.
+ ///
+ ///
+ /// Name of the private endpoint connection associated with the attestation
+ /// providers.
+ ///
+ public static void Delete(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string providerName, string privateEndpointConnectionName)
+ {
+ operations.DeleteAsync(resourceGroupName, providerName, privateEndpointConnectionName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Deletes the specified private endpoint connection associated with the
+ /// attestation provider.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the attestation provider.
+ ///
+ ///
+ /// Name of the private endpoint connection associated with the attestation
+ /// providers.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task DeleteAsync(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string providerName, string privateEndpointConnectionName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, providerName, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ }
+}
diff --git a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/SdkInfo_AttestationManagementClient.cs b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/SdkInfo_AttestationManagementClient.cs
index 7dafe39ff70e..b00838b5e5cb 100644
--- a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/SdkInfo_AttestationManagementClient.cs
+++ b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/SdkInfo_AttestationManagementClient.cs
@@ -19,21 +19,11 @@ public static IEnumerable> ApiInfo_AttestationMana
{
return new Tuple[]
{
- new Tuple("Attestation", "AttestationProviders", "2018-09-01-preview"),
- new Tuple("Attestation", "Operations", "2018-09-01-preview"),
+ new Tuple("Attestation", "AttestationProviders", "2020-10-01"),
+ new Tuple("Attestation", "Operations", "2020-10-01"),
+ new Tuple("Attestation", "PrivateEndpointConnections", "2020-10-01"),
}.AsEnumerable();
}
}
- // BEGIN: Code Generation Metadata Section
- public static readonly String AutoRestVersion = "v2";
- public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4413";
- public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/attestation/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=E:\\git\\azure-sdk-for-net\\sdk";
- public static readonly String GithubForkName = "Azure";
- public static readonly String GithubBranchName = "master";
- public static readonly String GithubCommidId = "9dbff8c6f75666257e65d40ef2cf9d58063514e0";
- public static readonly String CodeGenerationErrors = "";
- public static readonly String GithubRepoName = "azure-rest-api-specs";
- // END: Code Generation Metadata Section
}
}
-