diff --git a/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/IManagedServiceIdentityClient.cs b/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/IManagedServiceIdentityClient.cs
index c09a0c99ccdb..7ac27d09e317 100644
--- a/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/IManagedServiceIdentityClient.cs
+++ b/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/IManagedServiceIdentityClient.cs
@@ -69,6 +69,11 @@ public partial interface IManagedServiceIdentityClient : System.IDisposable
bool? GenerateClientRequestId { get; set; }
+ ///
+ /// Gets the ISystemAssignedIdentitiesOperations.
+ ///
+ ISystemAssignedIdentitiesOperations SystemAssignedIdentities { get; }
+
///
/// Gets the IOperations.
///
diff --git a/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/ISystemAssignedIdentitiesOperations.cs b/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/ISystemAssignedIdentitiesOperations.cs
new file mode 100644
index 000000000000..7e1435ff4da7
--- /dev/null
+++ b/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/ISystemAssignedIdentitiesOperations.cs
@@ -0,0 +1,51 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.ManagedServiceIdentity
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// SystemAssignedIdentitiesOperations operations.
+ ///
+ public partial interface ISystemAssignedIdentitiesOperations
+ {
+ ///
+ /// Gets the systemAssignedIdentity available under the specified RP
+ /// scope.
+ ///
+ ///
+ /// The resource provider scope of the resource. Parent resource being
+ /// extended by Managed Identities.
+ ///
+ ///
+ /// 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> GetByScopeWithHttpMessagesAsync(string scope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/IUserAssignedIdentitiesOperations.cs b/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/IUserAssignedIdentitiesOperations.cs
index a05e2af3a21d..85eaa8077b09 100644
--- a/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/IUserAssignedIdentitiesOperations.cs
+++ b/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/IUserAssignedIdentitiesOperations.cs
@@ -123,7 +123,7 @@ public partial interface IUserAssignedIdentitiesOperations
///
/// Thrown when a required parameter is null
///
- Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, Identity parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, IdentityPatch parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Gets the identity.
///
diff --git a/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/ManagedServiceIdentityClient.cs b/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/ManagedServiceIdentityClient.cs
index 3ac00601114f..7c63088cc2f2 100644
--- a/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/ManagedServiceIdentityClient.cs
+++ b/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/ManagedServiceIdentityClient.cs
@@ -74,6 +74,11 @@ public partial class ManagedServiceIdentityClient : ServiceClient
public bool? GenerateClientRequestId { get; set; }
+ ///
+ /// Gets the ISystemAssignedIdentitiesOperations.
+ ///
+ public virtual ISystemAssignedIdentitiesOperations SystemAssignedIdentities { get; private set; }
+
///
/// Gets the IOperations.
///
@@ -325,6 +330,7 @@ public ManagedServiceIdentityClient(System.Uri baseUri, ServiceClientCredentials
///
private void Initialize()
{
+ SystemAssignedIdentities = new SystemAssignedIdentitiesOperations(this);
Operations = new Operations(this);
UserAssignedIdentities = new UserAssignedIdentitiesOperations(this);
BaseUri = new System.Uri("https://management.azure.com");
diff --git a/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/Models/Identity.cs b/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/Models/Identity.cs
index 13aef9f36ada..aefb0369c7df 100644
--- a/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/Models/Identity.cs
+++ b/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/Models/Identity.cs
@@ -35,10 +35,6 @@ public Identity()
///
/// Initializes a new instance of the Identity class.
///
- /// The id of the created identity.
- /// The name of the created identity.
- /// The Azure region where the identity
- /// lives.
/// Resource tags
/// The id of the tenant which the identity
/// belongs to.
@@ -46,23 +42,15 @@ public Identity()
/// associated with the created identity.
/// The id of the app associated with the
/// identity. This is a random generated UUID by MSI.
- /// The ManagedServiceIdentity DataPlane
- /// URL that can be queried to obtain the identity credentials. If
- /// identity is user assigned, then the clientSecretUrl will not be
- /// present in the response, otherwise it will be present.
/// The type of resource i.e.
/// Microsoft.ManagedIdentity/userAssignedIdentities. Possible values
/// include: 'Microsoft.ManagedIdentity/userAssignedIdentities'
- public Identity(string id = default(string), string name = default(string), string location = default(string), IDictionary tags = default(IDictionary), System.Guid? tenantId = default(System.Guid?), System.Guid? principalId = default(System.Guid?), System.Guid? clientId = default(System.Guid?), string clientSecretUrl = default(string), string type = default(string))
+ public Identity(IDictionary tags = default(IDictionary), System.Guid? tenantId = default(System.Guid?), System.Guid? principalId = default(System.Guid?), System.Guid? clientId = default(System.Guid?), string type = default(string))
{
- Id = id;
- Name = name;
- Location = location;
Tags = tags;
TenantId = tenantId;
PrincipalId = principalId;
ClientId = clientId;
- ClientSecretUrl = clientSecretUrl;
Type = type;
CustomInit();
}
@@ -72,24 +60,6 @@ public Identity()
///
partial void CustomInit();
- ///
- /// Gets the id of the created identity.
- ///
- [JsonProperty(PropertyName = "id")]
- public string Id { get; private set; }
-
- ///
- /// Gets the name of the created identity.
- ///
- [JsonProperty(PropertyName = "name")]
- public string Name { get; private set; }
-
- ///
- /// Gets or sets the Azure region where the identity lives.
- ///
- [JsonProperty(PropertyName = "location")]
- public string Location { get; set; }
-
///
/// Gets or sets resource tags
///
@@ -116,15 +86,6 @@ public Identity()
[JsonProperty(PropertyName = "properties.clientId")]
public System.Guid? ClientId { get; private set; }
- ///
- /// Gets The ManagedServiceIdentity DataPlane URL that can be queried
- /// to obtain the identity credentials. If identity is user assigned,
- /// then the clientSecretUrl will not be present in the response,
- /// otherwise it will be present.
- ///
- [JsonProperty(PropertyName = "properties.clientSecretUrl")]
- public string ClientSecretUrl { get; private set; }
-
///
/// Gets the type of resource i.e.
/// Microsoft.ManagedIdentity/userAssignedIdentities. Possible values
diff --git a/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/Models/IdentityPatch.cs b/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/Models/IdentityPatch.cs
new file mode 100644
index 000000000000..4284a2ee050c
--- /dev/null
+++ b/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/Models/IdentityPatch.cs
@@ -0,0 +1,98 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.ManagedServiceIdentity.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Describes an identity resource.
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class IdentityPatch : IResource
+ {
+ ///
+ /// Initializes a new instance of the IdentityPatch class.
+ ///
+ public IdentityPatch()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the IdentityPatch class.
+ ///
+ /// Resource tags
+ /// The id of the tenant which the identity
+ /// belongs to.
+ /// The id of the service principal object
+ /// associated with the created identity.
+ /// The id of the app associated with the
+ /// identity. This is a random generated UUID by MSI.
+ /// The type of resource i.e.
+ /// Microsoft.ManagedIdentity/userAssignedIdentities. Possible values
+ /// include: 'Microsoft.ManagedIdentity/userAssignedIdentities'
+ public IdentityPatch(IDictionary tags = default(IDictionary), System.Guid? tenantId = default(System.Guid?), System.Guid? principalId = default(System.Guid?), System.Guid? clientId = default(System.Guid?), string type = default(string))
+ {
+ Tags = tags;
+ TenantId = tenantId;
+ PrincipalId = principalId;
+ ClientId = clientId;
+ Type = type;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets resource tags
+ ///
+ [JsonProperty(PropertyName = "tags")]
+ public IDictionary Tags { get; set; }
+
+ ///
+ /// Gets the id of the tenant which the identity belongs to.
+ ///
+ [JsonProperty(PropertyName = "properties.tenantId")]
+ public System.Guid? TenantId { get; private set; }
+
+ ///
+ /// Gets the id of the service principal object associated with the
+ /// created identity.
+ ///
+ [JsonProperty(PropertyName = "properties.principalId")]
+ public System.Guid? PrincipalId { get; private set; }
+
+ ///
+ /// Gets the id of the app associated with the identity. This is a
+ /// random generated UUID by MSI.
+ ///
+ [JsonProperty(PropertyName = "properties.clientId")]
+ public System.Guid? ClientId { get; private set; }
+
+ ///
+ /// Gets the type of resource i.e.
+ /// Microsoft.ManagedIdentity/userAssignedIdentities. Possible values
+ /// include: 'Microsoft.ManagedIdentity/userAssignedIdentities'
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public string Type { get; private set; }
+
+ }
+}
diff --git a/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/Models/Resource.cs b/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/Models/Resource.cs
new file mode 100644
index 000000000000..ef7fe910682c
--- /dev/null
+++ b/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/Models/Resource.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.ManagedServiceIdentity.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Describes common properties of a resource.
+ ///
+ public partial class Resource : IResource
+ {
+ ///
+ /// Initializes a new instance of the Resource class.
+ ///
+ public Resource()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the Resource class.
+ ///
+ /// The id of the resource.
+ /// The name of the resource.
+ /// The Azure region where the resource
+ /// lives.
+ public Resource(string id = default(string), string name = default(string), string location = default(string))
+ {
+ Id = id;
+ Name = name;
+ Location = location;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the id of the resource.
+ ///
+ [JsonProperty(PropertyName = "id")]
+ public string Id { get; private set; }
+
+ ///
+ /// Gets the name of the resource.
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; private set; }
+
+ ///
+ /// Gets or sets the Azure region where the resource lives.
+ ///
+ [JsonProperty(PropertyName = "location")]
+ public string Location { get; set; }
+
+ }
+}
diff --git a/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/Models/SystemAssignedIdentity.cs b/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/Models/SystemAssignedIdentity.cs
new file mode 100644
index 000000000000..a49d171f23f8
--- /dev/null
+++ b/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/Models/SystemAssignedIdentity.cs
@@ -0,0 +1,96 @@
+//
+// 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.ManagedServiceIdentity.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Describes a system assigned identity resource.
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class SystemAssignedIdentity : IResource
+ {
+ ///
+ /// Initializes a new instance of the SystemAssignedIdentity class.
+ ///
+ public SystemAssignedIdentity()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SystemAssignedIdentity class.
+ ///
+ /// The id of the tenant which the identity
+ /// belongs to.
+ /// The id of the service principal object
+ /// associated with the created identity.
+ /// The id of the app associated with the
+ /// identity. This is a random generated UUID by MSI.
+ /// The ManagedServiceIdentity DataPlane
+ /// URL that can be queried to obtain the identity credentials.
+ /// The type of resource i.e.
+ /// Microsoft.Compute/virtualMachineScaleSets
+ public SystemAssignedIdentity(System.Guid? tenantId = default(System.Guid?), System.Guid? principalId = default(System.Guid?), System.Guid? clientId = default(System.Guid?), string clientSecretUrl = default(string), string type = default(string))
+ {
+ TenantId = tenantId;
+ PrincipalId = principalId;
+ ClientId = clientId;
+ ClientSecretUrl = clientSecretUrl;
+ Type = type;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the id of the tenant which the identity belongs to.
+ ///
+ [JsonProperty(PropertyName = "properties.tenantId")]
+ public System.Guid? TenantId { get; private set; }
+
+ ///
+ /// Gets the id of the service principal object associated with the
+ /// created identity.
+ ///
+ [JsonProperty(PropertyName = "properties.principalId")]
+ public System.Guid? PrincipalId { get; private set; }
+
+ ///
+ /// Gets the id of the app associated with the identity. This is a
+ /// random generated UUID by MSI.
+ ///
+ [JsonProperty(PropertyName = "properties.clientId")]
+ public System.Guid? ClientId { get; private set; }
+
+ ///
+ /// Gets The ManagedServiceIdentity DataPlane URL that can be queried
+ /// to obtain the identity credentials.
+ ///
+ [JsonProperty(PropertyName = "properties.clientSecretUrl")]
+ public string ClientSecretUrl { get; private set; }
+
+ ///
+ /// Gets the type of resource i.e.
+ /// Microsoft.Compute/virtualMachineScaleSets
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public string Type { get; private set; }
+
+ }
+}
diff --git a/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/SdkInfo_ManagedServiceIdentityClient.cs b/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/SdkInfo_ManagedServiceIdentityClient.cs
index 995c1df962fd..41dd0fd671f5 100644
--- a/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/SdkInfo_ManagedServiceIdentityClient.cs
+++ b/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/SdkInfo_ManagedServiceIdentityClient.cs
@@ -20,20 +20,10 @@ public static IEnumerable> ApiInfo_ManagedServiceI
return new Tuple[]
{
new Tuple("ManagedIdentity", "Operations", "2018-11-30"),
+ new Tuple("ManagedIdentity", "SystemAssignedIdentities", "2018-11-30"),
new Tuple("ManagedIdentity", "UserAssignedIdentities", "2018-11-30"),
}.AsEnumerable();
}
}
- // BEGIN: Code Generation Metadata Section
- public static readonly String AutoRestVersion = "2.0.4283";
- public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4283";
- public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/msi/resource-manager/readme.md --csharp --version=2.0.4283 --reflect-api-versions --csharp-sdks-folder=C:\\azure-sdk-for-net\\src\\SDKs";
- public static readonly String GithubForkName = "Azure";
- public static readonly String GithubBranchName = "master";
- public static readonly String GithubCommidId = "39f45ec8b0d69bce4aeb46564a498615df7d028c";
- public static readonly String CodeGenerationErrors = "";
- public static readonly String GithubRepoName = "azure-rest-api-specs";
- // END: Code Generation Metadata Section
}
}
-
diff --git a/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/SystemAssignedIdentitiesOperations.cs b/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/SystemAssignedIdentitiesOperations.cs
new file mode 100644
index 000000000000..43644c870874
--- /dev/null
+++ b/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/SystemAssignedIdentitiesOperations.cs
@@ -0,0 +1,237 @@
+//
+// 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.ManagedServiceIdentity
+{
+ 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;
+
+ ///
+ /// SystemAssignedIdentitiesOperations operations.
+ ///
+ internal partial class SystemAssignedIdentitiesOperations : IServiceOperations, ISystemAssignedIdentitiesOperations
+ {
+ ///
+ /// Initializes a new instance of the SystemAssignedIdentitiesOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal SystemAssignedIdentitiesOperations(ManagedServiceIdentityClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the ManagedServiceIdentityClient
+ ///
+ public ManagedServiceIdentityClient Client { get; private set; }
+
+ ///
+ /// Gets the systemAssignedIdentity available under the specified RP scope.
+ ///
+ ///
+ /// The resource provider scope of the resource. Parent resource being extended
+ /// by Managed Identities.
+ ///
+ ///
+ /// 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> GetByScopeWithHttpMessagesAsync(string scope, 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("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "GetByScope", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{scope}/providers/Microsoft.ManagedIdentity/identities/default").ToString();
+ _url = _url.Replace("{scope}", scope);
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ }
+}
diff --git a/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/SystemAssignedIdentitiesOperationsExtensions.cs b/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/SystemAssignedIdentitiesOperationsExtensions.cs
new file mode 100644
index 000000000000..15e7d257028e
--- /dev/null
+++ b/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/SystemAssignedIdentitiesOperationsExtensions.cs
@@ -0,0 +1,61 @@
+//
+// 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.ManagedServiceIdentity
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for SystemAssignedIdentitiesOperations.
+ ///
+ public static partial class SystemAssignedIdentitiesOperationsExtensions
+ {
+ ///
+ /// Gets the systemAssignedIdentity available under the specified RP scope.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The resource provider scope of the resource. Parent resource being extended
+ /// by Managed Identities.
+ ///
+ public static SystemAssignedIdentity GetByScope(this ISystemAssignedIdentitiesOperations operations, string scope)
+ {
+ return operations.GetByScopeAsync(scope).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets the systemAssignedIdentity available under the specified RP scope.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The resource provider scope of the resource. Parent resource being extended
+ /// by Managed Identities.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task GetByScopeAsync(this ISystemAssignedIdentitiesOperations operations, string scope, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.GetByScopeWithHttpMessagesAsync(scope, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ }
+}
diff --git a/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/UserAssignedIdentitiesOperations.cs b/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/UserAssignedIdentitiesOperations.cs
index 1e4ea974e3e3..73f2884beb8c 100644
--- a/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/UserAssignedIdentitiesOperations.cs
+++ b/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/UserAssignedIdentitiesOperations.cs
@@ -679,7 +679,7 @@ internal UserAssignedIdentitiesOperations(ManagedServiceIdentityClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, Identity parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, IdentityPatch parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
diff --git a/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/UserAssignedIdentitiesOperationsExtensions.cs b/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/UserAssignedIdentitiesOperationsExtensions.cs
index e037e8763d35..c6320e719a14 100644
--- a/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/UserAssignedIdentitiesOperationsExtensions.cs
+++ b/sdk/managedserviceidentity/Microsoft.Azure.Management.ManagedServiceIdentity/src/Generated/UserAssignedIdentitiesOperationsExtensions.cs
@@ -150,7 +150,7 @@ public static Identity CreateOrUpdate(this IUserAssignedIdentitiesOperations ope
///
/// Parameters to update the identity
///
- public static Identity Update(this IUserAssignedIdentitiesOperations operations, string resourceGroupName, string resourceName, Identity parameters)
+ public static Identity Update(this IUserAssignedIdentitiesOperations operations, string resourceGroupName, string resourceName, IdentityPatch parameters)
{
return operations.UpdateAsync(resourceGroupName, resourceName, parameters).GetAwaiter().GetResult();
}
@@ -173,7 +173,7 @@ public static Identity Update(this IUserAssignedIdentitiesOperations operations,
///
/// The cancellation token.
///
- public static async Task UpdateAsync(this IUserAssignedIdentitiesOperations operations, string resourceGroupName, string resourceName, Identity parameters, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task UpdateAsync(this IUserAssignedIdentitiesOperations operations, string resourceGroupName, string resourceName, IdentityPatch parameters, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, resourceName, parameters, null, cancellationToken).ConfigureAwait(false))
{