reserved instanceIBM Cloud

Delete an application from an instance - go

Delete an application from an instance.

(mqcloud *MqcloudV1) DeleteApplication(deleteApplicationOptions *DeleteApplicationOptions) (response *core.DetailedResponse, err error) 
(mqcloud *MqcloudV1) DeleteApplicationWithContext(ctx context.Context, deleteApplicationOptions *DeleteApplicationOptions) (response *core.DetailedResponse, err error)

Request

Instantiate the DeleteApplicationOptions struct and set the fields to provide parameter values for the DeleteApplication method.

parameter WithContext method only
ctx
Context
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
DeleteApplicationOptions The DeleteApplication options
ServiceInstanceGuid
Required*
string

The GUID that uniquely identifies the IBM® MQ as a Service instance.

Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

Example: a2b4d4bc-dadb-4637-bcec-9b7d1e723af8

ApplicationID
Required*
string

The id of the application.

Possible values: length = 32, Value must match regular expression /^[0-9a-fA-F]{32}$/

Example: 0123456789ABCDEF0123456789ABCDEF

Example request

deleteApplicationOptions := mqcloudService.NewDeleteApplicationOptions(
  "a2b4d4bc-dadb-4637-bcec-9b7d1e723af8",
  "0123456789ABCDEF0123456789ABCDEF",
)

response, err := mqcloudService.DeleteApplication(deleteApplicationOptions)
if err != nil {
  panic(err)
}
if response.StatusCode != 204 {
  fmt.Printf("\nUnexpected response status code received from DeleteApplication(): %d\n", response.StatusCode)
}

Response

Status code  
204 Resource was deleted successfully
301 URI has permanently Moved
400 Bad Request
401 Unauthorized
404 Resource not found
429 Service Is Overused
500 Internal Server Error