Policy Assignments - Create
Bu işlem, verilen kapsam ve isimle bir politika ataması oluşturur veya günceller. İlke atamaları, kapsamları içinde yer alan tüm kaynaklar için geçerlidir. Örneğin, kaynak grubu kapsamında bir ilke atadığınızda, bu ilke gruptaki tüm kaynaklar için geçerlidir.
PUT https://management.azure.com/{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}?api-version=2026-07-01
URI Parametreleri
| Name | İçinde | Gerekli | Tür | Description |
|---|---|---|---|---|
|
policy
|
path | True |
string pattern: ^[^<>%&:\?/]*[^<>%&:\?/ ]+$ |
Alınacak ilke atamasının adı. |
|
scope
|
path | True |
string |
Kaynağın tam nitelikli Azure Resource manager tanımlayıcısı. |
|
api-version
|
query | True |
string minLength: 1 |
Bu işlem için kullanılacak API sürümü. |
İstek Gövdesi
| Name | Tür | Description |
|---|---|---|
| identity |
İlke atamasıyla ilişkili yönetilen kimlik. |
|
| location |
string |
İlke atamasının konumu. Yalnızca yönetilen kimlik kullanıldığında gereklidir. |
| properties.assignmentType |
İlke atamasının türü. Olası değerler NotSpecified, System, SystemHidden ve Custom değerleridir. Değişmez. |
|
| properties.definitionVersion |
string |
Kullanılacak ilke tanımının sürümü. |
| properties.description |
string |
İlke ihlali durumunda bu ileti yanıtın bir parçası olacaktır. |
| properties.displayName |
string |
İlke atamasının görünen adı. |
| properties.enforcementMode |
İlke ataması zorlama modu. Olası değerler Default, DoNotEnforce ve Enroll değerleridir |
|
| properties.metadata |
İlke atama meta verileri. Meta veriler açık uçlu bir nesnedir ve genellikle anahtar değer çiftleri koleksiyonudur. |
|
| properties.nonComplianceMessages |
Kaynağın ilkeyle neden uyumlu olmadığını açıklayan iletiler. |
|
| properties.notScopes |
string[] |
İlkenin dışlanan kapsamları. |
| properties.overrides |
Override[] |
İlke özellik değerini geçersiz kılar. |
| properties.parameters |
<string,
Parameter |
Atanan ilke kuralı için parametre değerleri. Anahtarlar parametre adlarıdır. |
| properties.policyDefinitionId |
string |
Atanan ilke tanımının veya ilke kümesi tanımının kimliği. |
| properties.resourceSelectors |
İlkeleri kaynak özelliklerine göre filtrelemek için kaynak seçici listesi. |
|
| properties.selfServeExemptionSettings |
Poliçe ataması için kendi kendine hizmet muafiyet ayarları. |
Yanıtlar
| Name | Tür | Description |
|---|---|---|
| 201 Created |
Kaynak 'PolicyAssignment' operasyon oluşturma başarılı oldu |
|
| Other Status Codes |
Beklenmeyen bir hata yanıtı. |
Güvenlik
azure_auth
Azure Active Directory OAuth2 Akışı.
Tür:
oauth2
Akış:
implicit
Yetkilendirme URL’si:
https://login.microsoftonline.com/common/oauth2/authorize
Kapsamlar
| Name | Description |
|---|---|
| user_impersonation | kullanıcı hesabınızı taklit etme |
Örnekler
Create or update a policy assignment
Örnek isteği
PUT https://management.azure.com/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyAssignments/EnforceNaming?api-version=2026-07-01
{
"properties": {
"description": "Force resource names to begin with given DeptA and end with -LC",
"displayName": "Enforce resource naming rules",
"metadata": {
"assignedBy": "Special Someone"
},
"nonComplianceMessages": [
{
"message": "Resource names must start with 'DeptA' and end with '-LC'."
}
],
"parameters": {
"prefix": {
"value": "DeptA"
},
"suffix": {
"value": "-LC"
}
},
"policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming"
}
}
Örnek yanıt
{
"name": "EnforceNaming",
"type": "Microsoft.Authorization/policyAssignments",
"id": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyAssignments/EnforceNaming",
"properties": {
"description": "Force resource names to begin with given DeptA and end with -LC",
"definitionVersion": "1.*.*",
"displayName": "Enforce resource naming rules",
"enforcementMode": "Default",
"instanceId": "e4b0f5a6-7c8d-4e9f-8a1b-2c3d4e5f6a7b",
"metadata": {
"assignedBy": "Special Someone"
},
"nonComplianceMessages": [
{
"message": "Resource names must start with 'DeptA' and end with '-LC'."
}
],
"notScopes": [],
"parameters": {
"prefix": {
"value": "DeptA"
},
"suffix": {
"value": "-LC"
}
},
"policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming",
"scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2"
}
}
Create or update a policy assignment to enforce policy effect only on enrolled resources during resource creation or update.
Örnek isteği
PUT https://management.azure.com/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyAssignments/EnforceNamingEnroll?api-version=2026-07-01
{
"properties": {
"description": "Force resource names to begin with given DeptA and end with -LC",
"displayName": "Enforce resource naming rules",
"enforcementMode": "Enroll",
"metadata": {
"assignedBy": "Special Someone"
},
"parameters": {
"prefix": {
"value": "DeptA"
},
"suffix": {
"value": "-LC"
}
},
"policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming"
}
}
Örnek yanıt
{
"name": "EnforceNamingEnroll",
"type": "Microsoft.Authorization/policyAssignments",
"id": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyAssignments/EnforceNamingEnroll",
"properties": {
"description": "Force resource names to begin with given DeptA and end with -LC",
"definitionVersion": "1.*.*",
"displayName": "Enforce resource naming rules",
"enforcementMode": "Enroll",
"instanceId": "f2b3c4d5-e6f7-8a9b-0c1d-2e3f4a5b6c7d",
"metadata": {
"assignedBy": "Special Someone"
},
"notScopes": [],
"parameters": {
"prefix": {
"value": "DeptA"
},
"suffix": {
"value": "-LC"
}
},
"policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming",
"scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2"
}
}
Create or update a policy assignment with a resource percentage selector
Örnek isteği
PUT https://management.azure.com/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyAssignments/CostManagement?api-version=2026-07-01
{
"properties": {
"description": "Limit resources by rollout percentage",
"displayName": "Limit resources by rollout percentage",
"metadata": {
"assignedBy": "Special Someone"
},
"policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policySetDefinitions/CostManagement",
"resourceSelectors": [
{
"name": "SDPRollout",
"selectors": [
{
"kind": "resourcePercentage",
"progress": 80
}
]
}
]
}
}
Örnek yanıt
{
"name": "CostManagement",
"type": "Microsoft.Authorization/policyAssignments",
"id": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyAssignments/CostManagement",
"properties": {
"description": "Limit resources by rollout percentage",
"definitionVersion": "1.*.*",
"displayName": "Limit resources by rollout percentage",
"enforcementMode": "Default",
"instanceId": "a3c4d5e6-f7a8-9b0c-1d2e-3f4a5b6c7d8e",
"metadata": {
"assignedBy": "Special Someone"
},
"notScopes": [],
"policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policySetDefinitions/CostManagement",
"resourceSelectors": [
{
"name": "SDPRollout",
"selectors": [
{
"kind": "resourcePercentage",
"progress": 80
}
]
}
],
"scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2"
}
}
Create or update a policy assignment with a system assigned identity
Örnek isteği
PUT https://management.azure.com/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyAssignments/EnforceNaming?api-version=2026-07-01
{
"identity": {
"type": "SystemAssigned"
},
"location": "eastus",
"properties": {
"description": "Force resource names to begin with given DeptA and end with -LC",
"displayName": "Enforce resource naming rules",
"enforcementMode": "Default",
"metadata": {
"assignedBy": "Foo Bar"
},
"parameters": {
"prefix": {
"value": "DeptA"
},
"suffix": {
"value": "-LC"
}
},
"policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming"
}
}
Örnek yanıt
{
"name": "EnforceNaming",
"type": "Microsoft.Authorization/policyAssignments",
"id": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyAssignments/EnforceNaming",
"identity": {
"type": "SystemAssigned",
"principalId": "e6d23f8d-af97-4fbc-bda6-00604e4e3d0a",
"tenantId": "4bee2b8a-1bee-47c2-90e9-404241551135"
},
"location": "eastus",
"properties": {
"description": "Force resource names to begin with given DeptA and end with -LC",
"definitionVersion": "1.*.*",
"displayName": "Enforce resource naming rules",
"enforcementMode": "Default",
"instanceId": "e4b0f5a6-7c8d-4e9f-8a1b-2c3d4e5f6a7b",
"metadata": {
"assignedBy": "Special Someone"
},
"notScopes": [],
"parameters": {
"prefix": {
"value": "DeptA"
},
"suffix": {
"value": "-LC"
}
},
"policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming",
"scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2"
}
}
Create or update a policy assignment with a user assigned identity
Örnek isteği
PUT https://management.azure.com/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyAssignments/EnforceNaming?api-version=2026-07-01
{
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/resourceGroups/testResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity": {}
}
},
"location": "eastus",
"properties": {
"description": "Force resource names to begin with given DeptA and end with -LC",
"displayName": "Enforce resource naming rules",
"enforcementMode": "Default",
"metadata": {
"assignedBy": "Foo Bar"
},
"parameters": {
"prefix": {
"value": "DeptA"
},
"suffix": {
"value": "-LC"
}
},
"policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming"
}
}
Örnek yanıt
{
"name": "EnforceNaming",
"type": "Microsoft.Authorization/policyAssignments",
"id": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyAssignments/EnforceNaming",
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/resourceGroups/testResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity": {
"clientId": "4bee2b8a-1bee-47c2-90e9-404241551135",
"principalId": "e6d23f8d-af97-4fbc-bda6-00604e4e3d0a"
}
}
},
"location": "eastus",
"properties": {
"description": "Force resource names to begin with given DeptA and end with -LC",
"definitionVersion": "1.*.*",
"displayName": "Enforce resource naming rules",
"enforcementMode": "Default",
"instanceId": "e4b0f5a6-7c8d-4e9f-8a1b-2c3d4e5f6a7b",
"metadata": {
"assignedBy": "Special Someone"
},
"notScopes": [],
"parameters": {
"prefix": {
"value": "DeptA"
},
"suffix": {
"value": "-LC"
}
},
"policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming",
"scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2"
}
}
Create or update a policy assignment with multiple non-compliance messages
Örnek isteği
PUT https://management.azure.com/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyAssignments/securityInitAssignment?api-version=2026-07-01
{
"properties": {
"displayName": "Enforce security policies",
"nonComplianceMessages": [
{
"message": "Resources must comply with all internal security policies. See <internal site URL> for more info."
},
{
"message": "Resource names must start with 'DeptA' and end with '-LC'.",
"policyDefinitionReferenceId": "10420126870854049575"
},
{
"message": "Storage accounts must have firewall rules configured.",
"policyDefinitionReferenceId": "8572513655450389710"
}
],
"policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policySetDefinitions/securityInitiative"
}
}
Örnek yanıt
{
"name": "securityInitAssignment",
"type": "Microsoft.Authorization/policyAssignments",
"id": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyAssignments/securityInitAssignment",
"properties": {
"definitionVersion": "1.*.*",
"displayName": "Enforce security policies",
"enforcementMode": "Default",
"instanceId": "b7e0f8a9-1c2d-4e3f-8b4c-5d6e7f8a9b0c",
"metadata": {
"assignedBy": "User 1"
},
"nonComplianceMessages": [
{
"message": "Resources must comply with all internal security policies. See <internal site URL> for more info."
},
{
"message": "Resource names must start with 'DeptA' and end with '-LC'.",
"policyDefinitionReferenceId": "10420126870854049575"
},
{
"message": "Storage accounts must have firewall rules configured.",
"policyDefinitionReferenceId": "8572513655450389710"
}
],
"notScopes": [],
"policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policySetDefinitions/securityInitiative",
"scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2"
}
}
Create or update a policy assignment with overrides
Örnek isteği
PUT https://management.azure.com/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyAssignments/CostManagement?api-version=2026-07-01
{
"properties": {
"description": "Limit the resource location and resource SKU",
"definitionVersion": "1.*.*",
"displayName": "Limit the resource location and resource SKU",
"metadata": {
"assignedBy": "Special Someone"
},
"overrides": [
{
"kind": "policyEffect",
"selectors": [
{
"in": [
"Limit_Skus",
"Limit_Locations"
],
"kind": "policyDefinitionReferenceId"
}
],
"value": "Audit"
},
{
"kind": "definitionVersion",
"selectors": [
{
"in": [
"eastUSEuap",
"centralUSEuap"
],
"kind": "resourceLocation"
}
],
"value": "2.*.*"
}
],
"policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policySetDefinitions/CostManagement"
}
}
Örnek yanıt
{
"name": "CostManagement",
"type": "Microsoft.Authorization/policyAssignments",
"id": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyAssignments/CostManagement",
"properties": {
"description": "Limit the resource location and resource SKU",
"definitionVersion": "1.*.*",
"displayName": "Limit the resource location and resource SKU",
"enforcementMode": "Default",
"instanceId": "a3c4d5e6-f7a8-9b0c-1d2e-3f4a5b6c7d8e",
"metadata": {
"assignedBy": "Special Someone"
},
"notScopes": [],
"overrides": [
{
"kind": "policyEffect",
"selectors": [
{
"in": [
"Limit_Skus",
"Limit_Locations"
],
"kind": "policyDefinitionReferenceId"
}
],
"value": "Audit"
}
],
"policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policySetDefinitions/CostManagement",
"scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2"
}
}
Create or update a policy assignment with resource selectors
Örnek isteği
PUT https://management.azure.com/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyAssignments/CostManagement?api-version=2026-07-01
{
"properties": {
"description": "Limit the resource location and resource SKU",
"displayName": "Limit the resource location and resource SKU",
"metadata": {
"assignedBy": "Special Someone"
},
"policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policySetDefinitions/CostManagement",
"resourceSelectors": [
{
"name": "SDPRegions",
"selectors": [
{
"in": [
"eastus2euap",
"centraluseuap"
],
"kind": "resourceLocation"
}
]
}
]
}
}
Örnek yanıt
{
"name": "CostManagement",
"type": "Microsoft.Authorization/policyAssignments",
"id": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyAssignments/CostManagement",
"properties": {
"description": "Limit the resource location and resource SKU",
"definitionVersion": "1.*.*",
"displayName": "Limit the resource location and resource SKU",
"enforcementMode": "Default",
"instanceId": "a3c4d5e6-f7a8-9b0c-1d2e-3f4a5b6c7d8e",
"metadata": {
"assignedBy": "Special Someone"
},
"notScopes": [],
"policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policySetDefinitions/CostManagement",
"resourceSelectors": [
{
"name": "SDPRegions",
"selectors": [
{
"in": [
"eastus2euap",
"centraluseuap"
],
"kind": "resourceLocation"
}
]
}
],
"scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2"
}
}
Create or update a policy assignment with self-serve exemption settings
Örnek isteği
PUT https://management.azure.com/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyAssignments/CostManagement?api-version=2026-07-01
{
"location": "eastus",
"properties": {
"description": "Limit the resource location and resource SKU",
"definitionVersion": "1.*.*",
"displayName": "Limit the resource location and resource SKU",
"enforcementMode": "Default",
"metadata": {
"assignedBy": "Foo Bar"
},
"policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policySetDefinitions/CostManagement",
"selfServeExemptionSettings": {
"enabled": true,
"policyDefinitionReferenceIds": [
"Limit_Skus"
]
}
}
}
Örnek yanıt
{
"name": "CostManagement",
"type": "Microsoft.Authorization/policyAssignments",
"id": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyAssignments/CostManagement",
"location": "eastus",
"properties": {
"description": "Limit the resource location and resource SKU",
"definitionVersion": "1.*.*",
"displayName": "Limit the resource location and resource SKU",
"enforcementMode": "Default",
"instanceId": "e4b0f5a6-7c8d-4e9f-8a1b-2c3d4e5f6a7b",
"metadata": {
"assignedBy": "Foo Bar"
},
"notScopes": [],
"policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policySetDefinitions/CostManagement",
"selfServeExemptionSettings": {
"enabled": true,
"policyDefinitionReferenceIds": [
"Limit_Skus"
]
},
"scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2"
}
}
Create or update a policy assignment without enforcing policy effect during resource creation or update.
Örnek isteği
PUT https://management.azure.com/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyAssignments/EnforceNaming?api-version=2026-07-01
{
"properties": {
"description": "Force resource names to begin with given DeptA and end with -LC",
"displayName": "Enforce resource naming rules",
"enforcementMode": "DoNotEnforce",
"metadata": {
"assignedBy": "Special Someone"
},
"parameters": {
"prefix": {
"value": "DeptA"
},
"suffix": {
"value": "-LC"
}
},
"policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming"
}
}
Örnek yanıt
{
"name": "EnforceNaming",
"type": "Microsoft.Authorization/policyAssignments",
"id": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyAssignments/EnforceNaming",
"properties": {
"description": "Force resource names to begin with given DeptA and end with -LC",
"definitionVersion": "1.*.*",
"displayName": "Enforce resource naming rules",
"enforcementMode": "DoNotEnforce",
"instanceId": "e4b0f5a6-7c8d-4e9f-8a1b-2c3d4e5f6a7b",
"metadata": {
"assignedBy": "Special Someone"
},
"notScopes": [],
"parameters": {
"prefix": {
"value": "DeptA"
},
"suffix": {
"value": "-LC"
}
},
"policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming",
"scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2"
}
}
Tanımlar
| Name | Description |
|---|---|
|
Assignment |
İlke atamasının türü. Olası değerler NotSpecified, System, SystemHidden ve Custom değerleridir. Değişmez. |
|
created |
Kaynağı oluşturan kimliğin türü. |
|
Enforcement |
İlke ataması zorlama modu. Olası değerler Default, DoNotEnforce ve Enroll değerleridir |
|
Error |
Kaynak yönetimi hatasına ilişkin ek bilgiler. |
|
Error |
Hata ayrıntısı. |
|
Error |
Hata yanıtı |
| Identity |
Kaynağın kimliği. İlke atamaları en fazla bir kimliği destekler. Bu, sistem tarafından atanan bir kimlik veya tek bir kullanıcı tarafından atanan kimliktir. |
|
Non |
Kaynağın ilkeyle neden uyumlu olmadığını açıklayan bir ileti. Bu, 'reddet' hata iletilerinde ve kaynağın uyumsuz uyumluluk sonuçlarında gösterilir. |
| Override |
İlke özellik değerini geçersiz kılar. |
|
Override |
Geçersiz kılma türü. |
|
Parameter |
Parametrenin değeri. |
|
Policy |
İlke ataması. |
|
Resource |
Kimlik türü. Bir kaynağa sistem veya kullanıcı tarafından atanan kimlik eklenirken gereken tek alan budur. |
|
Resource |
İlkeleri kaynak özelliklerine göre filtrelemek için kaynak seçici. |
| Selector |
Seçici ifadesi. |
|
Selector |
Seçici türü. |
|
Self |
Bir poliçe ataması için kendi kendine hizmet muafiyet ayarları. |
|
system |
Kaynağın oluşturulması ve son değiştirilmesiyle ilgili meta veriler. |
|
User |
AssignmentType
İlke atamasının türü. Olası değerler NotSpecified, System, SystemHidden ve Custom değerleridir. Değişmez.
| Değer | Description |
|---|---|
| NotSpecified |
Belirtilmemiş atama türü. |
| System |
Sistem atama türü. |
| SystemHidden |
Sistem gizli atama türü. |
| Custom |
Özel atama türü. |
createdByType
Kaynağı oluşturan kimliğin türü.
| Değer | Description |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
EnforcementMode
İlke ataması zorlama modu. Olası değerler Default, DoNotEnforce ve Enroll değerleridir
| Değer | Description |
|---|---|
| Default |
İlke etkisi, kaynak oluşturma veya güncelleme sırasında uygulanır. |
| DoNotEnforce |
İlke etkisi kaynak oluşturma veya güncelleştirme sırasında uygulanmaz. |
| Enroll |
Politika etkisi, kaynak oluşturma veya güncelleme sırasında kaynak veya kapsam atama örneğine kaydedilene kadar uygulanmaz. Kayıt, politika kayıt kaynağı konuşlandırıldığında gerçekleşir. |
ErrorAdditionalInfo
Kaynak yönetimi hatasına ilişkin ek bilgiler.
| Name | Tür | Description |
|---|---|---|
| info |
object |
Ek bilgiler. |
| type |
string |
Ek bilgi türü. |
ErrorDetail
Hata ayrıntısı.
| Name | Tür | Description |
|---|---|---|
| additionalInfo |
Hata ek bilgisi. |
|
| code |
string |
Hata kodu. |
| details |
Hata ayrıntıları. |
|
| message |
string |
Hata iletisi. |
| target |
string |
Hata hedefi |
ErrorResponse
Hata yanıtı
| Name | Tür | Description |
|---|---|---|
| error |
Hata nesnesi. |
Identity
Kaynağın kimliği. İlke atamaları en fazla bir kimliği destekler. Bu, sistem tarafından atanan bir kimlik veya tek bir kullanıcı tarafından atanan kimliktir.
| Name | Tür | Description |
|---|---|---|
| principalId |
string |
Kaynak kimliğinin asıl kimliği. Bu özellik yalnızca sisteme atanmış bir kimlik için sağlanacaktır |
| tenantId |
string |
Kaynak kimliğinin kiracı kimliği. Bu özellik yalnızca sisteme atanmış bir kimlik için sağlanacaktır |
| type |
Kimlik türü. Bir kaynağa sistem veya kullanıcı tarafından atanan kimlik eklenirken gereken tek alan budur. |
|
| userAssignedIdentities |
<string,
User |
İlkeyle ilişkili kullanıcı kimliği. Kullanıcı kimliği sözlük anahtarı başvuruları şu biçimde ARM kaynak kimlikleri olacaktır: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. |
NonComplianceMessage
Kaynağın ilkeyle neden uyumlu olmadığını açıklayan bir ileti. Bu, 'reddet' hata iletilerinde ve kaynağın uyumsuz uyumluluk sonuçlarında gösterilir.
| Name | Tür | Description |
|---|---|---|
| message |
string |
Kaynağın ilkeyle neden uyumlu olmadığını açıklayan bir ileti. Bu, 'reddet' hata iletilerinde ve kaynağın uyumsuz uyumluluk sonuçlarında gösterilir. |
| policyDefinitionReferenceId |
string |
İletinin amaçlandığı ilke kümesi tanımı içindeki ilke tanımı başvuru kimliği. Bu, yalnızca ilke ataması bir ilke kümesi tanımı atadıysa geçerlidir. Bu sağlanmazsa, ileti bu ilke ataması tarafından atanan tüm ilkeler için geçerlidir. |
Override
İlke özellik değerini geçersiz kılar.
| Name | Tür | Description |
|---|---|---|
| kind |
Geçersiz kılma türü. |
|
| selectors |
Selector[] |
Seçici ifadelerinin listesi. |
| value |
string |
İlke özelliğini geçersiz kılmak için değer. |
OverrideKind
Geçersiz kılma türü.
| Değer | Description |
|---|---|
| policyEffect |
İlke etki türünü geçersiz kılar. |
| definitionVersion |
İlke atamasının tanım sürümü özellik değerini geçersiz kılar. |
ParameterValuesValue
Parametrenin değeri.
| Name | Tür | Description |
|---|---|---|
| value |
Parametre değeri. |
PolicyAssignment
İlke ataması.
| Name | Tür | Default value | Description |
|---|---|---|---|
| id |
string (arm-id) |
Kaynağın tam nitelikli kaynak kimliği. Örneğin "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
|
| identity |
İlke atamasıyla ilişkili yönetilen kimlik. |
||
| location |
string |
İlke atamasının konumu. Yalnızca yönetilen kimlik kullanıldığında gereklidir. |
|
| name |
string |
Kaynağın adı |
|
| properties.assignmentType |
İlke atamasının türü. Olası değerler NotSpecified, System, SystemHidden ve Custom değerleridir. Değişmez. |
||
| properties.definitionVersion |
string |
Kullanılacak ilke tanımının sürümü. |
|
| properties.description |
string |
İlke ihlali durumunda bu ileti yanıtın bir parçası olacaktır. |
|
| properties.displayName |
string |
İlke atamasının görünen adı. |
|
| properties.effectiveDefinitionVersion |
string |
Kullanılan politika tanımının etkili versiyonu. Bu sadece $expand sorgu parametresi üzerinden istendiğinde geçerlidir. |
|
| properties.enforcementMode | Default |
İlke ataması zorlama modu. Olası değerler Default, DoNotEnforce ve Enroll değerleridir |
|
| properties.instanceId |
string |
Politika atamasının örnek kimliği. Bu kimlik sadece ve atama silinip yeniden oluşturulduğunda her zaman değişir. |
|
| properties.latestDefinitionVersion |
string |
Politika tanımının en güncel versiyonu mevcuttur. Bu sadece $expand sorgu parametresi üzerinden istendiğinde geçerlidir. |
|
| properties.metadata |
İlke atama meta verileri. Meta veriler açık uçlu bir nesnedir ve genellikle anahtar değer çiftleri koleksiyonudur. |
||
| properties.nonComplianceMessages |
Kaynağın ilkeyle neden uyumlu olmadığını açıklayan iletiler. |
||
| properties.notScopes |
string[] |
İlkenin dışlanan kapsamları. |
|
| properties.overrides |
Override[] |
İlke özellik değerini geçersiz kılar. |
|
| properties.parameters |
<string,
Parameter |
Atanan ilke kuralı için parametre değerleri. Anahtarlar parametre adlarıdır. |
|
| properties.policyDefinitionId |
string |
Atanan ilke tanımının veya ilke kümesi tanımının kimliği. |
|
| properties.resourceSelectors |
İlkeleri kaynak özelliklerine göre filtrelemek için kaynak seçici listesi. |
||
| properties.scope |
string |
İlke atamasının kapsamı. |
|
| properties.selfServeExemptionSettings |
Poliçe ataması için kendi kendine hizmet muafiyet ayarları. |
||
| systemData |
createdBy ve modifiedBy bilgilerini içeren Azure Resource Manager meta verileri. |
||
| type |
string |
Kaynağın türü. Örneğin, "Microsoft.Compute/virtualMachines" veya "Microsoft.Storage/storageAccounts" |
ResourceIdentityType
Kimlik türü. Bir kaynağa sistem veya kullanıcı tarafından atanan kimlik eklenirken gereken tek alan budur.
| Değer | Description |
|---|---|
| SystemAssigned |
Sisteme atanan bir kimliğin kaynakla ilişkilendirildiğini gösterir. |
| UserAssigned |
Kullanıcıya atanan bir kimliğin kaynakla ilişkilendirildiğini gösterir. |
| None |
Kaynakla hiçbir kimliğin ilişkilendirilmediğini veya mevcut kimliğin kaldırılması gerektiğini gösterir. |
ResourceSelector
İlkeleri kaynak özelliklerine göre filtrelemek için kaynak seçici.
| Name | Tür | Description |
|---|---|---|
| name |
string |
Kaynak seçicinin adı. |
| selectors |
Selector[] |
Seçici ifadelerinin listesi. |
Selector
Seçici ifadesi.
| Name | Tür | Description |
|---|---|---|
| in |
string[] |
Filtre uygulamak için değerlerin listesi. |
| kind |
Seçici türü. |
|
| notIn |
string[] |
Filtreleneceği değerlerin listesi. |
| progress |
integer (int32) minimum: 0maximum: 100 |
Politika tarafından yönetilecek toplam kaynakların yüzdesi. |
SelectorKind
Seçici türü.
| Değer | Description |
|---|---|
| resourceLocation |
İlkeleri kaynak konumuna göre filtrelemek için seçici türü. |
| resourceType |
İlkeleri kaynak türüne göre filtrelemek için seçici türü. |
| resourceWithoutLocation |
İlkeleri konuma sahip olmayan kaynağa göre filtrelemek için seçici türü. |
| policyDefinitionReferenceId |
İlkeleri ilke tanımı başvuru kimliğine göre filtrelemek için seçici türü. |
| resourceRolloutPercentage |
Politikaları kaynak dağıtım yüzdesine göre filtreleyen seçici türü. |
| userPrincipalId |
Seçici türü, politikaları kullanıcı ana kimliğine göre filtreler. |
| groupPrincipalId |
Güvenlik grubu üyelik kimliğine göre politikaları filtreleyen seçici tür. |
SelfServeExemptionSettings
Bir poliçe ataması için kendi kendine hizmet muafiyet ayarları.
| Name | Tür | Description |
|---|---|---|
| enabled |
boolean |
Kendi kendine hizmet muafiyetinin mümkün olup olmadığını gösterir. |
| policyDefinitionReferenceIds |
string[] |
Politika tanımı, kendi kendine hizmet muafiyet için kimliklere referans verir. |
systemData
Kaynağın oluşturulması ve son değiştirilmesiyle ilgili meta veriler.
| Name | Tür | Description |
|---|---|---|
| createdAt |
string (date-time) |
Kaynak oluşturmanın zaman damgası (UTC). |
| createdBy |
string |
Kaynağı oluşturan kimlik. |
| createdByType |
Kaynağı oluşturan kimliğin türü. |
|
| lastModifiedAt |
string (date-time) |
Kaynağın son değişikliğinin zaman damgası (UTC) |
| lastModifiedBy |
string |
Kaynağı en son değiştiren kimlik. |
| lastModifiedByType |
Kaynağı en son değiştiren kimlik türü. |
UserAssignedIdentitiesValue
| Name | Tür | Description |
|---|---|---|
| clientId |
string |
Kullanıcı tarafından atanan kimliğin istemci kimliği. |
| principalId |
string |
Kullanıcı tarafından atanan kimliğin asıl kimliği. |