-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
ManagedServiceIdentity.cs
48 lines (43 loc) · 3.51 KB
/
ManagedServiceIdentity.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#nullable disable
using System;
using System.Collections.Generic;
using Azure.Core;
namespace Azure.ResourceManager.Models
{
/// <summary> Managed service identity (system assigned and/or user assigned identities). </summary>
[PropertyReferenceType(new string[] { "UserAssignedIdentities" })]
public partial class ManagedServiceIdentity
{
/// <summary> Initializes a new instance of ManagedServiceIdentity. </summary>
/// <param name="managedServiceIdentityType"> Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). </param>
[InitializationConstructor]
public ManagedServiceIdentity(ManagedServiceIdentityType managedServiceIdentityType)
{
ManagedServiceIdentityType = managedServiceIdentityType;
UserAssignedIdentities = new ChangeTrackingDictionary<ResourceIdentifier, UserAssignedIdentity>();
}
/// <summary> Initializes a new instance of ManagedServiceIdentity. </summary>
/// <param name="principalId"> The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. </param>
/// <param name="tenantId"> The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. </param>
/// <param name="managedServiceIdentityType"> Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). </param>
/// <param name="userAssignedIdentities"> The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. </param>
[SerializationConstructor]
internal ManagedServiceIdentity(Guid? principalId, Guid? tenantId, ManagedServiceIdentityType managedServiceIdentityType, IDictionary<ResourceIdentifier, UserAssignedIdentity> userAssignedIdentities)
{
PrincipalId = principalId;
TenantId = tenantId;
ManagedServiceIdentityType = managedServiceIdentityType;
UserAssignedIdentities = userAssignedIdentities;
}
/// <summary> The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. </summary>
public Guid? PrincipalId { get; }
/// <summary> The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. </summary>
public Guid? TenantId { get; }
/// <summary> Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). </summary>
public ManagedServiceIdentityType ManagedServiceIdentityType { get; set; }
/// <summary> The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. </summary>
public IDictionary<ResourceIdentifier, UserAssignedIdentity> UserAssignedIdentities { get; }
}
}