Get Deployment Resource IDs
To get IDs of the resources in
your deployment, you use the Deployment APIs to make a GET request.
- Verify that all general prerequisites and prerequisites for theAutomation Service BrokerDeployment service have been satisfied. See Prerequisites for API Use Case Examples.
- Verify that you have the ID of the deployment you want to reconfigure. See Deploy a Cloud Template with Contents Inline.
To perform operations on the load
balancer or virtual machine in your deployment, you need the IDs of those
resources.
- Assign your deployment ID variable.deployment_id='<your_deployment_id>'
- List the resources in your deployment.curl -X GET \ $url/deployment/api/deployments/$deployment_id/resources?apiVersion=$api_version \ -H "Authorization: Bearer $access_token" | jq "."
- Examine the response.
- Find the resource namedProvider_LoadBalancer_1and copy the value to assign to the load balancer ID.
- Find the resource namedcloud-vmand copy the value to assign to the virtual machine ID.
- Assign variables for the resources.load_balancer_id='<your_load_balancer_id>' virtual_machine_id='<your_virtual_machine_id>'
Get Deployment Resource
IDs
Get the resource IDs for your deployment
with ID
5551a299-8b67-45e3-909e-a638d11b0d9f
. Assign variables.
$ url='https://appliance.domain.com' $ api_version='2020-08-25' $ deployment_id='5551a299-8b67-45e3-909e-a638d11b0d9f'
List the resources in your
deployment.
$ curl -X GET \ $url/deployment/api/deployments/$deployment_id/resources?apiVersion=$api_version \ -H "Authorization: Bearer $access_token" | jq "."
A snippet of the response shows the ID
for the resource
Provider_LoadBalancer_1
and the ID for the resource
cloud-vm
. ... { "id": "d5b4569d-2234-4fc4-a594-45e6b0251588", "name": "Provider_LoadBalancer_1", "type": "Cloud.LoadBalancer", ... { "id": "42f49781-1490-4a08-ae21-8baf383a72ac", "name": "cloud-vm", "type": "Cloud.AWS.EC2.Instance", ...
Assign the load balancer ID and virtual
machine ID variables.
$ load_balancer_id='d5b4569d-2234-4fc4-a594-45e6b0251588' $ virtual_machine_id='42f49781-1490-4a08-ae21-8baf383a72ac'
Use the load balancer ID to
reconfigure your load balancer. Use the virtual machine ID to add a disk to the VM and
power off the VM.