Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get-AzureRmApiManagementApi doesn't work as expected #6814

Closed
chernib opened this issue Jul 30, 2018 · 4 comments
Closed

Get-AzureRmApiManagementApi doesn't work as expected #6814

chernib opened this issue Jul 30, 2018 · 4 comments
Assignees
Labels
API Management Service Attention This issue is responsible by Azure service team.

Comments

@chernib
Copy link

chernib commented Jul 30, 2018

Description

Hello,

We have upgraded Azure RM PowerShell version to 6.5.0 on one of deploy machines and now I'm facing unexpected behavior with cmdlet above.
I'm specifying API name that I'd like to get a description for:
$apiDesc = Get-AzureRmApiManagementApi -Context $apiMgmtContext -Name 'Spotlight-Entitlement-Service' -ErrorAction SilentlyContinue
where
$apiMgmtContext = New-AzureRmApiManagementContext -ResourceGroupName 'RG-SPOT-APIM-DEV-EUS1' -ServiceName 'apim-spot-dev-eus1'
And I get an array of size 2:

  1. Details API named 'Spotlight-Entitlement-Service' - as expected
  2. Details API named 'Entitlement-Service' - that's why?
    First, those two services are different. Second, I've explicitly set an API name in Get-AzureRmApiManagementApi cmdlet.
    So why it responses with details of both services?

P.S. With Azure RM PowerShell version 5 this doesn't happen.

Script/Steps for Reproduction

See above.

Module Version

Get-Module -Name AzureRM -ListAvailable
ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Script     6.5.0      AzureRM

Environment Data

$PSVersionTable
Name                           Value
----                           -----
PSVersion                      5.1.16299.492
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.16299.492
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Debug Output


@solankisamir solankisamir self-assigned this Jul 30, 2018
@solankisamir
Copy link
Member

Yes, during a recent change we changed the ODATA filter from eq to contains, which is causing this behavior change. Change here.
Need to understand why Contains of full name returns results which don't match the full pattern.

@solankisamir
Copy link
Member

The order of parameter in Contains was incorrect. Will need to fix that. Expect the fix out in a month.

@chernib
Copy link
Author

chernib commented Jul 31, 2018

Thanks. Would you please update here once this deployed?

@panchagnula panchagnula added App Services aka WebSites and removed App Services aka WebSites labels Aug 7, 2018
solankisamir added a commit to solankisamir/azure-powershell that referenced this issue Aug 8, 2018
solankisamir added a commit to solankisamir/azure-powershell that referenced this issue Aug 21, 2018
solankisamir added a commit to solankisamir/azure-powershell that referenced this issue Aug 23, 2018
@bsiegel bsiegel added the Service Attention This issue is responsible by Azure service team. label Sep 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Management Service Attention This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

5 participants