GitHub Repository: https://github.com/SimonSparksUK/Automation
Filename: Policy-Day-2-Action-Capacity-Sample.json
{
"name":"Approval (Capacity) for Deployment of Large VMs",
"typeId":"com.vmware.policy.approval",
"projectId":"--INSERT-YOUR-PROJECT-ID-HERE--",
"enforcementType":"HARD",
"criteria":{
"matchExpression":[
{
"key":"resources",
"operator":"hasAny",
"value":{
"matchExpression":[
{
"or":[
{
"key":"properties.flavor",
"operator":"eq",
"value":"Medium"
},
{
"key":"properties.flavor",
"operator":"eq",
"value":"Large"
},
{
"key":"properties.flavor",
"operator":"eq",
"value":"Extra Large"
}
]
}
]
}
}
]
},
"definition":{
"level":1,
"actions":[
"Deployment.ChangeLease",
"Deployment.ChangeProject",
"Deployment.Create",
"Deployment.Delete",
"Deployment.EditDeployment",
"Deployment.EditTags",
"Deployment.RebuildVMs",
"Deployment.Update",
"Cloud.vSphere.Machine.Add.Disk",
"Cloud.vSphere.Machine.Change.SecurityGroup",
"Cloud.vSphere.Machine.Compute.Disk.Resize",
"Cloud.vSphere.Machine.Delete",
"Cloud.vSphere.Machine.Rebuild",
"Cloud.vSphere.Machine.Remove.Disk",
"Cloud.vSphere.Machine.Reprovision",
"Cloud.vSphere.Machine.Resize",
"Cloud.vSphere.Machine.Resize.Compute.Disk",
"Cloud.vSphere.Machine.Update.Tags"
],
"approvers":[
"USER:capacity-ops"
],
"approvalMode":"ANY_OF",
"approverType":"USER",
"autoApprovalExpiry":7,
"autoApprovalDecision":"APPROVE"
}
}Discover more from Cloud Build Tools
Subscribe to get the latest posts sent to your email.
