Deleting Resources
Stack Monitoring resources can be deleted using the Oracle Cloud Infrastructure Command Line Interface (CLI). The CLI can delete a single resource or delete a resource and all of its member resources. For example, in the case of E-Business Suite (EBS), when deleting an EBS resource, all member resources such as Concurrent Manager, Workflow Mailer, etc. will also be deleted. The command will not delete associated resources such as Oracle Database or WebLogic Server as those are used by an E-Business Suite application but are not members of the E-Business Suite application. Similarly, when deleting a PeopleSoft resource type, member resources such as Application Server, Process Scheduler, PIA, etc. will be deleted. As with EBS, the command will not delete associated resources such as Oracle Database or WebLogic Server as those are used by PeopleSoft application but are not members of the PeopleSoft application.
Prerequisites
Using OCI CLI
The OCI CLI lets you perform the following operations:
Deleting a Single Resource
Use the following command to delete a resource.
oci stack-monitoring resource delete –-resource-id <stack_monitoring_resource_OCID>
where OCID is the ID of the resource. If the
resource has associated members, this operation fails. To get the list of members, use the
API search_monitored_resource_members
.
Deleting a Resource and its Members
Use the following command to delete a resource and its members.
oci stack-monitoring resource delete –-resource-id <stack_monitoring_resource_OCID> --is-delete-members true
where OCID is the ID of the resource.
When the --is-delete-members
option is
true, the delete operation will delete the
specified resource along with all its members.
Otherwise, if the
--is-delete-members
option is not
specified, and the resource has members, the command
returns failure.
By default, if the --is-delete-members
option is not specified, it is considered false.
For example, to delete all PeopleSoft related resources without affecting DB and WebLogic Server resources, run the following command:
oci stack-monitoring resource delete --resource-id <OCID of the PeopleSoft Application> --is-delete-members true
Example: Command and Output
oci stack-monitoring resource delete --resource-id ocid1.stackmonitoringresource.oc1.eu-frankfurt-1.xxxxxxx --is-delete-members true
Are you sure you want to delete this resource? [y/N]: y
{
"opc-work-request-id": "ocid1.stackmonitoringworkrequest.oc1.eu-frankfurt-1.xxxxxxx"
}
Tracking the Delete Operation
The delete operation returns a response header
opc-work-request-id
if the operation is accepted successfully. The work
request ID is used to track the delete operation, including its status, errors, and logs.
Details of the work request returned are dependent on the parameter provided: status,
errors, logs.
To get the status for a given Work Request Id:
oci stack-monitoring work-request get --work-request-id <opc-work-request-id>
To get a list of logs for a given Work Request ID:
oci stack-monitoring work-request list-logs --work-request-id <opc-work-request-id>
To get a list of errors for a given Work Request ID:
oci stack-monitoring work-request list-errors --work-request-id <opc-work-request-id>