Skip to content
This repository was archived by the owner on Feb 23, 2024. It is now read-only.

Commit f262bad

Browse files
authored
Update README.md (#282)
1 parent da1ae65 commit f262bad

File tree

1 file changed

+49
-10
lines changed

1 file changed

+49
-10
lines changed

src/APIM_ARMTemplate/README.md

Lines changed: 49 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@ az account set --subscription <subscription_id>
294294
```
295295

296296
#### Extractor Arguments
297+
**Please go to "extractorparameters.json" to specify the parameters to pass in.**
297298

298299
| Property | Required | Value |
299300
|-----------------------|-----------------------|---------------------------------------------------|
@@ -309,23 +310,61 @@ az account set --subscription <subscription_id>
309310
| apiVersionSetName | No | Name of the APIVersionSet. If provided, extract all apis within this apiversionset. It will generate seperate folder for each api and also a master folder to link all apis in this apiversionset |
310311

311312
#### Note
312-
* You can not use "--splitAPIs" and "--apiName" at the same time, since using "--apiName" only extract one API
313-
### Extractor Command Example
314-
Executing **a single API extraction with linked templates and policy file** generation, use the following command:
313+
* You can not use "splitAPIs" and "apiName" at the same time, since using "apiName" only extract one API
314+
### Extractor Parameter Example
315+
In **extractorparams.json** file (path: src/APIM_ARMTemplate/extractorparams.json) <br />
316+
Executing **a single API extraction with linked templates and policy file** generation, use the following parameters:
315317
```
316-
dotnet run extract --sourceApimName <name_of_the_source_APIM_instance> --destinationApimName <name_of_the_destination_APIM_instance> --resourceGroup <name_of_resource_group> --fileFolder <path_to_folder> --apiName <api_name> --linkedTemplatesBaseUrl <linked_templates_remote_location> --policyXMLBaseUrl <policies_remote_location>
318+
{
319+
"sourceApimName": "<source-apim-name>",
320+
"destinationApimName": "<destination-apim-name>",
321+
"resourceGroup": "<resource-group>",
322+
"fileFolder": "<destination-file-folder>",
323+
"apiName": "<api_name>",
324+
"linkedTemplatesBaseUrl": "<linked_templates_remote_location>",
325+
"policyXMLBaseUrl": "<policies_remote_location>"
326+
}
317327
```
318-
Extract **all APIs with linked templates linking all apis and policy file**, use the following command:
328+
Extract **all APIs with linked templates linking all apis and policy file**, use the following parameters:
319329
```
320-
dotnet run extract --sourceApimName <name_of_the_source_APIM_instance> --destinationApimName <name_of_the_destination_APIM_instance> --resourceGroup <name_of_resource_group> --fileFolder <path_to_folder> --linkedTemplatesBaseUrl <linked_templates_remote_location> --policyXMLBaseUrl <policies_remote_location>
330+
{
331+
"sourceApimName": "<source-apim-name>",
332+
"destinationApimName": "<destination-apim-name>",
333+
"resourceGroup": "<resource-group>",
334+
"fileFolder": "<destination-file-folder>",
335+
"linkedTemplatesBaseUrl": "<linked_templates_remote_location>",
336+
"policyXMLBaseUrl": "<policies_remote_location>"
337+
}
321338
```
322-
Extract **all APIs with seperated api folders**, use the following command:
339+
Extract **all APIs with seperated api folders**, use the following parameters:
323340
```
324-
dotnet run extract --sourceApimName <name_of_the_source_APIM_instance> --destinationApimName <name_of_the_destination_APIM_instance> --resourceGroup <name_of_resource_group> --fileFolder <path_to_folder> --linkedTemplatesBaseUrl <linked_templates_remote_location> --policyXMLBaseUrl <policies_remote_location> --splitAPIs true
341+
{
342+
"sourceApimName": "<source-apim-name>",
343+
"destinationApimName": "<destination-apim-name>",
344+
"resourceGroup": "<resource-group>",
345+
"fileFolder": "<destination-file-folder>",
346+
"linkedTemplatesBaseUrl": "<linked_templates_remote_location>",
347+
"policyXMLBaseUrl": "<policies_remote_location>",
348+
"splitAPIs": "true"
349+
}
325350
```
326-
Extract **all APIs within an apiversionset**, use the following command:
351+
Extract **all APIs within an apiversionset**, use the following parameters:
327352
```
328-
dotnet run extract --sourceApimName <name_of_the_source_APIM_instance> --destinationApimName <name_of_the_destination_APIM_instance> --resourceGroup <name_of_resource_group> --fileFolder <path_to_folder> --linkedTemplatesBaseUrl <linked_templates_remote_location> --policyXMLBaseUrl <policies_remote_location> --apiVersionSetName "Echo API"
353+
{
354+
"sourceApimName": "<source-apim-name>",
355+
"destinationApimName": "<destination-apim-name>",
356+
"resourceGroup": "<resource-group>",
357+
"fileFolder": "<destination-file-folder>",
358+
"linkedTemplatesBaseUrl": "<linked_templates_remote_location>",
359+
"policyXMLBaseUrl": "<policies_remote_location>",
360+
"apiVersionSetName": "<api-version-set-name>"
361+
}
329362
```
330363

364+
#### Run the extractor
365+
```
366+
dotnet run extract
367+
```
368+
369+
331370
You can also run it directly from the [releases](https://github.com/Azure/azure-api-management-devops-resource-kit/releases).

0 commit comments

Comments
 (0)