|
32 | 32 | "rg_name = utils.get_infra_rg_name(deployment, index)\n", |
33 | 33 | "supported_infrastructures = [INFRASTRUCTURE.SIMPLE_APIM, INFRASTRUCTURE.AFD_APIM_PE, INFRASTRUCTURE.APIM_ACA] # ENTER SUPPORTED INFRASTRUCTURES HERE, e.g., [INFRASTRUCTURE.AFD_APIM_PE, INFRASTRUCTURE.AFD_APIM_FE]\n", |
34 | 34 | "utils.validate_infrastructure(deployment, supported_infrastructures)\n", |
35 | | - "\n", |
| 35 | + "sample_folder = \"azure-maps\"\n", |
36 | 36 | "# 3) Define the APIs and their operations and policies\n", |
37 | 37 | "\n", |
38 | 38 | "# Policies\n", |
39 | 39 | "# Named values must be set up a bit differently as they need to have two surrounding curly braces\n", |
40 | | - "map_async_geocode_batch_v1_keyauth_post_xml = utils.read_policy_xml('map_async_geocode_batch_v1_keyauth_post.xml')\n", |
41 | | - "map_default_route_v2_aad_get_xml = utils.read_policy_xml('map_default_route_v2_aad_get.xml')\n", |
42 | | - "map_geocode_v2_aad_get_xml = utils.read_policy_xml('map_geocode_v2_aad_get.xml')\n", |
| 40 | + "map_async_geocode_batch_v1_keyauth_post_xml = utils.read_policy_xml('map_async_geocode_batch_v1_keyauth_post.xml', sample_name=sample_folder)\n", |
| 41 | + "map_default_route_v2_aad_get_xml = utils.read_policy_xml('map_default_route_v2_aad_get.xml', sample_name=sample_folder)\n", |
| 42 | + "map_geocode_v2_aad_get_xml = utils.read_policy_xml('map_geocode_v2_aad_get.xml', sample_name=sample_folder)\n", |
43 | 43 | "\n", |
44 | 44 | "# Map API \n", |
45 | 45 | "mapApi_v2_default_get = GET_APIOperation2('get-default-route','Get default route','/default/*','This is the default route that will allow all requests to go through to the backend api',map_default_route_v2_aad_get_xml)\n", |
46 | 46 | "mapApi_v1_async_post = APIOperation('async-geocode-batch','Async Geocode Batch','/geocode/batch/async',HTTP_VERB.POST, 'Post geocode batch async endpoint',map_async_geocode_batch_v1_keyauth_post_xml)\n", |
47 | 47 | "mapApi_v2_geocode_get = GET_APIOperation2('get-geocode','Get Geocode','/geocode','Get geocode endpoint',map_geocode_v2_aad_get_xml)\n", |
48 | | - "api1 = API('map-api', 'Map API', '/map', 'This is the proxy for Azure Maps', operations=[mapApi_v2_default_get, mapApi_v1_async_post,mapApi_v2_geocode_get, mapApi_v2_foo], tags = tags, serviceUrl=azure_maps_url)\n", |
| 48 | + "api1 = API('map-api', 'Map API', '/map', 'This is the proxy for Azure Maps', operations=[mapApi_v2_default_get, mapApi_v1_async_post,mapApi_v2_geocode_get], tags = tags, serviceUrl=azure_maps_url)\n", |
49 | 49 | "\n", |
50 | 50 | "# APIs Array\n", |
51 | 51 | "# apis: List[API] = [api1, apin]\n", |
|
88 | 88 | " raise SystemExit(1)\n", |
89 | 89 | "\n", |
90 | 90 | "# 3) Run the deployment\n", |
91 | | - "output = utils.create_bicep_deployment_group(rg_name, rg_location, deployment, bicep_parameters)\n", |
| 91 | + "output = utils.create_bicep_deployment_group(sample_folder, rg_name, rg_location, bicep_parameters)\n", |
92 | 92 | "\n", |
93 | 93 | "# 4) Print a deployment summary, if successful; otherwise, exit with an error\n", |
94 | 94 | "if not output.success:\n", |
|
0 commit comments