
Delete a trust store certificate - go
Delete a trust store certificate.
(mqcloud *MqcloudV1) DeleteTrustStoreCertificate(deleteTrustStoreCertificateOptions *DeleteTrustStoreCertificateOptions) (response *core.DetailedResponse, err error)
(mqcloud *MqcloudV1) DeleteTrustStoreCertificateWithContext(ctx context.Context, deleteTrustStoreCertificateOptions *DeleteTrustStoreCertificateOptions) (response *core.DetailedResponse, err error)
Request
Instantiate the DeleteTrustStoreCertificateOptions struct and set the fields to
provide parameter values for the DeleteTrustStoreCertificate method.
| parameter | WithContext method only |
|---|---|
ctxContext
|
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 |
|---|---|
ServiceInstanceGuidRequired*
string |
The GUID that uniquely identifies the IBM® MQ as a Service instance. Possible values: length = 36, Value must match regular expression
Example: |
QueueManagerIDRequired*
string |
The id of the queue manager to retrieve its full details. Possible values:
length = 32, Value must match regular expression
b8e1aeda078009cf3db74e90d5d42328 |
CertificateFileRequired*
io.ReadCloser |
The filename and path of the certificate to be uploaded. Possible values: 1500 ≤ length ≤ 65537 Examples:[B@36ab3814 |
Example request
deleteTrustStoreCertificateOptions := mqcloudService.NewDeleteTrustStoreCertificateOptions(
"a2b4d4bc-dadb-4637-bcec-9b7d1e723af8",
"b8e1aeda078009cf3db74e90d5d42328",
"9b7d1e723af8233",
)
response, err := mqcloudService.DeleteTrustStoreCertificate(deleteTrustStoreCertificateOptions)
if err != nil {
panic(err)
}
if response.StatusCode != 204 {
fmt.Printf("\nUnexpected response status code received from DeleteTrustStoreCertificate(): %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 |