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

Import-AzureRmApiManagementApi can't set displayName of an SOAP API #6370

Closed
ToMakeSense opened this issue Jun 4, 2018 · 8 comments
Closed
Assignees
Labels
API Management Service Attention This issue is responsible by Azure service team.

Comments

@ToMakeSense
Copy link

ToMakeSense commented Jun 4, 2018

Import-AzureRmApiManagementApi
      -Context <PsApiManagementContext>
      [-ApiId <String>]
      [-ApiRevision <String>]
      -SpecificationFormat <PsApiManagementApiFormat>
      -SpecificationPath <String>
      [-Path <String>]
      [-WsdlServiceName <String>]
      [-WsdlEndpointName <String>]
      [-ApiType <PsApiManagementApiType>]
      [-DefaultProfile <IAzureContextContainer>]
      [<CommonParameters>]

I am trying to import an SOAP API with Import-AzureRmApiManagementApi, It seems that there's no place to set the name(displayName) of the SOAP API, as a result, the name(displayName) is actually the value of WsdlServiceName

$newAPI = Import-AzureRmApiManagementApi -Context $apimContext -SpecificationFormat Wsdl -SpecificationPath $apiFilePath -Path $api.properties.path -ApiId $api.ApiId -ApiType Soap -WsdlServiceName $api.properties.wsdlServiceName -WsdlEndpointName $api.properties.wsdlEndpointName

Then I try to modify it with Set-AzureRmApiManagementApi, this API have transformed to an Non-SOAP api.

Set-AzureRmApiManagementApi -Context $apimContext -ApiId $newAPI.ApiId -ServiceUrl $newAPI.ServiceUrl -Protocols $newAPI.Protocols -Name $api.properties.displayName
@solankisamir
Copy link
Member

@ToMakeSense have you tried the option with
Set-AzureRmApiManagementApi -InputObject <PsApiManagementApi>

@ToMakeSense
Copy link
Author

ToMakeSense commented Jun 7, 2018

@solankisamir Can you give an example? I'm not that familiar with PowerShell.

@solankisamir
Copy link
Member

@ToMakeSense I realize there is a bug in powershell in that path

Set-AzureRmApiManagementApi
: Missing type map configuration or unsupported mapping.
Mapping types:
PsApiManagementApi -> ApiContract
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApi ->
Microsoft.Azure.Management.ApiManagement.Models.ApiContract
At line:1 char:1

I will need to fix it before you can use it.

@ToMakeSense
Copy link
Author

@solankisamir any updates on this?

@ToMakeSense
Copy link
Author

@solankisamir any progress?

@solankisamir
Copy link
Member

@ToMakeSense fix should be out by end of this month.

@ToMakeSense
Copy link
Author

@solankisamir good news 👍

@solankisamir
Copy link
Member

Fixed in release https://github.com/Azure/azure-powershell/releases/tag/v6.6.0-July2018. You should be able to do something like

Set-AzureRmApiManagementApi -InputObject $api -Name $newName -ServiceUrl $api.ServiceUrl -Protocols $api.Protocols

ServiceUrl and Protocols are required parameters due to legacy reasons. We will need to make a breaking change to fix that.

@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

4 participants