Update Resources SDK 2024-07-01 (#26507)

* Update Resources SDK to 2024-07

* Add update to changelog

* Update SDKGeneratedCodeVerify to 2024-07

* Update whitespace

* Add UXMetadataIssues.csv to Az.Resources Exceptions

---------

Co-authored-by: Tate Smalligan <tasmalligan@microsoft.com>
Co-authored-by: Vincent Dai <23257217+vidai-msft@users.noreply.github.com>
This commit is contained in:
Tate Smalligan 2024-11-07 02:48:36 -06:00 коммит произвёл GitHub
Родитель 1653719439
Коммит 751c4a8dc6
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
37 изменённых файлов: 1355 добавлений и 633 удалений

Просмотреть файл

@ -472,7 +472,7 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkClient
: null;
// NOTE(jcotillo): Adding FromJson<> to parameters as well
deployment.Properties.Parameters = !string.IsNullOrEmpty(parametersContent)
? parametersContent.FromJson<JObject>()
? parametersContent.FromJson<Dictionary<string, DeploymentParameter>>()
: null;
}
@ -488,17 +488,24 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkClient
try
{
var validationResult = this.ValidateDeployment(parameters, deployment);
return new TemplateValidationInfo(validationResult);
switch (validationResult)
{
case DeploymentExtended deploymentExtended:
return new TemplateValidationInfo(deploymentExtended.Properties?.Providers?.ToList() ?? new List<Provider>(), new List<ErrorDetail>());
case DeploymentValidationError deploymentValidationError:
return new TemplateValidationInfo(new List<Provider>(), new List<ErrorDetail>(deploymentValidationError.Error.AsArray()));
default:
throw new InvalidOperationException($"Received unexpected type {validationResult.GetType()}");
}
}
catch (Exception ex)
{
var error = HandleError(ex).FirstOrDefault();
return new TemplateValidationInfo(new DeploymentValidateResult(error));
return new TemplateValidationInfo(new List<Provider>(), error.AsArray().ToList());
}
}
private DeploymentValidateResult ValidateDeployment(PSDeploymentCmdletParameters parameters, Deployment deployment)
private object ValidateDeployment(PSDeploymentCmdletParameters parameters, Deployment deployment)
{
var scopedDeployment = new ScopedDeployment { Properties = deployment.Properties, Location = deployment.Location };
@ -527,26 +534,26 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkClient
}
}
private List<ErrorResponse> HandleError(Exception ex)
private List<ErrorDetail> HandleError(Exception ex)
{
if (ex == null)
{
return null;
}
ErrorResponse error = null;
ErrorDetail error = null;
var innerException = HandleError(ex.InnerException);
if (ex is CloudException)
{
var cloudEx = ex as CloudException;
error = new ErrorResponse(cloudEx.Body?.Code, cloudEx.Body?.Message, cloudEx.Body?.Target, innerException);
error = new ErrorDetail(cloudEx.Body?.Code, cloudEx.Body?.Message, cloudEx.Body?.Target, innerException);
}
else
{
error = new ErrorResponse(null, ex.Message, null, innerException);
error = new ErrorDetail(null, ex.Message, null, innerException);
}
return new List<ErrorResponse> { error };
return new List<ErrorDetail> { error };
}
@ -1509,7 +1516,7 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkClient
return ProvisionDeploymentStatus(parameters, deployment);
}
private void DisplayInnerDetailErrorMessage(ErrorResponse error)
private void DisplayInnerDetailErrorMessage(ErrorDetail error)
{
WriteError(string.Format(ErrorFormat, error.Code, error.Message));
if (error.Details != null)

Просмотреть файл

@ -111,6 +111,25 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.NewSdkExtensions
return rmError;
}
public static PSResourceManagerError ToPSResourceManagerError(this ErrorDetail error)
{
PSResourceManagerError rmError = new PSResourceManagerError
{
Code = error.Code,
Message = error.Message,
Target = string.IsNullOrEmpty(error.Target) ? null : error.Target
};
if (error.Details != null)
{
List<PSResourceManagerError> innerRMError = new List<PSResourceManagerError>();
error.Details.ForEach(detail => innerRMError.Add(detail.ToPSResourceManagerError()));
rmError.Details = innerRMError;
}
return rmError;
}
public static string ToFormattedString(this ErrorResponse error, int level = 0)
{
if (error.Details == null)

Просмотреть файл

@ -261,22 +261,12 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkModels
PSDeploymentStackParameter parameter;
if (parameters[key].Reference != null)
{
parameter = new PSDeploymentStackParameter { KeyVaultReference = parameters[key].Reference };
if (parameters[key].Type != null)
{
parameter.Type = parameters[key].Type;
}
else
{
// If type does not exist, secret value is unknown and the type cannot be inferred:
parameter.Type = "unknown";
}
parameter = new PSDeploymentStackParameter { KeyVaultReference = parameters[key].Reference, Type = ExtractDeploymentStackParameterValueType(parameters[key].Value) };
}
else
{
// If the type is not present, attempt to infer:
parameter = new PSDeploymentStackParameter { Value = parameters[key].Value, Type = parameters[key].Type != null ? parameters[key].Type : ExtractDeploymentStackParameterValueType(parameters[key].Value) };
parameter = new PSDeploymentStackParameter { Value = parameters[key].Value, Type = ExtractDeploymentStackParameterValueType(parameters[key].Value) };
if (parameter.Value != null && "Array".Equals(parameter.Type))
{
parameter.Value = JsonConvert.DeserializeObject<object[]>(parameter.Value.ToString());

Просмотреть файл

@ -7,6 +7,7 @@
using System.Linq;
using Commands.Common.Authentication.Abstractions;
using Management.Resources.Models;
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions;
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Json;
using Microsoft.WindowsAzure.Commands.Common;
using Newtonsoft.Json.Linq;
@ -129,7 +130,7 @@
? PSJsonSerializer.Serialize(parametersDictionary)
: null;
properties.Parameters = !string.IsNullOrEmpty(parametersContent)
? JObject.Parse(parametersContent)
? parametersContent.FromJson<Dictionary<string, DeploymentParameter>>()
: null;
}

Просмотреть файл

@ -19,24 +19,13 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkModels
{
internal class TemplateValidationInfo
{
public TemplateValidationInfo(DeploymentValidateResult validationResult)
public TemplateValidationInfo(List<Provider> requiredProviders, List<ErrorDetail> errors)
{
Errors = new List<ErrorResponse>();
RequiredProviders = new List<Provider>();
if (validationResult.Error != null)
{
Errors.Add(validationResult.Error);
}
if (validationResult.Properties != null &&
validationResult.Properties.Providers != null)
{
RequiredProviders.AddRange(validationResult.Properties.Providers);
}
Errors = errors;
RequiredProviders = requiredProviders;
}
public List<ErrorResponse> Errors { get; set; }
public List<ErrorDetail> Errors { get; set; }
public List<Provider> RequiredProviders { get; set; }
}

Просмотреть файл

@ -737,10 +737,10 @@ namespace Microsoft.Azure.Management.Resources
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public async System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<DeploymentValidateResult>> ValidateAtScopeWithHttpMessagesAsync(string scope, string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
public async System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<object>> ValidateAtScopeWithHttpMessagesAsync(string scope, string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// Send Request
Microsoft.Rest.Azure.AzureOperationResponse<DeploymentValidateResult> _response = await BeginValidateAtScopeWithHttpMessagesAsync(scope, deploymentName, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
Microsoft.Rest.Azure.AzureOperationResponse<object> _response = await BeginValidateAtScopeWithHttpMessagesAsync(scope, deploymentName, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
}
@ -1835,10 +1835,10 @@ namespace Microsoft.Azure.Management.Resources
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public async System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<DeploymentValidateResult>> ValidateAtTenantScopeWithHttpMessagesAsync(string deploymentName, ScopedDeployment parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
public async System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<object>> ValidateAtTenantScopeWithHttpMessagesAsync(string deploymentName, ScopedDeployment parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// Send Request
Microsoft.Rest.Azure.AzureOperationResponse<DeploymentValidateResult> _response = await BeginValidateAtTenantScopeWithHttpMessagesAsync(deploymentName, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
Microsoft.Rest.Azure.AzureOperationResponse<object> _response = await BeginValidateAtTenantScopeWithHttpMessagesAsync(deploymentName, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
}
@ -3005,10 +3005,10 @@ namespace Microsoft.Azure.Management.Resources
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public async System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<DeploymentValidateResult>> ValidateAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, ScopedDeployment parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
public async System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<object>> ValidateAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, ScopedDeployment parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// Send Request
Microsoft.Rest.Azure.AzureOperationResponse<DeploymentValidateResult> _response = await BeginValidateAtManagementGroupScopeWithHttpMessagesAsync(groupId, deploymentName, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
Microsoft.Rest.Azure.AzureOperationResponse<object> _response = await BeginValidateAtManagementGroupScopeWithHttpMessagesAsync(groupId, deploymentName, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
}
@ -4167,10 +4167,10 @@ namespace Microsoft.Azure.Management.Resources
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public async System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<DeploymentValidateResult>> ValidateAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
public async System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<object>> ValidateAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// Send Request
Microsoft.Rest.Azure.AzureOperationResponse<DeploymentValidateResult> _response = await BeginValidateAtSubscriptionScopeWithHttpMessagesAsync(deploymentName, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
Microsoft.Rest.Azure.AzureOperationResponse<object> _response = await BeginValidateAtSubscriptionScopeWithHttpMessagesAsync(deploymentName, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
}
@ -5384,10 +5384,10 @@ namespace Microsoft.Azure.Management.Resources
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public async System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<DeploymentValidateResult>> ValidateWithHttpMessagesAsync(string resourceGroupName, string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
public async System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<object>> ValidateWithHttpMessagesAsync(string resourceGroupName, string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// Send Request
Microsoft.Rest.Azure.AzureOperationResponse<DeploymentValidateResult> _response = await BeginValidateWithHttpMessagesAsync(resourceGroupName, deploymentName, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
Microsoft.Rest.Azure.AzureOperationResponse<object> _response = await BeginValidateWithHttpMessagesAsync(resourceGroupName, deploymentName, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
}
@ -6592,7 +6592,7 @@ namespace Microsoft.Azure.Management.Resources
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<DeploymentValidateResult>> BeginValidateAtScopeWithHttpMessagesAsync(string scope, string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
public async System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<object>> BeginValidateAtScopeWithHttpMessagesAsync(string scope, string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
@ -6761,7 +6761,7 @@ namespace Microsoft.Azure.Management.Resources
throw ex;
}
// Create Result
var _result = new Microsoft.Rest.Azure.AzureOperationResponse<DeploymentValidateResult>();
var _result = new Microsoft.Rest.Azure.AzureOperationResponse<object>();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
@ -6775,7 +6775,7 @@ namespace Microsoft.Azure.Management.Resources
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
_result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject<DeploymentValidateResult>(_responseContent, this.Client.DeserializationSettings);
_result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject<DeploymentExtended>(_responseContent, this.Client.DeserializationSettings);
}
catch (Newtonsoft.Json.JsonException ex)
{
@ -6793,7 +6793,7 @@ namespace Microsoft.Azure.Management.Resources
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
_result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject<DeploymentValidateResult>(_responseContent, this.Client.DeserializationSettings);
_result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject<DeploymentValidationError>(_responseContent, this.Client.DeserializationSettings);
}
catch (Newtonsoft.Json.JsonException ex)
{
@ -7293,7 +7293,7 @@ namespace Microsoft.Azure.Management.Resources
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<DeploymentValidateResult>> BeginValidateAtTenantScopeWithHttpMessagesAsync(string deploymentName, ScopedDeployment parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
public async System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<object>> BeginValidateAtTenantScopeWithHttpMessagesAsync(string deploymentName, ScopedDeployment parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
@ -7455,7 +7455,7 @@ namespace Microsoft.Azure.Management.Resources
throw ex;
}
// Create Result
var _result = new Microsoft.Rest.Azure.AzureOperationResponse<DeploymentValidateResult>();
var _result = new Microsoft.Rest.Azure.AzureOperationResponse<object>();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
@ -7469,7 +7469,7 @@ namespace Microsoft.Azure.Management.Resources
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
_result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject<DeploymentValidateResult>(_responseContent, this.Client.DeserializationSettings);
_result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject<DeploymentExtended>(_responseContent, this.Client.DeserializationSettings);
}
catch (Newtonsoft.Json.JsonException ex)
{
@ -7487,7 +7487,7 @@ namespace Microsoft.Azure.Management.Resources
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
_result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject<DeploymentValidateResult>(_responseContent, this.Client.DeserializationSettings);
_result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject<DeploymentValidationError>(_responseContent, this.Client.DeserializationSettings);
}
catch (Newtonsoft.Json.JsonException ex)
{
@ -8273,7 +8273,7 @@ namespace Microsoft.Azure.Management.Resources
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<DeploymentValidateResult>> BeginValidateAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, ScopedDeployment parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
public async System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<object>> BeginValidateAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, ScopedDeployment parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
@ -8452,7 +8452,7 @@ namespace Microsoft.Azure.Management.Resources
throw ex;
}
// Create Result
var _result = new Microsoft.Rest.Azure.AzureOperationResponse<DeploymentValidateResult>();
var _result = new Microsoft.Rest.Azure.AzureOperationResponse<object>();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
@ -8466,7 +8466,7 @@ namespace Microsoft.Azure.Management.Resources
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
_result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject<DeploymentValidateResult>(_responseContent, this.Client.DeserializationSettings);
_result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject<DeploymentExtended>(_responseContent, this.Client.DeserializationSettings);
}
catch (Newtonsoft.Json.JsonException ex)
{
@ -8484,7 +8484,7 @@ namespace Microsoft.Azure.Management.Resources
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
_result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject<DeploymentValidateResult>(_responseContent, this.Client.DeserializationSettings);
_result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject<DeploymentValidationError>(_responseContent, this.Client.DeserializationSettings);
}
catch (Newtonsoft.Json.JsonException ex)
{
@ -9259,7 +9259,7 @@ namespace Microsoft.Azure.Management.Resources
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<DeploymentValidateResult>> BeginValidateAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
public async System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<object>> BeginValidateAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
@ -9427,7 +9427,7 @@ namespace Microsoft.Azure.Management.Resources
throw ex;
}
// Create Result
var _result = new Microsoft.Rest.Azure.AzureOperationResponse<DeploymentValidateResult>();
var _result = new Microsoft.Rest.Azure.AzureOperationResponse<object>();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
@ -9441,7 +9441,7 @@ namespace Microsoft.Azure.Management.Resources
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
_result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject<DeploymentValidateResult>(_responseContent, this.Client.DeserializationSettings);
_result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject<DeploymentExtended>(_responseContent, this.Client.DeserializationSettings);
}
catch (Newtonsoft.Json.JsonException ex)
{
@ -9459,7 +9459,7 @@ namespace Microsoft.Azure.Management.Resources
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
_result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject<DeploymentValidateResult>(_responseContent, this.Client.DeserializationSettings);
_result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject<DeploymentValidationError>(_responseContent, this.Client.DeserializationSettings);
}
catch (Newtonsoft.Json.JsonException ex)
{
@ -10275,7 +10275,7 @@ namespace Microsoft.Azure.Management.Resources
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<DeploymentValidateResult>> BeginValidateWithHttpMessagesAsync(string resourceGroupName, string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
public async System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<object>> BeginValidateWithHttpMessagesAsync(string resourceGroupName, string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
@ -10464,7 +10464,7 @@ namespace Microsoft.Azure.Management.Resources
throw ex;
}
// Create Result
var _result = new Microsoft.Rest.Azure.AzureOperationResponse<DeploymentValidateResult>();
var _result = new Microsoft.Rest.Azure.AzureOperationResponse<object>();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
@ -10478,7 +10478,7 @@ namespace Microsoft.Azure.Management.Resources
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
_result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject<DeploymentValidateResult>(_responseContent, this.Client.DeserializationSettings);
_result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject<DeploymentExtended>(_responseContent, this.Client.DeserializationSettings);
}
catch (Newtonsoft.Json.JsonException ex)
{
@ -10496,7 +10496,7 @@ namespace Microsoft.Azure.Management.Resources
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
_result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject<DeploymentValidateResult>(_responseContent, this.Client.DeserializationSettings);
_result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject<DeploymentValidationError>(_responseContent, this.Client.DeserializationSettings);
}
catch (Newtonsoft.Json.JsonException ex)
{

Просмотреть файл

@ -238,7 +238,7 @@ namespace Microsoft.Azure.Management.Resources
/// <param name='deploymentName'>
/// The name of the deployment.
/// </param>
public static DeploymentValidateResult ValidateAtScope(this IDeploymentsOperations operations, string scope, string deploymentName, Deployment parameters)
public static object ValidateAtScope(this IDeploymentsOperations operations, string scope, string deploymentName, Deployment parameters)
{
return ((IDeploymentsOperations)operations).ValidateAtScopeAsync(scope, deploymentName, parameters).GetAwaiter().GetResult();
}
@ -259,7 +259,7 @@ namespace Microsoft.Azure.Management.Resources
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task<DeploymentValidateResult> ValidateAtScopeAsync(this IDeploymentsOperations operations, string scope, string deploymentName, Deployment parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
public static async System.Threading.Tasks.Task<object> ValidateAtScopeAsync(this IDeploymentsOperations operations, string scope, string deploymentName, Deployment parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
using (var _result = await operations.ValidateAtScopeWithHttpMessagesAsync(scope, deploymentName, parameters, null, cancellationToken).ConfigureAwait(false))
{
@ -537,7 +537,7 @@ namespace Microsoft.Azure.Management.Resources
/// <param name='deploymentName'>
/// The name of the deployment.
/// </param>
public static DeploymentValidateResult ValidateAtTenantScope(this IDeploymentsOperations operations, string deploymentName, ScopedDeployment parameters)
public static object ValidateAtTenantScope(this IDeploymentsOperations operations, string deploymentName, ScopedDeployment parameters)
{
return ((IDeploymentsOperations)operations).ValidateAtTenantScopeAsync(deploymentName, parameters).GetAwaiter().GetResult();
}
@ -555,7 +555,7 @@ namespace Microsoft.Azure.Management.Resources
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task<DeploymentValidateResult> ValidateAtTenantScopeAsync(this IDeploymentsOperations operations, string deploymentName, ScopedDeployment parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
public static async System.Threading.Tasks.Task<object> ValidateAtTenantScopeAsync(this IDeploymentsOperations operations, string deploymentName, ScopedDeployment parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
using (var _result = await operations.ValidateAtTenantScopeWithHttpMessagesAsync(deploymentName, parameters, null, cancellationToken).ConfigureAwait(false))
{
@ -889,7 +889,7 @@ namespace Microsoft.Azure.Management.Resources
/// <param name='deploymentName'>
/// The name of the deployment.
/// </param>
public static DeploymentValidateResult ValidateAtManagementGroupScope(this IDeploymentsOperations operations, string groupId, string deploymentName, ScopedDeployment parameters)
public static object ValidateAtManagementGroupScope(this IDeploymentsOperations operations, string groupId, string deploymentName, ScopedDeployment parameters)
{
return ((IDeploymentsOperations)operations).ValidateAtManagementGroupScopeAsync(groupId, deploymentName, parameters).GetAwaiter().GetResult();
}
@ -910,7 +910,7 @@ namespace Microsoft.Azure.Management.Resources
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task<DeploymentValidateResult> ValidateAtManagementGroupScopeAsync(this IDeploymentsOperations operations, string groupId, string deploymentName, ScopedDeployment parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
public static async System.Threading.Tasks.Task<object> ValidateAtManagementGroupScopeAsync(this IDeploymentsOperations operations, string groupId, string deploymentName, ScopedDeployment parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
using (var _result = await operations.ValidateAtManagementGroupScopeWithHttpMessagesAsync(groupId, deploymentName, parameters, null, cancellationToken).ConfigureAwait(false))
{
@ -1229,7 +1229,7 @@ namespace Microsoft.Azure.Management.Resources
/// <param name='deploymentName'>
/// The name of the deployment.
/// </param>
public static DeploymentValidateResult ValidateAtSubscriptionScope(this IDeploymentsOperations operations, string deploymentName, Deployment parameters)
public static object ValidateAtSubscriptionScope(this IDeploymentsOperations operations, string deploymentName, Deployment parameters)
{
return ((IDeploymentsOperations)operations).ValidateAtSubscriptionScopeAsync(deploymentName, parameters).GetAwaiter().GetResult();
}
@ -1247,7 +1247,7 @@ namespace Microsoft.Azure.Management.Resources
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task<DeploymentValidateResult> ValidateAtSubscriptionScopeAsync(this IDeploymentsOperations operations, string deploymentName, Deployment parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
public static async System.Threading.Tasks.Task<object> ValidateAtSubscriptionScopeAsync(this IDeploymentsOperations operations, string deploymentName, Deployment parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
using (var _result = await operations.ValidateAtSubscriptionScopeWithHttpMessagesAsync(deploymentName, parameters, null, cancellationToken).ConfigureAwait(false))
{
@ -1590,7 +1590,7 @@ namespace Microsoft.Azure.Management.Resources
/// <param name='deploymentName'>
/// The name of the deployment.
/// </param>
public static DeploymentValidateResult Validate(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, Deployment parameters)
public static object Validate(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, Deployment parameters)
{
return ((IDeploymentsOperations)operations).ValidateAsync(resourceGroupName, deploymentName, parameters).GetAwaiter().GetResult();
}
@ -1612,7 +1612,7 @@ namespace Microsoft.Azure.Management.Resources
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task<DeploymentValidateResult> ValidateAsync(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, Deployment parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
public static async System.Threading.Tasks.Task<object> ValidateAsync(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, Deployment parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
using (var _result = await operations.ValidateWithHttpMessagesAsync(resourceGroupName, deploymentName, parameters, null, cancellationToken).ConfigureAwait(false))
{
@ -1875,7 +1875,7 @@ namespace Microsoft.Azure.Management.Resources
/// <param name='deploymentName'>
/// The name of the deployment.
/// </param>
public static DeploymentValidateResult BeginValidateAtScope(this IDeploymentsOperations operations, string scope, string deploymentName, Deployment parameters)
public static object BeginValidateAtScope(this IDeploymentsOperations operations, string scope, string deploymentName, Deployment parameters)
{
return ((IDeploymentsOperations)operations).BeginValidateAtScopeAsync(scope, deploymentName, parameters).GetAwaiter().GetResult();
}
@ -1896,7 +1896,7 @@ namespace Microsoft.Azure.Management.Resources
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task<DeploymentValidateResult> BeginValidateAtScopeAsync(this IDeploymentsOperations operations, string scope, string deploymentName, Deployment parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
public static async System.Threading.Tasks.Task<object> BeginValidateAtScopeAsync(this IDeploymentsOperations operations, string scope, string deploymentName, Deployment parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
using (var _result = await operations.BeginValidateAtScopeWithHttpMessagesAsync(scope, deploymentName, parameters, null, cancellationToken).ConfigureAwait(false))
{
@ -1994,7 +1994,7 @@ namespace Microsoft.Azure.Management.Resources
/// <param name='deploymentName'>
/// The name of the deployment.
/// </param>
public static DeploymentValidateResult BeginValidateAtTenantScope(this IDeploymentsOperations operations, string deploymentName, ScopedDeployment parameters)
public static object BeginValidateAtTenantScope(this IDeploymentsOperations operations, string deploymentName, ScopedDeployment parameters)
{
return ((IDeploymentsOperations)operations).BeginValidateAtTenantScopeAsync(deploymentName, parameters).GetAwaiter().GetResult();
}
@ -2012,7 +2012,7 @@ namespace Microsoft.Azure.Management.Resources
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task<DeploymentValidateResult> BeginValidateAtTenantScopeAsync(this IDeploymentsOperations operations, string deploymentName, ScopedDeployment parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
public static async System.Threading.Tasks.Task<object> BeginValidateAtTenantScopeAsync(this IDeploymentsOperations operations, string deploymentName, ScopedDeployment parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
using (var _result = await operations.BeginValidateAtTenantScopeWithHttpMessagesAsync(deploymentName, parameters, null, cancellationToken).ConfigureAwait(false))
{
@ -2160,7 +2160,7 @@ namespace Microsoft.Azure.Management.Resources
/// <param name='deploymentName'>
/// The name of the deployment.
/// </param>
public static DeploymentValidateResult BeginValidateAtManagementGroupScope(this IDeploymentsOperations operations, string groupId, string deploymentName, ScopedDeployment parameters)
public static object BeginValidateAtManagementGroupScope(this IDeploymentsOperations operations, string groupId, string deploymentName, ScopedDeployment parameters)
{
return ((IDeploymentsOperations)operations).BeginValidateAtManagementGroupScopeAsync(groupId, deploymentName, parameters).GetAwaiter().GetResult();
}
@ -2181,7 +2181,7 @@ namespace Microsoft.Azure.Management.Resources
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task<DeploymentValidateResult> BeginValidateAtManagementGroupScopeAsync(this IDeploymentsOperations operations, string groupId, string deploymentName, ScopedDeployment parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
public static async System.Threading.Tasks.Task<object> BeginValidateAtManagementGroupScopeAsync(this IDeploymentsOperations operations, string groupId, string deploymentName, ScopedDeployment parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
using (var _result = await operations.BeginValidateAtManagementGroupScopeWithHttpMessagesAsync(groupId, deploymentName, parameters, null, cancellationToken).ConfigureAwait(false))
{
@ -2320,7 +2320,7 @@ namespace Microsoft.Azure.Management.Resources
/// <param name='deploymentName'>
/// The name of the deployment.
/// </param>
public static DeploymentValidateResult BeginValidateAtSubscriptionScope(this IDeploymentsOperations operations, string deploymentName, Deployment parameters)
public static object BeginValidateAtSubscriptionScope(this IDeploymentsOperations operations, string deploymentName, Deployment parameters)
{
return ((IDeploymentsOperations)operations).BeginValidateAtSubscriptionScopeAsync(deploymentName, parameters).GetAwaiter().GetResult();
}
@ -2338,7 +2338,7 @@ namespace Microsoft.Azure.Management.Resources
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task<DeploymentValidateResult> BeginValidateAtSubscriptionScopeAsync(this IDeploymentsOperations operations, string deploymentName, Deployment parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
public static async System.Threading.Tasks.Task<object> BeginValidateAtSubscriptionScopeAsync(this IDeploymentsOperations operations, string deploymentName, Deployment parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
using (var _result = await operations.BeginValidateAtSubscriptionScopeWithHttpMessagesAsync(deploymentName, parameters, null, cancellationToken).ConfigureAwait(false))
{
@ -2493,7 +2493,7 @@ namespace Microsoft.Azure.Management.Resources
/// <param name='deploymentName'>
/// The name of the deployment.
/// </param>
public static DeploymentValidateResult BeginValidate(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, Deployment parameters)
public static object BeginValidate(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, Deployment parameters)
{
return ((IDeploymentsOperations)operations).BeginValidateAsync(resourceGroupName, deploymentName, parameters).GetAwaiter().GetResult();
}
@ -2515,7 +2515,7 @@ namespace Microsoft.Azure.Management.Resources
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task<DeploymentValidateResult> BeginValidateAsync(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, Deployment parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
public static async System.Threading.Tasks.Task<object> BeginValidateAsync(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, Deployment parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
using (var _result = await operations.BeginValidateWithHttpMessagesAsync(resourceGroupName, deploymentName, parameters, null, cancellationToken).ConfigureAwait(false))
{

Просмотреть файл

@ -190,7 +190,7 @@ namespace Microsoft.Azure.Management.Resources
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<DeploymentValidateResult>> ValidateAtScopeWithHttpMessagesAsync(string scope, string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<object>> ValidateAtScopeWithHttpMessagesAsync(string scope, string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Exports the template used for specified deployment.
@ -403,7 +403,7 @@ namespace Microsoft.Azure.Management.Resources
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<DeploymentValidateResult>> ValidateAtTenantScopeWithHttpMessagesAsync(string deploymentName, ScopedDeployment parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<object>> ValidateAtTenantScopeWithHttpMessagesAsync(string deploymentName, ScopedDeployment parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Returns changes that will be made by the deployment if executed at the
@ -656,7 +656,7 @@ namespace Microsoft.Azure.Management.Resources
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<DeploymentValidateResult>> ValidateAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, ScopedDeployment parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<object>> ValidateAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, ScopedDeployment parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Returns changes that will be made by the deployment if executed at the
@ -900,7 +900,7 @@ namespace Microsoft.Azure.Management.Resources
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<DeploymentValidateResult>> ValidateAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<object>> ValidateAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Returns changes that will be made by the deployment if executed at the
@ -1159,7 +1159,7 @@ namespace Microsoft.Azure.Management.Resources
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<DeploymentValidateResult>> ValidateWithHttpMessagesAsync(string resourceGroupName, string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<object>> ValidateWithHttpMessagesAsync(string resourceGroupName, string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Returns changes that will be made by the deployment if executed at the
@ -1368,7 +1368,7 @@ namespace Microsoft.Azure.Management.Resources
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<DeploymentValidateResult>> BeginValidateAtScopeWithHttpMessagesAsync(string scope, string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<object>> BeginValidateAtScopeWithHttpMessagesAsync(string scope, string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// A template deployment that is currently running cannot be deleted. Deleting
@ -1460,7 +1460,7 @@ namespace Microsoft.Azure.Management.Resources
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<DeploymentValidateResult>> BeginValidateAtTenantScopeWithHttpMessagesAsync(string deploymentName, ScopedDeployment parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<object>> BeginValidateAtTenantScopeWithHttpMessagesAsync(string deploymentName, ScopedDeployment parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Returns changes that will be made by the deployment if executed at the
@ -1589,7 +1589,7 @@ namespace Microsoft.Azure.Management.Resources
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<DeploymentValidateResult>> BeginValidateAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, ScopedDeployment parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<object>> BeginValidateAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, ScopedDeployment parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Returns changes that will be made by the deployment if executed at the
@ -1712,7 +1712,7 @@ namespace Microsoft.Azure.Management.Resources
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<DeploymentValidateResult>> BeginValidateAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<object>> BeginValidateAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Returns changes that will be made by the deployment if executed at the
@ -1846,7 +1846,7 @@ namespace Microsoft.Azure.Management.Resources
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<DeploymentValidateResult>> BeginValidateWithHttpMessagesAsync(string resourceGroupName, string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<object>> BeginValidateWithHttpMessagesAsync(string resourceGroupName, string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Returns changes that will be made by the deployment if executed at the

Просмотреть файл

@ -88,7 +88,7 @@ namespace Microsoft.Azure.Management.Resources
/// <exception cref="Microsoft.Rest.Azure.CloudException">
/// Thrown when the operation returned an invalid status code
/// </exception>
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse> DeleteWithHttpMessagesAsync(string resourceGroupName, string forceDeletionTypes = default(string), System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationHeaderResponse<ResourceGroupsDeleteHeaders>> DeleteWithHttpMessagesAsync(string resourceGroupName, string forceDeletionTypes = default(string), System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Gets a resource group.
@ -219,7 +219,7 @@ namespace Microsoft.Azure.Management.Resources
/// <exception cref="Microsoft.Rest.Azure.CloudException">
/// Thrown when the operation returned an invalid status code
/// </exception>
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string forceDeletionTypes = default(string), System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationHeaderResponse<ResourceGroupsDeleteHeaders>> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string forceDeletionTypes = default(string), System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Captures the specified resource group as a template.

Просмотреть файл

@ -179,7 +179,7 @@ namespace Microsoft.Azure.Management.Resources
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<TagsResource>> CreateOrUpdateAtScopeWithHttpMessagesAsync(string scope, TagsResource parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<TagsResource,TagsCreateOrUpdateAtScopeHeaders>> CreateOrUpdateAtScopeWithHttpMessagesAsync(string scope, TagsResource parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// This operation allows replacing, merging or selectively deleting tags on
@ -217,7 +217,7 @@ namespace Microsoft.Azure.Management.Resources
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<TagsResource>> UpdateAtScopeWithHttpMessagesAsync(string scope, TagsPatchResource parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<TagsResource,TagsUpdateAtScopeHeaders>> UpdateAtScopeWithHttpMessagesAsync(string scope, TagsPatchResource parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Gets the entire set of tags on a resource or subscription.
@ -260,7 +260,95 @@ namespace Microsoft.Azure.Management.Resources
/// <exception cref="Microsoft.Rest.Azure.CloudException">
/// Thrown when the operation returned an invalid status code
/// </exception>
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse> DeleteAtScopeWithHttpMessagesAsync(string scope, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationHeaderResponse<TagsDeleteAtScopeHeaders>> DeleteAtScopeWithHttpMessagesAsync(string scope, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// This operation allows adding or replacing the entire set of tags on the
/// specified resource or subscription. The specified entity can have a maximum
/// of 50 tags.
/// </summary>
/// <remarks>
/// This operation allows adding or replacing the entire set of tags on the
/// specified resource or subscription. The specified entity can have a maximum
/// of 50 tags.
/// </remarks>
/// <param name='scope'>
/// The resource scope.
/// </param>
/// <param name='parameters'>
///
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="Microsoft.Rest.Azure.CloudException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<TagsResource,TagsCreateOrUpdateAtScopeHeaders>> BeginCreateOrUpdateAtScopeWithHttpMessagesAsync(string scope, TagsResource parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// This operation allows replacing, merging or selectively deleting tags on
/// the specified resource or subscription. The specified entity can have a
/// maximum of 50 tags at the end of the operation. The &#39;replace&#39; option
/// replaces the entire set of existing tags with a new set. The &#39;merge&#39; option
/// allows adding tags with new names and updating the values of tags with
/// existing names. The &#39;delete&#39; option allows selectively deleting tags based
/// on given names or name/value pairs.
/// </summary>
/// <remarks>
/// This operation allows replacing, merging or selectively deleting tags on
/// the specified resource or subscription. The specified entity can have a
/// maximum of 50 tags at the end of the operation. The &#39;replace&#39; option
/// replaces the entire set of existing tags with a new set. The &#39;merge&#39; option
/// allows adding tags with new names and updating the values of tags with
/// existing names. The &#39;delete&#39; option allows selectively deleting tags based
/// on given names or name/value pairs.
/// </remarks>
/// <param name='scope'>
/// The resource scope.
/// </param>
/// <param name='parameters'>
///
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="Microsoft.Rest.Azure.CloudException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<TagsResource,TagsUpdateAtScopeHeaders>> BeginUpdateAtScopeWithHttpMessagesAsync(string scope, TagsPatchResource parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Deletes the entire set of tags on a resource or subscription.
/// </summary>
/// <remarks>
/// Deletes the entire set of tags on a resource or subscription.
/// </remarks>
/// <param name='scope'>
/// The resource scope.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="Microsoft.Rest.Azure.CloudException">
/// Thrown when the operation returned an invalid status code
/// </exception>
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationHeaderResponse<TagsDeleteAtScopeHeaders>> BeginDeleteAtScopeWithHttpMessagesAsync(string scope, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// This operation performs a union of predefined tags, resource tags, resource

Просмотреть файл

@ -0,0 +1,99 @@
// 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.Resources.Models
{
using System.Linq;
public partial class DeploymentDiagnosticsDefinition
{
/// <summary>
/// Initializes a new instance of the DeploymentDiagnosticsDefinition class.
/// </summary>
public DeploymentDiagnosticsDefinition()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the DeploymentDiagnosticsDefinition class.
/// </summary>
/// <param name="level">Denotes the additional response level.
/// Possible values include: &#39;Warning&#39;, &#39;Info&#39;, &#39;Error&#39;</param>
/// <param name="code">The error code.
/// </param>
/// <param name="message">The error message.
/// </param>
/// <param name="target">The error target.
/// </param>
/// <param name="additionalInfo">The error additional info.
/// </param>
public DeploymentDiagnosticsDefinition(string level, string code, string message, string target = default(string), System.Collections.Generic.IList<ErrorAdditionalInfo> additionalInfo = default(System.Collections.Generic.IList<ErrorAdditionalInfo>))
{
this.Level = level;
this.Code = code;
this.Message = message;
this.Target = target;
this.AdditionalInfo = additionalInfo;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets denotes the additional response level. Possible values include: &#39;Warning&#39;, &#39;Info&#39;, &#39;Error&#39;
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "level")]
public string Level {get; private set; }
/// <summary>
/// Gets the error code.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "code")]
public string Code {get; private set; }
/// <summary>
/// Gets the error message.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "message")]
public string Message {get; private set; }
/// <summary>
/// Gets the error target.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "target")]
public string Target {get; private set; }
/// <summary>
/// Gets the error additional info.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "additionalInfo")]
public System.Collections.Generic.IList<ErrorAdditionalInfo> AdditionalInfo {get; private set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
}
}
}

Просмотреть файл

@ -65,7 +65,7 @@ namespace Microsoft.Azure.Management.Resources.Models
/// the parent template or nested template. Only applicable to nested
/// templates. If not specified, default value is outer.
/// </param>
public DeploymentProperties(DeploymentMode mode, object template = default(object), TemplateLink templateLink = default(TemplateLink), object parameters = default(object), ParametersLink parametersLink = default(ParametersLink), DebugSetting debugSetting = default(DebugSetting), OnErrorDeployment onErrorDeployment = default(OnErrorDeployment), ExpressionEvaluationOptions expressionEvaluationOptions = default(ExpressionEvaluationOptions))
public DeploymentProperties(DeploymentMode mode, object template = default(object), TemplateLink templateLink = default(TemplateLink), System.Collections.Generic.IDictionary<string, DeploymentParameter> parameters = default(System.Collections.Generic.IDictionary<string, DeploymentParameter>), ParametersLink parametersLink = default(ParametersLink), DebugSetting debugSetting = default(DebugSetting), OnErrorDeployment onErrorDeployment = default(OnErrorDeployment), ExpressionEvaluationOptions expressionEvaluationOptions = default(ExpressionEvaluationOptions))
{
this.Template = template;
@ -109,7 +109,7 @@ namespace Microsoft.Azure.Management.Resources.Models
/// but not both. It can be a JObject or a well formed JSON string.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "parameters")]
public object Parameters {get; set; }
public System.Collections.Generic.IDictionary<string, DeploymentParameter> Parameters {get; set; }
/// <summary>
/// Gets or sets the URI of parameters file. You use this element to link to an
@ -160,7 +160,16 @@ namespace Microsoft.Azure.Management.Resources.Models
{
if (this.Parameters != null)
{
foreach (var valueElement in this.Parameters.Values)
{
if (valueElement != null)
{
valueElement.Validate();
}
}
}
if (this.ParametersLink != null)
{
this.ParametersLink.Validate();

Просмотреть файл

@ -76,7 +76,10 @@ namespace Microsoft.Azure.Management.Resources.Models
/// <param name="error">The deployment error.
/// </param>
public DeploymentPropertiesExtended(string provisioningState = default(string), string correlationId = default(string), System.DateTime? timestamp = default(System.DateTime?), string duration = default(string), object outputs = default(object), System.Collections.Generic.IList<Provider> providers = default(System.Collections.Generic.IList<Provider>), System.Collections.Generic.IList<Dependency> dependencies = default(System.Collections.Generic.IList<Dependency>), TemplateLink templateLink = default(TemplateLink), object parameters = default(object), ParametersLink parametersLink = default(ParametersLink), DeploymentMode? mode = default(DeploymentMode?), DebugSetting debugSetting = default(DebugSetting), OnErrorDeploymentExtended onErrorDeployment = default(OnErrorDeploymentExtended), string templateHash = default(string), System.Collections.Generic.IList<ResourceReference> outputResources = default(System.Collections.Generic.IList<ResourceReference>), System.Collections.Generic.IList<ResourceReference> validatedResources = default(System.Collections.Generic.IList<ResourceReference>), ErrorResponse error = default(ErrorResponse))
/// <param name="diagnostics">Contains diagnostic information collected during validation process.
/// </param>
public DeploymentPropertiesExtended(string provisioningState = default(string), string correlationId = default(string), System.DateTime? timestamp = default(System.DateTime?), string duration = default(string), object outputs = default(object), System.Collections.Generic.IList<Provider> providers = default(System.Collections.Generic.IList<Provider>), System.Collections.Generic.IList<Dependency> dependencies = default(System.Collections.Generic.IList<Dependency>), TemplateLink templateLink = default(TemplateLink), object parameters = default(object), ParametersLink parametersLink = default(ParametersLink), DeploymentMode? mode = default(DeploymentMode?), DebugSetting debugSetting = default(DebugSetting), OnErrorDeploymentExtended onErrorDeployment = default(OnErrorDeploymentExtended), string templateHash = default(string), System.Collections.Generic.IList<ResourceReference> outputResources = default(System.Collections.Generic.IList<ResourceReference>), System.Collections.Generic.IList<ResourceReference> validatedResources = default(System.Collections.Generic.IList<ResourceReference>), ErrorResponse error = default(ErrorResponse), System.Collections.Generic.IList<DeploymentDiagnosticsDefinition> diagnostics = default(System.Collections.Generic.IList<DeploymentDiagnosticsDefinition>))
{
this.ProvisioningState = provisioningState;
@ -96,6 +99,7 @@ namespace Microsoft.Azure.Management.Resources.Models
this.OutputResources = outputResources;
this.ValidatedResources = validatedResources;
this.Error = error;
this.Diagnostics = diagnostics;
CustomInit();
}
@ -206,6 +210,12 @@ namespace Microsoft.Azure.Management.Resources.Models
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "error")]
public ErrorResponse Error {get; private set; }
/// <summary>
/// Gets contains diagnostic information collected during validation process.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "diagnostics")]
public System.Collections.Generic.IList<DeploymentDiagnosticsDefinition> Diagnostics {get; private set; }
/// <summary>
/// Validate the object.
/// </summary>
@ -233,6 +243,16 @@ namespace Microsoft.Azure.Management.Resources.Models
if (this.Diagnostics != null)
{
foreach (var element in this.Diagnostics)
{
if (element != null)
{
element.Validate();
}
}
}
}
}
}

Просмотреть файл

@ -1,72 +0,0 @@
// 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.Resources.Models
{
using System.Linq;
/// <summary>
/// Information from validate template deployment response.
/// </summary>
public partial class DeploymentValidateResult
{
/// <summary>
/// Initializes a new instance of the DeploymentValidateResult class.
/// </summary>
public DeploymentValidateResult()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the DeploymentValidateResult class.
/// </summary>
/// <param name="error">The deployment validation error.
/// </param>
/// <param name="properties">The template deployment properties.
/// </param>
public DeploymentValidateResult(ErrorResponse error = default(ErrorResponse), DeploymentPropertiesExtended properties = default(DeploymentPropertiesExtended))
{
this.Error = error;
this.Properties = properties;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets the deployment validation error.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "error")]
public ErrorResponse Error {get; private set; }
/// <summary>
/// Gets or sets the template deployment properties.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "properties")]
public DeploymentPropertiesExtended Properties {get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (this.Properties != null)
{
this.Properties.Validate();
}
}
}
}

Просмотреть файл

@ -0,0 +1,48 @@
// 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.Resources.Models
{
using System.Linq;
/// <summary>
/// The template deployment validation detected failures.
/// </summary>
public partial class DeploymentValidationError
{
/// <summary>
/// Initializes a new instance of the DeploymentValidationError class.
/// </summary>
public DeploymentValidationError()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the DeploymentValidationError class.
/// </summary>
/// <param name="error">The error detail.
/// </param>
public DeploymentValidationError(ErrorDetail error = default(ErrorDetail))
{
this.Error = error;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets the error detail.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "error")]
public ErrorDetail Error {get; set; }
}
}

Просмотреть файл

@ -68,7 +68,7 @@ namespace Microsoft.Azure.Management.Resources.Models
/// <param name="whatIfSettings">Optional What-If operation settings.
/// </param>
public DeploymentWhatIfProperties(DeploymentMode mode, object template = default(object), TemplateLink templateLink = default(TemplateLink), object parameters = default(object), ParametersLink parametersLink = default(ParametersLink), DebugSetting debugSetting = default(DebugSetting), OnErrorDeployment onErrorDeployment = default(OnErrorDeployment), ExpressionEvaluationOptions expressionEvaluationOptions = default(ExpressionEvaluationOptions), DeploymentWhatIfSettings whatIfSettings = default(DeploymentWhatIfSettings))
public DeploymentWhatIfProperties(DeploymentMode mode, object template = default(object), TemplateLink templateLink = default(TemplateLink), System.Collections.Generic.IDictionary<string, DeploymentParameter> parameters = default(System.Collections.Generic.IDictionary<string, DeploymentParameter>), ParametersLink parametersLink = default(ParametersLink), DebugSetting debugSetting = default(DebugSetting), OnErrorDeployment onErrorDeployment = default(OnErrorDeployment), ExpressionEvaluationOptions expressionEvaluationOptions = default(ExpressionEvaluationOptions), DeploymentWhatIfSettings whatIfSettings = default(DeploymentWhatIfSettings))
: base(mode, template, templateLink, parameters, parametersLink, debugSetting, onErrorDeployment, expressionEvaluationOptions)
{

Просмотреть файл

@ -0,0 +1,19 @@
// 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.Resources.Models
{
/// <summary>
/// Defines values for ExportTemplateOutputFormat.
/// </summary>
public static class ExportTemplateOutputFormat
{
public const string Json = "Json";
public const string Bicep = "Bicep";
}
}

Просмотреть файл

@ -32,11 +32,15 @@ namespace Microsoft.Azure.Management.Resources.Models
/// of the following: &#39;IncludeParameterDefaultValue&#39;, &#39;IncludeComments&#39;,
/// &#39;SkipResourceNameParameterization&#39;, &#39;SkipAllParameterization&#39;
/// </param>
public ExportTemplateRequest(System.Collections.Generic.IList<string> resources = default(System.Collections.Generic.IList<string>), string options = default(string))
/// <param name="outputFormat">The output format for the exported resources.
/// Possible values include: &#39;Json&#39;, &#39;Bicep&#39;</param>
public ExportTemplateRequest(System.Collections.Generic.IList<string> resources = default(System.Collections.Generic.IList<string>), string options = default(string), string outputFormat = default(string))
{
this.Resources = resources;
this.Options = options;
this.OutputFormat = outputFormat;
CustomInit();
}
@ -61,5 +65,11 @@ namespace Microsoft.Azure.Management.Resources.Models
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "options")]
public string Options {get; set; }
/// <summary>
/// Gets or sets the output format for the exported resources. Possible values include: &#39;Json&#39;, &#39;Bicep&#39;
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "outputFormat")]
public string OutputFormat {get; set; }
}
}

Просмотреть файл

@ -0,0 +1,20 @@
// 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.Resources.Models
{
/// <summary>
/// Defines values for Level.
/// </summary>
public static class Level
{
public const string Warning = "Warning";
public const string Info = "Info";
public const string Error = "Error";
}
}

Просмотреть файл

@ -24,15 +24,19 @@ namespace Microsoft.Azure.Management.Resources.Models
/// Initializes a new instance of the ResourceGroupExportResult class.
/// </summary>
/// <param name="template">The template content.
/// <param name="template">The template content. Used if outputFormat is empty or set to &#39;Json&#39;.
/// </param>
/// <param name="output">The formatted export content. Used if outputFormat is set to &#39;Bicep&#39;.
/// </param>
/// <param name="error">The template export error.
/// </param>
public ResourceGroupExportResult(object template = default(object), ErrorResponse error = default(ErrorResponse))
public ResourceGroupExportResult(object template = default(object), string output = default(string), ErrorResponse error = default(ErrorResponse))
{
this.Template = template;
this.Output = output;
this.Error = error;
CustomInit();
}
@ -44,11 +48,19 @@ namespace Microsoft.Azure.Management.Resources.Models
/// <summary>
/// Gets or sets the template content.
/// Gets or sets the template content. Used if outputFormat is empty or set to
/// &#39;Json&#39;.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "template")]
public object Template {get; set; }
/// <summary>
/// Gets or sets the formatted export content. Used if outputFormat is set to
/// &#39;Bicep&#39;.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "output")]
public string Output {get; set; }
/// <summary>
/// Gets or sets the template export error.
/// </summary>

Просмотреть файл

@ -0,0 +1,45 @@
// 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.Resources.Models
{
using System.Linq;
public partial class ResourceGroupsDeleteHeaders
{
/// <summary>
/// Initializes a new instance of the ResourceGroupsDeleteHeaders class.
/// </summary>
public ResourceGroupsDeleteHeaders()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the ResourceGroupsDeleteHeaders class.
/// </summary>
/// <param name="location">
/// </param>
public ResourceGroupsDeleteHeaders(string location = default(string))
{
this.Location = location;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "location")]
public string Location {get; set; }
}
}

Просмотреть файл

@ -0,0 +1,45 @@
// 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.Resources.Models
{
using System.Linq;
public partial class TagsCreateOrUpdateAtScopeHeaders
{
/// <summary>
/// Initializes a new instance of the TagsCreateOrUpdateAtScopeHeaders class.
/// </summary>
public TagsCreateOrUpdateAtScopeHeaders()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the TagsCreateOrUpdateAtScopeHeaders class.
/// </summary>
/// <param name="location">
/// </param>
public TagsCreateOrUpdateAtScopeHeaders(string location = default(string))
{
this.Location = location;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "Location")]
public string Location {get; set; }
}
}

Просмотреть файл

@ -0,0 +1,45 @@
// 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.Resources.Models
{
using System.Linq;
public partial class TagsDeleteAtScopeHeaders
{
/// <summary>
/// Initializes a new instance of the TagsDeleteAtScopeHeaders class.
/// </summary>
public TagsDeleteAtScopeHeaders()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the TagsDeleteAtScopeHeaders class.
/// </summary>
/// <param name="location">
/// </param>
public TagsDeleteAtScopeHeaders(string location = default(string))
{
this.Location = location;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "Location")]
public string Location {get; set; }
}
}

Просмотреть файл

@ -0,0 +1,45 @@
// 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.Resources.Models
{
using System.Linq;
public partial class TagsUpdateAtScopeHeaders
{
/// <summary>
/// Initializes a new instance of the TagsUpdateAtScopeHeaders class.
/// </summary>
public TagsUpdateAtScopeHeaders()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the TagsUpdateAtScopeHeaders class.
/// </summary>
/// <param name="location">
/// </param>
public TagsUpdateAtScopeHeaders(string location = default(string))
{
this.Location = location;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "Location")]
public string Location {get; set; }
}
}

Просмотреть файл

@ -26,10 +26,18 @@ namespace Microsoft.Azure.Management.Resources.Models
/// <param name="changes">List of resource changes predicted by What-If operation.
/// </param>
public WhatIfOperationProperties(System.Collections.Generic.IList<WhatIfChange> changes = default(System.Collections.Generic.IList<WhatIfChange>))
/// <param name="potentialChanges">List of resource changes predicted by What-If operation.
/// </param>
/// <param name="diagnostics">List of resource diagnostics detected by What-If operation.
/// </param>
public WhatIfOperationProperties(System.Collections.Generic.IList<WhatIfChange> changes = default(System.Collections.Generic.IList<WhatIfChange>), System.Collections.Generic.IList<WhatIfChange> potentialChanges = default(System.Collections.Generic.IList<WhatIfChange>), System.Collections.Generic.IList<DeploymentDiagnosticsDefinition> diagnostics = default(System.Collections.Generic.IList<DeploymentDiagnosticsDefinition>))
{
this.Changes = changes;
this.PotentialChanges = potentialChanges;
this.Diagnostics = diagnostics;
CustomInit();
}
@ -44,5 +52,17 @@ namespace Microsoft.Azure.Management.Resources.Models
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "changes")]
public System.Collections.Generic.IList<WhatIfChange> Changes {get; set; }
/// <summary>
/// Gets or sets list of resource changes predicted by What-If operation.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "potentialChanges")]
public System.Collections.Generic.IList<WhatIfChange> PotentialChanges {get; set; }
/// <summary>
/// Gets list of resource diagnostics detected by What-If operation.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "diagnostics")]
public System.Collections.Generic.IList<DeploymentDiagnosticsDefinition> Diagnostics {get; private set; }
}
}

Просмотреть файл

@ -34,12 +34,20 @@ namespace Microsoft.Azure.Management.Resources.Models
/// <param name="changes">List of resource changes predicted by What-If operation.
/// </param>
public WhatIfOperationResult(string status = default(string), ErrorResponse error = default(ErrorResponse), System.Collections.Generic.IList<WhatIfChange> changes = default(System.Collections.Generic.IList<WhatIfChange>))
/// <param name="potentialChanges">List of resource changes predicted by What-If operation.
/// </param>
/// <param name="diagnostics">List of resource diagnostics detected by What-If operation.
/// </param>
public WhatIfOperationResult(string status = default(string), ErrorResponse error = default(ErrorResponse), System.Collections.Generic.IList<WhatIfChange> changes = default(System.Collections.Generic.IList<WhatIfChange>), System.Collections.Generic.IList<WhatIfChange> potentialChanges = default(System.Collections.Generic.IList<WhatIfChange>), System.Collections.Generic.IList<DeploymentDiagnosticsDefinition> diagnostics = default(System.Collections.Generic.IList<DeploymentDiagnosticsDefinition>))
{
this.Status = status;
this.Error = error;
this.Changes = changes;
this.PotentialChanges = potentialChanges;
this.Diagnostics = diagnostics;
CustomInit();
}
@ -66,5 +74,17 @@ namespace Microsoft.Azure.Management.Resources.Models
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "properties.changes")]
public System.Collections.Generic.IList<WhatIfChange> Changes {get; set; }
/// <summary>
/// Gets or sets list of resource changes predicted by What-If operation.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "properties.potentialChanges")]
public System.Collections.Generic.IList<WhatIfChange> PotentialChanges {get; set; }
/// <summary>
/// Gets list of resource diagnostics detected by What-If operation.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "properties.diagnostics")]
public System.Collections.Generic.IList<DeploymentDiagnosticsDefinition> Diagnostics {get; private set; }
}
}

Просмотреть файл

@ -508,10 +508,10 @@ namespace Microsoft.Azure.Management.Resources
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public async System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse> DeleteWithHttpMessagesAsync(string resourceGroupName, string forceDeletionTypes = default(string), System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
public async System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationHeaderResponse<ResourceGroupsDeleteHeaders>> DeleteWithHttpMessagesAsync(string resourceGroupName, string forceDeletionTypes = default(string), System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// Send Request
Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, forceDeletionTypes, customHeaders, cancellationToken).ConfigureAwait(false);
Microsoft.Rest.Azure.AzureOperationHeaderResponse<ResourceGroupsDeleteHeaders> _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, forceDeletionTypes, customHeaders, cancellationToken).ConfigureAwait(false);
return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
}
@ -1224,7 +1224,7 @@ namespace Microsoft.Azure.Management.Resources
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string forceDeletionTypes = default(string), System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
public async System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationHeaderResponse<ResourceGroupsDeleteHeaders>> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string forceDeletionTypes = default(string), System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
@ -1383,7 +1383,7 @@ namespace Microsoft.Azure.Management.Resources
throw ex;
}
// Create Result
var _result = new Microsoft.Rest.Azure.AzureOperationResponse();
var _result = new Microsoft.Rest.Azure.AzureOperationHeaderResponse<ResourceGroupsDeleteHeaders>();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
@ -1391,6 +1391,19 @@ namespace Microsoft.Azure.Management.Resources
{
_result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
}
try
{
_result.Headers = _httpResponse.GetHeadersAsJson().ToObject<ResourceGroupsDeleteHeaders>(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings));
}
catch (Newtonsoft.Json.JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
{
_httpResponse.Dispose();
}
throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex);
}
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result);

Просмотреть файл

@ -98,9 +98,9 @@ namespace Microsoft.Azure.Management.Resources
/// is supported:
/// forceDeletionTypes=Microsoft.Compute/virtualMachines,Microsoft.Compute/virtualMachineScaleSets
/// </param>
public static void Delete(this IResourceGroupsOperations operations, string resourceGroupName, string forceDeletionTypes = default(string))
public static ResourceGroupsDeleteHeaders Delete(this IResourceGroupsOperations operations, string resourceGroupName, string forceDeletionTypes = default(string))
{
((IResourceGroupsOperations)operations).DeleteAsync(resourceGroupName, forceDeletionTypes).GetAwaiter().GetResult();
return ((IResourceGroupsOperations)operations).DeleteAsync(resourceGroupName, forceDeletionTypes).GetAwaiter().GetResult();
}
/// <summary>
@ -122,9 +122,12 @@ namespace Microsoft.Azure.Management.Resources
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task DeleteAsync(this IResourceGroupsOperations operations, string resourceGroupName, string forceDeletionTypes = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
public static async System.Threading.Tasks.Task<ResourceGroupsDeleteHeaders> DeleteAsync(this IResourceGroupsOperations operations, string resourceGroupName, string forceDeletionTypes = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
(await operations.DeleteWithHttpMessagesAsync(resourceGroupName, forceDeletionTypes, null, cancellationToken).ConfigureAwait(false)).Dispose();
using (var _result = await operations.DeleteWithHttpMessagesAsync(resourceGroupName, forceDeletionTypes, null, cancellationToken).ConfigureAwait(false))
{
return _result.Headers;
}
}
/// <summary>
/// Gets a resource group.
@ -278,9 +281,9 @@ namespace Microsoft.Azure.Management.Resources
/// is supported:
/// forceDeletionTypes=Microsoft.Compute/virtualMachines,Microsoft.Compute/virtualMachineScaleSets
/// </param>
public static void BeginDelete(this IResourceGroupsOperations operations, string resourceGroupName, string forceDeletionTypes = default(string))
public static ResourceGroupsDeleteHeaders BeginDelete(this IResourceGroupsOperations operations, string resourceGroupName, string forceDeletionTypes = default(string))
{
((IResourceGroupsOperations)operations).BeginDeleteAsync(resourceGroupName, forceDeletionTypes).GetAwaiter().GetResult();
return ((IResourceGroupsOperations)operations).BeginDeleteAsync(resourceGroupName, forceDeletionTypes).GetAwaiter().GetResult();
}
/// <summary>
@ -302,9 +305,12 @@ namespace Microsoft.Azure.Management.Resources
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task BeginDeleteAsync(this IResourceGroupsOperations operations, string resourceGroupName, string forceDeletionTypes = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
public static async System.Threading.Tasks.Task<ResourceGroupsDeleteHeaders> BeginDeleteAsync(this IResourceGroupsOperations operations, string resourceGroupName, string forceDeletionTypes = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
(await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, forceDeletionTypes, null, cancellationToken).ConfigureAwait(false)).Dispose();
using (var _result = await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, forceDeletionTypes, null, cancellationToken).ConfigureAwait(false))
{
return _result.Headers;
}
}
/// <summary>
/// Captures the specified resource group as a template.

Просмотреть файл

@ -336,7 +336,7 @@ namespace Microsoft.Azure.Management.Resources
this.Tags = new TagsOperations(this);
this.DeploymentOperations = new DeploymentOperations(this);
this.BaseUri = new System.Uri("https://management.azure.com");
this.ApiVersion = "2021-04-01";
this.ApiVersion = "2024-07-01";
this.AcceptLanguage = "en-US";
this.LongRunningOperationRetryTimeout = 30;
this.GenerateClientRequestId = true;

Просмотреть файл

@ -1087,206 +1087,13 @@ namespace Microsoft.Azure.Management.Resources
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="Microsoft.Rest.Azure.CloudException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
/// <exception cref="System.ArgumentNullException">
/// Thrown when a required parameter is null
/// </exception>
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<TagsResource>> CreateOrUpdateAtScopeWithHttpMessagesAsync(string scope, TagsResource parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
public async System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<TagsResource,TagsCreateOrUpdateAtScopeHeaders>> CreateOrUpdateAtScopeWithHttpMessagesAsync(string scope, TagsResource parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
if (parameters == null)
{
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters");
}
if (parameters != null)
{
parameters.Validate();
}
if (scope == null)
{
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "scope");
}
if (this.Client.ApiVersion == null)
{
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
// Tracing
bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
string _invocationId = null;
if (_shouldTrace)
{
_invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString();
System.Collections.Generic.Dictionary<string, object> tracingParameters = new System.Collections.Generic.Dictionary<string, object>();
tracingParameters.Add("scope", scope);
tracingParameters.Add("parameters", parameters);
tracingParameters.Add("cancellationToken", cancellationToken);
Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateAtScope", tracingParameters);
}
// Construct URL
var _baseUrl = this.Client.BaseUri.AbsoluteUri;
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{scope}/providers/Microsoft.Resources/tags/default").ToString();
_url = _url.Replace("{scope}", scope);
System.Collections.Generic.List<string> _queryParameters = new System.Collections.Generic.List<string>();
if (this.Client.ApiVersion != null)
{
_queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion)));
}
if (_queryParameters.Count > 0)
{
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
var _httpRequest = new System.Net.Http.HttpRequestMessage();
System.Net.Http.HttpResponseMessage _httpResponse = null;
_httpRequest.Method = new System.Net.Http.HttpMethod("PUT");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value)
{
_httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
}
if (this.Client.AcceptLanguage != null)
{
if (_httpRequest.Headers.Contains("accept-language"))
{
_httpRequest.Headers.Remove("accept-language");
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage);
}
if (customHeaders != null)
{
foreach(var _header in customHeaders)
{
if (_httpRequest.Headers.Contains(_header.Key))
{
_httpRequest.Headers.Remove(_header.Key);
}
_httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
}
}
// Serialize Request
string _requestContent = null;
if(parameters != null)
{
_requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings);
_httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8);
_httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
}
// Set Credentials
if (this.Client.Credentials != null)
{
cancellationToken.ThrowIfCancellationRequested();
await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
}
// Send Request
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
}
cancellationToken.ThrowIfCancellationRequested();
_httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
}
System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
if ((int)_statusCode != 200)
{
var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject<CloudError>(_responseContent, this.Client.DeserializationSettings);
if (_errorBody != null)
{
ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
catch (Newtonsoft.Json.JsonException)
{
// Ignore the exception
}
ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
if (_httpResponse.Headers.Contains("x-ms-request-id"))
{
ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
}
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
}
_httpRequest.Dispose();
if (_httpResponse != null)
{
_httpResponse.Dispose();
}
throw ex;
}
// Create Result
var _result = new Microsoft.Rest.Azure.AzureOperationResponse<TagsResource>();
_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 = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject<TagsResource>(_responseContent, this.Client.DeserializationSettings);
}
catch (Newtonsoft.Json.JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
{
_httpResponse.Dispose();
}
throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex);
}
}
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result);
}
return _result;
// Send Request
Microsoft.Rest.Azure.AzureOperationResponse<TagsResource,TagsCreateOrUpdateAtScopeHeaders> _response = await BeginCreateOrUpdateAtScopeWithHttpMessagesAsync(scope, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// This operation allows replacing, merging or selectively deleting tags on
/// the specified resource or subscription. The specified entity can have a
@ -1308,202 +1115,13 @@ namespace Microsoft.Azure.Management.Resources
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="Microsoft.Rest.Azure.CloudException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
/// <exception cref="System.ArgumentNullException">
/// Thrown when a required parameter is null
/// </exception>
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<TagsResource>> UpdateAtScopeWithHttpMessagesAsync(string scope, TagsPatchResource parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
public async System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<TagsResource,TagsUpdateAtScopeHeaders>> UpdateAtScopeWithHttpMessagesAsync(string scope, TagsPatchResource parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
if (parameters == null)
{
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters");
}
if (scope == null)
{
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "scope");
}
if (this.Client.ApiVersion == null)
{
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
// Tracing
bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
string _invocationId = null;
if (_shouldTrace)
{
_invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString();
System.Collections.Generic.Dictionary<string, object> tracingParameters = new System.Collections.Generic.Dictionary<string, object>();
tracingParameters.Add("scope", scope);
tracingParameters.Add("parameters", parameters);
tracingParameters.Add("cancellationToken", cancellationToken);
Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "UpdateAtScope", tracingParameters);
}
// Construct URL
var _baseUrl = this.Client.BaseUri.AbsoluteUri;
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{scope}/providers/Microsoft.Resources/tags/default").ToString();
_url = _url.Replace("{scope}", scope);
System.Collections.Generic.List<string> _queryParameters = new System.Collections.Generic.List<string>();
if (this.Client.ApiVersion != null)
{
_queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion)));
}
if (_queryParameters.Count > 0)
{
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
var _httpRequest = new System.Net.Http.HttpRequestMessage();
System.Net.Http.HttpResponseMessage _httpResponse = null;
_httpRequest.Method = new System.Net.Http.HttpMethod("PATCH");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value)
{
_httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
}
if (this.Client.AcceptLanguage != null)
{
if (_httpRequest.Headers.Contains("accept-language"))
{
_httpRequest.Headers.Remove("accept-language");
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage);
}
if (customHeaders != null)
{
foreach(var _header in customHeaders)
{
if (_httpRequest.Headers.Contains(_header.Key))
{
_httpRequest.Headers.Remove(_header.Key);
}
_httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
}
}
// Serialize Request
string _requestContent = null;
if(parameters != null)
{
_requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings);
_httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8);
_httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
}
// Set Credentials
if (this.Client.Credentials != null)
{
cancellationToken.ThrowIfCancellationRequested();
await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
}
// Send Request
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
}
cancellationToken.ThrowIfCancellationRequested();
_httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
}
System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
if ((int)_statusCode != 200)
{
var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject<CloudError>(_responseContent, this.Client.DeserializationSettings);
if (_errorBody != null)
{
ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
catch (Newtonsoft.Json.JsonException)
{
// Ignore the exception
}
ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
if (_httpResponse.Headers.Contains("x-ms-request-id"))
{
ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
}
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
}
_httpRequest.Dispose();
if (_httpResponse != null)
{
_httpResponse.Dispose();
}
throw ex;
}
// Create Result
var _result = new Microsoft.Rest.Azure.AzureOperationResponse<TagsResource>();
_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 = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject<TagsResource>(_responseContent, this.Client.DeserializationSettings);
}
catch (Newtonsoft.Json.JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
{
_httpResponse.Dispose();
}
throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex);
}
}
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result);
}
return _result;
// Send Request
Microsoft.Rest.Azure.AzureOperationResponse<TagsResource,TagsUpdateAtScopeHeaders> _response = await BeginUpdateAtScopeWithHttpMessagesAsync(scope, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// Gets the entire set of tags on a resource or subscription.
/// </summary>
@ -1700,6 +1318,485 @@ namespace Microsoft.Azure.Management.Resources
}
/// <summary>
/// Deletes the entire set of tags on a resource or subscription.
/// </summary>
/// <param name='scope'>
/// The resource scope.
/// </param>
/// <param name='customHeaders'>
/// Headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public async System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationHeaderResponse<TagsDeleteAtScopeHeaders>> DeleteAtScopeWithHttpMessagesAsync(string scope, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// Send Request
Microsoft.Rest.Azure.AzureOperationHeaderResponse<TagsDeleteAtScopeHeaders> _response = await BeginDeleteAtScopeWithHttpMessagesAsync(scope, customHeaders, cancellationToken).ConfigureAwait(false);
return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// This operation allows adding or replacing the entire set of tags on the
/// specified resource or subscription. The specified entity can have a maximum
/// of 50 tags.
/// </summary>
/// <param name='scope'>
/// The resource scope.
/// </param>
/// <param name='parameters'>
///
/// </param>
/// <param name='customHeaders'>
/// Headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="Microsoft.Rest.Azure.CloudException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
/// <exception cref="System.ArgumentNullException">
/// Thrown when a required parameter is null
/// </exception>
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<TagsResource,TagsCreateOrUpdateAtScopeHeaders>> BeginCreateOrUpdateAtScopeWithHttpMessagesAsync(string scope, TagsResource parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
if (parameters == null)
{
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters");
}
if (parameters != null)
{
parameters.Validate();
}
if (scope == null)
{
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "scope");
}
if (this.Client.ApiVersion == null)
{
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
// Tracing
bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
string _invocationId = null;
if (_shouldTrace)
{
_invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString();
System.Collections.Generic.Dictionary<string, object> tracingParameters = new System.Collections.Generic.Dictionary<string, object>();
tracingParameters.Add("scope", scope);
tracingParameters.Add("parameters", parameters);
tracingParameters.Add("cancellationToken", cancellationToken);
Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdateAtScope", tracingParameters);
}
// Construct URL
var _baseUrl = this.Client.BaseUri.AbsoluteUri;
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{scope}/providers/Microsoft.Resources/tags/default").ToString();
_url = _url.Replace("{scope}", scope);
System.Collections.Generic.List<string> _queryParameters = new System.Collections.Generic.List<string>();
if (this.Client.ApiVersion != null)
{
_queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion)));
}
if (_queryParameters.Count > 0)
{
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
var _httpRequest = new System.Net.Http.HttpRequestMessage();
System.Net.Http.HttpResponseMessage _httpResponse = null;
_httpRequest.Method = new System.Net.Http.HttpMethod("PUT");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value)
{
_httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
}
if (this.Client.AcceptLanguage != null)
{
if (_httpRequest.Headers.Contains("accept-language"))
{
_httpRequest.Headers.Remove("accept-language");
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage);
}
if (customHeaders != null)
{
foreach(var _header in customHeaders)
{
if (_httpRequest.Headers.Contains(_header.Key))
{
_httpRequest.Headers.Remove(_header.Key);
}
_httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
}
}
// Serialize Request
string _requestContent = null;
if(parameters != null)
{
_requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings);
_httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8);
_httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
}
// Set Credentials
if (this.Client.Credentials != null)
{
cancellationToken.ThrowIfCancellationRequested();
await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
}
// Send Request
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
}
cancellationToken.ThrowIfCancellationRequested();
_httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
}
System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
if ((int)_statusCode != 200 && (int)_statusCode != 202)
{
var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject<CloudError>(_responseContent, this.Client.DeserializationSettings);
if (_errorBody != null)
{
ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
catch (Newtonsoft.Json.JsonException)
{
// Ignore the exception
}
ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
if (_httpResponse.Headers.Contains("x-ms-request-id"))
{
ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
}
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
}
_httpRequest.Dispose();
if (_httpResponse != null)
{
_httpResponse.Dispose();
}
throw ex;
}
// Create Result
var _result = new Microsoft.Rest.Azure.AzureOperationResponse<TagsResource,TagsCreateOrUpdateAtScopeHeaders>();
_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 = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject<TagsResource>(_responseContent, this.Client.DeserializationSettings);
}
catch (Newtonsoft.Json.JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
{
_httpResponse.Dispose();
}
throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex);
}
}
try
{
_result.Headers = _httpResponse.GetHeadersAsJson().ToObject<TagsCreateOrUpdateAtScopeHeaders>(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings));
}
catch (Newtonsoft.Json.JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
{
_httpResponse.Dispose();
}
throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex);
}
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result);
}
return _result;
}
/// <summary>
/// This operation allows replacing, merging or selectively deleting tags on
/// the specified resource or subscription. The specified entity can have a
/// maximum of 50 tags at the end of the operation. The &#39;replace&#39; option
/// replaces the entire set of existing tags with a new set. The &#39;merge&#39; option
/// allows adding tags with new names and updating the values of tags with
/// existing names. The &#39;delete&#39; option allows selectively deleting tags based
/// on given names or name/value pairs.
/// </summary>
/// <param name='scope'>
/// The resource scope.
/// </param>
/// <param name='parameters'>
///
/// </param>
/// <param name='customHeaders'>
/// Headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="Microsoft.Rest.Azure.CloudException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
/// <exception cref="System.ArgumentNullException">
/// Thrown when a required parameter is null
/// </exception>
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<TagsResource,TagsUpdateAtScopeHeaders>> BeginUpdateAtScopeWithHttpMessagesAsync(string scope, TagsPatchResource parameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
if (parameters == null)
{
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters");
}
if (scope == null)
{
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "scope");
}
if (this.Client.ApiVersion == null)
{
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
// Tracing
bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
string _invocationId = null;
if (_shouldTrace)
{
_invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString();
System.Collections.Generic.Dictionary<string, object> tracingParameters = new System.Collections.Generic.Dictionary<string, object>();
tracingParameters.Add("scope", scope);
tracingParameters.Add("parameters", parameters);
tracingParameters.Add("cancellationToken", cancellationToken);
Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginUpdateAtScope", tracingParameters);
}
// Construct URL
var _baseUrl = this.Client.BaseUri.AbsoluteUri;
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{scope}/providers/Microsoft.Resources/tags/default").ToString();
_url = _url.Replace("{scope}", scope);
System.Collections.Generic.List<string> _queryParameters = new System.Collections.Generic.List<string>();
if (this.Client.ApiVersion != null)
{
_queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion)));
}
if (_queryParameters.Count > 0)
{
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
var _httpRequest = new System.Net.Http.HttpRequestMessage();
System.Net.Http.HttpResponseMessage _httpResponse = null;
_httpRequest.Method = new System.Net.Http.HttpMethod("PATCH");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value)
{
_httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
}
if (this.Client.AcceptLanguage != null)
{
if (_httpRequest.Headers.Contains("accept-language"))
{
_httpRequest.Headers.Remove("accept-language");
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage);
}
if (customHeaders != null)
{
foreach(var _header in customHeaders)
{
if (_httpRequest.Headers.Contains(_header.Key))
{
_httpRequest.Headers.Remove(_header.Key);
}
_httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
}
}
// Serialize Request
string _requestContent = null;
if(parameters != null)
{
_requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings);
_httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8);
_httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
}
// Set Credentials
if (this.Client.Credentials != null)
{
cancellationToken.ThrowIfCancellationRequested();
await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
}
// Send Request
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
}
cancellationToken.ThrowIfCancellationRequested();
_httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
}
System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
if ((int)_statusCode != 200 && (int)_statusCode != 202)
{
var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject<CloudError>(_responseContent, this.Client.DeserializationSettings);
if (_errorBody != null)
{
ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
catch (Newtonsoft.Json.JsonException)
{
// Ignore the exception
}
ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
if (_httpResponse.Headers.Contains("x-ms-request-id"))
{
ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
}
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
}
_httpRequest.Dispose();
if (_httpResponse != null)
{
_httpResponse.Dispose();
}
throw ex;
}
// Create Result
var _result = new Microsoft.Rest.Azure.AzureOperationResponse<TagsResource,TagsUpdateAtScopeHeaders>();
_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 = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject<TagsResource>(_responseContent, this.Client.DeserializationSettings);
}
catch (Newtonsoft.Json.JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
{
_httpResponse.Dispose();
}
throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex);
}
}
try
{
_result.Headers = _httpResponse.GetHeadersAsJson().ToObject<TagsUpdateAtScopeHeaders>(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings));
}
catch (Newtonsoft.Json.JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
{
_httpResponse.Dispose();
}
throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex);
}
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result);
}
return _result;
}
/// <summary>
/// Deletes the entire set of tags on a resource or subscription.
@ -1725,7 +1822,7 @@ namespace Microsoft.Azure.Management.Resources
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse> DeleteAtScopeWithHttpMessagesAsync(string scope, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
public async System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationHeaderResponse<TagsDeleteAtScopeHeaders>> BeginDeleteAtScopeWithHttpMessagesAsync(string scope, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
@ -1752,7 +1849,7 @@ namespace Microsoft.Azure.Management.Resources
tracingParameters.Add("cancellationToken", cancellationToken);
Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "DeleteAtScope", tracingParameters);
Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginDeleteAtScope", tracingParameters);
}
// Construct URL
@ -1823,7 +1920,7 @@ namespace Microsoft.Azure.Management.Resources
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
if ((int)_statusCode != 200)
if ((int)_statusCode != 200 && (int)_statusCode != 202)
{
var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
@ -1858,7 +1955,7 @@ namespace Microsoft.Azure.Management.Resources
throw ex;
}
// Create Result
var _result = new Microsoft.Rest.Azure.AzureOperationResponse();
var _result = new Microsoft.Rest.Azure.AzureOperationHeaderResponse<TagsDeleteAtScopeHeaders>();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
@ -1866,6 +1963,19 @@ namespace Microsoft.Azure.Management.Resources
{
_result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
}
try
{
_result.Headers = _httpResponse.GetHeadersAsJson().ToObject<TagsDeleteAtScopeHeaders>(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings));
}
catch (Newtonsoft.Json.JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
{
_httpResponse.Dispose();
}
throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex);
}
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result);

Просмотреть файл

@ -327,9 +327,9 @@ namespace Microsoft.Azure.Management.Resources
/// <param name='scope'>
/// The resource scope.
/// </param>
public static void DeleteAtScope(this ITagsOperations operations, string scope)
public static TagsDeleteAtScopeHeaders DeleteAtScope(this ITagsOperations operations, string scope)
{
((ITagsOperations)operations).DeleteAtScopeAsync(scope).GetAwaiter().GetResult();
return ((ITagsOperations)operations).DeleteAtScopeAsync(scope).GetAwaiter().GetResult();
}
/// <summary>
@ -344,9 +344,127 @@ namespace Microsoft.Azure.Management.Resources
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task DeleteAtScopeAsync(this ITagsOperations operations, string scope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
public static async System.Threading.Tasks.Task<TagsDeleteAtScopeHeaders> DeleteAtScopeAsync(this ITagsOperations operations, string scope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
(await operations.DeleteAtScopeWithHttpMessagesAsync(scope, null, cancellationToken).ConfigureAwait(false)).Dispose();
using (var _result = await operations.DeleteAtScopeWithHttpMessagesAsync(scope, null, cancellationToken).ConfigureAwait(false))
{
return _result.Headers;
}
}
/// <summary>
/// This operation allows adding or replacing the entire set of tags on the
/// specified resource or subscription. The specified entity can have a maximum
/// of 50 tags.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='scope'>
/// The resource scope.
/// </param>
public static TagsResource BeginCreateOrUpdateAtScope(this ITagsOperations operations, string scope, TagsResource parameters)
{
return ((ITagsOperations)operations).BeginCreateOrUpdateAtScopeAsync(scope, parameters).GetAwaiter().GetResult();
}
/// <summary>
/// This operation allows adding or replacing the entire set of tags on the
/// specified resource or subscription. The specified entity can have a maximum
/// of 50 tags.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='scope'>
/// The resource scope.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task<TagsResource> BeginCreateOrUpdateAtScopeAsync(this ITagsOperations operations, string scope, TagsResource parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
using (var _result = await operations.BeginCreateOrUpdateAtScopeWithHttpMessagesAsync(scope, parameters, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}
/// <summary>
/// This operation allows replacing, merging or selectively deleting tags on
/// the specified resource or subscription. The specified entity can have a
/// maximum of 50 tags at the end of the operation. The &#39;replace&#39; option
/// replaces the entire set of existing tags with a new set. The &#39;merge&#39; option
/// allows adding tags with new names and updating the values of tags with
/// existing names. The &#39;delete&#39; option allows selectively deleting tags based
/// on given names or name/value pairs.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='scope'>
/// The resource scope.
/// </param>
public static TagsResource BeginUpdateAtScope(this ITagsOperations operations, string scope, TagsPatchResource parameters)
{
return ((ITagsOperations)operations).BeginUpdateAtScopeAsync(scope, parameters).GetAwaiter().GetResult();
}
/// <summary>
/// This operation allows replacing, merging or selectively deleting tags on
/// the specified resource or subscription. The specified entity can have a
/// maximum of 50 tags at the end of the operation. The &#39;replace&#39; option
/// replaces the entire set of existing tags with a new set. The &#39;merge&#39; option
/// allows adding tags with new names and updating the values of tags with
/// existing names. The &#39;delete&#39; option allows selectively deleting tags based
/// on given names or name/value pairs.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='scope'>
/// The resource scope.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task<TagsResource> BeginUpdateAtScopeAsync(this ITagsOperations operations, string scope, TagsPatchResource parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
using (var _result = await operations.BeginUpdateAtScopeWithHttpMessagesAsync(scope, parameters, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}
/// <summary>
/// Deletes the entire set of tags on a resource or subscription.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='scope'>
/// The resource scope.
/// </param>
public static TagsDeleteAtScopeHeaders BeginDeleteAtScope(this ITagsOperations operations, string scope)
{
return ((ITagsOperations)operations).BeginDeleteAtScopeAsync(scope).GetAwaiter().GetResult();
}
/// <summary>
/// Deletes the entire set of tags on a resource or subscription.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='scope'>
/// The resource scope.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task<TagsDeleteAtScopeHeaders> BeginDeleteAtScopeAsync(this ITagsOperations operations, string scope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
using (var _result = await operations.BeginDeleteAtScopeWithHttpMessagesAsync(scope, null, cancellationToken).ConfigureAwait(false))
{
return _result.Headers;
}
}
/// <summary>
/// This operation performs a union of predefined tags, resource tags, resource

Просмотреть файл

@ -10,7 +10,7 @@ autorest --use:@autorest/powershell@4.x --tag=package-privatelinks-2020-05
autorest --use:@autorest/powershell@4.x --tag=package-subscriptions-2021-01
autorest --use:@autorest/powershell@4.x --tag=package-features-2021-07
autorest --use:@autorest/powershell@4.x --tag=package-deploymentscripts-2020-10
autorest --use:@autorest/powershell@4.x --tag=package-resources-2021-04
autorest --use:@autorest/powershell@4.x --tag=package-resources-2024-07
autorest --use:@autorest/powershell@4.x --tag=package-deploymentstacks-2024-03
autorest --use:@autorest/powershell@4.x --tag=package-templatespecs-2021-05
```
@ -31,7 +31,7 @@ license-header: MICROSOFT_MIT_NO_VERSION
## Configuration
```yaml
commit: 88cc082d66e2b481ed99a17d44edffaeb6254eec
commit: 44051823078bc61d1210c324faf6d12e409497b7
```
### Tag: package-deploymentscripts-2023-08
@ -47,13 +47,13 @@ suppressions:
reason: OperationsAPI will come from Resources
```
### Tag: package-resources-2021-04
### Tag: package-resources-2024-07
These settings apply only when `--tag=package-resources-2021-04` is specified on the command line.
These settings apply only when `--tag=package-resources-2024-07` is specified on the command line.
``` yaml $(tag) == 'package-resources-2021-04'
``` yaml $(tag) == 'package-resources-2024-07'
input-file:
- https://github.com/Azure/azure-rest-api-specs/tree/$(commit)/specification/resources/resource-manager/Microsoft.Resources/stable/2021-04-01/resources.json
- https://github.com/Azure/azure-rest-api-specs/tree/$(commit)/specification/resources/resource-manager/Microsoft.Resources/stable/2024-07-01/resources.json
```
### Tag: package-privatelinks-2020-05

Просмотреть файл

@ -59,19 +59,6 @@ namespace Microsoft.Azure.Management.Resources.Utility
throw new SerializationException("Unable to serialize template.", ex);
}
}
if (properties.Parameters is string parametersContent)
{
try
{
JObject templateParameters = JObject.Parse(parametersContent);
properties.Parameters = templateParameters["parameters"] ?? templateParameters;
}
catch (JsonException ex)
{
throw new SerializationException("Unable to serialize template parameters.", ex);
}
}
}
}
}

Просмотреть файл

@ -3,7 +3,7 @@
# and copy these new set of files to the main Generated folder. This way exisiting files will not be deleted.
# Generate package with resources tag
# Start-AutoRestCodeGeneration -ResourceProvider "resources/resource-manager" -SdkRepoRootPath "$PSScriptRoot\..\..\..\.." -AutoRestVersion "v2" -AutoRestCodeGenerationFlags "--tag=package-resources-2021-04" -SdkGenerationDirectory "$PSScriptRoot\Generated\Resources"
# Start-AutoRestCodeGeneration -ResourceProvider "resources/resource-manager" -SdkRepoRootPath "$PSScriptRoot\..\..\..\.." -AutoRestVersion "v2" -AutoRestCodeGenerationFlags "--tag=package-resources-2024-07" -SdkGenerationDirectory "$PSScriptRoot\Generated\Resources"
# Generate package with templatespecs tag
# Start-AutoRestCodeGeneration -ResourceProvider "resources/resource-manager" -SdkRepoRootPath "$PSScriptRoot\..\..\..\.." -AutoRestVersion "v2" -AutoRestCodeGenerationFlags "--tag=package-templatespecs-2021-05" -SdkGenerationDirectory "$PSScriptRoot\Generated\TemplateSpecs"

Просмотреть файл

@ -310,7 +310,12 @@ namespace Microsoft.Azure.Commands.Resources.Test.Models
.Returns(Task.Factory.StartNew(() =>
{
var result = CreateAzureOperationResponse(new DeploymentValidateResult{});
var result = new AzureOperationResponse<object>()
{
Body = new DeploymentExtended
{
}
};
result.Response = new System.Net.Http.HttpResponseMessage();
result.Response.StatusCode = HttpStatusCode.OK;
@ -353,9 +358,9 @@ namespace Microsoft.Azure.Commands.Resources.Test.Models
null,
new CancellationToken()))
.Returns(Task.Factory.StartNew(() =>
new AzureOperationResponse<DeploymentValidateResult>()
new AzureOperationResponse<object>()
{
Body = new DeploymentValidateResult
Body = new DeploymentExtended
{
}
}))
@ -545,9 +550,9 @@ namespace Microsoft.Azure.Commands.Resources.Test.Models
null,
new CancellationToken()))
.Returns(Task.Factory.StartNew(() =>
new AzureOperationResponse<DeploymentValidateResult>()
new AzureOperationResponse<object>()
{
Body = new DeploymentValidateResult
Body = new DeploymentExtended
{
}
}));
@ -747,9 +752,12 @@ namespace Microsoft.Azure.Commands.Resources.Test.Models
}));
deploymentsMock.Setup(f => f.ValidateWithHttpMessagesAsync(resourceGroupName, It.IsAny<string>(), It.IsAny<Deployment>(), null, new CancellationToken()))
.Returns(Task.Factory.StartNew(() => CreateAzureOperationResponse(new DeploymentValidateResult
{
})))
.Returns(Task.Factory.StartNew(() => new AzureOperationResponse<object>()
{
Body = new DeploymentExtended
{
}
}))
.Callback((string rg, string dn, Deployment d, Dictionary<string, List<string>> customHeaders, CancellationToken c) => { deploymentFromValidate = d; });
deploymentsMock.Setup(f => f.CheckExistenceWithHttpMessagesAsync(
It.IsAny<string>(),
@ -834,7 +842,7 @@ namespace Microsoft.Azure.Commands.Resources.Test.Models
mode: DeploymentMode.Incremental,
provisioningState: "Succeeded")))));
deploymentsMock.Setup(f => f.ValidateWithHttpMessagesAsync(resourceGroupName, It.IsAny<string>(), It.IsAny<Deployment>(), null, new CancellationToken()))
.Returns(Task.Factory.StartNew(() => CreateAzureOperationResponse(new DeploymentValidateResult{})))
.Returns(Task.Factory.StartNew(() => CreateAzureOperationResponse(new object{})))
.Callback((string resourceGroup, string deployment, Deployment d, Dictionary<string, List<string>> customHeaders, CancellationToken c) => { deploymentFromValidate = d; });
SetupListForResourceGroupAsync(resourceGroupparameters.ResourceGroupName, new List<GenericResourceExpanded>() {
CreateGenericResource(null, null, "website") });
@ -950,9 +958,9 @@ namespace Microsoft.Azure.Commands.Resources.Test.Models
null,
new CancellationToken()))
.Returns(Task.Factory.StartNew(() =>
new AzureOperationResponse<DeploymentValidateResult>()
new AzureOperationResponse<object>()
{
Body = new DeploymentValidateResult {}
Body = new object {}
}
))
.Callback((string rg, string dn, Deployment d, Dictionary<string, List<string>> customHeaders,
@ -1113,7 +1121,7 @@ namespace Microsoft.Azure.Commands.Resources.Test.Models
}));
resourceGroupMock.Setup(f => f.DeleteWithHttpMessagesAsync(resourceGroupName, null, null, new CancellationToken()))
.Returns(Task.Factory.StartNew(() => new Rest.Azure.AzureOperationResponse()));
.Returns(Task.Factory.StartNew(() => new Rest.Azure.AzureOperationHeaderResponse<ResourceGroupsDeleteHeaders>()));
resourcesClient.DeleteResourceGroup(resourceGroupName);

Просмотреть файл

@ -19,6 +19,7 @@
-->
## Upcoming Release
* Updated Resources SDK to 2024-07-01.
## Version 7.6.0
* Fixed customer-reported `Remove-AzPolicyAssignment` behavior.

Просмотреть файл

@ -122,7 +122,7 @@ try {
npx autorest --use:@autorest/powershell@4.x --tag=package-subscriptions-2021-01
npx autorest --use:@autorest/powershell@4.x --tag=package-features-2021-07
npx autorest --use:@autorest/powershell@4.x --tag=package-deploymentscripts-2020-10
npx autorest --use:@autorest/powershell@4.x --tag=package-resources-2021-04
npx autorest --use:@autorest/powershell@4.x --tag=package-resources-2024-07
npx autorest --use:@autorest/powershell@4.x --tag=package-deploymentstacks-2024-03
npx autorest --use:@autorest/powershell@4.x --tag=package-templatespecs-2021-05
}