reserved instanceIBM Cloud

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
ctx
Context
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
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}$/

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
Channel
Always included*

A collection of channel connection details.

Possible values: 0 ≤ number of items ≤ 999999999

 
  • Name
    Always included*
    string

    Specifies the name of the channel.

  • ClientConnection
    Always included*

    Details for a client connection.

    • Connection

      A collection of objects with attributes that define a channel connection.

      Possible values: 0 ≤ number of items ≤ 999999999

      • Host
        string

        Specifies the host that this channel connects to.

      • Port
        integer

        Specifies the port that this channel uses on this host.

    • QueueManager
      string
      The name of the queue_manager
  • TransmissionSecurity
    Always included*

    An object that contains attributes that are related to security for message transmission.

    • CipherSpecification
      string
      Specifies the name of the CipherSpec for the channel to use.
  • Type
    Always included*
    string
    Specifies the type of the channel.
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"
    }
  ]
}