Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR Microsoft.Azure.Management.ManagedServiceIdentity] add cli.md for msi and fix location parameter #570

Open
wants to merge 1 commit into
base: sdkAutomation/Microsoft.Azure.Management.ManagedServiceIdentity
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ public partial interface IManagedServiceIdentityClient : System.IDisposable
bool? GenerateClientRequestId { get; set; }


/// <summary>
/// Gets the ISystemAssignedIdentitiesOperations.
/// </summary>
ISystemAssignedIdentitiesOperations SystemAssignedIdentities { get; }

/// <summary>
/// Gets the IOperations.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// <auto-generated>
// 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.
// </auto-generated>

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;

/// <summary>
/// SystemAssignedIdentitiesOperations operations.
/// </summary>
public partial interface ISystemAssignedIdentitiesOperations
{
/// <summary>
/// Gets the systemAssignedIdentity available under the specified RP
/// scope.
/// </summary>
/// <param name='scope'>
/// The resource provider scope of the resource. Parent resource being
/// extended by Managed Identities.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="Microsoft.Rest.Azure.CloudException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<SystemAssignedIdentity>> GetByScopeWithHttpMessagesAsync(string scope, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public partial interface IUserAssignedIdentitiesOperations
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<Identity>> UpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, Identity parameters, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
Task<AzureOperationResponse<Identity>> UpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, IdentityPatch parameters, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Gets the identity.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ public partial class ManagedServiceIdentityClient : ServiceClient<ManagedService
/// </summary>
public bool? GenerateClientRequestId { get; set; }

/// <summary>
/// Gets the ISystemAssignedIdentitiesOperations.
/// </summary>
public virtual ISystemAssignedIdentitiesOperations SystemAssignedIdentities { get; private set; }

/// <summary>
/// Gets the IOperations.
/// </summary>
Expand Down Expand Up @@ -325,6 +330,7 @@ public ManagedServiceIdentityClient(System.Uri baseUri, ServiceClientCredentials
/// </summary>
private void Initialize()
{
SystemAssignedIdentities = new SystemAssignedIdentitiesOperations(this);
Operations = new Operations(this);
UserAssignedIdentities = new UserAssignedIdentitiesOperations(this);
BaseUri = new System.Uri("https://management.azure.com");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,34 +35,22 @@ public Identity()
/// <summary>
/// Initializes a new instance of the Identity class.
/// </summary>
/// <param name="id">The id of the created identity.</param>
/// <param name="name">The name of the created identity.</param>
/// <param name="location">The Azure region where the identity
/// lives.</param>
/// <param name="tags">Resource tags</param>
/// <param name="tenantId">The id of the tenant which the identity
/// belongs to.</param>
/// <param name="principalId">The id of the service principal object
/// associated with the created identity.</param>
/// <param name="clientId">The id of the app associated with the
/// identity. This is a random generated UUID by MSI.</param>
/// <param name="clientSecretUrl"> 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.</param>
/// <param name="type">The type of resource i.e.
/// Microsoft.ManagedIdentity/userAssignedIdentities. Possible values
/// include: 'Microsoft.ManagedIdentity/userAssignedIdentities'</param>
public Identity(string id = default(string), string name = default(string), string location = default(string), IDictionary<string, string> tags = default(IDictionary<string, string>), 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<string, string> tags = default(IDictionary<string, string>), 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();
}
Expand All @@ -72,24 +60,6 @@ public Identity()
/// </summary>
partial void CustomInit();

/// <summary>
/// Gets the id of the created identity.
/// </summary>
[JsonProperty(PropertyName = "id")]
public string Id { get; private set; }

/// <summary>
/// Gets the name of the created identity.
/// </summary>
[JsonProperty(PropertyName = "name")]
public string Name { get; private set; }

/// <summary>
/// Gets or sets the Azure region where the identity lives.
/// </summary>
[JsonProperty(PropertyName = "location")]
public string Location { get; set; }

/// <summary>
/// Gets or sets resource tags
/// </summary>
Expand All @@ -116,15 +86,6 @@ public Identity()
[JsonProperty(PropertyName = "properties.clientId")]
public System.Guid? ClientId { get; private set; }

/// <summary>
/// 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.
/// </summary>
[JsonProperty(PropertyName = "properties.clientSecretUrl")]
public string ClientSecretUrl { get; private set; }

/// <summary>
/// Gets the type of resource i.e.
/// Microsoft.ManagedIdentity/userAssignedIdentities. Possible values
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
// <auto-generated>
// 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.
// </auto-generated>

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;

/// <summary>
/// Describes an identity resource.
/// </summary>
[Rest.Serialization.JsonTransformation]
public partial class IdentityPatch : IResource
{
/// <summary>
/// Initializes a new instance of the IdentityPatch class.
/// </summary>
public IdentityPatch()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the IdentityPatch class.
/// </summary>
/// <param name="tags">Resource tags</param>
/// <param name="tenantId">The id of the tenant which the identity
/// belongs to.</param>
/// <param name="principalId">The id of the service principal object
/// associated with the created identity.</param>
/// <param name="clientId">The id of the app associated with the
/// identity. This is a random generated UUID by MSI.</param>
/// <param name="type">The type of resource i.e.
/// Microsoft.ManagedIdentity/userAssignedIdentities. Possible values
/// include: 'Microsoft.ManagedIdentity/userAssignedIdentities'</param>
public IdentityPatch(IDictionary<string, string> tags = default(IDictionary<string, string>), 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();
}

/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();

/// <summary>
/// Gets or sets resource tags
/// </summary>
[JsonProperty(PropertyName = "tags")]
public IDictionary<string, string> Tags { get; set; }

/// <summary>
/// Gets the id of the tenant which the identity belongs to.
/// </summary>
[JsonProperty(PropertyName = "properties.tenantId")]
public System.Guid? TenantId { get; private set; }

/// <summary>
/// Gets the id of the service principal object associated with the
/// created identity.
/// </summary>
[JsonProperty(PropertyName = "properties.principalId")]
public System.Guid? PrincipalId { get; private set; }

/// <summary>
/// Gets the id of the app associated with the identity. This is a
/// random generated UUID by MSI.
/// </summary>
[JsonProperty(PropertyName = "properties.clientId")]
public System.Guid? ClientId { get; private set; }

/// <summary>
/// Gets the type of resource i.e.
/// Microsoft.ManagedIdentity/userAssignedIdentities. Possible values
/// include: 'Microsoft.ManagedIdentity/userAssignedIdentities'
/// </summary>
[JsonProperty(PropertyName = "type")]
public string Type { get; private set; }

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
// <auto-generated>
// 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.
// </auto-generated>

namespace Microsoft.Azure.Management.ManagedServiceIdentity.Models
{
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Newtonsoft.Json;
using System.Linq;

/// <summary>
/// Describes common properties of a resource.
/// </summary>
public partial class Resource : IResource
{
/// <summary>
/// Initializes a new instance of the Resource class.
/// </summary>
public Resource()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the Resource class.
/// </summary>
/// <param name="id">The id of the resource.</param>
/// <param name="name">The name of the resource.</param>
/// <param name="location">The Azure region where the resource
/// lives.</param>
public Resource(string id = default(string), string name = default(string), string location = default(string))
{
Id = id;
Name = name;
Location = location;
CustomInit();
}

/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();

/// <summary>
/// Gets the id of the resource.
/// </summary>
[JsonProperty(PropertyName = "id")]
public string Id { get; private set; }

/// <summary>
/// Gets the name of the resource.
/// </summary>
[JsonProperty(PropertyName = "name")]
public string Name { get; private set; }

/// <summary>
/// Gets or sets the Azure region where the resource lives.
/// </summary>
[JsonProperty(PropertyName = "location")]
public string Location { get; set; }

}
}
Loading