D Deleting Exalogic vDC Resources Using the IaaS CLI: Example Procedures

This appendix provides example procedures for deleting vDC resources using the IaaS command-line interface (CLI). For an overview of the Iaas CLI, see Section C.4.1, "Overview of CLI Commands." For information about CLI commands that are not described here, see the Oracle Enterprise Manager Ops Center API and CLI Reference Guide.

This appendix contains the following sections:

Before You Begin

Before performing the tasks described in this appendix, you must have created vDC resources, as described in Appendix C, "Exalogic vDC Management Using IaaS CLI: Basic Tasks."

D.1 Example Procedure: Deleting a Server Template

To delete a Server Template, complete the following steps:

  1. Run the following command:

    ./iaas-delete-server-template --base-url https://<localhost>/ --access-key-file ak.file --server-template-id TMPL-aaaaaaa8-bbb4-ccc4-ddd4-eeeeeeeeee03

    The command deletes the specified Server Template. The command does not return any value; only the command prompt is returned.

  2. Verify the deletion of the Server Template by running the iaas-describe-server-templates command, as in the following example:

    ./iaas-describe-server-templates --base-url https://<localhost>/ --access-key-file ak.file --ids TMPL-aaaaaaa8-bbb4-ccc4-ddd4-eeeeeeeeee03

    Verify that the deleted Server Template is not listed in the output of this command.

D.2 Example Procedure: Deleting Tags

To delete a tag from a specified resource (for example, private vNet), complete the following steps:

  1. Run the following command:

    ./iaas-delete-tags --base-url https://<localhost>/ -a ak.file --id VNET-350c9c3f-0ee5-41be-917e-ebbaed0fa4ad --tags myTag

    The command deletes the specified tag from the specified resource. The command does not return any value; only the command prompt is returned.

  2. Verify the deletion by running the iaas-describe-tags command, as in the following example:

    ./iaas-describe-tags --base-url https://<localhost>/ -a ak.file --ids VNET-350c9c3f-0ee5-41be-917e-ebbaed0fa4ad

    This command should not return the tag that was initially associated with the specified private vNet.

D.3 Example Procedure: Terminating vServers

To stop and delete one or more vServers, complete the following steps:

  1. Run the following command:

    ./iaas-terminate-vservers --base-url https://<localhost>/ -a ~/ak.file --vserver-ids VSRV-d6800889-f59b-4798-a57d-3f9f31b0cf1c VSRV-d6500889-f59b-4567-a65g-3f9f31b0se1d --force

    The command stops and deletes the specified vServers.

  2. Verify the deletion by running the iaas-describe-vservers command, as in the following example:

    ./iaas-describe-vservers --base-url https://<localhost>/ -a ak.file --ids VSRV-d6800889-f59b-4798-a57d-3f9f31b0cf1c VSRV-d6500889-f59b-4567-a65g-3f9f31b0se1d

    This command should return empty output, as the specified vServers are deleted.

D.4 Example Procedure: Deleting a Private vNet

Before deleting a private vNet, ensure that it is not associated with any running vServers.

To delete a private vNet, complete the following steps:

  1. Run the following command:

    ./iaas-delete-vnet --base-url https://<localhost>/ -a ak.file --vnet VNET-350c9c3f-0ee5-41be-917e-ebbaed0fa4ad

    The command deletes the specified private vNet. The command does not return any value.

  2. Verify the deletion by running the iaas-describe-vnets command, as in the following example:

    ./iaas-describe-vnets --base-url https://<localhost>/ -a ak.file --ids VNET-350c9c3f-0ee5-41be-917e-ebbaed0fa4ad

    This command should return empty output, as the specified private vNet is deleted.

D.5 Example Procedure: Deleting a Distribution Group

Before deleting a distribution group, ensure that it does not have any running vServers.

To delete a distribution group, complete the following steps:

  1. Run the following command:

    ./iaas-delete-distribution-group --base-url https://<localhost>/ --access-key-file ak.file --distribution-group-id DG-068ae84c-d0fc-406d-aa37-0be4f88d411c

    The command deletes the specified distribution group. The command does not return any value; only the command prompt is displayed.

  2. Verify the deletion by running the iaas-describe-distribution-groups command, as in the following example:

    ./iaas-describe-distribution-groups --base-url https://<localhost>/ -a ~/ak.file --ids DG-068ae84c-d0fc-406d-aa37-0be4f88d411c -H

    This command should return empty output, as the specified distribution group is deleted.

D.6 Example Procedure: Deleting a Volume

Before deleting a volume, ensure that it is not attached to any running vServers.

To delete a volume, complete the following steps:

  1. Run the following command:

    ./iaas-delete-volume --base-url https://<localhost>/ -a ak.file --volume-id VOL-f23a8ba1-ec55-4159-bbdf-de220d18a1c4

    The command deletes the specified volume. The command does not return any value; only the command prompt is displayed.

  2. Verify the deletion by running the iaas-describe-volumes command, as in the following example:

    ./iaas-describe-volumes --base-url https://<localhost>/ -a ak.file --ids VOL-f23a8ba1-ec55-4159-bbdf-de220d18a1c4

    This command should return empty output, as the specified volume is deleted.

D.7 Example Procedure: Deleting a Snapshot

To delete a Snapshot, complete the following steps:

  1. Run the following command:

    ./iaas-delete-snapshot --base-url https://<localhost>/ -a ak.file --snapshot-id SNAP-7a717e39-fe67-4573-a93d-889b3446176b

    The command deletes the specified Snapshot. The command does not return any value; only the command prompt is displayed.

  2. Verify the deletion by running the iaas-describe-snapshots command, as in the following example:

    ./iaas-describe-snapshots --base-url https://<localhost>/ -a ak.file --ids SNAP-7a717e39-fe67-4573-a93d-889b3446176b

    In the output, you should not see the Snapshot SNAP-7a717e39-fe67-4573-a93d-889b3446176b, which is deleted.

D.8 Example Procedure: Deleting a Key Pair

To delete a key pair, complete the following steps:

  1. Run the following command:

    ./iaas-delete-key-pair --base-url https://<localhost>/ --access-key-file ak.file --key-name myKeyPair

    The command deletes the specified key pair. The command does not return any value; only the command prompt is displayed.

  2. Verify the deletion by running the iaas-describe-key-pairs command, as in the following example:

    ./iaas-describe-key-pairs --base-url https://<localhost>/ -a ak.file

    This command returns the list of all key pairs in your Account. In the output, you should not see the key pair that you deleted.

D.9 Example Procedure: Deleting an Access Key

To delete an access key, complete the following steps:

  1. Run the following command:

    ./akm-delete-access-key --base-url https://<localhost>/ --user User1 --password-file ~/pwd.file AK_32

    The command deletes the specified access key. The command does not return any value; only the command prompt is displayed.

  2. Verify the deletion by running the iaas-describe-access-keys command, as in the following example:

    ./akm-describe-access-keys --base-url https://<localhost>/ --user User1 --password-file ~/pwd.file

    This command returns the list of all access keys in your Account. In the output, you should not see the access key that you deleted.