다음을 통해 공유


Artifacts - Create Or Update

청사진 아티팩트 만들기 또는 업데이트

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

URI 매개 변수

Name In(다음 안에) 필수 형식 Description
artifactName
path True

string

청사진 아티팩트 이름입니다.

blueprintName
path True

string

청사진 정의의 이름입니다.

resourceScope
path True

string

리소스의 범위입니다. 유효한 범위는 관리 그룹(형식: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), 구독(형식: '/subscriptions/{subscriptionId}')입니다.

api-version
query True

string

클라이언트 API 버전입니다.

요청 본문

요청 본문은 다음 중 하나가 될 수 있습니다.

Name Description
PolicyAssignmentArtifact

정책 할당을 적용하는 청사진 아티팩트입니다.

RoleAssignmentArtifact

역할 할당을 적용하는 청사진 아티팩트입니다.

TemplateArtifact

Resource Manager 템플릿을 배포하는 청사진 아티팩트입니다.

PolicyAssignmentArtifact

정책 할당을 적용하는 청사진 아티팩트입니다.

Name 필수 형식 Description
kind True string:

policyAssignment

청사진 아티팩트 종류를 지정합니다.

properties.parameters True

<string,  ParameterValue>

정책 정의에 대한 매개 변수 값입니다.

properties.policyDefinitionId True

string

정책 정의의 Azure 리소스 ID입니다.

properties.dependsOn

string[]

지정된 아티팩트 앞에 배포해야 하는 아티팩트입니다.

properties.description

string

maxLength: 500

이 리소스를 여러 줄로 설명합니다.

properties.displayName

string

maxLength: 256

한 줄 문자열은 이 리소스를 설명합니다.

properties.resourceGroup

string

정책이 할당될 리소스 그룹 자리 표시자의 이름입니다.

RoleAssignmentArtifact

역할 할당을 적용하는 청사진 아티팩트입니다.

Name 필수 형식 Description
kind True string:

roleAssignment

청사진 아티팩트 종류를 지정합니다.

properties.principalIds True

Azure Active Directory의 사용자 또는 그룹 ID 배열입니다. roleDefinition은 각 ID에 적용됩니다.

properties.roleDefinitionId True

string

RoleDefinition의 Azure 리소스 ID입니다.

properties.dependsOn

string[]

지정된 아티팩트 앞에 배포해야 하는 아티팩트입니다.

properties.description

string

maxLength: 500

이 리소스를 여러 줄로 설명합니다.

properties.displayName

string

maxLength: 256

한 줄 문자열은 이 리소스를 설명합니다.

properties.resourceGroup

string

RoleAssignment는 이 resourceGroup의 범위가 됩니다. 비어 있으면 구독 범위가 지정됩니다.

TemplateArtifact

Resource Manager 템플릿을 배포하는 청사진 아티팩트입니다.

Name 필수 형식 Description
kind True string:

template

청사진 아티팩트 종류를 지정합니다.

properties.parameters True

<string,  ParameterValue>

Resource Manager 템플릿 청사진 아티팩트 매개 변수 값입니다.

properties.template True

object

Resource Manager 템플릿 청사진 아티팩트 본문입니다.

properties.dependsOn

string[]

지정된 아티팩트 앞에 배포해야 하는 아티팩트입니다.

properties.description

string

maxLength: 500

이 리소스를 여러 줄로 설명합니다.

properties.displayName

string

maxLength: 256

한 줄 문자열은 이 리소스를 설명합니다.

properties.resourceGroup

string

해당하는 경우 Resource Manager 템플릿 청사진 아티팩트가 배포될 리소스 그룹 자리 표시자의 이름입니다.

응답

Name 형식 Description
201 Created Artifact:

생성됨 - 청사진 아티팩트가 생성/업데이트되었습니다.

Other Status Codes

CloudError

청사진 오류 응답입니다.

보안

azure_auth

Azure Active Directory OAuth2 Flow

형식: oauth2
Flow: implicit
권한 부여 URL: https://login.microsoftonline.com/common/oauth2/authorize

범위

Name Description
user_impersonation 사용자 계정 가장

예제

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

MG-ARMTemplateArtifact

샘플 요청

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')]"
      }
    }
  }
}

샘플 응답

{
  "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

샘플 요청

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"
}

샘플 응답

{
  "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

샘플 요청

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"
}

샘플 응답

{
  "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

샘플 요청

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')]"
      }
    }
  }
}

샘플 응답

{
  "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

샘플 요청

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"
}

샘플 응답

{
  "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

샘플 요청

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"
}

샘플 응답

{
  "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"
}

정의

Name Description
CloudError
ErrorAdditionalInfo

리소스 관리 오류 추가 정보입니다.

ErrorResponse

오류 응답

keyVaultReference

Key Vault에 대한 링크를 지정합니다.

ParameterValue

지정된 매개 변수의 값입니다. 'value' 또는 'reference'일 수 있지만 둘 다일 수는 없습니다.

PolicyAssignmentArtifact

정책 할당을 적용하는 청사진 아티팩트입니다.

RoleAssignmentArtifact

역할 할당을 적용하는 청사진 아티팩트입니다.

SecretValueReference

Key Vault 비밀에 대한 참조입니다.

TemplateArtifact

Resource Manager 템플릿을 배포하는 청사진 아티팩트입니다.

CloudError

Name 형식 Description
error

ErrorResponse

오류 응답
실패한 작업에 대한 오류 세부 정보를 반환하는 모든 Azure Resource Manager API에 대한 일반적인 오류 응답입니다. OData 오류 응답 형식도 따릅니다.

ErrorAdditionalInfo

리소스 관리 오류 추가 정보입니다.

Name 형식 Description
info

object

추가 정보입니다.

type

string

추가 정보 유형입니다.

ErrorResponse

오류 응답

Name 형식 Description
additionalInfo

ErrorAdditionalInfo[]

오류 추가 정보입니다.

code

string

오류 코드입니다.

details

ErrorResponse[]

오류 세부 정보입니다.

message

string

오류 메시지입니다.

target

string

오류 대상입니다.

keyVaultReference

Key Vault에 대한 링크를 지정합니다.

Name 형식 Description
id

string

Key Vault의 Azure 리소스 ID입니다.

ParameterValue

지정된 매개 변수의 값입니다. 'value' 또는 'reference'일 수 있지만 둘 다일 수는 없습니다.

Name 형식 Description
reference

SecretValueReference

매개 변수 값을 참조 형식으로 사용합니다.

value

object

매개 변수 값입니다. 개체, 배열, 문자열, 숫자 및 부울을 포함하여 유효한 모든 JSON 값이 허용됩니다.

PolicyAssignmentArtifact

정책 할당을 적용하는 청사진 아티팩트입니다.

Name 형식 Description
id

string

Azure에서 리소스를 찾는 데 사용되는 문자열 ID입니다.

kind string:

policyAssignment

청사진 아티팩트 종류를 지정합니다.

name

string

이 리소스의 이름입니다.

properties.dependsOn

string[]

지정된 아티팩트 앞에 배포해야 하는 아티팩트입니다.

properties.description

string

maxLength: 500

이 리소스를 여러 줄로 설명합니다.

properties.displayName

string

maxLength: 256

한 줄 문자열은 이 리소스를 설명합니다.

properties.parameters

<string,  ParameterValue>

정책 정의에 대한 매개 변수 값입니다.

properties.policyDefinitionId

string

정책 정의의 Azure 리소스 ID입니다.

properties.resourceGroup

string

정책이 할당될 리소스 그룹 자리 표시자의 이름입니다.

type

string

이 리소스의 유형입니다.

RoleAssignmentArtifact

역할 할당을 적용하는 청사진 아티팩트입니다.

Name 형식 Description
id

string

Azure에서 리소스를 찾는 데 사용되는 문자열 ID입니다.

kind string:

roleAssignment

청사진 아티팩트 종류를 지정합니다.

name

string

이 리소스의 이름입니다.

properties.dependsOn

string[]

지정된 아티팩트 앞에 배포해야 하는 아티팩트입니다.

properties.description

string

maxLength: 500

이 리소스를 여러 줄로 설명합니다.

properties.displayName

string

maxLength: 256

한 줄 문자열은 이 리소스를 설명합니다.

properties.principalIds

Azure Active Directory의 사용자 또는 그룹 ID 배열입니다. roleDefinition은 각 ID에 적용됩니다.

properties.resourceGroup

string

RoleAssignment는 이 resourceGroup의 범위가 됩니다. 비어 있으면 구독 범위가 지정됩니다.

properties.roleDefinitionId

string

RoleDefinition의 Azure 리소스 ID입니다.

type

string

이 리소스의 유형입니다.

SecretValueReference

Key Vault 비밀에 대한 참조입니다.

Name 형식 Description
keyVault

keyVaultReference

지정된 Azure Key Vault에 대한 참조를 지정합니다.

secretName

string

비밀의 이름입니다.

secretVersion

string

사용할 비밀의 버전입니다. 비워 두면 최신 버전의 비밀이 사용됩니다.

TemplateArtifact

Resource Manager 템플릿을 배포하는 청사진 아티팩트입니다.

Name 형식 Description
id

string

Azure에서 리소스를 찾는 데 사용되는 문자열 ID입니다.

kind string:

template

청사진 아티팩트 종류를 지정합니다.

name

string

이 리소스의 이름입니다.

properties.dependsOn

string[]

지정된 아티팩트 앞에 배포해야 하는 아티팩트입니다.

properties.description

string

maxLength: 500

이 리소스를 여러 줄로 설명합니다.

properties.displayName

string

maxLength: 256

한 줄 문자열은 이 리소스를 설명합니다.

properties.parameters

<string,  ParameterValue>

Resource Manager 템플릿 청사진 아티팩트 매개 변수 값입니다.

properties.resourceGroup

string

해당하는 경우 Resource Manager 템플릿 청사진 아티팩트가 배포될 리소스 그룹 자리 표시자의 이름입니다.

properties.template

object

Resource Manager 템플릿 청사진 아티팩트 본문입니다.

type

string

이 리소스의 유형입니다.