|
21 | 21 | "from apimtypes import *\n", |
22 | 22 | "\n", |
23 | 23 | "# 1) User-defined parameters (change these as needed)\n", |
24 | | - "rg_location = 'eastus2'\n", |
25 | | - "index = 1\n", |
26 | | - "apim_sku = APIM_SKU.STANDARDV2\n", |
27 | | - "deployment = INFRASTRUCTURE.AFD_APIM_PE\n", |
28 | | - "use_ACA = True\n", |
| 24 | + "rg_location = 'eastus2'\n", |
| 25 | + "index = 1\n", |
| 26 | + "apim_sku = APIM_SKU.STANDARDV2\n", |
| 27 | + "deployment = INFRASTRUCTURE.AFD_APIM_PE\n", |
| 28 | + "use_ACA = True\n", |
| 29 | + "reveal_backend = True # Set to True to reveal the backend details in the API operations\n", |
29 | 30 | "\n", |
30 | 31 | "# 2) Service-defined parameters (please do not change these unless you know what you're doing)\n", |
31 | 32 | "rg_name = utils.get_infra_rg_name(deployment, index)\n", |
|
55 | 56 | "if use_ACA:\n", |
56 | 57 | " utils.print_info('ACA APIs will be created.')\n", |
57 | 58 | "\n", |
58 | | - " backend_polixy_xml = utils.read_policy_xml(BACKEND_XML_POLICY_PATH)\n", |
59 | | - " aca_backend_1_policy_xml = backend_polixy_xml.format(backend_id = 'aca-backend-1')\n", |
60 | | - " aca_backend_2_policy_xml = backend_polixy_xml.format(backend_id = 'aca-backend-2')\n", |
61 | | - " aca_backend_pool_policy_xml = backend_polixy_xml.format(backend_id = 'aca-backend-pool')\n", |
| 59 | + " backend_policy_xml = utils.read_policy_xml(BACKEND_XML_POLICY_PATH)\n", |
| 60 | + " aca_backend_1_policy_xml = backend_policy_xml.format(backend_id = 'aca-backend-1')\n", |
| 61 | + " aca_backend_2_policy_xml = backend_policy_xml.format(backend_id = 'aca-backend-2')\n", |
| 62 | + " aca_backend_pool_policy_xml = backend_policy_xml.format(backend_id = 'aca-backend-pool')\n", |
62 | 63 | "\n", |
63 | 64 | " # Hello World (ACA Backend 1)\n", |
64 | 65 | " api_hwaca_1_get = GET_APIOperation('This is a GET for Hello World on ACA Backend 1')\n", |
|
98 | 99 | "\n", |
99 | 100 | "# 1) Define the Bicep parameters with serialized APIs and networking mode\n", |
100 | 101 | "bicep_parameters = {\n", |
101 | | - " 'apimSku' : {'value': apim_sku.value},\n", |
102 | | - " 'apis' : {'value': [api.to_dict() for api in apis]},\n", |
103 | | - " 'policyFragments' : {'value': [pf.to_dict() for pf in pfs]},\n", |
104 | | - " 'apimPublicAccess' : {'value': apim_network_mode in [APIMNetworkMode.PUBLIC, APIMNetworkMode.EXTERNAL_VNET]},\n", |
105 | | - " 'useACA' : {'value': use_ACA}\n", |
| 102 | + " 'apimSku' : {'value': apim_sku.value},\n", |
| 103 | + " 'apis' : {'value': [api.to_dict() for api in apis]},\n", |
| 104 | + " 'policyFragments' : {'value': [pf.to_dict() for pf in pfs]},\n", |
| 105 | + " 'apimPublicAccess' : {'value': apim_network_mode in [APIMNetworkMode.PUBLIC, APIMNetworkMode.EXTERNAL_VNET]},\n", |
| 106 | + " 'useACA' : {'value': use_ACA}\n", |
106 | 107 | "}\n", |
107 | 108 | "\n", |
108 | 109 | "# 2) Run the deployment\n", |
|
0 commit comments