@gradientedge/cdk-utils 9.62.0 → 9.63.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -216,17 +216,33 @@ class AzureApiManagementManager {
|
|
|
216
216
|
(0, utils_1.createAzureTfOutput)(`${id}-${operation.displayName}-${operation.method}-apimOperationOperationId`, scope, apimOperation.operationId);
|
|
217
217
|
(0, utils_1.createAzureTfOutput)(`${id}-${operation.displayName}-${operation.method}-apimOperationFriendlyUniqueId`, scope, apimOperation.friendlyUniqueId);
|
|
218
218
|
(0, utils_1.createAzureTfOutput)(`${id}-${operation.displayName}-${operation.method}-apimOperationId`, scope, apimOperation.id);
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
219
|
+
const policyXmlContent = `<policies>
|
|
220
|
+
<inbound>
|
|
221
|
+
<base />
|
|
222
|
+
${operation.cacheInboundPolicy ?? ''}
|
|
223
|
+
${props.commonInboundPolicyXml ?? ''}
|
|
224
|
+
</inbound>
|
|
225
|
+
<backend>
|
|
226
|
+
<base />
|
|
227
|
+
</backend>
|
|
228
|
+
<outbound>
|
|
229
|
+
<base />
|
|
230
|
+
${operation.cacheOutboundPolicy ?? ''}
|
|
231
|
+
${props.commonOutboundPolicyXml ?? ''}
|
|
232
|
+
</outbound>
|
|
233
|
+
<on-error>
|
|
234
|
+
<base />
|
|
235
|
+
</on-error>
|
|
236
|
+
</policies>`;
|
|
237
|
+
const apimOperationPolicy = new api_management_api_operation_policy_1.ApiManagementApiOperationPolicy(scope, `${id}-apim-api-operation-policy-${operation.displayName}-${operation.method}`, {
|
|
238
|
+
apiManagementName: apiManagementApi.apiManagementName,
|
|
239
|
+
resourceGroupName: apiManagementApi.resourceGroupName,
|
|
240
|
+
apiName: apiManagementApi.name,
|
|
241
|
+
operationId: apimOperation.operationId,
|
|
242
|
+
xmlContent: policyXmlContent,
|
|
243
|
+
});
|
|
244
|
+
(0, utils_1.createAzureTfOutput)(`${id}-${operation.displayName}-${operation.method}-apimOperationPolicyFriendlyUniqueId`, scope, apimOperationPolicy.friendlyUniqueId);
|
|
245
|
+
(0, utils_1.createAzureTfOutput)(`${id}-${operation.displayName}-${operation.method}-apimOperationPolicyId`, scope, apimOperationPolicy.id);
|
|
230
246
|
});
|
|
231
247
|
return apiManagementApi;
|
|
232
248
|
}
|
|
@@ -3,7 +3,6 @@ import { ApiManagementBackendConfig } from '@cdktf/provider-azurerm/lib/api-mana
|
|
|
3
3
|
import { ApiManagementCustomDomainConfig } from '@cdktf/provider-azurerm/lib/api-management-custom-domain';
|
|
4
4
|
import { ApiManagementApiConfig } from '@cdktf/provider-azurerm/lib/api-management-api';
|
|
5
5
|
import { ApiManagementApiOperationConfig } from '@cdktf/provider-azurerm/lib/api-management-api-operation';
|
|
6
|
-
import { ApiManagementApiOperationPolicyConfig } from '@cdktf/provider-azurerm/lib/api-management-api-operation-policy';
|
|
7
6
|
export interface ApiManagementProps extends ApiManagementConfig {
|
|
8
7
|
}
|
|
9
8
|
export interface ApiManagementBackendProps extends ApiManagementBackendConfig {
|
|
@@ -12,9 +11,14 @@ export interface ApiManagementBackendProps extends ApiManagementBackendConfig {
|
|
|
12
11
|
export interface ApiManagementCustomDomainProps extends ApiManagementCustomDomainConfig {
|
|
13
12
|
}
|
|
14
13
|
export interface ApiManagementApiProps extends ApiManagementApiConfig {
|
|
15
|
-
operations:
|
|
16
|
-
|
|
14
|
+
operations: ApiManagementApiOperationProps[];
|
|
15
|
+
commonInboundPolicyXml: string;
|
|
16
|
+
commonOutboundPolicyXml: string;
|
|
17
17
|
}
|
|
18
18
|
export interface ApiManagementV2Props extends ApiManagementConfig {
|
|
19
19
|
body: any;
|
|
20
20
|
}
|
|
21
|
+
export interface ApiManagementApiOperationProps extends ApiManagementApiOperationConfig {
|
|
22
|
+
cacheInboundPolicy: string;
|
|
23
|
+
cacheOutboundPolicy: string;
|
|
24
|
+
}
|
package/package.json
CHANGED
|
@@ -272,30 +272,47 @@ export class AzureApiManagementManager {
|
|
|
272
272
|
)
|
|
273
273
|
createAzureTfOutput(`${id}-${operation.displayName}-${operation.method}-apimOperationId`, scope, apimOperation.id)
|
|
274
274
|
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
{
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
275
|
+
const policyXmlContent = `<policies>
|
|
276
|
+
<inbound>
|
|
277
|
+
<base />
|
|
278
|
+
${operation.cacheInboundPolicy ?? ''}
|
|
279
|
+
${props.commonInboundPolicyXml ?? ''}
|
|
280
|
+
</inbound>
|
|
281
|
+
<backend>
|
|
282
|
+
<base />
|
|
283
|
+
</backend>
|
|
284
|
+
<outbound>
|
|
285
|
+
<base />
|
|
286
|
+
${operation.cacheOutboundPolicy ?? ''}
|
|
287
|
+
${props.commonOutboundPolicyXml ?? ''}
|
|
288
|
+
</outbound>
|
|
289
|
+
<on-error>
|
|
290
|
+
<base />
|
|
291
|
+
</on-error>
|
|
292
|
+
</policies>`
|
|
293
|
+
|
|
294
|
+
const apimOperationPolicy = new ApiManagementApiOperationPolicy(
|
|
295
|
+
scope,
|
|
296
|
+
`${id}-apim-api-operation-policy-${operation.displayName}-${operation.method}`,
|
|
297
|
+
{
|
|
298
|
+
apiManagementName: apiManagementApi.apiManagementName,
|
|
299
|
+
resourceGroupName: apiManagementApi.resourceGroupName,
|
|
300
|
+
apiName: apiManagementApi.name,
|
|
301
|
+
operationId: apimOperation.operationId,
|
|
302
|
+
xmlContent: policyXmlContent,
|
|
303
|
+
}
|
|
304
|
+
)
|
|
305
|
+
|
|
306
|
+
createAzureTfOutput(
|
|
307
|
+
`${id}-${operation.displayName}-${operation.method}-apimOperationPolicyFriendlyUniqueId`,
|
|
308
|
+
scope,
|
|
309
|
+
apimOperationPolicy.friendlyUniqueId
|
|
310
|
+
)
|
|
311
|
+
createAzureTfOutput(
|
|
312
|
+
`${id}-${operation.displayName}-${operation.method}-apimOperationPolicyId`,
|
|
313
|
+
scope,
|
|
314
|
+
apimOperationPolicy.id
|
|
315
|
+
)
|
|
299
316
|
})
|
|
300
317
|
|
|
301
318
|
return apiManagementApi
|
|
@@ -3,7 +3,6 @@ import { ApiManagementBackendConfig } from '@cdktf/provider-azurerm/lib/api-mana
|
|
|
3
3
|
import { ApiManagementCustomDomainConfig } from '@cdktf/provider-azurerm/lib/api-management-custom-domain'
|
|
4
4
|
import { ApiManagementApiConfig } from '@cdktf/provider-azurerm/lib/api-management-api'
|
|
5
5
|
import { ApiManagementApiOperationConfig } from '@cdktf/provider-azurerm/lib/api-management-api-operation'
|
|
6
|
-
import { ApiManagementApiOperationPolicyConfig } from '@cdktf/provider-azurerm/lib/api-management-api-operation-policy'
|
|
7
6
|
|
|
8
7
|
export interface ApiManagementProps extends ApiManagementConfig {}
|
|
9
8
|
|
|
@@ -14,10 +13,16 @@ export interface ApiManagementBackendProps extends ApiManagementBackendConfig {
|
|
|
14
13
|
export interface ApiManagementCustomDomainProps extends ApiManagementCustomDomainConfig {}
|
|
15
14
|
|
|
16
15
|
export interface ApiManagementApiProps extends ApiManagementApiConfig {
|
|
17
|
-
operations:
|
|
18
|
-
|
|
16
|
+
operations: ApiManagementApiOperationProps[]
|
|
17
|
+
commonInboundPolicyXml: string
|
|
18
|
+
commonOutboundPolicyXml: string
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
export interface ApiManagementV2Props extends ApiManagementConfig {
|
|
22
22
|
body: any
|
|
23
23
|
}
|
|
24
|
+
|
|
25
|
+
export interface ApiManagementApiOperationProps extends ApiManagementApiOperationConfig {
|
|
26
|
+
cacheInboundPolicy: string
|
|
27
|
+
cacheOutboundPolicy: string
|
|
28
|
+
}
|