Published Artifacts - List
列出已发布蓝图定义的版本的项目。
GET https://management.azure.com/{resourceScope}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/versions/{versionId}/artifacts?api-version=2018-11-01-preview
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
blueprint
|
path | True |
string |
蓝图定义的名称。 |
|
resource
|
path | True |
string |
资源的范围。 有效范围包括:管理组(格式:'/providers/Microsoft.Management/managementGroups/{managementGroup}')、订阅(格式:'/subscriptions/{subscriptionId}')。 |
|
version
|
path | True |
string |
已发布的蓝图定义的版本。 |
|
api-version
|
query | True |
string |
客户端 API 版本。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
确定 - 检索到已发布蓝图定义的版本的项目。 |
|
| Other Status Codes |
蓝图错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 流
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
| 名称 | 说明 |
|---|---|
| user_impersonation | 模拟用户帐户 |
示例
|
MG-Artifact |
|
Sub-Artifact |
MG-ArtifactList
示例请求
GET https://management.azure.com/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/versions/V2/artifacts?api-version=2018-11-01-preview
示例响应
{
"value": [
{
"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/versions/V2/artifacts/ownerAssignment",
"type": "Microsoft.Blueprint/blueprints/versions/artifacts",
"name": "ownerAssignment"
},
{
"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/versions/V2/artifacts/costCenterPolicy",
"type": "Microsoft.Blueprint/blueprints/versions/artifacts",
"name": "costCenterPolicy"
},
{
"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/versions/V2/artifacts/storageTemplate",
"type": "Microsoft.Blueprint/blueprints/versions/artifacts",
"name": "storageTemplate"
}
]
}
Sub-ArtifactList
示例请求
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprints/simpleBlueprint/versions/V2/artifacts?api-version=2018-11-01-preview
示例响应
{
"value": [
{
"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/versions/V2/artifacts/ownerAssignment",
"type": "Microsoft.Blueprint/blueprints/versions/artifacts",
"name": "ownerAssignment"
},
{
"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/versions/V2/artifacts/costCenterPolicy",
"type": "Microsoft.Blueprint/blueprints/versions/artifacts",
"name": "costCenterPolicy"
},
{
"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/versions/V2/artifacts/storageTemplate",
"type": "Microsoft.Blueprint/blueprints/versions/artifacts",
"name": "storageTemplate"
}
]
}
定义
| 名称 | 说明 |
|---|---|
|
Artifact |
蓝图项目列表。 |
|
Cloud |
|
|
Error |
资源管理错误附加信息。 |
|
Error |
错误响应 |
|
key |
指定 Key Vault 的链接。 |
|
Parameter |
指定参数的值。 可以是“value”或“reference”,但不能同时为两者。 |
|
Policy |
应用策略分配的蓝图项目。 |
|
Role |
应用角色分配的蓝图项目。 |
|
Secret |
对 Key Vault 机密的引用。 |
|
Template |
部署资源管理器模板的蓝图项目。 |
ArtifactList
蓝图项目列表。
| 名称 | 类型 | 说明 |
|---|---|---|
| nextLink |
string |
链接到结果的下一页。 |
| value | Artifact[]: |
蓝图项目列表。 |
CloudError
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
错误响应 |
ErrorAdditionalInfo
资源管理错误附加信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| info |
object |
其他信息。 |
| type |
string |
其他信息类型。 |
ErrorResponse
错误响应
| 名称 | 类型 | 说明 |
|---|---|---|
| additionalInfo |
错误附加信息。 |
|
| code |
string |
错误代码。 |
| details |
错误详细信息。 |
|
| message |
string |
错误消息。 |
| target |
string |
错误目标。 |
keyVaultReference
指定 Key Vault 的链接。
| 名称 | 类型 | 说明 |
|---|---|---|
| id |
string |
Key Vault 的 Azure 资源 ID。 |
ParameterValue
指定参数的值。 可以是“value”或“reference”,但不能同时为两者。
| 名称 | 类型 | 说明 |
|---|---|---|
| reference |
参数值作为引用类型。 |
|
| value |
object |
参数值。 允许任何有效的 JSON 值,包括对象、数组、字符串、数字和布尔值。 |
PolicyAssignmentArtifact
应用策略分配的蓝图项目。
| 名称 | 类型 | 说明 |
|---|---|---|
| id |
string |
用于在 Azure 上查找任何资源的字符串 ID。 |
| kind |
string:
policy |
指定蓝图项目的类型。 |
| name |
string |
此资源的名称。 |
| properties.dependsOn |
string[] |
需要在指定项目之前部署的项目。 |
| properties.description |
string maxLength: 500 |
多行说明此资源。 |
| properties.displayName |
string maxLength: 256 |
单行字符串解释此资源。 |
| properties.parameters |
<string,
Parameter |
策略定义的参数值。 |
| properties.policyDefinitionId |
string |
策略定义的 Azure 资源 ID。 |
| properties.resourceGroup |
string |
将向其分配策略的资源组占位符的名称。 |
| type |
string |
此资源的类型。 |
RoleAssignmentArtifact
应用角色分配的蓝图项目。
| 名称 | 类型 | 说明 |
|---|---|---|
| id |
string |
用于在 Azure 上查找任何资源的字符串 ID。 |
| kind |
string:
role |
指定蓝图项目的类型。 |
| name |
string |
此资源的名称。 |
| properties.dependsOn |
string[] |
需要在指定项目之前部署的项目。 |
| properties.description |
string maxLength: 500 |
多行说明此资源。 |
| properties.displayName |
string maxLength: 256 |
单行字符串解释此资源。 |
| properties.principalIds |
Azure Active Directory 中的用户或组标识数组。 roleDefinition 将应用于每个标识。 |
|
| properties.resourceGroup |
string |
RoleAssignment 的范围将限定为此 resourceGroup。 如果为空,则范围限定为订阅。 |
| properties.roleDefinitionId |
string |
RoleDefinition 的 Azure 资源 ID。 |
| type |
string |
此资源的类型。 |
SecretValueReference
对 Key Vault 机密的引用。
| 名称 | 类型 | 说明 |
|---|---|---|
| keyVault |
指定对给定 Azure Key Vault 的引用。 |
|
| secretName |
string |
机密的名称。 |
| secretVersion |
string |
要使用的机密版本。 如果留空,则使用最新版本的机密。 |
TemplateArtifact
部署资源管理器模板的蓝图项目。
| 名称 | 类型 | 说明 |
|---|---|---|
| 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,
Parameter |
资源管理器模板蓝图项目参数值。 |
| properties.resourceGroup |
string |
如果适用,则会将资源管理器模板蓝图项目部署到的资源组占位符的名称。 |
| properties.template |
object |
资源管理器模板蓝图项目正文。 |
| type |
string |
此资源的类型。 |