Updating and deleting a Private Path service
You can migrate to a newer version of Private Path service without deleting or disrupting the service you provide to your current customers. You can delete a Private Path service using the console, CLI, API, or Terraform.
Update a Private Path service in the console
To update a Private Path provider service 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 and click the name of the Private Path service that you want to update.
- On the Private Path details page, click the Edit icon
beside the details that you want to update.
You can also update the members attached to a Private Path NLB in your Private Path service. For more information, see Updating a network load balancer in the console.
Update the target service of a Private Path service in the console
If you’re updating the actual target service without changing the load balancer, you don’t need to take any actions in Private Path service. Instead, you need to update the Private Path network load balancer. For more information, see Reviewing connection requests.
To update the target service of a Private Path provider service 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 > Load balancers.
-
Select the region of your load balancer.
-
Select the load balancer that you want to update.
-
Select Back-end pools > Create pool to create a new pool of servers for your updated service.
-
Select the new options for your pool. You have the following options:
- Pool Name: The name for your pool. Ideally, a name that describes the function that is performed by this pool.
- Protocol: The network traffic protocol for your traffic.
- Method: The load-balancing algorithm for the pool.
- Session stickiness: Whether all requests during a user's session are sent to the same instance.
- Health check: For more information about configuring health checks, see Working with health checks.
-
Make sure to configure these servers for your new provider service by setting the Method to Weighted round robin for your old pool and your new pool. Set the Weight of the new pool to a non-zero value, and the Weight of the old pool to a zero value. This will redirect traffic from your old server pool to your new server pool.
-
Update your existing front-end listener to finish attaching your load balancer to this new pool. On your load balancer details page, Click the Front-end listeners tab. In the table, click the Navigation menu
at the end of the row of your existing listener, then click Edit.
-
In the menu that appears, click Edit. Under Default Back-end pool, type in the ID of your new pool. Click Save.
Deleting a Private Path service in the console
To delete a Private Path service in the IBM Cloud console, follow these steps:
-
Revoke accounts associated with any active VPE gateways. For more information, see Updating and deleting an account policy.
The consumer gets notified that their account is denied and the VPE gateway changes to
failed
state. -
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 service that you want to delete, then click Delete in the Actions menu
.
Updating a provider service from the CLI
The following example shows how to update a Private Path provider service from the CLI.
To update 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 --name NEW_NAME [--default-access-policy deny | permit | review] [--load-balancer LOAD_BALANCER] [--published] [--zonal-affinity false | true] [--output JSON] [-q, --quiet]
Where:
PRIVATE_PATH_SERVICE_GATEWAY
- Indicates ID or name of the Private Path service.
--default-access-policy
- Indicates the policy to use for bindings from accounts without an explicit account policy. One of:
deny
,permit
,review
. Default:deny
. --load-balancer
- Indicates ID or name of load balancer for this Private Path service.
--published
- Indicates the availability of this Private Path service. If passed, value is set to
true
. Atrue
value means account can request access to this Private Path service. --zonal-affinity
- Indicates whether this Private Path service has zonal affinity. One of:
false
,true
. --name
- Indicates the new name of the Private Path service.
--output
- Specifies output format, only JSON is supported. One of:
JSON
. -q, --quiet
- Suppresses verbose output.
Command examples for updating a Private Path service
-
Update a Private Path service:
ibmcloud is private-path-service-gateway-update r006-2e671f14-19fc-4089-9ad3-973176711259 --name cli-ppsg-2 --default-access-policy deny --load-balancer r006-d-740be75d-be41-48bd-b6e4-89946ddcac4a --zonal-affinity false --published
-
Update a Private Path service:
ibmcloud is private-path-service-gateway-update cli-ppsg-2 --name cli-ppsg-0 --default-access-policy review --load-balancer my-cli-nlb-1 --zonal-affinity false --published
Deleting a Private Path service from the CLI
The following example shows how to use the CLI to delete a Private Path service.
Before you begin, make sure to set up your CLI environment.
To delete a Private Path service from the CLI, follow these steps:
- Enter the following command:
ibmcloud is private-path-service-gateway-delete (PRIVATE_PATH_SERVICE_GATEWAY1 PRIVATE_PATH_SERVICE_GATEWAY2 ...)
[--output JSON] [-f, --force] [-q, --quiet]
Where:
PRIVATE_PATH_SERVICE_GATEWAY1
- Indicates ID or name of the Private Path service.
PRIVATE_PATH_SERVICE_GATEWAY2
- Indicates ID or name of the Private Path service.
--output
- Specifies output format, only JSON is supported. One of:
JSON
. force, -f
- Forces the operation without confirmation.
-q, --quiet
- Suppresses verbose output.
Command examples for deleting Private Path gateways
-
Delete multiple Private Path services:
ibmcloud is ppsgd r006-01cd30f7-e6f2-432f-9520-76247b1fbbe1 r006-72940467-a4db-487f-b57e-b7141ac40e32
-
Delete multiple Private Path services:
ibmcloud is private-path-service-gateway-delete cli-ppsg-0 cli-ppsg-1
Updating a Private Path service with the API
To update a Private Path provider 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, do one of the following:
-
To update a Private Path service:
curl -X PATCH -sH "Authorization:${iam_token}" \ "$vpc_api_endpoint/v1/private_path_service_gateways/$ppsgId?version=$api_version&generation=2" \ -d { "zonal_affinity": true }'
The above example updates the Private Path service zonal affinity to
true
.
-
Deleting a Private Path service with the API
To delete 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, do one of the following:
-
To delete a Private Path service:
curl -X DELETE -sH "Authorization:${iam_token}" \ "$vpc_api_endpoint/v1/private_path_service_gateways/$ppsgId?version=$api_version&generation=2"
-
Updating and deleting a Private Path service with Terraform
Updating and Deleting a Private Path Service by using Terraform is done with the same resource.
The following example updates and delete an endpoint gateway binding to a Private Path network by using Terraform:
resource "ibm_is_private_path_service_gateway" "ppsg" {
default_access_policy = "deny"
load_balancer = ibm_is_lb.ppnlb.id
service_endpoints = ["my-service.example.com"]
zonal_affinity = false
name = "my-example-ppsg"
}
For documentation about Terraform resources, see the Terraform Registry.