This repository was archived by the owner on Feb 23, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed
src/APIM_ARMTemplate/apimtemplate Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ public ExtractCommand()
39
39
bool hasSingleApi = singleApiName != null ;
40
40
bool includeRevisions = extractorConfig . includeAllRevisions != null && extractorConfig . includeAllRevisions . Equals ( "true" ) ;
41
41
bool hasMultipleAPIs = extractorConfig . mutipleAPIs != null ;
42
+ EntityExtractor . baseUrl = ( extractorConfig . serviceBaseUrl == null ) ? EntityExtractor . baseUrl : extractorConfig . serviceBaseUrl ;
42
43
43
44
// start running extractor
44
45
Console . WriteLine ( "API Management Template" ) ;
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ namespace Microsoft.Azure.Management.ApiManagement.ArmTemplates.Extract
10
10
{
11
11
public class EntityExtractor
12
12
{
13
- public string baseUrl = "https://management.azure.com" ;
13
+ public static string baseUrl = "https://management.azure.com" ;
14
14
internal Authentication auth = new Authentication ( ) ;
15
15
private static readonly IMemoryCache _cache = new MemoryCache ( new MemoryCacheOptions ( ) ) ;
16
16
Original file line number Diff line number Diff line change @@ -44,6 +44,8 @@ public class ExtractorConfig
44
44
public string paramApiLoggerId { get ; set ; }
45
45
[ Description ( "Specify the resourceId for this logger" ) ]
46
46
public string paramLogResourceId { get ; set ; }
47
+ [ Description ( "Specify the the base url for calling api management" ) ]
48
+ public string serviceBaseUrl { get ; set ; }
47
49
public void Validate ( )
48
50
{
49
51
if ( string . IsNullOrEmpty ( sourceApimName ) ) throw new ArgumentException ( "Missing parameter <sourceApimName>." ) ;
@@ -132,7 +134,8 @@ public class serviceUrlProperty
132
134
{
133
135
public string apiName { get ; private set ; }
134
136
public string serviceUrl { get ; private set ; }
135
- public serviceUrlProperty ( string apiName , string serviceUrl ) {
137
+ public serviceUrlProperty ( string apiName , string serviceUrl )
138
+ {
136
139
this . apiName = apiName ;
137
140
this . serviceUrl = serviceUrl ;
138
141
}
You can’t perform that action at this time.
0 commit comments