IBM Cloud Docs
Publishing and Unpublishing a Private Path service

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, or API.

Publishing a Private Path service in the UI

To publish a Private Path service in the IBM Cloud console, follow these steps:

  1. From your browser, open the IBM Cloud console and log in to your account.

  2. Select the Navigation Menu Menu icon, then click Infrastructure > Network > Private Path services.

  3. Locate the name of your new Private Path service in the table, and click the name to view the Private Path service details page.

  4. Click Publish in the Actions menu 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:

  1. From your browser, open the IBM Cloud console and log in to your account.
  2. Select the Navigation Menu Menu icon, then click Infrastructure > Network > Private Path services.
  3. 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.
  4. On the Private Path service details page, click the Actions menu, then click Unpublish.
  5. Confirm that you want to unpublish your Private Path.

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.

You must first export the feature flag to use the CLI for Private Path beta release offerings.

To export the feature flag, enter the following commands:

export IBMCLOUD_IS_FEATURE_PRIVATE_PATH_SERVICE_GATEWAY=true
export IBMCLOUD_IS_FEATURE_PP_NLB_SUPPORT=true

To publish a Private Path service from the CLI, follow these steps:

  1. 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.

You must first export the feature flag to use the CLI for Private Path beta release offerings.

To export the feature flag, enter the following commands:

export IBMCLOUD_IS_FEATURE_PRIVATE_PATH_SERVICE_GATEWAY=true
export IBMCLOUD_IS_FEATURE_PP_NLB_SUPPORT=true

To unpublish a Private Path service from the CLI, follow these steps:

  1. 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:

  1. Set up your API environment.

  2. 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>
      
  3. When all variables are initiated, do one of the following:

    • To 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:

  1. Set up your API environment.

  2. 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>
      
  3. When all variables are initiated, do one of the following:

    • To 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

Terraform will support this feature after it reaches General Availability (GA) and is officially released.

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
}

Next steps

  1. Communicate connection information to consumers
  2. Review connection requests and Create account policies