
Get connection information for a queue manager - go
Get connection information for a queue manager.
(mqcloud *MqcloudV1) GetQueueManagerConnectionInfo(getQueueManagerConnectionInfoOptions *GetQueueManagerConnectionInfoOptions) (result *ConnectionInfo, response *core.DetailedResponse, err error)
(mqcloud *MqcloudV1) GetQueueManagerConnectionInfoWithContext(ctx context.Context, getQueueManagerConnectionInfoOptions *GetQueueManagerConnectionInfoOptions) (result *ConnectionInfo, response *core.DetailedResponse, err error)
Request
Instantiate the GetQueueManagerConnectionInfoOptions struct and set the fields
to provide parameter values for the GetQueueManagerConnectionInfo 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. |
| GetQueueManagerConnectionInfoOptions | GetQueueManagerConnectionInfo 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
|
Example request
getQueueManagerConnectionInfoOptions := mqcloudService.NewGetQueueManagerConnectionInfoOptions(
"a2b4d4bc-dadb-4637-bcec-9b7d1e723af8",
"b8e1aeda078009cf3db74e90d5d42328",
)
connectionInfo, response, err := mqcloudService.GetQueueManagerConnectionInfo(getQueueManagerConnectionInfoOptions)
if err != nil {
panic(err)
}
b, _ := json.MarshalIndent(connectionInfo, "", " ")
fmt.Println(string(b))
Response
| Response Body ConnectionInfo
|
Responds with JSON CCDT of the connection information for the queue manager |
|---|---|
ChannelAlways included*
|
A collection of channel connection details. Possible values: 0 ≤ number of items ≤ 999999999 |
|
| Status code | |
|---|---|
| 200 | Returns url to track progress of the queue manager upgrade |
| 301 | URI has permanently Moved |
| 400 | Bad Request |
| 401 | Unauthorized |
| 404 | Method not allowed |
| 429 | Service Is Overused |
| 500 | Internal Server Error |
Example response
Success example
{
"channel": [
{
"name": "CLOUD.ADMIN.SVRCONN",
"clientConnection": {
"connection": [
{
"host": "myqm-fre.qm1.eu-de.mq2.cloud.ibm.com",
"port": 30446
}
],
"queueManager": "myqm"
},
"transmissionSecurity": {
"cipherSpecification": "ANY_TLS12_OR_HIGHER"
},
"type": "clientConnection"
}
]
}