Publishing and unpublishing a Private Path service
After you verify a successful connection to your Private Path service, you must publish your service for deployment to consumers.
If a Private Path service is not published, it cannot be accessed outside of the account.
Publishing allows any account to request access to to the Private Path service. If need be, you can also unpublish where access is restricted to the account that created the Private Path service.
You can publish and unpublish an IBM Cloud® Private Path service using the UI, CLI, API, or Terraform.
Publishing a Private Path service in the UI
To publish a Private Path service in the IBM Cloud console, follow these steps:
-
From your browser, open the IBM Cloud console and log in to your account.
-
Select the Navigation Menu , then click Infrastructure > Network > Private Path services.
-
Locate the name of your new Private Path service in the table, and click the name to view the Private Path service details page.
-
Click Publish in the Actions menu .
The Publication column in the Private Path services for VPC table changes to
Published
.
The Private Path service is now exposed for other accounts to connect to the service through Virtual Private Endpoint (VPE) gateways.
After publishing, the Private Path service name is visible to customers connecting to the Private Path service.
Unpublishing a Private Path service in the UI
To unpublish a Private Path service in the IBM Cloud console, follow these steps:
- From your browser, open the IBM Cloud console and log in to your account.
- Select the Navigation Menu , then click Infrastructure > Network > Private Path services.
- In the Private Path services for VPC table, locate the Private Path that you want to unpublish, then click the name of that Private Path service.
- On the Private Path service details page, click the Actions menu, then click Unpublish.
- Confirm that you want to unpublish your Private Path service.
Publishing a Private Path service from the CLI
The following example shows how to use the CLI to publish a Private Path service.
Before you begin, make sure to set up your CLI environment.
To publish a Private Path service from the CLI, follow these steps:
- Enter the following command:
ibmcloud is private-path-service-gateway-update PRIVATE_PATH_SERVICE_GATEWAY
[--output JSON]
[-f, --force]
[-q, --quiet]
Where:
PRIVATE_PATH_SERVICE_GATEWAY
- Indicates ID or name of the Private Path service.
--output
- Indicates output format, only JSON is supported. One of:
JSON
. -q, --quiet
- Suppresses verbose output.
Command examples
- Publish a Private Path service:
ibmcloud is ppsgp r134-01cd30f7-e6f2-432f-9520-76247b1fbbe1
ibmcloud is private-path-service-gateway-publish cli-ppsg-0
Unpublishing a Private Path service from the CLI
The following example shows how to use the CLI to unpublish a Private Path service.
Before you begin, make sure to set up your CLI environment.
To unpublish a Private Path service from the CLI, follow these steps:
- Enter the following command:
ibmcloud is private-path-service-gateway-unpublish PRIVATE_PATH_SERVICE_GATEWAY
[--output JSON]
[-f, --force]
[-q, --quiet]
Where:
PRIVATE_PATH_SERVICE_GATEWAY
- Indicates ID or name of the Private Path service.
--output
- Indicates output format, only JSON is supported. One of:
JSON
. -q, --quiet
- Suppresses verbose output.
Publishing a Private Path service with the API
To publish a Private Path service with the API, follow these steps:
-
Set up your API environment.
-
Store the following values in variables to be used in the API command:
-
ppsgId
- Get your Private Path service and then populate the variable:export ppsgId=<your_ppsg_id>
-
-
When all variables are initiated, publish your Private Path service:
curl -X POST -sH "Authorization:${iam_token}" \ "$vpc_api_endpoint/v1/private_path_service_gateways/$ppsgId/publish?version=$api_version&generation=2" \ -d {}'
Unpublishing a Private Path service with the API
To unpublish a Private Path service with the API, follow these steps:
-
Set up your API environment.
-
Store the following values in variables to be used in the API command:
-
ppsgId
- Get your Private Path service and then populate the variable:export ppsgId=<your_ppsg_id>
-
-
When all variables are initiated, unpublish your Private Path service:
curl -X POST -sH "Authorization:${iam_token}" \ "$vpc_api_endpoint/v1/private_path_service_gateways/$ppsgId/unpublish?version=$api_version&generation=2" \ -d {}'
Command examples
- Publish a Private Path service:
ibmcloud is ppsgunp r134-01cd30f7-e6f2-432f-9520-76247b1fbbe1
ibmcloud is private-path-service-gateway-unpublish cli-ppsg-0
Publishing a Private Path service with Terraform
The following example publishes a Private Path network by using Terraform:
resource "ibm_is_private_path_service_gateway_operations" "publish" {
published = true
private_path_service_gateway = ibm_is_private_path_service_gateway.ppsg.id
}
Unpublishing a Private Path service with Terraform
Terraform will support this feature after it reaches General Availability (GA) and is officially released.
The following example unpublishes a Private Path network by using Terraform:
resource "ibm_is_private_path_service_gateway_operations" "publish" {
published = false
private_path_service_gateway = ibm_is_private_path_service_gateway.ppsg.id
}