OK - I have a weird one.....
I've deployed Compilation Jobs via ARM Templates using the following code:
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"compile-settings": {
"type": "object",
"metadata": {
"description": "These are settings for a DSC Compile"
}
},
"tag-values": {
"type": "object",
"metadata": {
"description": "These are the Tag values"
}
}
},
"resources": [
{
"name": "[parameters('compile-settings').name]",
"type": "Microsoft.Automation/automationAccounts/compilationjobs",
"apiVersion": "2015-10-31",
"location": "Australia Southeast",
"tags": "[parameters('tag-values')]",
"dependsOn": [],
"properties": {
"configuration": "[parameters('compile-settings').configuration]",
"parameters": "[parameters('compile-settings').parameters]"
},
"resources": []
}
],
"outputs": {}
}
Because I'm developing at the moment. when I re-run the deployment I get the following error:
{ "code": "Conflict", "message": "Job with specified id already exists. Job id: cde3eb0e-e8e4-de3e-0eae-e4cde3eb0eae" }
Using resources.azure.com, I cannot find this resource, but I can find it when using PowerShell e.g.
Get-AzureRmResource -ResourceId "/subscriptions/{subscriptionId}/resourceGroups/rg-au-901/providers/Microsoft.Automation/automationAccounts/aa-au-901/compilationjobs/cde3eb0e-e8e4-de3e-0eae-e4cde3eb0eae" -ApiVersion "2015-10-31"
Result:
ResourceId : /subscriptions/{subscriptionId}/resourceGroups/rg-au-901/providers/Microsoft.Automation/automationAccounts/aa-au-901/compilationjobs/cde3eb0e-e8e4-de3e-0eae-e4cde3eb0eae ResourceName : aa-au-901/cde3eb0e-e8e4-de3e-0eae-e4cde3eb0eae ResourceType : Microsoft.Automation/automationAccounts/compilationjobs ResourceGroupName : rg-au-901 SubscriptionId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx Properties : @{jobId=cde3eb0e-e8e4-de3e-0eae-e4cde3eb0eae; creationTime=2017-07-16T08:27:13.457+00:00; provisioningState=Suspended; status=Suspended; statusDetails=None; startTime=2017-07-16T08:28:01.74+00:00; endTime=; lastModifiedTime=2017-07-16T08:28:13.85+00:00; lastStatusModifiedTime=2017-07-16T08:28:13.85+00:00; exception=The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: The term 'xStorage\xWaitforDisk' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.; parameters=; configuration=; runOn=; newNodeConfigurationBuildVersionRequired=False}
However, when I try to remove it using Remove-AzureRmResource with the Force parameter it fails:
Remove-AzureRmResource : The pipeline has been stopped. At line:1 char:1 + Remove-AzureRmResource -ResourceId "/subscriptions/xxxxxxxx-xxxx-xxxx ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : CloseError: (:) [Remove-AzureRmResource], PipelineStoppedException + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.RemoveAzureResourceCmdlet Remove-AzureRmResource : {"code":"MethodNotAllowed","message":"{\"Message\":\"The requested resource does not support http method 'DELETE'.\"}"} At line:1 char:1 + Remove-AzureRmResource -ResourceId "/subscriptions/xxxxxxxx-xxxx-xxxx ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : CloseError: (:) [Remove-AzureRmResource], ErrorResponseMessageException + FullyQualifiedErrorId : MethodNotAllowed,Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.RemoveAzureResourceCmdlet
Help?
get
cmdlet – 4c74356b41