1

I'm looking for a way to obtain which OMS workspace my APIM Services resource is logging to using PowerShell. I want to then configure my Application Gateway to log to the same workspace.

When I go to "Logs" under the APIM service, it shows all available workspaces in my subscription.

I'm not sure how to get just the workspace that it is logging to.

Kathrine Stack
  • 189
  • 1
  • 2
  • 14
  • What have you tried so far? – boxdog Jan 15 '19 at 16:45
  • Well, I've been looking for ways to get the workspace as a property of the resource. So $apim = (Get-AzureRmApiManagement)[0] | gm doesn't display a workspace as a property, so I'm not sure how else to get it. – Kathrine Stack Jan 15 '19 at 17:10

1 Answers1

0

This is not really a PowerShell Code errors / functionality issue, but how do I find and match up my AzureRM resources and extract information.

However, since you are here...

If the property is not there, then you are not looking at the correct resource cmdlet / object. I don't have this type of scenario deployed in my sub, so no way to dig at it. Take a look at this

Workspaces - Get

URI Parameters Name In Required Type Description subscriptionId path True string Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. resourceGroupName path True string The resource group name of the workspace. workspaceName path True string Name of the Log Analytics Workspace. api-version query True string Client Api Version.

And use the provided properties to cross reference, specifically the resourceGroupName and or workspaceName.

postanote
  • 15,138
  • 2
  • 14
  • 25
  • My issue is that I don't know the name or the rgn. I'm trying to find with workspace my apim service is logging to. All I know if the apim service information. – Kathrine Stack Jan 16 '19 at 19:35