diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/IManagedServicesClient.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/IManagedServicesClient.cs
index 380ada5ccf25..76b734ae834d 100644
--- a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/IManagedServicesClient.cs
+++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/IManagedServicesClient.cs
@@ -74,6 +74,11 @@ public partial interface IManagedServicesClient : System.IDisposable
///
IRegistrationAssignmentsOperations RegistrationAssignments { get; }
+ ///
+ /// Gets the IMarketplaceRegistrationDefinitionsOperations.
+ ///
+ IMarketplaceRegistrationDefinitionsOperations MarketplaceRegistrationDefinitions { get; }
+
///
/// Gets the IOperations.
///
diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/IMarketplaceRegistrationDefinitionsOperations.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/IMarketplaceRegistrationDefinitionsOperations.cs
new file mode 100644
index 000000000000..24a374a3dbf9
--- /dev/null
+++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/IMarketplaceRegistrationDefinitionsOperations.cs
@@ -0,0 +1,106 @@
+//
+// 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.ManagedServices
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// MarketplaceRegistrationDefinitionsOperations operations.
+ ///
+ public partial interface IMarketplaceRegistrationDefinitionsOperations
+ {
+ ///
+ /// Gets a list of the marketplace registration definitions for the
+ /// marketplace identifier.
+ ///
+ ///
+ /// Scope of the resource.
+ ///
+ ///
+ /// The filter query parameter. Might be used to filter marketplace
+ /// registration definition by plan identifier, publisher, version etc.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListWithHttpMessagesAsync(string scope, string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Get the marketplace registration definition for the marketplace
+ /// identifier.
+ ///
+ ///
+ /// Scope of the resource.
+ ///
+ ///
+ /// Market place identifer. Expected Formats -
+ /// {publisher}.{product[-preview]}.{planName}.{version} or
+ /// {publisher}.{product[-preview]}.{planName} or
+ /// {publisher}.{product[-preview]} or {publisher}).
+ ///
+ ///
+ /// 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 scope, string marketplaceIdentifier, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets a list of the marketplace registration definitions for the
+ /// marketplace identifier.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/ManagedServicesClient.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/ManagedServicesClient.cs
index 445c497cfb75..f69fb9d067c5 100644
--- a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/ManagedServicesClient.cs
+++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/ManagedServicesClient.cs
@@ -79,6 +79,11 @@ public partial class ManagedServicesClient : ServiceClient
public virtual IRegistrationAssignmentsOperations RegistrationAssignments { get; private set; }
+ ///
+ /// Gets the IMarketplaceRegistrationDefinitionsOperations.
+ ///
+ public virtual IMarketplaceRegistrationDefinitionsOperations MarketplaceRegistrationDefinitions { get; private set; }
+
///
/// Gets the IOperations.
///
@@ -327,9 +332,10 @@ private void Initialize()
{
RegistrationDefinitions = new RegistrationDefinitionsOperations(this);
RegistrationAssignments = new RegistrationAssignmentsOperations(this);
+ MarketplaceRegistrationDefinitions = new MarketplaceRegistrationDefinitionsOperations(this);
Operations = new Operations(this);
BaseUri = new System.Uri("https://management.azure.com");
- ApiVersion = "2019-06-01";
+ ApiVersion = "2020-02-01-preview";
AcceptLanguage = "en-US";
LongRunningOperationRetryTimeout = 30;
GenerateClientRequestId = true;
diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/MarketplaceRegistrationDefinitionsOperations.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/MarketplaceRegistrationDefinitionsOperations.cs
new file mode 100644
index 000000000000..3282479f47fc
--- /dev/null
+++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/MarketplaceRegistrationDefinitionsOperations.cs
@@ -0,0 +1,599 @@
+//
+// 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.ManagedServices
+{
+ 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;
+
+ ///
+ /// MarketplaceRegistrationDefinitionsOperations operations.
+ ///
+ internal partial class MarketplaceRegistrationDefinitionsOperations : IServiceOperations, IMarketplaceRegistrationDefinitionsOperations
+ {
+ ///
+ /// Initializes a new instance of the MarketplaceRegistrationDefinitionsOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal MarketplaceRegistrationDefinitionsOperations(ManagedServicesClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the ManagedServicesClient
+ ///
+ public ManagedServicesClient Client { get; private set; }
+
+ ///
+ /// Gets a list of the marketplace registration definitions for the marketplace
+ /// identifier.
+ ///
+ ///
+ /// Scope of the resource.
+ ///
+ ///
+ /// The filter query parameter. Might be used to filter marketplace
+ /// registration definition by plan identifier, publisher, version etc.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListWithHttpMessagesAsync(string scope, string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (scope == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "scope");
+ }
+ 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("scope", scope);
+ tracingParameters.Add("filter", filter);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{scope}/providers/Microsoft.ManagedServices/marketplaceRegistrationDefinitions").ToString();
+ _url = _url.Replace("{scope}", scope);
+ List _queryParameters = new List();
+ if (filter != null)
+ {
+ _queryParameters.Add(string.Format("$filter={0}", System.Uri.EscapeDataString(filter)));
+ }
+ 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _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;
+ }
+
+ ///
+ /// Get the marketplace registration definition for the marketplace identifier.
+ ///
+ ///
+ /// Scope of the resource.
+ ///
+ ///
+ /// Market place identifer. Expected Formats -
+ /// {publisher}.{product[-preview]}.{planName}.{version} or
+ /// {publisher}.{product[-preview]}.{planName} or
+ /// {publisher}.{product[-preview]} or {publisher}).
+ ///
+ ///
+ /// 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 scope, string marketplaceIdentifier, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (scope == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "scope");
+ }
+ if (marketplaceIdentifier == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "marketplaceIdentifier");
+ }
+ 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("scope", scope);
+ tracingParameters.Add("marketplaceIdentifier", marketplaceIdentifier);
+ 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("/") ? "" : "/")), "{scope}/providers/Microsoft.ManagedServices/marketplaceRegistrationDefinitions/{marketplaceIdentifier}").ToString();
+ _url = _url.Replace("{scope}", scope);
+ _url = _url.Replace("{marketplaceIdentifier}", System.Uri.EscapeDataString(marketplaceIdentifier));
+ 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _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 list of the marketplace registration definitions for the marketplace
+ /// identifier.
+ ///
+ ///
+ /// 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>> ListNextWithHttpMessagesAsync(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, "ListNext", 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _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/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/MarketplaceRegistrationDefinitionsOperationsExtensions.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/MarketplaceRegistrationDefinitionsOperationsExtensions.cs
new file mode 100644
index 000000000000..07f07d4a79f0
--- /dev/null
+++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/MarketplaceRegistrationDefinitionsOperationsExtensions.cs
@@ -0,0 +1,151 @@
+//
+// 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.ManagedServices
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for MarketplaceRegistrationDefinitionsOperations.
+ ///
+ public static partial class MarketplaceRegistrationDefinitionsOperationsExtensions
+ {
+ ///
+ /// Gets a list of the marketplace registration definitions for the marketplace
+ /// identifier.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Scope of the resource.
+ ///
+ ///
+ /// The filter query parameter. Might be used to filter marketplace
+ /// registration definition by plan identifier, publisher, version etc.
+ ///
+ public static IPage List(this IMarketplaceRegistrationDefinitionsOperations operations, string scope, string filter = default(string))
+ {
+ return operations.ListAsync(scope, filter).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets a list of the marketplace registration definitions for the marketplace
+ /// identifier.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Scope of the resource.
+ ///
+ ///
+ /// The filter query parameter. Might be used to filter marketplace
+ /// registration definition by plan identifier, publisher, version etc.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListAsync(this IMarketplaceRegistrationDefinitionsOperations operations, string scope, string filter = default(string), CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListWithHttpMessagesAsync(scope, filter, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Get the marketplace registration definition for the marketplace identifier.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Scope of the resource.
+ ///
+ ///
+ /// Market place identifer. Expected Formats -
+ /// {publisher}.{product[-preview]}.{planName}.{version} or
+ /// {publisher}.{product[-preview]}.{planName} or
+ /// {publisher}.{product[-preview]} or {publisher}).
+ ///
+ public static MarketplaceRegistrationDefinition Get(this IMarketplaceRegistrationDefinitionsOperations operations, string scope, string marketplaceIdentifier)
+ {
+ return operations.GetAsync(scope, marketplaceIdentifier).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Get the marketplace registration definition for the marketplace identifier.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Scope of the resource.
+ ///
+ ///
+ /// Market place identifer. Expected Formats -
+ /// {publisher}.{product[-preview]}.{planName}.{version} or
+ /// {publisher}.{product[-preview]}.{planName} or
+ /// {publisher}.{product[-preview]} or {publisher}).
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task GetAsync(this IMarketplaceRegistrationDefinitionsOperations operations, string scope, string marketplaceIdentifier, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.GetWithHttpMessagesAsync(scope, marketplaceIdentifier, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Gets a list of the marketplace registration definitions for the marketplace
+ /// identifier.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ public static IPage ListNext(this IMarketplaceRegistrationDefinitionsOperations operations, string nextPageLink)
+ {
+ return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets a list of the marketplace registration definitions for the marketplace
+ /// identifier.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListNextAsync(this IMarketplaceRegistrationDefinitionsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ }
+}
diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/Authorization.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/Authorization.cs
index 6a4a0996b8ae..3899ad508851 100644
--- a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/Authorization.cs
+++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/Authorization.cs
@@ -12,6 +12,8 @@ namespace Microsoft.Azure.Management.ManagedServices.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
using System.Linq;
///
@@ -38,10 +40,20 @@ public Authorization()
/// role will define all the permissions that the security
/// group/service principal/user must have on the projected
/// subscription. This role cannot be an owner role.
- public Authorization(string principalId, string roleDefinitionId)
+ /// Display name of the principal
+ /// Id.
+ /// The
+ /// delegatedRoleDefinitionIds field is required when the
+ /// roleDefinitionId refers to the User Access Administrator Role. It
+ /// is the list of role definition ids which define all the permissions
+ /// that the user in the authorization can assign to other security
+ /// groups/service principals/users.
+ public Authorization(string principalId, string roleDefinitionId, string principalIdDisplayName = default(string), IList delegatedRoleDefinitionIds = default(IList))
{
PrincipalId = principalId;
+ PrincipalIdDisplayName = principalIdDisplayName;
RoleDefinitionId = roleDefinitionId;
+ DelegatedRoleDefinitionIds = delegatedRoleDefinitionIds;
CustomInit();
}
@@ -58,6 +70,12 @@ public Authorization(string principalId, string roleDefinitionId)
[JsonProperty(PropertyName = "principalId")]
public string PrincipalId { get; set; }
+ ///
+ /// Gets or sets display name of the principal Id.
+ ///
+ [JsonProperty(PropertyName = "principalIdDisplayName")]
+ public string PrincipalIdDisplayName { get; set; }
+
///
/// Gets or sets the role definition identifier. This role will define
/// all the permissions that the security group/service principal/user
@@ -67,6 +85,16 @@ public Authorization(string principalId, string roleDefinitionId)
[JsonProperty(PropertyName = "roleDefinitionId")]
public string RoleDefinitionId { get; set; }
+ ///
+ /// Gets or sets the delegatedRoleDefinitionIds field is required when
+ /// the roleDefinitionId refers to the User Access Administrator Role.
+ /// It is the list of role definition ids which define all the
+ /// permissions that the user in the authorization can assign to other
+ /// security groups/service principals/users.
+ ///
+ [JsonProperty(PropertyName = "delegatedRoleDefinitionIds")]
+ public IList DelegatedRoleDefinitionIds { get; set; }
+
///
/// Validate the object.
///
diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/EligibleAuthorization.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/EligibleAuthorization.cs
new file mode 100644
index 000000000000..d974e564ad89
--- /dev/null
+++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/EligibleAuthorization.cs
@@ -0,0 +1,111 @@
+//
+// 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.ManagedServices.Models
+{
+ using Microsoft.Rest;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Eligible authorization tuple containing principle Id (of user/service
+ /// principal/security group), role definition id, and the just-in-time
+ /// access setting.
+ ///
+ public partial class EligibleAuthorization
+ {
+ ///
+ /// Initializes a new instance of the EligibleAuthorization class.
+ ///
+ public EligibleAuthorization()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the EligibleAuthorization class.
+ ///
+ /// Principal Id of the security
+ /// group/service principal/user that would be delegated permissions to
+ /// the projected subscription
+ /// The role definition identifier. This
+ /// role will delegate all the permissions that the security
+ /// group/service principal/user must have on the projected
+ /// subscription. This role cannot be an owner role.
+ /// Display name of the principal
+ /// Id.
+ /// Just-in-time access policy
+ /// setting.
+ public EligibleAuthorization(string principalId, string roleDefinitionId, string principalIdDisplayName = default(string), JustInTimeAccessPolicy justInTimeAccessPolicy = default(JustInTimeAccessPolicy))
+ {
+ PrincipalId = principalId;
+ PrincipalIdDisplayName = principalIdDisplayName;
+ RoleDefinitionId = roleDefinitionId;
+ JustInTimeAccessPolicy = justInTimeAccessPolicy;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets principal Id of the security group/service
+ /// principal/user that would be delegated permissions to the projected
+ /// subscription
+ ///
+ [JsonProperty(PropertyName = "principalId")]
+ public string PrincipalId { get; set; }
+
+ ///
+ /// Gets or sets display name of the principal Id.
+ ///
+ [JsonProperty(PropertyName = "principalIdDisplayName")]
+ public string PrincipalIdDisplayName { get; set; }
+
+ ///
+ /// Gets or sets the role definition identifier. This role will
+ /// delegate all the permissions that the security group/service
+ /// principal/user must have on the projected subscription. This role
+ /// cannot be an owner role.
+ ///
+ [JsonProperty(PropertyName = "roleDefinitionId")]
+ public string RoleDefinitionId { get; set; }
+
+ ///
+ /// Gets or sets just-in-time access policy setting.
+ ///
+ [JsonProperty(PropertyName = "justInTimeAccessPolicy")]
+ public JustInTimeAccessPolicy JustInTimeAccessPolicy { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (PrincipalId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "PrincipalId");
+ }
+ if (RoleDefinitionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "RoleDefinitionId");
+ }
+ if (JustInTimeAccessPolicy != null)
+ {
+ JustInTimeAccessPolicy.Validate();
+ }
+ }
+ }
+}
diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/ErrorDefinition.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/ErrorDefinition.cs
new file mode 100644
index 000000000000..d98bc97b0dc6
--- /dev/null
+++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/ErrorDefinition.cs
@@ -0,0 +1,99 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.ManagedServices.Models
+{
+ using Microsoft.Rest;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Error response indicates Azure Resource Manager is not able to process
+ /// the incoming request. The reason is provided in the error message.
+ ///
+ public partial class ErrorDefinition
+ {
+ ///
+ /// Initializes a new instance of the ErrorDefinition class.
+ ///
+ public ErrorDefinition()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ErrorDefinition class.
+ ///
+ /// Error code.
+ /// Error message indicating why the operation
+ /// failed.
+ /// Internal error details.
+ public ErrorDefinition(string code, string message, IList details = default(IList))
+ {
+ Code = code;
+ Message = message;
+ Details = details;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets error code.
+ ///
+ [JsonProperty(PropertyName = "code")]
+ public string Code { get; set; }
+
+ ///
+ /// Gets or sets error message indicating why the operation failed.
+ ///
+ [JsonProperty(PropertyName = "message")]
+ public string Message { get; set; }
+
+ ///
+ /// Gets or sets internal error details.
+ ///
+ [JsonProperty(PropertyName = "details")]
+ public IList Details { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Code == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Code");
+ }
+ if (Message == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Message");
+ }
+ if (Details != null)
+ {
+ foreach (var element in Details)
+ {
+ if (element != null)
+ {
+ element.Validate();
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/ErrorResponse.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/ErrorResponse.cs
index 4941a69f09d1..5b2ed0613df8 100644
--- a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/ErrorResponse.cs
+++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/ErrorResponse.cs
@@ -29,10 +29,8 @@ public ErrorResponse()
///
/// Initializes a new instance of the ErrorResponse class.
///
- /// Error response indicates Azure Resource Manager
- /// is not able to process the incoming request. The reason is provided
- /// in the error message.
- public ErrorResponse(ErrorResponseError error = default(ErrorResponseError))
+ /// The error details.
+ public ErrorResponse(ErrorDefinition error = default(ErrorDefinition))
{
Error = error;
CustomInit();
@@ -44,12 +42,10 @@ public ErrorResponse()
partial void CustomInit();
///
- /// Gets error response indicates Azure Resource Manager is not able to
- /// process the incoming request. The reason is provided in the error
- /// message.
+ /// Gets or sets the error details.
///
[JsonProperty(PropertyName = "error")]
- public ErrorResponseError Error { get; private set; }
+ public ErrorDefinition Error { get; set; }
///
/// Validate the object.
diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/JustInTimeAccessPolicy.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/JustInTimeAccessPolicy.cs
new file mode 100644
index 000000000000..9beb45898d63
--- /dev/null
+++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/JustInTimeAccessPolicy.cs
@@ -0,0 +1,76 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.ManagedServices.Models
+{
+ using Microsoft.Rest;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Just-in-time access policy setting.
+ ///
+ public partial class JustInTimeAccessPolicy
+ {
+ ///
+ /// Initializes a new instance of the JustInTimeAccessPolicy class.
+ ///
+ public JustInTimeAccessPolicy()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the JustInTimeAccessPolicy class.
+ ///
+ /// MFA provider. Possible values
+ /// include: 'Azure', 'None'
+ /// Maximum access duration in
+ /// ISO 8601 format. The default value is "PT8H".
+ public JustInTimeAccessPolicy(string multiFactorAuthProvider, System.TimeSpan? maximumActivationDuration = default(System.TimeSpan?))
+ {
+ MultiFactorAuthProvider = multiFactorAuthProvider;
+ MaximumActivationDuration = maximumActivationDuration;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets MFA provider. Possible values include: 'Azure', 'None'
+ ///
+ [JsonProperty(PropertyName = "multiFactorAuthProvider")]
+ public string MultiFactorAuthProvider { get; set; }
+
+ ///
+ /// Gets or sets maximum access duration in ISO 8601 format. The
+ /// default value is "PT8H".
+ ///
+ [JsonProperty(PropertyName = "maximumActivationDuration")]
+ public System.TimeSpan? MaximumActivationDuration { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (MultiFactorAuthProvider == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "MultiFactorAuthProvider");
+ }
+ }
+ }
+}
diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/MarketplaceRegistrationDefinition.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/MarketplaceRegistrationDefinition.cs
new file mode 100644
index 000000000000..7577c968b399
--- /dev/null
+++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/MarketplaceRegistrationDefinition.cs
@@ -0,0 +1,105 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.ManagedServices.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ public partial class MarketplaceRegistrationDefinition : IResource
+ {
+ ///
+ /// Initializes a new instance of the MarketplaceRegistrationDefinition
+ /// class.
+ ///
+ public MarketplaceRegistrationDefinition()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the MarketplaceRegistrationDefinition
+ /// class.
+ ///
+ /// Properties of a marketplace registration
+ /// definition.
+ /// Plan details for the managed services.
+ /// Fully qualified path of the marketplace
+ /// registration definition.
+ /// Type of the resource.
+ /// Name of the marketplace registration
+ /// definition.
+ public MarketplaceRegistrationDefinition(MarketplaceRegistrationDefinitionProperties properties = default(MarketplaceRegistrationDefinitionProperties), Plan plan = default(Plan), string id = default(string), string type = default(string), string name = default(string))
+ {
+ Properties = properties;
+ Plan = plan;
+ Id = id;
+ Type = type;
+ Name = name;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets properties of a marketplace registration definition.
+ ///
+ [JsonProperty(PropertyName = "properties")]
+ public MarketplaceRegistrationDefinitionProperties Properties { get; set; }
+
+ ///
+ /// Gets or sets plan details for the managed services.
+ ///
+ [JsonProperty(PropertyName = "plan")]
+ public Plan Plan { get; set; }
+
+ ///
+ /// Gets fully qualified path of the marketplace registration
+ /// definition.
+ ///
+ [JsonProperty(PropertyName = "id")]
+ public string Id { get; private set; }
+
+ ///
+ /// Gets type of the resource.
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public string Type { get; private set; }
+
+ ///
+ /// Gets name of the marketplace registration definition.
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; private set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Properties != null)
+ {
+ Properties.Validate();
+ }
+ if (Plan != null)
+ {
+ Plan.Validate();
+ }
+ }
+ }
+}
diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/MarketplaceRegistrationDefinitionProperties.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/MarketplaceRegistrationDefinitionProperties.cs
new file mode 100644
index 000000000000..f43056f990ff
--- /dev/null
+++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/MarketplaceRegistrationDefinitionProperties.cs
@@ -0,0 +1,145 @@
+//
+// 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.ManagedServices.Models
+{
+ using Microsoft.Rest;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Properties of a marketplace registration definition.
+ ///
+ public partial class MarketplaceRegistrationDefinitionProperties
+ {
+ ///
+ /// Initializes a new instance of the
+ /// MarketplaceRegistrationDefinitionProperties class.
+ ///
+ public MarketplaceRegistrationDefinitionProperties()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// MarketplaceRegistrationDefinitionProperties class.
+ ///
+ /// Id of the managedBy tenant.
+ /// Authorization tuple containing
+ /// principal id of the user/security group or service principal and id
+ /// of the build-in role.
+ /// Eligible PIM authorization
+ /// tuple containing principal id of the user/security group or service
+ /// principal, id of the built-in role, and just-in-time access policy
+ /// setting
+ /// The marketplace offer display
+ /// name.
+ /// The marketplace publisher
+ /// display name.
+ /// The marketplace plan display
+ /// name.
+ public MarketplaceRegistrationDefinitionProperties(string managedByTenantId, IList authorizations, IList eligibleAuthorizations = default(IList), string offerDisplayName = default(string), string publisherDisplayName = default(string), string planDisplayName = default(string))
+ {
+ ManagedByTenantId = managedByTenantId;
+ Authorizations = authorizations;
+ EligibleAuthorizations = eligibleAuthorizations;
+ OfferDisplayName = offerDisplayName;
+ PublisherDisplayName = publisherDisplayName;
+ PlanDisplayName = planDisplayName;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets id of the managedBy tenant.
+ ///
+ [JsonProperty(PropertyName = "managedByTenantId")]
+ public string ManagedByTenantId { get; set; }
+
+ ///
+ /// Gets or sets authorization tuple containing principal id of the
+ /// user/security group or service principal and id of the build-in
+ /// role.
+ ///
+ [JsonProperty(PropertyName = "authorizations")]
+ public IList Authorizations { get; set; }
+
+ ///
+ /// Gets or sets eligible PIM authorization tuple containing principal
+ /// id of the user/security group or service principal, id of the
+ /// built-in role, and just-in-time access policy setting
+ ///
+ [JsonProperty(PropertyName = "eligibleAuthorizations")]
+ public IList EligibleAuthorizations { get; set; }
+
+ ///
+ /// Gets or sets the marketplace offer display name.
+ ///
+ [JsonProperty(PropertyName = "offerDisplayName")]
+ public string OfferDisplayName { get; set; }
+
+ ///
+ /// Gets or sets the marketplace publisher display name.
+ ///
+ [JsonProperty(PropertyName = "publisherDisplayName")]
+ public string PublisherDisplayName { get; set; }
+
+ ///
+ /// Gets or sets the marketplace plan display name.
+ ///
+ [JsonProperty(PropertyName = "planDisplayName")]
+ public string PlanDisplayName { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (ManagedByTenantId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "ManagedByTenantId");
+ }
+ if (Authorizations == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Authorizations");
+ }
+ if (Authorizations != null)
+ {
+ foreach (var element in Authorizations)
+ {
+ if (element != null)
+ {
+ element.Validate();
+ }
+ }
+ }
+ if (EligibleAuthorizations != null)
+ {
+ foreach (var element1 in EligibleAuthorizations)
+ {
+ if (element1 != null)
+ {
+ element1.Validate();
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/MultiFactorAuthProvider.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/MultiFactorAuthProvider.cs
new file mode 100644
index 000000000000..91fa6af73fcc
--- /dev/null
+++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/MultiFactorAuthProvider.cs
@@ -0,0 +1,22 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.ManagedServices.Models
+{
+
+ ///
+ /// Defines values for MultiFactorAuthProvider.
+ ///
+ public static class MultiFactorAuthProvider
+ {
+ public const string Azure = "Azure";
+ public const string None = "None";
+ }
+}
diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/RegistrationAssignmentPropertiesRegistrationDefinitionProperties.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/RegistrationAssignmentPropertiesRegistrationDefinitionProperties.cs
index 29aff9ba4c0c..a512faa9f9e2 100644
--- a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/RegistrationAssignmentPropertiesRegistrationDefinitionProperties.cs
+++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/RegistrationAssignmentPropertiesRegistrationDefinitionProperties.cs
@@ -40,6 +40,10 @@ public RegistrationAssignmentPropertiesRegistrationDefinitionProperties()
/// Authorization tuple containing
/// principal id of the user/security group or service principal and id
/// of the build-in role.
+ /// Eligible PIM authorization
+ /// tuple containing principal id of the user/security group or service
+ /// principal, id of the built-in role, and just-in-time access policy
+ /// setting
/// Name of the registration
/// definition.
/// Current state of the registration
@@ -51,10 +55,11 @@ public RegistrationAssignmentPropertiesRegistrationDefinitionProperties()
/// Id of the managedBy tenant.
/// Name of the managedBy
/// tenant.
- public RegistrationAssignmentPropertiesRegistrationDefinitionProperties(string description = default(string), IList authorizations = default(IList), string registrationDefinitionName = default(string), string provisioningState = default(string), string manageeTenantId = default(string), string manageeTenantName = default(string), string managedByTenantId = default(string), string managedByTenantName = default(string))
+ public RegistrationAssignmentPropertiesRegistrationDefinitionProperties(string description = default(string), IList authorizations = default(IList), IList eligibleAuthorizations = default(IList), string registrationDefinitionName = default(string), string provisioningState = default(string), string manageeTenantId = default(string), string manageeTenantName = default(string), string managedByTenantId = default(string), string managedByTenantName = default(string))
{
Description = description;
Authorizations = authorizations;
+ EligibleAuthorizations = eligibleAuthorizations;
RegistrationDefinitionName = registrationDefinitionName;
ProvisioningState = provisioningState;
ManageeTenantId = manageeTenantId;
@@ -83,6 +88,14 @@ public RegistrationAssignmentPropertiesRegistrationDefinitionProperties()
[JsonProperty(PropertyName = "authorizations")]
public IList Authorizations { get; set; }
+ ///
+ /// Gets or sets eligible PIM authorization tuple containing principal
+ /// id of the user/security group or service principal, id of the
+ /// built-in role, and just-in-time access policy setting
+ ///
+ [JsonProperty(PropertyName = "eligibleAuthorizations")]
+ public IList EligibleAuthorizations { get; set; }
+
///
/// Gets or sets name of the registration definition.
///
diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/RegistrationDefinitionProperties.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/RegistrationDefinitionProperties.cs
index 6f1ded14d68f..2e8facf2a18c 100644
--- a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/RegistrationDefinitionProperties.cs
+++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/RegistrationDefinitionProperties.cs
@@ -40,6 +40,10 @@ public RegistrationDefinitionProperties()
/// Id of the managedBy tenant.
/// Description of the registration
/// definition.
+ /// Eligible PIM authorization
+ /// tuple containing principal id of the user/security group or service
+ /// principal, id of the built-in role, and just-in-time access policy
+ /// setting
/// Name of the registration
/// definition.
/// Current state of the registration
@@ -48,10 +52,11 @@ public RegistrationDefinitionProperties()
/// 'Canceled', 'Failed', 'Succeeded', 'Updating'
/// Name of the managedBy
/// tenant.
- public RegistrationDefinitionProperties(IList authorizations, string managedByTenantId, string description = default(string), string registrationDefinitionName = default(string), string provisioningState = default(string), string managedByTenantName = default(string))
+ public RegistrationDefinitionProperties(IList authorizations, string managedByTenantId, string description = default(string), IList eligibleAuthorizations = default(IList), string registrationDefinitionName = default(string), string provisioningState = default(string), string managedByTenantName = default(string))
{
Description = description;
Authorizations = authorizations;
+ EligibleAuthorizations = eligibleAuthorizations;
RegistrationDefinitionName = registrationDefinitionName;
ManagedByTenantId = managedByTenantId;
ProvisioningState = provisioningState;
@@ -78,6 +83,14 @@ public RegistrationDefinitionProperties()
[JsonProperty(PropertyName = "authorizations")]
public IList Authorizations { get; set; }
+ ///
+ /// Gets or sets eligible PIM authorization tuple containing principal
+ /// id of the user/security group or service principal, id of the
+ /// built-in role, and just-in-time access policy setting
+ ///
+ [JsonProperty(PropertyName = "eligibleAuthorizations")]
+ public IList EligibleAuthorizations { get; set; }
+
///
/// Gets or sets name of the registration definition.
///
@@ -131,6 +144,16 @@ public virtual void Validate()
}
}
}
+ if (EligibleAuthorizations != null)
+ {
+ foreach (var element1 in EligibleAuthorizations)
+ {
+ if (element1 != null)
+ {
+ element1.Validate();
+ }
+ }
+ }
}
}
}
diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/SdkInfo_ManagedServicesClient.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/SdkInfo_ManagedServicesClient.cs
index c28da342868c..d778bfd40b60 100644
--- a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/SdkInfo_ManagedServicesClient.cs
+++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/SdkInfo_ManagedServicesClient.cs
@@ -19,9 +19,10 @@ public static IEnumerable> ApiInfo_ManagedServices
{
return new Tuple[]
{
- new Tuple("ManagedServices", "Operations", "2019-06-01"),
- new Tuple("ManagedServices", "RegistrationAssignments", "2019-06-01"),
- new Tuple("ManagedServices", "RegistrationDefinitions", "2019-06-01"),
+ new Tuple("ManagedServices", "MarketplaceRegistrationDefinitions", "2020-02-01-preview"),
+ new Tuple("ManagedServices", "Operations", "2020-02-01-preview"),
+ new Tuple("ManagedServices", "RegistrationAssignments", "2020-02-01-preview"),
+ new Tuple("ManagedServices", "RegistrationDefinitions", "2020-02-01-preview"),
}.AsEnumerable();
}
}