Azure / Azure/azure-powershell

Get-AzMarketplaceTerms should use agreements endpoint

Open
#13,820 4 comments 0 reactions 0 assignees View on GitHub
act-codegen-extensibility-squad feature-request Marketplace Ordering Service Attention
Dominant language
C#
Stars
4.8k
Forks
4.3k
Avg merge
3d 14h
Merged PRs (30d)
54

Description

## Description

Get-AzMarketplaceTerms

Get-AzMarketplaceTerms is using the wrong REST API.

- It [is using ](https://docs.microsoft.com/en-us/rest/api/marketplaceordering/marketplaceagreements/get) Microsoft.MarketplaceOrdering/offerTypes/virtualmachine/publishers
- but [should be using ](https://docs.microsoft.com/en-us/rest/api/marketplaceordering/marketplaceagreements/getagreement) Microsoft.MarketplaceOrdering/agreements

A related az cli issue I just opened is https://github.com/Azure/azure-cli/issues/16343.

## Steps to reproduce

```powershell
Get-AzMarketplaceTerms -Publisher artista-networks -Product veos-router -Name eso-4_22_1fx -Debug
```

## Environment data

```
$PSVersionTable

Name Value
---- -----
PSVersion 7.1.0
PSEdition Core
GitCommitId 7.1.0
OS Microsoft Windows 10.0.19042
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
```

## Module versions
It is the latest version, Az.MarketplaceOrdering 1.0.2.
https://www.powershellgallery.com/packages/Az.MarketplaceOrdering/1.0.2

```powershell
get-module -Name Az.MarketplaceOrdering | fl

Name : Az.MarketplaceOrdering
Path : C:\Users\cataggar\Documents\PowerShell\Modules\Az.MarketplaceOrdering\1.0.2\Az.MarketplaceOrdering.psm1
Description : Microsoft Azure PowerShell - Marketplace Ordering agreements service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.

For more information on Marketplace Ordering, please visit the following: https://docs.microsoft.com/azure/marketplace/
ModuleType : Script
Version : 1.0.2
PreRelease :
NestedModules : {Microsoft.Azure.PowerShell.Cmdlets.MarketplaceOrdering}
ExportedFunctions :
ExportedCmdlets : {Get-AzMarketplaceTerms, Set-AzMarketplaceTerms}
ExportedVariables :
ExportedAliases :
```

## Debug output

```

```

## Error output

```

```

Contributor guide

Open the contributing guide

Research direction

Start at the Get-AzMarketplaceTerms cmdlet in Az.MarketplaceOrdering and compare its request with the linked MarketplaceOrdering API documentation. Reproduce the issue with the provided PowerShell command, then verify that the cmdlet uses Microsoft.MarketplaceOrdering/agreements instead of the offerTypes endpoint. Done means the cmdlet retrieves the expected marketplace agreement.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp, powershell
Domain
api, cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.