Skip to content

Commit 7d31aea

Browse files
Migrate Marketplace from generation to main (Azure#24127)
* Move Marketplace to main * Update ChangeLog.md --------- Co-authored-by: Yabo Hu <[email protected]>
1 parent 64466a8 commit 7d31aea

File tree

720 files changed

+89089
-11964
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

720 files changed

+89089
-11964
lines changed

src/Marketplace/Marketplace.Autorest/Az.Marketplace.format.ps1xml

Lines changed: 420 additions & 226 deletions
Large diffs are not rendered by default.
Lines changed: 20 additions & 144 deletions
Original file line numberDiff line numberDiff line change
@@ -1,147 +1,23 @@
1-
#
2-
# Module manifest for module 'Az.Marketplace'
3-
#
4-
# Generated by: Microsoft Corporation
5-
#
6-
# Generated on: 1/27/2022
7-
#
8-
91
@{
10-
11-
# Script module or binary module file associated with this manifest.
12-
RootModule = './Az.Marketplace.psm1'
13-
14-
# Version number of this module.
15-
ModuleVersion = '1.1.0'
16-
17-
# Supported PSEditions
18-
CompatiblePSEditions = 'Core', 'Desktop'
19-
20-
# ID used to uniquely identify this module
21-
GUID = '4db1f51a-b835-4783-be47-0b8939492ea5'
22-
23-
# Author of this module
24-
Author = 'Microsoft Corporation'
25-
26-
# Company or vendor of this module
27-
CompanyName = 'Microsoft Corporation'
28-
29-
# Copyright statement for this module
30-
Copyright = 'Microsoft Corporation. All rights reserved.'
31-
32-
# Description of the functionality provided by this module
33-
Description = 'Microsoft Azure PowerShell: Marketplace cmdlets'
34-
35-
# Minimum version of the PowerShell engine required by this module
36-
PowerShellVersion = '5.1'
37-
38-
# Name of the PowerShell host required by this module
39-
# PowerShellHostName = ''
40-
41-
# Minimum version of the PowerShell host required by this module
42-
# PowerShellHostVersion = ''
43-
44-
# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
45-
DotNetFrameworkVersion = '4.7.2'
46-
47-
# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
48-
# ClrVersion = ''
49-
50-
# Processor architecture (None, X86, Amd64) required by this module
51-
# ProcessorArchitecture = ''
52-
53-
# Modules that must be imported into the global environment prior to importing this module
54-
RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.7.4'; })
55-
56-
# Assemblies that must be loaded prior to importing this module
57-
RequiredAssemblies = './bin/Az.Marketplace.private.dll'
58-
59-
# Script files (.ps1) that are run in the caller's environment prior to importing this module.
60-
# ScriptsToProcess = @()
61-
62-
# Type files (.ps1xml) to be loaded when importing this module
63-
# TypesToProcess = @()
64-
65-
# Format files (.ps1xml) to be loaded when importing this module
66-
FormatsToProcess = './Az.Marketplace.format.ps1xml'
67-
68-
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
69-
# NestedModules = @()
70-
71-
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
72-
FunctionsToExport = 'Copy-AzMarketplacePrivateStoreCollectionOffer',
73-
'Get-AzMarketplaceBillingPrivateStoreAccount',
74-
'Get-AzMarketplaceCollectionToSubscriptionMapping',
75-
'Get-AzMarketplacePrivateStoreCollection',
76-
'Get-AzMarketplacePrivateStoreCollectionOffer',
77-
'Get-AzMarketplacePrivateStoreV1',
78-
'Get-AzMarketplaceQueryPrivateStoreOffer',
79-
'New-AzMarketplacePrivateStore',
80-
'New-AzMarketplacePrivateStoreCollection',
81-
'New-AzMarketplacePrivateStoreCollectionOffer',
82-
'Remove-AzMarketplacePrivateStoreCollection',
83-
'Remove-AzMarketplacePrivateStoreCollectionOffer',
84-
'Set-AzMarketplaceBulkPrivateStoreCollectionAction',
85-
'Set-AzMarketplacePrivateStore',
86-
'Set-AzMarketplacePrivateStoreCollection',
87-
'Set-AzMarketplacePrivateStoreCollectionOffer'
88-
89-
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
90-
CmdletsToExport = @()
91-
92-
# Variables to export from this module
93-
# VariablesToExport = @()
94-
95-
# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
96-
AliasesToExport = '*'
97-
98-
# DSC resources to export from this module
99-
# DscResourcesToExport = @()
100-
101-
# List of all modules packaged with this module
102-
# ModuleList = @()
103-
104-
# List of all files packaged with this module
105-
# FileList = @()
106-
107-
# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
108-
PrivateData = @{
109-
2+
GUID = '4db1f51a-b835-4783-be47-0b8939492ea5'
3+
RootModule = './Az.Marketplace.psm1'
4+
ModuleVersion = '1.1.0'
5+
CompatiblePSEditions = 'Core', 'Desktop'
6+
Author = 'Microsoft Corporation'
7+
CompanyName = 'Microsoft Corporation'
8+
Copyright = 'Microsoft Corporation. All rights reserved.'
9+
Description = 'Microsoft Azure PowerShell: Marketplace cmdlets'
10+
PowerShellVersion = '5.1'
11+
DotNetFrameworkVersion = '4.7.2'
12+
RequiredAssemblies = './bin/Az.Marketplace.private.dll'
13+
FormatsToProcess = './Az.Marketplace.format.ps1xml'
14+
FunctionsToExport = 'Copy-AzMarketplacePrivateStoreCollectionOffer', 'Disable-AzMarketplacePrivateStoreCollectionAllItem', 'Enable-AzMarketplacePrivateStoreCollectionAllItem', 'Get-AzMarketplaceBillingPrivateStoreAccount', 'Get-AzMarketplaceCollectionToSubscriptionMapping', 'Get-AzMarketplacePrivateStoreAllSubscriptionInTenant', 'Get-AzMarketplacePrivateStoreCollection', 'Get-AzMarketplacePrivateStoreCollectionMapOffersToContext', 'Get-AzMarketplacePrivateStoreCollectionOffer', 'Get-AzMarketplacePrivateStoreCollectionRule', 'Get-AzMarketplacePrivateStoreNewPlanNotification', 'Get-AzMarketplacePrivateStoreSubscription', 'Get-AzMarketplacePrivateStoreUserOffer', 'Get-AzMarketplacePrivateStoreUserRule', 'Get-AzMarketplacePrivateStoreV1', 'Get-AzMarketplaceQueryPrivateStoreOffer', 'New-AzMarketplacePrivateStore', 'New-AzMarketplacePrivateStoreCollection', 'New-AzMarketplacePrivateStoreCollectionOffer', 'New-AzMarketplacePrivateStoreCollectionOfferMultiContext', 'Remove-AzMarketplacePrivateStoreCollection', 'Remove-AzMarketplacePrivateStoreCollectionOffer', 'Set-AzMarketplaceBulkPrivateStoreCollectionAction', 'Set-AzMarketplacePrivateStore', 'Set-AzMarketplacePrivateStoreCollection', 'Set-AzMarketplacePrivateStoreCollectionOffer', 'Test-AzMarketplacePrivateStoreAnyExistingOffer', 'Update-AzMarketplacePrivateStoreCollection', 'Update-AzMarketplacePrivateStoreCollectionOffer'
15+
PrivateData = @{
11016
PSData = @{
111-
112-
# Tags applied to this module. These help with module discovery in online galleries.
113-
Tags = 'Azure','ResourceManager','ARM','PSModule','Marketplace'
114-
115-
# A URL to the license for this module.
116-
LicenseUri = 'https://aka.ms/azps-license'
117-
118-
# A URL to the main website for this project.
119-
ProjectUri = 'https://github.com/Azure/azure-powershell'
120-
121-
# A URL to an icon representing this module.
122-
# IconUri = ''
123-
124-
# ReleaseNotes of this module
125-
# ReleaseNotes = ''
126-
127-
# Prerelease string of this module
128-
# Prerelease = ''
129-
130-
# Flag to indicate whether the module requires explicit user acceptance for install/update/save
131-
# RequireLicenseAcceptance = $false
132-
133-
# External dependent modules of this module
134-
# ExternalModuleDependencies = @()
135-
136-
} # End of PSData hashtable
137-
138-
} # End of PrivateData hashtable
139-
140-
# HelpInfo URI of this module
141-
# HelpInfoURI = ''
142-
143-
# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
144-
# DefaultCommandPrefix = ''
145-
17+
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'Marketplace'
18+
LicenseUri = 'https://aka.ms/azps-license'
19+
ProjectUri = 'https://github.com/Azure/azure-powershell'
20+
ReleaseNotes = ''
21+
}
22+
}
14623
}
147-

src/Marketplace/Marketplace.Autorest/Az.Marketplace.psm1

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@
2525
}
2626
}
2727
if(-not $accountsModule) {
28-
$hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'2.2.3' } | Measure-Object).Count -gt 0
28+
$hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'2.7.5' } | Measure-Object).Count -gt 0
2929
if($hasAdequateVersion) {
30-
$accountsModule = Import-Module -Name $accountsName -MinimumVersion 2.2.3 -Scope Global -PassThru
30+
$accountsModule = Import-Module -Name $accountsName -MinimumVersion 2.7.5 -Scope Global -PassThru
3131
}
3232
}
3333
}
3434

3535
if(-not $accountsModule) {
36-
Write-Error "`nThis module requires $accountsName version 2.2.3 or greater. For installation instructions, please see: https://learn.microsoft.com/powershell/azure/install-az-ps" -ErrorAction Stop
37-
} elseif (($accountsModule.Version -lt [System.Version]'2.2.3') -and (-not $localAccounts)) {
38-
Write-Error "`nThis module requires $accountsName version 2.2.3 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to add the switch '-RegenerateSupportModule' when executing 'test-module.ps1'. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop
36+
Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. For installation instructions, please see: https://learn.microsoft.com/powershell/azure/install-az-ps" -ErrorAction Stop
37+
} elseif (($accountsModule.Version -lt [System.Version]'2.7.5') -and (-not $localAccounts)) {
38+
Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to add the switch '-RegenerateSupportModule' when executing 'test-module.ps1'. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop
3939
}
4040
Write-Information "Loaded Module '$($accountsModule.Name)'"
4141

@@ -50,6 +50,10 @@
5050

5151
# Tweaks the pipeline on module load
5252
$instance.OnModuleLoad = $VTable.OnModuleLoad
53+
54+
# Following two delegates are added for telemetry
55+
$instance.GetTelemetryId = $VTable.GetTelemetryId
56+
$instance.Telemetry = $VTable.Telemetry
5357

5458

5559
# Tweaks the pipeline per call

src/Marketplace/Marketplace.Autorest/README.md

Lines changed: 140 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ This directory contains the PowerShell module for the Marketplace service.
1717
This module was primarily generated via [AutoRest](https://github.com/Azure/autorest) using the [PowerShell](https://github.com/Azure/autorest.powershell) extension.
1818

1919
## Module Requirements
20-
- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 2.2.3 or greater
20+
- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 2.7.5 or greater
2121

2222
## Authentication
2323
AutoRest does not generate authentication code for the module. Authentication is handled via Az.Accounts by altering the HTTP payload before it is sent.
@@ -38,16 +38,18 @@ In this directory, run AutoRest:
3838
require:
3939
- $(this-folder)/../../readme.azure.noprofile.md
4040
# lock the commit
41-
branch: 8dc5f1df21caf602944de05e68945c2bbf009c2d
41+
commit: a54263176acce91199a19333d6c4717367a3317e
4242
input-file:
43-
- $(repo)/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2021-06-01/Marketplace.json
43+
- $(repo)/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2023-01-01/Marketplace.json
4444

4545
module-version: 1.1.0
4646
title: Marketplace
4747
subject-prefix: $(service-name)
48-
4948
inlining-threshold: 50
5049

50+
use-extension:
51+
"@autorest/powershell": "4.x"
52+
5153
directive:
5254
# Remove the unexpanded parameter set
5355
- where:
@@ -101,11 +103,11 @@ directive:
101103
remove: true
102104
- where:
103105
verb: Invoke
104-
subject: PrivateStoreCollection
106+
subject: ^PrivateStoreCollection$
105107
remove: true
106108
- where:
107109
verb: Invoke
108-
subject: PrivateStoreCollectionOffer
110+
subject: ^PrivateStoreCollectionOffer$
109111
remove: true
110112
- where:
111113
verb: Get
@@ -157,7 +159,137 @@ directive:
157159
verb: Get
158160
subject: PrivateStore
159161
set:
160-
subject: PrivateStoreV1
162+
subject: PrivateStoreV1
163+
164+
# Rename POST methods
165+
# /providers/Microsoft.Marketplace/privateStores/{privateStoreId}/anyExistingOffersInTheCollections
166+
- where:
167+
verb: Invoke
168+
subject: AnyPrivateStoreExistingOffer
169+
set:
170+
verb: Test
171+
subject: PrivateStoreAnyExistingOffer
172+
- where:
173+
verb: Get
174+
subject: PrivateStoreUserOffer
175+
variant: Query(?!.*?Expanded)
176+
remove: true
177+
178+
# /providers/Microsoft.Marketplace/privateStores/{privateStoreId}/queryUserOffers
179+
- where:
180+
verb: Invoke
181+
subject: QueryPrivateStoreUserOffer
182+
set:
183+
verb: Get
184+
subject: PrivateStoreUserOffer
185+
- where:
186+
verb: Get
187+
subject: PrivateStoreUserOffer
188+
variant: Query(?!.*?Expanded)
189+
remove: true
190+
191+
# /providers/Microsoft.Marketplace/privateStores/{privateStoreId}/queryUserRules
192+
- where:
193+
verb: Invoke
194+
subject: QueryUserRule
195+
set:
196+
verb: Get
197+
subject: PrivateStoreUserRule
198+
- where:
199+
verb: Get
200+
subject: PrivateStoreUserRule
201+
variant: Query(?!.*?Expanded)
202+
remove: true
203+
204+
# /providers/Microsoft.Marketplace/privateStores/{privateStoreId}/collections/{collectionId}/approveAllItems
205+
- where:
206+
verb: Approve
207+
subject: PrivateStoreCollectionItem
208+
set:
209+
verb: Enable
210+
subject: PrivateStoreCollectionAllItem
211+
# /providers/Microsoft.Marketplace/privateStores/{privateStoreId}/collections/{collectionId}/disableApproveAllItems"
212+
- where:
213+
verb: Disable
214+
subject: PrivateStoreCollectionApproveItem
215+
set:
216+
subject: PrivateStoreCollectionAllItem
217+
218+
# /providers/Microsoft.Marketplace/privateStores/{privateStoreId}/collections/{collectionId}/mapOffersToContexts
219+
- where:
220+
verb: Get
221+
subject: PrivateStoreCollectionOffer
222+
variant: ^List\S+
223+
set:
224+
subject: PrivateStoreCollectionMapOffersToContext
225+
- where:
226+
verb: Get
227+
subject: PrivateStoreCollectionMapOffersToContext
228+
variant: List(?!.*?Expanded)
229+
remove: true
161230

162-
231+
# /providers/Microsoft.Marketplace/privateStores/{privateStoreId}/collections/{collectionId}/setRules
232+
# swagger does not match request
233+
# - where:
234+
# verb: Set
235+
# subject: CollectionRule
236+
# set:
237+
# verb: New
238+
# subject: PrivateStoreCollectionRule
239+
# - where:
240+
# verb: New
241+
# subject: PrivateStoreCollectionRule
242+
# variant: Set(?!.*?Expanded)
243+
# remove: true
244+
- where:
245+
verb: Set
246+
subject: CollectionRule
247+
remove: true
248+
249+
# /providers/Microsoft.Marketplace/privateStores/{privateStoreId}/collections/{collectionId}/queryRules
250+
- where:
251+
verb: Invoke
252+
subject: QueryRule
253+
set:
254+
verb: Get
255+
subject: PrivateStoreCollectionRule
256+
257+
# /providers/Microsoft.Marketplace/privateStores/{privateStoreId}/collections/{collectionId}/offers/{offerId}/upsertOfferWithMultiContext
258+
- where:
259+
verb: Invoke
260+
subject: OfferPrivateStoreCollectionOfferUpsert
261+
set:
262+
verb: New
263+
subject: PrivateStoreCollectionOfferMultiContext
264+
- where:
265+
verb: New
266+
subject: PrivateStoreCollectionOfferMultiContext
267+
variant: Offer(?!.*?Expanded)
268+
remove: true
269+
270+
# /providers/Microsoft.Marketplace/privateStores/{privateStoreId}/fetchAllSubscriptionsInTenant
271+
- where:
272+
verb: Invoke
273+
subject: FetchPrivateStoreSubscription
274+
set:
275+
verb: Get
276+
subject: PrivateStoreAllSubscriptionInTenant
277+
278+
# /providers/Microsoft.Marketplace/privateStores/{privateStoreId}/listStopSellOffersPlansNotifications
279+
# - where:
280+
# verb: Get
281+
# subject: PrivateStoreStopSellOfferPlanNotification
282+
# variant: List(?!.*?Expanded)
283+
# remove: true
284+
- where:
285+
verb: Get
286+
subject: PrivateStoreStopSellOfferPlanNotification
287+
remove: true
288+
289+
# /providers/Microsoft.Marketplace/privateStores/{privateStoreId}/listSubscriptionsContext
290+
- where:
291+
verb: Get
292+
subject: PrivateStoreSubscriptionContext
293+
set:
294+
subject: PrivateStoreSubscription
163295
```

src/Marketplace/Marketplace.Autorest/UX/Microsoft.Marketplace/privateStores-collections-offers.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"resourceType": "privateStores/collections/offers",
3-
"apiVersion": "2021-06-01",
3+
"apiVersion": "2023-01-01",
44
"learnMore": {
55
"url": "https://learn.microsoft.com/powershell/module/az.marketplace"
66
},

0 commit comments

Comments
 (0)