reserved instanceIBM Cloud

Delete a specific virtual private endpoint gateway - go

Delete a specific virtual private endpoint gateway.

(mqcloud *MqcloudV1) DeleteVirtualPrivateEndpointGateway(deleteVirtualPrivateEndpointGatewayOptions *DeleteVirtualPrivateEndpointGatewayOptions) (response *core.DetailedResponse, err error)
(mqcloud *MqcloudV1) DeleteVirtualPrivateEndpointGatewayWithContext(ctx context.Context, deleteVirtualPrivateEndpointGatewayOptions *DeleteVirtualPrivateEndpointGatewayOptions) (response *core.DetailedResponse, err error)

Request

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

VirtualPrivateEndpointGatewayGuid
Required*
string

The id of the virtual private endpoint gateway

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}$

Example: r010-ebab3c08-c9a8-40c4-8869-61c09ddf7b44

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

Example request

deleteVirtualPrivateEndpointGatewayOptions := mqcloudService.NewDeleteVirtualPrivateEndpointGatewayOptions(
  "a2b4d4bc-dadb-4637-bcec-9b7d1e723af8",
  "r010-ebab3c08-c9a8-40c4-8869-61c09ddf7b44",
)
deleteVirtualPrivateEndpointGatewayOptions.SetTrustedProfile("crn:v1:bluemix:public:iam-identity::a/5d5ff2a9001c4055ab1408e9bf185f48::profile:Profile-1c0a8609-ca25-4ad2-a09b-aea472d34afc")

response, err := mqcloudService.DeleteVirtualPrivateEndpointGateway(deleteVirtualPrivateEndpointGatewayOptions)
if err != nil {
  panic(err)
}
if response.StatusCode != 204 {
  fmt.Printf("\nUnexpected response status code received from DeleteVirtualPrivateEndpointGateway(): %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