ArmResourcesPolicyModelFactory.PolicyAssignmentIdentity Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Identity for the resource. Policy assignments support a maximum of one identity. That is either a system assigned identity or a single user assigned identity.
public static Azure.ResourceManager.Resources.Policy.Models.PolicyAssignmentIdentity PolicyAssignmentIdentity(Guid? principalId = default, Guid? tenantId = default, Azure.ResourceManager.Resources.Policy.Models.PolicyIdentityType? type = default, System.Collections.Generic.IDictionary<string,Azure.ResourceManager.Resources.Policy.Models.PolicyUserAssignedIdentity> userAssignedIdentities = default);
static member PolicyAssignmentIdentity : Nullable<Guid> * Nullable<Guid> * Nullable<Azure.ResourceManager.Resources.Policy.Models.PolicyIdentityType> * System.Collections.Generic.IDictionary<string, Azure.ResourceManager.Resources.Policy.Models.PolicyUserAssignedIdentity> -> Azure.ResourceManager.Resources.Policy.Models.PolicyAssignmentIdentity
Public Shared Function PolicyAssignmentIdentity (Optional principalId As Nullable(Of Guid) = Nothing, Optional tenantId As Nullable(Of Guid) = Nothing, Optional type As Nullable(Of PolicyIdentityType) = Nothing, Optional userAssignedIdentities As IDictionary(Of String, PolicyUserAssignedIdentity) = Nothing) As PolicyAssignmentIdentity
Parameters
The principal ID of the resource identity. This property will only be provided for a system assigned identity.
The tenant ID of the resource identity. This property will only be provided for a system assigned identity.
- type
- Nullable<PolicyIdentityType>
The identity type. This is the only required field when adding a system or user assigned identity to a resource.
- userAssignedIdentities
- IDictionary<String,PolicyUserAssignedIdentity>
The user identity associated with the policy. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
Returns
A new PolicyAssignmentIdentity instance for mocking.