Role Management Policy Assignments - Create
Skapa en rollhanteringsprinciptilldelning
PUT https://management.azure.com/{scope}/providers/Microsoft.Authorization/roleManagementPolicyAssignments/{roleManagementPolicyAssignmentName}?api-version=2020-10-01
URI-parametrar
Name | I | Obligatorisk | Typ | Description |
---|---|---|---|---|
role
|
path | True |
string |
Namnet på formatet {guid_guid} tilldelningen av rollhanteringsprincipen till upsert. |
scope
|
path | True |
string |
Omfånget för tilldelningen av rollhanteringsprincipen till upsert. |
api-version
|
query | True |
string |
Den API-version som ska användas för den här åtgärden. |
Begärandetext
Name | Typ | Description |
---|---|---|
properties.policyId |
string |
Principhanteringsprinciptilldelning för princip-ID. |
properties.roleDefinitionId |
string |
Rolldefinitionen för tilldelning av hanteringsprinciper. |
properties.scope |
string |
Principomfånget för rollhantering. |
Svar
Name | Typ | Description |
---|---|---|
201 Created |
Skapad – Returnerar den skapade eller uppdaterade principtilldelningen. |
|
Other Status Codes |
Felsvar som beskriver varför åtgärden misslyckades. |
Säkerhet
azure_auth
Azure Active Directory OAuth2 Flow
Typ:
oauth2
Flow:
implicit
Auktoriseringswebbadress:
https://login.microsoftonline.com/common/oauth2/authorize
Omfattningar
Name | Description |
---|---|
user_impersonation | personifiera ditt användarkonto |
Exempel
PutRoleManagementPolicyAssignment
Exempelbegäran
PUT https://management.azure.com/providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicyAssignments/b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24?api-version=2020-10-01
{
"properties": {
"scope": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368",
"roleDefinitionId": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleDefinitions/a1705bd2-3a8f-45a5-8683-466fcfd5cc24",
"policyId": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/b959d571-f0b5-4042-88a7-01be6cb22db9"
}
}
Exempelsvar
{
"properties": {
"scope": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368",
"roleDefinitionId": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleDefinitions/a1705bd2-3a8f-45a5-8683-466fcfd5cc24",
"policyId": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/b959d571-f0b5-4042-88a7-01be6cb22db9",
"effectiveRules": [
{
"enabledRules": [],
"id": "Enablement_Admin_Eligibility",
"ruleType": "RoleManagementPolicyEnablementRule",
"target": {
"caller": "Admin",
"operations": [
"All"
],
"level": "Eligibility",
"targetObjects": null,
"inheritableSettings": null,
"enforcedSettings": null
}
},
{
"isExpirationRequired": true,
"maximumDuration": "P90D",
"id": "Expiration_Admin_Eligibility",
"ruleType": "RoleManagementPolicyExpirationRule",
"target": {
"caller": "Admin",
"operations": [
"All"
],
"level": "Eligibility",
"targetObjects": null,
"inheritableSettings": null,
"enforcedSettings": null
}
},
{
"notificationType": "Email",
"recipientType": "Admin",
"isDefaultRecipientsEnabled": false,
"notificationLevel": "Critical",
"notificationRecipients": [
"admin_admin_eligible@test.com"
],
"id": "Notification_Admin_Admin_Eligibility",
"ruleType": "RoleManagementPolicyNotificationRule",
"target": {
"caller": "Admin",
"operations": [
"All"
],
"level": "Eligibility",
"targetObjects": null,
"inheritableSettings": null,
"enforcedSettings": null
}
},
{
"notificationType": "Email",
"recipientType": "Requestor",
"isDefaultRecipientsEnabled": false,
"notificationLevel": "Critical",
"notificationRecipients": [
"requestor_admin_eligible@test.com"
],
"id": "Notification_Requestor_Admin_Eligibility",
"ruleType": "RoleManagementPolicyNotificationRule",
"target": {
"caller": "Admin",
"operations": [
"All"
],
"level": "Eligibility",
"targetObjects": null,
"inheritableSettings": null,
"enforcedSettings": null
}
},
{
"notificationType": "Email",
"recipientType": "Approver",
"isDefaultRecipientsEnabled": false,
"notificationLevel": "Critical",
"notificationRecipients": [
"approver_admin_eligible@test.com"
],
"id": "Notification_Approver_Admin_Eligibility",
"ruleType": "RoleManagementPolicyNotificationRule",
"target": {
"caller": "Admin",
"operations": [
"All"
],
"level": "Eligibility",
"targetObjects": null,
"inheritableSettings": null,
"enforcedSettings": null
}
},
{
"enabledRules": [
"MultiFactorAuthentication",
"Justification"
],
"id": "Enablement_Admin_Assignment",
"ruleType": "RoleManagementPolicyEnablementRule",
"target": {
"caller": "Admin",
"operations": [
"All"
],
"level": "Assignment",
"targetObjects": null,
"inheritableSettings": null,
"enforcedSettings": null
}
},
{
"isExpirationRequired": false,
"maximumDuration": "P90D",
"id": "Expiration_Admin_Assignment",
"ruleType": "RoleManagementPolicyExpirationRule",
"target": {
"caller": "Admin",
"operations": [
"All"
],
"level": "Assignment",
"targetObjects": null,
"inheritableSettings": null,
"enforcedSettings": null
}
},
{
"notificationType": "Email",
"recipientType": "Admin",
"isDefaultRecipientsEnabled": false,
"notificationLevel": "Critical",
"notificationRecipients": [
"admin_admin_member@test.com"
],
"id": "Notification_Admin_Admin_Assignment",
"ruleType": "RoleManagementPolicyNotificationRule",
"target": {
"caller": "Admin",
"operations": [
"All"
],
"level": "Assignment",
"targetObjects": null,
"inheritableSettings": null,
"enforcedSettings": null
}
},
{
"notificationType": "Email",
"recipientType": "Requestor",
"isDefaultRecipientsEnabled": false,
"notificationLevel": "Critical",
"notificationRecipients": [
"requestor_admin_member@test.com"
],
"id": "Notification_Requestor_Admin_Assignment",
"ruleType": "RoleManagementPolicyNotificationRule",
"target": {
"caller": "Admin",
"operations": [
"All"
],
"level": "Assignment",
"targetObjects": null,
"inheritableSettings": null,
"enforcedSettings": null
}
},
{
"notificationType": "Email",
"recipientType": "Approver",
"isDefaultRecipientsEnabled": false,
"notificationLevel": "Critical",
"notificationRecipients": [
"approver_admin_member@test.com"
],
"id": "Notification_Approver_Admin_Assignment",
"ruleType": "RoleManagementPolicyNotificationRule",
"target": {
"caller": "Admin",
"operations": [
"All"
],
"level": "Assignment",
"targetObjects": null,
"inheritableSettings": null,
"enforcedSettings": null
}
},
{
"setting": {
"isApprovalRequired": true,
"isApprovalRequiredForExtension": false,
"isRequestorJustificationRequired": true,
"approvalMode": "SingleStage",
"approvalStages": [
{
"approvalStageTimeOutInDays": 1,
"isApproverJustificationRequired": true,
"escalationTimeInMinutes": 0,
"primaryApprovers": [
{
"id": "2385b0f3-5fa9-43cf-8ca4-b01dc97298cd",
"description": "amansw_new_group",
"isBackup": false,
"userType": "Group"
},
{
"id": "2f4913c9-d15b-406a-9946-1d66a28f2690",
"description": "amansw_group",
"isBackup": false,
"userType": "Group"
}
],
"isEscalationEnabled": false,
"escalationApprovers": null
}
]
},
"id": "Approval_EndUser_Assignment",
"ruleType": "RoleManagementPolicyApprovalRule",
"target": {
"caller": "EndUser",
"operations": [
"All"
],
"level": "Assignment",
"targetObjects": null,
"inheritableSettings": null,
"enforcedSettings": null
}
},
{
"isEnabled": false,
"claimValue": "",
"id": "AuthenticationContext_EndUser_Assignment",
"ruleType": "RoleManagementPolicyAuthenticationContextRule",
"target": {
"caller": "EndUser",
"operations": [
"All"
],
"level": "Assignment",
"targetObjects": null,
"inheritableSettings": null,
"enforcedSettings": null
}
},
{
"enabledRules": [
"MultiFactorAuthentication",
"Justification",
"Ticketing"
],
"id": "Enablement_EndUser_Assignment",
"ruleType": "RoleManagementPolicyEnablementRule",
"target": {
"caller": "EndUser",
"operations": [
"All"
],
"level": "Assignment",
"targetObjects": null,
"inheritableSettings": null,
"enforcedSettings": null
}
},
{
"isExpirationRequired": true,
"maximumDuration": "PT7H",
"id": "Expiration_EndUser_Assignment",
"ruleType": "RoleManagementPolicyExpirationRule",
"target": {
"caller": "EndUser",
"operations": [
"All"
],
"level": "Assignment",
"targetObjects": null,
"inheritableSettings": null,
"enforcedSettings": null
}
},
{
"notificationType": "Email",
"recipientType": "Admin",
"isDefaultRecipientsEnabled": false,
"notificationLevel": "Critical",
"notificationRecipients": [
"admin_enduser_member@test.com"
],
"id": "Notification_Admin_EndUser_Assignment",
"ruleType": "RoleManagementPolicyNotificationRule",
"target": {
"caller": "EndUser",
"operations": [
"All"
],
"level": "Assignment",
"targetObjects": null,
"inheritableSettings": null,
"enforcedSettings": null
}
},
{
"notificationType": "Email",
"recipientType": "Requestor",
"isDefaultRecipientsEnabled": false,
"notificationLevel": "Critical",
"notificationRecipients": [
"requestor_enduser_member@test.com"
],
"id": "Notification_Requestor_EndUser_Assignment",
"ruleType": "RoleManagementPolicyNotificationRule",
"target": {
"caller": "EndUser",
"operations": [
"All"
],
"level": "Assignment",
"targetObjects": null,
"inheritableSettings": null,
"enforcedSettings": null
}
},
{
"notificationType": "Email",
"recipientType": "Approver",
"isDefaultRecipientsEnabled": true,
"notificationLevel": "Critical",
"notificationRecipients": null,
"id": "Notification_Approver_EndUser_Assignment",
"ruleType": "RoleManagementPolicyNotificationRule",
"target": {
"caller": "EndUser",
"operations": [
"All"
],
"level": "Assignment",
"targetObjects": null,
"inheritableSettings": null,
"enforcedSettings": null
}
}
],
"policyAssignmentProperties": {
"scope": {
"id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368",
"displayName": "Pay-As-You-Go",
"type": "subscription"
},
"roleDefinition": {
"id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleDefinitions/a1705bd2-3a8f-45a5-8683-466fcfd5cc24",
"displayName": "FHIR Data Converter",
"type": "BuiltInRole"
},
"policy": {
"id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/b959d571-f0b5-4042-88a7-01be6cb22db9",
"lastModifiedBy": null,
"lastModifiedDateTime": null
}
}
},
"name": "b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24",
"id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicyAssignment/b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24",
"type": "Microsoft.Authorization/RoleManagementPolicyAssignment"
}
Definitioner
Name | Description |
---|---|
Cloud |
Ett felsvar från tjänsten. |
Cloud |
Ett felsvar från tjänsten. |
Policy |
Information om principen |
Policy |
Utökad information om resursomfång, rolldefinition och princip |
Principal |
Namnet på entiteten ändrade den senast |
Role |
Information om rolldefinition |
Role |
Princip för rollhantering |
Scope |
Information om resursomfånget |
CloudError
Ett felsvar från tjänsten.
Name | Typ | Description |
---|---|---|
error |
Ett felsvar från tjänsten. |
CloudErrorBody
Ett felsvar från tjänsten.
Name | Typ | Description |
---|---|---|
code |
string |
En identifierare för felet. Koder är invarianta och är avsedda att användas programmatiskt. |
message |
string |
Ett meddelande som beskriver felet, avsett att vara lämpligt för visning i ett användargränssnitt. |
Policy
Information om principen
Name | Typ | Description |
---|---|---|
id |
string |
ID för principen |
lastModifiedBy |
Namnet på entiteten ändrade den senast |
|
lastModifiedDateTime |
string |
Den senast ändrade datumtiden. |
PolicyAssignmentProperties
Utökad information om resursomfång, rolldefinition och princip
Name | Typ | Description |
---|---|---|
policy |
Information om principen |
|
roleDefinition |
Information om rolldefinition |
|
scope |
Information om resursomfånget |
Principal
Namnet på entiteten ändrade den senast
Name | Typ | Description |
---|---|---|
displayName |
string |
Namnet på huvudkontot har gjort ändringar |
string |
Email av huvudkontot |
|
id |
string |
ID:t för huvudkontot har gjort ändringar |
type |
string |
Typ av huvudnamn, till exempel användare, grupp osv. |
RoleDefinition
Information om rolldefinition
Name | Typ | Description |
---|---|---|
displayName |
string |
Visningsnamn för rolldefinitionen |
id |
string |
ID för rolldefinitionen |
type |
string |
Typ av rolldefinition |
RoleManagementPolicyAssignment
Princip för rollhantering
Name | Typ | Description |
---|---|---|
id |
string |
Princip-ID för rollhantering. |
name |
string |
Namnet på rollhanteringsprincipen. |
properties.effectiveRules |
Role |
Den skrivskyddade beräkningsregeln som tillämpas på principen. |
properties.policyAssignmentProperties |
Ytterligare egenskaper för omfång, rolldefinition och princip |
|
properties.policyId |
string |
Principhanteringsprinciptilldelning för princip-ID. |
properties.roleDefinitionId |
string |
Rolldefinitionen för tilldelning av hanteringsprinciper. |
properties.scope |
string |
Principomfånget för rollhantering. |
type |
string |
Principtypen för rollhantering. |
Scope
Information om resursomfånget
Name | Typ | Description |
---|---|---|
displayName |
string |
Resursens visningsnamn |
id |
string |
Resursens omfångs-ID |
type |
string |
Resurstyp |