Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save shawnho1018/6851d525ee9fa5749a0fb52f7caa6256 to your computer and use it in GitHub Desktop.
Save shawnho1018/6851d525ee9fa5749a0fb52f7caa6256 to your computer and use it in GitHub Desktop.
更新Virtual Server的設定
curl -k https://nsxmgr.syspks.com/api/v1/loadbalancer/virtual-servers/{virtual-server-id} \
-X PUT -u admin:VMware1! -i -H "X-Allow-Overwrite:true" -H "Content-Type:application/json" \
-H "Accept:application/json" \
-d '{
"resource_type" : "LbVirtualServer",
"id" : "03af0505-3db4-4a31-b619-7b0ff72d6f0f",
"display_name" : "pks-4cb3e155-a084-4af2-8513-34077fde1a17-http",
"tags" : [ {
"scope" : "ncp/version",
"tag" : "1.2.0"
}, {
"scope" : "ncp/cluster",
"tag" : "pks-4cb3e155-a084-4af2-8513-34077fde1a17"
}, {
"scope" : "ncp/lb_vs_type",
"tag" : "http"
}, {
"scope" : "ext_pool_id",
"tag" : "cded865d-2cb7-4869-99dd-19e08e7281bb"
} ],
"ip_address" : "192.169.0.109",
"ports" : [ "80" ],
"enabled" : true,
"ip_protocol" : "TCP",
"rule_ids" : [ "d8be0307-5c4e-437f-bdef-9be64d6a99bd" ],
"port" : "80",
"access_log_enabled" : false,
"application_profile_id" : “{your-application-profile-id}",
"_create_user" : "pks-4cb3e155-a084-4af2-8513-34077fde1a17",
"_create_time" : 1558584040388,
"_last_modified_user" : "pks-4cb3e155-a084-4af2-8513-34077fde1a17",
"_last_modified_time" : 1558805042480,
"_system_owned" : false,
"_protection" : "REQUIRE_OVERRIDE",
"_revision" : 2
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment