Artifacts - Create Or Update

Şema yapıtı oluşturma veya güncelleştirme.

PUT https://management.azure.com/{resourceScope}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/artifacts/{artifactName}?api-version=2018-11-01-preview

URI Parametreleri

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

string

Şema yapıtı adı.

blueprintName
path True

string

Şema tanımının adı.

resourceScope
path True

string

Kaynağın kapsamı. Geçerli kapsamlar şunlardır: yönetim grubu (biçim: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), abonelik (biçim: '/subscriptions/{subscriptionId}').

api-version
query True

string

İstemci API Sürümü.

İstek Gövdesi

İstek gövdesi şunlardan biri olabilir:

Name Description
PolicyAssignmentArtifact

İlke ataması uygulayan şema yapıtı.

RoleAssignmentArtifact

Rol ataması uygulayan şema yapıtı.

TemplateArtifact

Resource Manager şablonu dağıtan şema yapıtı.

PolicyAssignmentArtifact

İlke ataması uygulayan şema yapıtı.

Name Gerekli Tür Description
kind True string:

policyAssignment

Şema yapıtı türünü belirtir.

properties.parameters True

<string,  ParameterValue>

İlke tanımı için parametre değerleri.

properties.policyDefinitionId True

string

İlke tanımının Azure kaynak kimliği.

properties.dependsOn

string[]

Belirtilen yapıt öncesinde dağıtılması gereken yapıtlar.

properties.description

string

maxLength: 500

Bu kaynağı çok satırlı olarak açıklayın.

properties.displayName

string

maxLength: 256

Tek satırlık dize bu kaynağı açıklar.

properties.resourceGroup

string

İlkenin atanacağı kaynak grubu yer tutucusunun adı.

RoleAssignmentArtifact

Rol ataması uygulayan şema yapıtı.

Name Gerekli Tür Description
kind True string:

roleAssignment

Şema yapıtı türünü belirtir.

properties.principalIds True

Azure Active Directory'de kullanıcı veya grup kimlikleri dizisi. roleDefinition her kimliğe uygulanır.

properties.roleDefinitionId True

string

RoleDefinition'ın Azure kaynak kimliği.

properties.dependsOn

string[]

Belirtilen yapıt öncesinde dağıtılması gereken yapıtlar.

properties.description

string

maxLength: 500

Bu kaynağı çok satırlı olarak açıklayın.

properties.displayName

string

maxLength: 256

Tek satırlık dize bu kaynağı açıklar.

properties.resourceGroup

string

RoleAssignment bu resourceGroup kapsamı olacaktır. Boşsa, aboneliğin kapsamını oluşturur.

TemplateArtifact

Resource Manager şablonu dağıtan şema yapıtı.

Name Gerekli Tür Description
kind True string:

template

Şema yapıtı türünü belirtir.

properties.parameters True

<string,  ParameterValue>

Resource Manager şablonu şema yapıt parametre değerleri.

properties.template True

object

Resource Manager şablonu şema yapıtı gövdesi.

properties.dependsOn

string[]

Belirtilen yapıt öncesinde dağıtılması gereken yapıtlar.

properties.description

string

maxLength: 500

Bu kaynağı çok satırlı olarak açıklayın.

properties.displayName

string

maxLength: 256

Tek satırlık dize bu kaynağı açıklar.

properties.resourceGroup

string

Varsa, Resource Manager şablonu şema yapıtının dağıtılacağı kaynak grubu yer tutucusunun adı.

Yanıtlar

Name Tür Description
201 Created Artifact:

Oluşturuldu -- şema yapıtı oluşturuldu/güncelleştirildi.

Other Status Codes

CloudError

Şemalar 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

MG-ARMTemplateArtifact
MG-PolicyAssignmentArtifact
MG-RoleAssignmentArtifact
Sub-ARMTemplateArtifact
Sub-PolicyAssignmentArtifact
Sub-RoleAssignmentArtifact

MG-ARMTemplateArtifact

Örnek isteği

PUT https://management.azure.com/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/artifacts/storageTemplate?api-version=2018-11-01-preview

{
  "kind": "template",
  "properties": {
    "template": {
      "contentVersion": "1.0.0.0",
      "parameters": {
        "storageAccountType": {
          "type": "string",
          "defaultValue": "Standard_LRS",
          "allowedValues": [
            "Standard_LRS",
            "Standard_GRS",
            "Standard_ZRS",
            "Premium_LRS"
          ],
          "metadata": {
            "description": "Storage Account type"
          }
        }
      },
      "variables": {
        "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]"
      },
      "resources": [
        {
          "type": "Microsoft.Storage/storageAccounts",
          "name": "[variables('storageAccountName')]",
          "apiVersion": "2016-01-01",
          "location": "[resourceGroup().location]",
          "sku": {
            "name": "[parameters('storageAccountType')]"
          },
          "kind": "Storage",
          "properties": {}
        }
      ],
      "outputs": {
        "storageAccountName": {
          "type": "string",
          "value": "[variables('storageAccountName')]"
        }
      }
    },
    "resourceGroup": "storageRG",
    "parameters": {
      "storageAccountType": {
        "value": "[parameters('storageAccountType')]"
      }
    }
  }
}

Örnek yanıt

{
  "properties": {
    "template": {
      "contentVersion": "1.0.0.0",
      "parameters": {
        "storageAccountType": {
          "type": "string",
          "defaultValue": "Standard_LRS",
          "allowedValues": [
            "Standard_LRS",
            "Standard_GRS",
            "Standard_ZRS",
            "Premium_LRS"
          ],
          "metadata": {
            "description": "Storage Account type"
          }
        }
      },
      "variables": {
        "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]"
      },
      "resources": [
        {
          "type": "Microsoft.Storage/storageAccounts",
          "name": "[variables('storageAccountName')]",
          "apiVersion": "2016-01-01",
          "location": "[resourceGroup().location]",
          "sku": {
            "name": "[parameters('storageAccountType')]"
          },
          "kind": "Storage",
          "properties": {}
        }
      ],
      "outputs": {
        "storageAccountName": {
          "type": "string",
          "value": "[variables('storageAccountName')]"
        }
      }
    },
    "resourceGroup": "storageRG",
    "parameters": {
      "storageAccountType": {
        "value": "[parameters('storageAccountType')]"
      }
    }
  },
  "kind": "template",
  "id": "/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/artifacts/storageTemplate",
  "type": "Microsoft.Blueprint/blueprints/artifacts",
  "name": "storageTemplate"
}

MG-PolicyAssignmentArtifact

Örnek isteği

PUT https://management.azure.com/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/artifacts/costCenterPolicy?api-version=2018-11-01-preview

{
  "properties": {
    "displayName": "force costCenter tag on all resources",
    "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62",
    "parameters": {
      "tagName": {
        "value": "costCenter"
      },
      "tagValue": {
        "value": "[parameter('costCenter')]"
      }
    }
  },
  "kind": "policyAssignment"
}

Örnek yanıt

{
  "properties": {
    "displayName": "force costCenter tag on all resources",
    "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62",
    "parameters": {
      "tagName": {
        "value": "costCenter"
      },
      "tagValue": {
        "value": "[parameter('costCenter')]"
      }
    }
  },
  "kind": "policyAssignment",
  "id": "/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/artifacts/costCenterPolicy",
  "type": "Microsoft.Blueprint/blueprints/artifacts",
  "name": "costCenterPolicy"
}

MG-RoleAssignmentArtifact

Örnek isteği

PUT https://management.azure.com/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/artifacts/ownerAssignment?api-version=2018-11-01-preview

{
  "properties": {
    "displayName": "enforce owners of given subscription",
    "roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7",
    "principalIds": "[parameters('owners')]"
  },
  "kind": "roleAssignment"
}

Örnek yanıt

{
  "properties": {
    "displayName": "enforce owners of given subscription",
    "roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7",
    "principalIds": "[parameters('owners')]"
  },
  "kind": "roleAssignment",
  "id": "/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/artifacts/ownerAssignment",
  "type": "Microsoft.Blueprint/blueprints/artifacts",
  "name": "ownerAssignment"
}

Sub-ARMTemplateArtifact

Örnek isteği

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/artifacts/storageTemplate?api-version=2018-11-01-preview

{
  "kind": "template",
  "properties": {
    "template": {
      "contentVersion": "1.0.0.0",
      "parameters": {
        "storageAccountType": {
          "type": "string",
          "defaultValue": "Standard_LRS",
          "allowedValues": [
            "Standard_LRS",
            "Standard_GRS",
            "Standard_ZRS",
            "Premium_LRS"
          ],
          "metadata": {
            "description": "Storage Account type"
          }
        }
      },
      "variables": {
        "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]"
      },
      "resources": [
        {
          "type": "Microsoft.Storage/storageAccounts",
          "name": "[variables('storageAccountName')]",
          "apiVersion": "2016-01-01",
          "location": "[resourceGroup().location]",
          "sku": {
            "name": "[parameters('storageAccountType')]"
          },
          "kind": "Storage",
          "properties": {}
        }
      ],
      "outputs": {
        "storageAccountName": {
          "type": "string",
          "value": "[variables('storageAccountName')]"
        }
      }
    },
    "resourceGroup": "storageRG",
    "parameters": {
      "storageAccountType": {
        "value": "[parameters('storageAccountType')]"
      }
    }
  }
}

Örnek yanıt

{
  "properties": {
    "template": {
      "contentVersion": "1.0.0.0",
      "parameters": {
        "storageAccountType": {
          "type": "string",
          "defaultValue": "Standard_LRS",
          "allowedValues": [
            "Standard_LRS",
            "Standard_GRS",
            "Standard_ZRS",
            "Premium_LRS"
          ],
          "metadata": {
            "description": "Storage Account type"
          }
        }
      },
      "variables": {
        "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]"
      },
      "resources": [
        {
          "type": "Microsoft.Storage/storageAccounts",
          "name": "[variables('storageAccountName')]",
          "apiVersion": "2016-01-01",
          "location": "[resourceGroup().location]",
          "sku": {
            "name": "[parameters('storageAccountType')]"
          },
          "kind": "Storage",
          "properties": {}
        }
      ],
      "outputs": {
        "storageAccountName": {
          "type": "string",
          "value": "[variables('storageAccountName')]"
        }
      }
    },
    "resourceGroup": "storageRG",
    "parameters": {
      "storageAccountType": {
        "value": "[parameters('storageAccountType')]"
      }
    }
  },
  "kind": "template",
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/artifacts/storageTemplate",
  "type": "Microsoft.Blueprint/blueprints/artifacts",
  "name": "storageTemplate"
}

Sub-PolicyAssignmentArtifact

Örnek isteği

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/artifacts/costCenterPolicy?api-version=2018-11-01-preview

{
  "properties": {
    "displayName": "force costCenter tag on all resources",
    "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62",
    "parameters": {
      "tagName": {
        "value": "costCenter"
      },
      "tagValue": {
        "value": "[parameter('costCenter')]"
      }
    }
  },
  "kind": "policyAssignment"
}

Örnek yanıt

{
  "properties": {
    "displayName": "force costCenter tag on all resources",
    "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62",
    "parameters": {
      "tagName": {
        "value": "costCenter"
      },
      "tagValue": {
        "value": "[parameter('costCenter')]"
      }
    }
  },
  "kind": "policyAssignment",
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/artifacts/costCenterPolicy",
  "type": "Microsoft.Blueprint/blueprints/artifacts",
  "name": "costCenterPolicy"
}

Sub-RoleAssignmentArtifact

Örnek isteği

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/artifacts/ownerAssignment?api-version=2018-11-01-preview

{
  "properties": {
    "displayName": "enforce owners of given subscription",
    "roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7",
    "principalIds": "[parameters('owners')]"
  },
  "kind": "roleAssignment"
}

Örnek yanıt

{
  "properties": {
    "displayName": "enforce owners of given subscription",
    "roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7",
    "principalIds": "[parameters('owners')]"
  },
  "kind": "roleAssignment",
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/artifacts/ownerAssignment",
  "type": "Microsoft.Blueprint/blueprints/artifacts",
  "name": "ownerAssignment"
}

Tanımlar

Name Description
CloudError
ErrorAdditionalInfo

Kaynak yönetimi hatası ek bilgileri.

ErrorResponse

Hata Yanıtı

keyVaultReference

Key Vault bağlantısını belirtir.

ParameterValue

Belirtilen parametrenin değeri. 'değer' veya 'başvuru' olabilir, ancak ikisi birden olamaz.

PolicyAssignmentArtifact

İlke ataması uygulayan şema yapıtı.

RoleAssignmentArtifact

Rol ataması uygulayan şema yapıtı.

SecretValueReference

Key Vault gizli dizisine başvuru.

TemplateArtifact

Resource Manager şablonu dağıtan şema yapıtı.

CloudError

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

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.

keyVaultReference

Key Vault bağlantısını belirtir.

Name Tür Description
id

string

Key Vault'un Azure kaynak kimliği.

ParameterValue

Belirtilen parametrenin değeri. 'değer' veya 'başvuru' olabilir, ancak ikisi birden olamaz.

Name Tür Description
reference

SecretValueReference

Başvuru türü olarak parametre değeri.

value

object

Parametre değeri. Nesneler, diziler, dizeler, sayılar ve boole değerleri dahil olmak üzere geçerli JSON değerlerine izin verilir.

PolicyAssignmentArtifact

İlke ataması uygulayan şema yapıtı.

Name Tür Description
id

string

Azure'da herhangi bir kaynağı bulmak için kullanılan dize kimliği.

kind string:

policyAssignment

Şema yapıtı türünü belirtir.

name

string

Bu kaynağın adı.

properties.dependsOn

string[]

Belirtilen yapıt öncesinde dağıtılması gereken yapıtlar.

properties.description

string

maxLength: 500

Bu kaynağı çok satırlı olarak açıklayın.

properties.displayName

string

maxLength: 256

Tek satırlık dize bu kaynağı açıklar.

properties.parameters

<string,  ParameterValue>

İlke tanımı için parametre değerleri.

properties.policyDefinitionId

string

İlke tanımının Azure kaynak kimliği.

properties.resourceGroup

string

İlkenin atanacağı kaynak grubu yer tutucusunun adı.

type

string

Bu kaynağın türü.

RoleAssignmentArtifact

Rol ataması uygulayan şema yapıtı.

Name Tür Description
id

string

Azure'da herhangi bir kaynağı bulmak için kullanılan dize kimliği.

kind string:

roleAssignment

Şema yapıtı türünü belirtir.

name

string

Bu kaynağın adı.

properties.dependsOn

string[]

Belirtilen yapıt öncesinde dağıtılması gereken yapıtlar.

properties.description

string

maxLength: 500

Bu kaynağı çok satırlı olarak açıklayın.

properties.displayName

string

maxLength: 256

Tek satırlık dize bu kaynağı açıklar.

properties.principalIds

Azure Active Directory'de kullanıcı veya grup kimlikleri dizisi. roleDefinition her kimliğe uygulanır.

properties.resourceGroup

string

RoleAssignment bu resourceGroup kapsamı olacaktır. Boşsa, aboneliğin kapsamını oluşturur.

properties.roleDefinitionId

string

RoleDefinition'ın Azure kaynak kimliği.

type

string

Bu kaynağın türü.

SecretValueReference

Key Vault gizli dizisine başvuru.

Name Tür Description
keyVault

keyVaultReference

Belirli bir Azure Key Vault'a başvuruyu belirtir.

secretName

string

Gizli dizinin adı.

secretVersion

string

Kullanılacak gizli dizi sürümü. Boş bırakılırsa, gizli dizinin en son sürümü kullanılır.

TemplateArtifact

Resource Manager şablonu dağıtan şema yapıtı.

Name Tür Description
id

string

Azure'da herhangi bir kaynağı bulmak için kullanılan dize kimliği.

kind string:

template

Şema yapıtı türünü belirtir.

name

string

Bu kaynağın adı.

properties.dependsOn

string[]

Belirtilen yapıt öncesinde dağıtılması gereken yapıtlar.

properties.description

string

maxLength: 500

Bu kaynağı çok satırlı olarak açıklayın.

properties.displayName

string

maxLength: 256

Tek satırlık dize bu kaynağı açıklar.

properties.parameters

<string,  ParameterValue>

Resource Manager şablonu şema yapıt parametre değerleri.

properties.resourceGroup

string

Varsa, Resource Manager şablonu şema yapıtının dağıtılacağı kaynak grubu yer tutucusunun adı.

properties.template

object

Resource Manager şablonu şema yapıtı gövdesi.

type

string

Bu kaynağın türü.