ves-io-schema-advertise_policy-API-Create
Examples of creating advertise_policy
Usecase:
Advertise bookinfo productpage on public network on all volterra regional edge sites. Its advertised as HTTPS. VIP is automatically chosen by the system Public network is available in ves-io/shared
Request using vesctl:
vesctl configuration create advertise_policy -i advertise_policy.yaml
where file advertise_policy.yaml has following contents (advertise_policy.CreateRequest):
RequestJSON:
{ "metadata": { "name": "advertise-on-public", "namespace": "documentation" }, "spec": { "where": { "virtual_network": { "ref": [ { "kind": "virtual_network", "tenant": "ves-io", "namespace": "shared", "name": "public" } ] } }, "protocol": "TCP", "port": 443, "tls_parameters": { "common_params": { "cipher_suites": [], "tls_certificates": [ { "certificate_url": "string:///\u003cBase64\u003e", "private_key": { "blindfold_secret_info": { "location": "string:///\u003cBase64\u003e" } } } ] } } }}vesctl yaml response:
ResponseJSON:
{ "metadata": { "name": "advertise-on-public", "namespace": "documentation", "labels": {}, "annotations": {}, "description": "", "disable": false }, "system_metadata": { "uid": "491fd32d-f547-4f6d-a21d-2f88bf5f61c4", "creation_timestamp": "2026-04-13T01:58:56.861295Z", "deletion_timestamp": null, "modification_timestamp": null, "initializers": null, "finalizers": [], "tenant": "acmecorp", "creator_class": "examplesvc", "creator_id": "examplesvc", "object_index": 0, "owner_view": null, "labels": {} }, "spec": { "where": { "virtual_network": { "ref": [ { "kind": "virtual_network", "uid": "ffffffff-ffff-ffff-ffff-ffffffffffff", "tenant": "ves-io", "namespace": "shared", "name": "public" } ] } }, "address": "", "public_ip": [], "protocol": "TCP", "port": 443, "tls_parameters": { "common_params": { "minimum_protocol_version": "TLS_AUTO", "maximum_protocol_version": "TLS_AUTO", "cipher_suites": [], "tls_certificates": [ { "certificate_url": "string:///\u003cBase64\u003e", "private_key": { "blindfold_secret_info": { "decryption_provider": "", "store_provider": "", "location": "string:///\u003cBase64\u003e" }, "blindfold_secret_info_internal": null, "secret_encoding_type": "EncodingNone" }, "description": "" } ], "trusted_ca_url": "", "validation_params": null }, "require_client_certificate": false, "no_client_certificate": {}, "crl": [], "xfcc_header_elements": [] }, "skip_xff_append": false }}Request using curl:
curl -X 'POST' -d '{"metadata":{"name":"advertise-on-public","namespace":"documentation"},"spec":{"where":{"virtual_network":{"ref":[{"kind":"virtual_network","tenant":"ves-io","namespace":"shared","name":"public"}]}},"protocol":"TCP","port":443,"tls_parameters":{"common_params":{"cipher_suites":[],"tls_certificates":[{"certificate_url":"string:///\u003cBase64\u003e","private_key":{"blindfold_secret_info":{"location":"string:///\u003cBase64\u003e"}}}]}}}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_var_folders_q2_3kp8z3zs0x5_m7pk1bgb0_ph0000gp_T_go-build1414723615_b001_apidocs.test/host=MTY6VVHQPH/svc=S:examplesvc/site=mytestce01' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/documentation/advertise_policys'curl response:
HTTP/1.1 200 OKContent-Type: application/jsonDate: Mon, 13 Apr 2026 01:58:56 GMTVary: Accept-Encoding
{ "metadata": { "name": "advertise-on-public", "namespace": "documentation", "labels": { }, "annotations": { }, "description": "", "disable": false }, "system_metadata": { "uid": "491fd32d-f547-4f6d-a21d-2f88bf5f61c4", "creation_timestamp": "2026-04-13T01:58:56.861295Z", "deletion_timestamp": null, "modification_timestamp": null, "initializers": null, "finalizers": [ ], "tenant": "acmecorp", "creator_class": "examplesvc", "creator_id": "examplesvc", "object_index": 0, "owner_view": null, "labels": { } }, "spec": { "where": { "virtual_network": { "ref": [ { "kind": "virtual_network", "uid": "ffffffff-ffff-ffff-ffff-ffffffffffff", "tenant": "ves-io", "namespace": "shared", "name": "public" } ] } }, "address": "", "public_ip": [ ], "protocol": "TCP", "port": 443, "tls_parameters": { "common_params": { "minimum_protocol_version": "TLS_AUTO", "maximum_protocol_version": "TLS_AUTO", "cipher_suites": [ ], "tls_certificates": [ { "certificate_url": "string:///\u003cBase64\u003e", "private_key": { "blindfold_secret_info": { "decryption_provider": "", "store_provider": "", "location": "string:///\u003cBase64\u003e" }, "blindfold_secret_info_internal": null, "secret_encoding_type": "EncodingNone" }, "description": "" } ], "trusted_ca_url": "", "validation_params": null }, "require_client_certificate": false, "no_client_certificate": {
}, "crl": [ ], "xfcc_header_elements": [ ] }, "skip_xff_append": false }}Usecase:
Advertise bookinfo productpage on all sites represented by virtual site acmecorp-vsite1 Its advertised as HTTP on site local network. VIP is automatically chosen by the system
Request using vesctl:
vesctl configuration create advertise_policy -i advertise_policy.yaml
where file advertise_policy.yaml has following contents (advertise_policy.CreateRequest):
RequestJSON:
{ "metadata": { "name": "advertise-on-acmecorp-vsite-1", "namespace": "documentation" }, "spec": { "where": { "virtual_site": { "ref": [ { "kind": "virtual_site", "tenant": "acmecorp", "namespace": "documentation", "name": "acmecorp-vsite1" } ] } }, "protocol": "TCP", "port": 443 }}vesctl yaml response:
ResponseJSON:
{ "metadata": { "name": "advertise-on-acmecorp-vsite-1", "namespace": "documentation", "labels": {}, "annotations": {}, "description": "", "disable": false }, "system_metadata": { "uid": "ca1fda67-8263-41c9-9b16-28315de9e590", "creation_timestamp": "2026-04-13T01:58:56.868424Z", "deletion_timestamp": null, "modification_timestamp": null, "initializers": null, "finalizers": [], "tenant": "acmecorp", "creator_class": "examplesvc", "creator_id": "examplesvc", "object_index": 0, "owner_view": null, "labels": {} }, "spec": { "where": { "virtual_site": { "ref": [ { "kind": "virtual_site", "uid": "ffffffff-ffff-ffff-ffff-ffffffffffff", "tenant": "acmecorp", "namespace": "documentation", "name": "acmecorp-vsite1" } ], "network_type": "VIRTUAL_NETWORK_SITE_LOCAL", "disable_internet_vip": {}, "refs": [] } }, "address": "", "public_ip": [], "protocol": "TCP", "port": 443, "tls_parameters": null, "skip_xff_append": false }}Request using curl:
curl -X 'POST' -d '{"metadata":{"name":"advertise-on-acmecorp-vsite-1","namespace":"documentation"},"spec":{"where":{"virtual_site":{"ref":[{"kind":"virtual_site","tenant":"acmecorp","namespace":"documentation","name":"acmecorp-vsite1"}]}},"protocol":"TCP","port":443}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_var_folders_q2_3kp8z3zs0x5_m7pk1bgb0_ph0000gp_T_go-build1414723615_b001_apidocs.test/host=MTY6VVHQPH/svc=S:examplesvc/site=mytestce01' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/documentation/advertise_policys'curl response:
HTTP/1.1 200 OKContent-Length: 1218Content-Type: application/jsonDate: Mon, 13 Apr 2026 01:58:56 GMTVary: Accept-Encoding
{ "metadata": { "name": "advertise-on-acmecorp-vsite-1", "namespace": "documentation", "labels": { }, "annotations": { }, "description": "", "disable": false }, "system_metadata": { "uid": "ca1fda67-8263-41c9-9b16-28315de9e590", "creation_timestamp": "2026-04-13T01:58:56.868424Z", "deletion_timestamp": null, "modification_timestamp": null, "initializers": null, "finalizers": [ ], "tenant": "acmecorp", "creator_class": "examplesvc", "creator_id": "examplesvc", "object_index": 0, "owner_view": null, "labels": { } }, "spec": { "where": { "virtual_site": { "ref": [ { "kind": "virtual_site", "uid": "ffffffff-ffff-ffff-ffff-ffffffffffff", "tenant": "acmecorp", "namespace": "documentation", "name": "acmecorp-vsite1" } ], "network_type": "VIRTUAL_NETWORK_SITE_LOCAL", "disable_internet_vip": {
}, "refs": [ ] } }, "address": "", "public_ip": [ ], "protocol": "TCP", "port": 443, "tls_parameters": null, "skip_xff_append": false }}