Aracılığıyla paylaş


Policy Assignments - Create

Bu işlem, verilen kapsam ve adla bir ilke ataması oluşturur veya güncelleştirir. İ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=2023-04-01

URI Parametreleri

Name İçinde Gerekli Tür Description
policyAssignmentName
path True

string

pattern: ^[^<>*%&:\?.+/]*[^<>*%&:\?.+/ ]+$

İlke atamasının adı.

scope
path True

string

İlke atamasının kapsamı. Geçerli kapsamlar şunlardır: yönetim grubu (biçim: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), abonelik (biçim: '/subscriptions/{subscriptionId}'), kaynak grubu (biçim: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', veya kaynak (biçim: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'

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

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.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

enforcementMode

İlke ataması zorlama modu. Olası değerler Default ve DoNotEnforce'tır.

properties.metadata

object

İlke atama meta verileri. Meta veriler açık uçlu bir nesnedir ve genellikle anahtar değer çiftleri koleksiyonudur.

properties.nonComplianceMessages

NonComplianceMessage[]

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,  ParameterValuesValue>

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

ResourceSelector[]

İlkeleri kaynak özelliklerine göre filtrelemek için kaynak seçici listesi.

Yanıtlar

Name Tür Description
201 Created

PolicyAssignment

Oluşturuldu - Yeni ilke ataması hakkındaki bilgileri döndürür.

Other Status Codes

CloudError

İşlemin neden başarısız olduğunu açıklayan 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ın kimliğine bürünme

Örnekler

Create or update a policy assignment
Create or update a policy assignment with a system assigned identity
Create or update a policy assignment with a user assigned identity
Create or update a policy assignment with multiple non-compliance messages
Create or update a policy assignment with overrides
Create or update a policy assignment with resource selectors
Create or update a policy assignment without enforcing policy effect during resource creation or update.

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=2023-04-01

{
  "properties": {
    "displayName": "Enforce resource naming rules",
    "description": "Force resource names to begin with given DeptA and end with -LC",
    "metadata": {
      "assignedBy": "Special Someone"
    },
    "policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming",
    "parameters": {
      "prefix": {
        "value": "DeptA"
      },
      "suffix": {
        "value": "-LC"
      }
    },
    "nonComplianceMessages": [
      {
        "message": "Resource names must start with 'DeptA' and end with '-LC'."
      }
    ]
  }
}

Örnek yanıt

{
  "properties": {
    "displayName": "Enforce resource naming rules",
    "description": "Force resource names to begin with given DeptA and end with -LC",
    "metadata": {
      "assignedBy": "Special Someone"
    },
    "policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming",
    "definitionVersion": "1.*.*",
    "notScopes": [],
    "parameters": {
      "prefix": {
        "value": "DeptA"
      },
      "suffix": {
        "value": "-LC"
      }
    },
    "enforcementMode": "Default",
    "scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2",
    "nonComplianceMessages": [
      {
        "message": "Resource names must start with 'DeptA' and end with '-LC'."
      }
    ]
  },
  "id": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyAssignments/EnforceNaming",
  "type": "Microsoft.Authorization/policyAssignments",
  "name": "EnforceNaming"
}

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=2023-04-01

{
  "location": "eastus",
  "identity": {
    "type": "SystemAssigned"
  },
  "properties": {
    "displayName": "Enforce resource naming rules",
    "description": "Force resource names to begin with given DeptA and end with -LC",
    "metadata": {
      "assignedBy": "Foo Bar"
    },
    "policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming",
    "parameters": {
      "prefix": {
        "value": "DeptA"
      },
      "suffix": {
        "value": "-LC"
      }
    },
    "enforcementMode": "Default"
  }
}

Örnek yanıt

{
  "properties": {
    "displayName": "Enforce resource naming rules",
    "description": "Force resource names to begin with given DeptA and end with -LC",
    "metadata": {
      "assignedBy": "Special Someone"
    },
    "policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming",
    "definitionVersion": "1.*.*",
    "notScopes": [],
    "parameters": {
      "prefix": {
        "value": "DeptA"
      },
      "suffix": {
        "value": "-LC"
      }
    },
    "enforcementMode": "Default",
    "scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2"
  },
  "identity": {
    "type": "SystemAssigned",
    "principalId": "e6d23f8d-af97-4fbc-bda6-00604e4e3d0a",
    "tenantId": "4bee2b8a-1bee-47c2-90e9-404241551135"
  },
  "location": "eastus",
  "id": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyAssignments/EnforceNaming",
  "type": "Microsoft.Authorization/policyAssignments",
  "name": "EnforceNaming"
}

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=2023-04-01

{
  "location": "eastus",
  "identity": {
    "type": "UserAssigned",
    "userAssignedIdentities": {
      "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/resourceGroups/testResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity": {}
    }
  },
  "properties": {
    "displayName": "Enforce resource naming rules",
    "description": "Force resource names to begin with given DeptA and end with -LC",
    "metadata": {
      "assignedBy": "Foo Bar"
    },
    "policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming",
    "parameters": {
      "prefix": {
        "value": "DeptA"
      },
      "suffix": {
        "value": "-LC"
      }
    },
    "enforcementMode": "Default"
  }
}

Örnek yanıt

{
  "properties": {
    "displayName": "Enforce resource naming rules",
    "description": "Force resource names to begin with given DeptA and end with -LC",
    "metadata": {
      "assignedBy": "Special Someone"
    },
    "policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming",
    "definitionVersion": "1.*.*",
    "notScopes": [],
    "parameters": {
      "prefix": {
        "value": "DeptA"
      },
      "suffix": {
        "value": "-LC"
      }
    },
    "enforcementMode": "Default",
    "scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2"
  },
  "identity": {
    "type": "UserAssigned",
    "userAssignedIdentities": {
      "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/resourceGroups/testResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity": {
        "principalId": "e6d23f8d-af97-4fbc-bda6-00604e4e3d0a",
        "clientId": "4bee2b8a-1bee-47c2-90e9-404241551135"
      }
    }
  },
  "location": "eastus",
  "id": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyAssignments/EnforceNaming",
  "type": "Microsoft.Authorization/policyAssignments",
  "name": "EnforceNaming"
}

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=2023-04-01

{
  "properties": {
    "displayName": "Enforce security policies",
    "policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policySetDefinitions/securityInitiative",
    "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"
      }
    ]
  }
}

Örnek yanıt

{
  "properties": {
    "displayName": "Enforce security policies",
    "metadata": {
      "assignedBy": "User 1"
    },
    "policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policySetDefinitions/securityInitiative",
    "definitionVersion": "1.*.*",
    "notScopes": [],
    "enforcementMode": "Default",
    "scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2",
    "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"
      }
    ]
  },
  "id": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyAssignments/securityInitAssignment",
  "type": "Microsoft.Authorization/policyAssignments",
  "name": "securityInitAssignment"
}

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=2023-04-01

{
  "properties": {
    "displayName": "Limit the resource location and resource SKU",
    "description": "Limit the resource location and resource SKU",
    "metadata": {
      "assignedBy": "Special Someone"
    },
    "policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policySetDefinitions/CostManagement",
    "overrides": [
      {
        "kind": "policyEffect",
        "value": "Audit",
        "selectors": [
          {
            "kind": "policyDefinitionReferenceId",
            "in": [
              "Limit_Skus",
              "Limit_Locations"
            ]
          }
        ]
      }
    ]
  }
}

Örnek yanıt

{
  "properties": {
    "displayName": "Limit the resource location and resource SKU",
    "description": "Limit the resource location and resource SKU",
    "metadata": {
      "assignedBy": "Special Someone"
    },
    "policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policySetDefinitions/CostManagement",
    "definitionVersion": "1.*.*",
    "notScopes": [],
    "enforcementMode": "Default",
    "scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2",
    "overrides": [
      {
        "kind": "policyEffect",
        "value": "Audit",
        "selectors": [
          {
            "kind": "policyDefinitionReferenceId",
            "in": [
              "Limit_Skus",
              "Limit_Locations"
            ]
          }
        ]
      }
    ]
  },
  "id": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyAssignments/CostManagement",
  "type": "Microsoft.Authorization/policyAssignments",
  "name": "CostManagement"
}

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=2023-04-01

{
  "properties": {
    "displayName": "Limit the resource location and resource SKU",
    "description": "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": [
          {
            "kind": "resourceLocation",
            "in": [
              "eastus2euap",
              "centraluseuap"
            ]
          }
        ]
      }
    ]
  }
}

Örnek yanıt

{
  "properties": {
    "displayName": "Limit the resource location and resource SKU",
    "description": "Limit the resource location and resource SKU",
    "metadata": {
      "assignedBy": "Special Someone"
    },
    "policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policySetDefinitions/CostManagement",
    "definitionVersion": "1.*.*",
    "notScopes": [],
    "enforcementMode": "Default",
    "scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2",
    "resourceSelectors": [
      {
        "name": "SDPRegions",
        "selectors": [
          {
            "kind": "resourceLocation",
            "in": [
              "eastus2euap",
              "centraluseuap"
            ]
          }
        ]
      }
    ]
  },
  "id": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyAssignments/CostManagement",
  "type": "Microsoft.Authorization/policyAssignments",
  "name": "CostManagement"
}

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=2023-04-01

{
  "properties": {
    "displayName": "Enforce resource naming rules",
    "description": "Force resource names to begin with given DeptA and end with -LC",
    "metadata": {
      "assignedBy": "Special Someone"
    },
    "policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming",
    "parameters": {
      "prefix": {
        "value": "DeptA"
      },
      "suffix": {
        "value": "-LC"
      }
    },
    "enforcementMode": "DoNotEnforce"
  }
}

Örnek yanıt

{
  "properties": {
    "displayName": "Enforce resource naming rules",
    "description": "Force resource names to begin with given DeptA and end with -LC",
    "metadata": {
      "assignedBy": "Special Someone"
    },
    "policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming",
    "definitionVersion": "1.*.*",
    "notScopes": [],
    "parameters": {
      "prefix": {
        "value": "DeptA"
      },
      "suffix": {
        "value": "-LC"
      }
    },
    "enforcementMode": "DoNotEnforce",
    "scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2"
  },
  "id": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyAssignments/EnforceNaming",
  "type": "Microsoft.Authorization/policyAssignments",
  "name": "EnforceNaming"
}

Tanımlar

Name Description
CloudError

İlke işleminden bir hata yanıtı.

createdByType

Kaynağı oluşturan kimliğin türü.

enforcementMode

İlke ataması zorlama modu. Olası değerler Default ve DoNotEnforce'tır.

ErrorAdditionalInfo

Kaynak yönetimi hatası ek bilgileri.

ErrorResponse

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.

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.

Override

İlke özellik değerini geçersiz kılar.

OverrideKind

Geçersiz kılma türü.

ParameterValuesValue

Parametrenin değeri.

PolicyAssignment

İlke ataması.

ResourceIdentityType

Kimlik türü. Bir kaynağa sistem veya kullanıcı tarafından atanan kimlik eklenirken gereken tek alan budur.

ResourceSelector

İlkeleri kaynak özelliklerine göre filtrelemek için kaynak seçici.

Selector

Seçici ifadesi.

SelectorKind

Seçici türü.

systemData

Kaynağın oluşturulması ve son değiştirilmesiyle ilgili meta veriler.

UserAssignedIdentities

İ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}'.

CloudError

İlke işleminden bir hata yanıtı.

Name Tür Description
error

ErrorResponse

Hata Yanıtı
Başarısız işlemlerin hata ayrıntılarını döndürmek için tüm Azure Resource Manager API'leri için genel hata yanıtı. (Bu, OData hata yanıtı biçimini de izler.)

createdByType

Kaynağı oluşturan kimliğin türü.

Değer Description
Application
Key
ManagedIdentity
User

enforcementMode

İlke ataması zorlama modu. Olası değerler Default ve DoNotEnforce'tır.

Değer Description
Default

İlke etkisi, kaynak oluşturma veya güncelleştirme sırasında uygulanır.

DoNotEnforce

İlke etkisi kaynak oluşturma veya güncelleştirme sırasında uygulanmaz.

ErrorAdditionalInfo

Kaynak yönetimi hatası ek bilgileri.

Name Tür Description
info

object

Ek bilgiler.

type

string

Ek bilgi türü.

ErrorResponse

Hata Yanıtı

Name Tür Description
additionalInfo

ErrorAdditionalInfo[]

Hata ek bilgileri.

code

string

Hata kodu.

details

ErrorResponse[]

Hata ayrıntıları.

message

string

Hata iletisi.

target

string

Hata hedefi.

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 sistem tarafından atanan kimlik için sağlanacaktır

tenantId

string

Kaynak kimliğinin kiracı kimliği. Bu özellik yalnızca sistem tarafından atanan kimlik için sağlanacaktır

type

ResourceIdentityType

Kimlik türü. Bir kaynağa sistem veya kullanıcı tarafından atanan kimlik eklenirken gereken tek alan budur.

userAssignedIdentities

UserAssignedIdentities

İ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

OverrideKind

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.

ParameterValuesValue

Parametrenin değeri.

Name Tür Description
value

object

parametresinin değeri.

PolicyAssignment

İlke ataması.

Name Tür Default value Description
id

string

İlke atamasının kimliği.

identity

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

İlke atamasının adı.

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

İlke tanımının kullanımdaki geçerli sürümü. Bu yalnızca $expand sorgu parametresi aracılığıyla istenirse geçerlidir.

properties.enforcementMode

enforcementMode

Default

İlke ataması zorlama modu. Olası değerler Default ve DoNotEnforce'tır.

properties.latestDefinitionVersion

string

İlke tanımının en son sürümü kullanılabilir. Bu yalnızca $expand sorgu parametresi aracılığıyla istenirse geçerlidir.

properties.metadata

object

İlke atama meta verileri. Meta veriler açık uçlu bir nesnedir ve genellikle anahtar değer çiftleri koleksiyonudur.

properties.nonComplianceMessages

NonComplianceMessage[]

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,  ParameterValuesValue>

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

ResourceSelector[]

İlkeleri kaynak özelliklerine göre filtrelemek için kaynak seçici listesi.

properties.scope

string

İlke atamasının kapsamı.

systemData

systemData

Bu kaynakla ilgili sistem meta verileri.

type

string

İlke atamasının türü.

ResourceIdentityType

Kimlik türü. Bir kaynağa sistem veya kullanıcı tarafından atanan kimlik eklenirken gereken tek alan budur.

Değer Description
None

Kaynakla hiçbir kimliğin ilişkilendirilmediğini veya mevcut kimliğin kaldırılması gerektiğini gösterir.

SystemAssigned

Sistem tarafından atanan kimliğin kaynakla ilişkilendirildiğini gösterir.

UserAssigned

Sistem tarafından atanan kimliğin kaynakla ilişkilendirildiğ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

SelectorKind

Seçici türü.

notIn

string[]

Filtreleneceği değerlerin listesi.

SelectorKind

Seçici türü.

Değer Description
policyDefinitionReferenceId

İlkeleri ilke tanımı başvuru kimliğine göre filtrelemek için seçici türü.

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ü.

systemData

Kaynağın oluşturulması ve son değiştirilmesiyle ilgili meta veriler.

Name Tür Description
createdAt

string (date-time)

Kaynak oluşturma (UTC) zaman damgası.

createdBy

string

Kaynağı oluşturan kimlik.

createdByType

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

createdByType

Kaynağı en son değiştiren kimlik türü.

UserAssignedIdentities

İ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}'.

Name Tür Description