Artifacts - Delete

Usuń artefakt strategii.

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

Parametry identyfikatora URI

Nazwa W Wymagane Typ Opis
artifactName
path True

string

Nazwa artefaktu strategii.

blueprintName
path True

string

Nazwa definicji strategii.

resourceScope
path True

string

Zakres zasobu. Prawidłowe zakresy to: grupa zarządzania (format: "/providers/Microsoft.Management/managementGroups/{managementGroup}"), subskrypcja (format: "/subscriptions/{subscriptionId}").

api-version
query True

string

Wersja interfejsu API klienta.

Odpowiedzi

Nazwa Typ Opis
200 OK Artifact:

OK — artefakt strategii został usunięty.

204 No Content

Brak zawartości

Other Status Codes

CloudError

Odpowiedź na błąd strategii.

Zabezpieczenia

azure_auth

Przepływ OAuth2 usługi Azure Active Directory

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Nazwa Opis
user_impersonation personifikacja konta użytkownika

Przykłady

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

MG-ARMTemplateArtifact

Sample Request

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

Sample Response

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

Sample Request

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

Sample Response

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

Sample Request

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

Sample Response

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

Sample Request

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

Sample Response

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

Sample Request

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

Sample Response

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

Sample Request

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

Sample Response

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

Definicje

Nazwa Opis
CloudError
ErrorAdditionalInfo

Dodatkowe informacje o błędzie zarządzania zasobami.

ErrorResponse

Odpowiedź na błąd

keyVaultReference

Określa link do Key Vault.

ParameterValue

Wartość określonego parametru. Może to być wartość lub odwołanie, ale nie oba.

PolicyAssignmentArtifact

Artefakt strategii, który stosuje przypisanie zasad.

RoleAssignmentArtifact

Artefakt strategii, który stosuje przypisanie roli.

SecretValueReference

Odwołanie do wpisu tajnego Key Vault.

TemplateArtifact

Artefakt strategii, który wdraża szablon Resource Manager.

CloudError

Nazwa Typ Opis
error

ErrorResponse

Odpowiedź na błąd
Typowa odpowiedź na błędy dla wszystkich interfejsów API usługi Azure Resource Manager zwraca szczegóły błędu dla operacji, które zakończyły się niepowodzeniem. (Jest to również zgodne z formatem odpowiedzi na błąd OData).

ErrorAdditionalInfo

Dodatkowe informacje o błędzie zarządzania zasobami.

Nazwa Typ Opis
info

object

Dodatkowe informacje.

type

string

Dodatkowy typ informacji.

ErrorResponse

Odpowiedź na błąd

Nazwa Typ Opis
additionalInfo

ErrorAdditionalInfo[]

Dodatkowe informacje o błędzie.

code

string

Kod błędu.

details

ErrorResponse[]

Szczegóły błędu.

message

string

Komunikat o błędzie.

target

string

Element docelowy błędu.

keyVaultReference

Określa link do Key Vault.

Nazwa Typ Opis
id

string

Identyfikator zasobu platformy Azure Key Vault.

ParameterValue

Wartość określonego parametru. Może to być wartość lub odwołanie, ale nie oba.

Nazwa Typ Opis
reference

SecretValueReference

Wartość parametru jako typ odwołania.

value

object

Wartość parametru. Dozwolona jest dowolna prawidłowa wartość JSON, w tym obiekty, tablice, ciągi, liczby i wartości logiczne.

PolicyAssignmentArtifact

Artefakt strategii, który stosuje przypisanie zasad.

Nazwa Typ Opis
id

string

Identyfikator ciągu używany do lokalizowania dowolnego zasobu na platformie Azure.

kind string:

policyAssignment

Określa rodzaj artefaktu strategii.

name

string

Nazwa tego zasobu.

properties.dependsOn

string[]

Artefakty, które należy wdrożyć przed określonym artefaktem.

properties.description

string

Wiele wierszy wyjaśnia ten zasób.

properties.displayName

string

Jeden ciąg liniowy wyjaśnia ten zasób.

properties.parameters

<string,  ParameterValue>

Wartości parametrów definicji zasad.

properties.policyDefinitionId

string

Identyfikator zasobu platformy Azure definicji zasad.

properties.resourceGroup

string

Nazwa symbolu zastępczego grupy zasobów, do którego zostaną przypisane zasady.

type

string

Typ tego zasobu.

RoleAssignmentArtifact

Artefakt strategii, który stosuje przypisanie roli.

Nazwa Typ Opis
id

string

Identyfikator ciągu używany do lokalizowania dowolnego zasobu na platformie Azure.

kind string:

roleAssignment

Określa rodzaj artefaktu strategii.

name

string

Nazwa tego zasobu.

properties.dependsOn

string[]

Artefakty, które należy wdrożyć przed określonym artefaktem.

properties.description

string

Wiele wierszy wyjaśnia ten zasób.

properties.displayName

string

Jeden ciąg liniowy wyjaśnia ten zasób.

properties.principalIds

Tablica tożsamości użytkowników lub grup w usłudze Azure Active Directory. Definicja roli będzie stosowana do każdej tożsamości.

properties.resourceGroup

string

RoleAssignment będzie zakresem dla tej grupy zasobów. Jeśli jest ona pusta, zakresy są ograniczone do subskrypcji.

properties.roleDefinitionId

string

Identyfikator zasobu platformy Azure elementu RoleDefinition.

type

string

Typ tego zasobu.

SecretValueReference

Odwołanie do wpisu tajnego Key Vault.

Nazwa Typ Opis
keyVault

keyVaultReference

Określa odwołanie do danej usługi Azure Key Vault.

secretName

string

Nazwa wpisu tajnego.

secretVersion

string

Wersja wpisu tajnego do użycia. Jeśli pole pozostanie puste, zostanie użyta najnowsza wersja wpisu tajnego.

TemplateArtifact

Artefakt strategii, który wdraża szablon Resource Manager.

Nazwa Typ Opis
id

string

Identyfikator ciągu używany do lokalizowania dowolnego zasobu na platformie Azure.

kind string:

template

Określa rodzaj artefaktu strategii.

name

string

Nazwa tego zasobu.

properties.dependsOn

string[]

Artefakty, które należy wdrożyć przed określonym artefaktem.

properties.description

string

Wiele wierszy wyjaśnia ten zasób.

properties.displayName

string

Jeden ciąg liniowy wyjaśnia ten zasób.

properties.parameters

<string,  ParameterValue>

Resource Manager wartości parametrów artefaktu strategii szablonu.

properties.resourceGroup

string

Jeśli ma to zastosowanie, symbol zastępczy grupy zasobów, do którego zostanie wdrożony artefakt strategii szablonu Resource Manager.

properties.template

object

Treść artefaktu strategii szablonu Resource Manager.

type

string

Typ tego zasobu.