Stop-AzResourceGroupDeployment cmdlet은 시작되었지만 완료되지 않은 Azure 리소스 그룹 배포를 취소합니다.
배포를 중지하려면 배포에 프로비전과 같은 불완전한 프로비저닝 상태가 있어야 하며 프로비전됨 또는 실패와 같은 완료된 상태가 아니어야 합니다.
Azure 리소스는 웹 사이트, 데이터베이스 또는 데이터베이스 서버와 같은 사용자 관리 엔터티입니다.
리소스 그룹은 단위로 배포되는 리소스의 컬렉션입니다.
리소스 그룹을 배포하려면 New-AzResourceGroupDeployment cmdlet을 사용합니다.
New-AzResource cmdlet은 새 리소스를 만들지만 이 cmdlet이 중지할 수 있는 리소스 그룹 배포 작업을 트리거하지는 않습니다.
이 cmdlet은 실행 중인 배포를 하나만 중지합니다.
Name 매개 변수를 사용하여 특정 배포를 중지합니다.
Name 매개 변수를 생략하면 Stop-AzResourceGroupDeployment에서 실행 중인 배포를 검색하여 중지합니다.
cmdlet에서 실행 중인 배포를 둘 이상 찾으면 명령이 실패합니다.
예제
예제 1: 리소스 그룹 배포 시작 및 중지
New-AzResourceGroupDeployment -Name mynewstorageaccount -ResourceGroupName myrg -TemplateFile .\storage-account-create-azdeploy.json -TemplateParameterFile .\storage-account-create-azdeploy.parameters.json -AsJob
Id Name PSJobTypeName State HasMoreData Location Command
-- ---- ------------- ----- ----------- -------- -------
1 Long Running... AzureLongRun... Running True localhost New-AzResourceGro...
Stop-AzResourceGroupDeployment -Name mynewstorageaccount -ResourceGroupName myrg
True
Get-Job 1
Id Name PSJobTypeName State HasMoreData Location Command
-- ---- ------------- ----- ----------- -------- -------
1 Long Running... AzureLongRun... Failed True localhost New-AzResourceGro...
중지할 리소스 그룹 배포의 이름을 지정합니다.
이 매개 변수를 지정하지 않으면 이 cmdlet은 리소스 그룹에서 실행 중인 배포를 검색하여 중지합니다.
실행 중인 배포가 두 개 이상 발견되면 명령이 실패합니다.
배포 이름을 얻으려면 Get-AzResourceGroupDeployment cmdlet을 사용합니다.
이 cmdlet은 일반적인 매개 변수인 -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction 및 -WarningVariable 매개 변수를 지원합니다. 자세한 내용은 about_CommonParameters를 참조하세요.