diff --git a/eng/mgmt/mgmtmetadata/resources_resource-manager.txt b/eng/mgmt/mgmtmetadata/resources_resource-manager.txt
index f097b029d036..d55949d2a1ab 100644
--- a/eng/mgmt/mgmtmetadata/resources_resource-manager.txt
+++ b/eng/mgmt/mgmtmetadata/resources_resource-manager.txt
@@ -3,12 +3,12 @@ AutoRest installed successfully.
Commencing code generation
Generating CSharp code
Executing AutoRest command
-cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/resources/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --tag=package-resources-2019-07 --csharp.output-folder=C:\Users\shenglol\Repos\azure-sdk-for-net\sdk\resources\Microsoft.Azure.Management.Resource\src\Generated
-2019-10-03 16:51:32 UTC
+cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/resources/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --tag=package-resources-2019-07 --csharp.output-folder=C:\Workspace\Git\azure-sdk-for-net\sdk\resources\Microsoft.Azure.Management.Resource\src\Generated
+2019-11-07 03:39:41 UTC
Azure-rest-api-specs repository information
GitHub fork: Azure
Branch: master
-Commit: 3925d64d456fa2dc5b4e0d0ce595f679734ee6a8
+Commit: 46b5a95624cca6234e371c100935e02e54437953
AutoRest information
Requested version: latest
-Bootstrapper version: autorest@2.0.4283
+Bootstrapper version: autorest@2.0.4407
diff --git a/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/DeploymentScriptsClient.cs b/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/DeploymentScriptsClient.cs
new file mode 100644
index 000000000000..3e5c8cba8baa
--- /dev/null
+++ b/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/DeploymentScriptsClient.cs
@@ -0,0 +1,363 @@
+//
+// 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.ResourceManager
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Microsoft.Rest.Serialization;
+ using Models;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Net;
+ using System.Net.Http;
+
+ ///
+ /// The APIs listed in this specification can be used to manage Deployment
+ /// Scripts resource through the Azure Resource Manager.
+ ///
+ public partial class DeploymentScriptsClient : ServiceClient, IDeploymentScriptsClient, IAzureClient
+ {
+ ///
+ /// The base URI of the service.
+ ///
+ public System.Uri BaseUri { get; set; }
+
+ ///
+ /// Gets or sets json serialization settings.
+ ///
+ public JsonSerializerSettings SerializationSettings { get; private set; }
+
+ ///
+ /// Gets or sets json deserialization settings.
+ ///
+ public JsonSerializerSettings DeserializationSettings { get; private set; }
+
+ ///
+ /// Credentials needed for the client to connect to Azure.
+ ///
+ public ServiceClientCredentials Credentials { get; private set; }
+
+ ///
+ /// Subscription Id which forms part of the URI for every service call.
+ ///
+ public string SubscriptionId { get; set; }
+
+ ///
+ /// Client Api version.
+ ///
+ public string ApiVersion { get; private set; }
+
+ ///
+ /// The preferred language for the response.
+ ///
+ public string AcceptLanguage { get; set; }
+
+ ///
+ /// The retry timeout in seconds for Long Running Operations. Default value is
+ /// 30.
+ ///
+ public int? LongRunningOperationRetryTimeout { get; set; }
+
+ ///
+ /// Whether a unique x-ms-client-request-id should be generated. When set to
+ /// true a unique x-ms-client-request-id value is generated and included in
+ /// each request. Default is true.
+ ///
+ public bool? GenerateClientRequestId { get; set; }
+
+ ///
+ /// Gets the IDeploymentScriptsOperations.
+ ///
+ public virtual IDeploymentScriptsOperations DeploymentScripts { get; private set; }
+
+ ///
+ /// Initializes a new instance of the DeploymentScriptsClient class.
+ ///
+ ///
+ /// HttpClient to be used
+ ///
+ ///
+ /// True: will dispose the provided httpClient on calling DeploymentScriptsClient.Dispose(). False: will not dispose provided httpClient
+ protected DeploymentScriptsClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient)
+ {
+ Initialize();
+ }
+
+ ///
+ /// Initializes a new instance of the DeploymentScriptsClient class.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ protected DeploymentScriptsClient(params DelegatingHandler[] handlers) : base(handlers)
+ {
+ Initialize();
+ }
+
+ ///
+ /// Initializes a new instance of the DeploymentScriptsClient class.
+ ///
+ ///
+ /// Optional. The http client handler used to handle http transport.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ protected DeploymentScriptsClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers)
+ {
+ Initialize();
+ }
+
+ ///
+ /// Initializes a new instance of the DeploymentScriptsClient class.
+ ///
+ ///
+ /// Optional. The base URI of the service.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ protected DeploymentScriptsClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers)
+ {
+ if (baseUri == null)
+ {
+ throw new System.ArgumentNullException("baseUri");
+ }
+ BaseUri = baseUri;
+ }
+
+ ///
+ /// Initializes a new instance of the DeploymentScriptsClient class.
+ ///
+ ///
+ /// Optional. The base URI of the service.
+ ///
+ ///
+ /// Optional. The http client handler used to handle http transport.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ protected DeploymentScriptsClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)
+ {
+ if (baseUri == null)
+ {
+ throw new System.ArgumentNullException("baseUri");
+ }
+ BaseUri = baseUri;
+ }
+
+ ///
+ /// Initializes a new instance of the DeploymentScriptsClient class.
+ ///
+ ///
+ /// Required. Credentials needed for the client to connect to Azure.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ public DeploymentScriptsClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers)
+ {
+ if (credentials == null)
+ {
+ throw new System.ArgumentNullException("credentials");
+ }
+ Credentials = credentials;
+ if (Credentials != null)
+ {
+ Credentials.InitializeServiceClient(this);
+ }
+ }
+
+ ///
+ /// Initializes a new instance of the DeploymentScriptsClient class.
+ ///
+ ///
+ /// Required. Credentials needed for the client to connect to Azure.
+ ///
+ ///
+ /// HttpClient to be used
+ ///
+ ///
+ /// True: will dispose the provided httpClient on calling DeploymentScriptsClient.Dispose(). False: will not dispose provided httpClient
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ public DeploymentScriptsClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient)
+ {
+ if (credentials == null)
+ {
+ throw new System.ArgumentNullException("credentials");
+ }
+ Credentials = credentials;
+ if (Credentials != null)
+ {
+ Credentials.InitializeServiceClient(this);
+ }
+ }
+
+ ///
+ /// Initializes a new instance of the DeploymentScriptsClient class.
+ ///
+ ///
+ /// Required. Credentials needed for the client to connect to Azure.
+ ///
+ ///
+ /// Optional. The http client handler used to handle http transport.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ public DeploymentScriptsClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)
+ {
+ if (credentials == null)
+ {
+ throw new System.ArgumentNullException("credentials");
+ }
+ Credentials = credentials;
+ if (Credentials != null)
+ {
+ Credentials.InitializeServiceClient(this);
+ }
+ }
+
+ ///
+ /// Initializes a new instance of the DeploymentScriptsClient class.
+ ///
+ ///
+ /// Optional. The base URI of the service.
+ ///
+ ///
+ /// Required. Credentials needed for the client to connect to Azure.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ public DeploymentScriptsClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers)
+ {
+ if (baseUri == null)
+ {
+ throw new System.ArgumentNullException("baseUri");
+ }
+ if (credentials == null)
+ {
+ throw new System.ArgumentNullException("credentials");
+ }
+ BaseUri = baseUri;
+ Credentials = credentials;
+ if (Credentials != null)
+ {
+ Credentials.InitializeServiceClient(this);
+ }
+ }
+
+ ///
+ /// Initializes a new instance of the DeploymentScriptsClient class.
+ ///
+ ///
+ /// Optional. The base URI of the service.
+ ///
+ ///
+ /// Required. Credentials needed for the client to connect to Azure.
+ ///
+ ///
+ /// Optional. The http client handler used to handle http transport.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ public DeploymentScriptsClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)
+ {
+ if (baseUri == null)
+ {
+ throw new System.ArgumentNullException("baseUri");
+ }
+ if (credentials == null)
+ {
+ throw new System.ArgumentNullException("credentials");
+ }
+ BaseUri = baseUri;
+ Credentials = credentials;
+ if (Credentials != null)
+ {
+ Credentials.InitializeServiceClient(this);
+ }
+ }
+
+ ///
+ /// An optional partial-method to perform custom initialization.
+ ///
+ partial void CustomInitialize();
+ ///
+ /// Initializes client properties.
+ ///
+ private void Initialize()
+ {
+ DeploymentScripts = new DeploymentScriptsOperations(this);
+ BaseUri = new System.Uri("https://management.azure.com");
+ ApiVersion = "2019-10-01-preview";
+ AcceptLanguage = "en-US";
+ LongRunningOperationRetryTimeout = 30;
+ GenerateClientRequestId = true;
+ SerializationSettings = new JsonSerializerSettings
+ {
+ Formatting = Newtonsoft.Json.Formatting.Indented,
+ DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
+ DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,
+ NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,
+ ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
+ ContractResolver = new ReadOnlyJsonContractResolver(),
+ Converters = new List
+ {
+ new Iso8601TimeSpanConverter()
+ }
+ };
+ SerializationSettings.Converters.Add(new TransformationJsonConverter());
+ DeserializationSettings = new JsonSerializerSettings
+ {
+ DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
+ DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,
+ NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,
+ ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
+ ContractResolver = new ReadOnlyJsonContractResolver(),
+ Converters = new List
+ {
+ new Iso8601TimeSpanConverter()
+ }
+ };
+ SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("kind"));
+ DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("kind"));
+ CustomInitialize();
+ DeserializationSettings.Converters.Add(new TransformationJsonConverter());
+ DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
+ }
+ }
+}
diff --git a/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/DeploymentScriptsOperations.cs b/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/DeploymentScriptsOperations.cs
new file mode 100644
index 000000000000..01f16f01bd9f
--- /dev/null
+++ b/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/DeploymentScriptsOperations.cs
@@ -0,0 +1,2088 @@
+//
+// 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.ResourceManager
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Net;
+ using System.Net.Http;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// DeploymentScriptsOperations operations.
+ ///
+ internal partial class DeploymentScriptsOperations : IServiceOperations, IDeploymentScriptsOperations
+ {
+ ///
+ /// Initializes a new instance of the DeploymentScriptsOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal DeploymentScriptsOperations(DeploymentScriptsClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the DeploymentScriptsClient
+ ///
+ public DeploymentScriptsClient Client { get; private set; }
+
+ ///
+ /// Creates a deployment script.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the deployment script.
+ ///
+ ///
+ /// Deployment script supplied to the operation.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> CreateWithHttpMessagesAsync(string resourceGroupName, string scriptName, DeploymentScript deploymentScript, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (scriptName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "scriptName");
+ }
+ if (scriptName != null)
+ {
+ if (scriptName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "scriptName", 90);
+ }
+ if (scriptName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "scriptName", 1);
+ }
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (deploymentScript == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "deploymentScript");
+ }
+ if (deploymentScript != null)
+ {
+ deploymentScript.Validate();
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("scriptName", scriptName);
+ tracingParameters.Add("deploymentScript", deploymentScript);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "Create", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentScripts/{scriptName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{scriptName}", System.Uri.EscapeDataString(scriptName));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("PUT");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ if(deploymentScript != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(deploymentScript, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200 && (int)_statusCode != 201)
+ {
+ var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 201)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Updates a deployment script.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the deployment script.
+ ///
+ ///
+ /// Updated deployment script supplied to the operation.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string scriptName, DeploymentScriptUpdateParameter deploymentScript = default(DeploymentScriptUpdateParameter), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (scriptName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "scriptName");
+ }
+ if (scriptName != null)
+ {
+ if (scriptName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "scriptName", 90);
+ }
+ if (scriptName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "scriptName", 1);
+ }
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("scriptName", scriptName);
+ tracingParameters.Add("deploymentScript", deploymentScript);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentScripts/{scriptName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{scriptName}", System.Uri.EscapeDataString(scriptName));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("PATCH");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ if(deploymentScript != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(deploymentScript, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Gets a deployment script with a given name.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the deployment script.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string scriptName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (scriptName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "scriptName");
+ }
+ if (scriptName != null)
+ {
+ if (scriptName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "scriptName", 90);
+ }
+ if (scriptName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "scriptName", 1);
+ }
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("scriptName", scriptName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentScripts/{scriptName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{scriptName}", System.Uri.EscapeDataString(scriptName));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Deletes a deployment script. When operation completes, status code 200
+ /// returned without content.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the deployment script.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string scriptName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (scriptName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "scriptName");
+ }
+ if (scriptName != null)
+ {
+ if (scriptName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "scriptName", 90);
+ }
+ if (scriptName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "scriptName", 1);
+ }
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("scriptName", scriptName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentScripts/{scriptName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{scriptName}", System.Uri.EscapeDataString(scriptName));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("DELETE");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200 && (int)_statusCode != 204)
+ {
+ var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Lists all deployment scripts for a given subscription.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListBySubscriptionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListBySubscription", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentScripts").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Gets deployment script logs for a given deployment script name.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the deployment script.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> GetLogsWithHttpMessagesAsync(string resourceGroupName, string scriptName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (scriptName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "scriptName");
+ }
+ if (scriptName != null)
+ {
+ if (scriptName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "scriptName", 90);
+ }
+ if (scriptName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "scriptName", 1);
+ }
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("scriptName", scriptName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "GetLogs", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentScripts/{scriptName}/logs").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{scriptName}", System.Uri.EscapeDataString(scriptName));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Gets deployment script logs for a given deployment script name.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the deployment script.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> GetLogsDefaultWithHttpMessagesAsync(string resourceGroupName, string scriptName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (scriptName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "scriptName");
+ }
+ if (scriptName != null)
+ {
+ if (scriptName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "scriptName", 90);
+ }
+ if (scriptName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "scriptName", 1);
+ }
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("scriptName", scriptName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "GetLogsDefault", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentScripts/{scriptName}/logs/default").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{scriptName}", System.Uri.EscapeDataString(scriptName));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Lists deployments scripts.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentScripts").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Lists all deployment scripts for a given subscription.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (nextPageLink == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("nextPageLink", nextPageLink);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListBySubscriptionNext", tracingParameters);
+ }
+ // Construct URL
+ string _url = "{nextLink}";
+ _url = _url.Replace("{nextLink}", nextPageLink);
+ List _queryParameters = new List();
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Lists deployments scripts.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (nextPageLink == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("nextPageLink", nextPageLink);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroupNext", tracingParameters);
+ }
+ // Construct URL
+ string _url = "{nextLink}";
+ _url = _url.Replace("{nextLink}", nextPageLink);
+ List _queryParameters = new List();
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ }
+}
diff --git a/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/DeploymentScriptsOperationsExtensions.cs b/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/DeploymentScriptsOperationsExtensions.cs
new file mode 100644
index 000000000000..8369fbef50a6
--- /dev/null
+++ b/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/DeploymentScriptsOperationsExtensions.cs
@@ -0,0 +1,406 @@
+//
+// 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.ResourceManager
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for DeploymentScriptsOperations.
+ ///
+ public static partial class DeploymentScriptsOperationsExtensions
+ {
+ ///
+ /// Creates a deployment script.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the deployment script.
+ ///
+ ///
+ /// Deployment script supplied to the operation.
+ ///
+ public static DeploymentScript Create(this IDeploymentScriptsOperations operations, string resourceGroupName, string scriptName, DeploymentScript deploymentScript)
+ {
+ return operations.CreateAsync(resourceGroupName, scriptName, deploymentScript).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Creates a deployment script.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the deployment script.
+ ///
+ ///
+ /// Deployment script supplied to the operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task CreateAsync(this IDeploymentScriptsOperations operations, string resourceGroupName, string scriptName, DeploymentScript deploymentScript, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, scriptName, deploymentScript, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Updates a deployment script.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the deployment script.
+ ///
+ ///
+ /// Updated deployment script supplied to the operation.
+ ///
+ public static DeploymentScript Update(this IDeploymentScriptsOperations operations, string resourceGroupName, string scriptName, DeploymentScriptUpdateParameter deploymentScript = default(DeploymentScriptUpdateParameter))
+ {
+ return operations.UpdateAsync(resourceGroupName, scriptName, deploymentScript).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Updates a deployment script.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the deployment script.
+ ///
+ ///
+ /// Updated deployment script supplied to the operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task UpdateAsync(this IDeploymentScriptsOperations operations, string resourceGroupName, string scriptName, DeploymentScriptUpdateParameter deploymentScript = default(DeploymentScriptUpdateParameter), CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, scriptName, deploymentScript, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Gets a deployment script with a given name.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the deployment script.
+ ///
+ public static DeploymentScript Get(this IDeploymentScriptsOperations operations, string resourceGroupName, string scriptName)
+ {
+ return operations.GetAsync(resourceGroupName, scriptName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets a deployment script with a given name.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the deployment script.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task GetAsync(this IDeploymentScriptsOperations operations, string resourceGroupName, string scriptName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, scriptName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Deletes a deployment script. When operation completes, status code 200
+ /// returned without content.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the deployment script.
+ ///
+ public static void Delete(this IDeploymentScriptsOperations operations, string resourceGroupName, string scriptName)
+ {
+ operations.DeleteAsync(resourceGroupName, scriptName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Deletes a deployment script. When operation completes, status code 200
+ /// returned without content.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the deployment script.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task DeleteAsync(this IDeploymentScriptsOperations operations, string resourceGroupName, string scriptName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, scriptName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ ///
+ /// Lists all deployment scripts for a given subscription.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ public static IPage ListBySubscription(this IDeploymentScriptsOperations operations)
+ {
+ return operations.ListBySubscriptionAsync().GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Lists all deployment scripts for a given subscription.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListBySubscriptionAsync(this IDeploymentScriptsOperations operations, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Gets deployment script logs for a given deployment script name.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the deployment script.
+ ///
+ public static ScriptLogsList GetLogs(this IDeploymentScriptsOperations operations, string resourceGroupName, string scriptName)
+ {
+ return operations.GetLogsAsync(resourceGroupName, scriptName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets deployment script logs for a given deployment script name.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the deployment script.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task GetLogsAsync(this IDeploymentScriptsOperations operations, string resourceGroupName, string scriptName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.GetLogsWithHttpMessagesAsync(resourceGroupName, scriptName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Gets deployment script logs for a given deployment script name.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the deployment script.
+ ///
+ public static ScriptLog GetLogsDefault(this IDeploymentScriptsOperations operations, string resourceGroupName, string scriptName)
+ {
+ return operations.GetLogsDefaultAsync(resourceGroupName, scriptName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets deployment script logs for a given deployment script name.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the deployment script.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task GetLogsDefaultAsync(this IDeploymentScriptsOperations operations, string resourceGroupName, string scriptName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.GetLogsDefaultWithHttpMessagesAsync(resourceGroupName, scriptName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Lists deployments scripts.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ public static IPage ListByResourceGroup(this IDeploymentScriptsOperations operations, string resourceGroupName)
+ {
+ return operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Lists deployments scripts.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListByResourceGroupAsync(this IDeploymentScriptsOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Lists all deployment scripts for a given subscription.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ public static IPage ListBySubscriptionNext(this IDeploymentScriptsOperations operations, string nextPageLink)
+ {
+ return operations.ListBySubscriptionNextAsync(nextPageLink).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Lists all deployment scripts for a given subscription.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListBySubscriptionNextAsync(this IDeploymentScriptsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListBySubscriptionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Lists deployments scripts.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ public static IPage ListByResourceGroupNext(this IDeploymentScriptsOperations operations, string nextPageLink)
+ {
+ return operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Lists deployments scripts.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListByResourceGroupNextAsync(this IDeploymentScriptsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ }
+}
diff --git a/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/IDeploymentScriptsClient.cs b/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/IDeploymentScriptsClient.cs
new file mode 100644
index 000000000000..1da53b5a95fc
--- /dev/null
+++ b/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/IDeploymentScriptsClient.cs
@@ -0,0 +1,79 @@
+//
+// 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.ResourceManager
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using Newtonsoft.Json;
+
+ ///
+ /// The APIs listed in this specification can be used to manage Deployment
+ /// Scripts resource through the Azure Resource Manager.
+ ///
+ public partial interface IDeploymentScriptsClient : System.IDisposable
+ {
+ ///
+ /// The base URI of the service.
+ ///
+ System.Uri BaseUri { get; set; }
+
+ ///
+ /// Gets or sets json serialization settings.
+ ///
+ JsonSerializerSettings SerializationSettings { get; }
+
+ ///
+ /// Gets or sets json deserialization settings.
+ ///
+ JsonSerializerSettings DeserializationSettings { get; }
+
+ ///
+ /// Credentials needed for the client to connect to Azure.
+ ///
+ ServiceClientCredentials Credentials { get; }
+
+ ///
+ /// Subscription Id which forms part of the URI for every service call.
+ ///
+ string SubscriptionId { get; set; }
+
+ ///
+ /// Client Api version.
+ ///
+ string ApiVersion { get; }
+
+ ///
+ /// The preferred language for the response.
+ ///
+ string AcceptLanguage { get; set; }
+
+ ///
+ /// The retry timeout in seconds for Long Running Operations. Default
+ /// value is 30.
+ ///
+ int? LongRunningOperationRetryTimeout { get; set; }
+
+ ///
+ /// Whether a unique x-ms-client-request-id should be generated. When
+ /// set to true a unique x-ms-client-request-id value is generated and
+ /// included in each request. Default is true.
+ ///
+ bool? GenerateClientRequestId { get; set; }
+
+
+ ///
+ /// Gets the IDeploymentScriptsOperations.
+ ///
+ IDeploymentScriptsOperations DeploymentScripts { get; }
+
+ }
+}
diff --git a/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/IDeploymentScriptsOperations.cs b/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/IDeploymentScriptsOperations.cs
new file mode 100644
index 000000000000..55e74deafb60
--- /dev/null
+++ b/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/IDeploymentScriptsOperations.cs
@@ -0,0 +1,266 @@
+//
+// 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.ResourceManager
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// DeploymentScriptsOperations operations.
+ ///
+ public partial interface IDeploymentScriptsOperations
+ {
+ ///
+ /// Creates a deployment script.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the deployment script.
+ ///
+ ///
+ /// Deployment script supplied to the operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> CreateWithHttpMessagesAsync(string resourceGroupName, string scriptName, DeploymentScript deploymentScript, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Updates a deployment script.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the deployment script.
+ ///
+ ///
+ /// Updated deployment script supplied to the operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string scriptName, DeploymentScriptUpdateParameter deploymentScript = default(DeploymentScriptUpdateParameter), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets a deployment script with a given name.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the deployment script.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string scriptName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes a deployment script. When operation completes, status code
+ /// 200 returned without content.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the deployment script.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task DeleteWithHttpMessagesAsync(string resourceGroupName, string scriptName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Lists all deployment scripts for a given subscription.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListBySubscriptionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets deployment script logs for a given deployment script name.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the deployment script.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> GetLogsWithHttpMessagesAsync(string resourceGroupName, string scriptName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets deployment script logs for a given deployment script name.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of the deployment script.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> GetLogsDefaultWithHttpMessagesAsync(string resourceGroupName, string scriptName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Lists deployments scripts.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Lists all deployment scripts for a given subscription.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Lists deployments scripts.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/AzureCliScript.cs b/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/AzureCliScript.cs
new file mode 100644
index 000000000000..b7666f5a00d1
--- /dev/null
+++ b/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/AzureCliScript.cs
@@ -0,0 +1,228 @@
+//
+// 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.ResourceManager.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Object model for the Azure CLI script.
+ ///
+ [Newtonsoft.Json.JsonObject("AzureCLI")]
+ [Rest.Serialization.JsonTransformation]
+ public partial class AzureCliScript : DeploymentScript
+ {
+ ///
+ /// Initializes a new instance of the AzureCliScript class.
+ ///
+ public AzureCliScript()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the AzureCliScript class.
+ ///
+ /// Managed identity to be used for this
+ /// deployment script. Currently, only user-assigned MSI is
+ /// supported.
+ /// The location of the ACI and the storage
+ /// account for the deployment script.
+ /// Interval for which the service
+ /// retains the script resource after it reaches a terminal state.
+ /// Resource will be deleted when this duration expires. Duration is
+ /// based on ISO 8601 pattern (for example P7D means one week).
+ /// Azure CLI module version to be
+ /// used.
+ /// String Id used to locate any resource on
+ /// Azure.
+ /// Name of this resource.
+ /// Type of this resource.
+ /// Resource tags.
+ /// The clean up preference when the
+ /// script execution gets in a terminal state. Default setting is
+ /// 'Always'. Possible values include: 'Always', 'OnSuccess',
+ /// 'OnExpiration'
+ /// State of the script execution. This
+ /// only appears in the response. Possible values include: 'Creating',
+ /// 'ProvisioningResources', 'Running', 'Succeeded', 'Failed',
+ /// 'Canceled', 'Expiring'
+ /// Contains the results of script
+ /// execution.
+ /// List of script outputs.
+ /// Uri for the script. This is the
+ /// entry point for the external script.
+ /// Supporting files for the
+ /// external script.
+ /// Script body.
+ /// Command line arguments to pass to the
+ /// script. Arguments are separated by spaces. ex: -Name blue*
+ /// -Location 'West US 2'
+ /// The environment variables to
+ /// pass over to the script.
+ /// Gets or sets how the deployment script
+ /// should be forced to execute even if the script resource has not
+ /// changed. Can be current time stamp or a GUID.
+ /// Maximum allowed script execution time
+ /// specified in ISO 8601 format. Default value is PT1H
+ public AzureCliScript(ManagedServiceIdentity identity, string location, System.TimeSpan retentionInterval, string azCliVersion, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string cleanupPreference = default(string), string provisioningState = default(string), ScriptStatus status = default(ScriptStatus), IDictionary outputs = default(IDictionary), string primaryScriptUri = default(string), IList supportingScriptUris = default(IList), string scriptContent = default(string), string arguments = default(string), IList environmentVariables = default(IList), string forceUpdateTag = default(string), System.TimeSpan? timeout = default(System.TimeSpan?))
+ : base(identity, location, id, name, type, tags)
+ {
+ CleanupPreference = cleanupPreference;
+ ProvisioningState = provisioningState;
+ Status = status;
+ Outputs = outputs;
+ PrimaryScriptUri = primaryScriptUri;
+ SupportingScriptUris = supportingScriptUris;
+ ScriptContent = scriptContent;
+ Arguments = arguments;
+ EnvironmentVariables = environmentVariables;
+ ForceUpdateTag = forceUpdateTag;
+ RetentionInterval = retentionInterval;
+ Timeout = timeout;
+ AzCliVersion = azCliVersion;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the clean up preference when the script execution gets
+ /// in a terminal state. Default setting is 'Always'. Possible values
+ /// include: 'Always', 'OnSuccess', 'OnExpiration'
+ ///
+ [JsonProperty(PropertyName = "properties.cleanupPreference")]
+ public string CleanupPreference { get; set; }
+
+ ///
+ /// Gets state of the script execution. This only appears in the
+ /// response. Possible values include: 'Creating',
+ /// 'ProvisioningResources', 'Running', 'Succeeded', 'Failed',
+ /// 'Canceled', 'Expiring'
+ ///
+ [JsonProperty(PropertyName = "properties.provisioningState")]
+ public string ProvisioningState { get; private set; }
+
+ ///
+ /// Gets contains the results of script execution.
+ ///
+ [JsonProperty(PropertyName = "properties.status")]
+ public ScriptStatus Status { get; private set; }
+
+ ///
+ /// Gets list of script outputs.
+ ///
+ [JsonProperty(PropertyName = "properties.outputs")]
+ public IDictionary Outputs { get; private set; }
+
+ ///
+ /// Gets or sets uri for the script. This is the entry point for the
+ /// external script.
+ ///
+ [JsonProperty(PropertyName = "properties.primaryScriptUri")]
+ public string PrimaryScriptUri { get; set; }
+
+ ///
+ /// Gets or sets supporting files for the external script.
+ ///
+ [JsonProperty(PropertyName = "properties.supportingScriptUris")]
+ public IList SupportingScriptUris { get; set; }
+
+ ///
+ /// Gets or sets script body.
+ ///
+ [JsonProperty(PropertyName = "properties.scriptContent")]
+ public string ScriptContent { get; set; }
+
+ ///
+ /// Gets or sets command line arguments to pass to the script.
+ /// Arguments are separated by spaces. ex: -Name blue* -Location 'West
+ /// US 2'
+ ///
+ [JsonProperty(PropertyName = "properties.arguments")]
+ public string Arguments { get; set; }
+
+ ///
+ /// Gets or sets the environment variables to pass over to the script.
+ ///
+ [JsonProperty(PropertyName = "properties.environmentVariables")]
+ public IList EnvironmentVariables { get; set; }
+
+ ///
+ /// Gets or sets how the deployment script should be forced to execute
+ /// even if the script resource has not changed. Can be current time
+ /// stamp or a GUID.
+ ///
+ [JsonProperty(PropertyName = "properties.forceUpdateTag")]
+ public string ForceUpdateTag { get; set; }
+
+ ///
+ /// Gets or sets interval for which the service retains the script
+ /// resource after it reaches a terminal state. Resource will be
+ /// deleted when this duration expires. Duration is based on ISO 8601
+ /// pattern (for example P7D means one week).
+ ///
+ [JsonProperty(PropertyName = "properties.retentionInterval")]
+ public System.TimeSpan RetentionInterval { get; set; }
+
+ ///
+ /// Gets or sets maximum allowed script execution time specified in ISO
+ /// 8601 format. Default value is PT1H
+ ///
+ [JsonProperty(PropertyName = "properties.timeout")]
+ public System.TimeSpan? Timeout { get; set; }
+
+ ///
+ /// Gets or sets azure CLI module version to be used.
+ ///
+ [JsonProperty(PropertyName = "properties.azCliVersion")]
+ public string AzCliVersion { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public override void Validate()
+ {
+ base.Validate();
+ if (AzCliVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "AzCliVersion");
+ }
+ if (ScriptContent != null)
+ {
+ if (ScriptContent.Length > 32000)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "ScriptContent", 32000);
+ }
+ }
+ if (EnvironmentVariables != null)
+ {
+ foreach (var element in EnvironmentVariables)
+ {
+ if (element != null)
+ {
+ element.Validate();
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/AzurePowerShellScript.cs b/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/AzurePowerShellScript.cs
new file mode 100644
index 000000000000..c8a40c0e7fc8
--- /dev/null
+++ b/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/AzurePowerShellScript.cs
@@ -0,0 +1,228 @@
+//
+// 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.ResourceManager.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Object model for the Azure PowerShell script.
+ ///
+ [Newtonsoft.Json.JsonObject("AzurePowerShell")]
+ [Rest.Serialization.JsonTransformation]
+ public partial class AzurePowerShellScript : DeploymentScript
+ {
+ ///
+ /// Initializes a new instance of the AzurePowerShellScript class.
+ ///
+ public AzurePowerShellScript()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the AzurePowerShellScript class.
+ ///
+ /// Managed identity to be used for this
+ /// deployment script. Currently, only user-assigned MSI is
+ /// supported.
+ /// The location of the ACI and the storage
+ /// account for the deployment script.
+ /// Interval for which the service
+ /// retains the script resource after it reaches a terminal state.
+ /// Resource will be deleted when this duration expires. Duration is
+ /// based on ISO 8601 pattern (for example P7D means one week).
+ /// Azure PowerShell module version
+ /// to be used.
+ /// String Id used to locate any resource on
+ /// Azure.
+ /// Name of this resource.
+ /// Type of this resource.
+ /// Resource tags.
+ /// The clean up preference when the
+ /// script execution gets in a terminal state. Default setting is
+ /// 'Always'. Possible values include: 'Always', 'OnSuccess',
+ /// 'OnExpiration'
+ /// State of the script execution. This
+ /// only appears in the response. Possible values include: 'Creating',
+ /// 'ProvisioningResources', 'Running', 'Succeeded', 'Failed',
+ /// 'Canceled', 'Expiring'
+ /// Contains the results of script
+ /// execution.
+ /// List of script outputs.
+ /// Uri for the script. This is the
+ /// entry point for the external script.
+ /// Supporting files for the
+ /// external script.
+ /// Script body.
+ /// Command line arguments to pass to the
+ /// script. Arguments are separated by spaces. ex: -Name blue*
+ /// -Location 'West US 2'
+ /// The environment variables to
+ /// pass over to the script.
+ /// Gets or sets how the deployment script
+ /// should be forced to execute even if the script resource has not
+ /// changed. Can be current time stamp or a GUID.
+ /// Maximum allowed script execution time
+ /// specified in ISO 8601 format. Default value is PT1H
+ public AzurePowerShellScript(ManagedServiceIdentity identity, string location, System.TimeSpan retentionInterval, string azPowerShellVersion, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string cleanupPreference = default(string), string provisioningState = default(string), ScriptStatus status = default(ScriptStatus), IDictionary outputs = default(IDictionary), string primaryScriptUri = default(string), IList supportingScriptUris = default(IList), string scriptContent = default(string), string arguments = default(string), IList environmentVariables = default(IList), string forceUpdateTag = default(string), System.TimeSpan? timeout = default(System.TimeSpan?))
+ : base(identity, location, id, name, type, tags)
+ {
+ CleanupPreference = cleanupPreference;
+ ProvisioningState = provisioningState;
+ Status = status;
+ Outputs = outputs;
+ PrimaryScriptUri = primaryScriptUri;
+ SupportingScriptUris = supportingScriptUris;
+ ScriptContent = scriptContent;
+ Arguments = arguments;
+ EnvironmentVariables = environmentVariables;
+ ForceUpdateTag = forceUpdateTag;
+ RetentionInterval = retentionInterval;
+ Timeout = timeout;
+ AzPowerShellVersion = azPowerShellVersion;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the clean up preference when the script execution gets
+ /// in a terminal state. Default setting is 'Always'. Possible values
+ /// include: 'Always', 'OnSuccess', 'OnExpiration'
+ ///
+ [JsonProperty(PropertyName = "properties.cleanupPreference")]
+ public string CleanupPreference { get; set; }
+
+ ///
+ /// Gets state of the script execution. This only appears in the
+ /// response. Possible values include: 'Creating',
+ /// 'ProvisioningResources', 'Running', 'Succeeded', 'Failed',
+ /// 'Canceled', 'Expiring'
+ ///
+ [JsonProperty(PropertyName = "properties.provisioningState")]
+ public string ProvisioningState { get; private set; }
+
+ ///
+ /// Gets contains the results of script execution.
+ ///
+ [JsonProperty(PropertyName = "properties.status")]
+ public ScriptStatus Status { get; private set; }
+
+ ///
+ /// Gets list of script outputs.
+ ///
+ [JsonProperty(PropertyName = "properties.outputs")]
+ public IDictionary Outputs { get; private set; }
+
+ ///
+ /// Gets or sets uri for the script. This is the entry point for the
+ /// external script.
+ ///
+ [JsonProperty(PropertyName = "properties.primaryScriptUri")]
+ public string PrimaryScriptUri { get; set; }
+
+ ///
+ /// Gets or sets supporting files for the external script.
+ ///
+ [JsonProperty(PropertyName = "properties.supportingScriptUris")]
+ public IList SupportingScriptUris { get; set; }
+
+ ///
+ /// Gets or sets script body.
+ ///
+ [JsonProperty(PropertyName = "properties.scriptContent")]
+ public string ScriptContent { get; set; }
+
+ ///
+ /// Gets or sets command line arguments to pass to the script.
+ /// Arguments are separated by spaces. ex: -Name blue* -Location 'West
+ /// US 2'
+ ///
+ [JsonProperty(PropertyName = "properties.arguments")]
+ public string Arguments { get; set; }
+
+ ///
+ /// Gets or sets the environment variables to pass over to the script.
+ ///
+ [JsonProperty(PropertyName = "properties.environmentVariables")]
+ public IList EnvironmentVariables { get; set; }
+
+ ///
+ /// Gets or sets how the deployment script should be forced to execute
+ /// even if the script resource has not changed. Can be current time
+ /// stamp or a GUID.
+ ///
+ [JsonProperty(PropertyName = "properties.forceUpdateTag")]
+ public string ForceUpdateTag { get; set; }
+
+ ///
+ /// Gets or sets interval for which the service retains the script
+ /// resource after it reaches a terminal state. Resource will be
+ /// deleted when this duration expires. Duration is based on ISO 8601
+ /// pattern (for example P7D means one week).
+ ///
+ [JsonProperty(PropertyName = "properties.retentionInterval")]
+ public System.TimeSpan RetentionInterval { get; set; }
+
+ ///
+ /// Gets or sets maximum allowed script execution time specified in ISO
+ /// 8601 format. Default value is PT1H
+ ///
+ [JsonProperty(PropertyName = "properties.timeout")]
+ public System.TimeSpan? Timeout { get; set; }
+
+ ///
+ /// Gets or sets azure PowerShell module version to be used.
+ ///
+ [JsonProperty(PropertyName = "properties.azPowerShellVersion")]
+ public string AzPowerShellVersion { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public override void Validate()
+ {
+ base.Validate();
+ if (AzPowerShellVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "AzPowerShellVersion");
+ }
+ if (ScriptContent != null)
+ {
+ if (ScriptContent.Length > 32000)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "ScriptContent", 32000);
+ }
+ }
+ if (EnvironmentVariables != null)
+ {
+ foreach (var element in EnvironmentVariables)
+ {
+ if (element != null)
+ {
+ element.Validate();
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/AzureResourceBase.cs b/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/AzureResourceBase.cs
new file mode 100644
index 000000000000..3a9a350d4ac6
--- /dev/null
+++ b/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/AzureResourceBase.cs
@@ -0,0 +1,70 @@
+//
+// 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.ResourceManager.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Common properties for all Azure resources.
+ ///
+ public partial class AzureResourceBase : IResource
+ {
+ ///
+ /// Initializes a new instance of the AzureResourceBase class.
+ ///
+ public AzureResourceBase()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the AzureResourceBase class.
+ ///
+ /// String Id used to locate any resource on
+ /// Azure.
+ /// Name of this resource.
+ /// Type of this resource.
+ public AzureResourceBase(string id = default(string), string name = default(string), string type = default(string))
+ {
+ Id = id;
+ Name = name;
+ Type = type;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets string Id used to locate any resource on Azure.
+ ///
+ [JsonProperty(PropertyName = "id")]
+ public string Id { get; private set; }
+
+ ///
+ /// Gets name of this resource.
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; private set; }
+
+ ///
+ /// Gets type of this resource.
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public string Type { get; private set; }
+
+ }
+}
diff --git a/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/CleanupOptions.cs b/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/CleanupOptions.cs
new file mode 100644
index 000000000000..77c061d76a39
--- /dev/null
+++ b/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/CleanupOptions.cs
@@ -0,0 +1,23 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.ResourceManager.Models
+{
+
+ ///
+ /// Defines values for CleanupOptions.
+ ///
+ public static class CleanupOptions
+ {
+ public const string Always = "Always";
+ public const string OnSuccess = "OnSuccess";
+ public const string OnExpiration = "OnExpiration";
+ }
+}
diff --git a/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/DefaultErrorResponse.cs b/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/DefaultErrorResponse.cs
new file mode 100644
index 000000000000..2e1af995714a
--- /dev/null
+++ b/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/DefaultErrorResponse.cs
@@ -0,0 +1,79 @@
+//
+// 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.ResourceManager.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// The details of the error.
+ ///
+ public partial class DefaultErrorResponse
+ {
+ ///
+ /// Initializes a new instance of the DefaultErrorResponse class.
+ ///
+ public DefaultErrorResponse()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the DefaultErrorResponse class.
+ ///
+ /// One of a server-defined set of error
+ /// codes.
+ /// A human-readable representation of the
+ /// error.
+ /// The target of the particular error.
+ /// Detailed errors.
+ public DefaultErrorResponse(string code = default(string), string message = default(string), string target = default(string), IList details = default(IList))
+ {
+ Code = code;
+ Message = message;
+ Target = target;
+ Details = details;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets one of a server-defined set of error codes.
+ ///
+ [JsonProperty(PropertyName = "code")]
+ public string Code { get; set; }
+
+ ///
+ /// Gets or sets a human-readable representation of the error.
+ ///
+ [JsonProperty(PropertyName = "message")]
+ public string Message { get; set; }
+
+ ///
+ /// Gets or sets the target of the particular error.
+ ///
+ [JsonProperty(PropertyName = "target")]
+ public string Target { get; set; }
+
+ ///
+ /// Gets or sets detailed errors.
+ ///
+ [JsonProperty(PropertyName = "details")]
+ public IList Details { get; set; }
+
+ }
+}
diff --git a/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/DefaultErrorResponseException.cs b/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/DefaultErrorResponseException.cs
new file mode 100644
index 000000000000..e7d50ed88361
--- /dev/null
+++ b/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/DefaultErrorResponseException.cs
@@ -0,0 +1,62 @@
+//
+// 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.ResourceManager.Models
+{
+ using Microsoft.Rest;
+
+ ///
+ /// Exception thrown for an invalid response with DefaultErrorResponse
+ /// information.
+ ///
+ public partial class DefaultErrorResponseException : RestException
+ {
+ ///
+ /// Gets information about the associated HTTP request.
+ ///
+ public HttpRequestMessageWrapper Request { get; set; }
+
+ ///
+ /// Gets information about the associated HTTP response.
+ ///
+ public HttpResponseMessageWrapper Response { get; set; }
+
+ ///
+ /// Gets or sets the body object.
+ ///
+ public DefaultErrorResponse Body { get; set; }
+
+ ///
+ /// Initializes a new instance of the DefaultErrorResponseException class.
+ ///
+ public DefaultErrorResponseException()
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the DefaultErrorResponseException class.
+ ///
+ /// The exception message.
+ public DefaultErrorResponseException(string message)
+ : this(message, null)
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the DefaultErrorResponseException class.
+ ///
+ /// The exception message.
+ /// Inner exception.
+ public DefaultErrorResponseException(string message, System.Exception innerException)
+ : base(message, innerException)
+ {
+ }
+ }
+}
diff --git a/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/DeploymentScript.cs b/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/DeploymentScript.cs
new file mode 100644
index 000000000000..823db062f3e6
--- /dev/null
+++ b/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/DeploymentScript.cs
@@ -0,0 +1,97 @@
+//
+// 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.ResourceManager.Models
+{
+ using Microsoft.Rest;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Deployment script object.
+ ///
+ public partial class DeploymentScript : AzureResourceBase
+ {
+ ///
+ /// Initializes a new instance of the DeploymentScript class.
+ ///
+ public DeploymentScript()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the DeploymentScript class.
+ ///
+ /// Managed identity to be used for this
+ /// deployment script. Currently, only user-assigned MSI is
+ /// supported.
+ /// The location of the ACI and the storage
+ /// account for the deployment script.
+ /// String Id used to locate any resource on
+ /// Azure.
+ /// Name of this resource.
+ /// Type of this resource.
+ /// Resource tags.
+ public DeploymentScript(ManagedServiceIdentity identity, string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary))
+ : base(id, name, type)
+ {
+ Identity = identity;
+ Location = location;
+ Tags = tags;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets managed identity to be used for this deployment
+ /// script. Currently, only user-assigned MSI is supported.
+ ///
+ [JsonProperty(PropertyName = "identity")]
+ public ManagedServiceIdentity Identity { get; set; }
+
+ ///
+ /// Gets or sets the location of the ACI and the storage account for
+ /// the deployment script.
+ ///
+ [JsonProperty(PropertyName = "location")]
+ public string Location { get; set; }
+
+ ///
+ /// Gets or sets resource tags.
+ ///
+ [JsonProperty(PropertyName = "tags")]
+ public IDictionary Tags { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Identity == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Identity");
+ }
+ if (Location == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Location");
+ }
+ }
+ }
+}
diff --git a/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/DeploymentScriptUpdateParameter.cs b/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/DeploymentScriptUpdateParameter.cs
new file mode 100644
index 000000000000..e6b83cd58962
--- /dev/null
+++ b/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/DeploymentScriptUpdateParameter.cs
@@ -0,0 +1,60 @@
+//
+// 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.ResourceManager.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Deployment script parameters to be updated.
+ ///
+ public partial class DeploymentScriptUpdateParameter : AzureResourceBase
+ {
+ ///
+ /// Initializes a new instance of the DeploymentScriptUpdateParameter
+ /// class.
+ ///
+ public DeploymentScriptUpdateParameter()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the DeploymentScriptUpdateParameter
+ /// class.
+ ///
+ /// String Id used to locate any resource on
+ /// Azure.
+ /// Name of this resource.
+ /// Type of this resource.
+ /// Resource tags to be updated.
+ public DeploymentScriptUpdateParameter(string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary))
+ : base(id, name, type)
+ {
+ Tags = tags;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets resource tags to be updated.
+ ///
+ [JsonProperty(PropertyName = "tags")]
+ public IDictionary Tags { get; set; }
+
+ }
+}
diff --git a/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/EnvironmentVariable.cs b/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/EnvironmentVariable.cs
new file mode 100644
index 000000000000..0119e3d4939e
--- /dev/null
+++ b/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/EnvironmentVariable.cs
@@ -0,0 +1,83 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.ResourceManager.Models
+{
+ using Microsoft.Rest;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The environment variable to pass to the script in the container
+ /// instance.
+ ///
+ public partial class EnvironmentVariable
+ {
+ ///
+ /// Initializes a new instance of the EnvironmentVariable class.
+ ///
+ public EnvironmentVariable()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the EnvironmentVariable class.
+ ///
+ /// The name of the environment variable.
+ /// The value of the environment variable.
+ /// The value of the secure environment
+ /// variable.
+ public EnvironmentVariable(string name, string value = default(string), string secureValue = default(string))
+ {
+ Name = name;
+ Value = value;
+ SecureValue = secureValue;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the name of the environment variable.
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; set; }
+
+ ///
+ /// Gets or sets the value of the environment variable.
+ ///
+ [JsonProperty(PropertyName = "value")]
+ public string Value { get; set; }
+
+ ///
+ /// Gets or sets the value of the secure environment variable.
+ ///
+ [JsonProperty(PropertyName = "secureValue")]
+ public string SecureValue { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Name == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Name");
+ }
+ }
+ }
+}
diff --git a/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/ManagedServiceIdentity.cs b/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/ManagedServiceIdentity.cs
new file mode 100644
index 000000000000..ced5a0686cbd
--- /dev/null
+++ b/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/ManagedServiceIdentity.cs
@@ -0,0 +1,67 @@
+//
+// 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.ResourceManager.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Managed identity generic object.
+ ///
+ public partial class ManagedServiceIdentity
+ {
+ ///
+ /// Initializes a new instance of the ManagedServiceIdentity class.
+ ///
+ public ManagedServiceIdentity()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ManagedServiceIdentity class.
+ ///
+ /// Type of the managed identity. Possible values
+ /// include: 'UserAssigned'
+ /// The list of user-assigned
+ /// managed identities associated with the resource. Key is the Azure
+ /// resource Id of the managed identity.
+ public ManagedServiceIdentity(string type = default(string), IDictionary userAssignedIdentities = default(IDictionary))
+ {
+ Type = type;
+ UserAssignedIdentities = userAssignedIdentities;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets type of the managed identity. Possible values include:
+ /// 'UserAssigned'
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public string Type { get; set; }
+
+ ///
+ /// Gets or sets the list of user-assigned managed identities
+ /// associated with the resource. Key is the Azure resource Id of the
+ /// managed identity.
+ ///
+ [JsonProperty(PropertyName = "userAssignedIdentities")]
+ public IDictionary UserAssignedIdentities { get; set; }
+
+ }
+}
diff --git a/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/ManagedServiceIdentityType.cs b/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/ManagedServiceIdentityType.cs
new file mode 100644
index 000000000000..5641636c2ecd
--- /dev/null
+++ b/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/ManagedServiceIdentityType.cs
@@ -0,0 +1,21 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.ResourceManager.Models
+{
+
+ ///
+ /// Defines values for ManagedServiceIdentityType.
+ ///
+ public static class ManagedServiceIdentityType
+ {
+ public const string UserAssigned = "UserAssigned";
+ }
+}
diff --git a/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/ScriptLog.cs b/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/ScriptLog.cs
new file mode 100644
index 000000000000..68e5443e9b84
--- /dev/null
+++ b/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/ScriptLog.cs
@@ -0,0 +1,59 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.ResourceManager.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Script execution log object.
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class ScriptLog : AzureResourceBase
+ {
+ ///
+ /// Initializes a new instance of the ScriptLog class.
+ ///
+ public ScriptLog()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ScriptLog class.
+ ///
+ /// String Id used to locate any resource on
+ /// Azure.
+ /// Name of this resource.
+ /// Type of this resource.
+ /// Script execution logs in text format.
+ public ScriptLog(string id = default(string), string name = default(string), string type = default(string), string log = default(string))
+ : base(id, name, type)
+ {
+ Log = log;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets script execution logs in text format.
+ ///
+ [JsonProperty(PropertyName = "properties.log")]
+ public string Log { get; private set; }
+
+ }
+}
diff --git a/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/ScriptLogsList.cs b/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/ScriptLogsList.cs
new file mode 100644
index 000000000000..018a175efbce
--- /dev/null
+++ b/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/ScriptLogsList.cs
@@ -0,0 +1,53 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.ResourceManager.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Deployment script execution logs.
+ ///
+ public partial class ScriptLogsList
+ {
+ ///
+ /// Initializes a new instance of the ScriptLogsList class.
+ ///
+ public ScriptLogsList()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ScriptLogsList class.
+ ///
+ /// Deployment scripts logs.
+ public ScriptLogsList(IList value = default(IList))
+ {
+ Value = value;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets deployment scripts logs.
+ ///
+ [JsonProperty(PropertyName = "value")]
+ public IList Value { get; set; }
+
+ }
+}
diff --git a/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/ScriptProvisioningState.cs b/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/ScriptProvisioningState.cs
new file mode 100644
index 000000000000..87b1481bb6b6
--- /dev/null
+++ b/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/ScriptProvisioningState.cs
@@ -0,0 +1,27 @@
+//
+// 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.ResourceManager.Models
+{
+
+ ///
+ /// Defines values for ScriptProvisioningState.
+ ///
+ public static class ScriptProvisioningState
+ {
+ public const string Creating = "Creating";
+ public const string ProvisioningResources = "ProvisioningResources";
+ public const string Running = "Running";
+ public const string Succeeded = "Succeeded";
+ public const string Failed = "Failed";
+ public const string Canceled = "Canceled";
+ public const string Expiring = "Expiring";
+ }
+}
diff --git a/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/ScriptStatus.cs b/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/ScriptStatus.cs
new file mode 100644
index 000000000000..107042ccf91d
--- /dev/null
+++ b/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/ScriptStatus.cs
@@ -0,0 +1,84 @@
+//
+// 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.ResourceManager.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Generic object modeling results of script execution.
+ ///
+ public partial class ScriptStatus
+ {
+ ///
+ /// Initializes a new instance of the ScriptStatus class.
+ ///
+ public ScriptStatus()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ScriptStatus class.
+ ///
+ /// ACI resource Id.
+ /// Storage account resource Id.
+ /// Start time of the script execution.
+ /// End time of the script execution.
+ /// Time the deployment script resource
+ /// will expire.
+ public ScriptStatus(string containerInstanceId = default(string), string storageAccountId = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), System.DateTime? expirationTime = default(System.DateTime?))
+ {
+ ContainerInstanceId = containerInstanceId;
+ StorageAccountId = storageAccountId;
+ StartTime = startTime;
+ EndTime = endTime;
+ ExpirationTime = expirationTime;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets ACI resource Id.
+ ///
+ [JsonProperty(PropertyName = "containerInstanceId")]
+ public string ContainerInstanceId { get; private set; }
+
+ ///
+ /// Gets storage account resource Id.
+ ///
+ [JsonProperty(PropertyName = "storageAccountId")]
+ public string StorageAccountId { get; private set; }
+
+ ///
+ /// Gets start time of the script execution.
+ ///
+ [JsonProperty(PropertyName = "startTime")]
+ public System.DateTime? StartTime { get; private set; }
+
+ ///
+ /// Gets end time of the script execution.
+ ///
+ [JsonProperty(PropertyName = "endTime")]
+ public System.DateTime? EndTime { get; private set; }
+
+ ///
+ /// Gets time the deployment script resource will expire.
+ ///
+ [JsonProperty(PropertyName = "expirationTime")]
+ public System.DateTime? ExpirationTime { get; private set; }
+
+ }
+}
diff --git a/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/UserAssignedIdentity.cs b/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/UserAssignedIdentity.cs
new file mode 100644
index 000000000000..d81f7c14fd78
--- /dev/null
+++ b/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/Models/UserAssignedIdentity.cs
@@ -0,0 +1,62 @@
+//
+// 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.ResourceManager.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// User-assigned managed identity.
+ ///
+ public partial class UserAssignedIdentity
+ {
+ ///
+ /// Initializes a new instance of the UserAssignedIdentity class.
+ ///
+ public UserAssignedIdentity()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the UserAssignedIdentity class.
+ ///
+ /// Azure Active Directory principal ID
+ /// associated with this identity.
+ /// Client App Id associated with this
+ /// identity.
+ public UserAssignedIdentity(string principalId = default(string), string clientId = default(string))
+ {
+ PrincipalId = principalId;
+ ClientId = clientId;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets azure Active Directory principal ID associated with
+ /// this identity.
+ ///
+ [JsonProperty(PropertyName = "principalId")]
+ public string PrincipalId { get; set; }
+
+ ///
+ /// Gets or sets client App Id associated with this identity.
+ ///
+ [JsonProperty(PropertyName = "clientId")]
+ public string ClientId { get; set; }
+
+ }
+}
diff --git a/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/SdkInfo_DeploymentScriptsClient.cs b/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/SdkInfo_DeploymentScriptsClient.cs
new file mode 100644
index 000000000000..5b3ce0d65e01
--- /dev/null
+++ b/sdk/resources/Microsoft.Azure.Management.Resource/src/Generated/SdkInfo_DeploymentScriptsClient.cs
@@ -0,0 +1,27 @@
+
+//
+// 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.ResourceManager
+{
+ using System;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ internal static partial class SdkInfo
+ {
+ public static IEnumerable> ApiInfo_DeploymentScriptsClient
+ {
+ get
+ {
+ return new Tuple[]
+ {
+ new Tuple("Resources", "DeploymentScripts", "2019-10-01-preview"),
+ }.AsEnumerable();
+ }
+ }
+ }
+}
diff --git a/sdk/resources/Microsoft.Azure.Management.Resource/src/Microsoft.Azure.Management.ResourceManager.csproj b/sdk/resources/Microsoft.Azure.Management.Resource/src/Microsoft.Azure.Management.ResourceManager.csproj
index 87764bdbddf4..bb78afd10dd5 100644
--- a/sdk/resources/Microsoft.Azure.Management.Resource/src/Microsoft.Azure.Management.ResourceManager.csproj
+++ b/sdk/resources/Microsoft.Azure.Management.Resource/src/Microsoft.Azure.Management.ResourceManager.csproj
@@ -7,11 +7,11 @@
Microsoft.Azure.Management.ResourceManager
Provides resource group and resource management capabilities for Microsoft Azure.
Microsoft.Azure.Management.ResourceManager
- 2.4.1-preview
+ 2.4.5-preview
Microsoft Azure resource management;resource management;resource groups;
diff --git a/sdk/resources/Microsoft.Azure.Management.Resource/src/Properties/AssemblyInfo.cs b/sdk/resources/Microsoft.Azure.Management.Resource/src/Properties/AssemblyInfo.cs
index f9708842e4cf..d324448fed9d 100644
--- a/sdk/resources/Microsoft.Azure.Management.Resource/src/Properties/AssemblyInfo.cs
+++ b/sdk/resources/Microsoft.Azure.Management.Resource/src/Properties/AssemblyInfo.cs
@@ -8,7 +8,7 @@
[assembly: AssemblyDescription("Provides Microsoft Azure resource management operations including Resource Groups.")]
[assembly: AssemblyVersion("2.0.0.0")]
-[assembly: AssemblyFileVersion("2.4.1.0")]
+[assembly: AssemblyFileVersion("2.4.5.0")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("Azure .NET SDK")]
diff --git a/sdk/resources/Microsoft.Azure.Management.Resource/tests/ScenarioTests/DeploymentScriptsTests.ScenarioTests.cs b/sdk/resources/Microsoft.Azure.Management.Resource/tests/ScenarioTests/DeploymentScriptsTests.ScenarioTests.cs
new file mode 100644
index 000000000000..add190c66650
--- /dev/null
+++ b/sdk/resources/Microsoft.Azure.Management.Resource/tests/ScenarioTests/DeploymentScriptsTests.ScenarioTests.cs
@@ -0,0 +1,199 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+
+namespace DeploymentScripts.Tests
+{
+ using System;
+ using System.Collections.Generic;
+ using System.Linq;
+ using Microsoft.Azure.Management.ResourceManager;
+ using Microsoft.Azure.Management.ResourceManager.Models;
+ using Microsoft.Rest.Azure;
+ using Microsoft.Rest.ClientRuntime.Azure.TestFramework;
+ using Xunit;
+
+ public class LiveDeploymentScriptsTests : TestBase
+ {
+ private const string LocationWestUs = "West US";
+ private const string AzurePowerShellVersion = "2.7.0";
+ private static readonly TimeSpan RetentionInterval = new TimeSpan(1, 2, 0, 0, 0);
+ private const string ResourceGroupName = "Ds-TestRg";
+
+ private const string ScriptContent =
+ "param([string] $helloWorld) Write-Output $helloWorld; $DeploymentScriptOutputs['output'] = $helloWorld";
+
+ private const string ScriptArguments = "'Hello World'";
+
+ [Fact]
+ public void CanCrudSimpleDeploymentScript()
+ {
+ using (var context = MockContext.Start(this.GetType()))
+ {
+ var client = context.GetServiceClient();
+
+ // create user assigned managed identity during test run since we'll be using dynamic properties, such as subscriptionId from the test
+ var userAssignedIdentities = new Dictionary
+ {
+ {
+ $"/subscriptions/{client.SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/filiz-user-assigned-msi",
+ new UserAssignedIdentity()
+ }
+ };
+
+ var managedIdentity =
+ new ManagedServiceIdentity(ManagedServiceIdentityType.UserAssigned, userAssignedIdentities);
+
+ // Create deployment script object with minimal properties
+ var deploymentScriptName = TestUtilities.GetCurrentMethodName() + "--" + TestUtilities.GenerateName();
+
+ var deploymentScript = new AzurePowerShellScript(managedIdentity, LocationWestUs, RetentionInterval,
+ AzurePowerShellVersion, scriptContent: ScriptContent, arguments: ScriptArguments);
+
+ var createDeploymentScriptResult =
+ client.DeploymentScripts.Create(ResourceGroupName, deploymentScriptName, deploymentScript) as
+ AzurePowerShellScript;
+ Assert.NotNull(createDeploymentScriptResult);
+ Assert.Equal(ScriptProvisioningState.Creating, createDeploymentScriptResult.ProvisioningState);
+
+ AzurePowerShellScript getDeploymentScript;
+
+ // wait until the deployment script provisioning succeeds (this includes script running time too)
+ var MaxPoll = 20;
+ var pollCount = 0;
+
+ do
+ {
+ Assert.True(pollCount < MaxPoll);
+
+ getDeploymentScript =
+ client.DeploymentScripts.Get(ResourceGroupName, deploymentScriptName) as AzurePowerShellScript;
+
+ TestUtilities.Wait(10000);
+
+ pollCount++;
+
+ } while (getDeploymentScript.ProvisioningState != ScriptProvisioningState.Succeeded);
+
+ // Validate result
+ Assert.NotNull(getDeploymentScript);
+ Assert.Equal(deploymentScript.Location, getDeploymentScript.Location);
+ Assert.Equal(deploymentScript.AzPowerShellVersion, getDeploymentScript.AzPowerShellVersion);
+ Assert.Equal(deploymentScript.Identity.Type.ToLower(), getDeploymentScript.Identity.Type.ToLower());
+ Assert.NotNull(deploymentScript.Identity.UserAssignedIdentities.Values.FirstOrDefault());
+ Assert.Equal(deploymentScript.Identity.UserAssignedIdentities.Keys.FirstOrDefault(),
+ getDeploymentScript.Identity.UserAssignedIdentities.Keys.FirstOrDefault());
+ Assert.NotNull(getDeploymentScript.ScriptContent);
+ Assert.Equal(deploymentScript.ScriptContent, getDeploymentScript.ScriptContent);
+ Assert.NotNull(getDeploymentScript.Arguments);
+ Assert.Equal(deploymentScript.Arguments, getDeploymentScript.Arguments);
+ Assert.NotNull(deploymentScript.RetentionInterval.ToString());
+ Assert.Equal(deploymentScript.RetentionInterval, getDeploymentScript.RetentionInterval);
+
+ // Validate read-only properties
+ Assert.NotNull(getDeploymentScript.Id);
+ Assert.NotNull(getDeploymentScript.Name);
+ Assert.Equal(deploymentScriptName, getDeploymentScript.Name);
+ Assert.NotNull(getDeploymentScript.Identity.UserAssignedIdentities.Values.FirstOrDefault().ClientId);
+ Assert.NotNull(getDeploymentScript.Identity.UserAssignedIdentities.Values.FirstOrDefault().PrincipalId);
+ Assert.NotNull(getDeploymentScript.ProvisioningState);
+ Assert.NotNull(getDeploymentScript.Timeout);
+ Assert.NotNull(getDeploymentScript.CleanupPreference);
+ Assert.NotNull(getDeploymentScript.Status);
+ Assert.NotNull(getDeploymentScript.Status.StartTime);
+ Assert.NotNull(getDeploymentScript.Status.EndTime);
+ Assert.NotNull(getDeploymentScript.Status.ContainerInstanceId);
+ Assert.NotNull(getDeploymentScript.Status.StorageAccountId);
+ Assert.NotEmpty(getDeploymentScript.Outputs);
+
+ // List at resource group level and validate
+ var listAtResourceGroupResult = client.DeploymentScripts.ListByResourceGroup(ResourceGroupName);
+ Assert.NotEmpty(listAtResourceGroupResult);
+ Assert.NotNull(listAtResourceGroupResult.FirstOrDefault(p => p.Name.Equals(deploymentScriptName)));
+ Assert.Equal(deploymentScriptName, listAtResourceGroupResult.First().Name);
+ Assert.Equal(deploymentScript.AzPowerShellVersion,
+ (listAtResourceGroupResult.First() as AzurePowerShellScript).AzPowerShellVersion);
+ Assert.NotNull((listAtResourceGroupResult.First() as AzurePowerShellScript).ProvisioningState);
+
+ // List at subscription level and validate
+ var listAtSubscriptionResult = client.DeploymentScripts.ListBySubscription();
+ Assert.NotEmpty(listAtSubscriptionResult);
+ Assert.NotNull(listAtSubscriptionResult.FirstOrDefault(p => p.Name.Equals(deploymentScriptName)));
+ Assert.Equal(deploymentScriptName, listAtSubscriptionResult.First().Name);
+ Assert.Equal(AzurePowerShellVersion,
+ (listAtSubscriptionResult.First() as AzurePowerShellScript).AzPowerShellVersion);
+ Assert.NotNull((listAtSubscriptionResult.First() as AzurePowerShellScript).ProvisioningState);
+
+ // Delete deployments script and validate
+ client.DeploymentScripts.Delete(ResourceGroupName, deploymentScriptName);
+ var list = client.DeploymentScripts.ListByResourceGroup(ResourceGroupName);
+ Assert.Empty(list.Where(p => p.Name.Equals(deploymentScriptName)));
+ list = client.DeploymentScripts.ListBySubscription();
+ Assert.Empty(list.Where(p => p.Name.Equals(deploymentScriptName)));
+ }
+ }
+
+ [Fact]
+ public void CanGetDeploymentScriptExecutionLogs()
+ {
+ using (var context = MockContext.Start(this.GetType()))
+ {
+ var client = context.GetServiceClient();
+
+ // create user assigned managed identity during test run since we'll be using dynamic properties, such as subscriptionId from the test
+ var userAssignedIdentities = new Dictionary
+ {
+ {
+ $"/subscriptions/{client.SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/filiz-user-assigned-msi",
+ new UserAssignedIdentity()
+ }
+ };
+
+ var managedIdentity =
+ new ManagedServiceIdentity(ManagedServiceIdentityType.UserAssigned, userAssignedIdentities);
+
+ // Create deployment script object with minimal properties
+ var deploymentScriptName = TestUtilities.GetCurrentMethodName() + "--" + TestUtilities.GenerateName();
+
+ var deploymentScript = new AzurePowerShellScript(managedIdentity, LocationWestUs, RetentionInterval,
+ AzurePowerShellVersion, scriptContent: ScriptContent, arguments: ScriptArguments);
+
+ var createDeploymentScriptResult =
+ client.DeploymentScripts.Create(ResourceGroupName, deploymentScriptName, deploymentScript) as
+ AzurePowerShellScript;
+ Assert.NotNull(createDeploymentScriptResult);
+ Assert.Equal(ScriptProvisioningState.Creating, createDeploymentScriptResult.ProvisioningState);
+
+ AzurePowerShellScript getDeploymentScript;
+
+ // wait until the deployment script provisioning succeeds (this includes script running time too)
+ var MaxPoll = 20;
+ var pollCount = 0;
+
+ do
+ {
+ Assert.True(pollCount < MaxPoll);
+
+ getDeploymentScript =
+ client.DeploymentScripts.Get(ResourceGroupName, deploymentScriptName) as AzurePowerShellScript;
+
+ TestUtilities.Wait(10000);
+
+ pollCount++;
+
+ } while (getDeploymentScript.ProvisioningState != ScriptProvisioningState.Succeeded);
+
+ Assert.NotNull(getDeploymentScript);
+
+ // Validate getlogs result
+ var getLogsResult = client.DeploymentScripts.GetLogsDefault(ResourceGroupName, deploymentScriptName);
+ Assert.NotNull(getLogsResult);
+
+ // Delete deployments script
+ client.DeploymentScripts.Delete(ResourceGroupName, deploymentScriptName);
+ var list = client.DeploymentScripts.ListByResourceGroup(ResourceGroupName);
+ Assert.Empty(list.Where(p => p.Name.Equals(deploymentScriptName)));
+ }
+ }
+ }
+}
+
diff --git a/sdk/resources/Microsoft.Azure.Management.Resource/tests/SessionRecords/LiveDeploymentScriptsTests/CanCrudSimpleDeploymentScript.json b/sdk/resources/Microsoft.Azure.Management.Resource/tests/SessionRecords/LiveDeploymentScriptsTests/CanCrudSimpleDeploymentScript.json
new file mode 100644
index 000000000000..674984667ee5
--- /dev/null
+++ b/sdk/resources/Microsoft.Azure.Management.Resource/tests/SessionRecords/LiveDeploymentScriptsTests/CanCrudSimpleDeploymentScript.json
@@ -0,0 +1,1086 @@
+{
+ "Entries": [
+ {
+ "RequestUri": "/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourcegroups/Ds-TestRg/providers/Microsoft.Resources/deploymentScripts/CanCrudSimpleDeploymentScript--azsmnet253?api-version=2019-10-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTFiZmE2MzUtZjJiZi00MmYxLTg2YjUtODQ4YzY3NGZjMzIxL3Jlc291cmNlZ3JvdXBzL0RzLVRlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlc291cmNlcy9kZXBsb3ltZW50U2NyaXB0cy9DYW5DcnVkU2ltcGxlRGVwbG95bWVudFNjcmlwdC0tYXpzbW5ldDI1Mz9hcGktdmVyc2lvbj0yMDE5LTEwLTAxLXByZXZpZXc=",
+ "RequestMethod": "PUT",
+ "RequestBody": "{\r\n \"kind\": \"AzurePowerShell\",\r\n \"properties\": {\r\n \"scriptContent\": \"param([string] $helloWorld) Write-Output $helloWorld; $DeploymentScriptOutputs['output'] = $helloWorld\",\r\n \"arguments\": \"'Hello World'\",\r\n \"retentionInterval\": \"P1DT2H\",\r\n \"azPowerShellVersion\": \"2.7.0\"\r\n },\r\n \"identity\": {\r\n \"type\": \"UserAssigned\",\r\n \"userAssignedIdentities\": {\r\n \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/filiz-user-assigned-msi\": {}\r\n }\r\n },\r\n \"location\": \"West US\"\r\n}",
+ "RequestHeaders": {
+ "x-ms-client-request-id": [
+ "42846492-e725-409e-a3a1-d8a997c6852d"
+ ],
+ "Accept-Language": [
+ "en-US"
+ ],
+ "User-Agent": [
+ "FxVersion/4.6.28008.01",
+ "OSName/Windows",
+ "OSVersion/Microsoft.Windows.10.0.18363.",
+ "Microsoft.Azure.Management.ResourceManager.DeploymentScriptsClient/2.4.5.0"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Content-Length": [
+ "584"
+ ]
+ },
+ "ResponseHeaders": {
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "Retry-After": [
+ "17"
+ ],
+ "Azure-AsyncOperation": [
+ "https://management.azure.com/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/ds-testrg/providers/Microsoft.Resources/deploymentScripts/CanCrudSimpleDeploymentScript--azsmnet253/operationresults/0?api-version=2019-10-01-preview"
+ ],
+ "x-ms-request-id": [
+ "6cade2a2-d2fb-4fc7-a0f5-80f1124710da"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ],
+ "x-ms-ratelimit-remaining-subscription-writes": [
+ "1199"
+ ],
+ "x-ms-correlation-request-id": [
+ "929eb207-a9e8-40b6-bfc8-d2b855dc14b6"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20191107T040933Z:929eb207-a9e8-40b6-bfc8-d2b855dc14b6"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "X-Content-Type-Options": [
+ "nosniff"
+ ],
+ "Date": [
+ "Thu, 07 Nov 2019 04:09:33 GMT"
+ ],
+ "Content-Length": [
+ "1154"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ]
+ },
+ "ResponseBody": "{\r\n \"kind\": \"AzurePowerShell\",\r\n \"identity\": {\r\n \"type\": \"userAssigned\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"userAssignedIdentities\": {\r\n \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/filiz-user-assigned-msi\": {\r\n \"principalId\": \"97939ebd-fa2e-4055-8e3b-eb5252632e6a\",\r\n \"clientId\": \"0376d532-7364-4bec-8989-e11939b72a6a\"\r\n }\r\n }\r\n },\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"azPowerShellVersion\": \"2.7.0\",\r\n \"scriptContent\": \"param([string] $helloWorld) Write-Output $helloWorld; $DeploymentScriptOutputs['output'] = $helloWorld\",\r\n \"arguments\": \"'Hello World'\",\r\n \"retentionInterval\": \"P1DT2H\",\r\n \"timeout\": \"P1D\",\r\n \"containerSettings\": {},\r\n \"status\": {},\r\n \"cleanupPreference\": \"Always\"\r\n },\r\n \"id\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/ds-testrg/providers/Microsoft.Resources/deploymentScripts/CanCrudSimpleDeploymentScript--azsmnet253\",\r\n \"name\": \"CanCrudSimpleDeploymentScript--azsmnet253\"\r\n}",
+ "StatusCode": 201
+ },
+ {
+ "RequestUri": "/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourcegroups/Ds-TestRg/providers/Microsoft.Resources/deploymentScripts/CanCrudSimpleDeploymentScript--azsmnet253?api-version=2019-10-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTFiZmE2MzUtZjJiZi00MmYxLTg2YjUtODQ4YzY3NGZjMzIxL3Jlc291cmNlZ3JvdXBzL0RzLVRlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlc291cmNlcy9kZXBsb3ltZW50U2NyaXB0cy9DYW5DcnVkU2ltcGxlRGVwbG95bWVudFNjcmlwdC0tYXpzbW5ldDI1Mz9hcGktdmVyc2lvbj0yMDE5LTEwLTAxLXByZXZpZXc=",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-client-request-id": [
+ "1082b02d-f12f-4d28-8f72-404b95e65afc"
+ ],
+ "Accept-Language": [
+ "en-US"
+ ],
+ "User-Agent": [
+ "FxVersion/4.6.28008.01",
+ "OSName/Windows",
+ "OSVersion/Microsoft.Windows.10.0.18363.",
+ "Microsoft.Azure.Management.ResourceManager.DeploymentScriptsClient/2.4.5.0"
+ ]
+ },
+ "ResponseHeaders": {
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-request-id": [
+ "83ec163b-e94e-4c6e-905e-8430efc29300"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "11999"
+ ],
+ "x-ms-correlation-request-id": [
+ "de1a60de-c3c0-4a06-bd6f-a2219705cd99"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20191107T040933Z:de1a60de-c3c0-4a06-bd6f-a2219705cd99"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "X-Content-Type-Options": [
+ "nosniff"
+ ],
+ "Date": [
+ "Thu, 07 Nov 2019 04:09:33 GMT"
+ ],
+ "Content-Length": [
+ "1154"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ]
+ },
+ "ResponseBody": "{\r\n \"kind\": \"AzurePowerShell\",\r\n \"identity\": {\r\n \"type\": \"userAssigned\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"userAssignedIdentities\": {\r\n \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/filiz-user-assigned-msi\": {\r\n \"principalId\": \"97939ebd-fa2e-4055-8e3b-eb5252632e6a\",\r\n \"clientId\": \"0376d532-7364-4bec-8989-e11939b72a6a\"\r\n }\r\n }\r\n },\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"azPowerShellVersion\": \"2.7.0\",\r\n \"scriptContent\": \"param([string] $helloWorld) Write-Output $helloWorld; $DeploymentScriptOutputs['output'] = $helloWorld\",\r\n \"arguments\": \"'Hello World'\",\r\n \"retentionInterval\": \"P1DT2H\",\r\n \"timeout\": \"P1D\",\r\n \"containerSettings\": {},\r\n \"status\": {},\r\n \"cleanupPreference\": \"Always\"\r\n },\r\n \"id\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/ds-testrg/providers/Microsoft.Resources/deploymentScripts/CanCrudSimpleDeploymentScript--azsmnet253\",\r\n \"name\": \"CanCrudSimpleDeploymentScript--azsmnet253\"\r\n}",
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourcegroups/Ds-TestRg/providers/Microsoft.Resources/deploymentScripts/CanCrudSimpleDeploymentScript--azsmnet253?api-version=2019-10-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTFiZmE2MzUtZjJiZi00MmYxLTg2YjUtODQ4YzY3NGZjMzIxL3Jlc291cmNlZ3JvdXBzL0RzLVRlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlc291cmNlcy9kZXBsb3ltZW50U2NyaXB0cy9DYW5DcnVkU2ltcGxlRGVwbG95bWVudFNjcmlwdC0tYXpzbW5ldDI1Mz9hcGktdmVyc2lvbj0yMDE5LTEwLTAxLXByZXZpZXc=",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-client-request-id": [
+ "f3cbc367-38a5-4054-a625-33d69e9e9ea7"
+ ],
+ "Accept-Language": [
+ "en-US"
+ ],
+ "User-Agent": [
+ "FxVersion/4.6.28008.01",
+ "OSName/Windows",
+ "OSVersion/Microsoft.Windows.10.0.18363.",
+ "Microsoft.Azure.Management.ResourceManager.DeploymentScriptsClient/2.4.5.0"
+ ]
+ },
+ "ResponseHeaders": {
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-request-id": [
+ "1072a5ee-058e-4f05-9fba-0805e916942f"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "11998"
+ ],
+ "x-ms-correlation-request-id": [
+ "7b9f2047-116c-4a5f-a84f-52f6b14f9d96"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20191107T040943Z:7b9f2047-116c-4a5f-a84f-52f6b14f9d96"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "X-Content-Type-Options": [
+ "nosniff"
+ ],
+ "Date": [
+ "Thu, 07 Nov 2019 04:09:43 GMT"
+ ],
+ "Content-Length": [
+ "1167"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ]
+ },
+ "ResponseBody": "{\r\n \"kind\": \"AzurePowerShell\",\r\n \"identity\": {\r\n \"type\": \"userAssigned\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"userAssignedIdentities\": {\r\n \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/filiz-user-assigned-msi\": {\r\n \"principalId\": \"97939ebd-fa2e-4055-8e3b-eb5252632e6a\",\r\n \"clientId\": \"0376d532-7364-4bec-8989-e11939b72a6a\"\r\n }\r\n }\r\n },\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"provisioningState\": \"ProvisioningResources\",\r\n \"azPowerShellVersion\": \"2.7.0\",\r\n \"scriptContent\": \"param([string] $helloWorld) Write-Output $helloWorld; $DeploymentScriptOutputs['output'] = $helloWorld\",\r\n \"arguments\": \"'Hello World'\",\r\n \"retentionInterval\": \"P1DT2H\",\r\n \"timeout\": \"P1D\",\r\n \"containerSettings\": {},\r\n \"status\": {},\r\n \"cleanupPreference\": \"Always\"\r\n },\r\n \"id\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/ds-testrg/providers/Microsoft.Resources/deploymentScripts/CanCrudSimpleDeploymentScript--azsmnet253\",\r\n \"name\": \"CanCrudSimpleDeploymentScript--azsmnet253\"\r\n}",
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourcegroups/Ds-TestRg/providers/Microsoft.Resources/deploymentScripts/CanCrudSimpleDeploymentScript--azsmnet253?api-version=2019-10-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTFiZmE2MzUtZjJiZi00MmYxLTg2YjUtODQ4YzY3NGZjMzIxL3Jlc291cmNlZ3JvdXBzL0RzLVRlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlc291cmNlcy9kZXBsb3ltZW50U2NyaXB0cy9DYW5DcnVkU2ltcGxlRGVwbG95bWVudFNjcmlwdC0tYXpzbW5ldDI1Mz9hcGktdmVyc2lvbj0yMDE5LTEwLTAxLXByZXZpZXc=",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-client-request-id": [
+ "863cb8ea-3787-4417-91c5-14c6cf6f109a"
+ ],
+ "Accept-Language": [
+ "en-US"
+ ],
+ "User-Agent": [
+ "FxVersion/4.6.28008.01",
+ "OSName/Windows",
+ "OSVersion/Microsoft.Windows.10.0.18363.",
+ "Microsoft.Azure.Management.ResourceManager.DeploymentScriptsClient/2.4.5.0"
+ ]
+ },
+ "ResponseHeaders": {
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-request-id": [
+ "1eb8f075-06f7-4384-8319-839d74395ee9"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "11997"
+ ],
+ "x-ms-correlation-request-id": [
+ "39bbaa1b-ea17-40fd-97a2-67867ecfd5b2"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20191107T040954Z:39bbaa1b-ea17-40fd-97a2-67867ecfd5b2"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "X-Content-Type-Options": [
+ "nosniff"
+ ],
+ "Date": [
+ "Thu, 07 Nov 2019 04:09:53 GMT"
+ ],
+ "Content-Length": [
+ "1167"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ]
+ },
+ "ResponseBody": "{\r\n \"kind\": \"AzurePowerShell\",\r\n \"identity\": {\r\n \"type\": \"userAssigned\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"userAssignedIdentities\": {\r\n \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/filiz-user-assigned-msi\": {\r\n \"principalId\": \"97939ebd-fa2e-4055-8e3b-eb5252632e6a\",\r\n \"clientId\": \"0376d532-7364-4bec-8989-e11939b72a6a\"\r\n }\r\n }\r\n },\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"provisioningState\": \"ProvisioningResources\",\r\n \"azPowerShellVersion\": \"2.7.0\",\r\n \"scriptContent\": \"param([string] $helloWorld) Write-Output $helloWorld; $DeploymentScriptOutputs['output'] = $helloWorld\",\r\n \"arguments\": \"'Hello World'\",\r\n \"retentionInterval\": \"P1DT2H\",\r\n \"timeout\": \"P1D\",\r\n \"containerSettings\": {},\r\n \"status\": {},\r\n \"cleanupPreference\": \"Always\"\r\n },\r\n \"id\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/ds-testrg/providers/Microsoft.Resources/deploymentScripts/CanCrudSimpleDeploymentScript--azsmnet253\",\r\n \"name\": \"CanCrudSimpleDeploymentScript--azsmnet253\"\r\n}",
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourcegroups/Ds-TestRg/providers/Microsoft.Resources/deploymentScripts/CanCrudSimpleDeploymentScript--azsmnet253?api-version=2019-10-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTFiZmE2MzUtZjJiZi00MmYxLTg2YjUtODQ4YzY3NGZjMzIxL3Jlc291cmNlZ3JvdXBzL0RzLVRlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlc291cmNlcy9kZXBsb3ltZW50U2NyaXB0cy9DYW5DcnVkU2ltcGxlRGVwbG95bWVudFNjcmlwdC0tYXpzbW5ldDI1Mz9hcGktdmVyc2lvbj0yMDE5LTEwLTAxLXByZXZpZXc=",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-client-request-id": [
+ "ec6e7ad0-3406-4194-965a-f67701454c4e"
+ ],
+ "Accept-Language": [
+ "en-US"
+ ],
+ "User-Agent": [
+ "FxVersion/4.6.28008.01",
+ "OSName/Windows",
+ "OSVersion/Microsoft.Windows.10.0.18363.",
+ "Microsoft.Azure.Management.ResourceManager.DeploymentScriptsClient/2.4.5.0"
+ ]
+ },
+ "ResponseHeaders": {
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-request-id": [
+ "99bad668-3ce7-48c2-a171-23691905901e"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "11996"
+ ],
+ "x-ms-correlation-request-id": [
+ "a614e942-49c6-4fe9-821a-8638f59ce5cb"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20191107T041004Z:a614e942-49c6-4fe9-821a-8638f59ce5cb"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "X-Content-Type-Options": [
+ "nosniff"
+ ],
+ "Date": [
+ "Thu, 07 Nov 2019 04:10:03 GMT"
+ ],
+ "Content-Length": [
+ "1398"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ]
+ },
+ "ResponseBody": "{\r\n \"kind\": \"AzurePowerShell\",\r\n \"identity\": {\r\n \"type\": \"userAssigned\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"userAssignedIdentities\": {\r\n \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/filiz-user-assigned-msi\": {\r\n \"principalId\": \"97939ebd-fa2e-4055-8e3b-eb5252632e6a\",\r\n \"clientId\": \"0376d532-7364-4bec-8989-e11939b72a6a\"\r\n }\r\n }\r\n },\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"provisioningState\": \"ProvisioningResources\",\r\n \"azPowerShellVersion\": \"2.7.0\",\r\n \"scriptContent\": \"param([string] $helloWorld) Write-Output $helloWorld; $DeploymentScriptOutputs['output'] = $helloWorld\",\r\n \"arguments\": \"'Hello World'\",\r\n \"retentionInterval\": \"P1DT2H\",\r\n \"timeout\": \"P1D\",\r\n \"containerSettings\": {},\r\n \"status\": {\r\n \"storageAccountId\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.Storage/storageAccounts/btyb7hhkm5z6oazscripts\",\r\n \"startTime\": \"2019-11-07T04:10:00.4332008Z\"\r\n },\r\n \"cleanupPreference\": \"Always\"\r\n },\r\n \"id\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/ds-testrg/providers/Microsoft.Resources/deploymentScripts/CanCrudSimpleDeploymentScript--azsmnet253\",\r\n \"name\": \"CanCrudSimpleDeploymentScript--azsmnet253\"\r\n}",
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourcegroups/Ds-TestRg/providers/Microsoft.Resources/deploymentScripts/CanCrudSimpleDeploymentScript--azsmnet253?api-version=2019-10-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTFiZmE2MzUtZjJiZi00MmYxLTg2YjUtODQ4YzY3NGZjMzIxL3Jlc291cmNlZ3JvdXBzL0RzLVRlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlc291cmNlcy9kZXBsb3ltZW50U2NyaXB0cy9DYW5DcnVkU2ltcGxlRGVwbG95bWVudFNjcmlwdC0tYXpzbW5ldDI1Mz9hcGktdmVyc2lvbj0yMDE5LTEwLTAxLXByZXZpZXc=",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-client-request-id": [
+ "d233fa7b-118f-4e2e-a3ba-e5de66195bd6"
+ ],
+ "Accept-Language": [
+ "en-US"
+ ],
+ "User-Agent": [
+ "FxVersion/4.6.28008.01",
+ "OSName/Windows",
+ "OSVersion/Microsoft.Windows.10.0.18363.",
+ "Microsoft.Azure.Management.ResourceManager.DeploymentScriptsClient/2.4.5.0"
+ ]
+ },
+ "ResponseHeaders": {
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-request-id": [
+ "1f709d31-5f02-4653-8c5f-c3d7b634487c"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "11995"
+ ],
+ "x-ms-correlation-request-id": [
+ "5f9e177c-96ff-4495-bce0-45dcef9e2414"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20191107T041014Z:5f9e177c-96ff-4495-bce0-45dcef9e2414"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "X-Content-Type-Options": [
+ "nosniff"
+ ],
+ "Date": [
+ "Thu, 07 Nov 2019 04:10:14 GMT"
+ ],
+ "Content-Length": [
+ "1398"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ]
+ },
+ "ResponseBody": "{\r\n \"kind\": \"AzurePowerShell\",\r\n \"identity\": {\r\n \"type\": \"userAssigned\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"userAssignedIdentities\": {\r\n \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/filiz-user-assigned-msi\": {\r\n \"principalId\": \"97939ebd-fa2e-4055-8e3b-eb5252632e6a\",\r\n \"clientId\": \"0376d532-7364-4bec-8989-e11939b72a6a\"\r\n }\r\n }\r\n },\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"provisioningState\": \"ProvisioningResources\",\r\n \"azPowerShellVersion\": \"2.7.0\",\r\n \"scriptContent\": \"param([string] $helloWorld) Write-Output $helloWorld; $DeploymentScriptOutputs['output'] = $helloWorld\",\r\n \"arguments\": \"'Hello World'\",\r\n \"retentionInterval\": \"P1DT2H\",\r\n \"timeout\": \"P1D\",\r\n \"containerSettings\": {},\r\n \"status\": {\r\n \"storageAccountId\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.Storage/storageAccounts/btyb7hhkm5z6oazscripts\",\r\n \"startTime\": \"2019-11-07T04:10:00.4332008Z\"\r\n },\r\n \"cleanupPreference\": \"Always\"\r\n },\r\n \"id\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/ds-testrg/providers/Microsoft.Resources/deploymentScripts/CanCrudSimpleDeploymentScript--azsmnet253\",\r\n \"name\": \"CanCrudSimpleDeploymentScript--azsmnet253\"\r\n}",
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourcegroups/Ds-TestRg/providers/Microsoft.Resources/deploymentScripts/CanCrudSimpleDeploymentScript--azsmnet253?api-version=2019-10-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTFiZmE2MzUtZjJiZi00MmYxLTg2YjUtODQ4YzY3NGZjMzIxL3Jlc291cmNlZ3JvdXBzL0RzLVRlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlc291cmNlcy9kZXBsb3ltZW50U2NyaXB0cy9DYW5DcnVkU2ltcGxlRGVwbG95bWVudFNjcmlwdC0tYXpzbW5ldDI1Mz9hcGktdmVyc2lvbj0yMDE5LTEwLTAxLXByZXZpZXc=",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-client-request-id": [
+ "080c714d-06a8-486a-a77b-93e76323d625"
+ ],
+ "Accept-Language": [
+ "en-US"
+ ],
+ "User-Agent": [
+ "FxVersion/4.6.28008.01",
+ "OSName/Windows",
+ "OSVersion/Microsoft.Windows.10.0.18363.",
+ "Microsoft.Azure.Management.ResourceManager.DeploymentScriptsClient/2.4.5.0"
+ ]
+ },
+ "ResponseHeaders": {
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-request-id": [
+ "6abef4b8-81b0-4161-b0b9-3f05236c0988"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "11994"
+ ],
+ "x-ms-correlation-request-id": [
+ "6607ae2d-d346-4a90-ab07-cad427483db6"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20191107T041024Z:6607ae2d-d346-4a90-ab07-cad427483db6"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "X-Content-Type-Options": [
+ "nosniff"
+ ],
+ "Date": [
+ "Thu, 07 Nov 2019 04:10:24 GMT"
+ ],
+ "Content-Length": [
+ "1398"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ]
+ },
+ "ResponseBody": "{\r\n \"kind\": \"AzurePowerShell\",\r\n \"identity\": {\r\n \"type\": \"userAssigned\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"userAssignedIdentities\": {\r\n \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/filiz-user-assigned-msi\": {\r\n \"principalId\": \"97939ebd-fa2e-4055-8e3b-eb5252632e6a\",\r\n \"clientId\": \"0376d532-7364-4bec-8989-e11939b72a6a\"\r\n }\r\n }\r\n },\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"provisioningState\": \"ProvisioningResources\",\r\n \"azPowerShellVersion\": \"2.7.0\",\r\n \"scriptContent\": \"param([string] $helloWorld) Write-Output $helloWorld; $DeploymentScriptOutputs['output'] = $helloWorld\",\r\n \"arguments\": \"'Hello World'\",\r\n \"retentionInterval\": \"P1DT2H\",\r\n \"timeout\": \"P1D\",\r\n \"containerSettings\": {},\r\n \"status\": {\r\n \"storageAccountId\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.Storage/storageAccounts/btyb7hhkm5z6oazscripts\",\r\n \"startTime\": \"2019-11-07T04:10:00.4332008Z\"\r\n },\r\n \"cleanupPreference\": \"Always\"\r\n },\r\n \"id\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/ds-testrg/providers/Microsoft.Resources/deploymentScripts/CanCrudSimpleDeploymentScript--azsmnet253\",\r\n \"name\": \"CanCrudSimpleDeploymentScript--azsmnet253\"\r\n}",
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourcegroups/Ds-TestRg/providers/Microsoft.Resources/deploymentScripts/CanCrudSimpleDeploymentScript--azsmnet253?api-version=2019-10-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTFiZmE2MzUtZjJiZi00MmYxLTg2YjUtODQ4YzY3NGZjMzIxL3Jlc291cmNlZ3JvdXBzL0RzLVRlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlc291cmNlcy9kZXBsb3ltZW50U2NyaXB0cy9DYW5DcnVkU2ltcGxlRGVwbG95bWVudFNjcmlwdC0tYXpzbW5ldDI1Mz9hcGktdmVyc2lvbj0yMDE5LTEwLTAxLXByZXZpZXc=",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-client-request-id": [
+ "943d493a-701c-4d64-9916-8de0547f7f17"
+ ],
+ "Accept-Language": [
+ "en-US"
+ ],
+ "User-Agent": [
+ "FxVersion/4.6.28008.01",
+ "OSName/Windows",
+ "OSVersion/Microsoft.Windows.10.0.18363.",
+ "Microsoft.Azure.Management.ResourceManager.DeploymentScriptsClient/2.4.5.0"
+ ]
+ },
+ "ResponseHeaders": {
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-request-id": [
+ "6f6b242a-768b-45a6-8701-a465d4940258"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "11993"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ],
+ "x-ms-correlation-request-id": [
+ "dd92ce81-6c5f-49d0-abff-2e1823f71781"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20191107T041034Z:dd92ce81-6c5f-49d0-abff-2e1823f71781"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "X-Content-Type-Options": [
+ "nosniff"
+ ],
+ "Date": [
+ "Thu, 07 Nov 2019 04:10:34 GMT"
+ ],
+ "Content-Length": [
+ "1398"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ]
+ },
+ "ResponseBody": "{\r\n \"kind\": \"AzurePowerShell\",\r\n \"identity\": {\r\n \"type\": \"userAssigned\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"userAssignedIdentities\": {\r\n \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/filiz-user-assigned-msi\": {\r\n \"principalId\": \"97939ebd-fa2e-4055-8e3b-eb5252632e6a\",\r\n \"clientId\": \"0376d532-7364-4bec-8989-e11939b72a6a\"\r\n }\r\n }\r\n },\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"provisioningState\": \"ProvisioningResources\",\r\n \"azPowerShellVersion\": \"2.7.0\",\r\n \"scriptContent\": \"param([string] $helloWorld) Write-Output $helloWorld; $DeploymentScriptOutputs['output'] = $helloWorld\",\r\n \"arguments\": \"'Hello World'\",\r\n \"retentionInterval\": \"P1DT2H\",\r\n \"timeout\": \"P1D\",\r\n \"containerSettings\": {},\r\n \"status\": {\r\n \"storageAccountId\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.Storage/storageAccounts/btyb7hhkm5z6oazscripts\",\r\n \"startTime\": \"2019-11-07T04:10:00.4332008Z\"\r\n },\r\n \"cleanupPreference\": \"Always\"\r\n },\r\n \"id\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/ds-testrg/providers/Microsoft.Resources/deploymentScripts/CanCrudSimpleDeploymentScript--azsmnet253\",\r\n \"name\": \"CanCrudSimpleDeploymentScript--azsmnet253\"\r\n}",
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourcegroups/Ds-TestRg/providers/Microsoft.Resources/deploymentScripts/CanCrudSimpleDeploymentScript--azsmnet253?api-version=2019-10-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTFiZmE2MzUtZjJiZi00MmYxLTg2YjUtODQ4YzY3NGZjMzIxL3Jlc291cmNlZ3JvdXBzL0RzLVRlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlc291cmNlcy9kZXBsb3ltZW50U2NyaXB0cy9DYW5DcnVkU2ltcGxlRGVwbG95bWVudFNjcmlwdC0tYXpzbW5ldDI1Mz9hcGktdmVyc2lvbj0yMDE5LTEwLTAxLXByZXZpZXc=",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-client-request-id": [
+ "9317c0ce-984a-4eb7-b0d3-9541f3d4c490"
+ ],
+ "Accept-Language": [
+ "en-US"
+ ],
+ "User-Agent": [
+ "FxVersion/4.6.28008.01",
+ "OSName/Windows",
+ "OSVersion/Microsoft.Windows.10.0.18363.",
+ "Microsoft.Azure.Management.ResourceManager.DeploymentScriptsClient/2.4.5.0"
+ ]
+ },
+ "ResponseHeaders": {
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-request-id": [
+ "54997ad2-8a99-4e3d-9d17-35ad827d437b"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "11992"
+ ],
+ "x-ms-correlation-request-id": [
+ "694934d3-212a-476a-add8-6e12a45d383a"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20191107T041044Z:694934d3-212a-476a-add8-6e12a45d383a"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "X-Content-Type-Options": [
+ "nosniff"
+ ],
+ "Date": [
+ "Thu, 07 Nov 2019 04:10:44 GMT"
+ ],
+ "Content-Length": [
+ "1398"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ]
+ },
+ "ResponseBody": "{\r\n \"kind\": \"AzurePowerShell\",\r\n \"identity\": {\r\n \"type\": \"userAssigned\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"userAssignedIdentities\": {\r\n \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/filiz-user-assigned-msi\": {\r\n \"principalId\": \"97939ebd-fa2e-4055-8e3b-eb5252632e6a\",\r\n \"clientId\": \"0376d532-7364-4bec-8989-e11939b72a6a\"\r\n }\r\n }\r\n },\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"provisioningState\": \"ProvisioningResources\",\r\n \"azPowerShellVersion\": \"2.7.0\",\r\n \"scriptContent\": \"param([string] $helloWorld) Write-Output $helloWorld; $DeploymentScriptOutputs['output'] = $helloWorld\",\r\n \"arguments\": \"'Hello World'\",\r\n \"retentionInterval\": \"P1DT2H\",\r\n \"timeout\": \"P1D\",\r\n \"containerSettings\": {},\r\n \"status\": {\r\n \"storageAccountId\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.Storage/storageAccounts/btyb7hhkm5z6oazscripts\",\r\n \"startTime\": \"2019-11-07T04:10:00.4332008Z\"\r\n },\r\n \"cleanupPreference\": \"Always\"\r\n },\r\n \"id\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/ds-testrg/providers/Microsoft.Resources/deploymentScripts/CanCrudSimpleDeploymentScript--azsmnet253\",\r\n \"name\": \"CanCrudSimpleDeploymentScript--azsmnet253\"\r\n}",
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourcegroups/Ds-TestRg/providers/Microsoft.Resources/deploymentScripts/CanCrudSimpleDeploymentScript--azsmnet253?api-version=2019-10-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTFiZmE2MzUtZjJiZi00MmYxLTg2YjUtODQ4YzY3NGZjMzIxL3Jlc291cmNlZ3JvdXBzL0RzLVRlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlc291cmNlcy9kZXBsb3ltZW50U2NyaXB0cy9DYW5DcnVkU2ltcGxlRGVwbG95bWVudFNjcmlwdC0tYXpzbW5ldDI1Mz9hcGktdmVyc2lvbj0yMDE5LTEwLTAxLXByZXZpZXc=",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-client-request-id": [
+ "9a3164f8-a714-433d-927b-b5fdeb2adb59"
+ ],
+ "Accept-Language": [
+ "en-US"
+ ],
+ "User-Agent": [
+ "FxVersion/4.6.28008.01",
+ "OSName/Windows",
+ "OSVersion/Microsoft.Windows.10.0.18363.",
+ "Microsoft.Azure.Management.ResourceManager.DeploymentScriptsClient/2.4.5.0"
+ ]
+ },
+ "ResponseHeaders": {
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-request-id": [
+ "54816cfa-fa18-41d6-9b68-9a08721e0864"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "11991"
+ ],
+ "x-ms-correlation-request-id": [
+ "82f8ff3d-870a-4959-8da7-8a4b19011020"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20191107T041054Z:82f8ff3d-870a-4959-8da7-8a4b19011020"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "X-Content-Type-Options": [
+ "nosniff"
+ ],
+ "Date": [
+ "Thu, 07 Nov 2019 04:10:54 GMT"
+ ],
+ "Content-Length": [
+ "1398"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ]
+ },
+ "ResponseBody": "{\r\n \"kind\": \"AzurePowerShell\",\r\n \"identity\": {\r\n \"type\": \"userAssigned\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"userAssignedIdentities\": {\r\n \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/filiz-user-assigned-msi\": {\r\n \"principalId\": \"97939ebd-fa2e-4055-8e3b-eb5252632e6a\",\r\n \"clientId\": \"0376d532-7364-4bec-8989-e11939b72a6a\"\r\n }\r\n }\r\n },\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"provisioningState\": \"ProvisioningResources\",\r\n \"azPowerShellVersion\": \"2.7.0\",\r\n \"scriptContent\": \"param([string] $helloWorld) Write-Output $helloWorld; $DeploymentScriptOutputs['output'] = $helloWorld\",\r\n \"arguments\": \"'Hello World'\",\r\n \"retentionInterval\": \"P1DT2H\",\r\n \"timeout\": \"P1D\",\r\n \"containerSettings\": {},\r\n \"status\": {\r\n \"storageAccountId\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.Storage/storageAccounts/btyb7hhkm5z6oazscripts\",\r\n \"startTime\": \"2019-11-07T04:10:00.4332008Z\"\r\n },\r\n \"cleanupPreference\": \"Always\"\r\n },\r\n \"id\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/ds-testrg/providers/Microsoft.Resources/deploymentScripts/CanCrudSimpleDeploymentScript--azsmnet253\",\r\n \"name\": \"CanCrudSimpleDeploymentScript--azsmnet253\"\r\n}",
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourcegroups/Ds-TestRg/providers/Microsoft.Resources/deploymentScripts/CanCrudSimpleDeploymentScript--azsmnet253?api-version=2019-10-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTFiZmE2MzUtZjJiZi00MmYxLTg2YjUtODQ4YzY3NGZjMzIxL3Jlc291cmNlZ3JvdXBzL0RzLVRlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlc291cmNlcy9kZXBsb3ltZW50U2NyaXB0cy9DYW5DcnVkU2ltcGxlRGVwbG95bWVudFNjcmlwdC0tYXpzbW5ldDI1Mz9hcGktdmVyc2lvbj0yMDE5LTEwLTAxLXByZXZpZXc=",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-client-request-id": [
+ "c859058e-0c8e-4407-9b8d-f67cbb9cabaa"
+ ],
+ "Accept-Language": [
+ "en-US"
+ ],
+ "User-Agent": [
+ "FxVersion/4.6.28008.01",
+ "OSName/Windows",
+ "OSVersion/Microsoft.Windows.10.0.18363.",
+ "Microsoft.Azure.Management.ResourceManager.DeploymentScriptsClient/2.4.5.0"
+ ]
+ },
+ "ResponseHeaders": {
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-request-id": [
+ "d0888120-8345-41d1-9336-a2a71e67f2d1"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "11990"
+ ],
+ "x-ms-correlation-request-id": [
+ "fb1d693a-bd9a-4b92-afeb-211c698eb09a"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20191107T041104Z:fb1d693a-bd9a-4b92-afeb-211c698eb09a"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "X-Content-Type-Options": [
+ "nosniff"
+ ],
+ "Date": [
+ "Thu, 07 Nov 2019 04:11:03 GMT"
+ ],
+ "Content-Length": [
+ "1571"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ]
+ },
+ "ResponseBody": "{\r\n \"kind\": \"AzurePowerShell\",\r\n \"identity\": {\r\n \"type\": \"userAssigned\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"userAssignedIdentities\": {\r\n \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/filiz-user-assigned-msi\": {\r\n \"principalId\": \"97939ebd-fa2e-4055-8e3b-eb5252632e6a\",\r\n \"clientId\": \"0376d532-7364-4bec-8989-e11939b72a6a\"\r\n }\r\n }\r\n },\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"azPowerShellVersion\": \"2.7.0\",\r\n \"scriptContent\": \"param([string] $helloWorld) Write-Output $helloWorld; $DeploymentScriptOutputs['output'] = $helloWorld\",\r\n \"arguments\": \"'Hello World'\",\r\n \"retentionInterval\": \"P1DT2H\",\r\n \"timeout\": \"P1D\",\r\n \"containerSettings\": {},\r\n \"status\": {\r\n \"containerInstanceId\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.ContainerInstance/containerGroups/btyb7hhkm5z6oazscripts\",\r\n \"storageAccountId\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.Storage/storageAccounts/btyb7hhkm5z6oazscripts\",\r\n \"startTime\": \"2019-11-07T04:10:00.4332008Z\"\r\n },\r\n \"cleanupPreference\": \"Always\"\r\n },\r\n \"id\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/ds-testrg/providers/Microsoft.Resources/deploymentScripts/CanCrudSimpleDeploymentScript--azsmnet253\",\r\n \"name\": \"CanCrudSimpleDeploymentScript--azsmnet253\"\r\n}",
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourcegroups/Ds-TestRg/providers/Microsoft.Resources/deploymentScripts/CanCrudSimpleDeploymentScript--azsmnet253?api-version=2019-10-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTFiZmE2MzUtZjJiZi00MmYxLTg2YjUtODQ4YzY3NGZjMzIxL3Jlc291cmNlZ3JvdXBzL0RzLVRlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlc291cmNlcy9kZXBsb3ltZW50U2NyaXB0cy9DYW5DcnVkU2ltcGxlRGVwbG95bWVudFNjcmlwdC0tYXpzbW5ldDI1Mz9hcGktdmVyc2lvbj0yMDE5LTEwLTAxLXByZXZpZXc=",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-client-request-id": [
+ "55b7ecd5-a871-4ccc-8014-5b0b2cb58e7d"
+ ],
+ "Accept-Language": [
+ "en-US"
+ ],
+ "User-Agent": [
+ "FxVersion/4.6.28008.01",
+ "OSName/Windows",
+ "OSVersion/Microsoft.Windows.10.0.18363.",
+ "Microsoft.Azure.Management.ResourceManager.DeploymentScriptsClient/2.4.5.0"
+ ]
+ },
+ "ResponseHeaders": {
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-request-id": [
+ "65a1b81c-568c-4b7a-aff7-05e246af6a43"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "11989"
+ ],
+ "x-ms-correlation-request-id": [
+ "6aab41d9-86b9-4e72-8fb3-b8d63bbcb154"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20191107T041114Z:6aab41d9-86b9-4e72-8fb3-b8d63bbcb154"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "X-Content-Type-Options": [
+ "nosniff"
+ ],
+ "Date": [
+ "Thu, 07 Nov 2019 04:11:13 GMT"
+ ],
+ "Content-Length": [
+ "1680"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ]
+ },
+ "ResponseBody": "{\r\n \"kind\": \"AzurePowerShell\",\r\n \"identity\": {\r\n \"type\": \"userAssigned\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"userAssignedIdentities\": {\r\n \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/filiz-user-assigned-msi\": {\r\n \"principalId\": \"97939ebd-fa2e-4055-8e3b-eb5252632e6a\",\r\n \"clientId\": \"0376d532-7364-4bec-8989-e11939b72a6a\"\r\n }\r\n }\r\n },\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"azPowerShellVersion\": \"2.7.0\",\r\n \"scriptContent\": \"param([string] $helloWorld) Write-Output $helloWorld; $DeploymentScriptOutputs['output'] = $helloWorld\",\r\n \"arguments\": \"'Hello World'\",\r\n \"retentionInterval\": \"P1DT2H\",\r\n \"timeout\": \"P1D\",\r\n \"containerSettings\": {},\r\n \"status\": {\r\n \"containerInstanceId\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.ContainerInstance/containerGroups/btyb7hhkm5z6oazscripts\",\r\n \"storageAccountId\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.Storage/storageAccounts/btyb7hhkm5z6oazscripts\",\r\n \"startTime\": \"2019-11-07T04:10:00.4332008Z\",\r\n \"endTime\": \"2019-11-07T04:11:05.8926494Z\"\r\n },\r\n \"outputs\": {\r\n \"output\": \"Hello World\"\r\n },\r\n \"cleanupPreference\": \"Always\"\r\n },\r\n \"id\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/ds-testrg/providers/Microsoft.Resources/deploymentScripts/CanCrudSimpleDeploymentScript--azsmnet253\",\r\n \"name\": \"CanCrudSimpleDeploymentScript--azsmnet253\"\r\n}",
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourcegroups/Ds-TestRg/providers/Microsoft.Resources/deploymentScripts?api-version=2019-10-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTFiZmE2MzUtZjJiZi00MmYxLTg2YjUtODQ4YzY3NGZjMzIxL3Jlc291cmNlZ3JvdXBzL0RzLVRlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlc291cmNlcy9kZXBsb3ltZW50U2NyaXB0cz9hcGktdmVyc2lvbj0yMDE5LTEwLTAxLXByZXZpZXc=",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-client-request-id": [
+ "43186ca6-9465-403c-85b1-39fc6e457f01"
+ ],
+ "Accept-Language": [
+ "en-US"
+ ],
+ "User-Agent": [
+ "FxVersion/4.6.28008.01",
+ "OSName/Windows",
+ "OSVersion/Microsoft.Windows.10.0.18363.",
+ "Microsoft.Azure.Management.ResourceManager.DeploymentScriptsClient/2.4.5.0"
+ ]
+ },
+ "ResponseHeaders": {
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-request-id": [
+ "4c2cb868-0597-43d1-ac04-c40660b5b358"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "11988"
+ ],
+ "x-ms-correlation-request-id": [
+ "69d5142e-2c9e-4f02-8bf1-e01b8ce42ba5"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20191107T041124Z:69d5142e-2c9e-4f02-8bf1-e01b8ce42ba5"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "X-Content-Type-Options": [
+ "nosniff"
+ ],
+ "Date": [
+ "Thu, 07 Nov 2019 04:11:24 GMT"
+ ],
+ "Content-Length": [
+ "1845"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ]
+ },
+ "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"kind\": \"AzurePowerShell\",\r\n \"identity\": {\r\n \"type\": \"userAssigned\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"userAssignedIdentities\": {\r\n \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/filiz-user-assigned-msi\": {\r\n \"principalId\": \"97939ebd-fa2e-4055-8e3b-eb5252632e6a\",\r\n \"clientId\": \"0376d532-7364-4bec-8989-e11939b72a6a\"\r\n }\r\n }\r\n },\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"azPowerShellVersion\": \"2.7.0\",\r\n \"scriptContent\": \"param([string] $helloWorld) Write-Output $helloWorld; $DeploymentScriptOutputs['output'] = $helloWorld\",\r\n \"arguments\": \"'Hello World'\",\r\n \"retentionInterval\": \"P1DT2H\",\r\n \"timeout\": \"P1D\",\r\n \"containerSettings\": {},\r\n \"status\": {\r\n \"containerInstanceId\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.ContainerInstance/containerGroups/btyb7hhkm5z6oazscripts\",\r\n \"storageAccountId\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.Storage/storageAccounts/btyb7hhkm5z6oazscripts\",\r\n \"startTime\": \"2019-11-07T04:10:00.4332008Z\",\r\n \"endTime\": \"2019-11-07T04:11:05.8926494Z\"\r\n },\r\n \"outputs\": {\r\n \"output\": \"Hello World\"\r\n },\r\n \"cleanupPreference\": \"Always\"\r\n },\r\n \"id\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/ds-testrg/providers/Microsoft.Resources/deploymentScripts/CanCrudSimpleDeploymentScript--azsmnet253\",\r\n \"name\": \"CanCrudSimpleDeploymentScript--azsmnet253\"\r\n }\r\n ]\r\n}",
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourcegroups/Ds-TestRg/providers/Microsoft.Resources/deploymentScripts?api-version=2019-10-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTFiZmE2MzUtZjJiZi00MmYxLTg2YjUtODQ4YzY3NGZjMzIxL3Jlc291cmNlZ3JvdXBzL0RzLVRlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlc291cmNlcy9kZXBsb3ltZW50U2NyaXB0cz9hcGktdmVyc2lvbj0yMDE5LTEwLTAxLXByZXZpZXc=",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-client-request-id": [
+ "82beeb45-4a63-4feb-8b16-e2dbd9360263"
+ ],
+ "Accept-Language": [
+ "en-US"
+ ],
+ "User-Agent": [
+ "FxVersion/4.6.28008.01",
+ "OSName/Windows",
+ "OSVersion/Microsoft.Windows.10.0.18363.",
+ "Microsoft.Azure.Management.ResourceManager.DeploymentScriptsClient/2.4.5.0"
+ ]
+ },
+ "ResponseHeaders": {
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "11986"
+ ],
+ "x-ms-request-id": [
+ "7146b2d6-b065-459a-b4d4-a5270edf52c8"
+ ],
+ "x-ms-correlation-request-id": [
+ "7146b2d6-b065-459a-b4d4-a5270edf52c8"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20191107T041126Z:7146b2d6-b065-459a-b4d4-a5270edf52c8"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "X-Content-Type-Options": [
+ "nosniff"
+ ],
+ "Date": [
+ "Thu, 07 Nov 2019 04:11:26 GMT"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Content-Length": [
+ "12"
+ ]
+ },
+ "ResponseBody": "{\r\n \"value\": []\r\n}",
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/providers/Microsoft.Resources/deploymentScripts?api-version=2019-10-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTFiZmE2MzUtZjJiZi00MmYxLTg2YjUtODQ4YzY3NGZjMzIxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVzb3VyY2VzL2RlcGxveW1lbnRTY3JpcHRzP2FwaS12ZXJzaW9uPTIwMTktMTAtMDEtcHJldmlldw==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-client-request-id": [
+ "c1793105-31e9-4bfc-9b69-45ef130444b8"
+ ],
+ "Accept-Language": [
+ "en-US"
+ ],
+ "User-Agent": [
+ "FxVersion/4.6.28008.01",
+ "OSName/Windows",
+ "OSVersion/Microsoft.Windows.10.0.18363.",
+ "Microsoft.Azure.Management.ResourceManager.DeploymentScriptsClient/2.4.5.0"
+ ]
+ },
+ "ResponseHeaders": {
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-request-id": [
+ "6beba91b-bffa-4d2c-af47-9817e743df43"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "11987"
+ ],
+ "x-ms-correlation-request-id": [
+ "7c367196-ac1d-4286-ba5c-9ba0d42017cd"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20191107T041125Z:7c367196-ac1d-4286-ba5c-9ba0d42017cd"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "X-Content-Type-Options": [
+ "nosniff"
+ ],
+ "Date": [
+ "Thu, 07 Nov 2019 04:11:24 GMT"
+ ],
+ "Content-Length": [
+ "1845"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ]
+ },
+ "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"kind\": \"AzurePowerShell\",\r\n \"identity\": {\r\n \"type\": \"userAssigned\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"userAssignedIdentities\": {\r\n \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/filiz-user-assigned-msi\": {\r\n \"principalId\": \"97939ebd-fa2e-4055-8e3b-eb5252632e6a\",\r\n \"clientId\": \"0376d532-7364-4bec-8989-e11939b72a6a\"\r\n }\r\n }\r\n },\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"azPowerShellVersion\": \"2.7.0\",\r\n \"scriptContent\": \"param([string] $helloWorld) Write-Output $helloWorld; $DeploymentScriptOutputs['output'] = $helloWorld\",\r\n \"arguments\": \"'Hello World'\",\r\n \"retentionInterval\": \"P1DT2H\",\r\n \"timeout\": \"P1D\",\r\n \"containerSettings\": {},\r\n \"status\": {\r\n \"containerInstanceId\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.ContainerInstance/containerGroups/btyb7hhkm5z6oazscripts\",\r\n \"storageAccountId\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.Storage/storageAccounts/btyb7hhkm5z6oazscripts\",\r\n \"startTime\": \"2019-11-07T04:10:00.4332008Z\",\r\n \"endTime\": \"2019-11-07T04:11:05.8926494Z\"\r\n },\r\n \"outputs\": {\r\n \"output\": \"Hello World\"\r\n },\r\n \"cleanupPreference\": \"Always\"\r\n },\r\n \"id\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/ds-testrg/providers/Microsoft.Resources/deploymentScripts/CanCrudSimpleDeploymentScript--azsmnet253\",\r\n \"name\": \"CanCrudSimpleDeploymentScript--azsmnet253\"\r\n }\r\n ]\r\n}",
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/providers/Microsoft.Resources/deploymentScripts?api-version=2019-10-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTFiZmE2MzUtZjJiZi00MmYxLTg2YjUtODQ4YzY3NGZjMzIxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVzb3VyY2VzL2RlcGxveW1lbnRTY3JpcHRzP2FwaS12ZXJzaW9uPTIwMTktMTAtMDEtcHJldmlldw==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-client-request-id": [
+ "ca4c6d70-ddb9-4292-8cc3-80bed70b9617"
+ ],
+ "Accept-Language": [
+ "en-US"
+ ],
+ "User-Agent": [
+ "FxVersion/4.6.28008.01",
+ "OSName/Windows",
+ "OSVersion/Microsoft.Windows.10.0.18363.",
+ "Microsoft.Azure.Management.ResourceManager.DeploymentScriptsClient/2.4.5.0"
+ ]
+ },
+ "ResponseHeaders": {
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "11985"
+ ],
+ "x-ms-request-id": [
+ "88350e29-3e77-4a38-88da-bfa90ba89c3a"
+ ],
+ "x-ms-correlation-request-id": [
+ "88350e29-3e77-4a38-88da-bfa90ba89c3a"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20191107T041126Z:88350e29-3e77-4a38-88da-bfa90ba89c3a"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "X-Content-Type-Options": [
+ "nosniff"
+ ],
+ "Date": [
+ "Thu, 07 Nov 2019 04:11:26 GMT"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Content-Length": [
+ "12"
+ ]
+ },
+ "ResponseBody": "{\r\n \"value\": []\r\n}",
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourcegroups/Ds-TestRg/providers/Microsoft.Resources/deploymentScripts/CanCrudSimpleDeploymentScript--azsmnet253?api-version=2019-10-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTFiZmE2MzUtZjJiZi00MmYxLTg2YjUtODQ4YzY3NGZjMzIxL3Jlc291cmNlZ3JvdXBzL0RzLVRlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlc291cmNlcy9kZXBsb3ltZW50U2NyaXB0cy9DYW5DcnVkU2ltcGxlRGVwbG95bWVudFNjcmlwdC0tYXpzbW5ldDI1Mz9hcGktdmVyc2lvbj0yMDE5LTEwLTAxLXByZXZpZXc=",
+ "RequestMethod": "DELETE",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-client-request-id": [
+ "b8b7bf42-3b28-49a3-82b1-5e336ae1941d"
+ ],
+ "Accept-Language": [
+ "en-US"
+ ],
+ "User-Agent": [
+ "FxVersion/4.6.28008.01",
+ "OSName/Windows",
+ "OSVersion/Microsoft.Windows.10.0.18363.",
+ "Microsoft.Azure.Management.ResourceManager.DeploymentScriptsClient/2.4.5.0"
+ ]
+ },
+ "ResponseHeaders": {
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-request-id": [
+ "7bc35bda-19e0-4fdb-bec5-321aa3cb503e"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ],
+ "x-ms-ratelimit-remaining-subscription-deletes": [
+ "14999"
+ ],
+ "x-ms-correlation-request-id": [
+ "f9d665ad-aafb-4d32-8231-c7e21dfe810d"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20191107T041126Z:f9d665ad-aafb-4d32-8231-c7e21dfe810d"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "X-Content-Type-Options": [
+ "nosniff"
+ ],
+ "Date": [
+ "Thu, 07 Nov 2019 04:11:26 GMT"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Content-Length": [
+ "0"
+ ]
+ },
+ "ResponseBody": "",
+ "StatusCode": 200
+ }
+ ],
+ "Names": {
+ "CanCrudSimpleDeploymentScript": [
+ "azsmnet253"
+ ]
+ },
+ "Variables": {
+ "SubscriptionId": "a1bfa635-f2bf-42f1-86b5-848c674fc321"
+ }
+}
\ No newline at end of file
diff --git a/sdk/resources/Microsoft.Azure.Management.Resource/tests/SessionRecords/LiveDeploymentScriptsTests/CanGetDeploymentScriptExecutionLogs.json b/sdk/resources/Microsoft.Azure.Management.Resource/tests/SessionRecords/LiveDeploymentScriptsTests/CanGetDeploymentScriptExecutionLogs.json
new file mode 100644
index 000000000000..dc74184db103
--- /dev/null
+++ b/sdk/resources/Microsoft.Azure.Management.Resource/tests/SessionRecords/LiveDeploymentScriptsTests/CanGetDeploymentScriptExecutionLogs.json
@@ -0,0 +1,1152 @@
+{
+ "Entries": [
+ {
+ "RequestUri": "/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourcegroups/Ds-TestRg/providers/Microsoft.Resources/deploymentScripts/CanGetDeploymentScriptExecutionLogs--azsmnet5223?api-version=2019-10-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTFiZmE2MzUtZjJiZi00MmYxLTg2YjUtODQ4YzY3NGZjMzIxL3Jlc291cmNlZ3JvdXBzL0RzLVRlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlc291cmNlcy9kZXBsb3ltZW50U2NyaXB0cy9DYW5HZXREZXBsb3ltZW50U2NyaXB0RXhlY3V0aW9uTG9ncy0tYXpzbW5ldDUyMjM/YXBpLXZlcnNpb249MjAxOS0xMC0wMS1wcmV2aWV3",
+ "RequestMethod": "PUT",
+ "RequestBody": "{\r\n \"kind\": \"AzurePowerShell\",\r\n \"properties\": {\r\n \"scriptContent\": \"param([string] $helloWorld) Write-Output $helloWorld; $DeploymentScriptOutputs['output'] = $helloWorld\",\r\n \"arguments\": \"'Hello World'\",\r\n \"retentionInterval\": \"P1DT2H\",\r\n \"azPowerShellVersion\": \"2.7.0\"\r\n },\r\n \"identity\": {\r\n \"type\": \"UserAssigned\",\r\n \"userAssignedIdentities\": {\r\n \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/filiz-user-assigned-msi\": {}\r\n }\r\n },\r\n \"location\": \"West US\"\r\n}",
+ "RequestHeaders": {
+ "x-ms-client-request-id": [
+ "3529bee1-f7cd-4386-a663-40a1d2236761"
+ ],
+ "Accept-Language": [
+ "en-US"
+ ],
+ "User-Agent": [
+ "FxVersion/4.6.28008.01",
+ "OSName/Windows",
+ "OSVersion/Microsoft.Windows.10.0.18363.",
+ "Microsoft.Azure.Management.ResourceManager.DeploymentScriptsClient/2.4.5.0"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Content-Length": [
+ "584"
+ ]
+ },
+ "ResponseHeaders": {
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "Retry-After": [
+ "17"
+ ],
+ "Azure-AsyncOperation": [
+ "https://management.azure.com/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/ds-testrg/providers/Microsoft.Resources/deploymentScripts/CanGetDeploymentScriptExecutionLogs--azsmnet5223/operationresults/0?api-version=2019-10-01-preview"
+ ],
+ "x-ms-request-id": [
+ "49ba66c3-c325-41d0-8faa-850a7c791d25"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ],
+ "x-ms-ratelimit-remaining-subscription-writes": [
+ "1199"
+ ],
+ "x-ms-correlation-request-id": [
+ "3a722ecf-2c5e-4616-b629-82ee12eaa872"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20191108T032216Z:3a722ecf-2c5e-4616-b629-82ee12eaa872"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "X-Content-Type-Options": [
+ "nosniff"
+ ],
+ "Date": [
+ "Fri, 08 Nov 2019 03:22:15 GMT"
+ ],
+ "Content-Length": [
+ "1168"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ]
+ },
+ "ResponseBody": "{\r\n \"kind\": \"AzurePowerShell\",\r\n \"identity\": {\r\n \"type\": \"userAssigned\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"userAssignedIdentities\": {\r\n \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/filiz-user-assigned-msi\": {\r\n \"principalId\": \"97939ebd-fa2e-4055-8e3b-eb5252632e6a\",\r\n \"clientId\": \"0376d532-7364-4bec-8989-e11939b72a6a\"\r\n }\r\n }\r\n },\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"azPowerShellVersion\": \"2.7.0\",\r\n \"scriptContent\": \"param([string] $helloWorld) Write-Output $helloWorld; $DeploymentScriptOutputs['output'] = $helloWorld\",\r\n \"arguments\": \"'Hello World'\",\r\n \"retentionInterval\": \"P1DT2H\",\r\n \"timeout\": \"P1D\",\r\n \"containerSettings\": {},\r\n \"status\": {},\r\n \"cleanupPreference\": \"Always\"\r\n },\r\n \"id\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/ds-testrg/providers/Microsoft.Resources/deploymentScripts/CanGetDeploymentScriptExecutionLogs--azsmnet5223\",\r\n \"name\": \"CanGetDeploymentScriptExecutionLogs--azsmnet5223\"\r\n}",
+ "StatusCode": 201
+ },
+ {
+ "RequestUri": "/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourcegroups/Ds-TestRg/providers/Microsoft.Resources/deploymentScripts/CanGetDeploymentScriptExecutionLogs--azsmnet5223?api-version=2019-10-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTFiZmE2MzUtZjJiZi00MmYxLTg2YjUtODQ4YzY3NGZjMzIxL3Jlc291cmNlZ3JvdXBzL0RzLVRlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlc291cmNlcy9kZXBsb3ltZW50U2NyaXB0cy9DYW5HZXREZXBsb3ltZW50U2NyaXB0RXhlY3V0aW9uTG9ncy0tYXpzbW5ldDUyMjM/YXBpLXZlcnNpb249MjAxOS0xMC0wMS1wcmV2aWV3",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-client-request-id": [
+ "3c267c2b-8494-4d53-b8d1-2c0b6ecbef6e"
+ ],
+ "Accept-Language": [
+ "en-US"
+ ],
+ "User-Agent": [
+ "FxVersion/4.6.28008.01",
+ "OSName/Windows",
+ "OSVersion/Microsoft.Windows.10.0.18363.",
+ "Microsoft.Azure.Management.ResourceManager.DeploymentScriptsClient/2.4.5.0"
+ ]
+ },
+ "ResponseHeaders": {
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-request-id": [
+ "b393222f-350d-463d-9b52-42e778ac836d"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "11999"
+ ],
+ "x-ms-correlation-request-id": [
+ "ea9b316f-17a7-4950-81cd-eae34d19b712"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20191108T032216Z:ea9b316f-17a7-4950-81cd-eae34d19b712"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "X-Content-Type-Options": [
+ "nosniff"
+ ],
+ "Date": [
+ "Fri, 08 Nov 2019 03:22:15 GMT"
+ ],
+ "Content-Length": [
+ "1168"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ]
+ },
+ "ResponseBody": "{\r\n \"kind\": \"AzurePowerShell\",\r\n \"identity\": {\r\n \"type\": \"userAssigned\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"userAssignedIdentities\": {\r\n \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/filiz-user-assigned-msi\": {\r\n \"principalId\": \"97939ebd-fa2e-4055-8e3b-eb5252632e6a\",\r\n \"clientId\": \"0376d532-7364-4bec-8989-e11939b72a6a\"\r\n }\r\n }\r\n },\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"azPowerShellVersion\": \"2.7.0\",\r\n \"scriptContent\": \"param([string] $helloWorld) Write-Output $helloWorld; $DeploymentScriptOutputs['output'] = $helloWorld\",\r\n \"arguments\": \"'Hello World'\",\r\n \"retentionInterval\": \"P1DT2H\",\r\n \"timeout\": \"P1D\",\r\n \"containerSettings\": {},\r\n \"status\": {},\r\n \"cleanupPreference\": \"Always\"\r\n },\r\n \"id\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/ds-testrg/providers/Microsoft.Resources/deploymentScripts/CanGetDeploymentScriptExecutionLogs--azsmnet5223\",\r\n \"name\": \"CanGetDeploymentScriptExecutionLogs--azsmnet5223\"\r\n}",
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourcegroups/Ds-TestRg/providers/Microsoft.Resources/deploymentScripts/CanGetDeploymentScriptExecutionLogs--azsmnet5223?api-version=2019-10-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTFiZmE2MzUtZjJiZi00MmYxLTg2YjUtODQ4YzY3NGZjMzIxL3Jlc291cmNlZ3JvdXBzL0RzLVRlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlc291cmNlcy9kZXBsb3ltZW50U2NyaXB0cy9DYW5HZXREZXBsb3ltZW50U2NyaXB0RXhlY3V0aW9uTG9ncy0tYXpzbW5ldDUyMjM/YXBpLXZlcnNpb249MjAxOS0xMC0wMS1wcmV2aWV3",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-client-request-id": [
+ "24736a81-1256-499e-8b1e-28753e1b4491"
+ ],
+ "Accept-Language": [
+ "en-US"
+ ],
+ "User-Agent": [
+ "FxVersion/4.6.28008.01",
+ "OSName/Windows",
+ "OSVersion/Microsoft.Windows.10.0.18363.",
+ "Microsoft.Azure.Management.ResourceManager.DeploymentScriptsClient/2.4.5.0"
+ ]
+ },
+ "ResponseHeaders": {
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-request-id": [
+ "93f2b2cb-dfd4-4d36-8137-349c01d10738"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "11998"
+ ],
+ "x-ms-correlation-request-id": [
+ "45c1d992-9764-4574-a3f2-fae8cb9d23c8"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20191108T032226Z:45c1d992-9764-4574-a3f2-fae8cb9d23c8"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "X-Content-Type-Options": [
+ "nosniff"
+ ],
+ "Date": [
+ "Fri, 08 Nov 2019 03:22:26 GMT"
+ ],
+ "Content-Length": [
+ "1181"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ]
+ },
+ "ResponseBody": "{\r\n \"kind\": \"AzurePowerShell\",\r\n \"identity\": {\r\n \"type\": \"userAssigned\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"userAssignedIdentities\": {\r\n \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/filiz-user-assigned-msi\": {\r\n \"principalId\": \"97939ebd-fa2e-4055-8e3b-eb5252632e6a\",\r\n \"clientId\": \"0376d532-7364-4bec-8989-e11939b72a6a\"\r\n }\r\n }\r\n },\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"provisioningState\": \"ProvisioningResources\",\r\n \"azPowerShellVersion\": \"2.7.0\",\r\n \"scriptContent\": \"param([string] $helloWorld) Write-Output $helloWorld; $DeploymentScriptOutputs['output'] = $helloWorld\",\r\n \"arguments\": \"'Hello World'\",\r\n \"retentionInterval\": \"P1DT2H\",\r\n \"timeout\": \"P1D\",\r\n \"containerSettings\": {},\r\n \"status\": {},\r\n \"cleanupPreference\": \"Always\"\r\n },\r\n \"id\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/ds-testrg/providers/Microsoft.Resources/deploymentScripts/CanGetDeploymentScriptExecutionLogs--azsmnet5223\",\r\n \"name\": \"CanGetDeploymentScriptExecutionLogs--azsmnet5223\"\r\n}",
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourcegroups/Ds-TestRg/providers/Microsoft.Resources/deploymentScripts/CanGetDeploymentScriptExecutionLogs--azsmnet5223?api-version=2019-10-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTFiZmE2MzUtZjJiZi00MmYxLTg2YjUtODQ4YzY3NGZjMzIxL3Jlc291cmNlZ3JvdXBzL0RzLVRlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlc291cmNlcy9kZXBsb3ltZW50U2NyaXB0cy9DYW5HZXREZXBsb3ltZW50U2NyaXB0RXhlY3V0aW9uTG9ncy0tYXpzbW5ldDUyMjM/YXBpLXZlcnNpb249MjAxOS0xMC0wMS1wcmV2aWV3",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-client-request-id": [
+ "48e0dd57-32ee-4b56-b7f1-e147e273f17d"
+ ],
+ "Accept-Language": [
+ "en-US"
+ ],
+ "User-Agent": [
+ "FxVersion/4.6.28008.01",
+ "OSName/Windows",
+ "OSVersion/Microsoft.Windows.10.0.18363.",
+ "Microsoft.Azure.Management.ResourceManager.DeploymentScriptsClient/2.4.5.0"
+ ]
+ },
+ "ResponseHeaders": {
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-request-id": [
+ "a333d89f-f849-4345-a4de-bc4c2ed49d48"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "11997"
+ ],
+ "x-ms-correlation-request-id": [
+ "bb3049f5-f35b-4944-a46f-f68913c8aa27"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20191108T032236Z:bb3049f5-f35b-4944-a46f-f68913c8aa27"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "X-Content-Type-Options": [
+ "nosniff"
+ ],
+ "Date": [
+ "Fri, 08 Nov 2019 03:22:36 GMT"
+ ],
+ "Content-Length": [
+ "1181"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ]
+ },
+ "ResponseBody": "{\r\n \"kind\": \"AzurePowerShell\",\r\n \"identity\": {\r\n \"type\": \"userAssigned\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"userAssignedIdentities\": {\r\n \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/filiz-user-assigned-msi\": {\r\n \"principalId\": \"97939ebd-fa2e-4055-8e3b-eb5252632e6a\",\r\n \"clientId\": \"0376d532-7364-4bec-8989-e11939b72a6a\"\r\n }\r\n }\r\n },\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"provisioningState\": \"ProvisioningResources\",\r\n \"azPowerShellVersion\": \"2.7.0\",\r\n \"scriptContent\": \"param([string] $helloWorld) Write-Output $helloWorld; $DeploymentScriptOutputs['output'] = $helloWorld\",\r\n \"arguments\": \"'Hello World'\",\r\n \"retentionInterval\": \"P1DT2H\",\r\n \"timeout\": \"P1D\",\r\n \"containerSettings\": {},\r\n \"status\": {},\r\n \"cleanupPreference\": \"Always\"\r\n },\r\n \"id\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/ds-testrg/providers/Microsoft.Resources/deploymentScripts/CanGetDeploymentScriptExecutionLogs--azsmnet5223\",\r\n \"name\": \"CanGetDeploymentScriptExecutionLogs--azsmnet5223\"\r\n}",
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourcegroups/Ds-TestRg/providers/Microsoft.Resources/deploymentScripts/CanGetDeploymentScriptExecutionLogs--azsmnet5223?api-version=2019-10-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTFiZmE2MzUtZjJiZi00MmYxLTg2YjUtODQ4YzY3NGZjMzIxL3Jlc291cmNlZ3JvdXBzL0RzLVRlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlc291cmNlcy9kZXBsb3ltZW50U2NyaXB0cy9DYW5HZXREZXBsb3ltZW50U2NyaXB0RXhlY3V0aW9uTG9ncy0tYXpzbW5ldDUyMjM/YXBpLXZlcnNpb249MjAxOS0xMC0wMS1wcmV2aWV3",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-client-request-id": [
+ "030e5f77-ad74-41e6-8256-c48cfc3a81a7"
+ ],
+ "Accept-Language": [
+ "en-US"
+ ],
+ "User-Agent": [
+ "FxVersion/4.6.28008.01",
+ "OSName/Windows",
+ "OSVersion/Microsoft.Windows.10.0.18363.",
+ "Microsoft.Azure.Management.ResourceManager.DeploymentScriptsClient/2.4.5.0"
+ ]
+ },
+ "ResponseHeaders": {
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-request-id": [
+ "12ac14ae-735d-48e8-ba66-0206bff01f87"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "11996"
+ ],
+ "x-ms-correlation-request-id": [
+ "430edc1f-a884-4882-a5c0-200ee052c6f7"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20191108T032247Z:430edc1f-a884-4882-a5c0-200ee052c6f7"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "X-Content-Type-Options": [
+ "nosniff"
+ ],
+ "Date": [
+ "Fri, 08 Nov 2019 03:22:46 GMT"
+ ],
+ "Content-Length": [
+ "1181"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ]
+ },
+ "ResponseBody": "{\r\n \"kind\": \"AzurePowerShell\",\r\n \"identity\": {\r\n \"type\": \"userAssigned\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"userAssignedIdentities\": {\r\n \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/filiz-user-assigned-msi\": {\r\n \"principalId\": \"97939ebd-fa2e-4055-8e3b-eb5252632e6a\",\r\n \"clientId\": \"0376d532-7364-4bec-8989-e11939b72a6a\"\r\n }\r\n }\r\n },\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"provisioningState\": \"ProvisioningResources\",\r\n \"azPowerShellVersion\": \"2.7.0\",\r\n \"scriptContent\": \"param([string] $helloWorld) Write-Output $helloWorld; $DeploymentScriptOutputs['output'] = $helloWorld\",\r\n \"arguments\": \"'Hello World'\",\r\n \"retentionInterval\": \"P1DT2H\",\r\n \"timeout\": \"P1D\",\r\n \"containerSettings\": {},\r\n \"status\": {},\r\n \"cleanupPreference\": \"Always\"\r\n },\r\n \"id\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/ds-testrg/providers/Microsoft.Resources/deploymentScripts/CanGetDeploymentScriptExecutionLogs--azsmnet5223\",\r\n \"name\": \"CanGetDeploymentScriptExecutionLogs--azsmnet5223\"\r\n}",
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourcegroups/Ds-TestRg/providers/Microsoft.Resources/deploymentScripts/CanGetDeploymentScriptExecutionLogs--azsmnet5223?api-version=2019-10-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTFiZmE2MzUtZjJiZi00MmYxLTg2YjUtODQ4YzY3NGZjMzIxL3Jlc291cmNlZ3JvdXBzL0RzLVRlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlc291cmNlcy9kZXBsb3ltZW50U2NyaXB0cy9DYW5HZXREZXBsb3ltZW50U2NyaXB0RXhlY3V0aW9uTG9ncy0tYXpzbW5ldDUyMjM/YXBpLXZlcnNpb249MjAxOS0xMC0wMS1wcmV2aWV3",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-client-request-id": [
+ "e67cbfae-3148-4b5e-999d-a51d58702362"
+ ],
+ "Accept-Language": [
+ "en-US"
+ ],
+ "User-Agent": [
+ "FxVersion/4.6.28008.01",
+ "OSName/Windows",
+ "OSVersion/Microsoft.Windows.10.0.18363.",
+ "Microsoft.Azure.Management.ResourceManager.DeploymentScriptsClient/2.4.5.0"
+ ]
+ },
+ "ResponseHeaders": {
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-request-id": [
+ "7649818e-f1f7-4382-83bd-b22882f03a56"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "11995"
+ ],
+ "x-ms-correlation-request-id": [
+ "b5457da7-7864-43b4-8af4-5c4f6ce385db"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20191108T032257Z:b5457da7-7864-43b4-8af4-5c4f6ce385db"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "X-Content-Type-Options": [
+ "nosniff"
+ ],
+ "Date": [
+ "Fri, 08 Nov 2019 03:22:56 GMT"
+ ],
+ "Content-Length": [
+ "1181"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ]
+ },
+ "ResponseBody": "{\r\n \"kind\": \"AzurePowerShell\",\r\n \"identity\": {\r\n \"type\": \"userAssigned\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"userAssignedIdentities\": {\r\n \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/filiz-user-assigned-msi\": {\r\n \"principalId\": \"97939ebd-fa2e-4055-8e3b-eb5252632e6a\",\r\n \"clientId\": \"0376d532-7364-4bec-8989-e11939b72a6a\"\r\n }\r\n }\r\n },\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"provisioningState\": \"ProvisioningResources\",\r\n \"azPowerShellVersion\": \"2.7.0\",\r\n \"scriptContent\": \"param([string] $helloWorld) Write-Output $helloWorld; $DeploymentScriptOutputs['output'] = $helloWorld\",\r\n \"arguments\": \"'Hello World'\",\r\n \"retentionInterval\": \"P1DT2H\",\r\n \"timeout\": \"P1D\",\r\n \"containerSettings\": {},\r\n \"status\": {},\r\n \"cleanupPreference\": \"Always\"\r\n },\r\n \"id\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/ds-testrg/providers/Microsoft.Resources/deploymentScripts/CanGetDeploymentScriptExecutionLogs--azsmnet5223\",\r\n \"name\": \"CanGetDeploymentScriptExecutionLogs--azsmnet5223\"\r\n}",
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourcegroups/Ds-TestRg/providers/Microsoft.Resources/deploymentScripts/CanGetDeploymentScriptExecutionLogs--azsmnet5223?api-version=2019-10-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTFiZmE2MzUtZjJiZi00MmYxLTg2YjUtODQ4YzY3NGZjMzIxL3Jlc291cmNlZ3JvdXBzL0RzLVRlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlc291cmNlcy9kZXBsb3ltZW50U2NyaXB0cy9DYW5HZXREZXBsb3ltZW50U2NyaXB0RXhlY3V0aW9uTG9ncy0tYXpzbW5ldDUyMjM/YXBpLXZlcnNpb249MjAxOS0xMC0wMS1wcmV2aWV3",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-client-request-id": [
+ "d51cd678-0c99-46e0-ab7a-9847ca1ae2fa"
+ ],
+ "Accept-Language": [
+ "en-US"
+ ],
+ "User-Agent": [
+ "FxVersion/4.6.28008.01",
+ "OSName/Windows",
+ "OSVersion/Microsoft.Windows.10.0.18363.",
+ "Microsoft.Azure.Management.ResourceManager.DeploymentScriptsClient/2.4.5.0"
+ ]
+ },
+ "ResponseHeaders": {
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-request-id": [
+ "9875466c-ddea-4179-bf35-356b97ec2288"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "11994"
+ ],
+ "x-ms-correlation-request-id": [
+ "dfa38946-fd05-4916-bd3e-ee311ca02ba9"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20191108T032307Z:dfa38946-fd05-4916-bd3e-ee311ca02ba9"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "X-Content-Type-Options": [
+ "nosniff"
+ ],
+ "Date": [
+ "Fri, 08 Nov 2019 03:23:06 GMT"
+ ],
+ "Content-Length": [
+ "1412"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ]
+ },
+ "ResponseBody": "{\r\n \"kind\": \"AzurePowerShell\",\r\n \"identity\": {\r\n \"type\": \"userAssigned\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"userAssignedIdentities\": {\r\n \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/filiz-user-assigned-msi\": {\r\n \"principalId\": \"97939ebd-fa2e-4055-8e3b-eb5252632e6a\",\r\n \"clientId\": \"0376d532-7364-4bec-8989-e11939b72a6a\"\r\n }\r\n }\r\n },\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"provisioningState\": \"ProvisioningResources\",\r\n \"azPowerShellVersion\": \"2.7.0\",\r\n \"scriptContent\": \"param([string] $helloWorld) Write-Output $helloWorld; $DeploymentScriptOutputs['output'] = $helloWorld\",\r\n \"arguments\": \"'Hello World'\",\r\n \"retentionInterval\": \"P1DT2H\",\r\n \"timeout\": \"P1D\",\r\n \"containerSettings\": {},\r\n \"status\": {\r\n \"storageAccountId\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.Storage/storageAccounts/pf2muywdlwhvqazscripts\",\r\n \"startTime\": \"2019-11-08T03:22:58.3829498Z\"\r\n },\r\n \"cleanupPreference\": \"Always\"\r\n },\r\n \"id\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/ds-testrg/providers/Microsoft.Resources/deploymentScripts/CanGetDeploymentScriptExecutionLogs--azsmnet5223\",\r\n \"name\": \"CanGetDeploymentScriptExecutionLogs--azsmnet5223\"\r\n}",
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourcegroups/Ds-TestRg/providers/Microsoft.Resources/deploymentScripts/CanGetDeploymentScriptExecutionLogs--azsmnet5223?api-version=2019-10-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTFiZmE2MzUtZjJiZi00MmYxLTg2YjUtODQ4YzY3NGZjMzIxL3Jlc291cmNlZ3JvdXBzL0RzLVRlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlc291cmNlcy9kZXBsb3ltZW50U2NyaXB0cy9DYW5HZXREZXBsb3ltZW50U2NyaXB0RXhlY3V0aW9uTG9ncy0tYXpzbW5ldDUyMjM/YXBpLXZlcnNpb249MjAxOS0xMC0wMS1wcmV2aWV3",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-client-request-id": [
+ "d8295ea3-d727-4078-9146-ba706233ad2f"
+ ],
+ "Accept-Language": [
+ "en-US"
+ ],
+ "User-Agent": [
+ "FxVersion/4.6.28008.01",
+ "OSName/Windows",
+ "OSVersion/Microsoft.Windows.10.0.18363.",
+ "Microsoft.Azure.Management.ResourceManager.DeploymentScriptsClient/2.4.5.0"
+ ]
+ },
+ "ResponseHeaders": {
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-request-id": [
+ "2bbf951c-1f2f-423b-8d95-5abd7ae02ff1"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "11993"
+ ],
+ "x-ms-correlation-request-id": [
+ "1cb6f144-6fe4-478e-8d8d-1814c2db88b7"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20191108T032317Z:1cb6f144-6fe4-478e-8d8d-1814c2db88b7"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "X-Content-Type-Options": [
+ "nosniff"
+ ],
+ "Date": [
+ "Fri, 08 Nov 2019 03:23:16 GMT"
+ ],
+ "Content-Length": [
+ "1412"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ]
+ },
+ "ResponseBody": "{\r\n \"kind\": \"AzurePowerShell\",\r\n \"identity\": {\r\n \"type\": \"userAssigned\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"userAssignedIdentities\": {\r\n \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/filiz-user-assigned-msi\": {\r\n \"principalId\": \"97939ebd-fa2e-4055-8e3b-eb5252632e6a\",\r\n \"clientId\": \"0376d532-7364-4bec-8989-e11939b72a6a\"\r\n }\r\n }\r\n },\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"provisioningState\": \"ProvisioningResources\",\r\n \"azPowerShellVersion\": \"2.7.0\",\r\n \"scriptContent\": \"param([string] $helloWorld) Write-Output $helloWorld; $DeploymentScriptOutputs['output'] = $helloWorld\",\r\n \"arguments\": \"'Hello World'\",\r\n \"retentionInterval\": \"P1DT2H\",\r\n \"timeout\": \"P1D\",\r\n \"containerSettings\": {},\r\n \"status\": {\r\n \"storageAccountId\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.Storage/storageAccounts/pf2muywdlwhvqazscripts\",\r\n \"startTime\": \"2019-11-08T03:22:58.3829498Z\"\r\n },\r\n \"cleanupPreference\": \"Always\"\r\n },\r\n \"id\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/ds-testrg/providers/Microsoft.Resources/deploymentScripts/CanGetDeploymentScriptExecutionLogs--azsmnet5223\",\r\n \"name\": \"CanGetDeploymentScriptExecutionLogs--azsmnet5223\"\r\n}",
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourcegroups/Ds-TestRg/providers/Microsoft.Resources/deploymentScripts/CanGetDeploymentScriptExecutionLogs--azsmnet5223?api-version=2019-10-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTFiZmE2MzUtZjJiZi00MmYxLTg2YjUtODQ4YzY3NGZjMzIxL3Jlc291cmNlZ3JvdXBzL0RzLVRlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlc291cmNlcy9kZXBsb3ltZW50U2NyaXB0cy9DYW5HZXREZXBsb3ltZW50U2NyaXB0RXhlY3V0aW9uTG9ncy0tYXpzbW5ldDUyMjM/YXBpLXZlcnNpb249MjAxOS0xMC0wMS1wcmV2aWV3",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-client-request-id": [
+ "6b8e8fc5-a520-4ab2-aa8f-f011afbe6036"
+ ],
+ "Accept-Language": [
+ "en-US"
+ ],
+ "User-Agent": [
+ "FxVersion/4.6.28008.01",
+ "OSName/Windows",
+ "OSVersion/Microsoft.Windows.10.0.18363.",
+ "Microsoft.Azure.Management.ResourceManager.DeploymentScriptsClient/2.4.5.0"
+ ]
+ },
+ "ResponseHeaders": {
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-request-id": [
+ "782c63f0-00c1-42c7-b6c2-34372a0995c9"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "11992"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ],
+ "x-ms-correlation-request-id": [
+ "4c219443-9b00-45e3-9a5c-01636ee2fed9"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20191108T032327Z:4c219443-9b00-45e3-9a5c-01636ee2fed9"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "X-Content-Type-Options": [
+ "nosniff"
+ ],
+ "Date": [
+ "Fri, 08 Nov 2019 03:23:26 GMT"
+ ],
+ "Content-Length": [
+ "1412"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ]
+ },
+ "ResponseBody": "{\r\n \"kind\": \"AzurePowerShell\",\r\n \"identity\": {\r\n \"type\": \"userAssigned\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"userAssignedIdentities\": {\r\n \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/filiz-user-assigned-msi\": {\r\n \"principalId\": \"97939ebd-fa2e-4055-8e3b-eb5252632e6a\",\r\n \"clientId\": \"0376d532-7364-4bec-8989-e11939b72a6a\"\r\n }\r\n }\r\n },\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"provisioningState\": \"ProvisioningResources\",\r\n \"azPowerShellVersion\": \"2.7.0\",\r\n \"scriptContent\": \"param([string] $helloWorld) Write-Output $helloWorld; $DeploymentScriptOutputs['output'] = $helloWorld\",\r\n \"arguments\": \"'Hello World'\",\r\n \"retentionInterval\": \"P1DT2H\",\r\n \"timeout\": \"P1D\",\r\n \"containerSettings\": {},\r\n \"status\": {\r\n \"storageAccountId\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.Storage/storageAccounts/pf2muywdlwhvqazscripts\",\r\n \"startTime\": \"2019-11-08T03:22:58.3829498Z\"\r\n },\r\n \"cleanupPreference\": \"Always\"\r\n },\r\n \"id\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/ds-testrg/providers/Microsoft.Resources/deploymentScripts/CanGetDeploymentScriptExecutionLogs--azsmnet5223\",\r\n \"name\": \"CanGetDeploymentScriptExecutionLogs--azsmnet5223\"\r\n}",
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourcegroups/Ds-TestRg/providers/Microsoft.Resources/deploymentScripts/CanGetDeploymentScriptExecutionLogs--azsmnet5223?api-version=2019-10-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTFiZmE2MzUtZjJiZi00MmYxLTg2YjUtODQ4YzY3NGZjMzIxL3Jlc291cmNlZ3JvdXBzL0RzLVRlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlc291cmNlcy9kZXBsb3ltZW50U2NyaXB0cy9DYW5HZXREZXBsb3ltZW50U2NyaXB0RXhlY3V0aW9uTG9ncy0tYXpzbW5ldDUyMjM/YXBpLXZlcnNpb249MjAxOS0xMC0wMS1wcmV2aWV3",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-client-request-id": [
+ "1d9e2912-5c72-430f-8044-25941a0eb148"
+ ],
+ "Accept-Language": [
+ "en-US"
+ ],
+ "User-Agent": [
+ "FxVersion/4.6.28008.01",
+ "OSName/Windows",
+ "OSVersion/Microsoft.Windows.10.0.18363.",
+ "Microsoft.Azure.Management.ResourceManager.DeploymentScriptsClient/2.4.5.0"
+ ]
+ },
+ "ResponseHeaders": {
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-request-id": [
+ "2b6e3324-9f36-4c79-a290-72b2df81e39f"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "11991"
+ ],
+ "x-ms-correlation-request-id": [
+ "2d2aa9a5-5ddb-440d-a9f3-eb90296ca525"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20191108T032337Z:2d2aa9a5-5ddb-440d-a9f3-eb90296ca525"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "X-Content-Type-Options": [
+ "nosniff"
+ ],
+ "Date": [
+ "Fri, 08 Nov 2019 03:23:36 GMT"
+ ],
+ "Content-Length": [
+ "1412"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ]
+ },
+ "ResponseBody": "{\r\n \"kind\": \"AzurePowerShell\",\r\n \"identity\": {\r\n \"type\": \"userAssigned\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"userAssignedIdentities\": {\r\n \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/filiz-user-assigned-msi\": {\r\n \"principalId\": \"97939ebd-fa2e-4055-8e3b-eb5252632e6a\",\r\n \"clientId\": \"0376d532-7364-4bec-8989-e11939b72a6a\"\r\n }\r\n }\r\n },\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"provisioningState\": \"ProvisioningResources\",\r\n \"azPowerShellVersion\": \"2.7.0\",\r\n \"scriptContent\": \"param([string] $helloWorld) Write-Output $helloWorld; $DeploymentScriptOutputs['output'] = $helloWorld\",\r\n \"arguments\": \"'Hello World'\",\r\n \"retentionInterval\": \"P1DT2H\",\r\n \"timeout\": \"P1D\",\r\n \"containerSettings\": {},\r\n \"status\": {\r\n \"storageAccountId\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.Storage/storageAccounts/pf2muywdlwhvqazscripts\",\r\n \"startTime\": \"2019-11-08T03:22:58.3829498Z\"\r\n },\r\n \"cleanupPreference\": \"Always\"\r\n },\r\n \"id\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/ds-testrg/providers/Microsoft.Resources/deploymentScripts/CanGetDeploymentScriptExecutionLogs--azsmnet5223\",\r\n \"name\": \"CanGetDeploymentScriptExecutionLogs--azsmnet5223\"\r\n}",
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourcegroups/Ds-TestRg/providers/Microsoft.Resources/deploymentScripts/CanGetDeploymentScriptExecutionLogs--azsmnet5223?api-version=2019-10-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTFiZmE2MzUtZjJiZi00MmYxLTg2YjUtODQ4YzY3NGZjMzIxL3Jlc291cmNlZ3JvdXBzL0RzLVRlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlc291cmNlcy9kZXBsb3ltZW50U2NyaXB0cy9DYW5HZXREZXBsb3ltZW50U2NyaXB0RXhlY3V0aW9uTG9ncy0tYXpzbW5ldDUyMjM/YXBpLXZlcnNpb249MjAxOS0xMC0wMS1wcmV2aWV3",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-client-request-id": [
+ "1c8bed93-ff69-4ef4-a5b8-f0b9500fe4ff"
+ ],
+ "Accept-Language": [
+ "en-US"
+ ],
+ "User-Agent": [
+ "FxVersion/4.6.28008.01",
+ "OSName/Windows",
+ "OSVersion/Microsoft.Windows.10.0.18363.",
+ "Microsoft.Azure.Management.ResourceManager.DeploymentScriptsClient/2.4.5.0"
+ ]
+ },
+ "ResponseHeaders": {
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-request-id": [
+ "6c22e011-612c-4bfc-bb13-feda8110bce9"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "11990"
+ ],
+ "x-ms-correlation-request-id": [
+ "d6fe7177-e680-43e4-ac09-e3af988888e3"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20191108T032347Z:d6fe7177-e680-43e4-ac09-e3af988888e3"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "X-Content-Type-Options": [
+ "nosniff"
+ ],
+ "Date": [
+ "Fri, 08 Nov 2019 03:23:46 GMT"
+ ],
+ "Content-Length": [
+ "1412"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ]
+ },
+ "ResponseBody": "{\r\n \"kind\": \"AzurePowerShell\",\r\n \"identity\": {\r\n \"type\": \"userAssigned\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"userAssignedIdentities\": {\r\n \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/filiz-user-assigned-msi\": {\r\n \"principalId\": \"97939ebd-fa2e-4055-8e3b-eb5252632e6a\",\r\n \"clientId\": \"0376d532-7364-4bec-8989-e11939b72a6a\"\r\n }\r\n }\r\n },\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"provisioningState\": \"ProvisioningResources\",\r\n \"azPowerShellVersion\": \"2.7.0\",\r\n \"scriptContent\": \"param([string] $helloWorld) Write-Output $helloWorld; $DeploymentScriptOutputs['output'] = $helloWorld\",\r\n \"arguments\": \"'Hello World'\",\r\n \"retentionInterval\": \"P1DT2H\",\r\n \"timeout\": \"P1D\",\r\n \"containerSettings\": {},\r\n \"status\": {\r\n \"storageAccountId\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.Storage/storageAccounts/pf2muywdlwhvqazscripts\",\r\n \"startTime\": \"2019-11-08T03:22:58.3829498Z\"\r\n },\r\n \"cleanupPreference\": \"Always\"\r\n },\r\n \"id\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/ds-testrg/providers/Microsoft.Resources/deploymentScripts/CanGetDeploymentScriptExecutionLogs--azsmnet5223\",\r\n \"name\": \"CanGetDeploymentScriptExecutionLogs--azsmnet5223\"\r\n}",
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourcegroups/Ds-TestRg/providers/Microsoft.Resources/deploymentScripts/CanGetDeploymentScriptExecutionLogs--azsmnet5223?api-version=2019-10-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTFiZmE2MzUtZjJiZi00MmYxLTg2YjUtODQ4YzY3NGZjMzIxL3Jlc291cmNlZ3JvdXBzL0RzLVRlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlc291cmNlcy9kZXBsb3ltZW50U2NyaXB0cy9DYW5HZXREZXBsb3ltZW50U2NyaXB0RXhlY3V0aW9uTG9ncy0tYXpzbW5ldDUyMjM/YXBpLXZlcnNpb249MjAxOS0xMC0wMS1wcmV2aWV3",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-client-request-id": [
+ "27e84a68-8d2b-43f3-a608-d81d9f0291d1"
+ ],
+ "Accept-Language": [
+ "en-US"
+ ],
+ "User-Agent": [
+ "FxVersion/4.6.28008.01",
+ "OSName/Windows",
+ "OSVersion/Microsoft.Windows.10.0.18363.",
+ "Microsoft.Azure.Management.ResourceManager.DeploymentScriptsClient/2.4.5.0"
+ ]
+ },
+ "ResponseHeaders": {
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-request-id": [
+ "db28d62e-bad3-40d5-9457-ddba45398ba4"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "11989"
+ ],
+ "x-ms-correlation-request-id": [
+ "f3220e14-9a5f-4e0e-988d-689474a484f6"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20191108T032357Z:f3220e14-9a5f-4e0e-988d-689474a484f6"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "X-Content-Type-Options": [
+ "nosniff"
+ ],
+ "Date": [
+ "Fri, 08 Nov 2019 03:23:56 GMT"
+ ],
+ "Content-Length": [
+ "1412"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ]
+ },
+ "ResponseBody": "{\r\n \"kind\": \"AzurePowerShell\",\r\n \"identity\": {\r\n \"type\": \"userAssigned\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"userAssignedIdentities\": {\r\n \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/filiz-user-assigned-msi\": {\r\n \"principalId\": \"97939ebd-fa2e-4055-8e3b-eb5252632e6a\",\r\n \"clientId\": \"0376d532-7364-4bec-8989-e11939b72a6a\"\r\n }\r\n }\r\n },\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"provisioningState\": \"ProvisioningResources\",\r\n \"azPowerShellVersion\": \"2.7.0\",\r\n \"scriptContent\": \"param([string] $helloWorld) Write-Output $helloWorld; $DeploymentScriptOutputs['output'] = $helloWorld\",\r\n \"arguments\": \"'Hello World'\",\r\n \"retentionInterval\": \"P1DT2H\",\r\n \"timeout\": \"P1D\",\r\n \"containerSettings\": {},\r\n \"status\": {\r\n \"storageAccountId\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.Storage/storageAccounts/pf2muywdlwhvqazscripts\",\r\n \"startTime\": \"2019-11-08T03:22:58.3829498Z\"\r\n },\r\n \"cleanupPreference\": \"Always\"\r\n },\r\n \"id\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/ds-testrg/providers/Microsoft.Resources/deploymentScripts/CanGetDeploymentScriptExecutionLogs--azsmnet5223\",\r\n \"name\": \"CanGetDeploymentScriptExecutionLogs--azsmnet5223\"\r\n}",
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourcegroups/Ds-TestRg/providers/Microsoft.Resources/deploymentScripts/CanGetDeploymentScriptExecutionLogs--azsmnet5223?api-version=2019-10-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTFiZmE2MzUtZjJiZi00MmYxLTg2YjUtODQ4YzY3NGZjMzIxL3Jlc291cmNlZ3JvdXBzL0RzLVRlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlc291cmNlcy9kZXBsb3ltZW50U2NyaXB0cy9DYW5HZXREZXBsb3ltZW50U2NyaXB0RXhlY3V0aW9uTG9ncy0tYXpzbW5ldDUyMjM/YXBpLXZlcnNpb249MjAxOS0xMC0wMS1wcmV2aWV3",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-client-request-id": [
+ "fc91410e-946d-4e7f-8133-e4946a9c02ab"
+ ],
+ "Accept-Language": [
+ "en-US"
+ ],
+ "User-Agent": [
+ "FxVersion/4.6.28008.01",
+ "OSName/Windows",
+ "OSVersion/Microsoft.Windows.10.0.18363.",
+ "Microsoft.Azure.Management.ResourceManager.DeploymentScriptsClient/2.4.5.0"
+ ]
+ },
+ "ResponseHeaders": {
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-request-id": [
+ "deeea43d-c25f-4596-b912-4a7bd3fd9ea2"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "11988"
+ ],
+ "x-ms-correlation-request-id": [
+ "253ec547-98f6-44da-af99-abcf8ccd8810"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20191108T032407Z:253ec547-98f6-44da-af99-abcf8ccd8810"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "X-Content-Type-Options": [
+ "nosniff"
+ ],
+ "Date": [
+ "Fri, 08 Nov 2019 03:24:07 GMT"
+ ],
+ "Content-Length": [
+ "1412"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ]
+ },
+ "ResponseBody": "{\r\n \"kind\": \"AzurePowerShell\",\r\n \"identity\": {\r\n \"type\": \"userAssigned\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"userAssignedIdentities\": {\r\n \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/filiz-user-assigned-msi\": {\r\n \"principalId\": \"97939ebd-fa2e-4055-8e3b-eb5252632e6a\",\r\n \"clientId\": \"0376d532-7364-4bec-8989-e11939b72a6a\"\r\n }\r\n }\r\n },\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"provisioningState\": \"ProvisioningResources\",\r\n \"azPowerShellVersion\": \"2.7.0\",\r\n \"scriptContent\": \"param([string] $helloWorld) Write-Output $helloWorld; $DeploymentScriptOutputs['output'] = $helloWorld\",\r\n \"arguments\": \"'Hello World'\",\r\n \"retentionInterval\": \"P1DT2H\",\r\n \"timeout\": \"P1D\",\r\n \"containerSettings\": {},\r\n \"status\": {\r\n \"storageAccountId\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.Storage/storageAccounts/pf2muywdlwhvqazscripts\",\r\n \"startTime\": \"2019-11-08T03:22:58.3829498Z\"\r\n },\r\n \"cleanupPreference\": \"Always\"\r\n },\r\n \"id\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/ds-testrg/providers/Microsoft.Resources/deploymentScripts/CanGetDeploymentScriptExecutionLogs--azsmnet5223\",\r\n \"name\": \"CanGetDeploymentScriptExecutionLogs--azsmnet5223\"\r\n}",
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourcegroups/Ds-TestRg/providers/Microsoft.Resources/deploymentScripts/CanGetDeploymentScriptExecutionLogs--azsmnet5223?api-version=2019-10-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTFiZmE2MzUtZjJiZi00MmYxLTg2YjUtODQ4YzY3NGZjMzIxL3Jlc291cmNlZ3JvdXBzL0RzLVRlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlc291cmNlcy9kZXBsb3ltZW50U2NyaXB0cy9DYW5HZXREZXBsb3ltZW50U2NyaXB0RXhlY3V0aW9uTG9ncy0tYXpzbW5ldDUyMjM/YXBpLXZlcnNpb249MjAxOS0xMC0wMS1wcmV2aWV3",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-client-request-id": [
+ "711f8920-3a09-4f3b-af2b-83c2a0891b9b"
+ ],
+ "Accept-Language": [
+ "en-US"
+ ],
+ "User-Agent": [
+ "FxVersion/4.6.28008.01",
+ "OSName/Windows",
+ "OSVersion/Microsoft.Windows.10.0.18363.",
+ "Microsoft.Azure.Management.ResourceManager.DeploymentScriptsClient/2.4.5.0"
+ ]
+ },
+ "ResponseHeaders": {
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-request-id": [
+ "f8077677-1905-47e8-bc92-cc5078543c21"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "11987"
+ ],
+ "x-ms-correlation-request-id": [
+ "4f280164-a3b1-415c-b8ab-e65bae156113"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20191108T032417Z:4f280164-a3b1-415c-b8ab-e65bae156113"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "X-Content-Type-Options": [
+ "nosniff"
+ ],
+ "Date": [
+ "Fri, 08 Nov 2019 03:24:17 GMT"
+ ],
+ "Content-Length": [
+ "1585"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ]
+ },
+ "ResponseBody": "{\r\n \"kind\": \"AzurePowerShell\",\r\n \"identity\": {\r\n \"type\": \"userAssigned\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"userAssignedIdentities\": {\r\n \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/filiz-user-assigned-msi\": {\r\n \"principalId\": \"97939ebd-fa2e-4055-8e3b-eb5252632e6a\",\r\n \"clientId\": \"0376d532-7364-4bec-8989-e11939b72a6a\"\r\n }\r\n }\r\n },\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"azPowerShellVersion\": \"2.7.0\",\r\n \"scriptContent\": \"param([string] $helloWorld) Write-Output $helloWorld; $DeploymentScriptOutputs['output'] = $helloWorld\",\r\n \"arguments\": \"'Hello World'\",\r\n \"retentionInterval\": \"P1DT2H\",\r\n \"timeout\": \"P1D\",\r\n \"containerSettings\": {},\r\n \"status\": {\r\n \"containerInstanceId\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.ContainerInstance/containerGroups/pf2muywdlwhvqazscripts\",\r\n \"storageAccountId\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.Storage/storageAccounts/pf2muywdlwhvqazscripts\",\r\n \"startTime\": \"2019-11-08T03:22:58.3829498Z\"\r\n },\r\n \"cleanupPreference\": \"Always\"\r\n },\r\n \"id\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/ds-testrg/providers/Microsoft.Resources/deploymentScripts/CanGetDeploymentScriptExecutionLogs--azsmnet5223\",\r\n \"name\": \"CanGetDeploymentScriptExecutionLogs--azsmnet5223\"\r\n}",
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourcegroups/Ds-TestRg/providers/Microsoft.Resources/deploymentScripts/CanGetDeploymentScriptExecutionLogs--azsmnet5223?api-version=2019-10-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTFiZmE2MzUtZjJiZi00MmYxLTg2YjUtODQ4YzY3NGZjMzIxL3Jlc291cmNlZ3JvdXBzL0RzLVRlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlc291cmNlcy9kZXBsb3ltZW50U2NyaXB0cy9DYW5HZXREZXBsb3ltZW50U2NyaXB0RXhlY3V0aW9uTG9ncy0tYXpzbW5ldDUyMjM/YXBpLXZlcnNpb249MjAxOS0xMC0wMS1wcmV2aWV3",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-client-request-id": [
+ "3a1fe50c-7f81-44a0-a20c-64946a4e1c09"
+ ],
+ "Accept-Language": [
+ "en-US"
+ ],
+ "User-Agent": [
+ "FxVersion/4.6.28008.01",
+ "OSName/Windows",
+ "OSVersion/Microsoft.Windows.10.0.18363.",
+ "Microsoft.Azure.Management.ResourceManager.DeploymentScriptsClient/2.4.5.0"
+ ]
+ },
+ "ResponseHeaders": {
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-request-id": [
+ "992d619a-6e28-45a8-918c-d6d063649888"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "11986"
+ ],
+ "x-ms-correlation-request-id": [
+ "e174d589-6ad9-4a6e-a649-587521460ddf"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20191108T032427Z:e174d589-6ad9-4a6e-a649-587521460ddf"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "X-Content-Type-Options": [
+ "nosniff"
+ ],
+ "Date": [
+ "Fri, 08 Nov 2019 03:24:27 GMT"
+ ],
+ "Content-Length": [
+ "1694"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ]
+ },
+ "ResponseBody": "{\r\n \"kind\": \"AzurePowerShell\",\r\n \"identity\": {\r\n \"type\": \"userAssigned\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"userAssignedIdentities\": {\r\n \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/filiz-user-assigned-msi\": {\r\n \"principalId\": \"97939ebd-fa2e-4055-8e3b-eb5252632e6a\",\r\n \"clientId\": \"0376d532-7364-4bec-8989-e11939b72a6a\"\r\n }\r\n }\r\n },\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"azPowerShellVersion\": \"2.7.0\",\r\n \"scriptContent\": \"param([string] $helloWorld) Write-Output $helloWorld; $DeploymentScriptOutputs['output'] = $helloWorld\",\r\n \"arguments\": \"'Hello World'\",\r\n \"retentionInterval\": \"P1DT2H\",\r\n \"timeout\": \"P1D\",\r\n \"containerSettings\": {},\r\n \"status\": {\r\n \"containerInstanceId\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.ContainerInstance/containerGroups/pf2muywdlwhvqazscripts\",\r\n \"storageAccountId\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/Ds-TestRg/providers/Microsoft.Storage/storageAccounts/pf2muywdlwhvqazscripts\",\r\n \"startTime\": \"2019-11-08T03:22:58.3829498Z\",\r\n \"endTime\": \"2019-11-08T03:24:18.0166418Z\"\r\n },\r\n \"outputs\": {\r\n \"output\": \"Hello World\"\r\n },\r\n \"cleanupPreference\": \"Always\"\r\n },\r\n \"id\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/ds-testrg/providers/Microsoft.Resources/deploymentScripts/CanGetDeploymentScriptExecutionLogs--azsmnet5223\",\r\n \"name\": \"CanGetDeploymentScriptExecutionLogs--azsmnet5223\"\r\n}",
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourcegroups/Ds-TestRg/providers/Microsoft.Resources/deploymentScripts/CanGetDeploymentScriptExecutionLogs--azsmnet5223/logs/default?api-version=2019-10-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTFiZmE2MzUtZjJiZi00MmYxLTg2YjUtODQ4YzY3NGZjMzIxL3Jlc291cmNlZ3JvdXBzL0RzLVRlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlc291cmNlcy9kZXBsb3ltZW50U2NyaXB0cy9DYW5HZXREZXBsb3ltZW50U2NyaXB0RXhlY3V0aW9uTG9ncy0tYXpzbW5ldDUyMjMvbG9ncy9kZWZhdWx0P2FwaS12ZXJzaW9uPTIwMTktMTAtMDEtcHJldmlldw==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-client-request-id": [
+ "861dfda6-f083-4f1d-88ac-c21326eafaff"
+ ],
+ "Accept-Language": [
+ "en-US"
+ ],
+ "User-Agent": [
+ "FxVersion/4.6.28008.01",
+ "OSName/Windows",
+ "OSVersion/Microsoft.Windows.10.0.18363.",
+ "Microsoft.Azure.Management.ResourceManager.DeploymentScriptsClient/2.4.5.0"
+ ]
+ },
+ "ResponseHeaders": {
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-request-id": [
+ "591d6d69-eba6-417b-9f42-07826602c50a"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "11985"
+ ],
+ "x-ms-correlation-request-id": [
+ "fd24a05b-a42b-4c81-a38b-d88a29ac5a2c"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20191108T032438Z:fd24a05b-a42b-4c81-a38b-d88a29ac5a2c"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "X-Content-Type-Options": [
+ "nosniff"
+ ],
+ "Date": [
+ "Fri, 08 Nov 2019 03:24:37 GMT"
+ ],
+ "Content-Length": [
+ "411"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ]
+ },
+ "ResponseBody": "{\r\n \"properties\": {\r\n \"log\": \"Executing script: /mnt/azscripts/azscriptinput/userscript.ps1 'Hello World'\\nHello World\\n\"\r\n },\r\n \"id\": \"/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourceGroups/ds-testrg/providers/Microsoft.Resources/deploymentScripts/CanGetDeploymentScriptExecutionLogs--azsmnet5223/logs/default\",\r\n \"type\": \"Microsoft.Resources/deploymentScripts/logs\",\r\n \"name\": \"default\"\r\n}",
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourcegroups/Ds-TestRg/providers/Microsoft.Resources/deploymentScripts/CanGetDeploymentScriptExecutionLogs--azsmnet5223?api-version=2019-10-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTFiZmE2MzUtZjJiZi00MmYxLTg2YjUtODQ4YzY3NGZjMzIxL3Jlc291cmNlZ3JvdXBzL0RzLVRlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlc291cmNlcy9kZXBsb3ltZW50U2NyaXB0cy9DYW5HZXREZXBsb3ltZW50U2NyaXB0RXhlY3V0aW9uTG9ncy0tYXpzbW5ldDUyMjM/YXBpLXZlcnNpb249MjAxOS0xMC0wMS1wcmV2aWV3",
+ "RequestMethod": "DELETE",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-client-request-id": [
+ "78ad7945-244b-419e-acc1-36a23b8a2499"
+ ],
+ "Accept-Language": [
+ "en-US"
+ ],
+ "User-Agent": [
+ "FxVersion/4.6.28008.01",
+ "OSName/Windows",
+ "OSVersion/Microsoft.Windows.10.0.18363.",
+ "Microsoft.Azure.Management.ResourceManager.DeploymentScriptsClient/2.4.5.0"
+ ]
+ },
+ "ResponseHeaders": {
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-request-id": [
+ "e46c5760-ae50-40da-8f38-29f513cb8478"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ],
+ "x-ms-ratelimit-remaining-subscription-deletes": [
+ "14999"
+ ],
+ "x-ms-correlation-request-id": [
+ "56e5559a-e537-4876-a31a-122aaccf5432"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20191108T032439Z:56e5559a-e537-4876-a31a-122aaccf5432"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "X-Content-Type-Options": [
+ "nosniff"
+ ],
+ "Date": [
+ "Fri, 08 Nov 2019 03:24:38 GMT"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Content-Length": [
+ "0"
+ ]
+ },
+ "ResponseBody": "",
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/a1bfa635-f2bf-42f1-86b5-848c674fc321/resourcegroups/Ds-TestRg/providers/Microsoft.Resources/deploymentScripts?api-version=2019-10-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYTFiZmE2MzUtZjJiZi00MmYxLTg2YjUtODQ4YzY3NGZjMzIxL3Jlc291cmNlZ3JvdXBzL0RzLVRlc3RSZy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlc291cmNlcy9kZXBsb3ltZW50U2NyaXB0cz9hcGktdmVyc2lvbj0yMDE5LTEwLTAxLXByZXZpZXc=",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-client-request-id": [
+ "bb14a90b-480a-4d7b-9fe2-deeec9e51a83"
+ ],
+ "Accept-Language": [
+ "en-US"
+ ],
+ "User-Agent": [
+ "FxVersion/4.6.28008.01",
+ "OSName/Windows",
+ "OSVersion/Microsoft.Windows.10.0.18363.",
+ "Microsoft.Azure.Management.ResourceManager.DeploymentScriptsClient/2.4.5.0"
+ ]
+ },
+ "ResponseHeaders": {
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "11984"
+ ],
+ "x-ms-request-id": [
+ "c67eb7b2-dda8-459f-8a63-56e90b2a5c0e"
+ ],
+ "x-ms-correlation-request-id": [
+ "c67eb7b2-dda8-459f-8a63-56e90b2a5c0e"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20191108T032439Z:c67eb7b2-dda8-459f-8a63-56e90b2a5c0e"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "X-Content-Type-Options": [
+ "nosniff"
+ ],
+ "Date": [
+ "Fri, 08 Nov 2019 03:24:38 GMT"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Content-Length": [
+ "12"
+ ]
+ },
+ "ResponseBody": "{\r\n \"value\": []\r\n}",
+ "StatusCode": 200
+ }
+ ],
+ "Names": {
+ "CanGetDeploymentScriptExecutionLogs": [
+ "azsmnet5223"
+ ]
+ },
+ "Variables": {
+ "SubscriptionId": "a1bfa635-f2bf-42f1-86b5-848c674fc321"
+ }
+}
\ No newline at end of file