reserved instanceIBM Cloud

Update the AMS channels that are configured with this key store certificate - go

Update the AMS channels that are configured with this key store certificate.

(mqcloud *MqcloudV1) SetCertificateAmsChannels(setCertificateAmsChannelsOptions *SetCertificateAmsChannelsOptions) (result *ChannelsDetails, response *core.DetailedResponse, err error)
(mqcloud *MqcloudV1) SetCertificateAmsChannelsWithContext(ctx context.Context, setCertificateAmsChannelsOptions *SetCertificateAmsChannelsOptions) (result *ChannelsDetails, response *core.DetailedResponse, err error)

Request

Instantiate the SetCertificateAmsChannelsOptions struct and set the fields to provide parameter values for the SetCertificateAmsChannels 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.
GetKeyStoreCertificateOptions The GetKeyStoreCertificate 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
Channels
Always included*

A list of channels that use this certificate.

Possible values: 0 ≤ number of items ≤ 999999999

 
  • Name
    string
    The name of the channel.

    Possible values: 1 ≤ length ≤ 20, Value must match regular expression ^[a-zA-Z0-9_./%]*$

UpdateStrategy
string
Strategy for how the supplied channels should be applied.

Allowable values: [replace,append]

Example request

channelDetailsModel := &mqcloudv1.ChannelDetails{
}

setCertificateAmsChannelsOptions := mqcloudService.NewSetCertificateAmsChannelsOptions(
  "b8e1aeda078009cf3db74e90d5d42328",
  "9b7d1e723af8233",
  "a2b4d4bc-dadb-4637-bcec-9b7d1e723af8",
  []mqcloudv1.ChannelDetails{*channelDetailsModel},
)

channelsDetails, response, err := mqcloudService.SetCertificateAmsChannels(setCertificateAmsChannelsOptions)
if err != nil {
  panic(err)
}
b, _ := json.MarshalIndent(channelsDetails, "", "  ")
fmt.Println(string(b))

Response

Response Body
ChannelsDetails
A list of channels that are configured with this certificate.
Channels
Always included*

A list of channels that are configured with this certificate.

Possible values: 0 ≤ number of items ≤ 999999999

 
  • Name
    string
    The name of the channel.

    Possible values: 1 ≤ length ≤ 20, Value must match regular expression /^[a-zA-Z0-9_./%]*$/

Status code  
200 Details of AMS channels that are configured with the given certificate
301 URI has permanently Moved
400 Bad Request
401 Unauthorized
404 Resource not found
429 Service Is Overused
500 Internal Server Error

Example response

Success example

{
  "channels": [
    {
      "name": "CLOUD.APP.SVRCONN"
    }
  ]
}