reserved instanceIBM Cloud

Get a list of information for all virtual private endpoint gateways - go

Get a list of information for all virtual private endpoint gateways.

(mqcloud *MqcloudV1) ListVirtualPrivateEndpointGateways(listVirtualPrivateEndpointGatewaysOptions *ListVirtualPrivateEndpointGatewaysOptions) (result *VirtualPrivateEndpointGatewayDetailsCollection, response *core.DetailedResponse, err error)
(mqcloud *MqcloudV1) ListVirtualPrivateEndpointGatewaysWithContext(ctx context.Context, listVirtualPrivateEndpointGatewaysOptions *ListVirtualPrivateEndpointGatewaysOptions) (result *VirtualPrivateEndpointGatewayDetailsCollection, response *core.DetailedResponse, err error)

Request

Instantiate the ListVirtualPrivateEndpointGatewaysOptions struct and set the fields to provide parameter values for the ListVirtualPrivateEndpointGateways 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.
ListVirtualPrivateEndpointGatewaysOptions The ListVirtualPrivateEndpointGateways 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

TrustedProfile
String

The CRN of the trusted profile to assume for this request. This can only be retrieved using the CLI using ibmcloud iam tp <profile_id> -o json.

Possible values: 9 ≤ length ≤ 512, Value must match regular expression /^crn:v[0-9]+:[a-z0-9-]+:[a-z0-9-]+:[a-z0-9-]+:[a-z0-9-]*:([a-z]\/[a-z0-9-]+)?:[a-z0-9-]*:[a-z0-9-]*:[a-zA-Z0-9-_\\.\/]*$|^crn:\\[\\.\\.\\.\\]$/

Examples: crn:v1:bluemix:public:iam-identity::a/5d5ff2a9001c4055ab1408e9bf185f48::profile:Profile-1c0a8609-ca25-4ad2-a09b-aea472d34afc
Start
string

A server-provided token determining what resource to start the page on.

Possible values: 1 ≤ length ≤ 4096, Value must match regular expression /^[ -~]+$/

Examples r010-ebab3c08-c9a8-40c4-8869-61c09ddf7b44
Limit
int64

The numbers of resources to return.

Possible values: 0 ≤ value ≤ 100

Default: 25

Examples: 10

Example request

listVirtualPrivateEndpointGatewaysOptions := &mqcloudv1.ListVirtualPrivateEndpointGatewaysOptions{
  ServiceInstanceGuid: core.StringPtr("a2b4d4bc-dadb-4637-bcec-9b7d1e723af8"),
  TrustedProfile: core.StringPtr("crn:v1:bluemix:public:iam-identity::a/5d5ff2a9001c4055ab1408e9bf185f48::profile:Profile-1c0a8609-ca25-4ad2-a09b-aea472d34afc"),
  Limit: core.Int64Ptr(int64(10)),
}

pager, err := mqcloudService.NewVirtualPrivateEndpointGatewaysPager(listVirtualPrivateEndpointGatewaysOptions)
if err != nil {
  panic(err)
}

var allResults []mqcloudv1.VirtualPrivateEndpointGatewayDetails
for pager.HasNext() {
  nextPage, err := pager.GetNext()
  if err != nil {
    panic(err)
  }
  allResults = append(allResults, nextPage...)
}
b, _ := json.MarshalIndent(allResults, "", "  ")
fmt.Println(string(b))

Response

VirtualPrivateEndpointGatewayDetailsCollection
A list of virtual private endpoint gateway summaries
Limit
Always included*
integer

Results per page, same for all collections.

Possible values: value ≤ 50

First
Always included*
Link to first page of results.
 
  • Href

    The URL of the page the link goes to.

VirtualPrivateEndpointGateways
Always included*

List of virtual private endpoint gateways

Possible values: 0 ≤ number of items ≤ 50

 
  • Href

    URL for the details of the virtual private endpoint gateway

    Possible values: 10 ≤ length ≤ 8000, Value must match regular expression ^http(s)?:\/\/([^\/?#]*)([^?#]*)(\?([^#]*))?(#(.*))?$

 
  • ID
    Always included*
    string

    The ID of the virtual private endpoint gateway which was allocated on creation.

    Possible values: length = 41, Value must match regular expression ^[0-9a-zA-Z]{4}-[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}$

 
  • Name
    Always included*
    string

    The name of the virtual private endpoint gateway, created by the user.

    Possible values: 1 ≤ length ≤ 63, Value must match regular expression ^[a-z]|[a-z][-a-z0-9]*[a-z0-9]$

 
  • TargetCrn
    Always included*
    string

    The CRN of the virtual private endpoint gateway the user is trying to connect to.

    Possible values: 9 ≤ length ≤ 512, Value must match regular expression ^crn:v[0-9]+:[a-z0-9-]+:[a-z0-9-]+:[a-z0-9-]+:[a-z0-9-]*:([a-z]\/[a-z0-9-]+)?:[a-z0-9-]*:[a-z0-9-]*:[a-zA-Z0-9-_\.\/]*$|^crn:\[\.\.\.\]$

 
  • Status
    Always included*
    string

    The lifecycle state of this virtual privage endpoint.

    Possible values: 2 ≤ length ≤ 12, Value must match regular expression ^deleting$|failed$|pending$|stable$|suspended$|updating$|waiting$|approved$

Next
Always included*
Link to next page of results.
 
  • Href

    The URL of the page the link goes to.

Status code  
200 An object with information of all virtual_private_endpoint_gateways in a service instance
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

{
  "limit": 25,
  "first": {
    "href": "https://api.private.eu-de.mq2.cloud.ibm.com/v1/a2b4d4bc-dadb-4637-bcec-9b7d1e723af8/virtual_private_endpoint_gateway?limit=25"
  },
  "next": {
    "href": "https://api.private.eu-de.mq2.cloud.ibm.com/v1/a2b4d4bc-dadb-4637-bcec-9b7d1e723af8/virtual_private_endpoint_gateway?start=r010-ebab3c08-c9a8-40c4-8869-61c09ddf7b44&limit=25"
  },
  "virtual_private_endpoint_gateways": [
    {
      "href": "https://api.private.eu-de.mq2.cloud.ibm.com/v1/a2b4d4bc-dadb-4637-bcec-9b7d1e723af8/virtual_private_endpoint_gateway/r010-ebab3c08-c9a8-40c4-8869-61c09ddf7b44",
      "id": "r010-ebab3c08-c9a8-40c4-8869-61c09ddf7b44",
      "name": "vpe-gateway1-to-vpe-gateway2",
      "target_crn": "crn:v1:bluemix:public:mqcloud:region:a/5d5ff2a9001c4055ab1408e9bf185f48:a2b4d4bc-dadb-4637-bcec-9b7d1e723af8::",
      "status": "approved"
    }
  ]
}