Skip to content

Commit

Permalink
updating required praams
Browse files Browse the repository at this point in the history
  • Loading branch information
Tony Box committed Jun 22, 2024
1 parent f849198 commit 7c3821f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
4 changes: 2 additions & 2 deletions avm/res/api-management/service/api/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ param format string = 'openapi'
@description('Optional. Indicates if API revision is current API revision.')
param isCurrent bool = true

@description('Optional. The name of the API management service logger.')
@description('Conditional. The name of the API management service logger. Required if using api/diagnostics.')
param loggerName string = ''

@description('Required. Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API.')
Expand Down Expand Up @@ -152,7 +152,7 @@ module diagnostic 'diagnostics/main.bicep' = [
for (diagnostic, index) in diagnostics ?? []: {
name: '${deployment().name}-diagnostics-${index}'
params: {
name: diagnostic.?diagnosticName ?? 'local'
name: diagnostic.?name
apiManagementServiceName: apiManagementServiceName
apiName: api.name
loggerName: loggerName
Expand Down
24 changes: 11 additions & 13 deletions avm/res/api-management/service/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -382,19 +382,17 @@ module service_apiDiagnostics 'api/diagnostics/main.bicep' = [
params: {
apiManagementServiceName: service.name
apiName: apidiagnostic.apiName
loggerName: apidiagnostic.loggerName
name: contains(apidiagnostic, 'diagnosticName') ? apidiagnostic.diagnosticName : 'local'
alwaysLog: contains(apidiagnostic, 'alwaysLog') ? apidiagnostic.alwaysLog : 'allErrors'
backend: contains(apidiagnostic, 'backend') ? apidiagnostic.backend : {}
frontend: contains(apidiagnostic, 'frontend') ? apidiagnostic.frontend : {}
httpCorrelationProtocol: contains(apidiagnostic, 'httpCorrelationProtocol')
? apidiagnostic.httpCorrelationProtocol
: 'Legacy'
logClientIp: contains(apidiagnostic, 'logClientIp') ? apidiagnostic.logClientIp : false
metrics: contains(apidiagnostic, 'metrics') ? apidiagnostic.metrics : false
operationNameFormat: contains(apidiagnostic, 'operationNameFormat') ? apidiagnostic.operationNameFormat : 'Name'
samplingPercentage: contains(apidiagnostic, 'samplingPercentage') ? apidiagnostic.samplingPercentage : 100
verbosity: contains(apidiagnostic, 'verbosity') ? apidiagnostic.verbosity : 'error'
loggerName: apidiagnostic.?loggerName
name: apidiagnostic.?name
alwaysLog: apidiagnostic.?alwaysLog
backend: apidiagnostic.?backend
frontend: apidiagnostic.?frontend
httpCorrelationProtocol: apidiagnostic.?httpCorrelationProtocol
logClientIp: apidiagnostic.?logClientIp
metrics: apidiagnostic.?metrics
operationNameFormat: apidiagnostic.?operationNameFormat
samplingPercentage: apidiagnostic.?samplingPercentage
verbosity: apidiagnostic.?verbosity
}
dependsOn: [
service_apis
Expand Down

0 comments on commit 7c3821f

Please sign in to comment.