reserved instanceIBM Cloud

Delete a queue manager's key store certificate - go

Delete a queue manager's key store certificate.

(mqcloud *MqcloudV1) DeleteKeyStoreCertificate(deleteKeyStoreCertificateOptions *DeleteKeyStoreCertificateOptions) (response *core.DetailedResponse, err error)
(mqcloud *MqcloudV1) DeleteKeyStoreCertificateWithContext(ctx context.Context, deleteKeyStoreCertificateOptions *DeleteKeyStoreCertificateOptions) (response *core.DetailedResponse, err error)

Request

Instantiate the DeleteKeyStoreCertificateOptions struct and set the fields to provide parameter values for the DeleteKeyStoreCertificate 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.
DeleteTrustStoreCertificateOptions The DeleteTrustStoreCertificate 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

QueueManagerID
Required*
string

The id of the queue manager to retrieve its full details.

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

Examples: b8e1aeda078009cf3db74e90d5d42328
CertificateFile
Required*
io.ReadCloser

The filename and path of the certificate to be uploaded.

Possible values: 1500 ≤ length ≤ 65537

Examples: [B@36ab3814

Example request

deleteKeyStoreCertificateOptions := mqcloudService.NewDeleteKeyStoreCertificateOptions(
  "a2b4d4bc-dadb-4637-bcec-9b7d1e723af8",
  "b8e1aeda078009cf3db74e90d5d42328",
  "9b7d1e723af8233",
)

response, err := mqcloudService.DeleteKeyStoreCertificate(deleteKeyStoreCertificateOptions)
if err != nil {
  panic(err)
}
if response.StatusCode != 204 {
  fmt.Printf("\nUnexpected response status code received from DeleteKeyStoreCertificate(): %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