diff --git a/src/Marketplace/Marketplace.Autorest/Az.Marketplace.psd1 b/src/Marketplace/Marketplace.Autorest/Az.Marketplace.psd1 index dd89fb465a07..c88dd882fc49 100644 --- a/src/Marketplace/Marketplace.Autorest/Az.Marketplace.psd1 +++ b/src/Marketplace/Marketplace.Autorest/Az.Marketplace.psd1 @@ -11,8 +11,7 @@ DotNetFrameworkVersion = '4.7.2' RequiredAssemblies = './bin/Az.Marketplace.private.dll' FormatsToProcess = './Az.Marketplace.format.ps1xml' - FunctionsToExport = 'Copy-AzMarketplacePrivateStoreCollectionOffer', 'Get-AzMarketplaceBillingPrivateStoreAccount', 'Get-AzMarketplaceCollectionToSubscriptionMapping', 'Get-AzMarketplacePrivateStoreCollection', 'Get-AzMarketplacePrivateStoreCollectionOffer', 'Get-AzMarketplacePrivateStoreV1', 'Get-AzMarketplaceQueryPrivateStoreOffer', 'New-AzMarketplacePrivateStore', 'New-AzMarketplacePrivateStoreCollection', 'New-AzMarketplacePrivateStoreCollectionOffer', 'Remove-AzMarketplacePrivateStoreCollection', 'Remove-AzMarketplacePrivateStoreCollectionOffer', 'Set-AzMarketplaceBulkPrivateStoreCollectionAction', 'Set-AzMarketplacePrivateStore', 'Set-AzMarketplacePrivateStoreCollection', 'Set-AzMarketplacePrivateStoreCollectionOffer', '*' - AliasesToExport = '*' + FunctionsToExport = 'Copy-AzMarketplacePrivateStoreCollectionOffer', 'Disable-AzMarketplacePrivateStoreCollectionAllItem', 'Enable-AzMarketplacePrivateStoreCollectionAllItem', 'Get-AzMarketplaceBillingPrivateStoreAccount', 'Get-AzMarketplaceCollectionToSubscriptionMapping', 'Get-AzMarketplacePrivateStoreAllSubscriptionInTenant', 'Get-AzMarketplacePrivateStoreCollection', 'Get-AzMarketplacePrivateStoreCollectionMapOffersToContext', 'Get-AzMarketplacePrivateStoreCollectionOffer', 'Get-AzMarketplacePrivateStoreCollectionRule', 'Get-AzMarketplacePrivateStoreNewPlanNotification', 'Get-AzMarketplacePrivateStoreStopSellOfferPlanNotification', 'Get-AzMarketplacePrivateStoreSubscription', 'Get-AzMarketplacePrivateStoreUserOffer', 'Get-AzMarketplacePrivateStoreUserRule', 'Get-AzMarketplacePrivateStoreV1', 'Get-AzMarketplaceQueryPrivateStoreOffer', 'New-AzMarketplacePrivateStore', 'New-AzMarketplacePrivateStoreCollection', 'New-AzMarketplacePrivateStoreCollectionOffer', 'New-AzMarketplacePrivateStoreCollectionOfferMultiContext', 'New-AzMarketplacePrivateStoreCollectionRule', 'Remove-AzMarketplacePrivateStoreCollection', 'Remove-AzMarketplacePrivateStoreCollectionOffer', 'Set-AzMarketplaceBulkPrivateStoreCollectionAction', 'Set-AzMarketplacePrivateStore', 'Set-AzMarketplacePrivateStoreCollection', 'Set-AzMarketplacePrivateStoreCollectionOffer', 'Test-AzMarketplacePrivateStoreAnyExistingOffer', 'Update-AzMarketplacePrivateStoreCollection', 'Update-AzMarketplacePrivateStoreCollectionOffer' PrivateData = @{ PSData = @{ Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'Marketplace' diff --git a/src/Marketplace/Marketplace.Autorest/README.md b/src/Marketplace/Marketplace.Autorest/README.md index 7601fd5e1efc..067260867293 100644 --- a/src/Marketplace/Marketplace.Autorest/README.md +++ b/src/Marketplace/Marketplace.Autorest/README.md @@ -17,7 +17,7 @@ This directory contains the PowerShell module for the Marketplace service. This module was primarily generated via [AutoRest](https://github.com/Azure/autorest) using the [PowerShell](https://github.com/Azure/autorest.powershell) extension. ## Module Requirements -- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 2.2.3 or greater +- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 2.7.5 or greater ## Authentication 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,19 +38,17 @@ In this directory, run AutoRest: require: - $(this-folder)/../../readme.azure.noprofile.md # lock the commit -commit: 8dc5f1df21caf602944de05e68945c2bbf009c2d +commit: a54263176acce91199a19333d6c4717367a3317e input-file: - - $(repo)/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2021-06-01/Marketplace.json + - $(repo)/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2023-01-01/Marketplace.json module-version: 1.1.0 title: Marketplace subject-prefix: $(service-name) - inlining-threshold: 50 -# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option -use-extension: - "@autorest/powershell": "3.x" +use-extension: + "@autorest/powershell": "4.x" directive: # Remove the unexpanded parameter set @@ -105,11 +103,11 @@ directive: remove: true - where: verb: Invoke - subject: PrivateStoreCollection + subject: ^PrivateStoreCollection$ remove: true - where: verb: Invoke - subject: PrivateStoreCollectionOffer + subject: ^PrivateStoreCollectionOffer$ remove: true - where: verb: Get @@ -161,7 +159,137 @@ directive: verb: Get subject: PrivateStore set: - subject: PrivateStoreV1 + subject: PrivateStoreV1 + + # Rename POST methods + # /providers/Microsoft.Marketplace/privateStores/{privateStoreId}/anyExistingOffersInTheCollections + - where: + verb: Invoke + subject: AnyPrivateStoreExistingOffer + set: + verb: Test + subject: PrivateStoreAnyExistingOffer + - where: + verb: Get + subject: PrivateStoreUserOffer + variant: Query(?!.*?Expanded) + remove: true + + # /providers/Microsoft.Marketplace/privateStores/{privateStoreId}/queryUserOffers + - where: + verb: Invoke + subject: QueryPrivateStoreUserOffer + set: + verb: Get + subject: PrivateStoreUserOffer + - where: + verb: Get + subject: PrivateStoreUserOffer + variant: Query(?!.*?Expanded) + remove: true - + # /providers/Microsoft.Marketplace/privateStores/{privateStoreId}/queryUserRules + - where: + verb: Invoke + subject: QueryUserRule + set: + verb: Get + subject: PrivateStoreUserRule + - where: + verb: Get + subject: PrivateStoreUserRule + variant: Query(?!.*?Expanded) + remove: true + + # /providers/Microsoft.Marketplace/privateStores/{privateStoreId}/collections/{collectionId}/approveAllItems + - where: + verb: Approve + subject: PrivateStoreCollectionItem + set: + verb: Enable + subject: PrivateStoreCollectionAllItem + # /providers/Microsoft.Marketplace/privateStores/{privateStoreId}/collections/{collectionId}/disableApproveAllItems" + - where: + verb: Disable + subject: PrivateStoreCollectionApproveItem + set: + subject: PrivateStoreCollectionAllItem + + # /providers/Microsoft.Marketplace/privateStores/{privateStoreId}/collections/{collectionId}/mapOffersToContexts + - where: + verb: Get + subject: PrivateStoreCollectionOffer + variant: ^List\S+ + set: + subject: PrivateStoreCollectionMapOffersToContext + - where: + verb: Get + subject: PrivateStoreCollectionMapOffersToContext + variant: List(?!.*?Expanded) + remove: true + + # /providers/Microsoft.Marketplace/privateStores/{privateStoreId}/collections/{collectionId}/setRules + # swagger does not match request + # - where: + # verb: Set + # subject: CollectionRule + # set: + # verb: New + # subject: PrivateStoreCollectionRule + # - where: + # verb: New + # subject: PrivateStoreCollectionRule + # variant: Set(?!.*?Expanded) + # remove: true + - where: + verb: Set + subject: CollectionRule + remove: true + + # /providers/Microsoft.Marketplace/privateStores/{privateStoreId}/collections/{collectionId}/queryRules + - where: + verb: Invoke + subject: QueryRule + set: + verb: Get + subject: PrivateStoreCollectionRule + + # /providers/Microsoft.Marketplace/privateStores/{privateStoreId}/collections/{collectionId}/offers/{offerId}/upsertOfferWithMultiContext + - where: + verb: Invoke + subject: OfferPrivateStoreCollectionOfferUpsert + set: + verb: New + subject: PrivateStoreCollectionOfferMultiContext + - where: + verb: New + subject: PrivateStoreCollectionOfferMultiContext + variant: Offer(?!.*?Expanded) + remove: true + + # /providers/Microsoft.Marketplace/privateStores/{privateStoreId}/fetchAllSubscriptionsInTenant + - where: + verb: Invoke + subject: FetchPrivateStoreSubscription + set: + verb: Get + subject: PrivateStoreAllSubscriptionInTenant + + # /providers/Microsoft.Marketplace/privateStores/{privateStoreId}/listStopSellOffersPlansNotifications + # - where: + # verb: Get + # subject: PrivateStoreStopSellOfferPlanNotification + # variant: List(?!.*?Expanded) + # remove: true + - where: + verb: Get + subject: PrivateStoreStopSellOfferPlanNotification + remove: true + + # /providers/Microsoft.Marketplace/privateStores/{privateStoreId}/listSubscriptionsContext + - where: + verb: Get + subject: PrivateStoreSubscriptionContext + set: + subject: PrivateStoreSubscription ``` diff --git a/src/Marketplace/Marketplace.Autorest/UX/Microsoft.Marketplace/privateStores-collections-offers.json b/src/Marketplace/Marketplace.Autorest/UX/Microsoft.Marketplace/privateStores-collections-offers.json index 49d3085a23d0..af2e1f235db6 100644 --- a/src/Marketplace/Marketplace.Autorest/UX/Microsoft.Marketplace/privateStores-collections-offers.json +++ b/src/Marketplace/Marketplace.Autorest/UX/Microsoft.Marketplace/privateStores-collections-offers.json @@ -1,6 +1,6 @@ { "resourceType": "privateStores/collections/offers", - "apiVersion": "2021-06-01", + "apiVersion": "2023-01-01", "learnMore": { "url": "https://learn.microsoft.com/powershell/module/az.marketplace" }, diff --git a/src/Marketplace/Marketplace.Autorest/UX/Microsoft.Marketplace/privateStores-collections.json b/src/Marketplace/Marketplace.Autorest/UX/Microsoft.Marketplace/privateStores-collections.json index 6da4e141a8a3..9b82a2223844 100644 --- a/src/Marketplace/Marketplace.Autorest/UX/Microsoft.Marketplace/privateStores-collections.json +++ b/src/Marketplace/Marketplace.Autorest/UX/Microsoft.Marketplace/privateStores-collections.json @@ -1,17 +1,17 @@ { "resourceType": "privateStores/collections", - "apiVersion": "2021-06-01", + "apiVersion": "2023-01-01", "learnMore": { "url": "https://learn.microsoft.com/powershell/module/az.marketplace" }, "commands": [ { - "name": "Copy-AzMarketplacePrivateStoreCollectionOffer", - "description": "transferring offers (copy or move) from source collection to target collection(s)", - "path": "/providers/Microsoft.Marketplace/privateStores/{privateStoreId}/collections/{collectionId}/transferOffers", + "name": "Disable-AzMarketplacePrivateStoreCollectionAllItem", + "description": "Disable approve all items for the collection.", + "path": "/providers/Microsoft.Marketplace/privateStores/{privateStoreId}/collections/{collectionId}/disableApproveAllItems", "help": { "learnMore": { - "url": "https://learn.microsoft.com/powershell/module/az.marketplace/copy-azmarketplaceprivatestorecollectionoffer" + "url": "https://learn.microsoft.com/powershell/module/az.marketplace/disable-azmarketplaceprivatestorecollectionallitem" }, "parameterSets": [ { @@ -24,7 +24,73 @@ }, "examples": [ { - "description": "transferring offers (copy or move) from source collection to target collection(s)", + "description": "Disable approve all items for the collection.", + "parameters": [ + { + "name": "-CollectionId", + "value": "[Path.collectionId]" + }, + { + "name": "-PrivateStoreId", + "value": "[Path.privateStoreId]" + } + ] + } + ] + }, + { + "name": "Enable-AzMarketplacePrivateStoreCollectionAllItem", + "description": "Delete all existing offers from the collection and enable approve all items.", + "path": "/providers/Microsoft.Marketplace/privateStores/{privateStoreId}/collections/{collectionId}/approveAllItems", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.marketplace/enable-azmarketplaceprivatestorecollectionallitem" + }, + "parameterSets": [ + { + "parameters": [ + "-CollectionId ", + "-PrivateStoreId " + ] + } + ] + }, + "examples": [ + { + "description": "Delete all existing offers from the collection and enable approve all items.", + "parameters": [ + { + "name": "-CollectionId", + "value": "[Path.collectionId]" + }, + { + "name": "-PrivateStoreId", + "value": "[Path.privateStoreId]" + } + ] + } + ] + }, + { + "name": "Get-AzMarketplacePrivateStoreCollectionRule", + "description": "Get a list of all private store rules in the given private store and collection", + "path": "/providers/Microsoft.Marketplace/privateStores/{privateStoreId}/collections/{collectionId}/queryRules", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.marketplace/get-azmarketplaceprivatestorecollectionrule" + }, + "parameterSets": [ + { + "parameters": [ + "-CollectionId ", + "-PrivateStoreId " + ] + } + ] + }, + "examples": [ + { + "description": "Get a list of all private store rules in the given private store and collection", "parameters": [ { "name": "-CollectionId", diff --git a/src/Marketplace/Marketplace.Autorest/UX/Microsoft.Marketplace/privateStores.json b/src/Marketplace/Marketplace.Autorest/UX/Microsoft.Marketplace/privateStores.json index e8ecea98cc3f..b19176cc12bc 100644 --- a/src/Marketplace/Marketplace.Autorest/UX/Microsoft.Marketplace/privateStores.json +++ b/src/Marketplace/Marketplace.Autorest/UX/Microsoft.Marketplace/privateStores.json @@ -1,6 +1,6 @@ { "resourceType": "privateStores", - "apiVersion": "2021-06-01", + "apiVersion": "2023-01-01", "learnMore": { "url": "https://learn.microsoft.com/powershell/module/az.marketplace" }, @@ -34,12 +34,12 @@ ] }, { - "name": "Get-AzMarketplaceCollectionToSubscriptionMapping", - "description": "For a given subscriptions list, the API will return a map of collections and the related subscriptions from the supplied list.", - "path": "/providers/Microsoft.Marketplace/privateStores/{privateStoreId}/collectionsToSubscriptionsMapping", + "name": "Get-AzMarketplacePrivateStoreAllSubscriptionInTenant", + "description": "Fetch all subscriptions in tenant, only for marketplace admin", + "path": "/providers/Microsoft.Marketplace/privateStores/{privateStoreId}/fetchAllSubscriptionsInTenant", "help": { "learnMore": { - "url": "https://learn.microsoft.com/powershell/module/az.marketplace/get-azmarketplacecollectiontosubscriptionmapping" + "url": "https://learn.microsoft.com/powershell/module/az.marketplace/get-azmarketplaceprivatestoreallsubscriptionintenant" }, "parameterSets": [ { @@ -51,7 +51,7 @@ }, "examples": [ { - "description": "For a given subscriptions list, the API will return a map of collections and the related subscriptions from the supplied list.", + "description": "Fetch all subscriptions in tenant, only for marketplace admin", "parameters": [ { "name": "-PrivateStoreId", @@ -116,6 +116,34 @@ ] } ] + }, + { + "name": "Test-AzMarketplacePrivateStoreAnyExistingOffer", + "description": "Query whether exists any offer in the collections.", + "path": "/providers/Microsoft.Marketplace/privateStores/{privateStoreId}/anyExistingOffersInTheCollections", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.marketplace/test-azmarketplaceprivatestoreanyexistingoffer" + }, + "parameterSets": [ + { + "parameters": [ + "-PrivateStoreId " + ] + } + ] + }, + "examples": [ + { + "description": "Query whether exists any offer in the collections.", + "parameters": [ + { + "name": "-PrivateStoreId", + "value": "[Path.privateStoreId]" + } + ] + } + ] } ] } diff --git a/src/Marketplace/Marketplace.Autorest/custom/README.md b/src/Marketplace/Marketplace.Autorest/custom/README.md index c04524139b72..0536529be163 100644 --- a/src/Marketplace/Marketplace.Autorest/custom/README.md +++ b/src/Marketplace/Marketplace.Autorest/custom/README.md @@ -1,5 +1,5 @@ # Custom -This directory contains custom implementation for non-generated cmdlets for the `Az.Marketplace` module. Both scripts (`.ps1`) and C# files (`.cs`) can be implemented here. They will be used during the build process in `build-module.ps1`, and create cmdlets into the `../exports` folder. The only generated file into this folder is the `Az.Marketplace.custom.psm1`. This file should not be modified. +This directory contains custom implementation for non-generated cmdlets for the `Az.Marketplace` module. Both scripts (`.ps1`) and C# files (`.cs`) can be implemented here. They will be used during the build process in `build-module.ps1`, and create cmdlets into the `..\exports` folder. The only generated file into this folder is the `Az.Marketplace.custom.psm1`. This file should not be modified. ## Info - Modifiable: yes @@ -15,10 +15,10 @@ For C# cmdlets, they are compiled with the rest of the generated low-level cmdle For script cmdlets, these are loaded via the `Az.Marketplace.custom.psm1`. Then, during the build process, this module is loaded and processed in the same manner as the C# cmdlets. The fundamental difference is the script cmdlets use the `ParameterSetName` attribute and C# cmdlets do not. To create a script cmdlet variant of a generated cmdlet, simply decorate all parameters in the script with the new `ParameterSetName` in the `Parameter` attribute. This will appropriately treat each parameter set as a separate variant when processed to be exported during the build. ## Purpose -This allows the modules to have cmdlets that were not defined in the REST specification. It also allows combining logic using generated cmdlets. This is a level of customization beyond what can be done using the [readme configuration options](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md) that are currently available. These custom cmdlets are then referenced by the cmdlets created at build-time in the `../exports` folder. +This allows the modules to have cmdlets that were not defined in the REST specification. It also allows combining logic using generated cmdlets. This is a level of customization beyond what can be done using the [readme configuration options](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md) that are currently available. These custom cmdlets are then referenced by the cmdlets created at build-time in the `..\exports` folder. ## Usage -The easiest way currently to start developing custom cmdlets is to copy an existing cmdlet. For C# cmdlets, copy one from the `generated/cmdlets` folder. For script cmdlets, build the project using `build-module.ps1` and copy one of the scripts from the `../exports` folder. After that, if you want to add new parameter sets, follow the guidelines in the `Details` section above. For implementing a new cmdlets, at minimum, please keep these parameters: +The easiest way currently to start developing custom cmdlets is to copy an existing cmdlet. For C# cmdlets, copy one from the `generated/cmdlets` folder. For script cmdlets, build the project using `build-module.ps1` and copy one of the scripts from the `..\exports` folder. After that, if you want to add new parameter sets, follow the guidelines in the `Details` section above. For implementing a new cmdlets, at minimum, please keep these parameters: - Break - DefaultProfile - HttpPipelineAppend @@ -36,6 +36,6 @@ For processing the cmdlets, we've created some additional attributes: - `Microsoft.Azure.PowerShell.Cmdlets.Marketplace.DoNotExportAttribute` - Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.Marketplace`. - `Microsoft.Azure.PowerShell.Cmdlets.Marketplace.InternalExportAttribute` - - Used in C# cmdlets to route exported cmdlets to the `../internal`, which are *not exposed* by `Az.Marketplace`. For more information, see [README.md](../internal/README.md) in the `../internal` folder. + - Used in C# cmdlets to route exported cmdlets to the `..\internal`, which are *not exposed* by `Az.Marketplace`. For more information, see [README.md](..\internal/README.md) in the `..\internal` folder. - `Microsoft.Azure.PowerShell.Cmdlets.Marketplace.ProfileAttribute` - Used in C# and script cmdlets to define which Azure profiles the cmdlet supports. This is only supported for Azure (`--azure`) modules. \ No newline at end of file diff --git a/src/Marketplace/Marketplace.Autorest/docs/Az.Marketplace.md b/src/Marketplace/Marketplace.Autorest/docs/Az.Marketplace.md index dbb9141e359c..1703f414dcd4 100644 --- a/src/Marketplace/Marketplace.Autorest/docs/Az.Marketplace.md +++ b/src/Marketplace/Marketplace.Autorest/docs/Az.Marketplace.md @@ -14,18 +14,48 @@ Microsoft Azure PowerShell: Marketplace cmdlets ### [Copy-AzMarketplacePrivateStoreCollectionOffer](Copy-AzMarketplacePrivateStoreCollectionOffer.md) transferring offers (copy or move) from source collection to target collection(s) +### [Disable-AzMarketplacePrivateStoreCollectionAllItem](Disable-AzMarketplacePrivateStoreCollectionAllItem.md) +Disable approve all items for the collection. + +### [Enable-AzMarketplacePrivateStoreCollectionAllItem](Enable-AzMarketplacePrivateStoreCollectionAllItem.md) +Delete all existing offers from the collection and enable approve all items. + ### [Get-AzMarketplaceBillingPrivateStoreAccount](Get-AzMarketplaceBillingPrivateStoreAccount.md) Tenant billing accounts names ### [Get-AzMarketplaceCollectionToSubscriptionMapping](Get-AzMarketplaceCollectionToSubscriptionMapping.md) For a given subscriptions list, the API will return a map of collections and the related subscriptions from the supplied list. +### [Get-AzMarketplacePrivateStoreAllSubscriptionInTenant](Get-AzMarketplacePrivateStoreAllSubscriptionInTenant.md) +Fetch all subscriptions in tenant, only for marketplace admin + ### [Get-AzMarketplacePrivateStoreCollection](Get-AzMarketplacePrivateStoreCollection.md) Gets private store collection +### [Get-AzMarketplacePrivateStoreCollectionMapOffersToContext](Get-AzMarketplacePrivateStoreCollectionMapOffersToContext.md) +Get a list of all offers in the given collection according to the required contexts. + ### [Get-AzMarketplacePrivateStoreCollectionOffer](Get-AzMarketplacePrivateStoreCollectionOffer.md) Gets information about a specific offer. +### [Get-AzMarketplacePrivateStoreCollectionRule](Get-AzMarketplacePrivateStoreCollectionRule.md) +Get a list of all private store rules in the given private store and collection + +### [Get-AzMarketplacePrivateStoreNewPlanNotification](Get-AzMarketplacePrivateStoreNewPlanNotification.md) +List new plans notifications + +### [Get-AzMarketplacePrivateStoreStopSellOfferPlanNotification](Get-AzMarketplacePrivateStoreStopSellOfferPlanNotification.md) +List stop sell notifications for both stop sell offers and stop sell plans + +### [Get-AzMarketplacePrivateStoreSubscription](Get-AzMarketplacePrivateStoreSubscription.md) +List all the subscriptions in the private store context + +### [Get-AzMarketplacePrivateStoreUserOffer](Get-AzMarketplacePrivateStoreUserOffer.md) +List of user's approved offers for the provided offers and subscriptions + +### [Get-AzMarketplacePrivateStoreUserRule](Get-AzMarketplacePrivateStoreUserRule.md) +All rules approved in the private store that are relevant for user subscriptions + ### [Get-AzMarketplacePrivateStoreV1](Get-AzMarketplacePrivateStoreV1.md) Get information about the private store @@ -36,11 +66,17 @@ List of offers, regardless the collections Changes private store properties ### [New-AzMarketplacePrivateStoreCollection](New-AzMarketplacePrivateStoreCollection.md) -Create or update private store collection +Create private store collection ### [New-AzMarketplacePrivateStoreCollectionOffer](New-AzMarketplacePrivateStoreCollectionOffer.md) Update or add an offer to a specific collection of the private store. +### [New-AzMarketplacePrivateStoreCollectionOfferMultiContext](New-AzMarketplacePrivateStoreCollectionOfferMultiContext.md) +Upsert an offer with multiple context details. + +### [New-AzMarketplacePrivateStoreCollectionRule](New-AzMarketplacePrivateStoreCollectionRule.md) +Set rule for specific private store and collection + ### [Remove-AzMarketplacePrivateStoreCollection](Remove-AzMarketplacePrivateStoreCollection.md) Delete a collection from the given private store. @@ -54,8 +90,17 @@ Perform an action on bulk collections Changes private store properties ### [Set-AzMarketplacePrivateStoreCollection](Set-AzMarketplacePrivateStoreCollection.md) -Create or update private store collection +Create private store collection ### [Set-AzMarketplacePrivateStoreCollectionOffer](Set-AzMarketplacePrivateStoreCollectionOffer.md) Update or add an offer to a specific collection of the private store. +### [Test-AzMarketplacePrivateStoreAnyExistingOffer](Test-AzMarketplacePrivateStoreAnyExistingOffer.md) +Query whether exists any offer in the collections. + +### [Update-AzMarketplacePrivateStoreCollection](Update-AzMarketplacePrivateStoreCollection.md) +Create private store collection + +### [Update-AzMarketplacePrivateStoreCollectionOffer](Update-AzMarketplacePrivateStoreCollectionOffer.md) +Update or add an offer to a specific collection of the private store. + diff --git a/src/Marketplace/Marketplace.Autorest/docs/Copy-AzMarketplacePrivateStoreCollectionOffer.md b/src/Marketplace/Marketplace.Autorest/docs/Copy-AzMarketplacePrivateStoreCollectionOffer.md index 6182d3bff76c..ca94315c88e0 100644 --- a/src/Marketplace/Marketplace.Autorest/docs/Copy-AzMarketplacePrivateStoreCollectionOffer.md +++ b/src/Marketplace/Marketplace.Autorest/docs/Copy-AzMarketplacePrivateStoreCollectionOffer.md @@ -38,6 +38,32 @@ Copy-AzMarketplacePrivateStoreCollectionOffer -InputObject ] ``` +### TransferViaIdentityPrivateStore +``` +Copy-AzMarketplacePrivateStoreCollectionOffer -CollectionId + -PrivateStoreInputObject -Payload + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### TransferViaIdentityPrivateStoreExpanded +``` +Copy-AzMarketplacePrivateStoreCollectionOffer -CollectionId + -PrivateStoreInputObject [-OfferIdList ] [-Operation ] + [-TargetCollection ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### TransferViaJsonFilePath +``` +Copy-AzMarketplacePrivateStoreCollectionOffer -CollectionId -PrivateStoreId + -JsonFilePath [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### TransferViaJsonString +``` +Copy-AzMarketplacePrivateStoreCollectionOffer -CollectionId -PrivateStoreId + -JsonString [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + ## DESCRIPTION transferring offers (copy or move) from source collection to target collection(s) @@ -64,7 +90,7 @@ The collection ID ```yaml Type: System.String -Parameter Sets: Transfer, TransferExpanded +Parameter Sets: Transfer, TransferExpanded, TransferViaIdentityPrivateStore, TransferViaIdentityPrivateStoreExpanded, TransferViaJsonFilePath, TransferViaJsonString Aliases: Required: True @@ -75,7 +101,8 @@ Accept wildcard characters: False ``` ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -105,12 +132,42 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` +### -JsonFilePath +Path of Json file supplied to the Transfer operation + +```yaml +Type: System.String +Parameter Sets: TransferViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Transfer operation + +```yaml +Type: System.String +Parameter Sets: TransferViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -OfferIdList Offers ids list to transfer from source collection to target collection(s) ```yaml Type: System.String[] -Parameter Sets: TransferExpanded, TransferViaIdentityExpanded +Parameter Sets: TransferExpanded, TransferViaIdentityExpanded, TransferViaIdentityPrivateStoreExpanded Aliases: Required: False @@ -125,7 +182,7 @@ Operation to perform (For example: Copy or Move) ```yaml Type: System.String -Parameter Sets: TransferExpanded, TransferViaIdentityExpanded +Parameter Sets: TransferExpanded, TransferViaIdentityExpanded, TransferViaIdentityPrivateStoreExpanded Aliases: Required: False @@ -140,8 +197,8 @@ Transfer offers properties To construct, see NOTES section for PAYLOAD properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.Api20210601.ITransferOffersProperties -Parameter Sets: Transfer, TransferViaIdentity +Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.ITransferOffersProperties +Parameter Sets: Transfer, TransferViaIdentity, TransferViaIdentityPrivateStore Aliases: Required: True @@ -156,7 +213,7 @@ The store ID - must use the tenant ID ```yaml Type: System.String -Parameter Sets: Transfer, TransferExpanded +Parameter Sets: Transfer, TransferExpanded, TransferViaJsonFilePath, TransferViaJsonString Aliases: Required: True @@ -166,12 +223,28 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -PrivateStoreInputObject +Identity Parameter +To construct, see NOTES section for PRIVATESTOREINPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IMarketplaceIdentity +Parameter Sets: TransferViaIdentityPrivateStore, TransferViaIdentityPrivateStoreExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -TargetCollection Target collections ids ```yaml Type: System.String[] -Parameter Sets: TransferExpanded, TransferViaIdentityExpanded +Parameter Sets: TransferExpanded, TransferViaIdentityExpanded, TransferViaIdentityPrivateStoreExpanded Aliases: Required: False @@ -217,35 +290,15 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.Api20210601.ITransferOffersProperties - ### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IMarketplaceIdentity +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.ITransferOffersProperties + ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.Api20210601.ITransferOffersResponse +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.ITransferOffersResponse ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -INPUTOBJECT : Identity Parameter - - `[AdminRequestApprovalId ]`: The admin request approval ID to get create or update - - `[CollectionId ]`: The collection ID - - `[Id ]`: Resource identity path - - `[OfferId ]`: The offer ID to update or delete - - `[PrivateStoreId ]`: The store ID - must use the tenant ID - - `[RequestApprovalId ]`: The request approval ID to get create or update - -PAYLOAD : Transfer offers properties - - `[OfferIdsList ]`: Offers ids list to transfer from source collection to target collection(s) - - `[Operation ]`: Operation to perform (For example: Copy or Move) - - `[TargetCollection ]`: Target collections ids - ## RELATED LINKS diff --git a/src/Marketplace/Marketplace.Autorest/docs/Disable-AzMarketplacePrivateStoreCollectionAllItem.md b/src/Marketplace/Marketplace.Autorest/docs/Disable-AzMarketplacePrivateStoreCollectionAllItem.md new file mode 100644 index 000000000000..da6bfd5c4074 --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/docs/Disable-AzMarketplacePrivateStoreCollectionAllItem.md @@ -0,0 +1,171 @@ +--- +external help file: +Module Name: Az.Marketplace +online version: https://learn.microsoft.com/powershell/module/az.marketplace/disable-azmarketplaceprivatestorecollectionallitem +schema: 2.0.0 +--- + +# Disable-AzMarketplacePrivateStoreCollectionAllItem + +## SYNOPSIS +Disable approve all items for the collection. + +## SYNTAX + +### Disable (Default) +``` +Disable-AzMarketplacePrivateStoreCollectionAllItem -CollectionId -PrivateStoreId + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### DisableViaIdentity +``` +Disable-AzMarketplacePrivateStoreCollectionAllItem -InputObject + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### DisableViaIdentityPrivateStore +``` +Disable-AzMarketplacePrivateStoreCollectionAllItem -CollectionId + -PrivateStoreInputObject [-DefaultProfile ] [-Confirm] [-WhatIf] + [] +``` + +## DESCRIPTION +Disable approve all items for the collection. + +## EXAMPLES + +### Example 1: Disable approve-all-items for a collection +```powershell +Disable-AzMarketplacePrivateStoreCollectionAllItem -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -CollectionId fdb889a1-cf3e-49f0-95b8-2bb012fa0188 +``` + +Disable approve all items for a collection. + +## PARAMETERS + +### -CollectionId +The collection ID + +```yaml +Type: System.String +Parameter Sets: Disable, DisableViaIdentityPrivateStore +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IMarketplaceIdentity +Parameter Sets: DisableViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -PrivateStoreId +The store ID - must use the tenant ID + +```yaml +Type: System.String +Parameter Sets: Disable +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrivateStoreInputObject +Identity Parameter +To construct, see NOTES section for PRIVATESTOREINPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IMarketplaceIdentity +Parameter Sets: DisableViaIdentityPrivateStore +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IMarketplaceIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.ICollection + +## NOTES + +## RELATED LINKS + diff --git a/src/Marketplace/Marketplace.Autorest/docs/Enable-AzMarketplacePrivateStoreCollectionAllItem.md b/src/Marketplace/Marketplace.Autorest/docs/Enable-AzMarketplacePrivateStoreCollectionAllItem.md new file mode 100644 index 000000000000..66af9b165cc0 --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/docs/Enable-AzMarketplacePrivateStoreCollectionAllItem.md @@ -0,0 +1,171 @@ +--- +external help file: +Module Name: Az.Marketplace +online version: https://learn.microsoft.com/powershell/module/az.marketplace/enable-azmarketplaceprivatestorecollectionallitem +schema: 2.0.0 +--- + +# Enable-AzMarketplacePrivateStoreCollectionAllItem + +## SYNOPSIS +Delete all existing offers from the collection and enable approve all items. + +## SYNTAX + +### Approve (Default) +``` +Enable-AzMarketplacePrivateStoreCollectionAllItem -CollectionId -PrivateStoreId + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### ApproveViaIdentity +``` +Enable-AzMarketplacePrivateStoreCollectionAllItem -InputObject + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### ApproveViaIdentityPrivateStore +``` +Enable-AzMarketplacePrivateStoreCollectionAllItem -CollectionId + -PrivateStoreInputObject [-DefaultProfile ] [-Confirm] [-WhatIf] + [] +``` + +## DESCRIPTION +Delete all existing offers from the collection and enable approve all items. + +## EXAMPLES + +### Example 1: Enable approve-all-items for a collection +```powershell +Enable-AzMarketplacePrivateStoreCollectionAllItem -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -CollectionId fdb889a1-cf3e-49f0-95b8-2bb012fa0188 +``` + +Delete all existing offers from the collection and enable approve all items. + +## PARAMETERS + +### -CollectionId +The collection ID + +```yaml +Type: System.String +Parameter Sets: Approve, ApproveViaIdentityPrivateStore +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IMarketplaceIdentity +Parameter Sets: ApproveViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -PrivateStoreId +The store ID - must use the tenant ID + +```yaml +Type: System.String +Parameter Sets: Approve +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrivateStoreInputObject +Identity Parameter +To construct, see NOTES section for PRIVATESTOREINPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IMarketplaceIdentity +Parameter Sets: ApproveViaIdentityPrivateStore +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IMarketplaceIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.ICollection + +## NOTES + +## RELATED LINKS + diff --git a/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplaceBillingPrivateStoreAccount.md b/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplaceBillingPrivateStoreAccount.md index f6cb563cdfbb..4929347ca058 100644 --- a/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplaceBillingPrivateStoreAccount.md +++ b/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplaceBillingPrivateStoreAccount.md @@ -43,7 +43,8 @@ This command returns the billing account of a private store. ## PARAMETERS ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -128,24 +129,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### System.String +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IBillingAccountsResponse ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -INPUTOBJECT : Identity Parameter - - `[AdminRequestApprovalId ]`: The admin request approval ID to get create or update - - `[CollectionId ]`: The collection ID - - `[Id ]`: Resource identity path - - `[OfferId ]`: The offer ID to update or delete - - `[PrivateStoreId ]`: The store ID - must use the tenant ID - - `[RequestApprovalId ]`: The request approval ID to get create or update - ## RELATED LINKS diff --git a/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplaceCollectionToSubscriptionMapping.md b/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplaceCollectionToSubscriptionMapping.md index 7f4d4c0dd1b3..d5f8e26697fa 100644 --- a/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplaceCollectionToSubscriptionMapping.md +++ b/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplaceCollectionToSubscriptionMapping.md @@ -38,12 +38,24 @@ Get-AzMarketplaceCollectionToSubscriptionMapping -InputObject ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] ``` +### CollectionsViaJsonFilePath +``` +Get-AzMarketplaceCollectionToSubscriptionMapping -PrivateStoreId -JsonFilePath + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### CollectionsViaJsonString +``` +Get-AzMarketplaceCollectionToSubscriptionMapping -PrivateStoreId -JsonString + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + ## DESCRIPTION For a given subscriptions list, the API will return a map of collections and the related subscriptions from the supplied list. ## EXAMPLES -### Example 1: For a given subscriptions list, the Cmdlet will return a map of collections and the related subscriptions from the supplied list. +### Example 1: Map subscriptions to collections ```powershell $res = Get-AzMarketplaceCollectionToSubscriptionMapping -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -Payload @{SubscriptionId = "53425a7b-4ac1-4729-8340-e1da5046212c"} $res.keys @@ -59,7 +71,8 @@ This command For a given subscriptions list, will return a map of collections an ## PARAMETERS ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -89,12 +102,42 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` +### -JsonFilePath +Path of Json file supplied to the Collections operation + +```yaml +Type: System.String +Parameter Sets: CollectionsViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Collections operation + +```yaml +Type: System.String +Parameter Sets: CollectionsViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Payload The subscriptions list to get the related collections To construct, see NOTES section for PAYLOAD properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.Api20210601.ICollectionsToSubscriptionsMappingPayload +Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.ICollectionsToSubscriptionsMappingPayload Parameter Sets: Collections, CollectionsViaIdentity Aliases: @@ -110,7 +153,7 @@ The store ID - must use the tenant ID ```yaml Type: System.String -Parameter Sets: Collections, CollectionsExpanded +Parameter Sets: Collections, CollectionsExpanded, CollectionsViaJsonFilePath, CollectionsViaJsonString Aliases: Required: True @@ -171,33 +214,15 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.Api20210601.ICollectionsToSubscriptionsMappingPayload +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.ICollectionsToSubscriptionsMappingPayload ### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IMarketplaceIdentity ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.Api20210601.ICollectionsToSubscriptionsMappingResponseProperties +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.ICollectionsToSubscriptionsMappingResponse ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -INPUTOBJECT : Identity Parameter - - `[AdminRequestApprovalId ]`: The admin request approval ID to get create or update - - `[CollectionId ]`: The collection ID - - `[Id ]`: Resource identity path - - `[OfferId ]`: The offer ID to update or delete - - `[PrivateStoreId ]`: The store ID - must use the tenant ID - - `[RequestApprovalId ]`: The request approval ID to get create or update - -PAYLOAD : The subscriptions list to get the related collections - - `[SubscriptionId ]`: Subscriptions ids list - ## RELATED LINKS diff --git a/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplacePrivateStoreAllSubscriptionInTenant.md b/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplacePrivateStoreAllSubscriptionInTenant.md new file mode 100644 index 000000000000..9e64baf20f69 --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplacePrivateStoreAllSubscriptionInTenant.md @@ -0,0 +1,148 @@ +--- +external help file: +Module Name: Az.Marketplace +online version: https://learn.microsoft.com/powershell/module/az.marketplace/get-azmarketplaceprivatestoreallsubscriptionintenant +schema: 2.0.0 +--- + +# Get-AzMarketplacePrivateStoreAllSubscriptionInTenant + +## SYNOPSIS +Fetch all subscriptions in tenant, only for marketplace admin + +## SYNTAX + +### Fetch (Default) +``` +Get-AzMarketplacePrivateStoreAllSubscriptionInTenant -PrivateStoreId [-NextPageToken ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### FetchViaIdentity +``` +Get-AzMarketplacePrivateStoreAllSubscriptionInTenant -InputObject + [-NextPageToken ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Fetch all subscriptions in tenant, only for marketplace admin + +## EXAMPLES + +### Example 1: Fetch all subscriptions in a tenant +```powershell +Get-AzMarketplacePrivateStoreAllSubscriptionInTenant -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 +``` + +Fetch all subscriptions in tenant, only for marketplace admin. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IMarketplaceIdentity +Parameter Sets: FetchViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -NextPageToken +The skip token to get the next page. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrivateStoreId +The store ID - must use the tenant ID + +```yaml +Type: System.String +Parameter Sets: Fetch +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IMarketplaceIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.ISubscriptionsResponse + +## NOTES + +## RELATED LINKS + diff --git a/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplacePrivateStoreCollection.md b/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplacePrivateStoreCollection.md index febac068fc94..701afb8098ef 100644 --- a/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplacePrivateStoreCollection.md +++ b/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplacePrivateStoreCollection.md @@ -30,6 +30,12 @@ Get-AzMarketplacePrivateStoreCollection -InputObject [-De [] ``` +### GetViaIdentityPrivateStore +``` +Get-AzMarketplacePrivateStoreCollection -CollectionId -PrivateStoreInputObject + [-DefaultProfile ] [] +``` + ## DESCRIPTION Gets private store collection @@ -48,7 +54,7 @@ Name SystemDataCreatedAt SystemDataCreatedBy Sy ``` -This command gets list of private store collections +This command gets list of private store collections. ## PARAMETERS @@ -57,7 +63,7 @@ The collection ID ```yaml Type: System.String -Parameter Sets: Get +Parameter Sets: Get, GetViaIdentityPrivateStore Aliases: Required: True @@ -68,7 +74,8 @@ Accept wildcard characters: False ``` ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -113,6 +120,22 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -PrivateStoreInputObject +Identity Parameter +To construct, see NOTES section for PRIVATESTOREINPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IMarketplaceIdentity +Parameter Sets: GetViaIdentityPrivateStore +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). @@ -122,26 +145,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.Api20210601.ICollection +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.ICollection -### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.Api20210601.ICollectionsList +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.ICollectionsList ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -INPUTOBJECT : Identity Parameter - - `[AdminRequestApprovalId ]`: The admin request approval ID to get create or update - - `[CollectionId ]`: The collection ID - - `[Id ]`: Resource identity path - - `[OfferId ]`: The offer ID to update or delete - - `[PrivateStoreId ]`: The store ID - must use the tenant ID - - `[RequestApprovalId ]`: The request approval ID to get create or update - ## RELATED LINKS diff --git a/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplacePrivateStoreCollectionMapOffersToContext.md b/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplacePrivateStoreCollectionMapOffersToContext.md new file mode 100644 index 000000000000..f5c6fab6255a --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplacePrivateStoreCollectionMapOffersToContext.md @@ -0,0 +1,138 @@ +--- +external help file: +Module Name: Az.Marketplace +online version: https://learn.microsoft.com/powershell/module/az.marketplace/get-azmarketplaceprivatestorecollectionmapofferstocontext +schema: 2.0.0 +--- + +# Get-AzMarketplacePrivateStoreCollectionMapOffersToContext + +## SYNOPSIS +Get a list of all offers in the given collection according to the required contexts. + +## SYNTAX + +``` +Get-AzMarketplacePrivateStoreCollectionMapOffersToContext -CollectionId -PrivateStoreId + [-SubscriptionId ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Get a list of all offers in the given collection according to the required contexts. + +## EXAMPLES + +### Example 1: Map offers to subscriptions +```powershell +Get-AzMarketplacePrivateStoreCollectionMapOffersToContext -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -CollectionId a260d38c-96cf-492d-a340-404d0c4b3ad6 -SubscriptionId 1f58b5dd-313c-42ed-84fc-f1e351bba7fb,ab3de7bc-7a6e-4e9f-a34a-f6922df453e4 +``` + +Get a list of all offers in the given collection according to the required subscriptions. + +## PARAMETERS + +### -CollectionId +The collection ID + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrivateStoreId +The store ID - must use the tenant ID + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Subscription ids list + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.ICollectionOffersByContext + +## NOTES + +## RELATED LINKS + diff --git a/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplacePrivateStoreCollectionOffer.md b/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplacePrivateStoreCollectionOffer.md index 2ac807333d6b..a4d020f7e159 100644 --- a/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplacePrivateStoreCollectionOffer.md +++ b/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplacePrivateStoreCollectionOffer.md @@ -30,12 +30,24 @@ Get-AzMarketplacePrivateStoreCollectionOffer -InputObject [] ``` +### GetViaIdentityCollection +``` +Get-AzMarketplacePrivateStoreCollectionOffer -CollectionInputObject -OfferId + [-DefaultProfile ] [] +``` + +### GetViaIdentityPrivateStore +``` +Get-AzMarketplacePrivateStoreCollectionOffer -CollectionId -OfferId + -PrivateStoreInputObject [-DefaultProfile ] [] +``` + ## DESCRIPTION Gets information about a specific offer. ## EXAMPLES -### Example 1: Gets collection offers. +### Example 1: Gets collection offers ```powershell Get-AzMarketplacePrivateStoreCollectionOffer -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -CollectionId a260d38c-96cf-492d-a340-404d0c4b3ad6 ``` @@ -48,7 +60,7 @@ viacode_consulting-1089577.viacodems RedHat.RHEL_7 ``` -This command get colletion offer +This command get collection offers. ## PARAMETERS @@ -57,7 +69,7 @@ The collection ID ```yaml Type: System.String -Parameter Sets: Get, List +Parameter Sets: Get, GetViaIdentityPrivateStore, List Aliases: Required: True @@ -67,8 +79,25 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -CollectionInputObject +Identity Parameter +To construct, see NOTES section for COLLECTIONINPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IMarketplaceIdentity +Parameter Sets: GetViaIdentityCollection +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -103,7 +132,7 @@ The offer ID to update or delete ```yaml Type: System.String -Parameter Sets: Get +Parameter Sets: Get, GetViaIdentityCollection, GetViaIdentityPrivateStore Aliases: Required: True @@ -128,6 +157,22 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -PrivateStoreInputObject +Identity Parameter +To construct, see NOTES section for PRIVATESTOREINPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IMarketplaceIdentity +Parameter Sets: GetViaIdentityPrivateStore +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). @@ -137,24 +182,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.Api20210601.IOffer +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IOffer ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -INPUTOBJECT : Identity Parameter - - `[AdminRequestApprovalId ]`: The admin request approval ID to get create or update - - `[CollectionId ]`: The collection ID - - `[Id ]`: Resource identity path - - `[OfferId ]`: The offer ID to update or delete - - `[PrivateStoreId ]`: The store ID - must use the tenant ID - - `[RequestApprovalId ]`: The request approval ID to get create or update - ## RELATED LINKS diff --git a/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplacePrivateStoreCollectionRule.md b/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplacePrivateStoreCollectionRule.md new file mode 100644 index 000000000000..142ae1a53108 --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplacePrivateStoreCollectionRule.md @@ -0,0 +1,171 @@ +--- +external help file: +Module Name: Az.Marketplace +online version: https://learn.microsoft.com/powershell/module/az.marketplace/get-azmarketplaceprivatestorecollectionrule +schema: 2.0.0 +--- + +# Get-AzMarketplacePrivateStoreCollectionRule + +## SYNOPSIS +Get a list of all private store rules in the given private store and collection + +## SYNTAX + +### Query (Default) +``` +Get-AzMarketplacePrivateStoreCollectionRule -CollectionId -PrivateStoreId + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### QueryViaIdentity +``` +Get-AzMarketplacePrivateStoreCollectionRule -InputObject [-DefaultProfile ] + [-Confirm] [-WhatIf] [] +``` + +### QueryViaIdentityPrivateStore +``` +Get-AzMarketplacePrivateStoreCollectionRule -CollectionId + -PrivateStoreInputObject [-DefaultProfile ] [-Confirm] [-WhatIf] + [] +``` + +## DESCRIPTION +Get a list of all private store rules in the given private store and collection + +## EXAMPLES + +### Example 1: Get applied rules on a collection +```powershell +Get-AzMarketplacePrivateStoreCollectionRule -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -CollectionId a260d38c-96cf-492d-a340-404d0c4b3ad6 +``` + +Get a list of all private store rules in the given private store and collection. + +## PARAMETERS + +### -CollectionId +The collection ID + +```yaml +Type: System.String +Parameter Sets: Query, QueryViaIdentityPrivateStore +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IMarketplaceIdentity +Parameter Sets: QueryViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -PrivateStoreId +The store ID - must use the tenant ID + +```yaml +Type: System.String +Parameter Sets: Query +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrivateStoreInputObject +Identity Parameter +To construct, see NOTES section for PRIVATESTOREINPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IMarketplaceIdentity +Parameter Sets: QueryViaIdentityPrivateStore +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IMarketplaceIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IRuleListResponse + +## NOTES + +## RELATED LINKS + diff --git a/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplacePrivateStoreNewPlanNotification.md b/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplacePrivateStoreNewPlanNotification.md new file mode 100644 index 000000000000..6a73d229ebf6 --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplacePrivateStoreNewPlanNotification.md @@ -0,0 +1,108 @@ +--- +external help file: +Module Name: Az.Marketplace +online version: https://learn.microsoft.com/powershell/module/az.marketplace/get-azmarketplaceprivatestorenewplannotification +schema: 2.0.0 +--- + +# Get-AzMarketplacePrivateStoreNewPlanNotification + +## SYNOPSIS +List new plans notifications + +## SYNTAX + +``` +Get-AzMarketplacePrivateStoreNewPlanNotification -PrivateStoreId [-DefaultProfile ] + [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +List new plans notifications + +## EXAMPLES + +### Example 1: List new plans notifications +```powershell +Get-AzMarketplacePrivateStoreNewPlanNotification -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 +``` + +List new plans notifications. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrivateStoreId +The store ID - must use the tenant ID + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.INewPlansNotificationsList + +## NOTES + +## RELATED LINKS + diff --git a/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplacePrivateStoreSubscription.md b/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplacePrivateStoreSubscription.md new file mode 100644 index 000000000000..8b4c4b6d5a79 --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplacePrivateStoreSubscription.md @@ -0,0 +1,108 @@ +--- +external help file: +Module Name: Az.Marketplace +online version: https://learn.microsoft.com/powershell/module/az.marketplace/get-azmarketplaceprivatestoresubscription +schema: 2.0.0 +--- + +# Get-AzMarketplacePrivateStoreSubscription + +## SYNOPSIS +List all the subscriptions in the private store context + +## SYNTAX + +``` +Get-AzMarketplacePrivateStoreSubscription -PrivateStoreId [-DefaultProfile ] [-Confirm] + [-WhatIf] [] +``` + +## DESCRIPTION +List all the subscriptions in the private store context + +## EXAMPLES + +### Example 1: List all subscriptions +```powershell +Get-AzMarketplacePrivateStoreSubscription -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 +``` + +List all subscriptions in the private store context. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrivateStoreId +The store ID - must use the tenant ID + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.ISubscriptionsContextList + +## NOTES + +## RELATED LINKS + diff --git a/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplacePrivateStoreUserOffer.md b/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplacePrivateStoreUserOffer.md new file mode 100644 index 000000000000..2b2f82f27f6e --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplacePrivateStoreUserOffer.md @@ -0,0 +1,163 @@ +--- +external help file: +Module Name: Az.Marketplace +online version: https://learn.microsoft.com/powershell/module/az.marketplace/get-azmarketplaceprivatestoreuseroffer +schema: 2.0.0 +--- + +# Get-AzMarketplacePrivateStoreUserOffer + +## SYNOPSIS +List of user's approved offers for the provided offers and subscriptions + +## SYNTAX + +### QueryExpanded (Default) +``` +Get-AzMarketplacePrivateStoreUserOffer -PrivateStoreId [-OfferId ] + [-SubscriptionId ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### QueryViaIdentityExpanded +``` +Get-AzMarketplacePrivateStoreUserOffer -InputObject [-OfferId ] + [-SubscriptionId ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +List of user's approved offers for the provided offers and subscriptions + +## EXAMPLES + +### Example 1: List all approved offers for a user +```powershell +Get-AzMarketplacePrivateStoreUserOffer -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -OfferId aumatics.azure_managedservices -SubscriptionId 1f58b5dd-313c-42ed-84fc-f1e351bba7fb +``` + +List of user's approved offers for the provided offers and subscriptions. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IMarketplaceIdentity +Parameter Sets: QueryViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -OfferId +List of offer IDs + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrivateStoreId +The store ID - must use the tenant ID + +```yaml +Type: System.String +Parameter Sets: QueryExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +List of subscription IDs + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IMarketplaceIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IQueryOffers + +## NOTES + +## RELATED LINKS + diff --git a/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplacePrivateStoreUserRule.md b/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplacePrivateStoreUserRule.md new file mode 100644 index 000000000000..b1c968b75c97 --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplacePrivateStoreUserRule.md @@ -0,0 +1,148 @@ +--- +external help file: +Module Name: Az.Marketplace +online version: https://learn.microsoft.com/powershell/module/az.marketplace/get-azmarketplaceprivatestoreuserrule +schema: 2.0.0 +--- + +# Get-AzMarketplacePrivateStoreUserRule + +## SYNOPSIS +All rules approved in the private store that are relevant for user subscriptions + +## SYNTAX + +### QueryExpanded (Default) +``` +Get-AzMarketplacePrivateStoreUserRule -PrivateStoreId [-SubscriptionId ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### QueryViaIdentityExpanded +``` +Get-AzMarketplacePrivateStoreUserRule -InputObject [-SubscriptionId ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +All rules approved in the private store that are relevant for user subscriptions + +## EXAMPLES + +### Example 1: Get all applied rules for user subscriptions +```powershell +Get-AzMarketplacePrivateStoreUserRule -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -SubscriptionId 1f58b5dd-313c-42ed-84fc-f1e351bba7fb +``` + +All rules approved in the private store that are relevant for user subscriptions. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IMarketplaceIdentity +Parameter Sets: QueryViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -PrivateStoreId +The store ID - must use the tenant ID + +```yaml +Type: System.String +Parameter Sets: QueryExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +List of subscription IDs + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IMarketplaceIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IRuleListResponse + +## NOTES + +## RELATED LINKS + diff --git a/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplacePrivateStoreV1.md b/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplacePrivateStoreV1.md index 91b187139936..edfe692cc2a6 100644 --- a/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplacePrivateStoreV1.md +++ b/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplacePrivateStoreV1.md @@ -46,11 +46,11 @@ a260d38c-96cf-492d-a340-404d0c4b3ad6 Use This command Gets the private store details - ## PARAMETERS ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -119,24 +119,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.Api20210601.IPrivateStore +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IPrivateStore ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -INPUTOBJECT : Identity Parameter - - `[AdminRequestApprovalId ]`: The admin request approval ID to get create or update - - `[CollectionId ]`: The collection ID - - `[Id ]`: Resource identity path - - `[OfferId ]`: The offer ID to update or delete - - `[PrivateStoreId ]`: The store ID - must use the tenant ID - - `[RequestApprovalId ]`: The request approval ID to get create or update - ## RELATED LINKS diff --git a/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplaceQueryPrivateStoreOffer.md b/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplaceQueryPrivateStoreOffer.md index 6da6b2531575..4742cdf2808b 100644 --- a/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplaceQueryPrivateStoreOffer.md +++ b/src/Marketplace/Marketplace.Autorest/docs/Get-AzMarketplaceQueryPrivateStoreOffer.md @@ -50,7 +50,8 @@ This command returns private store offer regardless of collections ## PARAMETERS ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -135,24 +136,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.Api20210601.IQueryOffers +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IQueryOffers ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -INPUTOBJECT : Identity Parameter - - `[AdminRequestApprovalId ]`: The admin request approval ID to get create or update - - `[CollectionId ]`: The collection ID - - `[Id ]`: Resource identity path - - `[OfferId ]`: The offer ID to update or delete - - `[PrivateStoreId ]`: The store ID - must use the tenant ID - - `[RequestApprovalId ]`: The request approval ID to get create or update - ## RELATED LINKS diff --git a/src/Marketplace/Marketplace.Autorest/docs/New-AzMarketplacePrivateStore.md b/src/Marketplace/Marketplace.Autorest/docs/New-AzMarketplacePrivateStore.md index b92a4804a439..9fd941cc43c0 100644 --- a/src/Marketplace/Marketplace.Autorest/docs/New-AzMarketplacePrivateStore.md +++ b/src/Marketplace/Marketplace.Autorest/docs/New-AzMarketplacePrivateStore.md @@ -12,11 +12,24 @@ Changes private store properties ## SYNTAX +### CreateExpanded (Default) ``` -New-AzMarketplacePrivateStore -Id [-Availability ] [-Branding ] - [-ETag ] [-IsGov] [-NotificationSettingRecipient ] - [-NotificationSettingSendToAllMarketplaceAdmin] [-PrivateStoreName ] [-TenantId ] - [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +New-AzMarketplacePrivateStore -Id [-Availability ] [-Branding ] [-ETag ] + [-IsGov] [-NotificationSettingRecipient ] [-NotificationSettingSendToAllMarketplaceAdmin] + [-PrivateStoreName ] [-TenantId ] [-DefaultProfile ] [-PassThru] [-Confirm] + [-WhatIf] [] +``` + +### CreateViaJsonFilePath +``` +New-AzMarketplacePrivateStore -Id -JsonFilePath [-DefaultProfile ] [-PassThru] + [-Confirm] [-WhatIf] [] +``` + +### CreateViaJsonString +``` +New-AzMarketplacePrivateStore -Id -JsonString [-DefaultProfile ] [-PassThru] + [-Confirm] [-WhatIf] [] ``` ## DESCRIPTION @@ -37,8 +50,8 @@ This command changes private store properties. Indicates private store availability ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Support.Availability -Parameter Sets: (All) +Type: System.String +Parameter Sets: CreateExpanded Aliases: Required: False @@ -53,7 +66,7 @@ Gets or sets list of branding characteristics ```yaml Type: System.Collections.Hashtable -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -64,7 +77,8 @@ Accept wildcard characters: False ``` ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -83,7 +97,7 @@ Identifier for purposes of race condition ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -113,7 +127,7 @@ Is government ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -123,13 +137,43 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -JsonFilePath +Path of Json file supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -NotificationSettingRecipient Gets or sets list of notified recipients for new requests To construct, see NOTES section for NOTIFICATIONSETTINGRECIPIENT properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.Api20210601.IRecipient[] -Parameter Sets: (All) +Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IRecipient[] +Parameter Sets: CreateExpanded Aliases: Required: False @@ -144,7 +188,7 @@ Gets or sets whether to send email to all marketplace admins for new requests ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -174,7 +218,7 @@ Private Store Name ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -189,7 +233,7 @@ Tenant id ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -241,15 +285,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -NOTIFICATIONSETTINGRECIPIENT : Gets or sets list of notified recipients for new requests - - `[PrincipalId ]`: Principal ID - ## RELATED LINKS diff --git a/src/Marketplace/Marketplace.Autorest/docs/New-AzMarketplacePrivateStoreCollection.md b/src/Marketplace/Marketplace.Autorest/docs/New-AzMarketplacePrivateStoreCollection.md index b16d822dc7ba..256428b46644 100644 --- a/src/Marketplace/Marketplace.Autorest/docs/New-AzMarketplacePrivateStoreCollection.md +++ b/src/Marketplace/Marketplace.Autorest/docs/New-AzMarketplacePrivateStoreCollection.md @@ -8,18 +8,44 @@ schema: 2.0.0 # New-AzMarketplacePrivateStoreCollection ## SYNOPSIS -Create or update private store collection +Create private store collection ## SYNTAX +### CreateExpanded (Default) ``` New-AzMarketplacePrivateStoreCollection -CollectionId -PrivateStoreId [-AllSubscription] [-Claim ] [-CollectionName ] [-Enabled] [-SubscriptionsList ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] ``` +### CreateViaIdentityPrivateStore +``` +New-AzMarketplacePrivateStoreCollection -CollectionId -PrivateStoreInputObject + -Payload [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### CreateViaIdentityPrivateStoreExpanded +``` +New-AzMarketplacePrivateStoreCollection -CollectionId -PrivateStoreInputObject + [-AllSubscription] [-Claim ] [-CollectionName ] [-Enabled] [-SubscriptionsList ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### CreateViaJsonFilePath +``` +New-AzMarketplacePrivateStoreCollection -CollectionId -PrivateStoreId -JsonFilePath + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### CreateViaJsonString +``` +New-AzMarketplacePrivateStoreCollection -CollectionId -PrivateStoreId -JsonString + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + ## DESCRIPTION -Create or update private store collection +Create private store collection ## EXAMPLES @@ -43,7 +69,7 @@ Indicating whether all subscriptions are selected (=true) or not (=false). ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityPrivateStoreExpanded Aliases: Required: False @@ -58,7 +84,7 @@ Gets or sets the association with Commercial's Billing Account. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityPrivateStoreExpanded Aliases: Required: False @@ -88,7 +114,7 @@ Gets or sets collection name. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityPrivateStoreExpanded Aliases: Required: False @@ -99,7 +125,8 @@ Accept wildcard characters: False ``` ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -118,7 +145,7 @@ Indicating whether the collection is enabled or disabled. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityPrivateStoreExpanded Aliases: Required: False @@ -128,12 +155,58 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -JsonFilePath +Path of Json file supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Payload +The Collection data structure. +To construct, see NOTES section for PAYLOAD properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.ICollection +Parameter Sets: CreateViaIdentityPrivateStore +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -PrivateStoreId The store ID - must use the tenant ID ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaJsonFilePath, CreateViaJsonString Aliases: Required: True @@ -143,6 +216,22 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -PrivateStoreInputObject +Identity Parameter +To construct, see NOTES section for PRIVATESTOREINPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IMarketplaceIdentity +Parameter Sets: CreateViaIdentityPrivateStore, CreateViaIdentityPrivateStoreExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -SubscriptionsList Gets or sets subscription ids list. Empty list indicates all subscriptions are selected, null indicates no update is done, explicit list indicates the explicit selected subscriptions. @@ -150,7 +239,7 @@ On insert, null is considered as bad request ```yaml Type: System.String[] -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityPrivateStoreExpanded Aliases: Required: False @@ -196,13 +285,15 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.ICollection + +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IMarketplaceIdentity + ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.Api20210601.ICollection +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.ICollection ## NOTES -ALIASES - ## RELATED LINKS diff --git a/src/Marketplace/Marketplace.Autorest/docs/New-AzMarketplacePrivateStoreCollectionOffer.md b/src/Marketplace/Marketplace.Autorest/docs/New-AzMarketplacePrivateStoreCollectionOffer.md index 421fe7e824c0..7eb5bed063b8 100644 --- a/src/Marketplace/Marketplace.Autorest/docs/New-AzMarketplacePrivateStoreCollectionOffer.md +++ b/src/Marketplace/Marketplace.Autorest/docs/New-AzMarketplacePrivateStoreCollectionOffer.md @@ -12,12 +12,53 @@ Update or add an offer to a specific collection of the private store. ## SYNTAX +### CreateExpanded (Default) ``` New-AzMarketplacePrivateStoreCollectionOffer -CollectionId -OfferId -PrivateStoreId [-ETag ] [-IconFileUri ] [-Plan ] [-SpecificPlanIdLimitation ] [-UpdateSuppressedDueIdempotence] [-DefaultProfile ] [-Confirm] [-WhatIf] [] ``` +### CreateViaIdentityCollection +``` +New-AzMarketplacePrivateStoreCollectionOffer -CollectionInputObject -OfferId + -Payload [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### CreateViaIdentityCollectionExpanded +``` +New-AzMarketplacePrivateStoreCollectionOffer -CollectionInputObject -OfferId + [-ETag ] [-IconFileUri ] [-Plan ] [-SpecificPlanIdLimitation ] + [-UpdateSuppressedDueIdempotence] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### CreateViaIdentityPrivateStore +``` +New-AzMarketplacePrivateStoreCollectionOffer -CollectionId -OfferId + -PrivateStoreInputObject -Payload [-DefaultProfile ] [-Confirm] + [-WhatIf] [] +``` + +### CreateViaIdentityPrivateStoreExpanded +``` +New-AzMarketplacePrivateStoreCollectionOffer -CollectionId -OfferId + -PrivateStoreInputObject [-ETag ] [-IconFileUri ] [-Plan ] + [-SpecificPlanIdLimitation ] [-UpdateSuppressedDueIdempotence] [-DefaultProfile ] + [-Confirm] [-WhatIf] [] +``` + +### CreateViaJsonFilePath +``` +New-AzMarketplacePrivateStoreCollectionOffer -CollectionId -OfferId -PrivateStoreId + -JsonFilePath [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### CreateViaJsonString +``` +New-AzMarketplacePrivateStoreCollectionOffer -CollectionId -OfferId -PrivateStoreId + -JsonString [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + ## DESCRIPTION Update or add an offer to a specific collection of the private store. @@ -44,7 +85,7 @@ The collection ID ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityPrivateStore, CreateViaIdentityPrivateStoreExpanded, CreateViaJsonFilePath, CreateViaJsonString Aliases: Required: True @@ -54,8 +95,25 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -CollectionInputObject +Identity Parameter +To construct, see NOTES section for COLLECTIONINPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IMarketplaceIdentity +Parameter Sets: CreateViaIdentityCollection, CreateViaIdentityCollectionExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -74,7 +132,7 @@ Identifier for purposes of race condition ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityCollectionExpanded, CreateViaIdentityPrivateStoreExpanded Aliases: Required: False @@ -89,7 +147,7 @@ Icon File Uris ```yaml Type: System.Collections.Hashtable -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityCollectionExpanded, CreateViaIdentityPrivateStoreExpanded Aliases: Required: False @@ -99,6 +157,36 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -JsonFilePath +Path of Json file supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -OfferId The offer ID to update or delete @@ -114,13 +202,29 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Payload +The privateStore offer data structure. +To construct, see NOTES section for PAYLOAD properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IOffer +Parameter Sets: CreateViaIdentityCollection, CreateViaIdentityPrivateStore +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -Plan Offer plans To construct, see NOTES section for PLAN properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.Api20210601.IPlan[] -Parameter Sets: (All) +Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IPlan[] +Parameter Sets: CreateExpanded, CreateViaIdentityCollectionExpanded, CreateViaIdentityPrivateStoreExpanded Aliases: Required: False @@ -135,7 +239,7 @@ The store ID - must use the tenant ID ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaJsonFilePath, CreateViaJsonString Aliases: Required: True @@ -145,12 +249,28 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -PrivateStoreInputObject +Identity Parameter +To construct, see NOTES section for PRIVATESTOREINPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IMarketplaceIdentity +Parameter Sets: CreateViaIdentityPrivateStore, CreateViaIdentityPrivateStoreExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -SpecificPlanIdLimitation Plan ids limitation for this offer ```yaml Type: System.String[] -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityCollectionExpanded, CreateViaIdentityPrivateStoreExpanded Aliases: Required: False @@ -166,7 +286,7 @@ If the allow list is identical to the existed one in db, the offer would not be ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityCollectionExpanded, CreateViaIdentityPrivateStoreExpanded Aliases: Required: False @@ -212,21 +332,15 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -## OUTPUTS +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IMarketplaceIdentity -### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.Api20210601.IOffer +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IOffer -## NOTES - -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. +## OUTPUTS +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IOffer -PLAN : Offer plans - - `[Accessibility ]`: Plan accessibility +## NOTES ## RELATED LINKS diff --git a/src/Marketplace/Marketplace.Autorest/docs/New-AzMarketplacePrivateStoreCollectionOfferMultiContext.md b/src/Marketplace/Marketplace.Autorest/docs/New-AzMarketplacePrivateStoreCollectionOfferMultiContext.md new file mode 100644 index 000000000000..e5174e7303b2 --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/docs/New-AzMarketplacePrivateStoreCollectionOfferMultiContext.md @@ -0,0 +1,269 @@ +--- +external help file: +Module Name: Az.Marketplace +online version: https://learn.microsoft.com/powershell/module/az.marketplace/new-azmarketplaceprivatestorecollectionoffermulticontext +schema: 2.0.0 +--- + +# New-AzMarketplacePrivateStoreCollectionOfferMultiContext + +## SYNOPSIS +Upsert an offer with multiple context details. + +## SYNTAX + +### OfferExpanded (Default) +``` +New-AzMarketplacePrivateStoreCollectionOfferMultiContext -CollectionId -OfferId + -PrivateStoreId [-ETag ] [-PlansContext ] + [-PropertiesOfferId ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### OfferViaIdentityCollectionExpanded +``` +New-AzMarketplacePrivateStoreCollectionOfferMultiContext -CollectionInputObject + -OfferId [-ETag ] [-PlansContext ] [-PropertiesOfferId ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### OfferViaIdentityExpanded +``` +New-AzMarketplacePrivateStoreCollectionOfferMultiContext -InputObject + [-OfferId ] [-ETag ] [-PlansContext ] [-DefaultProfile ] + [-Confirm] [-WhatIf] [] +``` + +### OfferViaIdentityPrivateStoreExpanded +``` +New-AzMarketplacePrivateStoreCollectionOfferMultiContext -CollectionId -OfferId + -PrivateStoreInputObject [-ETag ] [-PlansContext ] + [-PropertiesOfferId ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Upsert an offer with multiple context details. + +## EXAMPLES + +### Example 1: Upsert an offer with multiple contexts +```powershell +$plan1 = @{ + context = "1f58b5dd-313c-42ed-84fc-f1e351bba7fb" + planId = "plan1" +} + +$plan2 = @{ + context = "ab3de7bc-7a6e-4e9f-a34a-f6922df453e4" + planId = "plan2" +} + +$plans = @($plan1,$plan2) + +New-AzMarketplacePrivateStoreCollectionOfferMultiContext -CollectionId fdb889a1-cf3e-49f0-95b8-2bb012fa01f1 -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -OfferId test_pmc2pc1.vm_4plans -PlansContext $plans +``` + +Upsert an offer with multiple context details. + +## PARAMETERS + +### -CollectionId +The collection ID + +```yaml +Type: System.String +Parameter Sets: OfferExpanded, OfferViaIdentityPrivateStoreExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CollectionInputObject +Identity Parameter +To construct, see NOTES section for COLLECTIONINPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IMarketplaceIdentity +Parameter Sets: OfferViaIdentityCollectionExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ETag +The offer's eTag. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IMarketplaceIdentity +Parameter Sets: OfferViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -OfferId +The offer ID to update or delete + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PlansContext +. +To construct, see NOTES section for PLANSCONTEXT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IContextAndPlansDetails[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrivateStoreId +The store ID - must use the tenant ID + +```yaml +Type: System.String +Parameter Sets: OfferExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrivateStoreInputObject +Identity Parameter +To construct, see NOTES section for PRIVATESTOREINPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IMarketplaceIdentity +Parameter Sets: OfferViaIdentityPrivateStoreExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -PropertiesOfferId +The offer ID which contains the plans. + +```yaml +Type: System.String +Parameter Sets: OfferExpanded, OfferViaIdentityCollectionExpanded, OfferViaIdentityPrivateStoreExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IMarketplaceIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IOffer + +## NOTES + +## RELATED LINKS + diff --git a/src/Marketplace/Marketplace.Autorest/docs/README.md b/src/Marketplace/Marketplace.Autorest/docs/README.md index cc81f48be752..ac709929b514 100644 --- a/src/Marketplace/Marketplace.Autorest/docs/README.md +++ b/src/Marketplace/Marketplace.Autorest/docs/README.md @@ -1,5 +1,5 @@ # Docs -This directory contains the documentation of the cmdlets for the `Az.Marketplace` module. To run documentation generation, use the `generate-help.ps1` script at the root module folder. Files in this folder will *always be overridden on regeneration*. To update documentation examples, please use the `../examples` folder. +This directory contains the documentation of the cmdlets for the `Az.Marketplace` module. To run documentation generation, use the `generate-help.ps1` script at the root module folder. Files in this folder will *always be overridden on regeneration*. To update documentation examples, please use the `..\examples` folder. ## Info - Modifiable: no @@ -8,4 +8,4 @@ This directory contains the documentation of the cmdlets for the `Az.Marketplace - Packaged: yes ## Details -The process of documentation generation loads `Az.Marketplace` and analyzes the exported cmdlets from the module. It recognizes the [help comments](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) that are generated into the scripts in the `../exports` folder. Additionally, when writing custom cmdlets in the `../custom` folder, you can use the help comments syntax, which decorate the exported scripts at build-time. The documentation examples are taken from the `../examples` folder. \ No newline at end of file +The process of documentation generation loads `Az.Marketplace` and analyzes the exported cmdlets from the module. It recognizes the [help comments](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) that are generated into the scripts in the `..\exports` folder. Additionally, when writing custom cmdlets in the `..\custom` folder, you can use the help comments syntax, which decorate the exported scripts at build-time. The documentation examples are taken from the `..\examples` folder. \ No newline at end of file diff --git a/src/Marketplace/Marketplace.Autorest/docs/Remove-AzMarketplacePrivateStoreCollection.md b/src/Marketplace/Marketplace.Autorest/docs/Remove-AzMarketplacePrivateStoreCollection.md index 130e36661ddd..5b42823623be 100644 --- a/src/Marketplace/Marketplace.Autorest/docs/Remove-AzMarketplacePrivateStoreCollection.md +++ b/src/Marketplace/Marketplace.Autorest/docs/Remove-AzMarketplacePrivateStoreCollection.md @@ -24,6 +24,13 @@ Remove-AzMarketplacePrivateStoreCollection -InputObject [ [-PassThru] [-Confirm] [-WhatIf] [] ``` +### DeleteViaIdentityPrivateStore +``` +Remove-AzMarketplacePrivateStoreCollection -CollectionId + -PrivateStoreInputObject [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] + [] +``` + ## DESCRIPTION Delete a collection from the given private store. @@ -43,7 +50,7 @@ The collection ID ```yaml Type: System.String -Parameter Sets: Delete +Parameter Sets: Delete, DeleteViaIdentityPrivateStore Aliases: Required: True @@ -54,7 +61,8 @@ Accept wildcard characters: False ``` ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -114,6 +122,22 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -PrivateStoreInputObject +Identity Parameter +To construct, see NOTES section for PRIVATESTOREINPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IMarketplaceIdentity +Parameter Sets: DeleteViaIdentityPrivateStore +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -Confirm Prompts you for confirmation before running the cmdlet. @@ -158,20 +182,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -INPUTOBJECT : Identity Parameter - - `[AdminRequestApprovalId ]`: The admin request approval ID to get create or update - - `[CollectionId ]`: The collection ID - - `[Id ]`: Resource identity path - - `[OfferId ]`: The offer ID to update or delete - - `[PrivateStoreId ]`: The store ID - must use the tenant ID - - `[RequestApprovalId ]`: The request approval ID to get create or update - ## RELATED LINKS diff --git a/src/Marketplace/Marketplace.Autorest/docs/Remove-AzMarketplacePrivateStoreCollectionOffer.md b/src/Marketplace/Marketplace.Autorest/docs/Remove-AzMarketplacePrivateStoreCollectionOffer.md index 7fe1d95389e3..5192c5bc3ebe 100644 --- a/src/Marketplace/Marketplace.Autorest/docs/Remove-AzMarketplacePrivateStoreCollectionOffer.md +++ b/src/Marketplace/Marketplace.Autorest/docs/Remove-AzMarketplacePrivateStoreCollectionOffer.md @@ -24,6 +24,19 @@ Remove-AzMarketplacePrivateStoreCollectionOffer -InputObject ] [-PassThru] [-Confirm] [-WhatIf] [] ``` +### DeleteViaIdentityCollection +``` +Remove-AzMarketplacePrivateStoreCollectionOffer -CollectionInputObject + -OfferId [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentityPrivateStore +``` +Remove-AzMarketplacePrivateStoreCollectionOffer -CollectionId -OfferId + -PrivateStoreInputObject [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] + [] +``` + ## DESCRIPTION Deletes an offer from the given collection of private store. @@ -43,7 +56,7 @@ The collection ID ```yaml Type: System.String -Parameter Sets: Delete +Parameter Sets: Delete, DeleteViaIdentityPrivateStore Aliases: Required: True @@ -53,8 +66,25 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -CollectionInputObject +Identity Parameter +To construct, see NOTES section for COLLECTIONINPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IMarketplaceIdentity +Parameter Sets: DeleteViaIdentityCollection +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -89,7 +119,7 @@ The offer ID to update or delete ```yaml Type: System.String -Parameter Sets: Delete +Parameter Sets: Delete, DeleteViaIdentityCollection, DeleteViaIdentityPrivateStore Aliases: Required: True @@ -129,6 +159,22 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -PrivateStoreInputObject +Identity Parameter +To construct, see NOTES section for PRIVATESTOREINPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IMarketplaceIdentity +Parameter Sets: DeleteViaIdentityPrivateStore +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -Confirm Prompts you for confirmation before running the cmdlet. @@ -173,20 +219,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -INPUTOBJECT : Identity Parameter - - `[AdminRequestApprovalId ]`: The admin request approval ID to get create or update - - `[CollectionId ]`: The collection ID - - `[Id ]`: Resource identity path - - `[OfferId ]`: The offer ID to update or delete - - `[PrivateStoreId ]`: The store ID - must use the tenant ID - - `[RequestApprovalId ]`: The request approval ID to get create or update - ## RELATED LINKS diff --git a/src/Marketplace/Marketplace.Autorest/docs/Set-AzMarketplaceBulkPrivateStoreCollectionAction.md b/src/Marketplace/Marketplace.Autorest/docs/Set-AzMarketplaceBulkPrivateStoreCollectionAction.md index f57f145c0264..390e3a44b772 100644 --- a/src/Marketplace/Marketplace.Autorest/docs/Set-AzMarketplaceBulkPrivateStoreCollectionAction.md +++ b/src/Marketplace/Marketplace.Autorest/docs/Set-AzMarketplaceBulkPrivateStoreCollectionAction.md @@ -24,6 +24,18 @@ Set-AzMarketplaceBulkPrivateStoreCollectionAction -PrivateStoreId -Payl [-DefaultProfile ] [-Confirm] [-WhatIf] [] ``` +### BulkViaJsonFilePath +``` +Set-AzMarketplaceBulkPrivateStoreCollectionAction -PrivateStoreId -JsonFilePath + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### BulkViaJsonString +``` +Set-AzMarketplaceBulkPrivateStoreCollectionAction -PrivateStoreId -JsonString + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + ## DESCRIPTION Perform an action on bulk collections @@ -75,7 +87,8 @@ Accept wildcard characters: False ``` ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -89,12 +102,42 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -JsonFilePath +Path of Json file supplied to the Bulk operation + +```yaml +Type: System.String +Parameter Sets: BulkViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Bulk operation + +```yaml +Type: System.String +Parameter Sets: BulkViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Payload Bulk collections action properties To construct, see NOTES section for PAYLOAD properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.Api20210601.IBulkCollectionsPayload +Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IBulkCollectionsPayload Parameter Sets: Bulk Aliases: @@ -156,24 +199,13 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.Api20210601.IBulkCollectionsPayload +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IBulkCollectionsPayload ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.Api20210601.IBulkCollectionsResponse +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IBulkCollectionsResponse ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -PAYLOAD : Bulk collections action properties - - `[Action ]`: Action to perform (For example: EnableCollections, DisableCollections) - - `[CollectionId ]`: collection ids list that the action is performed on - ## RELATED LINKS diff --git a/src/Marketplace/Marketplace.Autorest/docs/Set-AzMarketplacePrivateStore.md b/src/Marketplace/Marketplace.Autorest/docs/Set-AzMarketplacePrivateStore.md index cb885cdccc93..8ed6173cc115 100644 --- a/src/Marketplace/Marketplace.Autorest/docs/Set-AzMarketplacePrivateStore.md +++ b/src/Marketplace/Marketplace.Autorest/docs/Set-AzMarketplacePrivateStore.md @@ -12,11 +12,24 @@ Changes private store properties ## SYNTAX +### UpdateExpanded (Default) ``` -Set-AzMarketplacePrivateStore -Id [-Availability ] [-Branding ] - [-ETag ] [-IsGov] [-NotificationSettingRecipient ] - [-NotificationSettingSendToAllMarketplaceAdmin] [-PrivateStoreName ] [-TenantId ] - [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +Set-AzMarketplacePrivateStore -Id [-Availability ] [-Branding ] [-ETag ] + [-IsGov] [-NotificationSettingRecipient ] [-NotificationSettingSendToAllMarketplaceAdmin] + [-PrivateStoreName ] [-TenantId ] [-DefaultProfile ] [-PassThru] [-Confirm] + [-WhatIf] [] +``` + +### UpdateViaJsonFilePath +``` +Set-AzMarketplacePrivateStore -Id -JsonFilePath [-DefaultProfile ] [-PassThru] + [-Confirm] [-WhatIf] [] +``` + +### UpdateViaJsonString +``` +Set-AzMarketplacePrivateStore -Id -JsonString [-DefaultProfile ] [-PassThru] + [-Confirm] [-WhatIf] [] ``` ## DESCRIPTION @@ -37,8 +50,8 @@ This command changes private store properties Indicates private store availability ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Support.Availability -Parameter Sets: (All) +Type: System.String +Parameter Sets: UpdateExpanded Aliases: Required: False @@ -53,7 +66,7 @@ Gets or sets list of branding characteristics ```yaml Type: System.Collections.Hashtable -Parameter Sets: (All) +Parameter Sets: UpdateExpanded Aliases: Required: False @@ -64,7 +77,8 @@ Accept wildcard characters: False ``` ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -83,7 +97,7 @@ Identifier for purposes of race condition ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: UpdateExpanded Aliases: Required: False @@ -113,7 +127,7 @@ Is government ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: UpdateExpanded Aliases: Required: False @@ -123,13 +137,43 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -JsonFilePath +Path of Json file supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -NotificationSettingRecipient Gets or sets list of notified recipients for new requests To construct, see NOTES section for NOTIFICATIONSETTINGRECIPIENT properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.Api20210601.IRecipient[] -Parameter Sets: (All) +Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IRecipient[] +Parameter Sets: UpdateExpanded Aliases: Required: False @@ -144,7 +188,7 @@ Gets or sets whether to send email to all marketplace admins for new requests ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: UpdateExpanded Aliases: Required: False @@ -174,7 +218,7 @@ Private Store Name ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: UpdateExpanded Aliases: Required: False @@ -189,7 +233,7 @@ Tenant id ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: UpdateExpanded Aliases: Required: False @@ -241,15 +285,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -NOTIFICATIONSETTINGRECIPIENT : Gets or sets list of notified recipients for new requests - - `[PrincipalId ]`: Principal ID - ## RELATED LINKS diff --git a/src/Marketplace/Marketplace.Autorest/docs/Set-AzMarketplacePrivateStoreCollection.md b/src/Marketplace/Marketplace.Autorest/docs/Set-AzMarketplacePrivateStoreCollection.md index dbcfc20a39d5..ef2370c92486 100644 --- a/src/Marketplace/Marketplace.Autorest/docs/Set-AzMarketplacePrivateStoreCollection.md +++ b/src/Marketplace/Marketplace.Autorest/docs/Set-AzMarketplacePrivateStoreCollection.md @@ -8,18 +8,31 @@ schema: 2.0.0 # Set-AzMarketplacePrivateStoreCollection ## SYNOPSIS -Create or update private store collection +Create private store collection ## SYNTAX +### UpdateExpanded (Default) ``` Set-AzMarketplacePrivateStoreCollection -CollectionId -PrivateStoreId [-AllSubscription] [-Claim ] [-CollectionName ] [-Enabled] [-SubscriptionsList ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] ``` +### UpdateViaJsonFilePath +``` +Set-AzMarketplacePrivateStoreCollection -CollectionId -PrivateStoreId -JsonFilePath + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaJsonString +``` +Set-AzMarketplacePrivateStoreCollection -CollectionId -PrivateStoreId -JsonString + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + ## DESCRIPTION -Create or update private store collection +Create private store collection ## EXAMPLES @@ -43,7 +56,7 @@ Indicating whether all subscriptions are selected (=true) or not (=false). ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: UpdateExpanded Aliases: Required: False @@ -58,7 +71,7 @@ Gets or sets the association with Commercial's Billing Account. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: UpdateExpanded Aliases: Required: False @@ -88,7 +101,7 @@ Gets or sets collection name. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: UpdateExpanded Aliases: Required: False @@ -99,7 +112,8 @@ Accept wildcard characters: False ``` ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -118,7 +132,7 @@ Indicating whether the collection is enabled or disabled. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: UpdateExpanded Aliases: Required: False @@ -128,6 +142,36 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -JsonFilePath +Path of Json file supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -PrivateStoreId The store ID - must use the tenant ID @@ -150,7 +194,7 @@ On insert, null is considered as bad request ```yaml Type: System.String[] -Parameter Sets: (All) +Parameter Sets: UpdateExpanded Aliases: Required: False @@ -198,11 +242,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.Api20210601.ICollection +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.ICollection ## NOTES -ALIASES - ## RELATED LINKS diff --git a/src/Marketplace/Marketplace.Autorest/docs/Set-AzMarketplacePrivateStoreCollectionOffer.md b/src/Marketplace/Marketplace.Autorest/docs/Set-AzMarketplacePrivateStoreCollectionOffer.md index 93b335586afe..c7829d6ca959 100644 --- a/src/Marketplace/Marketplace.Autorest/docs/Set-AzMarketplacePrivateStoreCollectionOffer.md +++ b/src/Marketplace/Marketplace.Autorest/docs/Set-AzMarketplacePrivateStoreCollectionOffer.md @@ -12,12 +12,25 @@ Update or add an offer to a specific collection of the private store. ## SYNTAX +### UpdateExpanded (Default) ``` Set-AzMarketplacePrivateStoreCollectionOffer -CollectionId -OfferId -PrivateStoreId [-ETag ] [-IconFileUri ] [-Plan ] [-SpecificPlanIdLimitation ] [-UpdateSuppressedDueIdempotence] [-DefaultProfile ] [-Confirm] [-WhatIf] [] ``` +### UpdateViaJsonFilePath +``` +Set-AzMarketplacePrivateStoreCollectionOffer -CollectionId -OfferId -PrivateStoreId + -JsonFilePath [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaJsonString +``` +Set-AzMarketplacePrivateStoreCollectionOffer -CollectionId -OfferId -PrivateStoreId + -JsonString [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + ## DESCRIPTION Update or add an offer to a specific collection of the private store. @@ -55,7 +68,8 @@ Accept wildcard characters: False ``` ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -74,7 +88,7 @@ Identifier for purposes of race condition ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: UpdateExpanded Aliases: Required: False @@ -89,7 +103,7 @@ Icon File Uris ```yaml Type: System.Collections.Hashtable -Parameter Sets: (All) +Parameter Sets: UpdateExpanded Aliases: Required: False @@ -99,6 +113,36 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -JsonFilePath +Path of Json file supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -OfferId The offer ID to update or delete @@ -119,8 +163,8 @@ Offer plans To construct, see NOTES section for PLAN properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.Api20210601.IPlan[] -Parameter Sets: (All) +Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IPlan[] +Parameter Sets: UpdateExpanded Aliases: Required: False @@ -150,7 +194,7 @@ Plan ids limitation for this offer ```yaml Type: System.String[] -Parameter Sets: (All) +Parameter Sets: UpdateExpanded Aliases: Required: False @@ -166,7 +210,7 @@ If the allow list is identical to the existed one in db, the offer would not be ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: UpdateExpanded Aliases: Required: False @@ -214,19 +258,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.Api20210601.IOffer +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IOffer ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -PLAN : Offer plans - - `[Accessibility ]`: Plan accessibility - ## RELATED LINKS diff --git a/src/Marketplace/Marketplace.Autorest/docs/Test-AzMarketplacePrivateStoreAnyExistingOffer.md b/src/Marketplace/Marketplace.Autorest/docs/Test-AzMarketplacePrivateStoreAnyExistingOffer.md new file mode 100644 index 000000000000..19a28dc97b11 --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/docs/Test-AzMarketplacePrivateStoreAnyExistingOffer.md @@ -0,0 +1,133 @@ +--- +external help file: +Module Name: Az.Marketplace +online version: https://learn.microsoft.com/powershell/module/az.marketplace/test-azmarketplaceprivatestoreanyexistingoffer +schema: 2.0.0 +--- + +# Test-AzMarketplacePrivateStoreAnyExistingOffer + +## SYNOPSIS +Query whether exists any offer in the collections. + +## SYNTAX + +### Any (Default) +``` +Test-AzMarketplacePrivateStoreAnyExistingOffer -PrivateStoreId [-DefaultProfile ] + [-Confirm] [-WhatIf] [] +``` + +### AnyViaIdentity +``` +Test-AzMarketplacePrivateStoreAnyExistingOffer -InputObject + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Query whether exists any offer in the collections. + +## EXAMPLES + +### Example 1: Check if exists any offer in the collections. +```powershell +Test-AzMarketplacePrivateStoreAnyExistingOffer -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 +``` + +Query whether exists any offer in the collections. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IMarketplaceIdentity +Parameter Sets: AnyViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -PrivateStoreId +The store ID - must use the tenant ID + +```yaml +Type: System.String +Parameter Sets: Any +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IMarketplaceIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IAnyExistingOffersInTheCollectionsResponse + +## NOTES + +## RELATED LINKS + diff --git a/src/Marketplace/Marketplace.Autorest/docs/Update-AzMarketplacePrivateStoreCollection.md b/src/Marketplace/Marketplace.Autorest/docs/Update-AzMarketplacePrivateStoreCollection.md new file mode 100644 index 000000000000..ca9b3bced60e --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/docs/Update-AzMarketplacePrivateStoreCollection.md @@ -0,0 +1,276 @@ +--- +external help file: +Module Name: Az.Marketplace +online version: https://learn.microsoft.com/powershell/module/az.marketplace/update-azmarketplaceprivatestorecollection +schema: 2.0.0 +--- + +# Update-AzMarketplacePrivateStoreCollection + +## SYNOPSIS +Create private store collection + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzMarketplacePrivateStoreCollection -CollectionId -PrivateStoreId [-AllSubscription] + [-Claim ] [-CollectionName ] [-Enabled] [-SubscriptionsList ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzMarketplacePrivateStoreCollection -InputObject [-AllSubscription] + [-Claim ] [-CollectionName ] [-Enabled] [-SubscriptionsList ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityPrivateStore +``` +Update-AzMarketplacePrivateStoreCollection -CollectionId + -PrivateStoreInputObject -Payload [-DefaultProfile ] + [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityPrivateStoreExpanded +``` +Update-AzMarketplacePrivateStoreCollection -CollectionId + -PrivateStoreInputObject [-AllSubscription] [-Claim ] + [-CollectionName ] [-Enabled] [-SubscriptionsList ] [-DefaultProfile ] [-Confirm] + [-WhatIf] [] +``` + +## DESCRIPTION +Create private store collection + +## EXAMPLES + +### Example 1: Update private store collection +```powershell +Update-AzMarketplacePrivateStoreCollection -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -CollectionId 8c7a91db-cd41-43b6-af47-2e869654126d -Enabled +``` + +Update private store collection. + +## PARAMETERS + +### -AllSubscription +Indicating whether all subscriptions are selected (=true) or not (=false). + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded, UpdateViaIdentityPrivateStoreExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Claim +Gets or sets the association with Commercial's Billing Account. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded, UpdateViaIdentityPrivateStoreExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CollectionId +The collection ID + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityPrivateStore, UpdateViaIdentityPrivateStoreExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CollectionName +Gets or sets collection name. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded, UpdateViaIdentityPrivateStoreExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Enabled +Indicating whether the collection is enabled or disabled. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded, UpdateViaIdentityPrivateStoreExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IMarketplaceIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Payload +The Collection data structure. +To construct, see NOTES section for PAYLOAD properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.ICollection +Parameter Sets: UpdateViaIdentityPrivateStore +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -PrivateStoreId +The store ID - must use the tenant ID + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrivateStoreInputObject +Identity Parameter +To construct, see NOTES section for PRIVATESTOREINPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IMarketplaceIdentity +Parameter Sets: UpdateViaIdentityPrivateStore, UpdateViaIdentityPrivateStoreExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -SubscriptionsList +Gets or sets subscription ids list. +Empty list indicates all subscriptions are selected, null indicates no update is done, explicit list indicates the explicit selected subscriptions. +On insert, null is considered as bad request + +```yaml +Type: System.String[] +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded, UpdateViaIdentityPrivateStoreExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.ICollection + +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IMarketplaceIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.ICollection + +## NOTES + +## RELATED LINKS + diff --git a/src/Marketplace/Marketplace.Autorest/docs/Update-AzMarketplacePrivateStoreCollectionOffer.md b/src/Marketplace/Marketplace.Autorest/docs/Update-AzMarketplacePrivateStoreCollectionOffer.md new file mode 100644 index 000000000000..2c5854966b90 --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/docs/Update-AzMarketplacePrivateStoreCollectionOffer.md @@ -0,0 +1,322 @@ +--- +external help file: +Module Name: Az.Marketplace +online version: https://learn.microsoft.com/powershell/module/az.marketplace/update-azmarketplaceprivatestorecollectionoffer +schema: 2.0.0 +--- + +# Update-AzMarketplacePrivateStoreCollectionOffer + +## SYNOPSIS +Update or add an offer to a specific collection of the private store. + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzMarketplacePrivateStoreCollectionOffer -CollectionId -OfferId + -PrivateStoreId [-ETag ] [-IconFileUri ] [-Plan ] + [-SpecificPlanIdLimitation ] [-UpdateSuppressedDueIdempotence] [-DefaultProfile ] + [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityCollection +``` +Update-AzMarketplacePrivateStoreCollectionOffer -CollectionInputObject + -OfferId -Payload [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityCollectionExpanded +``` +Update-AzMarketplacePrivateStoreCollectionOffer -CollectionInputObject + -OfferId [-ETag ] [-IconFileUri ] [-Plan ] + [-SpecificPlanIdLimitation ] [-UpdateSuppressedDueIdempotence] [-DefaultProfile ] + [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzMarketplacePrivateStoreCollectionOffer -InputObject [-ETag ] + [-IconFileUri ] [-Plan ] [-SpecificPlanIdLimitation ] + [-UpdateSuppressedDueIdempotence] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityPrivateStore +``` +Update-AzMarketplacePrivateStoreCollectionOffer -CollectionId -OfferId + -PrivateStoreInputObject -Payload [-DefaultProfile ] [-Confirm] + [-WhatIf] [] +``` + +### UpdateViaIdentityPrivateStoreExpanded +``` +Update-AzMarketplacePrivateStoreCollectionOffer -CollectionId -OfferId + -PrivateStoreInputObject [-ETag ] [-IconFileUri ] [-Plan ] + [-SpecificPlanIdLimitation ] [-UpdateSuppressedDueIdempotence] [-DefaultProfile ] + [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Update or add an offer to a specific collection of the private store. + +## EXAMPLES + +### Example 1: Update private store collection offer +```powershell +Update-AzMarketplacePrivateStoreCollectionOffer -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -CollectionId 8c7a91db-cd41-43b6-af47-2e869654126d -OfferId "aumatics.azure_managedservices" -SpecificPlanIdLimitation $null +``` + +Update private store collection offer. + +## PARAMETERS + +### -CollectionId +The collection ID + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityPrivateStore, UpdateViaIdentityPrivateStoreExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CollectionInputObject +Identity Parameter +To construct, see NOTES section for COLLECTIONINPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IMarketplaceIdentity +Parameter Sets: UpdateViaIdentityCollection, UpdateViaIdentityCollectionExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ETag +Identifier for purposes of race condition + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityCollectionExpanded, UpdateViaIdentityExpanded, UpdateViaIdentityPrivateStoreExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IconFileUri +Icon File Uris + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: UpdateExpanded, UpdateViaIdentityCollectionExpanded, UpdateViaIdentityExpanded, UpdateViaIdentityPrivateStoreExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IMarketplaceIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -OfferId +The offer ID to update or delete + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityCollection, UpdateViaIdentityCollectionExpanded, UpdateViaIdentityPrivateStore, UpdateViaIdentityPrivateStoreExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Payload +The privateStore offer data structure. +To construct, see NOTES section for PAYLOAD properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IOffer +Parameter Sets: UpdateViaIdentityCollection, UpdateViaIdentityPrivateStore +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Plan +Offer plans +To construct, see NOTES section for PLAN properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IPlan[] +Parameter Sets: UpdateExpanded, UpdateViaIdentityCollectionExpanded, UpdateViaIdentityExpanded, UpdateViaIdentityPrivateStoreExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrivateStoreId +The store ID - must use the tenant ID + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrivateStoreInputObject +Identity Parameter +To construct, see NOTES section for PRIVATESTOREINPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IMarketplaceIdentity +Parameter Sets: UpdateViaIdentityPrivateStore, UpdateViaIdentityPrivateStoreExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -SpecificPlanIdLimitation +Plan ids limitation for this offer + +```yaml +Type: System.String[] +Parameter Sets: UpdateExpanded, UpdateViaIdentityCollectionExpanded, UpdateViaIdentityExpanded, UpdateViaIdentityPrivateStoreExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UpdateSuppressedDueIdempotence +Indicating whether the offer was not updated to db (true = not updated). +If the allow list is identical to the existed one in db, the offer would not be updated. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: UpdateExpanded, UpdateViaIdentityCollectionExpanded, UpdateViaIdentityExpanded, UpdateViaIdentityPrivateStoreExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IMarketplaceIdentity + +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IOffer + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.IOffer + +## NOTES + +## RELATED LINKS + diff --git a/src/Marketplace/Marketplace.Autorest/examples/Disable-AzMarketplacePrivateStoreCollectionAllItem.md b/src/Marketplace/Marketplace.Autorest/examples/Disable-AzMarketplacePrivateStoreCollectionAllItem.md new file mode 100644 index 000000000000..2441b0212f61 --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/examples/Disable-AzMarketplacePrivateStoreCollectionAllItem.md @@ -0,0 +1,6 @@ +### Example 1: Disable approve-all-items for a collection +```powershell +Disable-AzMarketplacePrivateStoreCollectionAllItem -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -CollectionId fdb889a1-cf3e-49f0-95b8-2bb012fa0188 +``` + +Disable approve all items for a collection. \ No newline at end of file diff --git a/src/Marketplace/Marketplace.Autorest/examples/Enable-AzMarketplacePrivateStoreCollectionAllItem.md b/src/Marketplace/Marketplace.Autorest/examples/Enable-AzMarketplacePrivateStoreCollectionAllItem.md new file mode 100644 index 000000000000..e2f6a1aeb0fd --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/examples/Enable-AzMarketplacePrivateStoreCollectionAllItem.md @@ -0,0 +1,6 @@ +### Example 1: Enable approve-all-items for a collection +```powershell +Enable-AzMarketplacePrivateStoreCollectionAllItem -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -CollectionId fdb889a1-cf3e-49f0-95b8-2bb012fa0188 +``` + +Delete all existing offers from the collection and enable approve all items. \ No newline at end of file diff --git a/src/Marketplace/Marketplace.Autorest/examples/Get-AzMarketplaceCollectionToSubscriptionMapping.md b/src/Marketplace/Marketplace.Autorest/examples/Get-AzMarketplaceCollectionToSubscriptionMapping.md index 126fac14ed8b..2f5612438f38 100644 --- a/src/Marketplace/Marketplace.Autorest/examples/Get-AzMarketplaceCollectionToSubscriptionMapping.md +++ b/src/Marketplace/Marketplace.Autorest/examples/Get-AzMarketplaceCollectionToSubscriptionMapping.md @@ -1,4 +1,4 @@ -### Example 1: For a given subscriptions list, the Cmdlet will return a map of collections and the related subscriptions from the supplied list. +### Example 1: Map subscriptions to collections ```powershell $res = Get-AzMarketplaceCollectionToSubscriptionMapping -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -Payload @{SubscriptionId = "53425a7b-4ac1-4729-8340-e1da5046212c"} $res.keys @@ -9,6 +9,4 @@ e58535dc-1be3-4d2c-904c-1f97984ebe5d fdb889a1-cf3e-49f0-95b8-2bb012fa01f1 ``` -This command For a given subscriptions list, will return a map of collections and the related subscriptions from the supplied list. - - +This command For a given subscriptions list, will return a map of collections and the related subscriptions from the supplied list. \ No newline at end of file diff --git a/src/Marketplace/Marketplace.Autorest/examples/Get-AzMarketplacePrivateStoreAllSubscriptionInTenant.md b/src/Marketplace/Marketplace.Autorest/examples/Get-AzMarketplacePrivateStoreAllSubscriptionInTenant.md new file mode 100644 index 000000000000..0374f5c75d6e --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/examples/Get-AzMarketplacePrivateStoreAllSubscriptionInTenant.md @@ -0,0 +1,6 @@ +### Example 1: Fetch all subscriptions in a tenant +```powershell +Get-AzMarketplacePrivateStoreAllSubscriptionInTenant -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 +``` + +Fetch all subscriptions in tenant, only for marketplace admin. \ No newline at end of file diff --git a/src/Marketplace/Marketplace.Autorest/examples/Get-AzMarketplacePrivateStoreCollection.md b/src/Marketplace/Marketplace.Autorest/examples/Get-AzMarketplacePrivateStoreCollection.md index db0a5fe7c0ba..0354b0b7b787 100644 --- a/src/Marketplace/Marketplace.Autorest/examples/Get-AzMarketplacePrivateStoreCollection.md +++ b/src/Marketplace/Marketplace.Autorest/examples/Get-AzMarketplacePrivateStoreCollection.md @@ -11,7 +11,7 @@ Name SystemDataCreatedAt SystemDataCreatedBy Sy ``` -This command gets list of private store collections +This command gets list of private store collections. diff --git a/src/Marketplace/Marketplace.Autorest/examples/Get-AzMarketplacePrivateStoreCollectionMapOffersToContext.md b/src/Marketplace/Marketplace.Autorest/examples/Get-AzMarketplacePrivateStoreCollectionMapOffersToContext.md new file mode 100644 index 000000000000..91690533430f --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/examples/Get-AzMarketplacePrivateStoreCollectionMapOffersToContext.md @@ -0,0 +1,6 @@ +### Example 1: Map offers to subscriptions +```powershell +Get-AzMarketplacePrivateStoreCollectionMapOffersToContext -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -CollectionId a260d38c-96cf-492d-a340-404d0c4b3ad6 -SubscriptionId 1f58b5dd-313c-42ed-84fc-f1e351bba7fb,ab3de7bc-7a6e-4e9f-a34a-f6922df453e4 +``` + +Get a list of all offers in the given collection according to the required subscriptions. \ No newline at end of file diff --git a/src/Marketplace/Marketplace.Autorest/examples/Get-AzMarketplacePrivateStoreCollectionOffer.md b/src/Marketplace/Marketplace.Autorest/examples/Get-AzMarketplacePrivateStoreCollectionOffer.md index d81d357d8a55..b55974d2ff55 100644 --- a/src/Marketplace/Marketplace.Autorest/examples/Get-AzMarketplacePrivateStoreCollectionOffer.md +++ b/src/Marketplace/Marketplace.Autorest/examples/Get-AzMarketplacePrivateStoreCollectionOffer.md @@ -1,4 +1,4 @@ -### Example 1: Gets collection offers. +### Example 1: Gets collection offers ```powershell Get-AzMarketplacePrivateStoreCollectionOffer -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -CollectionId a260d38c-96cf-492d-a340-404d0c4b3ad6 ``` @@ -11,4 +11,4 @@ viacode_consulting-1089577.viacodems RedHat.RHEL_7 ``` -This command get colletion offer \ No newline at end of file +This command get collection offers. \ No newline at end of file diff --git a/src/Marketplace/Marketplace.Autorest/examples/Get-AzMarketplacePrivateStoreCollectionRule.md b/src/Marketplace/Marketplace.Autorest/examples/Get-AzMarketplacePrivateStoreCollectionRule.md new file mode 100644 index 000000000000..a51a7cdb2ed1 --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/examples/Get-AzMarketplacePrivateStoreCollectionRule.md @@ -0,0 +1,6 @@ +### Example 1: Get applied rules on a collection +```powershell +Get-AzMarketplacePrivateStoreCollectionRule -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -CollectionId a260d38c-96cf-492d-a340-404d0c4b3ad6 +``` + +Get a list of all private store rules in the given private store and collection. \ No newline at end of file diff --git a/src/Marketplace/Marketplace.Autorest/examples/Get-AzMarketplacePrivateStoreNewPlanNotification.md b/src/Marketplace/Marketplace.Autorest/examples/Get-AzMarketplacePrivateStoreNewPlanNotification.md new file mode 100644 index 000000000000..911f7f61d40c --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/examples/Get-AzMarketplacePrivateStoreNewPlanNotification.md @@ -0,0 +1,6 @@ +### Example 1: List new plans notifications +```powershell +Get-AzMarketplacePrivateStoreNewPlanNotification -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 +``` + +List new plans notifications. \ No newline at end of file diff --git a/src/Marketplace/Marketplace.Autorest/examples/Get-AzMarketplacePrivateStoreSubscription.md b/src/Marketplace/Marketplace.Autorest/examples/Get-AzMarketplacePrivateStoreSubscription.md new file mode 100644 index 000000000000..51191bd23561 --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/examples/Get-AzMarketplacePrivateStoreSubscription.md @@ -0,0 +1,6 @@ +### Example 1: List all subscriptions +```powershell +Get-AzMarketplacePrivateStoreSubscription -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 +``` + +List all subscriptions in the private store context. \ No newline at end of file diff --git a/src/Marketplace/Marketplace.Autorest/examples/Get-AzMarketplacePrivateStoreUserOffer.md b/src/Marketplace/Marketplace.Autorest/examples/Get-AzMarketplacePrivateStoreUserOffer.md new file mode 100644 index 000000000000..d4790d5bea7e --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/examples/Get-AzMarketplacePrivateStoreUserOffer.md @@ -0,0 +1,6 @@ +### Example 1: List all approved offers for a user +```powershell +Get-AzMarketplacePrivateStoreUserOffer -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -OfferId aumatics.azure_managedservices -SubscriptionId 1f58b5dd-313c-42ed-84fc-f1e351bba7fb +``` + +List of user's approved offers for the provided offers and subscriptions. \ No newline at end of file diff --git a/src/Marketplace/Marketplace.Autorest/examples/Get-AzMarketplacePrivateStoreUserRule.md b/src/Marketplace/Marketplace.Autorest/examples/Get-AzMarketplacePrivateStoreUserRule.md new file mode 100644 index 000000000000..e280b0c6a149 --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/examples/Get-AzMarketplacePrivateStoreUserRule.md @@ -0,0 +1,6 @@ +### Example 1: Get all applied rules for user subscriptions +```powershell +Get-AzMarketplacePrivateStoreUserRule -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -SubscriptionId 1f58b5dd-313c-42ed-84fc-f1e351bba7fb +``` + +All rules approved in the private store that are relevant for user subscriptions. \ No newline at end of file diff --git a/src/Marketplace/Marketplace.Autorest/examples/Get-AzMarketplacePrivateStoreV1.md b/src/Marketplace/Marketplace.Autorest/examples/Get-AzMarketplacePrivateStoreV1.md index 35f16b048bfe..4f012e683374 100644 --- a/src/Marketplace/Marketplace.Autorest/examples/Get-AzMarketplacePrivateStoreV1.md +++ b/src/Marketplace/Marketplace.Autorest/examples/Get-AzMarketplacePrivateStoreV1.md @@ -9,7 +9,4 @@ Name SystemDataCreatedAt SystemDataCreatedBy Sys a260d38c-96cf-492d-a340-404d0c4b3ad6 User 12/1/2021 9:01:33 PM User ``` -This command Gets the private store details - - - +This command Gets the private store details \ No newline at end of file diff --git a/src/Marketplace/Marketplace.Autorest/examples/New-AzMarketplacePrivateStoreCollectionOfferMultiContext.md b/src/Marketplace/Marketplace.Autorest/examples/New-AzMarketplacePrivateStoreCollectionOfferMultiContext.md new file mode 100644 index 000000000000..3cab4409acf0 --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/examples/New-AzMarketplacePrivateStoreCollectionOfferMultiContext.md @@ -0,0 +1,18 @@ +### Example 1: Upsert an offer with multiple contexts +```powershell +$plan1 = @{ + context = "1f58b5dd-313c-42ed-84fc-f1e351bba7fb" + planId = "plan1" +} + +$plan2 = @{ + context = "ab3de7bc-7a6e-4e9f-a34a-f6922df453e4" + planId = "plan2" +} + +$plans = @($plan1,$plan2) + +New-AzMarketplacePrivateStoreCollectionOfferMultiContext -CollectionId fdb889a1-cf3e-49f0-95b8-2bb012fa01f1 -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -OfferId test_pmc2pc1.vm_4plans -PlansContext $plans +``` + +Upsert an offer with multiple context details. \ No newline at end of file diff --git a/src/Marketplace/Marketplace.Autorest/examples/Test-AzMarketplacePrivateStoreAnyExistingOffer.md b/src/Marketplace/Marketplace.Autorest/examples/Test-AzMarketplacePrivateStoreAnyExistingOffer.md new file mode 100644 index 000000000000..fe544e625e9a --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/examples/Test-AzMarketplacePrivateStoreAnyExistingOffer.md @@ -0,0 +1,6 @@ +### Example 1: Check if exists any offer in the collections. +```powershell +Test-AzMarketplacePrivateStoreAnyExistingOffer -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 +``` + +Query whether exists any offer in the collections. \ No newline at end of file diff --git a/src/Marketplace/Marketplace.Autorest/examples/Update-AzMarketplacePrivateStoreCollection.md b/src/Marketplace/Marketplace.Autorest/examples/Update-AzMarketplacePrivateStoreCollection.md new file mode 100644 index 000000000000..ad0972a3e465 --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/examples/Update-AzMarketplacePrivateStoreCollection.md @@ -0,0 +1,6 @@ +### Example 1: Update private store collection +```powershell +Update-AzMarketplacePrivateStoreCollection -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -CollectionId 8c7a91db-cd41-43b6-af47-2e869654126d -Enabled +``` + +Update private store collection. \ No newline at end of file diff --git a/src/Marketplace/Marketplace.Autorest/examples/Update-AzMarketplacePrivateStoreCollectionOffer.md b/src/Marketplace/Marketplace.Autorest/examples/Update-AzMarketplacePrivateStoreCollectionOffer.md new file mode 100644 index 000000000000..b935c2a4aebf --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/examples/Update-AzMarketplacePrivateStoreCollectionOffer.md @@ -0,0 +1,6 @@ +### Example 1: Update private store collection offer +```powershell +Update-AzMarketplacePrivateStoreCollectionOffer -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -CollectionId 8c7a91db-cd41-43b6-af47-2e869654126d -OfferId "aumatics.azure_managedservices" -SpecificPlanIdLimitation $null +``` + +Update private store collection offer. \ No newline at end of file diff --git a/src/Marketplace/Marketplace.Autorest/resources/README.md b/src/Marketplace/Marketplace.Autorest/resources/README.md index 736492341e3d..937f07f8fec2 100644 --- a/src/Marketplace/Marketplace.Autorest/resources/README.md +++ b/src/Marketplace/Marketplace.Autorest/resources/README.md @@ -1,5 +1,5 @@ # Resources -This directory can contain any additional resources for module that are not required at runtime. This directory **does not** get packaged with the module. If you have assets for custom implementation, place them into the `../custom` folder. +This directory can contain any additional resources for module that are not required at runtime. This directory **does not** get packaged with the module. If you have assets for custom implementation, place them into the `..\custom` folder. ## Info - Modifiable: yes diff --git a/src/Marketplace/Marketplace.Autorest/test/Copy-AzMarketplacePrivateStoreCollectionOffer.Recording.json b/src/Marketplace/Marketplace.Autorest/test/Copy-AzMarketplacePrivateStoreCollectionOffer.Recording.json index 475dace8b0ad..7b8c10efe1f0 100644 --- a/src/Marketplace/Marketplace.Autorest/test/Copy-AzMarketplacePrivateStoreCollectionOffer.Recording.json +++ b/src/Marketplace/Marketplace.Autorest/test/Copy-AzMarketplacePrivateStoreCollectionOffer.Recording.json @@ -1,15 +1,15 @@ { - "Copy-AzMarketplacePrivateStoreCollectionOffer+[NoContext]+TransferExpanded+$POST+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/a260d38c-96cf-492d-a340-404d0c4b3ad6/transferOffers?api-version=2021-06-01+1": { + "Copy-AzMarketplacePrivateStoreCollectionOffer+[NoContext]+TransferExpanded+$PUT+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/a260d38c-96cf-492d-a340-404d0c4b3ad6/offers/aumatics.azure_managedservices?api-version=2023-01-01+1": { "Request": { - "Method": "POST", - "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/a260d38c-96cf-492d-a340-404d0c4b3ad6/transferOffers?api-version=2021-06-01", - "Content": "{\n \"properties\": {\n \"targetCollections\": [ \"8c7a91db-cd41-43b6-af47-2e869654126d\" ],\n \"operation\": \"Copy\",\n \"offerIdsList\": [ \"aumatics.azure_managedservices\" ]\n }\n}", + "Method": "PUT", + "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/a260d38c-96cf-492d-a340-404d0c4b3ad6/offers/aumatics.azure_managedservices?api-version=2023-01-01", + "Content": "{\r\n \"properties\": {\r\n \"plans\": [\r\n {\r\n \"accessibility\": \"azure_managedservices_professional\"\r\n }\r\n ]\r\n }\r\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "176" ] + "Content-Length": [ "132" ] } }, "Response": { @@ -17,27 +17,75 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], + "Accept-Ranges": [ "bytes" ], "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=80c7a5f90186ed67b1a22b2d6ba64306a36f909c848093374b79f8b04109a233;Path=/;HttpOnly;Secure;Domain=main.prod.marketplaceprivatestore.azure.com", "ARRAffinitySameSite=80c7a5f90186ed67b1a22b2d6ba64306a36f909c848093374b79f8b04109a233;Path=/;HttpOnly;SameSite=None;Secure;Domain=main.prod.marketplaceprivatestore.azure.com" ], + "x-ms-ratelimit-remaining-tenant-writes": [ "1198" ], "X-Content-Type-Options": [ "nosniff" ], "X-XSS-Protection": [ "1; mode=block" ], - "x-ms-version": [ "6.0.01832.0004-467b09b3" ], - "Set-Cookie": [ "ARRAffinity=a1932161769a8d1e756ea2a33c09d2511fa99932f8d921493de9f93092d8c165;Path=/;HttpOnly;Secure;Domain=marketplacerp.azure.com", "ARRAffinitySameSite=a1932161769a8d1e756ea2a33c09d2511fa99932f8d921493de9f93092d8c165;Path=/;HttpOnly;SameSite=None;Secure;Domain=marketplacerp.azure.com" ], - "Server": [ "Microsoft-IIS/10.0" ], + "x-ms-version": [ "6.0.02586.90-5c77bed2" ], "X-AspNet-Version": [ "4.0.30319" ], "X-Powered-By": [ "ASP.NET" ], + "x-azure-ref": [ "20240206T121436Z-e9fr18rg4936d7qwr39u9d2ats00000002x0000000007s6m" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "x-ms-request-id": [ "4045343e-4ad4-42ed-b0dd-5b7ef5d12f87" ], + "x-ms-correlation-request-id": [ "4045343e-4ad4-42ed-b0dd-5b7ef5d12f87" ], + "x-ms-routing-request-id": [ "ISRAELCENTRAL:20240206T121437Z:4045343e-4ad4-42ed-b0dd-5b7ef5d12f87" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-MSEdge-Ref": [ "Ref A: 5B8A08708B9447CA8FC0164714E005A0 Ref B: MRS211050313051 Ref C: 2024-02-06T12:14:36Z" ], + "Date": [ "Tue, 06 Feb 2024 12:14:36 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "523" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/a260d38c-96cf-492d-a340-404d0c4b3ad6/offers/aumatics.azure_managedservices\",\"name\":\"aumatics.azure_managedservices\",\"type\":\"Microsoft.Marketplace/privateStores/collection/offers\",\"properties\":{\"uniqueOfferId\":\"aumatics.azure_managedservices\",\"specificPlanIdsLimitation\":null,\"eTag\":\"\\\"c303ee7f-0000-0100-0000-65c0b1020000\\\"\",\"privateStoreId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"updateSuppressedDueIdempotence\":true}}", + "isContentBase64": false + } + }, + "Copy-AzMarketplacePrivateStoreCollectionOffer+[NoContext]+TransferExpanded+$POST+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/a260d38c-96cf-492d-a340-404d0c4b3ad6/transferOffers?api-version=2023-01-01+2": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/a260d38c-96cf-492d-a340-404d0c4b3ad6/transferOffers?api-version=2023-01-01", + "Content": "{\r\n \"properties\": {\r\n \"targetCollections\": [ \"8c7a91db-cd41-43b6-af47-2e869654126d\" ],\r\n \"operation\": \"Copy\",\r\n \"offerIdsList\": [ \"aumatics.azure_managedservices\" ]\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "182" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Accept-Ranges": [ "bytes" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=71c5ecfca949e38fa6d8b6899df69a8bc1065f71ea6211c776e43d3b7b216b7d;Path=/;HttpOnly;Secure;Domain=main.prod.marketplaceprivatestore.azure.com", "ARRAffinitySameSite=71c5ecfca949e38fa6d8b6899df69a8bc1065f71ea6211c776e43d3b7b216b7d;Path=/;HttpOnly;SameSite=None;Secure;Domain=main.prod.marketplaceprivatestore.azure.com" ], "x-ms-ratelimit-remaining-tenant-writes": [ "1199" ], - "x-ms-request-id": [ "6fd5ea4b-5317-4292-8f5e-967be4dbed2b" ], - "x-ms-correlation-request-id": [ "6fd5ea4b-5317-4292-8f5e-967be4dbed2b" ], - "x-ms-routing-request-id": [ "UAECENTRAL:20220124T135823Z:6fd5ea4b-5317-4292-8f5e-967be4dbed2b" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-XSS-Protection": [ "1; mode=block" ], + "x-ms-version": [ "6.0.02586.90-5c77bed2" ], + "X-AspNet-Version": [ "4.0.30319" ], + "X-Powered-By": [ "ASP.NET" ], + "x-azure-ref": [ "20240206T121437Z-un93fkbvw50w5bbm67x1677wk800000009c0000000008kp5" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "x-ms-request-id": [ "b2f187b1-26e8-48b9-ac90-3f2f048b23b3" ], + "x-ms-correlation-request-id": [ "b2f187b1-26e8-48b9-ac90-3f2f048b23b3" ], + "x-ms-routing-request-id": [ "ISRAELCENTRAL:20240206T121437Z:b2f187b1-26e8-48b9-ac90-3f2f048b23b3" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Date": [ "Mon, 24 Jan 2022 13:58:23 GMT" ] + "X-MSEdge-Ref": [ "Ref A: D049F26F0D3E4DAFAC388F3ECB2FCFA0 Ref B: MRS211050313051 Ref C: 2024-02-06T12:14:37Z" ], + "Date": [ "Tue, 06 Feb 2024 12:14:36 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "108" ], + "Content-Length": [ "115" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"succeeded\":[{\"collectionName\":\"test1\",\"collectionId\":\"8c7a91db-cd41-43b6-af47-2e869654126d\"}],\"failed\":[]}", + "Content": "{\"succeeded\":[{\"collectionName\":\"CopyPWRTest1\",\"collectionId\":\"8c7a91db-cd41-43b6-af47-2e869654126d\"}],\"failed\":[]}", "isContentBase64": false } } diff --git a/src/Marketplace/Marketplace.Autorest/test/Copy-AzMarketplacePrivateStoreCollectionOffer.Tests.ps1 b/src/Marketplace/Marketplace.Autorest/test/Copy-AzMarketplacePrivateStoreCollectionOffer.Tests.ps1 index 05e0e2b8bdf3..ceb0ebe14b44 100644 --- a/src/Marketplace/Marketplace.Autorest/test/Copy-AzMarketplacePrivateStoreCollectionOffer.Tests.ps1 +++ b/src/Marketplace/Marketplace.Autorest/test/Copy-AzMarketplacePrivateStoreCollectionOffer.Tests.ps1 @@ -16,8 +16,12 @@ if(($null -eq $TestName) -or ($TestName -contains 'Copy-AzMarketplacePrivateStor Describe 'Copy-AzMarketplacePrivateStoreCollectionOffer' { It 'TransferExpanded' { + + $acc = @{Accessibility = "azure_managedservices_professional"} + New-AzMarketplacePrivateStoreCollectionOffer -CollectionId a260d38c-96cf-492d-a340-404d0c4b3ad6 -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -OfferId aumatics.azure_managedservices -Plan $acc + $payload = @{OfferIdsList = "aumatics.azure_managedservices"; Operation = "Copy"; TargetCollection = "8c7a91db-cd41-43b6-af47-2e869654126d"} - $res = Copy-AzMarketplacePrivateStoreCollectionOffer -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -CollectionId a260d38c-96cf-492d-a340-404d0c4b3ad6 -Payload $payload - $res.Succeeded.Count | Should -Be 1 + $res = Copy-AzMarketplacePrivateStoreCollectionOffer -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -CollectionId a260d38c-96cf-492d-a340-404d0c4b3ad6 -Payload $payload + $res.Succeeded.Count | Should -Be 1 } } diff --git a/src/Marketplace/Marketplace.Autorest/test/Disable-AzMarketplacePrivateStoreCollectionAllItem.Recording.json b/src/Marketplace/Marketplace.Autorest/test/Disable-AzMarketplacePrivateStoreCollectionAllItem.Recording.json new file mode 100644 index 000000000000..56c6092c8917 --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/test/Disable-AzMarketplacePrivateStoreCollectionAllItem.Recording.json @@ -0,0 +1,52 @@ +{ + "Disable-AzMarketplacePrivateStoreCollectionAllItem+[NoContext]+Disable+$POST+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa0188/disableApproveAllItems?api-version=2023-01-01+1": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa0188/disableApproveAllItems?api-version=2023-01-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "5" ], + "x-ms-client-request-id": [ "1bd0b9f6-622f-45a2-b342-1162b65366ea" ], + "CommandName": [ "Disable-AzMarketplacePrivateStoreCollectionAllItem" ], + "FullCommandName": [ "Disable-AzMarketplacePrivateStoreCollectionAllItem_Disable" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.11", "Az.Marketplace/1.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Accept-Ranges": [ "bytes" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=71c5ecfca949e38fa6d8b6899df69a8bc1065f71ea6211c776e43d3b7b216b7d;Path=/;HttpOnly;Secure;Domain=main.prod.marketplaceprivatestore.azure.com", "ARRAffinitySameSite=71c5ecfca949e38fa6d8b6899df69a8bc1065f71ea6211c776e43d3b7b216b7d;Path=/;HttpOnly;SameSite=None;Secure;Domain=main.prod.marketplaceprivatestore.azure.com" ], + "x-ms-ratelimit-remaining-tenant-writes": [ "1199" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-XSS-Protection": [ "1; mode=block" ], + "x-ms-version": [ "6.0.02586.90-5c77bed2" ], + "X-AspNet-Version": [ "4.0.30319" ], + "X-Powered-By": [ "ASP.NET" ], + "x-azure-ref": [ "20240206T121438Z-gwknnxeka10xrfzb2a991aarkg0000000as000000000anyk" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "x-ms-request-id": [ "aa3a6f7f-b7c8-45b7-a226-f3aff08503b9" ], + "x-ms-correlation-request-id": [ "aa3a6f7f-b7c8-45b7-a226-f3aff08503b9" ], + "x-ms-routing-request-id": [ "ISRAELCENTRAL:20240206T121438Z:aa3a6f7f-b7c8-45b7-a226-f3aff08503b9" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-MSEdge-Ref": [ "Ref A: 7577B7C00FCF407280C00EE4D7944621 Ref B: MRS211050313051 Ref C: 2024-02-06T12:14:38Z" ], + "Date": [ "Tue, 06 Feb 2024 12:14:38 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "777" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"systemData\":{\"createdBy\":\"\",\"createdByType\":\"User\",\"createdAt\":\"2024-02-06T12:14:34.5033797Z\",\"lastModifiedBy\":\"\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-02-06T12:14:38.8098396Z\"},\"id\":\"providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa0188\",\"name\":\"fdb889a1-cf3e-49f0-95b8-2bb012fa0188\",\"type\":\"Microsoft.Marketplace/privateStores/collections\",\"properties\":{\"appliedRules\":null,\"approveAllItems\":false,\"approveAllItemsModifiedAt\":\"2024-02-06T12:14:38.8098396Z\",\"collectionId\":\"fdb889a1-cf3e-49f0-95b8-2bb012fa0188\",\"collectionName\":\"AllItemsPWRTest1\",\"claim\":null,\"allSubscriptions\":false,\"subscriptionsList\":[\"1052ff5a-aa43-4ca1-bd18-010399494ce5\"],\"enabled\":false,\"numberOfOffers\":0}}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Marketplace/Marketplace.Autorest/test/Disable-AzMarketplacePrivateStoreCollectionAllItem.Tests.ps1 b/src/Marketplace/Marketplace.Autorest/test/Disable-AzMarketplacePrivateStoreCollectionAllItem.Tests.ps1 new file mode 100644 index 000000000000..c7b4a8ebea87 --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/test/Disable-AzMarketplacePrivateStoreCollectionAllItem.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Disable-AzMarketplacePrivateStoreCollectionAllItem')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Disable-AzMarketplacePrivateStoreCollectionAllItem.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Disable-AzMarketplacePrivateStoreCollectionAllItem' { + It 'Disable' { + $response = Disable-AzMarketplacePrivateStoreCollectionAllItem -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -CollectionId fdb889a1-cf3e-49f0-95b8-2bb012fa0188 + $response | Should -Not -Be $null + $response.ApproveAllItem | Should -Be $false + } +} diff --git a/src/Marketplace/Marketplace.Autorest/test/Enable-AzMarketplacePrivateStoreCollectionAllItem.Recording.json b/src/Marketplace/Marketplace.Autorest/test/Enable-AzMarketplacePrivateStoreCollectionAllItem.Recording.json new file mode 100644 index 000000000000..34385d945a60 --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/test/Enable-AzMarketplacePrivateStoreCollectionAllItem.Recording.json @@ -0,0 +1,52 @@ +{ + "Enable-AzMarketplacePrivateStoreCollectionAllItem+[NoContext]+Approve+$POST+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa0188/approveAllItems?api-version=2023-01-01+1": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa0188/approveAllItems?api-version=2023-01-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "6" ], + "x-ms-client-request-id": [ "2d981ebd-a96d-4d5c-8ef9-0215acf6391a" ], + "CommandName": [ "Enable-AzMarketplacePrivateStoreCollectionAllItem" ], + "FullCommandName": [ "Enable-AzMarketplacePrivateStoreCollectionAllItem_Approve" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.11", "Az.Marketplace/1.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Accept-Ranges": [ "bytes" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=71c5ecfca949e38fa6d8b6899df69a8bc1065f71ea6211c776e43d3b7b216b7d;Path=/;HttpOnly;Secure;Domain=main.prod.marketplaceprivatestore.azure.com", "ARRAffinitySameSite=71c5ecfca949e38fa6d8b6899df69a8bc1065f71ea6211c776e43d3b7b216b7d;Path=/;HttpOnly;SameSite=None;Secure;Domain=main.prod.marketplaceprivatestore.azure.com" ], + "x-ms-ratelimit-remaining-tenant-writes": [ "1198" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-XSS-Protection": [ "1; mode=block" ], + "x-ms-version": [ "6.0.02586.90-5c77bed2" ], + "X-AspNet-Version": [ "4.0.30319" ], + "X-Powered-By": [ "ASP.NET" ], + "x-azure-ref": [ "20240206T121439Z-e9fr18rg4936d7qwr39u9d2ats00000002y0000000007rkd" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "x-ms-request-id": [ "79e412f0-32b4-4498-a4bf-03677947ccee" ], + "x-ms-correlation-request-id": [ "79e412f0-32b4-4498-a4bf-03677947ccee" ], + "x-ms-routing-request-id": [ "ISRAELCENTRAL:20240206T121440Z:79e412f0-32b4-4498-a4bf-03677947ccee" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-MSEdge-Ref": [ "Ref A: 713E24FA06F84BB395EF778BE9091772 Ref B: MRS211050313051 Ref C: 2024-02-06T12:14:39Z" ], + "Date": [ "Tue, 06 Feb 2024 12:14:39 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "777" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"systemData\":{\"createdBy\":\"\",\"createdByType\":\"User\",\"createdAt\":\"2024-02-06T12:14:34.5033797Z\",\"lastModifiedBy\":\"\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-02-06T12:14:38.8098396Z\"},\"id\":\"providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa0188\",\"name\":\"fdb889a1-cf3e-49f0-95b8-2bb012fa0188\",\"type\":\"Microsoft.Marketplace/privateStores/collections\",\"properties\":{\"appliedRules\":null,\"approveAllItems\":true,\"approveAllItemsModifiedAt\":\"2024-02-06T12:14:39.9160000Z\",\"collectionId\":\"fdb889a1-cf3e-49f0-95b8-2bb012fa0188\",\"collectionName\":\"AllItemsPWRTest1\",\"claim\":null,\"allSubscriptions\":false,\"subscriptionsList\":[\"1052ff5a-aa43-4ca1-bd18-010399494ce5\"],\"enabled\":false,\"numberOfOffers\":-1}}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Marketplace/Marketplace.Autorest/test/Enable-AzMarketplacePrivateStoreCollectionAllItem.Tests.ps1 b/src/Marketplace/Marketplace.Autorest/test/Enable-AzMarketplacePrivateStoreCollectionAllItem.Tests.ps1 new file mode 100644 index 000000000000..c8efdd96b005 --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/test/Enable-AzMarketplacePrivateStoreCollectionAllItem.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Enable-AzMarketplacePrivateStoreCollectionAllItem')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Enable-AzMarketplacePrivateStoreCollectionAllItem.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Enable-AzMarketplacePrivateStoreCollectionAllItem' { + It 'Approve' { + $response = Enable-AzMarketplacePrivateStoreCollectionAllItem -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -CollectionId fdb889a1-cf3e-49f0-95b8-2bb012fa0188 + $response | Should -Not -Be $null + $response.ApproveAllItem | Should -Be $true + } +} diff --git a/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplaceBillingPrivateStoreAccount.Recording.json b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplaceBillingPrivateStoreAccount.Recording.json index 9db265999872..6e1cc36625de 100644 --- a/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplaceBillingPrivateStoreAccount.Recording.json +++ b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplaceBillingPrivateStoreAccount.Recording.json @@ -1,17 +1,17 @@ { - "Get-AzMarketplaceBillingPrivateStoreAccount+[NoContext]+Billing+$POST+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/billingAccounts?api-version=2021-06-01+1": { + "Get-AzMarketplaceBillingPrivateStoreAccount+[NoContext]+Billing+$POST+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/billingAccounts?api-version=2023-01-01+1": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/billingAccounts?api-version=2021-06-01", + "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/billingAccounts?api-version=2023-01-01", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "3" ], - "x-ms-client-request-id": [ "46e59431-831d-4ca8-ace2-b207e858b1cd" ], + "x-ms-unique-id": [ "7" ], + "x-ms-client-request-id": [ "6f21f224-99d8-4590-a50d-a2e54b6c992f" ], "CommandName": [ "Get-AzMarketplaceBillingPrivateStoreAccount" ], "FullCommandName": [ "Get-AzMarketplaceBillingPrivateStoreAccount_Billing" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.11", "Az.Marketplace/1.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,20 +22,23 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], + "Accept-Ranges": [ "bytes" ], "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=80c7a5f90186ed67b1a22b2d6ba64306a36f909c848093374b79f8b04109a233;Path=/;HttpOnly;Secure;Domain=main.prod.marketplaceprivatestore.azure.com", "ARRAffinitySameSite=80c7a5f90186ed67b1a22b2d6ba64306a36f909c848093374b79f8b04109a233;Path=/;HttpOnly;SameSite=None;Secure;Domain=main.prod.marketplaceprivatestore.azure.com" ], + "x-ms-ratelimit-remaining-tenant-writes": [ "1197" ], "X-Content-Type-Options": [ "nosniff" ], "X-XSS-Protection": [ "1; mode=block" ], - "x-ms-version": [ "6.0.01832.0004-467b09b3" ], - "Set-Cookie": [ "ARRAffinity=bfe2117850ddf2eb1a1bdbff379f22be7abd277495b3d0ff28b1c1254c65d847;Path=/;HttpOnly;Secure;Domain=marketplacerp.azure.com", "ARRAffinitySameSite=bfe2117850ddf2eb1a1bdbff379f22be7abd277495b3d0ff28b1c1254c65d847;Path=/;HttpOnly;SameSite=None;Secure;Domain=marketplacerp.azure.com" ], - "Server": [ "Microsoft-IIS/10.0" ], + "x-ms-version": [ "6.0.02586.90-5c77bed2" ], "X-AspNet-Version": [ "4.0.30319" ], "X-Powered-By": [ "ASP.NET" ], - "x-ms-ratelimit-remaining-tenant-writes": [ "1198" ], - "x-ms-request-id": [ "52a15ae6-9137-4bc0-8f30-76005c9e138b" ], - "x-ms-correlation-request-id": [ "52a15ae6-9137-4bc0-8f30-76005c9e138b" ], - "x-ms-routing-request-id": [ "UAECENTRAL:20220124T135827Z:52a15ae6-9137-4bc0-8f30-76005c9e138b" ], + "x-azure-ref": [ "20240206T121440Z-e9fr18rg4936d7qwr39u9d2ats00000002y0000000007rpd" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "x-ms-request-id": [ "710f7c51-ae41-4408-9a70-aeb94ca9cf89" ], + "x-ms-correlation-request-id": [ "710f7c51-ae41-4408-9a70-aeb94ca9cf89" ], + "x-ms-routing-request-id": [ "ISRAELCENTRAL:20240206T121440Z:710f7c51-ae41-4408-9a70-aeb94ca9cf89" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Date": [ "Mon, 24 Jan 2022 13:58:27 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 6FC13175CEFA46A986CFD3CEBDB127F1 Ref B: MRS211050313051 Ref C: 2024-02-06T12:14:40Z" ], + "Date": [ "Tue, 06 Feb 2024 12:14:40 GMT" ] }, "ContentHeaders": { "Content-Length": [ "22" ], diff --git a/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplaceBillingPrivateStoreAccount.Tests.ps1 b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplaceBillingPrivateStoreAccount.Tests.ps1 index 6c94152027bd..39d4c76901ac 100644 --- a/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplaceBillingPrivateStoreAccount.Tests.ps1 +++ b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplaceBillingPrivateStoreAccount.Tests.ps1 @@ -16,8 +16,8 @@ if(($null -eq $TestName) -or ($TestName -contains 'Get-AzMarketplaceBillingPriva Describe 'Get-AzMarketplaceBillingPrivateStoreAccount' { It 'Billing' { - $BillingAccount = Get-AzMarketplaceBillingPrivateStoreAccount -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 - $BillingAccount | Should -Be $null + $BillingAccount = Get-AzMarketplaceBillingPrivateStoreAccount -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 + $BillingAccount | Should -Be $null } } diff --git a/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplaceCollectionPrivateStoreToSubscriptionMapping.Recording.json b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplaceCollectionPrivateStoreToSubscriptionMapping.Recording.json deleted file mode 100644 index 25178f36b805..000000000000 --- a/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplaceCollectionPrivateStoreToSubscriptionMapping.Recording.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "Get-AzMarketplaceCollectionPrivateStoreToSubscriptionMapping+[NoContext]+CollectionsExpanded+$POST+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collectionsToSubscriptionsMapping?api-version=2021-06-01+1": { - "Request": { - "Method": "POST", - "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collectionsToSubscriptionsMapping?api-version=2021-06-01", - "Content": "{\n \"properties\": {\n \"subscriptionIds\": [ \"1052ff5a-aa43-4ca1-bd18-010399494ce5\" ]\n }\n}", - "isContentBase64": false, - "Headers": { - }, - "ContentHeaders": { - "Content-Type": [ "application/json" ], - "Content-Length": [ "91" ] - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "Vary": [ "Accept-Encoding" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-XSS-Protection": [ "1; mode=block" ], - "x-ms-version": [ "6.0.01808.0002-f172fc53" ], - "Set-Cookie": [ "ARRAffinity=6915894304dda5088a4956a5bf7a84ac06d25dc86c67b8df917e89aa9350af97;Path=/;HttpOnly;Secure;Domain=marketplacerp.azure.com", "ARRAffinitySameSite=6915894304dda5088a4956a5bf7a84ac06d25dc86c67b8df917e89aa9350af97;Path=/;HttpOnly;SameSite=None;Secure;Domain=marketplacerp.azure.com" ], - "Server": [ "Microsoft-IIS/10.0" ], - "X-AspNet-Version": [ "4.0.30319" ], - "X-Powered-By": [ "ASP.NET" ], - "x-ms-ratelimit-remaining-tenant-writes": [ "1197" ], - "x-ms-request-id": [ "28066df4-5040-43a9-b2d3-814e344c6fad" ], - "x-ms-correlation-request-id": [ "28066df4-5040-43a9-b2d3-814e344c6fad" ], - "x-ms-routing-request-id": [ "UAECENTRAL:20211226T150826Z:28066df4-5040-43a9-b2d3-814e344c6fad" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Date": [ "Sun, 26 Dec 2021 15:08:25 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "283" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"details\":{\"a260d38c-96cf-492d-a340-404d0c4b3ad6\":{\"collectionName\":\"DefaultCollection\",\"subscriptions\":[\"1052ff5a-aa43-4ca1-bd18-010399494ce5\"]},\"8c7a91db-cd41-43b6-af47-2e869654126d\":{\"collectionName\":\"Demo collection 1\",\"subscriptions\":[\"1052ff5a-aa43-4ca1-bd18-010399494ce5\"]}}}", - "isContentBase64": false - } - } -} \ No newline at end of file diff --git a/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplaceCollectionToSubscriptionMapping.Recording.json b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplaceCollectionToSubscriptionMapping.Recording.json index c49e1ce1e5a5..ac407ef0f4fd 100644 --- a/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplaceCollectionToSubscriptionMapping.Recording.json +++ b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplaceCollectionToSubscriptionMapping.Recording.json @@ -1,15 +1,15 @@ { - "Get-AzMarketplaceCollectionToSubscriptionMapping+[NoContext]+CollectionsExpanded+$POST+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collectionsToSubscriptionsMapping?api-version=2021-06-01+1": { + "Get-AzMarketplaceCollectionToSubscriptionMapping+[NoContext]+CollectionsExpanded+$POST+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collectionsToSubscriptionsMapping?api-version=2023-01-01+1": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collectionsToSubscriptionsMapping?api-version=2021-06-01", - "Content": "{\n \"properties\": {\n \"subscriptionIds\": [ \"1052ff5a-aa43-4ca1-bd18-010399494ce5\" ]\n }\n}", + "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collectionsToSubscriptionsMapping?api-version=2023-01-01", + "Content": "{\r\n \"properties\": {\r\n \"subscriptionIds\": [ \"1f58b5dd-313c-42ed-84fc-f1e351bba7fb\" ]\r\n }\r\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "91" ] + "Content-Length": [ "95" ] } }, "Response": { @@ -17,27 +17,30 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], + "Accept-Ranges": [ "bytes" ], "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=71c5ecfca949e38fa6d8b6899df69a8bc1065f71ea6211c776e43d3b7b216b7d;Path=/;HttpOnly;Secure;Domain=main.prod.marketplaceprivatestore.azure.com", "ARRAffinitySameSite=71c5ecfca949e38fa6d8b6899df69a8bc1065f71ea6211c776e43d3b7b216b7d;Path=/;HttpOnly;SameSite=None;Secure;Domain=main.prod.marketplaceprivatestore.azure.com" ], + "x-ms-ratelimit-remaining-tenant-writes": [ "1194" ], "X-Content-Type-Options": [ "nosniff" ], "X-XSS-Protection": [ "1; mode=block" ], - "x-ms-version": [ "6.0.01832.0004-467b09b3" ], - "Set-Cookie": [ "ARRAffinity=d3888da00a6c22fd6922d241b1e1f8b74760295bc9888c172907d962f5a68055;Path=/;HttpOnly;Secure;Domain=marketplacerp.azure.com", "ARRAffinitySameSite=d3888da00a6c22fd6922d241b1e1f8b74760295bc9888c172907d962f5a68055;Path=/;HttpOnly;SameSite=None;Secure;Domain=marketplacerp.azure.com" ], - "Server": [ "Microsoft-IIS/10.0" ], + "x-ms-version": [ "6.0.02586.90-5c77bed2" ], "X-AspNet-Version": [ "4.0.30319" ], "X-Powered-By": [ "ASP.NET" ], - "x-ms-ratelimit-remaining-tenant-writes": [ "1197" ], - "x-ms-request-id": [ "ab14cf95-7090-4f5b-8cb5-0458bb065c89" ], - "x-ms-correlation-request-id": [ "ab14cf95-7090-4f5b-8cb5-0458bb065c89" ], - "x-ms-routing-request-id": [ "UAECENTRAL:20220124T135831Z:ab14cf95-7090-4f5b-8cb5-0458bb065c89" ], + "x-azure-ref": [ "20240206T121441Z-e9fr18rg4936d7qwr39u9d2ats00000002x0000000007sae" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "x-ms-request-id": [ "0d64c3ec-bded-4ea2-8882-b1fe43d4eb49" ], + "x-ms-correlation-request-id": [ "0d64c3ec-bded-4ea2-8882-b1fe43d4eb49" ], + "x-ms-routing-request-id": [ "ISRAELCENTRAL:20240206T121441Z:0d64c3ec-bded-4ea2-8882-b1fe43d4eb49" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Date": [ "Mon, 24 Jan 2022 13:58:30 GMT" ] + "X-MSEdge-Ref": [ "Ref A: C93C658004844C64B2CC6605DA7AD7EC Ref B: MRS211050313051 Ref C: 2024-02-06T12:14:41Z" ], + "Date": [ "Tue, 06 Feb 2024 12:14:41 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "271" ], + "Content-Length": [ "2123" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"details\":{\"a260d38c-96cf-492d-a340-404d0c4b3ad6\":{\"collectionName\":\"DefaultCollection\",\"subscriptions\":[\"1052ff5a-aa43-4ca1-bd18-010399494ce5\"]},\"8c7a91db-cd41-43b6-af47-2e869654126d\":{\"collectionName\":\"test1\",\"subscriptions\":[\"1052ff5a-aa43-4ca1-bd18-010399494ce5\"]}}}", + "Content": "{\"details\":{\"a260d38c-96cf-492d-a340-404d0c4b3ad6\":{\"collectionName\":\"DefaultCollection\",\"subscriptions\":[\"1f58b5dd-313c-42ed-84fc-f1e351bba7fb\"]},\"d1bb102f-620f-460e-ba55-fdc3856c8fdd\":{\"collectionName\":\"BigCollection_DONT_DELETE\",\"subscriptions\":[\"1f58b5dd-313c-42ed-84fc-f1e351bba7fb\"]},\"0740a3e6-d5b5-4e22-99be-26887e484fa1\":{\"collectionName\":\"HyltonTest\",\"subscriptions\":[\"1f58b5dd-313c-42ed-84fc-f1e351bba7fb\"]},\"de165278-2dda-40aa-9ce4-15bf37311f49\":{\"collectionName\":\"SaviTest2\",\"subscriptions\":[\"1f58b5dd-313c-42ed-84fc-f1e351bba7fb\"]},\"b411c744-55fd-43b4-b269-faf05d4edae2\":{\"collectionName\":\"AllOffers\",\"subscriptions\":[\"1f58b5dd-313c-42ed-84fc-f1e351bba7fb\"]},\"dbf8cede-24ff-42c0-b443-3f73df6996f7\":{\"collectionName\":\"RulesCollection\",\"subscriptions\":[\"1f58b5dd-313c-42ed-84fc-f1e351bba7fb\"]},\"cf87e6eb-4ed1-44e5-b250-9eb5593b4c0e\":{\"collectionName\":\"TamarTest\",\"subscriptions\":[\"1f58b5dd-313c-42ed-84fc-f1e351bba7fb\"]},\"21ea54a6-df79-4dcb-babf-7860b8a82a9c\":{\"collectionName\":\"TestCanary\",\"subscriptions\":[\"1f58b5dd-313c-42ed-84fc-f1e351bba7fb\"]},\"ac13d584-7c4b-40a6-9d95-7dcf4b79db80\":{\"collectionName\":\"TestBubBash\",\"subscriptions\":null},\"73551ecc-d860-407f-9efa-049bab0468f5\":{\"collectionName\":\"PrivatePlans\",\"subscriptions\":[\"1f58b5dd-313c-42ed-84fc-f1e351bba7fb\"]},\"22dc7ebe-45b7-4aa6-8c96-a30091344cad\":{\"collectionName\":\"bugbashtest\",\"subscriptions\":[\"1f58b5dd-313c-42ed-84fc-f1e351bba7fb\"]},\"5b98b8be-7b7f-46fe-8e97-a15ea77dda14\":{\"collectionName\":\"CanaryTest\",\"subscriptions\":null},\"65159e59-86c8-4442-b768-2595be217a0f\":{\"collectionName\":\"LG\",\"subscriptions\":[\"1f58b5dd-313c-42ed-84fc-f1e351bba7fb\"]},\"d9b76d86-a3e7-4e9b-befb-3fe5a8d070a6\":{\"collectionName\":\"hamzza\",\"subscriptions\":null},\"0a4d89f3-8348-4961-9bec-a02780ab8144\":{\"collectionName\":\"Guy\",\"subscriptions\":[\"1f58b5dd-313c-42ed-84fc-f1e351bba7fb\"]},\"fdb889a1-cf3e-49f0-95b8-2bb012fa01f1\":{\"collectionName\":\"pwshNewCollTest\",\"subscriptions\":null},\"fdb889a1-cf3e-49f0-95b8-2bb012fa0188\":{\"collectionName\":\"AllItemsPWRTest1\",\"subscriptions\":null},\"8c7a91db-cd41-43b6-af47-2e869654126d\":{\"collectionName\":\"CopyPWRTest1\",\"subscriptions\":null}}}", "isContentBase64": false } } diff --git a/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplaceCollectionToSubscriptionMapping.Tests.ps1 b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplaceCollectionToSubscriptionMapping.Tests.ps1 index a9b1213e981f..c342c2a45e10 100644 --- a/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplaceCollectionToSubscriptionMapping.Tests.ps1 +++ b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplaceCollectionToSubscriptionMapping.Tests.ps1 @@ -16,7 +16,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'Get-AzMarketplaceCollectionTo Describe 'Get-AzMarketplaceCollectionToSubscriptionMapping' { It 'CollectionsExpanded' { - $res = Get-AzMarketplaceCollectionToSubscriptionMapping -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -Payload @{SubscriptionId = "1052ff5a-aa43-4ca1-bd18-010399494ce5"} - $res.keys.Count | Should -BeGreaterOrEqual 1 + $response = Get-AzMarketplaceCollectionToSubscriptionMapping -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -Payload @{SubscriptionId = "1f58b5dd-313c-42ed-84fc-f1e351bba7fb"} + $response | Should -Not -Be $null } } diff --git a/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreAllSubscriptionInTenant.Recording.json b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreAllSubscriptionInTenant.Recording.json new file mode 100644 index 000000000000..d2b500b04b17 --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreAllSubscriptionInTenant.Recording.json @@ -0,0 +1,52 @@ +{ + "Get-AzMarketplacePrivateStoreAllSubscriptionInTenant+[NoContext]+Fetch+$POST+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/fetchAllSubscriptionsInTenant?api-version=2023-01-01+1": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/fetchAllSubscriptionsInTenant?api-version=2023-01-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "9" ], + "x-ms-client-request-id": [ "b5f58e2a-76b5-4f52-993f-a191223fef29" ], + "CommandName": [ "Get-AzMarketplacePrivateStoreAllSubscriptionInTenant" ], + "FullCommandName": [ "Get-AzMarketplacePrivateStoreAllSubscriptionInTenant_Fetch" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.11", "Az.Marketplace/1.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Accept-Ranges": [ "bytes" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=80c7a5f90186ed67b1a22b2d6ba64306a36f909c848093374b79f8b04109a233;Path=/;HttpOnly;Secure;Domain=main.prod.marketplaceprivatestore.azure.com", "ARRAffinitySameSite=80c7a5f90186ed67b1a22b2d6ba64306a36f909c848093374b79f8b04109a233;Path=/;HttpOnly;SameSite=None;Secure;Domain=main.prod.marketplaceprivatestore.azure.com" ], + "x-ms-ratelimit-remaining-tenant-writes": [ "1198" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-XSS-Protection": [ "1; mode=block" ], + "x-ms-version": [ "6.0.02586.90-5c77bed2" ], + "X-AspNet-Version": [ "4.0.30319" ], + "X-Powered-By": [ "ASP.NET" ], + "x-azure-ref": [ "20240206T121442Z-un93fkbvw50w5bbm67x1677wk800000009c0000000008krq" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "x-ms-request-id": [ "85dbfdf7-72d4-455a-be30-02b3418eb660" ], + "x-ms-correlation-request-id": [ "85dbfdf7-72d4-455a-be30-02b3418eb660" ], + "x-ms-routing-request-id": [ "ISRAELCENTRAL:20240206T121442Z:85dbfdf7-72d4-455a-be30-02b3418eb660" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-MSEdge-Ref": [ "Ref A: BC68FB6AB11A42D7AB65C6D92F539D30 Ref B: MRS211050313051 Ref C: 2024-02-06T12:14:42Z" ], + "Date": [ "Tue, 06 Feb 2024 12:14:41 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "398" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/1f58b5dd-313c-42ed-84fc-f1e351bba7fb\",\"subscriptionId\":\"1f58b5dd-313c-42ed-84fc-f1e351bba7fb\",\"displayName\":\"PrivatestorePAYGSubscription\",\"state\":\"Enabled\"},{\"id\":\"/subscriptions/ab3de7bc-7a6e-4e9f-a34a-f6922df453e4\",\"subscriptionId\":\"ab3de7bc-7a6e-4e9f-a34a-f6922df453e4\",\"displayName\":\"PrivatestoreTestSubscription\",\"state\":\"Enabled\"}],\"skipToken\":null,\"count\":2}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreAllSubscriptionInTenant.Tests.ps1 b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreAllSubscriptionInTenant.Tests.ps1 new file mode 100644 index 000000000000..5cb1e4dfab6c --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreAllSubscriptionInTenant.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzMarketplacePrivateStoreAllSubscriptionInTenant')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzMarketplacePrivateStoreAllSubscriptionInTenant.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzMarketplacePrivateStoreAllSubscriptionInTenant' { + It 'Fetch' { + $response = Get-AzMarketplacePrivateStoreAllSubscriptionInTenant -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 + $response | Should -Not -Be $null + $response.value.Count | Should -BeGreaterThan 0 + } +} diff --git a/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreCollection.Recording.json b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreCollection.Recording.json new file mode 100644 index 000000000000..05e153097c39 --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreCollection.Recording.json @@ -0,0 +1,102 @@ +{ + "Get-AzMarketplacePrivateStoreCollection+[NoContext]+List+$GET+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections?api-version=2023-01-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections?api-version=2023-01-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "10" ], + "x-ms-client-request-id": [ "21157d50-ae32-412d-8235-740cad2028c3" ], + "CommandName": [ "Get-AzMarketplacePrivateStoreCollection" ], + "FullCommandName": [ "Get-AzMarketplacePrivateStoreCollection_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.11", "Az.Marketplace/1.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Accept-Ranges": [ "bytes" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=bfe2117850ddf2eb1a1bdbff379f22be7abd277495b3d0ff28b1c1254c65d847;Path=/;HttpOnly;Secure;Domain=main.prod.marketplaceprivatestore.azure.com", "ARRAffinitySameSite=bfe2117850ddf2eb1a1bdbff379f22be7abd277495b3d0ff28b1c1254c65d847;Path=/;HttpOnly;SameSite=None;Secure;Domain=main.prod.marketplaceprivatestore.azure.com" ], + "x-ms-ratelimit-remaining-tenant-reads": [ "11999" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-XSS-Protection": [ "1; mode=block" ], + "x-ms-version": [ "6.0.02586.90-5c77bed2" ], + "X-AspNet-Version": [ "4.0.30319" ], + "X-Powered-By": [ "ASP.NET" ], + "x-azure-ref": [ "20240206T121443Z-un93fkbvw50w5bbm67x1677wk800000009c0000000008ks3" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "x-ms-request-id": [ "8023afec-9edd-4d01-990a-2eea11ecbb8a" ], + "x-ms-correlation-request-id": [ "8023afec-9edd-4d01-990a-2eea11ecbb8a" ], + "x-ms-routing-request-id": [ "ISRAELCENTRAL:20240206T121443Z:8023afec-9edd-4d01-990a-2eea11ecbb8a" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-MSEdge-Ref": [ "Ref A: 49579729479B4BF3B1E22B58C9683A39 Ref B: MRS211050313051 Ref C: 2024-02-06T12:14:43Z" ], + "Date": [ "Tue, 06 Feb 2024 12:14:42 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "13472" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"systemData\":{\"createdBy\":\"\",\"createdByType\":\"User\",\"createdAt\":null,\"lastModifiedBy\":\"\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2021-12-13T13:21:57.3181794Z\"},\"id\":\"providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"name\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"type\":\"Microsoft.Marketplace/privateStores/collections\",\"properties\":{\"appliedRules\":[{\"type\":\"TermsAndCondition\",\"value\":null},{\"type\":\"PrivateProducts\",\"value\":null}],\"approveAllItems\":false,\"approveAllItemsModifiedAt\":\"0001-01-01T00:00:00.0000000\",\"collectionId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"collectionName\":\"DefaultCollection\",\"claim\":null,\"allSubscriptions\":true,\"subscriptionsList\":[],\"enabled\":true,\"numberOfOffers\":7}},{\"systemData\":{\"createdBy\":\"\",\"createdByType\":\"User\",\"createdAt\":\"2022-10-25T07:11:31.5981395Z\",\"lastModifiedBy\":\"\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2023-01-29T10:35:49.4095345Z\"},\"id\":\"providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/d1bb102f-620f-460e-ba55-fdc3856c8fdd\",\"name\":\"d1bb102f-620f-460e-ba55-fdc3856c8fdd\",\"type\":\"Microsoft.Marketplace/privateStores/collections\",\"properties\":{\"appliedRules\":null,\"approveAllItems\":false,\"approveAllItemsModifiedAt\":\"0001-01-01T00:00:00.0000000\",\"collectionId\":\"d1bb102f-620f-460e-ba55-fdc3856c8fdd\",\"collectionName\":\"BigCollection_DONT_DELETE\",\"claim\":\"\",\"allSubscriptions\":true,\"subscriptionsList\":[],\"enabled\":false,\"numberOfOffers\":308}},{\"systemData\":{\"createdBy\":\"\",\"createdByType\":\"User\",\"createdAt\":\"2023-05-16T02:32:40.4982820Z\",\"lastModifiedBy\":\"\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2023-05-16T02:32:40.5139194Z\"},\"id\":\"providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/0740a3e6-d5b5-4e22-99be-26887e484fa1\",\"name\":\"0740a3e6-d5b5-4e22-99be-26887e484fa1\",\"type\":\"Microsoft.Marketplace/privateStores/collections\",\"properties\":{\"appliedRules\":[{\"type\":\"TermsAndCondition\",\"value\":null}],\"approveAllItems\":false,\"approveAllItemsModifiedAt\":\"0001-01-01T00:00:00.0000000\",\"collectionId\":\"0740a3e6-d5b5-4e22-99be-26887e484fa1\",\"collectionName\":\"HyltonTest\",\"claim\":\"\",\"allSubscriptions\":true,\"subscriptionsList\":[],\"enabled\":false,\"numberOfOffers\":8}},{\"systemData\":{\"createdBy\":\"\",\"createdByType\":\"User\",\"createdAt\":\"2023-05-17T09:28:59.9603833Z\",\"lastModifiedBy\":\"\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2023-05-17T09:28:59.9760039Z\"},\"id\":\"providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/de165278-2dda-40aa-9ce4-15bf37311f49\",\"name\":\"de165278-2dda-40aa-9ce4-15bf37311f49\",\"type\":\"Microsoft.Marketplace/privateStores/collections\",\"properties\":{\"appliedRules\":null,\"approveAllItems\":false,\"approveAllItemsModifiedAt\":\"0001-01-01T00:00:00.0000000\",\"collectionId\":\"de165278-2dda-40aa-9ce4-15bf37311f49\",\"collectionName\":\"SaviTest2\",\"claim\":\"\",\"allSubscriptions\":true,\"subscriptionsList\":[],\"enabled\":false,\"numberOfOffers\":2}},{\"systemData\":{\"createdBy\":\"\",\"createdByType\":\"User\",\"createdAt\":\"2023-05-23T11:06:05.0819718Z\",\"lastModifiedBy\":\"\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2023-11-20T12:11:11.2082557Z\"},\"id\":\"providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/b411c744-55fd-43b4-b269-faf05d4edae2\",\"name\":\"b411c744-55fd-43b4-b269-faf05d4edae2\",\"type\":\"Microsoft.Marketplace/privateStores/collections\",\"properties\":{\"appliedRules\":null,\"approveAllItems\":true,\"approveAllItemsModifiedAt\":\"2023-11-20T12:11:22.3040000Z\",\"collectionId\":\"b411c744-55fd-43b4-b269-faf05d4edae2\",\"collectionName\":\"AllOffers\",\"claim\":\"\",\"allSubscriptions\":false,\"subscriptionsList\":[],\"enabled\":false,\"numberOfOffers\":0}},{\"systemData\":{\"createdBy\":\"\",\"createdByType\":\"User\",\"createdAt\":\"2023-05-23T11:07:07.8194410Z\",\"lastModifiedBy\":\"\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2023-05-23T11:07:07.8350726Z\"},\"id\":\"providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/dbf8cede-24ff-42c0-b443-3f73df6996f7\",\"name\":\"dbf8cede-24ff-42c0-b443-3f73df6996f7\",\"type\":\"Microsoft.Marketplace/privateStores/collections\",\"properties\":{\"appliedRules\":[{\"type\":\"PrivateProducts\",\"value\":null}],\"approveAllItems\":false,\"approveAllItemsModifiedAt\":\"0001-01-01T00:00:00.0000000\",\"collectionId\":\"dbf8cede-24ff-42c0-b443-3f73df6996f7\",\"collectionName\":\"RulesCollection\",\"claim\":\"\",\"allSubscriptions\":true,\"subscriptionsList\":[],\"enabled\":false,\"numberOfOffers\":0}},{\"systemData\":{\"createdBy\":\"\",\"createdByType\":\"User\",\"createdAt\":\"2023-05-28T11:44:11.7811281Z\",\"lastModifiedBy\":\"\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2023-05-28T11:44:11.7967181Z\"},\"id\":\"providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/cf87e6eb-4ed1-44e5-b250-9eb5593b4c0e\",\"name\":\"cf87e6eb-4ed1-44e5-b250-9eb5593b4c0e\",\"type\":\"Microsoft.Marketplace/privateStores/collections\",\"properties\":{\"appliedRules\":[{\"type\":\"TermsAndCondition\",\"value\":null},{\"type\":\"PrivateProducts\",\"value\":null}],\"approveAllItems\":false,\"approveAllItemsModifiedAt\":\"0001-01-01T00:00:00.0000000\",\"collectionId\":\"cf87e6eb-4ed1-44e5-b250-9eb5593b4c0e\",\"collectionName\":\"TamarTest\",\"claim\":\"\",\"allSubscriptions\":true,\"subscriptionsList\":[],\"enabled\":false,\"numberOfOffers\":10}},{\"systemData\":{\"createdBy\":\"\",\"createdByType\":\"User\",\"createdAt\":\"2023-06-06T10:36:31.3111145Z\",\"lastModifiedBy\":\"\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2023-06-06T10:36:31.3111145Z\"},\"id\":\"providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/21ea54a6-df79-4dcb-babf-7860b8a82a9c\",\"name\":\"21ea54a6-df79-4dcb-babf-7860b8a82a9c\",\"type\":\"Microsoft.Marketplace/privateStores/collections\",\"properties\":{\"appliedRules\":null,\"approveAllItems\":false,\"approveAllItemsModifiedAt\":\"0001-01-01T00:00:00.0000000\",\"collectionId\":\"21ea54a6-df79-4dcb-babf-7860b8a82a9c\",\"collectionName\":\"TestCanary\",\"claim\":\"\",\"allSubscriptions\":true,\"subscriptionsList\":[],\"enabled\":false,\"numberOfOffers\":2}},{\"systemData\":{\"createdBy\":\"\",\"createdByType\":\"User\",\"createdAt\":\"2023-06-06T12:36:44.6320854Z\",\"lastModifiedBy\":\"\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-01-01T14:14:04.1461782Z\"},\"id\":\"providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/ac13d584-7c4b-40a6-9d95-7dcf4b79db80\",\"name\":\"ac13d584-7c4b-40a6-9d95-7dcf4b79db80\",\"type\":\"Microsoft.Marketplace/privateStores/collections\",\"properties\":{\"appliedRules\":null,\"approveAllItems\":false,\"approveAllItemsModifiedAt\":\"2024-01-01T14:14:04.1461782Z\",\"collectionId\":\"ac13d584-7c4b-40a6-9d95-7dcf4b79db80\",\"collectionName\":\"TestBubBash\",\"claim\":\"\",\"allSubscriptions\":false,\"subscriptionsList\":[],\"enabled\":false,\"numberOfOffers\":0}},{\"systemData\":{\"createdBy\":\"\",\"createdByType\":\"User\",\"createdAt\":\"2023-07-10T13:57:40.8477035Z\",\"lastModifiedBy\":\"\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2023-07-10T13:57:40.8477035Z\"},\"id\":\"providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/73551ecc-d860-407f-9efa-049bab0468f5\",\"name\":\"73551ecc-d860-407f-9efa-049bab0468f5\",\"type\":\"Microsoft.Marketplace/privateStores/collections\",\"properties\":{\"appliedRules\":null,\"approveAllItems\":false,\"approveAllItemsModifiedAt\":\"0001-01-01T00:00:00.0000000\",\"collectionId\":\"73551ecc-d860-407f-9efa-049bab0468f5\",\"collectionName\":\"PrivatePlans\",\"claim\":\"\",\"allSubscriptions\":true,\"subscriptionsList\":[],\"enabled\":false,\"numberOfOffers\":2}},{\"systemData\":{\"createdBy\":\"\",\"createdByType\":\"User\",\"createdAt\":\"2023-07-26T08:27:39.9228389Z\",\"lastModifiedBy\":\"\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2023-07-26T08:27:39.9385188Z\"},\"id\":\"providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/22dc7ebe-45b7-4aa6-8c96-a30091344cad\",\"name\":\"22dc7ebe-45b7-4aa6-8c96-a30091344cad\",\"type\":\"Microsoft.Marketplace/privateStores/collections\",\"properties\":{\"appliedRules\":null,\"approveAllItems\":false,\"approveAllItemsModifiedAt\":\"0001-01-01T00:00:00.0000000\",\"collectionId\":\"22dc7ebe-45b7-4aa6-8c96-a30091344cad\",\"collectionName\":\"bugbashtest\",\"claim\":\"\",\"allSubscriptions\":true,\"subscriptionsList\":[],\"enabled\":false,\"numberOfOffers\":0}},{\"systemData\":{\"createdBy\":\"\",\"createdByType\":\"User\",\"createdAt\":\"2023-07-31T14:31:04.7272779Z\",\"lastModifiedBy\":\"\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2023-10-29T14:29:34.9057805Z\"},\"id\":\"providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/5b98b8be-7b7f-46fe-8e97-a15ea77dda14\",\"name\":\"5b98b8be-7b7f-46fe-8e97-a15ea77dda14\",\"type\":\"Microsoft.Marketplace/privateStores/collections\",\"properties\":{\"appliedRules\":null,\"approveAllItems\":false,\"approveAllItemsModifiedAt\":\"2023-10-29T14:29:34.9057805Z\",\"collectionId\":\"5b98b8be-7b7f-46fe-8e97-a15ea77dda14\",\"collectionName\":\"CanaryTest\",\"claim\":\"\",\"allSubscriptions\":false,\"subscriptionsList\":[],\"enabled\":false,\"numberOfOffers\":3}},{\"systemData\":{\"createdBy\":\"\",\"createdByType\":\"User\",\"createdAt\":\"2023-08-07T07:04:29.6646906Z\",\"lastModifiedBy\":\"\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2023-08-07T07:04:29.6802715Z\"},\"id\":\"providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/65159e59-86c8-4442-b768-2595be217a0f\",\"name\":\"65159e59-86c8-4442-b768-2595be217a0f\",\"type\":\"Microsoft.Marketplace/privateStores/collections\",\"properties\":{\"appliedRules\":[{\"type\":\"PrivateProducts\",\"value\":null}],\"approveAllItems\":false,\"approveAllItemsModifiedAt\":\"0001-01-01T00:00:00.0000000\",\"collectionId\":\"65159e59-86c8-4442-b768-2595be217a0f\",\"collectionName\":\"LG\",\"claim\":\"\",\"allSubscriptions\":true,\"subscriptionsList\":[],\"enabled\":true,\"numberOfOffers\":1}},{\"systemData\":{\"createdBy\":\"\",\"createdByType\":\"User\",\"createdAt\":\"2024-01-09T11:20:12.9342878Z\",\"lastModifiedBy\":\"\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-01-09T11:20:12.9499426Z\"},\"id\":\"providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/d9b76d86-a3e7-4e9b-befb-3fe5a8d070a6\",\"name\":\"d9b76d86-a3e7-4e9b-befb-3fe5a8d070a6\",\"type\":\"Microsoft.Marketplace/privateStores/collections\",\"properties\":{\"appliedRules\":null,\"approveAllItems\":false,\"approveAllItemsModifiedAt\":\"0001-01-01T00:00:00.0000000\",\"collectionId\":\"d9b76d86-a3e7-4e9b-befb-3fe5a8d070a6\",\"collectionName\":\"hamzza\",\"claim\":\"\",\"allSubscriptions\":false,\"subscriptionsList\":[],\"enabled\":false,\"numberOfOffers\":1}},{\"systemData\":{\"createdBy\":\"\",\"createdByType\":\"User\",\"createdAt\":\"2024-01-18T09:41:54.8972241Z\",\"lastModifiedBy\":\"\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-01-18T09:41:54.9285122Z\"},\"id\":\"providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/0a4d89f3-8348-4961-9bec-a02780ab8144\",\"name\":\"0a4d89f3-8348-4961-9bec-a02780ab8144\",\"type\":\"Microsoft.Marketplace/privateStores/collections\",\"properties\":{\"appliedRules\":[{\"type\":\"PrivateProducts\",\"value\":null}],\"approveAllItems\":false,\"approveAllItemsModifiedAt\":\"0001-01-01T00:00:00.0000000\",\"collectionId\":\"0a4d89f3-8348-4961-9bec-a02780ab8144\",\"collectionName\":\"Guy\",\"claim\":\"\",\"allSubscriptions\":true,\"subscriptionsList\":[],\"enabled\":false,\"numberOfOffers\":9}},{\"systemData\":{\"createdBy\":\"\",\"createdByType\":\"User\",\"createdAt\":\"2024-02-05T10:00:08.3151793Z\",\"lastModifiedBy\":\"\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-02-06T12:09:41.5995546Z\"},\"id\":\"providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa01f1\",\"name\":\"fdb889a1-cf3e-49f0-95b8-2bb012fa01f1\",\"type\":\"Microsoft.Marketplace/privateStores/collections\",\"properties\":{\"appliedRules\":null,\"approveAllItems\":false,\"approveAllItemsModifiedAt\":\"0001-01-01T00:00:00.0000000\",\"collectionId\":\"fdb889a1-cf3e-49f0-95b8-2bb012fa01f1\",\"collectionName\":\"pwshNewCollTest\",\"claim\":null,\"allSubscriptions\":false,\"subscriptionsList\":[],\"enabled\":true,\"numberOfOffers\":2}},{\"systemData\":{\"createdBy\":\"\",\"createdByType\":\"User\",\"createdAt\":\"2024-02-06T12:14:34.5033797Z\",\"lastModifiedBy\":\"\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-02-06T12:14:38.8098396Z\"},\"id\":\"providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa0188\",\"name\":\"fdb889a1-cf3e-49f0-95b8-2bb012fa0188\",\"type\":\"Microsoft.Marketplace/privateStores/collections\",\"properties\":{\"appliedRules\":null,\"approveAllItems\":true,\"approveAllItemsModifiedAt\":\"2024-02-06T12:14:39.9160000Z\",\"collectionId\":\"fdb889a1-cf3e-49f0-95b8-2bb012fa0188\",\"collectionName\":\"AllItemsPWRTest1\",\"claim\":null,\"allSubscriptions\":false,\"subscriptionsList\":[],\"enabled\":false,\"numberOfOffers\":0}},{\"systemData\":{\"createdBy\":\"\",\"createdByType\":\"User\",\"createdAt\":\"2024-02-06T12:14:35.3055425Z\",\"lastModifiedBy\":\"\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-02-06T12:14:35.3211744Z\"},\"id\":\"providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/8c7a91db-cd41-43b6-af47-2e869654126d\",\"name\":\"8c7a91db-cd41-43b6-af47-2e869654126d\",\"type\":\"Microsoft.Marketplace/privateStores/collections\",\"properties\":{\"appliedRules\":null,\"approveAllItems\":false,\"approveAllItemsModifiedAt\":\"0001-01-01T00:00:00.0000000\",\"collectionId\":\"8c7a91db-cd41-43b6-af47-2e869654126d\",\"collectionName\":\"CopyPWRTest1\",\"claim\":null,\"allSubscriptions\":false,\"subscriptionsList\":[],\"enabled\":false,\"numberOfOffers\":1}}]}", + "isContentBase64": false + } + }, + "Get-AzMarketplacePrivateStoreCollection+[NoContext]+Get+$GET+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/a260d38c-96cf-492d-a340-404d0c4b3ad6?api-version=2023-01-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/a260d38c-96cf-492d-a340-404d0c4b3ad6?api-version=2023-01-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "11" ], + "x-ms-client-request-id": [ "d1cc56dc-4173-4252-a6e3-134d8cf0f6be" ], + "CommandName": [ "Get-AzMarketplacePrivateStoreCollection" ], + "FullCommandName": [ "Get-AzMarketplacePrivateStoreCollection_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.11", "Az.Marketplace/1.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Accept-Ranges": [ "bytes" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=a3053b2a1619a6aa4b0e7e497e4fa01864cd730cd9c257837f8a0036d6c79b63;Path=/;HttpOnly;Secure;Domain=main.prod.marketplaceprivatestore.azure.com", "ARRAffinitySameSite=a3053b2a1619a6aa4b0e7e497e4fa01864cd730cd9c257837f8a0036d6c79b63;Path=/;HttpOnly;SameSite=None;Secure;Domain=main.prod.marketplaceprivatestore.azure.com" ], + "x-ms-ratelimit-remaining-tenant-reads": [ "11999" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-XSS-Protection": [ "1; mode=block" ], + "x-ms-version": [ "6.0.02586.90-5c77bed2" ], + "X-AspNet-Version": [ "4.0.30319" ], + "X-Powered-By": [ "ASP.NET" ], + "x-azure-ref": [ "20240206T121443Z-gwknnxeka10xrfzb2a991aarkg0000000as000000000ap0y" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "x-ms-request-id": [ "24cbc373-1412-4581-b25e-865bc477a0cf" ], + "x-ms-correlation-request-id": [ "24cbc373-1412-4581-b25e-865bc477a0cf" ], + "x-ms-routing-request-id": [ "ISRAELCENTRAL:20240206T121443Z:24cbc373-1412-4581-b25e-865bc477a0cf" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-MSEdge-Ref": [ "Ref A: D6D0F5CF3C4C45018C2B4E4C80EE0C95 Ref B: MRS211050313051 Ref C: 2024-02-06T12:14:43Z" ], + "Date": [ "Tue, 06 Feb 2024 12:14:43 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "790" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"systemData\":{\"createdBy\":\"\",\"createdByType\":\"User\",\"createdAt\":null,\"lastModifiedBy\":\"\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2021-12-13T13:21:57.3181794Z\"},\"id\":\"providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"name\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"type\":\"Microsoft.Marketplace/privateStores/collections\",\"properties\":{\"appliedRules\":[{\"type\":\"TermsAndCondition\",\"value\":null},{\"type\":\"PrivateProducts\",\"value\":null}],\"approveAllItems\":false,\"approveAllItemsModifiedAt\":\"0001-01-01T00:00:00.0000000\",\"collectionId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"collectionName\":\"DefaultCollection\",\"claim\":null,\"allSubscriptions\":true,\"subscriptionsList\":[],\"enabled\":true,\"numberOfOffers\":7}}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreCollection.Tests.ps1 b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreCollection.Tests.ps1 new file mode 100644 index 000000000000..3e4b2806c2db --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreCollection.Tests.ps1 @@ -0,0 +1,30 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzMarketplacePrivateStoreCollection')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzMarketplacePrivateStoreCollection.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzMarketplacePrivateStoreCollection' { + It 'List' { + $response = Get-AzMarketplacePrivateStoreCollection -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 + $response | Should -Not -Be $null + $response.Count | Should -BeGreaterThan 0 + $response[0].CollectionId | Should -BeLike "a260d38c-96cf-492d-a340-404d0c4b3ad6" + } + + It 'Get' { + $response = Get-AzMarketplacePrivateStoreCollection -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -CollectionId a260d38c-96cf-492d-a340-404d0c4b3ad6 + $response | Should -Not -Be $null + $response.CollectionId | Should -BeLike "a260d38c-96cf-492d-a340-404d0c4b3ad6" + } +} diff --git a/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreCollectionMapOffersToContext.Recording.json b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreCollectionMapOffersToContext.Recording.json new file mode 100644 index 000000000000..3f432eb007a5 --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreCollectionMapOffersToContext.Recording.json @@ -0,0 +1,47 @@ +{ + "Get-AzMarketplacePrivateStoreCollectionMapOffersToContext+[NoContext]+ListExpanded+$POST+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/a260d38c-96cf-492d-a340-404d0c4b3ad6/mapOffersToContexts?api-version=2023-01-01+1": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/a260d38c-96cf-492d-a340-404d0c4b3ad6/mapOffersToContexts?api-version=2023-01-01", + "Content": "{\r\n \"properties\": {\r\n \"subscriptionIds\": [ \"1f58b5dd-313c-42ed-84fc-f1e351bba7fb\", \"ab3de7bc-7a6e-4e9f-a34a-f6922df453e4\" ]\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "135" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Accept-Ranges": [ "bytes" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=80c7a5f90186ed67b1a22b2d6ba64306a36f909c848093374b79f8b04109a233;Path=/;HttpOnly;Secure;Domain=main.prod.marketplaceprivatestore.azure.com", "ARRAffinitySameSite=80c7a5f90186ed67b1a22b2d6ba64306a36f909c848093374b79f8b04109a233;Path=/;HttpOnly;SameSite=None;Secure;Domain=main.prod.marketplaceprivatestore.azure.com" ], + "x-ms-ratelimit-remaining-tenant-writes": [ "1193" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-XSS-Protection": [ "1; mode=block" ], + "x-ms-version": [ "6.0.02586.90-5c77bed2" ], + "X-AspNet-Version": [ "4.0.30319" ], + "X-Powered-By": [ "ASP.NET" ], + "x-azure-ref": [ "20240206T121444Z-e9fr18rg4936d7qwr39u9d2ats00000002x0000000007scg" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "x-ms-request-id": [ "815c1ea9-9ce6-4ddc-b6c8-6a3991c08992" ], + "x-ms-correlation-request-id": [ "815c1ea9-9ce6-4ddc-b6c8-6a3991c08992" ], + "x-ms-routing-request-id": [ "ISRAELCENTRAL:20240206T121445Z:815c1ea9-9ce6-4ddc-b6c8-6a3991c08992" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-MSEdge-Ref": [ "Ref A: 63452161B12C45AA83583F6F1BC379FD Ref B: MRS211050313051 Ref C: 2024-02-06T12:14:44Z" ], + "Date": [ "Tue, 06 Feb 2024 12:14:45 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "4773" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"context\":\"00000000-0000-0000-0000-000000000000\",\"offers\":{\"value\":[{\"uniqueOfferId\":\"aumatics.azure_managedservices\",\"offerDisplayName\":\"Aumatics Azure Managed Services\",\"publisherDisplayName\":\"Aumatics\",\"specificPlanIdsLimitation\":null,\"eTag\":\"\\\"c303ee7f-0000-0100-0000-65c0b1020000\\\"\",\"privateStoreId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"createdAt\":\"2024-02-05T09:57:22.5643444Z\",\"modifiedAt\":\"2024-02-05T09:57:22.5643444Z\",\"plans\":[{\"planId\":\"azure_managedservices_professional\",\"skuId\":\"0001\",\"planDisplayName\":\"Azure Managed Services - Professional\",\"accessibility\":\"Public\",\"altStackReference\":null,\"stackType\":null}],\"iconFileUris\":{\"small\":\"https://store-images.s-microsoft.com/image/apps.28502.8bd414a4-a646-44ba-b745-faf1acee99a2.5610b36b-a1d5-4ed6-a2ec-675fd8b46e6e.6ed46d56-5177-4b3b-b792-d171f21ac71e\",\"medium\":\"https://store-images.s-microsoft.com/image/apps.47342.8bd414a4-a646-44ba-b745-faf1acee99a2.5610b36b-a1d5-4ed6-a2ec-675fd8b46e6e.c4c26433-ca62-4cf7-ba7c-a756fdd8ee51\",\"large\":\"https://store-images.s-microsoft.com/image/apps.63869.8bd414a4-a646-44ba-b745-faf1acee99a2.5610b36b-a1d5-4ed6-a2ec-675fd8b46e6e.acbf0bd7-1405-41ef-8bbb-bf62c04c60e0\"},\"updateSuppressedDueIdempotence\":false}]}},{\"context\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"offers\":{\"value\":[{\"uniqueOfferId\":\"test_test_pmc2pc1.vm_4plans_privatestoretesting\",\"offerDisplayName\":\"Test Base for VM Private Store\",\"publisherDisplayName\":\"Test PMC 2 PC\",\"specificPlanIdsLimitation\":[\"plan3\"],\"eTag\":\"\\\"c503b892-0000-0100-0000-65c0cb150000\\\"\",\"privateStoreId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"createdAt\":\"2024-02-05T11:48:37.5866264Z\",\"modifiedAt\":\"2024-02-05T11:48:37.6022504Z\",\"plans\":[{\"planId\":\"plan3\",\"skuId\":\"0003\",\"planDisplayName\":\"Plan3\",\"accessibility\":\"Unknown\",\"altStackReference\":null,\"stackType\":null}],\"iconFileUris\":{\"medium\":\"https://store-images.s-microsoft.com/image/apps.47730.e4c872ef-fcba-4287-b5ff-5526c4cee53a.b94f1a28-7936-42c1-b674-8361b5ca9666.e2760c98-3678-47a6-b228-0ca2ec8dea7c\",\"small\":\"https://store-images.s-microsoft.com/image/apps.24616.e4c872ef-fcba-4287-b5ff-5526c4cee53a.b94f1a28-7936-42c1-b674-8361b5ca9666.4eaae684-1741-4d55-8019-e35616172a23\",\"large\":\"https://store-images.s-microsoft.com/image/apps.28795.e4c872ef-fcba-4287-b5ff-5526c4cee53a.b94f1a28-7936-42c1-b674-8361b5ca9666.65b0c4d7-6a12-48d2-8f44-b54c118e19d4\"},\"updateSuppressedDueIdempotence\":false}]}},{\"context\":\"1f58b5dd-313c-42ed-84fc-f1e351bba7fb\",\"offers\":{\"value\":[{\"uniqueOfferId\":\"test_test_pmc2pc1.vm_4plans_privatestoretesting\",\"offerDisplayName\":\"Test Base for VM Private Store\",\"publisherDisplayName\":\"Test PMC 2 PC\",\"specificPlanIdsLimitation\":[\"plan1\"],\"eTag\":\"\\\"c503b892-0000-0100-0000-65c0cb150000\\\"\",\"privateStoreId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"createdAt\":\"2024-02-05T11:48:37.5866264Z\",\"modifiedAt\":\"2024-02-05T11:48:37.6022504Z\",\"plans\":[{\"planId\":\"plan1\",\"skuId\":\"0001\",\"planDisplayName\":\"Plan1\",\"accessibility\":\"Unknown\",\"altStackReference\":null,\"stackType\":null}],\"iconFileUris\":{\"medium\":\"https://store-images.s-microsoft.com/image/apps.47730.e4c872ef-fcba-4287-b5ff-5526c4cee53a.b94f1a28-7936-42c1-b674-8361b5ca9666.e2760c98-3678-47a6-b228-0ca2ec8dea7c\",\"small\":\"https://store-images.s-microsoft.com/image/apps.24616.e4c872ef-fcba-4287-b5ff-5526c4cee53a.b94f1a28-7936-42c1-b674-8361b5ca9666.4eaae684-1741-4d55-8019-e35616172a23\",\"large\":\"https://store-images.s-microsoft.com/image/apps.28795.e4c872ef-fcba-4287-b5ff-5526c4cee53a.b94f1a28-7936-42c1-b674-8361b5ca9666.65b0c4d7-6a12-48d2-8f44-b54c118e19d4\"},\"updateSuppressedDueIdempotence\":false}]}},{\"context\":\"ab3de7bc-7a6e-4e9f-a34a-f6922df453e4\",\"offers\":{\"value\":[{\"uniqueOfferId\":\"test_test_pmc2pc1.vm_4plans_privatestoretesting\",\"offerDisplayName\":\"Test Base for VM Private Store\",\"publisherDisplayName\":\"Test PMC 2 PC\",\"specificPlanIdsLimitation\":[\"plan2\"],\"eTag\":\"\\\"c503b892-0000-0100-0000-65c0cb150000\\\"\",\"privateStoreId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"createdAt\":\"2024-02-05T11:48:37.5866264Z\",\"modifiedAt\":\"2024-02-05T11:48:37.6022504Z\",\"plans\":[{\"planId\":\"plan2\",\"skuId\":\"0002\",\"planDisplayName\":\"Plan2\",\"accessibility\":\"Unknown\",\"altStackReference\":null,\"stackType\":null}],\"iconFileUris\":{\"medium\":\"https://store-images.s-microsoft.com/image/apps.47730.e4c872ef-fcba-4287-b5ff-5526c4cee53a.b94f1a28-7936-42c1-b674-8361b5ca9666.e2760c98-3678-47a6-b228-0ca2ec8dea7c\",\"small\":\"https://store-images.s-microsoft.com/image/apps.24616.e4c872ef-fcba-4287-b5ff-5526c4cee53a.b94f1a28-7936-42c1-b674-8361b5ca9666.4eaae684-1741-4d55-8019-e35616172a23\",\"large\":\"https://store-images.s-microsoft.com/image/apps.28795.e4c872ef-fcba-4287-b5ff-5526c4cee53a.b94f1a28-7936-42c1-b674-8361b5ca9666.65b0c4d7-6a12-48d2-8f44-b54c118e19d4\"},\"updateSuppressedDueIdempotence\":false}]}}]}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreCollectionMapOffersToContext.Tests.ps1 b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreCollectionMapOffersToContext.Tests.ps1 new file mode 100644 index 000000000000..85361049d92e --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreCollectionMapOffersToContext.Tests.ps1 @@ -0,0 +1,24 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzMarketplacePrivateStoreCollectionMapOffersToContext')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzMarketplacePrivateStoreCollectionMapOffersToContext.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzMarketplacePrivateStoreCollectionMapOffersToContext' { + It 'ListExpanded' { + $response = Get-AzMarketplacePrivateStoreCollectionMapOffersToContext -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -CollectionId a260d38c-96cf-492d-a340-404d0c4b3ad6 -SubscriptionId 1f58b5dd-313c-42ed-84fc-f1e351bba7fb,ab3de7bc-7a6e-4e9f-a34a-f6922df453e4 + $response | Should -Not -Be $null + $response.Count | Should -BeGreaterThan 0 + $response[0].context | Should -BeLike "00000000-0000-0000-0000-000000000000" + } +} diff --git a/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreCollectionOffer.Recording.json b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreCollectionOffer.Recording.json index 9a04a2779bda..a578a00f5df2 100644 --- a/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreCollectionOffer.Recording.json +++ b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreCollectionOffer.Recording.json @@ -1,17 +1,17 @@ { - "Get-AzMarketplacePrivateStoreCollectionOffer+[NoContext]+List+$GET+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/a260d38c-96cf-492d-a340-404d0c4b3ad6/offers?api-version=2021-06-01+1": { + "Get-AzMarketplacePrivateStoreCollectionOffer+[NoContext]+List+$GET+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/a260d38c-96cf-492d-a340-404d0c4b3ad6/offers?api-version=2023-01-01+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/a260d38c-96cf-492d-a340-404d0c4b3ad6/offers?api-version=2021-06-01", + "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/a260d38c-96cf-492d-a340-404d0c4b3ad6/offers?api-version=2023-01-01", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "5" ], - "x-ms-client-request-id": [ "c3cd6e08-2403-43e1-bae9-a137382d966c" ], + "x-ms-unique-id": [ "13" ], + "x-ms-client-request-id": [ "ee2584b6-020a-4be6-8fd7-959a3153de79" ], "CommandName": [ "Get-AzMarketplacePrivateStoreCollectionOffer" ], "FullCommandName": [ "Get-AzMarketplacePrivateStoreCollectionOffer_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.11", "Az.Marketplace/1.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,27 +22,30 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], + "Accept-Ranges": [ "bytes" ], "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=a3053b2a1619a6aa4b0e7e497e4fa01864cd730cd9c257837f8a0036d6c79b63;Path=/;HttpOnly;Secure;Domain=main.prod.marketplaceprivatestore.azure.com", "ARRAffinitySameSite=a3053b2a1619a6aa4b0e7e497e4fa01864cd730cd9c257837f8a0036d6c79b63;Path=/;HttpOnly;SameSite=None;Secure;Domain=main.prod.marketplaceprivatestore.azure.com" ], + "x-ms-ratelimit-remaining-tenant-reads": [ "11998" ], "X-Content-Type-Options": [ "nosniff" ], "X-XSS-Protection": [ "1; mode=block" ], - "x-ms-version": [ "6.0.01832.0004-467b09b3" ], - "Set-Cookie": [ "ARRAffinity=b115d2f875c66b84b700975954f361f48f95995b3649b85a0990b9141d8b2e7d;Path=/;HttpOnly;Secure;Domain=marketplacerp.azure.com", "ARRAffinitySameSite=b115d2f875c66b84b700975954f361f48f95995b3649b85a0990b9141d8b2e7d;Path=/;HttpOnly;SameSite=None;Secure;Domain=marketplacerp.azure.com" ], - "Server": [ "Microsoft-IIS/10.0" ], + "x-ms-version": [ "6.0.02586.90-5c77bed2" ], "X-AspNet-Version": [ "4.0.30319" ], "X-Powered-By": [ "ASP.NET" ], - "x-ms-ratelimit-remaining-tenant-reads": [ "11999" ], - "x-ms-request-id": [ "555d7d35-2919-42b5-b672-6253d60dd5d4" ], - "x-ms-correlation-request-id": [ "555d7d35-2919-42b5-b672-6253d60dd5d4" ], - "x-ms-routing-request-id": [ "UAECENTRAL:20220124T135835Z:555d7d35-2919-42b5-b672-6253d60dd5d4" ], + "x-azure-ref": [ "20240206T121446Z-gwknnxeka10xrfzb2a991aarkg0000000as000000000ap2e" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "x-ms-request-id": [ "effbc9a8-ebfa-4856-b2f9-f7e4f0f2891c" ], + "x-ms-correlation-request-id": [ "effbc9a8-ebfa-4856-b2f9-f7e4f0f2891c" ], + "x-ms-routing-request-id": [ "ISRAELCENTRAL:20240206T121446Z:effbc9a8-ebfa-4856-b2f9-f7e4f0f2891c" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Date": [ "Mon, 24 Jan 2022 13:58:34 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 6FEF5CF2C17D4BF4957C4185AD782DE0 Ref B: MRS211050313051 Ref C: 2024-02-06T12:14:46Z" ], + "Date": [ "Tue, 06 Feb 2024 12:14:45 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "3754" ], + "Content-Length": [ "1117" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/a260d38c-96cf-492d-a340-404d0c4b3ad6/offers/viacode_consulting-1089577.viacodems\",\"name\":\"viacode_consulting-1089577.viacodems\",\"type\":\"Microsoft.Marketplace/privateStores/collection/offers\",\"properties\":{\"uniqueOfferId\":\"viacode_consulting-1089577.viacodems\",\"specificPlanIdsLimitation\":[\"mgmt-assessment\",\"mgmt-limited-free\"],\"eTag\":\"\\\"6300c3e2-0000-0100-0000-61ded3bf0000\\\"\",\"privateStoreId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"updateSuppressedDueIdempotence\":false}},{\"id\":\"/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/a260d38c-96cf-492d-a340-404d0c4b3ad6/offers/apps-4-rent.quickfx-administration\",\"name\":\"apps-4-rent.quickfx-administration\",\"type\":\"Microsoft.Marketplace/privateStores/collection/offers\",\"properties\":{\"uniqueOfferId\":\"apps-4-rent.quickfx-administration\",\"specificPlanIdsLimitation\":[\"quick-fix-administration\"],\"eTag\":\"\\\"0700c8a0-0000-0100-0000-61e90c590000\\\"\",\"privateStoreId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"updateSuppressedDueIdempotence\":false}},{\"id\":\"/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/a260d38c-96cf-492d-a340-404d0c4b3ad6/offers/ingrammicro.ingrammicromsp\",\"name\":\"ingrammicro.ingrammicromsp\",\"type\":\"Microsoft.Marketplace/privateStores/collection/offers\",\"properties\":{\"uniqueOfferId\":\"ingrammicro.ingrammicromsp\",\"specificPlanIdsLimitation\":[\"ingrammicromsp\"],\"eTag\":\"\\\"6300b1fd-0000-0100-0000-61ded43c0000\\\"\",\"privateStoreId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"updateSuppressedDueIdempotence\":false}},{\"id\":\"/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/a260d38c-96cf-492d-a340-404d0c4b3ad6/offers/checkpoint.vsec\",\"name\":\"checkpoint.vsec\",\"type\":\"Microsoft.Marketplace/privateStores/collection/offers\",\"properties\":{\"uniqueOfferId\":\"checkpoint.vsec\",\"specificPlanIdsLimitation\":null,\"eTag\":\"\\\"6300b1a9-0000-0100-0000-61ded2b10000\\\"\",\"privateStoreId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"updateSuppressedDueIdempotence\":false}},{\"id\":\"/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/a260d38c-96cf-492d-a340-404d0c4b3ad6/offers/barracudanetworks.waf\",\"name\":\"barracudanetworks.waf\",\"type\":\"Microsoft.Marketplace/privateStores/collection/offers\",\"properties\":{\"uniqueOfferId\":\"barracudanetworks.waf\",\"specificPlanIdsLimitation\":[\"byol\",\"hourly\"],\"eTag\":\"\\\"6300e7a0-0000-0100-0000-61ded2880000\\\"\",\"privateStoreId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"updateSuppressedDueIdempotence\":false}},{\"id\":\"/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/a260d38c-96cf-492d-a340-404d0c4b3ad6/offers/cloudeteer.cdt_cloud-ops\",\"name\":\"cloudeteer.cdt_cloud-ops\",\"type\":\"Microsoft.Marketplace/privateStores/collection/offers\",\"properties\":{\"uniqueOfferId\":\"cloudeteer.cdt_cloud-ops\",\"specificPlanIdsLimitation\":[\"cloud_pro\",\"cloud_go\"],\"eTag\":\"\\\"0700c2a0-0000-0100-0000-61e90c580000\\\"\",\"privateStoreId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"updateSuppressedDueIdempotence\":false}},{\"id\":\"/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/a260d38c-96cf-492d-a340-404d0c4b3ad6/offers/aumatics.azure_managedservices\",\"name\":\"aumatics.azure_managedservices\",\"type\":\"Microsoft.Marketplace/privateStores/collection/offers\",\"properties\":{\"uniqueOfferId\":\"aumatics.azure_managedservices\",\"specificPlanIdsLimitation\":[\"azure_managedservices_professional\"],\"eTag\":\"\\\"080019ae-0000-0100-0000-61e92ccb0000\\\"\",\"privateStoreId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"updateSuppressedDueIdempotence\":false}}]}", + "Content": "{\"value\":[{\"id\":\"/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/a260d38c-96cf-492d-a340-404d0c4b3ad6/offers/test_test_pmc2pc1.vm_4plans_privatestoretesting\",\"name\":\"test_test_pmc2pc1.vm_4plans_privatestoretesting\",\"type\":\"Microsoft.Marketplace/privateStores/collection/offers\",\"properties\":{\"uniqueOfferId\":\"test_test_pmc2pc1.vm_4plans_privatestoretesting\",\"specificPlanIdsLimitation\":[\"plan3\"],\"eTag\":\"\\\"c503b892-0000-0100-0000-65c0cb150000\\\"\",\"privateStoreId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"updateSuppressedDueIdempotence\":false}},{\"id\":\"/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/a260d38c-96cf-492d-a340-404d0c4b3ad6/offers/aumatics.azure_managedservices\",\"name\":\"aumatics.azure_managedservices\",\"type\":\"Microsoft.Marketplace/privateStores/collection/offers\",\"properties\":{\"uniqueOfferId\":\"aumatics.azure_managedservices\",\"specificPlanIdsLimitation\":null,\"eTag\":\"\\\"c303ee7f-0000-0100-0000-65c0b1020000\\\"\",\"privateStoreId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"updateSuppressedDueIdempotence\":false}}]}", "isContentBase64": false } } diff --git a/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreCollectionOffer.Tests.ps1 b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreCollectionOffer.Tests.ps1 index d937a0c63f6c..c9a597d444ba 100644 --- a/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreCollectionOffer.Tests.ps1 +++ b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreCollectionOffer.Tests.ps1 @@ -16,8 +16,9 @@ if(($null -eq $TestName) -or ($TestName -contains 'Get-AzMarketplacePrivateStore Describe 'Get-AzMarketplacePrivateStoreCollectionOffer' { It 'List' { - - $res = Get-AzMarketplacePrivateStoreCollectionOffer -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -CollectionId a260d38c-96cf-492d-a340-404d0c4b3ad6 - $res.Count | Should -BeGreaterOrEqual 4 -} + $response = Get-AzMarketplacePrivateStoreCollectionOffer -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -CollectionId a260d38c-96cf-492d-a340-404d0c4b3ad6 + $response | Should -Not -Be $null + $response.Count | Should -BeGreaterOrEqual 0 + $response[0].id | Should -Match "a260d38c-96cf-492d-a340-404d0c4b3ad6" + } } \ No newline at end of file diff --git a/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreCollectionRule.Recording.json b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreCollectionRule.Recording.json new file mode 100644 index 000000000000..82c36985f248 --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreCollectionRule.Recording.json @@ -0,0 +1,52 @@ +{ + "Get-AzMarketplacePrivateStoreCollectionRule+[NoContext]+Query+$POST+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/a260d38c-96cf-492d-a340-404d0c4b3ad6/queryRules?api-version=2023-01-01+1": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/a260d38c-96cf-492d-a340-404d0c4b3ad6/queryRules?api-version=2023-01-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "14" ], + "x-ms-client-request-id": [ "08a84045-6518-432e-9901-7cb03699cfcb" ], + "CommandName": [ "Get-AzMarketplacePrivateStoreCollectionRule" ], + "FullCommandName": [ "Get-AzMarketplacePrivateStoreCollectionRule_Query" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.11", "Az.Marketplace/1.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Accept-Ranges": [ "bytes" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=bfe2117850ddf2eb1a1bdbff379f22be7abd277495b3d0ff28b1c1254c65d847;Path=/;HttpOnly;Secure;Domain=main.prod.marketplaceprivatestore.azure.com", "ARRAffinitySameSite=bfe2117850ddf2eb1a1bdbff379f22be7abd277495b3d0ff28b1c1254c65d847;Path=/;HttpOnly;SameSite=None;Secure;Domain=main.prod.marketplaceprivatestore.azure.com" ], + "x-ms-ratelimit-remaining-tenant-writes": [ "1198" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-XSS-Protection": [ "1; mode=block" ], + "x-ms-version": [ "6.0.02586.90-5c77bed2" ], + "X-AspNet-Version": [ "4.0.30319" ], + "X-Powered-By": [ "ASP.NET" ], + "x-azure-ref": [ "20240206T121447Z-gwknnxeka10xrfzb2a991aarkg0000000as000000000ap2t" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "x-ms-request-id": [ "00de42d9-0d26-49b7-83f5-65373fbf18ce" ], + "x-ms-correlation-request-id": [ "00de42d9-0d26-49b7-83f5-65373fbf18ce" ], + "x-ms-routing-request-id": [ "ISRAELCENTRAL:20240206T121447Z:00de42d9-0d26-49b7-83f5-65373fbf18ce" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-MSEdge-Ref": [ "Ref A: E79DEA5AED2D409F820001D5E6A13A4F Ref B: MRS211050313051 Ref C: 2024-02-06T12:14:47Z" ], + "Date": [ "Tue, 06 Feb 2024 12:14:46 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "93" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"type\":\"TermsAndCondition\",\"value\":null},{\"type\":\"PrivateProducts\",\"value\":null}]}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreCollectionRule.Tests.ps1 b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreCollectionRule.Tests.ps1 new file mode 100644 index 000000000000..1838347bb6b2 --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreCollectionRule.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzMarketplacePrivateStoreCollectionRule')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzMarketplacePrivateStoreCollectionRule.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzMarketplacePrivateStoreCollectionRule' { + It 'Query' { + $response = Get-AzMarketplacePrivateStoreCollectionRule -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -CollectionId a260d38c-96cf-492d-a340-404d0c4b3ad6 + $response | Should -Not -Be $null + $response.Count | Should -BeGreaterOrEqual 0 + } +} diff --git a/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreNewPlanNotification.Recording.json b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreNewPlanNotification.Recording.json new file mode 100644 index 000000000000..43caf5a06521 --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreNewPlanNotification.Recording.json @@ -0,0 +1,52 @@ +{ + "Get-AzMarketplacePrivateStoreNewPlanNotification+[NoContext]+List+$POST+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/listNewPlansNotifications?api-version=2023-01-01+1": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/listNewPlansNotifications?api-version=2023-01-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "15" ], + "x-ms-client-request-id": [ "241fd7a2-d831-46fc-a727-78cce29f6120" ], + "CommandName": [ "Get-AzMarketplacePrivateStoreNewPlanNotification" ], + "FullCommandName": [ "Get-AzMarketplacePrivateStoreNewPlanNotification_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.11", "Az.Marketplace/1.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Accept-Ranges": [ "bytes" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=71c5ecfca949e38fa6d8b6899df69a8bc1065f71ea6211c776e43d3b7b216b7d;Path=/;HttpOnly;Secure;Domain=main.prod.marketplaceprivatestore.azure.com", "ARRAffinitySameSite=71c5ecfca949e38fa6d8b6899df69a8bc1065f71ea6211c776e43d3b7b216b7d;Path=/;HttpOnly;SameSite=None;Secure;Domain=main.prod.marketplaceprivatestore.azure.com" ], + "x-ms-ratelimit-remaining-tenant-writes": [ "1192" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-XSS-Protection": [ "1; mode=block" ], + "x-ms-version": [ "6.0.02586.90-5c77bed2" ], + "X-AspNet-Version": [ "4.0.30319" ], + "X-Powered-By": [ "ASP.NET" ], + "x-azure-ref": [ "20240206T121447Z-e9fr18rg4936d7qwr39u9d2ats00000002x0000000007sfh" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "x-ms-request-id": [ "fe7667ba-6731-4122-9f1c-5fc797322039" ], + "x-ms-correlation-request-id": [ "fe7667ba-6731-4122-9f1c-5fc797322039" ], + "x-ms-routing-request-id": [ "ISRAELCENTRAL:20240206T121505Z:fe7667ba-6731-4122-9f1c-5fc797322039" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-MSEdge-Ref": [ "Ref A: C5732EA89109404DA4E0FBC4EA6EC2AB Ref B: MRS211050313051 Ref C: 2024-02-06T12:14:47Z" ], + "Date": [ "Tue, 06 Feb 2024 12:15:04 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "3564" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"newPlansNotifications\":[{\"offerId\":\"ionqinc1582730893633.ionq-aq\",\"displayName\":\"IonQ Quantum Computer\",\"isFuturePlansEnabled\":false,\"plans\":[{\"planDisplayName\":\"Pay As You Go New (Credits)\",\"planId\":\"aqt-pay-as-you-go-cred\"},{\"planDisplayName\":\"Pay As You Go New\",\"planId\":\"aqt-pay-as-you-go\"}],\"messageCode\":10000,\"icon\":\"https://store-images.s-microsoft.com/image/apps.59976.c625a37e-4a6d-4c8f-94b7-722ec9e77b43.52f31f70-bc4e-4146-88ad-e6d26bd8afbe.6a75b316-f81f-4ed8-be80-abd527d74af7\"},{\"offerId\":\"episerver.optimizely_customer-centric_digital_experience\",\"displayName\":\"Optimizely Customer-Centric Digital Experience\",\"isFuturePlansEnabled\":false,\"plans\":[{\"planDisplayName\":\"Search \u0026 Navigation\",\"planId\":\"05\"}],\"messageCode\":10000,\"icon\":\"https://store-images.s-microsoft.com/image/apps.21006.1ef6fd87-2225-4a0d-ad85-e7c36a1dcbea.1dcac2ec-e9f5-4701-a792-12a50e946495.e45ff0b2-2e40-43cf-ab7b-9392372c898a\"},{\"offerId\":\"haivisionsystemsinc1580780591922.haivision-srt-gateway\",\"displayName\":\"Haivision SRT Gateway\",\"isFuturePlansEnabled\":false,\"plans\":[{\"planDisplayName\":\"Haivision SRT Gateway 3.8.1\",\"planId\":\"srt-gateway-3-8-1-mi\"}],\"messageCode\":10000,\"icon\":\"https://store-images.s-microsoft.com/image/apps.56129.c5d0ccc5-4bcc-48b8-8c6c-5de4db5102d5.cddb8763-605c-4030-a07f-f0fc548f390d.58c6518d-ded9-4bfe-a7e2-5ee09f96645f\"},{\"offerId\":\"haivisionsystemsinc1580780591922.haivision-kraken\",\"displayName\":\"Haivision Kraken Transcoder\",\"isFuturePlansEnabled\":false,\"plans\":[{\"planDisplayName\":\"Haivision Kraken 3.10.0b\",\"planId\":\"hai-kraken-3_10_0b-byol-vm\"},{\"planDisplayName\":\"Haivision Kraken 3.10.1\",\"planId\":\"hai-kraken-3_10_1-byol-vm\"}],\"messageCode\":10000,\"icon\":\"https://store-images.s-microsoft.com/image/apps.4466.475e9d4d-4cbc-4e8b-92e5-1f8a352f5993.f2b7a742-a4cd-4aa2-a654-2c792c40b780.a8bc4595-054d-4936-9e5b-d578fe3f5126\"},{\"offerId\":\"argoscloudsecurity1605618416175.argoscloudsecurity\",\"displayName\":\"ARGOS Cloud Security - modern cloud security diagrams\",\"isFuturePlansEnabled\":false,\"plans\":[{\"planDisplayName\":\"ARGOS for Teams\",\"planId\":\"argosforteams\"}],\"messageCode\":10000,\"icon\":\"https://store-images.s-microsoft.com/image/apps.30662.8f8a2d3c-0167-4dfd-bdc4-6ef8d833e694.66485f74-9342-4e6d-864c-853c10974805.b9e128f8-9efb-407c-809d-43ba2013326f\"},{\"offerId\":\"haivisionsystemsinc1580780591922.haivision-media-gateway\",\"displayName\":\"Haivision Media Gateway\",\"isFuturePlansEnabled\":false,\"plans\":[{\"planDisplayName\":\"Version 3.8.1\",\"planId\":\"hmg-azu-3-8-1-byol-vm\"}],\"messageCode\":10000,\"icon\":\"https://store-images.s-microsoft.com/image/apps.30282.bb1be070-06d5-430d-89d8-87336b5ac843.bca5a4ff-1dcb-4eb6-83a4-3691138691aa.f5e134eb-08eb-4f07-81bb-74c022a7ed8b\"},{\"offerId\":\"postgres-pro.postgres-pro-enterprise-12-vm\",\"displayName\":\"Postgres Pro Enterprise Database 12 (VM)\",\"isFuturePlansEnabled\":false,\"plans\":[{\"planDisplayName\":\"Postgres Pro Enterprise Database 12.17.1 ( AlmaLinux 8)\",\"planId\":\"pgpro-ent12-almalinux8-x64\"}],\"messageCode\":10000,\"icon\":\"https://store-images.s-microsoft.com/image/apps.57093.1b853248-014c-4f64-8f27-d5e47ccc561a.f26b9c44-1d89-41c9-b2e9-4eea8a9c3f03.5a10a1d7-c332-4e1a-8006-f2550884cc63\"},{\"offerId\":\"teradici.hp_anyware\",\"displayName\":\"HP Anyware, formerly Teradici\",\"isFuturePlansEnabled\":false,\"plans\":[{\"planDisplayName\":\"HP Anyware Agent + NVidia GPU + Win11Pro\",\"planId\":\"hp_awa_nvidia_gpu_win11\"}],\"messageCode\":10000,\"icon\":\"https://store-images.s-microsoft.com/image/apps.4755.7cf48e1e-0a26-4c95-bf3f-315bb62002c8.36623ead-5e98-4797-9a23-fcc9f64df455.bebe9396-8b25-4eeb-a6ec-1e4ca22c515a\"}]}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreNewPlanNotification.Tests.ps1 b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreNewPlanNotification.Tests.ps1 new file mode 100644 index 000000000000..686a2a46a475 --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreNewPlanNotification.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzMarketplacePrivateStoreNewPlanNotification')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzMarketplacePrivateStoreNewPlanNotification.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzMarketplacePrivateStoreNewPlanNotification' { + It 'List' { + $response = Get-AzMarketplacePrivateStoreNewPlanNotification -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 + $response | Should -Not -Be $null + $response.Count | Should -BeGreaterThan 0 + } +} diff --git a/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreSubscription.Recording.json b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreSubscription.Recording.json new file mode 100644 index 000000000000..bab1e79d1cec --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreSubscription.Recording.json @@ -0,0 +1,52 @@ +{ + "Get-AzMarketplacePrivateStoreSubscription+[NoContext]+List+$POST+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/listSubscriptionsContext?api-version=2023-01-01+1": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/listSubscriptionsContext?api-version=2023-01-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "16" ], + "x-ms-client-request-id": [ "707ca8fa-cc1e-4e4c-a208-1155f98d04b6" ], + "CommandName": [ "Get-AzMarketplacePrivateStoreSubscription" ], + "FullCommandName": [ "Get-AzMarketplacePrivateStoreSubscription_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.11", "Az.Marketplace/1.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Accept-Ranges": [ "bytes" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=bfe2117850ddf2eb1a1bdbff379f22be7abd277495b3d0ff28b1c1254c65d847;Path=/;HttpOnly;Secure;Domain=main.prod.marketplaceprivatestore.azure.com", "ARRAffinitySameSite=bfe2117850ddf2eb1a1bdbff379f22be7abd277495b3d0ff28b1c1254c65d847;Path=/;HttpOnly;SameSite=None;Secure;Domain=main.prod.marketplaceprivatestore.azure.com" ], + "x-ms-ratelimit-remaining-tenant-writes": [ "1196" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-XSS-Protection": [ "1; mode=block" ], + "x-ms-version": [ "6.0.02586.90-5c77bed2" ], + "X-AspNet-Version": [ "4.0.30319" ], + "X-Powered-By": [ "ASP.NET" ], + "x-azure-ref": [ "20240206T121505Z-puek9bzdet0fz0hz46rmzq0b5c0000000bhg000000002e3f" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "x-ms-request-id": [ "40232790-ff8b-496f-874f-497879a9771d" ], + "x-ms-correlation-request-id": [ "40232790-ff8b-496f-874f-497879a9771d" ], + "x-ms-routing-request-id": [ "ISRAELCENTRAL:20240206T121506Z:40232790-ff8b-496f-874f-497879a9771d" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-MSEdge-Ref": [ "Ref A: 2D3E425518D543A4882FF57BCC87D5D3 Ref B: MRS211050313051 Ref C: 2024-02-06T12:15:05Z" ], + "Date": [ "Tue, 06 Feb 2024 12:15:05 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "139" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"subscriptionsIds\":[\"1052ff5a-aa43-4ca1-bd18-010399494ce5\",\"ab3de7bc-7a6e-4e9f-a34a-f6922df453e4\",\"1f58b5dd-313c-42ed-84fc-f1e351bba7fb\"]}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreSubscription.Tests.ps1 b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreSubscription.Tests.ps1 new file mode 100644 index 000000000000..afcc8fe48654 --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreSubscription.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzMarketplacePrivateStoreSubscription')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzMarketplacePrivateStoreSubscription.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzMarketplacePrivateStoreSubscription' { + It 'List' { + $response = Get-AzMarketplacePrivateStoreSubscription -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 + $response | Should -Not -Be $null + $response.Count | Should -BeGreaterThan 0 + } +} diff --git a/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreUserOffer.Recording.json b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreUserOffer.Recording.json new file mode 100644 index 000000000000..dd8afb53cb93 --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreUserOffer.Recording.json @@ -0,0 +1,47 @@ +{ + "Get-AzMarketplacePrivateStoreUserOffer+[NoContext]+QueryExpanded+$POST+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/queryUserOffers?api-version=2023-01-01+1": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/queryUserOffers?api-version=2023-01-01", + "Content": "{\r\n \"properties\": {\r\n \"offerIds\": [ \"aumatics.azure_managedservices\" ],\r\n \"subscriptionIds\": [ \"1f58b5dd-313c-42ed-84fc-f1e351bba7fb\" ]\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "150" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Accept-Ranges": [ "bytes" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=80c7a5f90186ed67b1a22b2d6ba64306a36f909c848093374b79f8b04109a233;Path=/;HttpOnly;Secure;Domain=main.prod.marketplaceprivatestore.azure.com", "ARRAffinitySameSite=80c7a5f90186ed67b1a22b2d6ba64306a36f909c848093374b79f8b04109a233;Path=/;HttpOnly;SameSite=None;Secure;Domain=main.prod.marketplaceprivatestore.azure.com" ], + "x-ms-ratelimit-remaining-tenant-writes": [ "1194" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-XSS-Protection": [ "1; mode=block" ], + "x-ms-version": [ "6.0.02586.90-5c77bed2" ], + "X-AspNet-Version": [ "4.0.30319" ], + "X-Powered-By": [ "ASP.NET" ], + "x-azure-ref": [ "20240206T121507Z-8f6r3xskwh4btc8yq2qh5g5fz40000000950000000007at8" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "x-ms-request-id": [ "5a6ee7a7-a32e-4a3c-97c3-33e252f4b1d9" ], + "x-ms-correlation-request-id": [ "5a6ee7a7-a32e-4a3c-97c3-33e252f4b1d9" ], + "x-ms-routing-request-id": [ "ISRAELCENTRAL:20240206T121509Z:5a6ee7a7-a32e-4a3c-97c3-33e252f4b1d9" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-MSEdge-Ref": [ "Ref A: B102CFD12D2D443BB82DA25EC67A589A Ref B: MRS211050313051 Ref C: 2024-02-06T12:15:06Z" ], + "Date": [ "Tue, 06 Feb 2024 12:15:08 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "274" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"uniqueOfferId\":\"aumatics.azure_managedservices\",\"specificPlanIdsLimitation\":[\"azure_managedservices_professional\"],\"eTag\":\"\\\"c303ee7f-0000-0100-0000-65c0b1020000\\\"\",\"privateStoreId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"updateSuppressedDueIdempotence\":false}]}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreUserOffer.Tests.ps1 b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreUserOffer.Tests.ps1 new file mode 100644 index 000000000000..2e534e18a761 --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreUserOffer.Tests.ps1 @@ -0,0 +1,24 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzMarketplacePrivateStoreUserOffer')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzMarketplacePrivateStoreUserOffer.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzMarketplacePrivateStoreUserOffer' { + It 'QueryExpanded' { + $response = Get-AzMarketplacePrivateStoreUserOffer -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -OfferId aumatics.azure_managedservices -SubscriptionId 1f58b5dd-313c-42ed-84fc-f1e351bba7fb + $response | Should -Not -Be $null + $response.Count | Should -Be 1 + $response[0].uniqueOfferId | Should -Be "aumatics.azure_managedservices" + } +} diff --git a/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreUserRule.Recording.json b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreUserRule.Recording.json new file mode 100644 index 000000000000..ee5925aaf181 --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreUserRule.Recording.json @@ -0,0 +1,47 @@ +{ + "Get-AzMarketplacePrivateStoreUserRule+[NoContext]+QueryExpanded+$POST+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/queryUserRules?api-version=2023-01-01+1": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/queryUserRules?api-version=2023-01-01", + "Content": "{\r\n \"properties\": {\r\n \"subscriptionIds\": [ \"1f58b5dd-313c-42ed-84fc-f1e351bba7fb\" ]\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "95" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Accept-Ranges": [ "bytes" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=a3053b2a1619a6aa4b0e7e497e4fa01864cd730cd9c257837f8a0036d6c79b63;Path=/;HttpOnly;Secure;Domain=main.prod.marketplaceprivatestore.azure.com", "ARRAffinitySameSite=a3053b2a1619a6aa4b0e7e497e4fa01864cd730cd9c257837f8a0036d6c79b63;Path=/;HttpOnly;SameSite=None;Secure;Domain=main.prod.marketplaceprivatestore.azure.com" ], + "x-ms-ratelimit-remaining-tenant-writes": [ "1197" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-XSS-Protection": [ "1; mode=block" ], + "x-ms-version": [ "6.0.02586.90-5c77bed2" ], + "X-AspNet-Version": [ "4.0.30319" ], + "X-Powered-By": [ "ASP.NET" ], + "x-azure-ref": [ "20240206T121509Z-un93fkbvw50w5bbm67x1677wk800000009c0000000008me5" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "x-ms-request-id": [ "4da12fda-a76b-4ab1-bb01-4cfaad210264" ], + "x-ms-correlation-request-id": [ "4da12fda-a76b-4ab1-bb01-4cfaad210264" ], + "x-ms-routing-request-id": [ "ISRAELCENTRAL:20240206T121510Z:4da12fda-a76b-4ab1-bb01-4cfaad210264" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-MSEdge-Ref": [ "Ref A: D70CAE77926C46B4877610BB88233F35 Ref B: MRS211050313051 Ref C: 2024-02-06T12:15:09Z" ], + "Date": [ "Tue, 06 Feb 2024 12:15:09 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "93" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"type\":\"TermsAndCondition\",\"value\":null},{\"type\":\"PrivateProducts\",\"value\":null}]}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreUserRule.Tests.ps1 b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreUserRule.Tests.ps1 new file mode 100644 index 000000000000..52be26b7158a --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreUserRule.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzMarketplacePrivateStoreUserRule')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzMarketplacePrivateStoreUserRule.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzMarketplacePrivateStoreUserRule' { + It 'QueryExpanded' { + $response = Get-AzMarketplacePrivateStoreUserRule -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -SubscriptionId 1f58b5dd-313c-42ed-84fc-f1e351bba7fb + $response | Should -Not -Be $null + $response.Count | Should -BeGreaterThan 0 + } +} diff --git a/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreV1.Recording.json b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreV1.Recording.json index 1abbc348fb61..58f0f3ebca97 100644 --- a/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreV1.Recording.json +++ b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreV1.Recording.json @@ -1,17 +1,17 @@ { - "Get-AzMarketplacePrivateStoreV1+[NoContext]+List+$GET+https://management.azure.com/providers/Microsoft.Marketplace/privateStores?api-version=2021-06-01+1": { + "Get-AzMarketplacePrivateStoreV1+[NoContext]+List+$GET+https://management.azure.com/providers/Microsoft.Marketplace/privateStores?api-version=2023-01-01+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores?api-version=2021-06-01", + "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores?api-version=2023-01-01", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "6" ], - "x-ms-client-request-id": [ "8cd64083-31a5-46cb-a322-39fae7a5f562" ], + "x-ms-unique-id": [ "19" ], + "x-ms-client-request-id": [ "f3c9a7a4-0aea-419c-8c78-c237ac717c19" ], "CommandName": [ "Get-AzMarketplacePrivateStoreV1" ], "FullCommandName": [ "Get-AzMarketplacePrivateStoreV1_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.11", "Az.Marketplace/1.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,27 +22,30 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], + "Accept-Ranges": [ "bytes" ], "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=a3053b2a1619a6aa4b0e7e497e4fa01864cd730cd9c257837f8a0036d6c79b63;Path=/;HttpOnly;Secure;Domain=main.prod.marketplaceprivatestore.azure.com", "ARRAffinitySameSite=a3053b2a1619a6aa4b0e7e497e4fa01864cd730cd9c257837f8a0036d6c79b63;Path=/;HttpOnly;SameSite=None;Secure;Domain=main.prod.marketplaceprivatestore.azure.com" ], + "x-ms-ratelimit-remaining-tenant-reads": [ "11997" ], "X-Content-Type-Options": [ "nosniff" ], "X-XSS-Protection": [ "1; mode=block" ], - "x-ms-version": [ "6.0.01832.0004-467b09b3" ], - "Set-Cookie": [ "ARRAffinity=d3888da00a6c22fd6922d241b1e1f8b74760295bc9888c172907d962f5a68055;Path=/;HttpOnly;Secure;Domain=marketplacerp.azure.com", "ARRAffinitySameSite=d3888da00a6c22fd6922d241b1e1f8b74760295bc9888c172907d962f5a68055;Path=/;HttpOnly;SameSite=None;Secure;Domain=marketplacerp.azure.com" ], - "Server": [ "Microsoft-IIS/10.0" ], + "x-ms-version": [ "6.0.02586.90-5c77bed2" ], "X-AspNet-Version": [ "4.0.30319" ], "X-Powered-By": [ "ASP.NET" ], - "x-ms-ratelimit-remaining-tenant-reads": [ "11998" ], - "x-ms-request-id": [ "59edaa8a-c641-4134-b5dc-6c6fbae27e00" ], - "x-ms-correlation-request-id": [ "59edaa8a-c641-4134-b5dc-6c6fbae27e00" ], - "x-ms-routing-request-id": [ "UAECENTRAL:20220124T135838Z:59edaa8a-c641-4134-b5dc-6c6fbae27e00" ], + "x-azure-ref": [ "20240206T121510Z-e9fr18rg4936d7qwr39u9d2ats00000002x0000000007t0h" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "x-ms-request-id": [ "a09d8b05-7983-44de-8663-a9cb4558cf47" ], + "x-ms-correlation-request-id": [ "a09d8b05-7983-44de-8663-a9cb4558cf47" ], + "x-ms-routing-request-id": [ "ISRAELCENTRAL:20240206T121511Z:a09d8b05-7983-44de-8663-a9cb4558cf47" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Date": [ "Mon, 24 Jan 2022 13:58:37 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 80E8F05A10824BDDBA897B2EFD5C2FDD Ref B: MRS211050313051 Ref C: 2024-02-06T12:15:10Z" ], + "Date": [ "Tue, 06 Feb 2024 12:15:10 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "916" ], + "Content-Length": [ "1354" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"systemData\":{\"createdBy\":\"\",\"createdByType\":\"User\",\"createdAt\":null,\"lastModifiedBy\":\"\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2022-01-24T13:58:17.8941524Z\"},\"id\":\"/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"name\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"type\":\"Microsoft.Marketplace/privateStores\",\"properties\":{\"privateStoreId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"availability\":\"enabled\",\"eTag\":\"\\\"1e00e7b2-0000-0100-0000-61eeb07a0000\\\"\",\"privateStoreName\":\"Azure\",\"tenantId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"isGov\":false,\"collectionIds\":[\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"8c7a91db-cd41-43b6-af47-2e869654126d\"],\"branding\":{\"newExperience\":\"True\"},\"notificationsSettings\":{\"recipients\":[{\"principalId\":\"48d6cb80-6b16-4f18-9ce3-3a7288080a5b\"},{\"principalId\":\"aa209d7c-8b53-412f-b960-9f64a0f47718\"}],\"sendToAllMarketplaceAdmins\":false}}}]}", + "Content": "{\"value\":[{\"systemData\":{\"createdBy\":\"\",\"createdByType\":\"User\",\"createdAt\":null,\"lastModifiedBy\":\"\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-02-06T12:14:38.8098396Z\"},\"id\":\"/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"name\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"type\":\"Microsoft.Marketplace/privateStores\",\"properties\":{\"privateStoreId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"availability\":\"enabled\",\"eTag\":\"\\\"f303e052-0000-0100-0000-65c222af0000\\\"\",\"privateStoreName\":\"Azure\",\"tenantId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"isGov\":false,\"collectionIds\":[\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"d1bb102f-620f-460e-ba55-fdc3856c8fdd\",\"0740a3e6-d5b5-4e22-99be-26887e484fa1\",\"de165278-2dda-40aa-9ce4-15bf37311f49\",\"b411c744-55fd-43b4-b269-faf05d4edae2\",\"dbf8cede-24ff-42c0-b443-3f73df6996f7\",\"cf87e6eb-4ed1-44e5-b250-9eb5593b4c0e\",\"21ea54a6-df79-4dcb-babf-7860b8a82a9c\",\"ac13d584-7c4b-40a6-9d95-7dcf4b79db80\",\"73551ecc-d860-407f-9efa-049bab0468f5\",\"22dc7ebe-45b7-4aa6-8c96-a30091344cad\",\"5b98b8be-7b7f-46fe-8e97-a15ea77dda14\",\"65159e59-86c8-4442-b768-2595be217a0f\",\"d9b76d86-a3e7-4e9b-befb-3fe5a8d070a6\",\"0a4d89f3-8348-4961-9bec-a02780ab8144\",\"fdb889a1-cf3e-49f0-95b8-2bb012fa01f1\",\"fdb889a1-cf3e-49f0-95b8-2bb012fa0188\",\"8c7a91db-cd41-43b6-af47-2e869654126d\"],\"branding\":{\"newExperience\":\"True\"}}}]}", "isContentBase64": false } } diff --git a/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreV1.Tests.ps1 b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreV1.Tests.ps1 index c654cff1316a..950c35862d56 100644 --- a/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreV1.Tests.ps1 +++ b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplacePrivateStoreV1.Tests.ps1 @@ -17,6 +17,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'Get-AzMarketplacePrivateStore Describe 'Get-AzMarketplacePrivateStoreV1' { It 'List' { $res = Get-AzMarketplacePrivateStoreV1 - $res.Count | Should -Be 1 + $res.Count | Should -Be 1 + $res[0].privateStoreId | Should -Be "a260d38c-96cf-492d-a340-404d0c4b3ad6" } } diff --git a/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplaceQueryPrivateStoreOffer.Recording.json b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplaceQueryPrivateStoreOffer.Recording.json index f788a7be0296..351f3e308888 100644 --- a/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplaceQueryPrivateStoreOffer.Recording.json +++ b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplaceQueryPrivateStoreOffer.Recording.json @@ -1,17 +1,17 @@ { - "Get-AzMarketplaceQueryPrivateStoreOffer+[NoContext]+Query+$POST+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/queryOffers?api-version=2021-06-01+1": { + "Get-AzMarketplaceQueryPrivateStoreOffer+[NoContext]+Query+$POST+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/queryOffers?api-version=2023-01-01+1": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/queryOffers?api-version=2021-06-01", + "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/queryOffers?api-version=2023-01-01", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "7" ], - "x-ms-client-request-id": [ "954d16ab-d82a-416d-bfce-808c93ace10e" ], + "x-ms-unique-id": [ "20" ], + "x-ms-client-request-id": [ "a5a33f27-fe0f-4069-a684-7227c950aa5d" ], "CommandName": [ "Get-AzMarketplaceQueryPrivateStoreOffer" ], "FullCommandName": [ "Get-AzMarketplaceQueryPrivateStoreOffer_Query" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.11", "Az.Marketplace/1.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,27 +22,30 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], + "Accept-Ranges": [ "bytes" ], "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=80c7a5f90186ed67b1a22b2d6ba64306a36f909c848093374b79f8b04109a233;Path=/;HttpOnly;Secure;Domain=main.prod.marketplaceprivatestore.azure.com", "ARRAffinitySameSite=80c7a5f90186ed67b1a22b2d6ba64306a36f909c848093374b79f8b04109a233;Path=/;HttpOnly;SameSite=None;Secure;Domain=main.prod.marketplaceprivatestore.azure.com" ], + "x-ms-ratelimit-remaining-tenant-writes": [ "1197" ], "X-Content-Type-Options": [ "nosniff" ], "X-XSS-Protection": [ "1; mode=block" ], - "x-ms-version": [ "6.0.01832.0004-467b09b3" ], - "Set-Cookie": [ "ARRAffinity=f8b348ab603aeb654affd202b4559f2bcbc3b8205c82a60887bb0f9057a54b31;Path=/;HttpOnly;Secure;Domain=marketplacerp.azure.com", "ARRAffinitySameSite=f8b348ab603aeb654affd202b4559f2bcbc3b8205c82a60887bb0f9057a54b31;Path=/;HttpOnly;SameSite=None;Secure;Domain=marketplacerp.azure.com" ], - "Server": [ "Microsoft-IIS/10.0" ], + "x-ms-version": [ "6.0.02586.90-5c77bed2" ], "X-AspNet-Version": [ "4.0.30319" ], "X-Powered-By": [ "ASP.NET" ], - "x-ms-ratelimit-remaining-tenant-writes": [ "1196" ], - "x-ms-request-id": [ "ee05760f-6b9a-4e2b-ab0a-99ebdaec9213" ], - "x-ms-correlation-request-id": [ "ee05760f-6b9a-4e2b-ab0a-99ebdaec9213" ], - "x-ms-routing-request-id": [ "UAECENTRAL:20220124T135843Z:ee05760f-6b9a-4e2b-ab0a-99ebdaec9213" ], + "x-azure-ref": [ "20240206T121511Z-e9fr18rg4936d7qwr39u9d2ats000000030g000000007hys" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "x-ms-request-id": [ "9f54f4e8-1801-43d5-8d1c-0f9a5ec38c0f" ], + "x-ms-correlation-request-id": [ "9f54f4e8-1801-43d5-8d1c-0f9a5ec38c0f" ], + "x-ms-routing-request-id": [ "ISRAELCENTRAL:20240206T121512Z:9f54f4e8-1801-43d5-8d1c-0f9a5ec38c0f" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Date": [ "Mon, 24 Jan 2022 13:58:43 GMT" ] + "X-MSEdge-Ref": [ "Ref A: D18C102CDAA146FB822EC1D61F1B75E5 Ref B: MRS211050313051 Ref C: 2024-02-06T12:15:11Z" ], + "Date": [ "Tue, 06 Feb 2024 12:15:11 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1730" ], + "Content-Length": [ "713" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"uniqueOfferId\":\"viacode_consulting-1089577.viacodems\",\"specificPlanIdsLimitation\":[\"mgmt-assessment\",\"mgmt-limited-free\"],\"eTag\":\"\\\"6300c3e2-0000-0100-0000-61ded3bf0000\\\"\",\"privateStoreId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"updateSuppressedDueIdempotence\":false},{\"uniqueOfferId\":\"apps-4-rent.quickfx-administration\",\"specificPlanIdsLimitation\":[\"quick-fix-administration\"],\"eTag\":\"\\\"0700c8a0-0000-0100-0000-61e90c590000\\\"\",\"privateStoreId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"updateSuppressedDueIdempotence\":false},{\"uniqueOfferId\":\"ingrammicro.ingrammicromsp\",\"specificPlanIdsLimitation\":[\"ingrammicromsp\"],\"eTag\":\"\\\"6300b1fd-0000-0100-0000-61ded43c0000\\\"\",\"privateStoreId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"updateSuppressedDueIdempotence\":false},{\"uniqueOfferId\":\"checkpoint.vsec\",\"specificPlanIdsLimitation\":null,\"eTag\":\"\\\"6300b1a9-0000-0100-0000-61ded2b10000\\\"\",\"privateStoreId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"updateSuppressedDueIdempotence\":false},{\"uniqueOfferId\":\"barracudanetworks.waf\",\"specificPlanIdsLimitation\":[\"byol\",\"hourly\"],\"eTag\":\"\\\"6300e7a0-0000-0100-0000-61ded2880000\\\"\",\"privateStoreId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"updateSuppressedDueIdempotence\":false},{\"uniqueOfferId\":\"cloudeteer.cdt_cloud-ops\",\"specificPlanIdsLimitation\":[\"cloud_pro\",\"cloud_go\"],\"eTag\":\"\\\"0700c2a0-0000-0100-0000-61e90c580000\\\"\",\"privateStoreId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"updateSuppressedDueIdempotence\":false},{\"uniqueOfferId\":\"aumatics.azure_managedservices\",\"specificPlanIdsLimitation\":[\"azure_managedservices_professional\"],\"eTag\":\"\\\"080019ae-0000-0100-0000-61e92ccb0000\\\"\",\"privateStoreId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"updateSuppressedDueIdempotence\":false}]}", + "Content": "{\"value\":[{\"uniqueOfferId\":\"test_test_pmc2pc1.vm_4plans_privatestoretesting\",\"specificPlanIdsLimitation\":[\"plan3\"],\"eTag\":\"\\\"c503b892-0000-0100-0000-65c0cb150000\\\"\",\"privateStoreId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"updateSuppressedDueIdempotence\":false},{\"uniqueOfferId\":\"sendgrid.tsg-saas-offer\",\"specificPlanIdsLimitation\":null,\"eTag\":\"\\\"f3032232-0000-0100-0000-65c221910000\\\"\",\"privateStoreId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"updateSuppressedDueIdempotence\":false},{\"uniqueOfferId\":\"aumatics.azure_managedservices\",\"specificPlanIdsLimitation\":null,\"eTag\":\"\\\"c303ee7f-0000-0100-0000-65c0b1020000\\\"\",\"privateStoreId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"updateSuppressedDueIdempotence\":false}]}", "isContentBase64": false } } diff --git a/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplaceQueryPrivateStoreOffer.Tests.ps1 b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplaceQueryPrivateStoreOffer.Tests.ps1 index 5a32a2c77afd..5f86a78f9e44 100644 --- a/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplaceQueryPrivateStoreOffer.Tests.ps1 +++ b/src/Marketplace/Marketplace.Autorest/test/Get-AzMarketplaceQueryPrivateStoreOffer.Tests.ps1 @@ -16,8 +16,8 @@ if(($null -eq $TestName) -or ($TestName -contains 'Get-AzMarketplaceQueryPrivate Describe 'Get-AzMarketplaceQueryPrivateStoreOffer' { It 'Query' { - $res = Get-AzMarketplaceQueryPrivateStoreOffer -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 - $res.Count | Should -BeGreaterOrEqual 2 + $res = Get-AzMarketplaceQueryPrivateStoreOffer -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 + $res.Count | Should -BeGreaterOrEqual 0 } } diff --git a/src/Marketplace/Marketplace.Autorest/test/New-AzMarketplacePrivateStoreCollection.Recording.json b/src/Marketplace/Marketplace.Autorest/test/New-AzMarketplacePrivateStoreCollection.Recording.json index 9f5d9a6814ce..bb95547c7b93 100644 --- a/src/Marketplace/Marketplace.Autorest/test/New-AzMarketplacePrivateStoreCollection.Recording.json +++ b/src/Marketplace/Marketplace.Autorest/test/New-AzMarketplacePrivateStoreCollection.Recording.json @@ -1,15 +1,15 @@ { - "New-AzMarketplacePrivateStoreCollection+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa01f1?api-version=2021-06-01+1": { + "New-AzMarketplacePrivateStoreCollection+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa01f1?api-version=2023-01-01+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa01f1?api-version=2021-06-01", - "Content": "{\n \"properties\": {\n \"collectionName\": \"test187\",\n \"subscriptionsList\": [ \"1052ff5a-aa43-4ca1-bd18-010399494ce5\" ]\n }\n}", + "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa01f1?api-version=2023-01-01", + "Content": "{\r\n \"properties\": {\r\n \"collectionName\": \"pwshNewCollTest\",\r\n \"subscriptionsList\": [ \"1052ff5a-aa43-4ca1-bd18-010399494ce5\" ],\r\n \"enabled\": true\r\n }\r\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "126" ] + "Content-Length": [ "161" ] } }, "Response": { @@ -17,27 +17,30 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], + "Accept-Ranges": [ "bytes" ], "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=bfe2117850ddf2eb1a1bdbff379f22be7abd277495b3d0ff28b1c1254c65d847;Path=/;HttpOnly;Secure;Domain=main.prod.marketplaceprivatestore.azure.com", "ARRAffinitySameSite=bfe2117850ddf2eb1a1bdbff379f22be7abd277495b3d0ff28b1c1254c65d847;Path=/;HttpOnly;SameSite=None;Secure;Domain=main.prod.marketplaceprivatestore.azure.com" ], + "x-ms-ratelimit-remaining-tenant-writes": [ "1199" ], "X-Content-Type-Options": [ "nosniff" ], "X-XSS-Protection": [ "1; mode=block" ], - "x-ms-version": [ "6.0.01832.0004-467b09b3" ], - "Set-Cookie": [ "ARRAffinity=92773f2c1c67026ec4d9126bfcf778845d6357a27b8781ad374bcfa850a3111a;Path=/;HttpOnly;Secure;Domain=marketplacerp.azure.com", "ARRAffinitySameSite=92773f2c1c67026ec4d9126bfcf778845d6357a27b8781ad374bcfa850a3111a;Path=/;HttpOnly;SameSite=None;Secure;Domain=marketplacerp.azure.com" ], - "Server": [ "Microsoft-IIS/10.0" ], + "x-ms-version": [ "6.0.02586.90-5c77bed2" ], "X-AspNet-Version": [ "4.0.30319" ], "X-Powered-By": [ "ASP.NET" ], - "x-ms-ratelimit-remaining-tenant-writes": [ "1198" ], - "x-ms-request-id": [ "024d5ecf-b300-4788-8615-0ed460a84d52" ], - "x-ms-correlation-request-id": [ "024d5ecf-b300-4788-8615-0ed460a84d52" ], - "x-ms-routing-request-id": [ "UAECENTRAL:20220124T135850Z:024d5ecf-b300-4788-8615-0ed460a84d52" ], + "x-azure-ref": [ "20240206T121513Z-e9fr18rg4936d7qwr39u9d2ats000000030g000000007hzu" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "x-ms-request-id": [ "f6d1f15e-10ad-417a-bb67-4246106443c1" ], + "x-ms-correlation-request-id": [ "f6d1f15e-10ad-417a-bb67-4246106443c1" ], + "x-ms-routing-request-id": [ "ISRAELCENTRAL:20240206T121513Z:f6d1f15e-10ad-417a-bb67-4246106443c1" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Date": [ "Mon, 24 Jan 2022 13:58:49 GMT" ] + "X-MSEdge-Ref": [ "Ref A: D2CEC17030EA4604B1C88530AED4345E Ref B: MRS211050313051 Ref C: 2024-02-06T12:15:13Z" ], + "Date": [ "Tue, 06 Feb 2024 12:15:12 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "665" ], + "Content-Length": [ "672" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"systemData\":{\"createdBy\":\"\",\"createdByType\":\"User\",\"createdAt\":\"2022-01-24T13:58:49.8275436Z\",\"lastModifiedBy\":\"\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2022-01-24T13:58:49.8525390Z\"},\"id\":\"providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa01f1\",\"name\":\"fdb889a1-cf3e-49f0-95b8-2bb012fa01f1\",\"type\":\"Microsoft.Marketplace/privateStores/collections\",\"properties\":{\"collectionId\":\"fdb889a1-cf3e-49f0-95b8-2bb012fa01f1\",\"collectionName\":\"test187\",\"claim\":null,\"allSubscriptions\":false,\"subscriptionsList\":[\"1052ff5a-aa43-4ca1-bd18-010399494ce5\"],\"enabled\":false,\"numberOfOffers\":0}}", + "Content": "{\"systemData\":{\"createdBy\":\"\",\"createdByType\":\"User\",\"createdAt\":\"2024-02-05T10:00:08.3151793Z\",\"lastModifiedBy\":\"\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-02-06T12:15:13.4534122Z\"},\"id\":\"providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa01f1\",\"name\":\"fdb889a1-cf3e-49f0-95b8-2bb012fa01f1\",\"type\":\"Microsoft.Marketplace/privateStores/collections\",\"properties\":{\"collectionId\":\"fdb889a1-cf3e-49f0-95b8-2bb012fa01f1\",\"collectionName\":\"pwshNewCollTest\",\"claim\":null,\"allSubscriptions\":false,\"subscriptionsList\":[\"1052ff5a-aa43-4ca1-bd18-010399494ce5\"],\"enabled\":true,\"numberOfOffers\":0}}", "isContentBase64": false } } diff --git a/src/Marketplace/Marketplace.Autorest/test/New-AzMarketplacePrivateStoreCollection.Tests.ps1 b/src/Marketplace/Marketplace.Autorest/test/New-AzMarketplacePrivateStoreCollection.Tests.ps1 index da4aef0d467b..31af85fbcd44 100644 --- a/src/Marketplace/Marketplace.Autorest/test/New-AzMarketplacePrivateStoreCollection.Tests.ps1 +++ b/src/Marketplace/Marketplace.Autorest/test/New-AzMarketplacePrivateStoreCollection.Tests.ps1 @@ -16,7 +16,9 @@ if(($null -eq $TestName) -or ($TestName -contains 'New-AzMarketplacePrivateStore Describe 'New-AzMarketplacePrivateStoreCollection' { It 'CreateExpanded' { - $res = New-AzMarketplacePrivateStoreCollection -CollectionName test187 -CollectionId fdb889a1-cf3e-49f0-95b8-2bb012fa01f1 -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -SubscriptionsList 1052ff5a-aa43-4ca1-bd18-010399494ce5 - $res.CollectionId | Should -Be "fdb889a1-cf3e-49f0-95b8-2bb012fa01f1" + $res = New-AzMarketplacePrivateStoreCollection -CollectionName pwshNewCollTest -CollectionId fdb889a1-cf3e-49f0-95b8-2bb012fa01f1 -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -SubscriptionsList 1052ff5a-aa43-4ca1-bd18-010399494ce5 -Enabled + $res.CollectionId | Should -Be "fdb889a1-cf3e-49f0-95b8-2bb012fa01f1" + $res.CollectionName | Should -Be "pwshNewCollTest" + $res.enabled | Should -Be "true" } } diff --git a/src/Marketplace/Marketplace.Autorest/test/New-AzMarketplacePrivateStoreCollectionOffer.Recording.json b/src/Marketplace/Marketplace.Autorest/test/New-AzMarketplacePrivateStoreCollectionOffer.Recording.json index 2cb8ff20f1a5..1dd04258c079 100644 --- a/src/Marketplace/Marketplace.Autorest/test/New-AzMarketplacePrivateStoreCollectionOffer.Recording.json +++ b/src/Marketplace/Marketplace.Autorest/test/New-AzMarketplacePrivateStoreCollectionOffer.Recording.json @@ -1,15 +1,15 @@ { - "New-AzMarketplacePrivateStoreCollectionOffer+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa01f1/offers/aumatics.azure_managedservices?api-version=2021-06-01+1": { + "New-AzMarketplacePrivateStoreCollectionOffer+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/a260d38c-96cf-492d-a340-404d0c4b3ad6/offers/aumatics.azure_managedservices?api-version=2023-01-01+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa01f1/offers/aumatics.azure_managedservices?api-version=2021-06-01", - "Content": "{\n \"properties\": {\n \"plans\": [\n {\n \"accessibility\": \"azure_managedservices_professional\"\n }\n ]\n }\n}", + "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/a260d38c-96cf-492d-a340-404d0c4b3ad6/offers/aumatics.azure_managedservices?api-version=2023-01-01", + "Content": "{\r\n \"properties\": {\r\n \"plans\": [\r\n {\r\n \"accessibility\": \"azure_managedservices_professional\"\r\n }\r\n ]\r\n }\r\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "124" ] + "Content-Length": [ "132" ] } }, "Response": { @@ -17,27 +17,30 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], + "Accept-Ranges": [ "bytes" ], "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=a3053b2a1619a6aa4b0e7e497e4fa01864cd730cd9c257837f8a0036d6c79b63;Path=/;HttpOnly;Secure;Domain=main.prod.marketplaceprivatestore.azure.com", "ARRAffinitySameSite=a3053b2a1619a6aa4b0e7e497e4fa01864cd730cd9c257837f8a0036d6c79b63;Path=/;HttpOnly;SameSite=None;Secure;Domain=main.prod.marketplaceprivatestore.azure.com" ], + "x-ms-ratelimit-remaining-tenant-writes": [ "1198" ], "X-Content-Type-Options": [ "nosniff" ], "X-XSS-Protection": [ "1; mode=block" ], - "x-ms-version": [ "6.0.01832.0004-467b09b3" ], - "Set-Cookie": [ "ARRAffinity=b115d2f875c66b84b700975954f361f48f95995b3649b85a0990b9141d8b2e7d;Path=/;HttpOnly;Secure;Domain=marketplacerp.azure.com", "ARRAffinitySameSite=b115d2f875c66b84b700975954f361f48f95995b3649b85a0990b9141d8b2e7d;Path=/;HttpOnly;SameSite=None;Secure;Domain=marketplacerp.azure.com" ], - "Server": [ "Microsoft-IIS/10.0" ], + "x-ms-version": [ "6.0.02586.90-5c77bed2" ], "X-AspNet-Version": [ "4.0.30319" ], "X-Powered-By": [ "ASP.NET" ], - "x-ms-ratelimit-remaining-tenant-writes": [ "1197" ], - "x-ms-request-id": [ "693e8da5-2893-400c-bd15-6fe7f770b1e2" ], - "x-ms-correlation-request-id": [ "693e8da5-2893-400c-bd15-6fe7f770b1e2" ], - "x-ms-routing-request-id": [ "UAECENTRAL:20220124T135854Z:693e8da5-2893-400c-bd15-6fe7f770b1e2" ], + "x-azure-ref": [ "20240206T121514Z-e9fr18rg4936d7qwr39u9d2ats000000030g000000007k0b" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "x-ms-request-id": [ "e9712d61-db75-4a65-a6bd-16ce4a07d523" ], + "x-ms-correlation-request-id": [ "e9712d61-db75-4a65-a6bd-16ce4a07d523" ], + "x-ms-routing-request-id": [ "ISRAELCENTRAL:20240206T121514Z:e9712d61-db75-4a65-a6bd-16ce4a07d523" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Date": [ "Mon, 24 Jan 2022 13:58:53 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 8081009FD2104237B33CB15E77BAA15E Ref B: MRS211050313051 Ref C: 2024-02-06T12:15:14Z" ], + "Date": [ "Tue, 06 Feb 2024 12:15:13 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "524" ], + "Content-Length": [ "523" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa01f1/offers/aumatics.azure_managedservices\",\"name\":\"aumatics.azure_managedservices\",\"type\":\"Microsoft.Marketplace/privateStores/collection/offers\",\"properties\":{\"uniqueOfferId\":\"aumatics.azure_managedservices\",\"specificPlanIdsLimitation\":null,\"eTag\":\"\\\"1e0016b6-0000-0100-0000-61eeb09d0000\\\"\",\"privateStoreId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"updateSuppressedDueIdempotence\":false}}", + "Content": "{\"id\":\"/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/a260d38c-96cf-492d-a340-404d0c4b3ad6/offers/aumatics.azure_managedservices\",\"name\":\"aumatics.azure_managedservices\",\"type\":\"Microsoft.Marketplace/privateStores/collection/offers\",\"properties\":{\"uniqueOfferId\":\"aumatics.azure_managedservices\",\"specificPlanIdsLimitation\":null,\"eTag\":\"\\\"c303ee7f-0000-0100-0000-65c0b1020000\\\"\",\"privateStoreId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"updateSuppressedDueIdempotence\":true}}", "isContentBase64": false } } diff --git a/src/Marketplace/Marketplace.Autorest/test/New-AzMarketplacePrivateStoreCollectionOffer.Tests.ps1 b/src/Marketplace/Marketplace.Autorest/test/New-AzMarketplacePrivateStoreCollectionOffer.Tests.ps1 index ecc3ca172434..32183458d0d8 100644 --- a/src/Marketplace/Marketplace.Autorest/test/New-AzMarketplacePrivateStoreCollectionOffer.Tests.ps1 +++ b/src/Marketplace/Marketplace.Autorest/test/New-AzMarketplacePrivateStoreCollectionOffer.Tests.ps1 @@ -17,7 +17,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'New-AzMarketplacePrivateStore Describe 'New-AzMarketplacePrivateStoreCollectionOffer' { It 'CreateExpanded' { $acc = @{Accessibility = "azure_managedservices_professional"} - $res = New-AzMarketplacePrivateStoreCollectionOffer -CollectionId fdb889a1-cf3e-49f0-95b8-2bb012fa01f1 -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -OfferId aumatics.azure_managedservices -Plan $acc - $res.UniqueOfferId | Should -be "aumatics.azure_managedservices" + $res = New-AzMarketplacePrivateStoreCollectionOffer -CollectionId a260d38c-96cf-492d-a340-404d0c4b3ad6 -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -OfferId aumatics.azure_managedservices -Plan $acc + $res.UniqueOfferId | Should -be "aumatics.azure_managedservices" } } diff --git a/src/Marketplace/Marketplace.Autorest/test/New-AzMarketplacePrivateStoreCollectionOfferMultiContext.Recording.json b/src/Marketplace/Marketplace.Autorest/test/New-AzMarketplacePrivateStoreCollectionOfferMultiContext.Recording.json new file mode 100644 index 000000000000..5e44965215e3 --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/test/New-AzMarketplacePrivateStoreCollectionOfferMultiContext.Recording.json @@ -0,0 +1,92 @@ +{ + "New-AzMarketplacePrivateStoreCollectionOfferMultiContext+[NoContext]+OfferExpanded+$POST+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa01f1/offers/test_test_pmc2pc1.vm_4plans_privatestoretesting/upsertOfferWithMultiContext?api-version=2023-01-01+1": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa01f1/offers/test_test_pmc2pc1.vm_4plans_privatestoretesting/upsertOfferWithMultiContext?api-version=2023-01-01", + "Content": "{\r\n \"properties\": {\r\n \"plansContext\": [\r\n {\r\n \"context\": \"1f58b5dd-313c-42ed-84fc-f1e351bba7fb\",\r\n \"planIds\": [ \"plan1\" ]\r\n },\r\n {\r\n \"context\": \"ab3de7bc-7a6e-4e9f-a34a-f6922df453e4\",\r\n \"planIds\": [ \"plan2\" ]\r\n },\r\n {\r\n \"context\": \"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\r\n \"planIds\": [ \"plan3\" ]\r\n }\r\n ]\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "390" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Accept-Ranges": [ "bytes" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=bfe2117850ddf2eb1a1bdbff379f22be7abd277495b3d0ff28b1c1254c65d847;Path=/;HttpOnly;Secure;Domain=main.prod.marketplaceprivatestore.azure.com", "ARRAffinitySameSite=bfe2117850ddf2eb1a1bdbff379f22be7abd277495b3d0ff28b1c1254c65d847;Path=/;HttpOnly;SameSite=None;Secure;Domain=main.prod.marketplaceprivatestore.azure.com" ], + "x-ms-ratelimit-remaining-tenant-writes": [ "1191" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-XSS-Protection": [ "1; mode=block" ], + "x-ms-version": [ "6.0.02586.90-5c77bed2" ], + "X-AspNet-Version": [ "4.0.30319" ], + "X-Powered-By": [ "ASP.NET" ], + "x-azure-ref": [ "20240206T121515Z-e9fr18rg4936d7qwr39u9d2ats00000002x0000000007t2x" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "x-ms-request-id": [ "ee5316f5-c596-4eec-9dc2-3f3ae1a9940d" ], + "x-ms-correlation-request-id": [ "ee5316f5-c596-4eec-9dc2-3f3ae1a9940d" ], + "x-ms-routing-request-id": [ "ISRAELCENTRAL:20240206T121516Z:ee5316f5-c596-4eec-9dc2-3f3ae1a9940d" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-MSEdge-Ref": [ "Ref A: ED715971A92D4756932219CE66117F24 Ref B: MRS211050313051 Ref C: 2024-02-06T12:15:15Z" ], + "Date": [ "Tue, 06 Feb 2024 12:15:15 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "596" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa01f1/offers/test_test_pmc2pc1.vm_4plans_privatestoretesting\",\"name\":\"test_test_pmc2pc1.vm_4plans_privatestoretesting\",\"type\":\"Microsoft.Marketplace/privateStores/collection/offers\",\"properties\":{\"uniqueOfferId\":\"test_test_pmc2pc1.vm_4plans_privatestoretesting\",\"specificPlanIdsLimitation\":[\"plan3\",\"plan1\",\"plan2\"],\"eTag\":\"\\\"f303fd56-0000-0100-0000-65c222d40000\\\"\",\"privateStoreId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"updateSuppressedDueIdempotence\":false}}", + "isContentBase64": false + } + }, + "New-AzMarketplacePrivateStoreCollectionOfferMultiContext+[NoContext]+OfferExpanded+$POST+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa01f1/offers/sendgrid.tsg-saas-offer/upsertOfferWithMultiContext?api-version=2023-01-01+2": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa01f1/offers/sendgrid.tsg-saas-offer/upsertOfferWithMultiContext?api-version=2023-01-01", + "Content": "{\r\n \"properties\": {\r\n \"plansContext\": [\r\n {\r\n \"context\": \"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\r\n \"planIds\": [ \"pro-100k\", \"pro-300k\" ]\r\n }\r\n ]\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "183" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Accept-Ranges": [ "bytes" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=bfe2117850ddf2eb1a1bdbff379f22be7abd277495b3d0ff28b1c1254c65d847;Path=/;HttpOnly;Secure;Domain=main.prod.marketplaceprivatestore.azure.com", "ARRAffinitySameSite=bfe2117850ddf2eb1a1bdbff379f22be7abd277495b3d0ff28b1c1254c65d847;Path=/;HttpOnly;SameSite=None;Secure;Domain=main.prod.marketplaceprivatestore.azure.com" ], + "x-ms-ratelimit-remaining-tenant-writes": [ "1196" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-XSS-Protection": [ "1; mode=block" ], + "x-ms-version": [ "6.0.02586.90-5c77bed2" ], + "X-AspNet-Version": [ "4.0.30319" ], + "X-Powered-By": [ "ASP.NET" ], + "x-azure-ref": [ "20240206T121516Z-e9fr18rg4936d7qwr39u9d2ats000000030g000000007k24" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "x-ms-request-id": [ "a9e82b69-dc32-4dcd-be92-ffb7aa3c9761" ], + "x-ms-correlation-request-id": [ "a9e82b69-dc32-4dcd-be92-ffb7aa3c9761" ], + "x-ms-routing-request-id": [ "ISRAELCENTRAL:20240206T121516Z:a9e82b69-dc32-4dcd-be92-ffb7aa3c9761" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-MSEdge-Ref": [ "Ref A: D86591A8E96143B88EAE97BF9A16AA99 Ref B: MRS211050313051 Ref C: 2024-02-06T12:15:16Z" ], + "Date": [ "Tue, 06 Feb 2024 12:15:16 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "522" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa01f1/offers/sendgrid.tsg-saas-offer\",\"name\":\"sendgrid.tsg-saas-offer\",\"type\":\"Microsoft.Marketplace/privateStores/collection/offers\",\"properties\":{\"uniqueOfferId\":\"sendgrid.tsg-saas-offer\",\"specificPlanIdsLimitation\":[\"pro-100k\",\"pro-300k\"],\"eTag\":\"\\\"f3031757-0000-0100-0000-65c222d40000\\\"\",\"privateStoreId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"updateSuppressedDueIdempotence\":false}}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Marketplace/Marketplace.Autorest/test/New-AzMarketplacePrivateStoreCollectionOfferMultiContext.Tests.ps1 b/src/Marketplace/Marketplace.Autorest/test/New-AzMarketplacePrivateStoreCollectionOfferMultiContext.Tests.ps1 new file mode 100644 index 000000000000..3beaa46cc4ca --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/test/New-AzMarketplacePrivateStoreCollectionOfferMultiContext.Tests.ps1 @@ -0,0 +1,49 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzMarketplacePrivateStoreCollectionOfferMultiContext')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzMarketplacePrivateStoreCollectionOfferMultiContext.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +$private1 = @{ + context = "1f58b5dd-313c-42ed-84fc-f1e351bba7fb" + planId = "plan1" +} +$private2 = @{ + context = "ab3de7bc-7a6e-4e9f-a34a-f6922df453e4" + planId = "plan2" +} +$private3 = @{ + context = "a260d38c-96cf-492d-a340-404d0c4b3ad6" + planId = "plan3" +} +$private = @($private1, $private2, $private3) + +$public1 = @{ + context = "a260d38c-96cf-492d-a340-404d0c4b3ad6" + planId = "pro-100k","pro-300k" +} +$public = @($public1) + +Describe 'New-AzMarketplacePrivateStoreCollectionOfferMultiContext' { + It 'OfferExpanded' { + $res = New-AzMarketplacePrivateStoreCollectionOfferMultiContext -CollectionId fdb889a1-cf3e-49f0-95b8-2bb012fa01f1 -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -OfferId test_test_pmc2pc1.vm_4plans_privatestoretesting -PlansContext $private + $res | Should -Not -Be $null + $res.name | Should -Be 'test_test_pmc2pc1.vm_4plans_privatestoretesting' + $res.specificPlanIdsLimitation.Count | Should -Be 3 + + $res = New-AzMarketplacePrivateStoreCollectionOfferMultiContext -CollectionId fdb889a1-cf3e-49f0-95b8-2bb012fa01f1 -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -OfferId sendgrid.tsg-saas-offer -PlansContext $public + $res | Should -Not -Be $null + $res.name | Should -Be 'sendgrid.tsg-saas-offer' + $res.specificPlanIdsLimitation.Count | Should -Be 2 + } +} diff --git a/src/Marketplace/Marketplace.Autorest/test/README.md b/src/Marketplace/Marketplace.Autorest/test/README.md index 1969200c6a09..7c752b4c8c43 100644 --- a/src/Marketplace/Marketplace.Autorest/test/README.md +++ b/src/Marketplace/Marketplace.Autorest/test/README.md @@ -1,5 +1,5 @@ # Test -This directory contains the [Pester](https://www.powershellgallery.com/packages/Pester) tests to run for the module. We use Pester as it is the unofficial standard for PowerShell unit testing. Test stubs for custom cmdlets (created in `../custom`) will be generated into this folder when `build-module.ps1` is ran. These test stubs will fail automatically, to indicate that tests should be written for custom cmdlets. +This directory contains the [Pester](https://www.powershellgallery.com/packages/Pester) tests to run for the module. We use Pester as it is the unofficial standard for PowerShell unit testing. Test stubs for custom cmdlets (created in `..\custom`) will be generated into this folder when `build-module.ps1` is ran. These test stubs will fail automatically, to indicate that tests should be written for custom cmdlets. ## Info - Modifiable: yes diff --git a/src/Marketplace/Marketplace.Autorest/test/Remove-AzMarketplacePrivateStoreCollection.Recording.json b/src/Marketplace/Marketplace.Autorest/test/Remove-AzMarketplacePrivateStoreCollection.Recording.json index 8608ca7eae3e..fe6b741a1e6f 100644 --- a/src/Marketplace/Marketplace.Autorest/test/Remove-AzMarketplacePrivateStoreCollection.Recording.json +++ b/src/Marketplace/Marketplace.Autorest/test/Remove-AzMarketplacePrivateStoreCollection.Recording.json @@ -1,15 +1,15 @@ { - "Remove-AzMarketplacePrivateStoreCollection+[NoContext]+Delete+$PUT+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa01f2?api-version=2021-06-01+1": { + "Remove-AzMarketplacePrivateStoreCollection+[NoContext]+Delete+$PUT+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa01f2?api-version=2023-01-01+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa01f2?api-version=2021-06-01", - "Content": "{\n \"properties\": {\n \"collectionName\": \"collectionToDelete\",\n \"subscriptionsList\": [ \"1052ff5a-aa43-4ca1-bd18-010399494ce5\" ]\n }\n}", + "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa01f2?api-version=2023-01-01", + "Content": "{\r\n \"properties\": {\r\n \"collectionName\": \"collectionToDelete\",\r\n \"subscriptionsList\": [ \"1052ff5a-aa43-4ca1-bd18-010399494ce5\" ]\r\n }\r\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "137" ] + "Content-Length": [ "142" ] } }, "Response": { @@ -17,43 +17,46 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], + "Accept-Ranges": [ "bytes" ], "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=80c7a5f90186ed67b1a22b2d6ba64306a36f909c848093374b79f8b04109a233;Path=/;HttpOnly;Secure;Domain=main.prod.marketplaceprivatestore.azure.com", "ARRAffinitySameSite=80c7a5f90186ed67b1a22b2d6ba64306a36f909c848093374b79f8b04109a233;Path=/;HttpOnly;SameSite=None;Secure;Domain=main.prod.marketplaceprivatestore.azure.com" ], + "x-ms-ratelimit-remaining-tenant-writes": [ "1197" ], "X-Content-Type-Options": [ "nosniff" ], "X-XSS-Protection": [ "1; mode=block" ], - "x-ms-version": [ "6.0.01832.0004-467b09b3" ], - "Set-Cookie": [ "ARRAffinity=b166a90e62456752594f81d91d3a0138a0972c9ace2eaf27fb2e4f52b791ce2d;Path=/;HttpOnly;Secure;Domain=marketplacerp.azure.com", "ARRAffinitySameSite=b166a90e62456752594f81d91d3a0138a0972c9ace2eaf27fb2e4f52b791ce2d;Path=/;HttpOnly;SameSite=None;Secure;Domain=marketplacerp.azure.com" ], - "Server": [ "Microsoft-IIS/10.0" ], + "x-ms-version": [ "6.0.02586.90-5c77bed2" ], "X-AspNet-Version": [ "4.0.30319" ], "X-Powered-By": [ "ASP.NET" ], - "x-ms-ratelimit-remaining-tenant-writes": [ "1196" ], - "x-ms-request-id": [ "130e9d6d-04a5-472f-90e4-02a84d836560" ], - "x-ms-correlation-request-id": [ "130e9d6d-04a5-472f-90e4-02a84d836560" ], - "x-ms-routing-request-id": [ "UAECENTRAL:20220124T135901Z:130e9d6d-04a5-472f-90e4-02a84d836560" ], + "x-azure-ref": [ "20240206T121517Z-gwknnxeka10xrfzb2a991aarkg0000000as000000000aqb5" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "x-ms-request-id": [ "bff7f796-a797-415a-af53-c0db11cf2a9a" ], + "x-ms-correlation-request-id": [ "bff7f796-a797-415a-af53-c0db11cf2a9a" ], + "x-ms-routing-request-id": [ "ISRAELCENTRAL:20240206T121517Z:bff7f796-a797-415a-af53-c0db11cf2a9a" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Date": [ "Mon, 24 Jan 2022 13:59:00 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 8B033EC9989B435BBEAB662EF8F18EAD Ref B: MRS211050313051 Ref C: 2024-02-06T12:15:17Z" ], + "Date": [ "Tue, 06 Feb 2024 12:15:16 GMT" ] }, "ContentHeaders": { "Content-Length": [ "676" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"systemData\":{\"createdBy\":\"\",\"createdByType\":\"User\",\"createdAt\":\"2022-01-24T13:59:01.0244241Z\",\"lastModifiedBy\":\"\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2022-01-24T13:59:01.0444893Z\"},\"id\":\"providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa01f2\",\"name\":\"fdb889a1-cf3e-49f0-95b8-2bb012fa01f2\",\"type\":\"Microsoft.Marketplace/privateStores/collections\",\"properties\":{\"collectionId\":\"fdb889a1-cf3e-49f0-95b8-2bb012fa01f2\",\"collectionName\":\"collectionToDelete\",\"claim\":null,\"allSubscriptions\":false,\"subscriptionsList\":[\"1052ff5a-aa43-4ca1-bd18-010399494ce5\"],\"enabled\":false,\"numberOfOffers\":0}}", + "Content": "{\"systemData\":{\"createdBy\":\"\",\"createdByType\":\"User\",\"createdAt\":\"2024-02-06T12:15:17.4923256Z\",\"lastModifiedBy\":\"\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-02-06T12:15:17.5079514Z\"},\"id\":\"providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa01f2\",\"name\":\"fdb889a1-cf3e-49f0-95b8-2bb012fa01f2\",\"type\":\"Microsoft.Marketplace/privateStores/collections\",\"properties\":{\"collectionId\":\"fdb889a1-cf3e-49f0-95b8-2bb012fa01f2\",\"collectionName\":\"collectionToDelete\",\"claim\":null,\"allSubscriptions\":false,\"subscriptionsList\":[\"1052ff5a-aa43-4ca1-bd18-010399494ce5\"],\"enabled\":false,\"numberOfOffers\":0}}", "isContentBase64": false } }, - "Remove-AzMarketplacePrivateStoreCollection+[NoContext]+Delete+$DELETE+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa01f2?api-version=2021-06-01+2": { + "Remove-AzMarketplacePrivateStoreCollection+[NoContext]+Delete+$DELETE+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa01f2?api-version=2023-01-01+2": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa01f2?api-version=2021-06-01", + "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa01f2?api-version=2023-01-01", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "11" ], - "x-ms-client-request-id": [ "8e49d379-6fc9-4160-afe3-a8ecb8c951e5" ], + "x-ms-unique-id": [ "26" ], + "x-ms-client-request-id": [ "71ac195d-5da7-4ee0-94bc-b10ea154eca6" ], "CommandName": [ "Remove-AzMarketplacePrivateStoreCollection" ], "FullCommandName": [ "Remove-AzMarketplacePrivateStoreCollection_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.11", "Az.Marketplace/1.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -64,19 +67,22 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], + "Accept-Ranges": [ "bytes" ], + "Set-Cookie": [ "ARRAffinity=bfe2117850ddf2eb1a1bdbff379f22be7abd277495b3d0ff28b1c1254c65d847;Path=/;HttpOnly;Secure;Domain=main.prod.marketplaceprivatestore.azure.com", "ARRAffinitySameSite=bfe2117850ddf2eb1a1bdbff379f22be7abd277495b3d0ff28b1c1254c65d847;Path=/;HttpOnly;SameSite=None;Secure;Domain=main.prod.marketplaceprivatestore.azure.com" ], + "x-ms-ratelimit-remaining-tenant-deletes": [ "14999" ], "X-Content-Type-Options": [ "nosniff" ], "X-XSS-Protection": [ "1; mode=block" ], - "x-ms-version": [ "6.0.01832.0004-467b09b3" ], - "Set-Cookie": [ "ARRAffinity=d3888da00a6c22fd6922d241b1e1f8b74760295bc9888c172907d962f5a68055;Path=/;HttpOnly;Secure;Domain=marketplacerp.azure.com", "ARRAffinitySameSite=d3888da00a6c22fd6922d241b1e1f8b74760295bc9888c172907d962f5a68055;Path=/;HttpOnly;SameSite=None;Secure;Domain=marketplacerp.azure.com" ], - "Server": [ "Microsoft-IIS/10.0" ], + "x-ms-version": [ "6.0.02586.90-5c77bed2" ], "X-AspNet-Version": [ "4.0.30319" ], "X-Powered-By": [ "ASP.NET" ], - "x-ms-ratelimit-remaining-tenant-deletes": [ "14999" ], - "x-ms-request-id": [ "05f35b4d-0ee1-4e37-ba70-0cd43f56beab" ], - "x-ms-correlation-request-id": [ "05f35b4d-0ee1-4e37-ba70-0cd43f56beab" ], - "x-ms-routing-request-id": [ "UAECENTRAL:20220124T135902Z:05f35b4d-0ee1-4e37-ba70-0cd43f56beab" ], + "x-azure-ref": [ "20240206T121517Z-un93fkbvw50w5bbm67x1677wk800000009c0000000008mq4" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "x-ms-request-id": [ "24a85f44-1777-4b57-8140-a03ce80c9928" ], + "x-ms-correlation-request-id": [ "24a85f44-1777-4b57-8140-a03ce80c9928" ], + "x-ms-routing-request-id": [ "ISRAELCENTRAL:20240206T121518Z:24a85f44-1777-4b57-8140-a03ce80c9928" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Date": [ "Mon, 24 Jan 2022 13:59:01 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 4ED3086D087D49C4A90FDB54FA3EC82A Ref B: MRS211050313051 Ref C: 2024-02-06T12:15:17Z" ], + "Date": [ "Tue, 06 Feb 2024 12:15:17 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -86,19 +92,19 @@ "isContentBase64": false } }, - "Remove-AzMarketplacePrivateStoreCollection+[NoContext]+Delete+$GET+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa01f2?api-version=2021-06-01+3": { + "Remove-AzMarketplacePrivateStoreCollection+[NoContext]+Delete+$GET+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa01f2?api-version=2023-01-01+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa01f2?api-version=2021-06-01", + "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa01f2?api-version=2023-01-01", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "12" ], - "x-ms-client-request-id": [ "fb3d85a3-14d0-4ead-93b6-e4a04142fb4c" ], + "x-ms-unique-id": [ "27" ], + "x-ms-client-request-id": [ "11ea66c8-8c32-4b3a-a5ef-1f09b1166e39" ], "CommandName": [ "Get-AzMarketplacePrivateStoreCollection" ], "FullCommandName": [ "Get-AzMarketplacePrivateStoreCollection_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.11", "Az.Marketplace/1.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -109,19 +115,21 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], + "Set-Cookie": [ "ARRAffinity=a3053b2a1619a6aa4b0e7e497e4fa01864cd730cd9c257837f8a0036d6c79b63;Path=/;HttpOnly;Secure;Domain=main.prod.marketplaceprivatestore.azure.com", "ARRAffinitySameSite=a3053b2a1619a6aa4b0e7e497e4fa01864cd730cd9c257837f8a0036d6c79b63;Path=/;HttpOnly;SameSite=None;Secure;Domain=main.prod.marketplaceprivatestore.azure.com" ], + "x-ms-ratelimit-remaining-tenant-reads": [ "11997" ], "X-Content-Type-Options": [ "nosniff" ], "X-XSS-Protection": [ "1; mode=block" ], - "x-ms-version": [ "6.0.01832.0004-467b09b3" ], - "Set-Cookie": [ "ARRAffinity=f8b348ab603aeb654affd202b4559f2bcbc3b8205c82a60887bb0f9057a54b31;Path=/;HttpOnly;Secure;Domain=marketplacerp.azure.com", "ARRAffinitySameSite=f8b348ab603aeb654affd202b4559f2bcbc3b8205c82a60887bb0f9057a54b31;Path=/;HttpOnly;SameSite=None;Secure;Domain=marketplacerp.azure.com" ], - "Server": [ "Microsoft-IIS/10.0" ], + "x-ms-version": [ "6.0.02586.90-5c77bed2" ], "X-AspNet-Version": [ "4.0.30319" ], "X-Powered-By": [ "ASP.NET" ], - "x-ms-ratelimit-remaining-tenant-reads": [ "11997" ], - "x-ms-request-id": [ "ac4a58fa-9b7d-454c-bd95-c09687189804" ], - "x-ms-correlation-request-id": [ "ac4a58fa-9b7d-454c-bd95-c09687189804" ], - "x-ms-routing-request-id": [ "UAECENTRAL:20220124T135902Z:ac4a58fa-9b7d-454c-bd95-c09687189804" ], + "x-azure-ref": [ "20240206T121518Z-puek9bzdet0fz0hz46rmzq0b5c0000000bhg000000002ea0" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "x-ms-request-id": [ "89219618-87bf-4339-9977-d9a0905ff3a5" ], + "x-ms-correlation-request-id": [ "89219618-87bf-4339-9977-d9a0905ff3a5" ], + "x-ms-routing-request-id": [ "ISRAELCENTRAL:20240206T121518Z:89219618-87bf-4339-9977-d9a0905ff3a5" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Date": [ "Mon, 24 Jan 2022 13:59:01 GMT" ] + "X-MSEdge-Ref": [ "Ref A: D2466196CCF742FEBEA93BE7B70243EB Ref B: MRS211050313051 Ref C: 2024-02-06T12:15:18Z" ], + "Date": [ "Tue, 06 Feb 2024 12:15:17 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], diff --git a/src/Marketplace/Marketplace.Autorest/test/Remove-AzMarketplacePrivateStoreCollection.Tests.ps1 b/src/Marketplace/Marketplace.Autorest/test/Remove-AzMarketplacePrivateStoreCollection.Tests.ps1 index c290f1cef4a1..fd8866612a26 100644 --- a/src/Marketplace/Marketplace.Autorest/test/Remove-AzMarketplacePrivateStoreCollection.Tests.ps1 +++ b/src/Marketplace/Marketplace.Autorest/test/Remove-AzMarketplacePrivateStoreCollection.Tests.ps1 @@ -17,8 +17,8 @@ if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzMarketplacePrivateSt Describe 'Remove-AzMarketplacePrivateStoreCollection' { It 'Delete' { New-AzMarketplacePrivateStoreCollection -CollectionName collectionToDelete -CollectionId fdb889a1-cf3e-49f0-95b8-2bb012fa01f2 -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -SubscriptionsList 1052ff5a-aa43-4ca1-bd18-010399494ce5 - Remove-AzMarketplacePrivateStoreCollection -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -CollectionId fdb889a1-cf3e-49f0-95b8-2bb012fa01f2 - try{Get-AzMarketplacePrivateStoreCollection -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -CollectionId fdb889a1-cf3e-49f0-95b8-2bb012fa01f2} catch {$Error[0] | Should -Match "NotFound"} + Remove-AzMarketplacePrivateStoreCollection -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -CollectionId fdb889a1-cf3e-49f0-95b8-2bb012fa01f2 + try{Get-AzMarketplacePrivateStoreCollection -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -CollectionId fdb889a1-cf3e-49f0-95b8-2bb012fa01f2} catch {$Error[0] | Should -Match "NotFound"} } diff --git a/src/Marketplace/Marketplace.Autorest/test/Remove-AzMarketplacePrivateStoreCollectionOffer.Recording.json b/src/Marketplace/Marketplace.Autorest/test/Remove-AzMarketplacePrivateStoreCollectionOffer.Recording.json index b4228306debc..bb1e2b76871c 100644 --- a/src/Marketplace/Marketplace.Autorest/test/Remove-AzMarketplacePrivateStoreCollectionOffer.Recording.json +++ b/src/Marketplace/Marketplace.Autorest/test/Remove-AzMarketplacePrivateStoreCollectionOffer.Recording.json @@ -1,17 +1,17 @@ { - "Remove-AzMarketplacePrivateStoreCollectionOffer+[NoContext]+Delete+$DELETE+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa01f1/offers/aumatics.azure_managedservices?api-version=2021-06-01+1": { + "Remove-AzMarketplacePrivateStoreCollectionOffer+[NoContext]+Delete+$DELETE+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa01f1/offers/aumatics.azure_managedservices?api-version=2023-01-01+1": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa01f1/offers/aumatics.azure_managedservices?api-version=2021-06-01", + "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa01f1/offers/aumatics.azure_managedservices?api-version=2023-01-01", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "13" ], - "x-ms-client-request-id": [ "31d2d61f-6e47-4118-8621-c4e09af24f7a" ], + "x-ms-unique-id": [ "28" ], + "x-ms-client-request-id": [ "aeef3aad-66c0-4bbc-b61d-0683b9d197ec" ], "CommandName": [ "Remove-AzMarketplacePrivateStoreCollectionOffer" ], "FullCommandName": [ "Remove-AzMarketplacePrivateStoreCollectionOffer_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.11", "Az.Marketplace/1.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,19 +22,22 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], + "Accept-Ranges": [ "bytes" ], + "Set-Cookie": [ "ARRAffinity=a3053b2a1619a6aa4b0e7e497e4fa01864cd730cd9c257837f8a0036d6c79b63;Path=/;HttpOnly;Secure;Domain=main.prod.marketplaceprivatestore.azure.com", "ARRAffinitySameSite=a3053b2a1619a6aa4b0e7e497e4fa01864cd730cd9c257837f8a0036d6c79b63;Path=/;HttpOnly;SameSite=None;Secure;Domain=main.prod.marketplaceprivatestore.azure.com" ], + "x-ms-ratelimit-remaining-tenant-deletes": [ "14998" ], "X-Content-Type-Options": [ "nosniff" ], "X-XSS-Protection": [ "1; mode=block" ], - "x-ms-version": [ "6.0.01832.0004-467b09b3" ], - "Set-Cookie": [ "ARRAffinity=ac34b1a047b7a77113a516ef142ac6ff661eaaf7884099e34431a940426d41cc;Path=/;HttpOnly;Secure;Domain=marketplacerp.azure.com", "ARRAffinitySameSite=ac34b1a047b7a77113a516ef142ac6ff661eaaf7884099e34431a940426d41cc;Path=/;HttpOnly;SameSite=None;Secure;Domain=marketplacerp.azure.com" ], - "Server": [ "Microsoft-IIS/10.0" ], + "x-ms-version": [ "6.0.02586.90-5c77bed2" ], "X-AspNet-Version": [ "4.0.30319" ], "X-Powered-By": [ "ASP.NET" ], - "x-ms-ratelimit-remaining-tenant-deletes": [ "14998" ], - "x-ms-request-id": [ "81058a07-c121-4e25-882f-394b959a07f4" ], - "x-ms-correlation-request-id": [ "81058a07-c121-4e25-882f-394b959a07f4" ], - "x-ms-routing-request-id": [ "UAECENTRAL:20220124T135906Z:81058a07-c121-4e25-882f-394b959a07f4" ], + "x-azure-ref": [ "20240206T121518Z-e9fr18rg4936d7qwr39u9d2ats000000030g000000007k4m" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "x-ms-request-id": [ "e6b91b98-50a3-447e-8373-de634bb9a2ed" ], + "x-ms-correlation-request-id": [ "e6b91b98-50a3-447e-8373-de634bb9a2ed" ], + "x-ms-routing-request-id": [ "ISRAELCENTRAL:20240206T121519Z:e6b91b98-50a3-447e-8373-de634bb9a2ed" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Date": [ "Mon, 24 Jan 2022 13:59:05 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 67DC9E1325E14110929E6A3695AEA01A Ref B: MRS211050313051 Ref C: 2024-02-06T12:15:18Z" ], + "Date": [ "Tue, 06 Feb 2024 12:15:18 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -44,19 +47,19 @@ "isContentBase64": false } }, - "Remove-AzMarketplacePrivateStoreCollectionOffer+[NoContext]+Delete+$GET+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa01f1/offers/aumatics.azure_managedservices?api-version=2021-06-01+2": { + "Remove-AzMarketplacePrivateStoreCollectionOffer+[NoContext]+Delete+$GET+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa01f1/offers/aumatics.azure_managedservices?api-version=2023-01-01+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa01f1/offers/aumatics.azure_managedservices?api-version=2021-06-01", + "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa01f1/offers/aumatics.azure_managedservices?api-version=2023-01-01", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "14" ], - "x-ms-client-request-id": [ "de213ed4-ecb5-4f0e-95f1-ab093eed051a" ], + "x-ms-unique-id": [ "29" ], + "x-ms-client-request-id": [ "23ecf0bd-4d81-46c9-adb8-708cbb52c3b3" ], "CommandName": [ "Get-AzMarketplacePrivateStoreCollectionOffer" ], "FullCommandName": [ "Get-AzMarketplacePrivateStoreCollectionOffer_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.11", "Az.Marketplace/1.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -67,19 +70,21 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], + "Set-Cookie": [ "ARRAffinity=bfe2117850ddf2eb1a1bdbff379f22be7abd277495b3d0ff28b1c1254c65d847;Path=/;HttpOnly;Secure;Domain=main.prod.marketplaceprivatestore.azure.com", "ARRAffinitySameSite=bfe2117850ddf2eb1a1bdbff379f22be7abd277495b3d0ff28b1c1254c65d847;Path=/;HttpOnly;SameSite=None;Secure;Domain=main.prod.marketplaceprivatestore.azure.com" ], + "x-ms-ratelimit-remaining-tenant-reads": [ "11998" ], "X-Content-Type-Options": [ "nosniff" ], "X-XSS-Protection": [ "1; mode=block" ], - "x-ms-version": [ "6.0.01832.0004-467b09b3" ], - "Set-Cookie": [ "ARRAffinity=b04ffa86539d7689519d8eb5d5e7423177e93a8afca318b1f76e4c8444a7d2a2;Path=/;HttpOnly;Secure;Domain=marketplacerp.azure.com", "ARRAffinitySameSite=b04ffa86539d7689519d8eb5d5e7423177e93a8afca318b1f76e4c8444a7d2a2;Path=/;HttpOnly;SameSite=None;Secure;Domain=marketplacerp.azure.com" ], - "Server": [ "Microsoft-IIS/10.0" ], + "x-ms-version": [ "6.0.02586.90-5c77bed2" ], "X-AspNet-Version": [ "4.0.30319" ], "X-Powered-By": [ "ASP.NET" ], - "x-ms-ratelimit-remaining-tenant-reads": [ "11996" ], - "x-ms-request-id": [ "c77c861f-baf3-4139-aef2-748e816655a9" ], - "x-ms-correlation-request-id": [ "c77c861f-baf3-4139-aef2-748e816655a9" ], - "x-ms-routing-request-id": [ "UAECENTRAL:20220124T135906Z:c77c861f-baf3-4139-aef2-748e816655a9" ], + "x-azure-ref": [ "20240206T121519Z-e9fr18rg4936d7qwr39u9d2ats000000030g000000007k4z" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "x-ms-request-id": [ "9d4baabb-6155-4f8e-9ebf-1fcd15da380d" ], + "x-ms-correlation-request-id": [ "9d4baabb-6155-4f8e-9ebf-1fcd15da380d" ], + "x-ms-routing-request-id": [ "ISRAELCENTRAL:20240206T121519Z:9d4baabb-6155-4f8e-9ebf-1fcd15da380d" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Date": [ "Mon, 24 Jan 2022 13:59:05 GMT" ] + "X-MSEdge-Ref": [ "Ref A: C30BD4EC846D4F7C85B5A03C26CBDFA5 Ref B: MRS211050313051 Ref C: 2024-02-06T12:15:19Z" ], + "Date": [ "Tue, 06 Feb 2024 12:15:18 GMT" ] }, "ContentHeaders": { "Content-Length": [ "95" ], diff --git a/src/Marketplace/Marketplace.Autorest/test/Remove-AzMarketplacePrivateStoreCollectionOffer.Tests.ps1 b/src/Marketplace/Marketplace.Autorest/test/Remove-AzMarketplacePrivateStoreCollectionOffer.Tests.ps1 index 93889d482148..0c25770d24f4 100644 --- a/src/Marketplace/Marketplace.Autorest/test/Remove-AzMarketplacePrivateStoreCollectionOffer.Tests.ps1 +++ b/src/Marketplace/Marketplace.Autorest/test/Remove-AzMarketplacePrivateStoreCollectionOffer.Tests.ps1 @@ -16,11 +16,13 @@ if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzMarketplacePrivateSt Describe 'Remove-AzMarketplacePrivateStoreCollectionOffer' { It 'Delete' { - Remove-AzMarketplacePrivateStoreCollectionOffer -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -CollectionId fdb889a1-cf3e-49f0-95b8-2bb012fa01f1 -OfferId aumatics.azure_managedservices - - try{Get-AzMarketplacePrivateStoreCollectionOffer -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -CollectionId fdb889a1-cf3e-49f0-95b8-2bb012fa01f1 -OfferId aumatics.azure_managedservices} catch {$Error[0] | Should -Match "aumatics.azure_managedservices does not exist"} - - } - - + Remove-AzMarketplacePrivateStoreCollectionOffer -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -CollectionId fdb889a1-cf3e-49f0-95b8-2bb012fa01f1 -OfferId aumatics.azure_managedservices + try { + Get-AzMarketplacePrivateStoreCollectionOffer -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -CollectionId fdb889a1-cf3e-49f0-95b8-2bb012fa01f1 -OfferId aumatics.azure_managedservices + } + catch { + <#Do this if a terminating exception happens#> + $Error[0] | Should -Match "aumatics.azure_managedservices does not exist" + } + } } diff --git a/src/Marketplace/Marketplace.Autorest/test/Set-AzMarketplaceBulkPrivateStoreCollectionAction.Recording.json b/src/Marketplace/Marketplace.Autorest/test/Set-AzMarketplaceBulkPrivateStoreCollectionAction.Recording.json index 13397f65cac5..b7662f9424fd 100644 --- a/src/Marketplace/Marketplace.Autorest/test/Set-AzMarketplaceBulkPrivateStoreCollectionAction.Recording.json +++ b/src/Marketplace/Marketplace.Autorest/test/Set-AzMarketplaceBulkPrivateStoreCollectionAction.Recording.json @@ -1,15 +1,15 @@ { - "Set-AzMarketplaceBulkPrivateStoreCollectionAction+[NoContext]+BulkExpanded+$POST+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/bulkCollectionsAction?api-version=2021-06-01+1": { + "Set-AzMarketplaceBulkPrivateStoreCollectionAction+[NoContext]+BulkExpanded+$POST+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/bulkCollectionsAction?api-version=2023-01-01+1": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/bulkCollectionsAction?api-version=2021-06-01", - "Content": "{\n \"properties\": {\n \"collectionIds\": [ \"a260d38c-96cf-492d-a340-404d0c4b3ad6\", \"8c7a91db-cd41-43b6-af47-2e869654126d\" ],\n \"action\": \"EnableCollections\"\n }\n}", + "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/bulkCollectionsAction?api-version=2023-01-01", + "Content": "{\r\n \"properties\": {\r\n \"collectionIds\": [ \"a260d38c-96cf-492d-a340-404d0c4b3ad6\", \"8c7a91db-cd41-43b6-af47-2e869654126d\" ],\r\n \"action\": \"EnableCollections\"\r\n }\r\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "164" ] + "Content-Length": [ "169" ] } }, "Response": { @@ -17,27 +17,30 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], + "Accept-Ranges": [ "bytes" ], "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=80c7a5f90186ed67b1a22b2d6ba64306a36f909c848093374b79f8b04109a233;Path=/;HttpOnly;Secure;Domain=main.prod.marketplaceprivatestore.azure.com", "ARRAffinitySameSite=80c7a5f90186ed67b1a22b2d6ba64306a36f909c848093374b79f8b04109a233;Path=/;HttpOnly;SameSite=None;Secure;Domain=main.prod.marketplaceprivatestore.azure.com" ], + "x-ms-ratelimit-remaining-tenant-writes": [ "1190" ], "X-Content-Type-Options": [ "nosniff" ], "X-XSS-Protection": [ "1; mode=block" ], - "x-ms-version": [ "6.0.01832.0004-467b09b3" ], - "Set-Cookie": [ "ARRAffinity=92773f2c1c67026ec4d9126bfcf778845d6357a27b8781ad374bcfa850a3111a;Path=/;HttpOnly;Secure;Domain=marketplacerp.azure.com", "ARRAffinitySameSite=92773f2c1c67026ec4d9126bfcf778845d6357a27b8781ad374bcfa850a3111a;Path=/;HttpOnly;SameSite=None;Secure;Domain=marketplacerp.azure.com" ], - "Server": [ "Microsoft-IIS/10.0" ], + "x-ms-version": [ "6.0.02586.90-5c77bed2" ], "X-AspNet-Version": [ "4.0.30319" ], "X-Powered-By": [ "ASP.NET" ], - "x-ms-ratelimit-remaining-tenant-writes": [ "1195" ], - "x-ms-request-id": [ "acd4fba8-d488-4d99-b2de-bfa7e4d01d1b" ], - "x-ms-correlation-request-id": [ "acd4fba8-d488-4d99-b2de-bfa7e4d01d1b" ], - "x-ms-routing-request-id": [ "UAECENTRAL:20220124T135910Z:acd4fba8-d488-4d99-b2de-bfa7e4d01d1b" ], + "x-azure-ref": [ "20240206T121519Z-e9fr18rg4936d7qwr39u9d2ats00000002x0000000007t6t" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "x-ms-request-id": [ "3fca786f-ff88-4507-bfe5-63760f0688a3" ], + "x-ms-correlation-request-id": [ "3fca786f-ff88-4507-bfe5-63760f0688a3" ], + "x-ms-routing-request-id": [ "ISRAELCENTRAL:20240206T121520Z:3fca786f-ff88-4507-bfe5-63760f0688a3" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Date": [ "Mon, 24 Jan 2022 13:59:09 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 91FCEAA741594FF98579AB2770FFDB02 Ref B: MRS211050313051 Ref C: 2024-02-06T12:15:19Z" ], + "Date": [ "Tue, 06 Feb 2024 12:15:19 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "201" ], + "Content-Length": [ "208" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"succeeded\":[{\"collectionName\":\"DefaultCollection\",\"collectionId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\"},{\"collectionName\":\"test1\",\"collectionId\":\"8c7a91db-cd41-43b6-af47-2e869654126d\"}],\"failed\":[]}", + "Content": "{\"succeeded\":[{\"collectionName\":\"DefaultCollection\",\"collectionId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\"},{\"collectionName\":\"CopyPWRTest1\",\"collectionId\":\"8c7a91db-cd41-43b6-af47-2e869654126d\"}],\"failed\":[]}", "isContentBase64": false } } diff --git a/src/Marketplace/Marketplace.Autorest/test/Set-AzMarketplaceBulkPrivateStoreCollectionAction.Tests.ps1 b/src/Marketplace/Marketplace.Autorest/test/Set-AzMarketplaceBulkPrivateStoreCollectionAction.Tests.ps1 index f637fbc627c9..c96e6c407e0c 100644 --- a/src/Marketplace/Marketplace.Autorest/test/Set-AzMarketplaceBulkPrivateStoreCollectionAction.Tests.ps1 +++ b/src/Marketplace/Marketplace.Autorest/test/Set-AzMarketplaceBulkPrivateStoreCollectionAction.Tests.ps1 @@ -16,8 +16,8 @@ if(($null -eq $TestName) -or ($TestName -contains 'Set-AzMarketplaceBulkPrivateS Describe 'Set-AzMarketplaceBulkPrivateStoreCollectionAction' { It 'BulkExpanded' { - $res = Set-AzMarketplaceBulkPrivateStoreCollectionAction -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -Payload @{Action = "EnableCollections"; CollectionId = "a260d38c-96cf-492d-a340-404d0c4b3ad6", "8c7a91db-cd41-43b6-af47-2e869654126d" } - $res.Succeeded.Count | Should -Be 2 + $res = Set-AzMarketplaceBulkPrivateStoreCollectionAction -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -Payload @{Action = "EnableCollections"; CollectionId = "a260d38c-96cf-492d-a340-404d0c4b3ad6", "8c7a91db-cd41-43b6-af47-2e869654126d" } + $res.Succeeded.Count | Should -Be 2 } } diff --git a/src/Marketplace/Marketplace.Autorest/test/Set-AzMarketplacePrivateStore.Recording.json b/src/Marketplace/Marketplace.Autorest/test/Set-AzMarketplacePrivateStore.Recording.json index 44f6dda058a5..d1da14b6b595 100644 --- a/src/Marketplace/Marketplace.Autorest/test/Set-AzMarketplacePrivateStore.Recording.json +++ b/src/Marketplace/Marketplace.Autorest/test/Set-AzMarketplacePrivateStore.Recording.json @@ -1,17 +1,17 @@ { - "Set-AzMarketplacePrivateStore+[NoContext]+UpdateExpanded+$GET+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6?api-version=2021-06-01+1": { + "Set-AzMarketplacePrivateStore+[NoContext]+UpdateExpanded+$GET+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6?api-version=2023-01-01+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6?api-version=2021-06-01", + "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6?api-version=2023-01-01", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "16" ], - "x-ms-client-request-id": [ "5d0286a7-3e8d-435e-b41d-dbcaddf79427" ], + "x-ms-unique-id": [ "31" ], + "x-ms-client-request-id": [ "3fff2958-4df6-4323-ae3d-129fb7e0d9f4" ], "CommandName": [ "Get-AzMarketplacePrivateStoreV1" ], "FullCommandName": [ "Get-AzMarketplacePrivateStoreV1_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.11", "Az.Marketplace/1.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,41 +22,44 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], + "Accept-Ranges": [ "bytes" ], "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=71c5ecfca949e38fa6d8b6899df69a8bc1065f71ea6211c776e43d3b7b216b7d;Path=/;HttpOnly;Secure;Domain=main.prod.marketplaceprivatestore.azure.com", "ARRAffinitySameSite=71c5ecfca949e38fa6d8b6899df69a8bc1065f71ea6211c776e43d3b7b216b7d;Path=/;HttpOnly;SameSite=None;Secure;Domain=main.prod.marketplaceprivatestore.azure.com" ], + "x-ms-ratelimit-remaining-tenant-reads": [ "11997" ], "X-Content-Type-Options": [ "nosniff" ], "X-XSS-Protection": [ "1; mode=block" ], - "x-ms-version": [ "6.0.01832.0004-467b09b3" ], - "Set-Cookie": [ "ARRAffinity=a1932161769a8d1e756ea2a33c09d2511fa99932f8d921493de9f93092d8c165;Path=/;HttpOnly;Secure;Domain=marketplacerp.azure.com", "ARRAffinitySameSite=a1932161769a8d1e756ea2a33c09d2511fa99932f8d921493de9f93092d8c165;Path=/;HttpOnly;SameSite=None;Secure;Domain=marketplacerp.azure.com" ], - "Server": [ "Microsoft-IIS/10.0" ], + "x-ms-version": [ "6.0.02586.90-5c77bed2" ], "X-AspNet-Version": [ "4.0.30319" ], "X-Powered-By": [ "ASP.NET" ], - "x-ms-ratelimit-remaining-tenant-reads": [ "11995" ], - "x-ms-request-id": [ "60b18096-09d1-41ea-9fd9-b68f9c1bb81b" ], - "x-ms-correlation-request-id": [ "60b18096-09d1-41ea-9fd9-b68f9c1bb81b" ], - "x-ms-routing-request-id": [ "UAECENTRAL:20220124T135915Z:60b18096-09d1-41ea-9fd9-b68f9c1bb81b" ], + "x-azure-ref": [ "20240206T121520Z-gwknnxeka10xrfzb2a991aarkg0000000as000000000aqh1" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "x-ms-request-id": [ "53d6f38d-5fc7-4a3f-bba9-58285c8301a8" ], + "x-ms-correlation-request-id": [ "53d6f38d-5fc7-4a3f-bba9-58285c8301a8" ], + "x-ms-routing-request-id": [ "ISRAELCENTRAL:20240206T121520Z:53d6f38d-5fc7-4a3f-bba9-58285c8301a8" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Date": [ "Mon, 24 Jan 2022 13:59:15 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 6EAEFA80747A4DE68C6F415196989933 Ref B: MRS211050313051 Ref C: 2024-02-06T12:15:20Z" ], + "Date": [ "Tue, 06 Feb 2024 12:15:19 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1072" ], + "Content-Length": [ "1342" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"systemData\":{\"createdBy\":\"\",\"createdByType\":\"User\",\"createdAt\":null,\"lastModifiedBy\":\"\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2022-01-24T13:59:10.6296811Z\"},\"id\":\"/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"name\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"type\":\"Microsoft.Marketplace/privateStores\",\"properties\":{\"privateStoreId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"availability\":\"enabled\",\"eTag\":\"\\\"1e006ab7-0000-0100-0000-61eeb0ae0000\\\"\",\"privateStoreName\":\"Azure\",\"tenantId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"isGov\":false,\"collectionIds\":[\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"8c7a91db-cd41-43b6-af47-2e869654126d\",\"fdb889a1-cf3e-49f0-95b8-2bb012fa01f1\"],\"branding\":{\"newExperience\":\"True\"},\"notificationsSettings\":{\"recipients\":[{\"principalId\":\"48d6cb80-6b16-4f18-9ce3-3a7288080a5b\",\"emailAddress\":\"DemoGroup@ContosoBayArea.onmicrosoft.com\",\"displayName\":\"Demo Group\"},{\"principalId\":\"aa209d7c-8b53-412f-b960-9f64a0f47718\",\"emailAddress\":\"\",\"displayName\":\"TestGroup\"}],\"sendToAllMarketplaceAdmins\":false}}}", + "Content": "{\"systemData\":{\"createdBy\":\"\",\"createdByType\":\"User\",\"createdAt\":null,\"lastModifiedBy\":\"\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-02-06T12:15:19.9276695Z\"},\"id\":\"/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"name\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"type\":\"Microsoft.Marketplace/privateStores\",\"properties\":{\"privateStoreId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"availability\":\"enabled\",\"eTag\":\"\\\"f3038157-0000-0100-0000-65c222d70000\\\"\",\"privateStoreName\":\"Azure\",\"tenantId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"isGov\":false,\"collectionIds\":[\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"d1bb102f-620f-460e-ba55-fdc3856c8fdd\",\"0740a3e6-d5b5-4e22-99be-26887e484fa1\",\"de165278-2dda-40aa-9ce4-15bf37311f49\",\"b411c744-55fd-43b4-b269-faf05d4edae2\",\"dbf8cede-24ff-42c0-b443-3f73df6996f7\",\"cf87e6eb-4ed1-44e5-b250-9eb5593b4c0e\",\"21ea54a6-df79-4dcb-babf-7860b8a82a9c\",\"ac13d584-7c4b-40a6-9d95-7dcf4b79db80\",\"73551ecc-d860-407f-9efa-049bab0468f5\",\"22dc7ebe-45b7-4aa6-8c96-a30091344cad\",\"5b98b8be-7b7f-46fe-8e97-a15ea77dda14\",\"65159e59-86c8-4442-b768-2595be217a0f\",\"d9b76d86-a3e7-4e9b-befb-3fe5a8d070a6\",\"0a4d89f3-8348-4961-9bec-a02780ab8144\",\"fdb889a1-cf3e-49f0-95b8-2bb012fa01f1\",\"fdb889a1-cf3e-49f0-95b8-2bb012fa0188\",\"8c7a91db-cd41-43b6-af47-2e869654126d\"],\"branding\":{\"newExperience\":\"True\"}}}", "isContentBase64": false } }, - "Set-AzMarketplacePrivateStore+[NoContext]+UpdateExpanded+$PUT+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6?api-version=2021-06-01+2": { + "Set-AzMarketplacePrivateStore+[NoContext]+UpdateExpanded+$PUT+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6?api-version=2023-01-01+2": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6?api-version=2021-06-01", - "Content": "{\n \"properties\": {\n \"availability\": \"enabled\",\n \"eTag\": \"\\\"1e006ab7-0000-0100-0000-61eeb0ae0000\\\"\"\n }\n}", + "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6?api-version=2023-01-01", + "Content": "{\r\n \"properties\": {\r\n \"availability\": \"enabled\",\r\n \"eTag\": \"\\\"f3038157-0000-0100-0000-65c222d70000\\\"\"\r\n }\r\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "111" ] + "Content-Length": [ "116" ] } }, "Response": { @@ -64,27 +67,80 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], + "Accept-Ranges": [ "bytes" ], "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=a3053b2a1619a6aa4b0e7e497e4fa01864cd730cd9c257837f8a0036d6c79b63;Path=/;HttpOnly;Secure;Domain=main.prod.marketplaceprivatestore.azure.com", "ARRAffinitySameSite=a3053b2a1619a6aa4b0e7e497e4fa01864cd730cd9c257837f8a0036d6c79b63;Path=/;HttpOnly;SameSite=None;Secure;Domain=main.prod.marketplaceprivatestore.azure.com" ], + "x-ms-ratelimit-remaining-tenant-writes": [ "1197" ], "X-Content-Type-Options": [ "nosniff" ], "X-XSS-Protection": [ "1; mode=block" ], - "x-ms-version": [ "6.0.01832.0004-467b09b3" ], - "Set-Cookie": [ "ARRAffinity=6c5458dd548284d7396cd2cba264e633b6118968d745d1e82e3c3f7fc14794d7;Path=/;HttpOnly;Secure;Domain=marketplacerp.azure.com", "ARRAffinitySameSite=6c5458dd548284d7396cd2cba264e633b6118968d745d1e82e3c3f7fc14794d7;Path=/;HttpOnly;SameSite=None;Secure;Domain=marketplacerp.azure.com" ], - "Server": [ "Microsoft-IIS/10.0" ], + "x-ms-version": [ "6.0.02586.90-5c77bed2" ], "X-AspNet-Version": [ "4.0.30319" ], "X-Powered-By": [ "ASP.NET" ], - "x-ms-ratelimit-remaining-tenant-writes": [ "1195" ], - "x-ms-request-id": [ "965d98b4-e61b-4d15-9400-60781729c9a7" ], - "x-ms-correlation-request-id": [ "965d98b4-e61b-4d15-9400-60781729c9a7" ], - "x-ms-routing-request-id": [ "UAECENTRAL:20220124T135916Z:965d98b4-e61b-4d15-9400-60781729c9a7" ], + "x-azure-ref": [ "20240206T121520Z-e9fr18rg4936d7qwr39u9d2ats000000030g000000007k5u" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "x-ms-request-id": [ "b5385742-ecc0-4324-be9f-41f5b6f5cee6" ], + "x-ms-correlation-request-id": [ "b5385742-ecc0-4324-be9f-41f5b6f5cee6" ], + "x-ms-routing-request-id": [ "ISRAELCENTRAL:20240206T121521Z:b5385742-ecc0-4324-be9f-41f5b6f5cee6" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Date": [ "Mon, 24 Jan 2022 13:59:16 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 83661893D4614F96BCFE0A7FD239BC53 Ref B: MRS211050313051 Ref C: 2024-02-06T12:15:20Z" ], + "Date": [ "Tue, 06 Feb 2024 12:15:20 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "757" ], + "Content-Length": [ "1342" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"systemData\":{\"createdBy\":\"\",\"createdByType\":\"User\",\"createdAt\":null,\"lastModifiedBy\":\"\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2022-01-24T13:59:16.5690315Z\"},\"id\":\"/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"name\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"type\":\"Microsoft.Marketplace/privateStores\",\"properties\":{\"privateStoreId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"availability\":\"enabled\",\"eTag\":\"\\\"1e00e4b7-0000-0100-0000-61eeb0b40000\\\"\",\"privateStoreName\":\"Azure\",\"tenantId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"isGov\":false,\"collectionIds\":[\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"8c7a91db-cd41-43b6-af47-2e869654126d\",\"fdb889a1-cf3e-49f0-95b8-2bb012fa01f1\"],\"branding\":{\"newExperience\":\"True\"}}}", + "Content": "{\"systemData\":{\"createdBy\":\"\",\"createdByType\":\"User\",\"createdAt\":null,\"lastModifiedBy\":\"\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-02-06T12:15:21.2381732Z\"},\"id\":\"/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"name\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"type\":\"Microsoft.Marketplace/privateStores\",\"properties\":{\"privateStoreId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"availability\":\"enabled\",\"eTag\":\"\\\"f303ab57-0000-0100-0000-65c222d90000\\\"\",\"privateStoreName\":\"Azure\",\"tenantId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"isGov\":false,\"collectionIds\":[\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"d1bb102f-620f-460e-ba55-fdc3856c8fdd\",\"0740a3e6-d5b5-4e22-99be-26887e484fa1\",\"de165278-2dda-40aa-9ce4-15bf37311f49\",\"b411c744-55fd-43b4-b269-faf05d4edae2\",\"dbf8cede-24ff-42c0-b443-3f73df6996f7\",\"cf87e6eb-4ed1-44e5-b250-9eb5593b4c0e\",\"21ea54a6-df79-4dcb-babf-7860b8a82a9c\",\"ac13d584-7c4b-40a6-9d95-7dcf4b79db80\",\"73551ecc-d860-407f-9efa-049bab0468f5\",\"22dc7ebe-45b7-4aa6-8c96-a30091344cad\",\"5b98b8be-7b7f-46fe-8e97-a15ea77dda14\",\"65159e59-86c8-4442-b768-2595be217a0f\",\"d9b76d86-a3e7-4e9b-befb-3fe5a8d070a6\",\"0a4d89f3-8348-4961-9bec-a02780ab8144\",\"fdb889a1-cf3e-49f0-95b8-2bb012fa01f1\",\"fdb889a1-cf3e-49f0-95b8-2bb012fa0188\",\"8c7a91db-cd41-43b6-af47-2e869654126d\"],\"branding\":{\"newExperience\":\"True\"}}}", + "isContentBase64": false + } + }, + "Set-AzMarketplacePrivateStore+[NoContext]+UpdateExpanded+$GET+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6?api-version=2023-01-01+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6?api-version=2023-01-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "33" ], + "x-ms-client-request-id": [ "dc763bad-0d3d-41fc-afc4-a879285522bb" ], + "CommandName": [ "Get-AzMarketplacePrivateStoreV1" ], + "FullCommandName": [ "Get-AzMarketplacePrivateStoreV1_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.11", "Az.Marketplace/1.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Accept-Ranges": [ "bytes" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=a3053b2a1619a6aa4b0e7e497e4fa01864cd730cd9c257837f8a0036d6c79b63;Path=/;HttpOnly;Secure;Domain=main.prod.marketplaceprivatestore.azure.com", "ARRAffinitySameSite=a3053b2a1619a6aa4b0e7e497e4fa01864cd730cd9c257837f8a0036d6c79b63;Path=/;HttpOnly;SameSite=None;Secure;Domain=main.prod.marketplaceprivatestore.azure.com" ], + "x-ms-ratelimit-remaining-tenant-reads": [ "11996" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-XSS-Protection": [ "1; mode=block" ], + "x-ms-version": [ "6.0.02586.90-5c77bed2" ], + "X-AspNet-Version": [ "4.0.30319" ], + "X-Powered-By": [ "ASP.NET" ], + "x-azure-ref": [ "20240206T121521Z-8f6r3xskwh4btc8yq2qh5g5fz40000000950000000007b2m" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "x-ms-request-id": [ "58019428-da54-45eb-8695-6ddab76c40e8" ], + "x-ms-correlation-request-id": [ "58019428-da54-45eb-8695-6ddab76c40e8" ], + "x-ms-routing-request-id": [ "ISRAELCENTRAL:20240206T121521Z:58019428-da54-45eb-8695-6ddab76c40e8" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-MSEdge-Ref": [ "Ref A: 76CFA44D69B84DB7BDE85EF492159B29 Ref B: MRS211050313051 Ref C: 2024-02-06T12:15:21Z" ], + "Date": [ "Tue, 06 Feb 2024 12:15:20 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1342" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"systemData\":{\"createdBy\":\"\",\"createdByType\":\"User\",\"createdAt\":null,\"lastModifiedBy\":\"\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-02-06T12:15:21.2381732Z\"},\"id\":\"/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"name\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"type\":\"Microsoft.Marketplace/privateStores\",\"properties\":{\"privateStoreId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"availability\":\"enabled\",\"eTag\":\"\\\"f303ab57-0000-0100-0000-65c222d90000\\\"\",\"privateStoreName\":\"Azure\",\"tenantId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"isGov\":false,\"collectionIds\":[\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"d1bb102f-620f-460e-ba55-fdc3856c8fdd\",\"0740a3e6-d5b5-4e22-99be-26887e484fa1\",\"de165278-2dda-40aa-9ce4-15bf37311f49\",\"b411c744-55fd-43b4-b269-faf05d4edae2\",\"dbf8cede-24ff-42c0-b443-3f73df6996f7\",\"cf87e6eb-4ed1-44e5-b250-9eb5593b4c0e\",\"21ea54a6-df79-4dcb-babf-7860b8a82a9c\",\"ac13d584-7c4b-40a6-9d95-7dcf4b79db80\",\"73551ecc-d860-407f-9efa-049bab0468f5\",\"22dc7ebe-45b7-4aa6-8c96-a30091344cad\",\"5b98b8be-7b7f-46fe-8e97-a15ea77dda14\",\"65159e59-86c8-4442-b768-2595be217a0f\",\"d9b76d86-a3e7-4e9b-befb-3fe5a8d070a6\",\"0a4d89f3-8348-4961-9bec-a02780ab8144\",\"fdb889a1-cf3e-49f0-95b8-2bb012fa01f1\",\"fdb889a1-cf3e-49f0-95b8-2bb012fa0188\",\"8c7a91db-cd41-43b6-af47-2e869654126d\"],\"branding\":{\"newExperience\":\"True\"}}}", "isContentBase64": false } } diff --git a/src/Marketplace/Marketplace.Autorest/test/Set-AzMarketplacePrivateStore.Tests.ps1 b/src/Marketplace/Marketplace.Autorest/test/Set-AzMarketplacePrivateStore.Tests.ps1 index 710a0007d434..110e6e93c235 100644 --- a/src/Marketplace/Marketplace.Autorest/test/Set-AzMarketplacePrivateStore.Tests.ps1 +++ b/src/Marketplace/Marketplace.Autorest/test/Set-AzMarketplacePrivateStore.Tests.ps1 @@ -17,7 +17,8 @@ if(($null -eq $TestName) -or ($TestName -contains 'Set-AzMarketplacePrivateStore Describe 'Set-AzMarketplacePrivateStore' { It 'UpdateExpanded' { $res = Get-AzMarketplacePrivateStoreV1 -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 - Set-AzMarketplacePrivateStore -Id a260d38c-96cf-492d-a340-404d0c4b3ad6 -Availability 'enabled' -ETag $res.ETag - $res.Availability | Should -Be "enabled" + Set-AzMarketplacePrivateStore -Id a260d38c-96cf-492d-a340-404d0c4b3ad6 -Availability 'enabled' -ETag $res.ETag + $res = Get-AzMarketplacePrivateStoreV1 -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 + $res.Availability | Should -Be "enabled" } } diff --git a/src/Marketplace/Marketplace.Autorest/test/Set-AzMarketplacePrivateStoreCollection.Recording.json b/src/Marketplace/Marketplace.Autorest/test/Set-AzMarketplacePrivateStoreCollection.Recording.json index 0a2e39b45086..428b1a036930 100644 --- a/src/Marketplace/Marketplace.Autorest/test/Set-AzMarketplacePrivateStoreCollection.Recording.json +++ b/src/Marketplace/Marketplace.Autorest/test/Set-AzMarketplacePrivateStoreCollection.Recording.json @@ -1,15 +1,15 @@ { - "Set-AzMarketplacePrivateStoreCollection+[NoContext]+UpdateExpanded+$PUT+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/7f5402e4-e8f4-46bd-9bd1-8d27866a6065?api-version=2021-06-01+1": { + "Set-AzMarketplacePrivateStoreCollection+[NoContext]+UpdateExpanded+$PUT+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/8c7a91db-cd41-43b6-af47-2e869654126d?api-version=2023-01-01+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/7f5402e4-e8f4-46bd-9bd1-8d27866a6065?api-version=2021-06-01", - "Content": "{\n \"properties\": {\n \"collectionName\": \"setColltest\",\n \"subscriptionsList\": [ \"1052ff5a-aa43-4ca1-bd18-010399494ce5\" ]\n }\n}", + "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/8c7a91db-cd41-43b6-af47-2e869654126d?api-version=2023-01-01", + "Content": "{\r\n \"properties\": {\r\n \"collectionName\": \"PWSH_Test1\",\r\n \"enabled\": true\r\n }\r\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "130" ] + "Content-Length": [ "86" ] } }, "Response": { @@ -17,85 +17,46 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], + "Accept-Ranges": [ "bytes" ], "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=80c7a5f90186ed67b1a22b2d6ba64306a36f909c848093374b79f8b04109a233;Path=/;HttpOnly;Secure;Domain=main.prod.marketplaceprivatestore.azure.com", "ARRAffinitySameSite=80c7a5f90186ed67b1a22b2d6ba64306a36f909c848093374b79f8b04109a233;Path=/;HttpOnly;SameSite=None;Secure;Domain=main.prod.marketplaceprivatestore.azure.com" ], + "x-ms-ratelimit-remaining-tenant-writes": [ "1198" ], "X-Content-Type-Options": [ "nosniff" ], "X-XSS-Protection": [ "1; mode=block" ], - "x-ms-version": [ "6.0.01832.0004-467b09b3" ], - "Set-Cookie": [ "ARRAffinity=d3888da00a6c22fd6922d241b1e1f8b74760295bc9888c172907d962f5a68055;Path=/;HttpOnly;Secure;Domain=marketplacerp.azure.com", "ARRAffinitySameSite=d3888da00a6c22fd6922d241b1e1f8b74760295bc9888c172907d962f5a68055;Path=/;HttpOnly;SameSite=None;Secure;Domain=marketplacerp.azure.com" ], - "Server": [ "Microsoft-IIS/10.0" ], + "x-ms-version": [ "6.0.02586.90-5c77bed2" ], "X-AspNet-Version": [ "4.0.30319" ], "X-Powered-By": [ "ASP.NET" ], - "x-ms-ratelimit-remaining-tenant-writes": [ "1194" ], - "x-ms-request-id": [ "c712e75d-596e-4684-a2bc-2ed2ec011ef7" ], - "x-ms-correlation-request-id": [ "c712e75d-596e-4684-a2bc-2ed2ec011ef7" ], - "x-ms-routing-request-id": [ "UAECENTRAL:20220124T135920Z:c712e75d-596e-4684-a2bc-2ed2ec011ef7" ], + "x-azure-ref": [ "20240206T121522Z-un93fkbvw50w5bbm67x1677wk800000009c0000000008mtk" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "x-ms-request-id": [ "71a52e70-c651-44f1-a3d2-bd7260c74874" ], + "x-ms-correlation-request-id": [ "71a52e70-c651-44f1-a3d2-bd7260c74874" ], + "x-ms-routing-request-id": [ "ISRAELCENTRAL:20240206T121522Z:71a52e70-c651-44f1-a3d2-bd7260c74874" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Date": [ "Mon, 24 Jan 2022 13:59:20 GMT" ] + "X-MSEdge-Ref": [ "Ref A: D14686990ED2419EAA4CAC1C267B8FC2 Ref B: MRS211050313051 Ref C: 2024-02-06T12:15:22Z" ], + "Date": [ "Tue, 06 Feb 2024 12:15:21 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "669" ], + "Content-Length": [ "667" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"systemData\":{\"createdBy\":\"\",\"createdByType\":\"User\",\"createdAt\":\"2022-01-24T13:59:20.1132632Z\",\"lastModifiedBy\":\"\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2022-01-24T13:59:20.1333443Z\"},\"id\":\"providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/7f5402e4-e8f4-46bd-9bd1-8d27866a6065\",\"name\":\"7f5402e4-e8f4-46bd-9bd1-8d27866a6065\",\"type\":\"Microsoft.Marketplace/privateStores/collections\",\"properties\":{\"collectionId\":\"7f5402e4-e8f4-46bd-9bd1-8d27866a6065\",\"collectionName\":\"setColltest\",\"claim\":null,\"allSubscriptions\":false,\"subscriptionsList\":[\"1052ff5a-aa43-4ca1-bd18-010399494ce5\"],\"enabled\":false,\"numberOfOffers\":0}}", + "Content": "{\"systemData\":{\"createdBy\":\"\",\"createdByType\":\"User\",\"createdAt\":\"2024-02-06T12:14:35.3055425Z\",\"lastModifiedBy\":\"\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-02-06T12:15:22.2653871Z\"},\"id\":\"providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/8c7a91db-cd41-43b6-af47-2e869654126d\",\"name\":\"8c7a91db-cd41-43b6-af47-2e869654126d\",\"type\":\"Microsoft.Marketplace/privateStores/collections\",\"properties\":{\"collectionId\":\"8c7a91db-cd41-43b6-af47-2e869654126d\",\"collectionName\":\"PWSH_Test1\",\"claim\":null,\"allSubscriptions\":false,\"subscriptionsList\":[\"1052ff5a-aa43-4ca1-bd18-010399494ce5\"],\"enabled\":true,\"numberOfOffers\":0}}", "isContentBase64": false } }, - "Set-AzMarketplacePrivateStoreCollection+[NoContext]+UpdateExpanded+$PUT+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/7f5402e4-e8f4-46bd-9bd1-8d27866a6065?api-version=2021-06-01+2": { - "Request": { - "Method": "PUT", - "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/7f5402e4-e8f4-46bd-9bd1-8d27866a6065?api-version=2021-06-01", - "Content": "{\n \"properties\": {\n \"collectionName\": \"setColltest1\",\n \"enabled\": true\n }\n}", - "isContentBase64": false, - "Headers": { - }, - "ContentHeaders": { - "Content-Type": [ "application/json" ], - "Content-Length": [ "83" ] - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "Vary": [ "Accept-Encoding" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-XSS-Protection": [ "1; mode=block" ], - "x-ms-version": [ "6.0.01832.0004-467b09b3" ], - "Set-Cookie": [ "ARRAffinity=ac34b1a047b7a77113a516ef142ac6ff661eaaf7884099e34431a940426d41cc;Path=/;HttpOnly;Secure;Domain=marketplacerp.azure.com", "ARRAffinitySameSite=ac34b1a047b7a77113a516ef142ac6ff661eaaf7884099e34431a940426d41cc;Path=/;HttpOnly;SameSite=None;Secure;Domain=marketplacerp.azure.com" ], - "Server": [ "Microsoft-IIS/10.0" ], - "X-AspNet-Version": [ "4.0.30319" ], - "X-Powered-By": [ "ASP.NET" ], - "x-ms-ratelimit-remaining-tenant-writes": [ "1193" ], - "x-ms-request-id": [ "95628ca8-42b1-4c6e-869e-2ffb244f0d59" ], - "x-ms-correlation-request-id": [ "95628ca8-42b1-4c6e-869e-2ffb244f0d59" ], - "x-ms-routing-request-id": [ "UAECENTRAL:20220124T135921Z:95628ca8-42b1-4c6e-869e-2ffb244f0d59" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Date": [ "Mon, 24 Jan 2022 13:59:20 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "669" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"systemData\":{\"createdBy\":\"\",\"createdByType\":\"User\",\"createdAt\":\"2022-01-24T13:59:20.1132632Z\",\"lastModifiedBy\":\"\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2022-01-24T13:59:20.8991248Z\"},\"id\":\"providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/7f5402e4-e8f4-46bd-9bd1-8d27866a6065\",\"name\":\"7f5402e4-e8f4-46bd-9bd1-8d27866a6065\",\"type\":\"Microsoft.Marketplace/privateStores/collections\",\"properties\":{\"collectionId\":\"7f5402e4-e8f4-46bd-9bd1-8d27866a6065\",\"collectionName\":\"setColltest1\",\"claim\":null,\"allSubscriptions\":false,\"subscriptionsList\":[\"1052ff5a-aa43-4ca1-bd18-010399494ce5\"],\"enabled\":true,\"numberOfOffers\":0}}", - "isContentBase64": false - } - }, - "Set-AzMarketplacePrivateStoreCollection+[NoContext]+UpdateExpanded+$GET+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/7f5402e4-e8f4-46bd-9bd1-8d27866a6065?api-version=2021-06-01+3": { + "Set-AzMarketplacePrivateStoreCollection+[NoContext]+UpdateExpanded+$GET+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/8c7a91db-cd41-43b6-af47-2e869654126d?api-version=2023-01-01+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/7f5402e4-e8f4-46bd-9bd1-8d27866a6065?api-version=2021-06-01", + "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/8c7a91db-cd41-43b6-af47-2e869654126d?api-version=2023-01-01", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "20" ], - "x-ms-client-request-id": [ "ae62d85d-996c-4b5a-bc50-5e9adb0d5aaf" ], + "x-ms-unique-id": [ "35" ], + "x-ms-client-request-id": [ "d894d35b-902b-4218-829d-cb4368f5ff22" ], "CommandName": [ "Get-AzMarketplacePrivateStoreCollection" ], "FullCommandName": [ "Get-AzMarketplacePrivateStoreCollection_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.11", "Az.Marketplace/1.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -106,27 +67,30 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], + "Accept-Ranges": [ "bytes" ], "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=71c5ecfca949e38fa6d8b6899df69a8bc1065f71ea6211c776e43d3b7b216b7d;Path=/;HttpOnly;Secure;Domain=main.prod.marketplaceprivatestore.azure.com", "ARRAffinitySameSite=71c5ecfca949e38fa6d8b6899df69a8bc1065f71ea6211c776e43d3b7b216b7d;Path=/;HttpOnly;SameSite=None;Secure;Domain=main.prod.marketplaceprivatestore.azure.com" ], + "x-ms-ratelimit-remaining-tenant-reads": [ "11996" ], "X-Content-Type-Options": [ "nosniff" ], "X-XSS-Protection": [ "1; mode=block" ], - "x-ms-version": [ "6.0.01832.0004-467b09b3" ], - "Set-Cookie": [ "ARRAffinity=b04ffa86539d7689519d8eb5d5e7423177e93a8afca318b1f76e4c8444a7d2a2;Path=/;HttpOnly;Secure;Domain=marketplacerp.azure.com", "ARRAffinitySameSite=b04ffa86539d7689519d8eb5d5e7423177e93a8afca318b1f76e4c8444a7d2a2;Path=/;HttpOnly;SameSite=None;Secure;Domain=marketplacerp.azure.com" ], - "Server": [ "Microsoft-IIS/10.0" ], + "x-ms-version": [ "6.0.02586.90-5c77bed2" ], "X-AspNet-Version": [ "4.0.30319" ], "X-Powered-By": [ "ASP.NET" ], - "x-ms-ratelimit-remaining-tenant-reads": [ "11994" ], - "x-ms-request-id": [ "b24867a0-1331-46bb-a1de-eecadb502c77" ], - "x-ms-correlation-request-id": [ "b24867a0-1331-46bb-a1de-eecadb502c77" ], - "x-ms-routing-request-id": [ "UAECENTRAL:20220124T135921Z:b24867a0-1331-46bb-a1de-eecadb502c77" ], + "x-azure-ref": [ "20240206T121522Z-puek9bzdet0fz0hz46rmzq0b5c0000000bhg000000002ecu" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "x-ms-request-id": [ "ed935d91-bd3c-4532-8d13-a66a8ee3999d" ], + "x-ms-correlation-request-id": [ "ed935d91-bd3c-4532-8d13-a66a8ee3999d" ], + "x-ms-routing-request-id": [ "ISRAELCENTRAL:20240206T121522Z:ed935d91-bd3c-4532-8d13-a66a8ee3999d" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Date": [ "Mon, 24 Jan 2022 13:59:21 GMT" ] + "X-MSEdge-Ref": [ "Ref A: D1593CAC96204BC39652D75102453838 Ref B: MRS211050313051 Ref C: 2024-02-06T12:15:22Z" ], + "Date": [ "Tue, 06 Feb 2024 12:15:21 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "631" ], + "Content-Length": [ "731" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"systemData\":{\"createdBy\":\"\",\"createdByType\":\"User\",\"createdAt\":\"2022-01-24T13:59:20.1132632Z\",\"lastModifiedBy\":\"\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2022-01-24T13:59:20.8991248Z\"},\"id\":\"providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/7f5402e4-e8f4-46bd-9bd1-8d27866a6065\",\"name\":\"7f5402e4-e8f4-46bd-9bd1-8d27866a6065\",\"type\":\"Microsoft.Marketplace/privateStores/collections\",\"properties\":{\"collectionId\":\"7f5402e4-e8f4-46bd-9bd1-8d27866a6065\",\"collectionName\":\"setColltest1\",\"claim\":null,\"allSubscriptions\":false,\"subscriptionsList\":[],\"enabled\":true,\"numberOfOffers\":0}}", + "Content": "{\"systemData\":{\"createdBy\":\"\",\"createdByType\":\"User\",\"createdAt\":\"2024-02-06T12:14:35.3055425Z\",\"lastModifiedBy\":\"\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-02-06T12:15:22.2653871Z\"},\"id\":\"providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/8c7a91db-cd41-43b6-af47-2e869654126d\",\"name\":\"8c7a91db-cd41-43b6-af47-2e869654126d\",\"type\":\"Microsoft.Marketplace/privateStores/collections\",\"properties\":{\"appliedRules\":null,\"approveAllItems\":false,\"approveAllItemsModifiedAt\":\"0001-01-01T00:00:00.0000000\",\"collectionId\":\"8c7a91db-cd41-43b6-af47-2e869654126d\",\"collectionName\":\"PWSH_Test1\",\"claim\":null,\"allSubscriptions\":false,\"subscriptionsList\":[],\"enabled\":true,\"numberOfOffers\":1}}", "isContentBase64": false } } diff --git a/src/Marketplace/Marketplace.Autorest/test/Set-AzMarketplacePrivateStoreCollection.Tests.ps1 b/src/Marketplace/Marketplace.Autorest/test/Set-AzMarketplacePrivateStoreCollection.Tests.ps1 index aa5be02d939e..9175732b2811 100644 --- a/src/Marketplace/Marketplace.Autorest/test/Set-AzMarketplacePrivateStoreCollection.Tests.ps1 +++ b/src/Marketplace/Marketplace.Autorest/test/Set-AzMarketplacePrivateStoreCollection.Tests.ps1 @@ -16,12 +16,10 @@ if(($null -eq $TestName) -or ($TestName -contains 'Set-AzMarketplacePrivateStore Describe 'Set-AzMarketplacePrivateStoreCollection' { It 'UpdateExpanded' { - New-AzMarketplacePrivateStoreCollection -CollectionName setColltest -CollectionId 7f5402e4-e8f4-46bd-9bd1-8d27866a6065 -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -SubscriptionsList 1052ff5a-aa43-4ca1-bd18-010399494ce5 - - Set-AzMarketplacePrivateStoreCollection -CollectionId 7f5402e4-e8f4-46bd-9bd1-8d27866a6065 -CollectionName setColltest1 -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -Enabled - - $res = Get-AzMarketplacePrivateStoreCollection -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -CollectionId 7f5402e4-e8f4-46bd-9bd1-8d27866a6065 - $res.Enabled | Should -be $true + Set-AzMarketplacePrivateStoreCollection -CollectionId 8c7a91db-cd41-43b6-af47-2e869654126d -CollectionName PWSH_Test1 -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -Enabled + $res = Get-AzMarketplacePrivateStoreCollection -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -CollectionId 8c7a91db-cd41-43b6-af47-2e869654126d + $res.Enabled | Should -Be $true + $res.collectionName | Should -be PWSH_Test1 } } diff --git a/src/Marketplace/Marketplace.Autorest/test/Set-AzMarketplacePrivateStoreCollectionOffer.Recording.json b/src/Marketplace/Marketplace.Autorest/test/Set-AzMarketplacePrivateStoreCollectionOffer.Recording.json index 6c4ce0edc81f..31d735ff04b1 100644 --- a/src/Marketplace/Marketplace.Autorest/test/Set-AzMarketplacePrivateStoreCollectionOffer.Recording.json +++ b/src/Marketplace/Marketplace.Autorest/test/Set-AzMarketplacePrivateStoreCollectionOffer.Recording.json @@ -1,15 +1,15 @@ { - "Set-AzMarketplacePrivateStoreCollectionOffer+[NoContext]+UpdateExpanded+$PUT+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa0188?api-version=2021-06-01+1": { + "Set-AzMarketplacePrivateStoreCollectionOffer+[NoContext]+UpdateExpanded+$PUT+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa0188?api-version=2023-01-01+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa0188?api-version=2021-06-01", - "Content": "{\n \"properties\": {\n \"collectionName\": \"test134\",\n \"subscriptionsList\": [ \"1052ff5a-aa43-4ca1-bd18-010399494ce5\" ]\n }\n}", + "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa0188?api-version=2023-01-01", + "Content": "{\r\n \"properties\": {\r\n \"collectionName\": \"test134\",\r\n \"subscriptionsList\": [ \"1052ff5a-aa43-4ca1-bd18-010399494ce5\" ]\r\n }\r\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "126" ] + "Content-Length": [ "131" ] } }, "Response": { @@ -17,41 +17,44 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], + "Accept-Ranges": [ "bytes" ], "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=a3053b2a1619a6aa4b0e7e497e4fa01864cd730cd9c257837f8a0036d6c79b63;Path=/;HttpOnly;Secure;Domain=main.prod.marketplaceprivatestore.azure.com", "ARRAffinitySameSite=a3053b2a1619a6aa4b0e7e497e4fa01864cd730cd9c257837f8a0036d6c79b63;Path=/;HttpOnly;SameSite=None;Secure;Domain=main.prod.marketplaceprivatestore.azure.com" ], + "x-ms-ratelimit-remaining-tenant-writes": [ "1194" ], "X-Content-Type-Options": [ "nosniff" ], "X-XSS-Protection": [ "1; mode=block" ], - "x-ms-version": [ "6.0.01832.0004-467b09b3" ], - "Set-Cookie": [ "ARRAffinity=a1932161769a8d1e756ea2a33c09d2511fa99932f8d921493de9f93092d8c165;Path=/;HttpOnly;Secure;Domain=marketplacerp.azure.com", "ARRAffinitySameSite=a1932161769a8d1e756ea2a33c09d2511fa99932f8d921493de9f93092d8c165;Path=/;HttpOnly;SameSite=None;Secure;Domain=marketplacerp.azure.com" ], - "Server": [ "Microsoft-IIS/10.0" ], + "x-ms-version": [ "6.0.02586.90-5c77bed2" ], "X-AspNet-Version": [ "4.0.30319" ], "X-Powered-By": [ "ASP.NET" ], - "x-ms-ratelimit-remaining-tenant-writes": [ "1192" ], - "x-ms-request-id": [ "525d0938-b3c6-4fd6-9583-586fbafcd1ad" ], - "x-ms-correlation-request-id": [ "525d0938-b3c6-4fd6-9583-586fbafcd1ad" ], - "x-ms-routing-request-id": [ "UAECENTRAL:20220124T135925Z:525d0938-b3c6-4fd6-9583-586fbafcd1ad" ], + "x-azure-ref": [ "20240206T122226Z-8f6r3xskwh4btc8yq2qh5g5fz40000000950000000007p7s" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "x-ms-request-id": [ "9ebc9672-aa39-4dce-85eb-0b3cd8235cb0" ], + "x-ms-correlation-request-id": [ "9ebc9672-aa39-4dce-85eb-0b3cd8235cb0" ], + "x-ms-routing-request-id": [ "ISRAELCENTRAL:20240206T122227Z:9ebc9672-aa39-4dce-85eb-0b3cd8235cb0" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Date": [ "Mon, 24 Jan 2022 13:59:24 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 3FB5D02111EC457FAECF78F9EE1D8C29 Ref B: MRS211050619051 Ref C: 2024-02-06T12:22:26Z" ], + "Date": [ "Tue, 06 Feb 2024 12:22:26 GMT" ] }, "ContentHeaders": { "Content-Length": [ "665" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"systemData\":{\"createdBy\":\"\",\"createdByType\":\"User\",\"createdAt\":\"2022-01-24T13:59:24.9775806Z\",\"lastModifiedBy\":\"\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2022-01-24T13:59:24.9976181Z\"},\"id\":\"providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa0188\",\"name\":\"fdb889a1-cf3e-49f0-95b8-2bb012fa0188\",\"type\":\"Microsoft.Marketplace/privateStores/collections\",\"properties\":{\"collectionId\":\"fdb889a1-cf3e-49f0-95b8-2bb012fa0188\",\"collectionName\":\"test134\",\"claim\":null,\"allSubscriptions\":false,\"subscriptionsList\":[\"1052ff5a-aa43-4ca1-bd18-010399494ce5\"],\"enabled\":false,\"numberOfOffers\":0}}", + "Content": "{\"systemData\":{\"createdBy\":\"\",\"createdByType\":\"User\",\"createdAt\":\"2024-02-06T12:22:24.5682275Z\",\"lastModifiedBy\":\"\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-02-06T12:22:27.0109473Z\"},\"id\":\"providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa0188\",\"name\":\"fdb889a1-cf3e-49f0-95b8-2bb012fa0188\",\"type\":\"Microsoft.Marketplace/privateStores/collections\",\"properties\":{\"collectionId\":\"fdb889a1-cf3e-49f0-95b8-2bb012fa0188\",\"collectionName\":\"test134\",\"claim\":null,\"allSubscriptions\":false,\"subscriptionsList\":[\"1052ff5a-aa43-4ca1-bd18-010399494ce5\"],\"enabled\":false,\"numberOfOffers\":0}}", "isContentBase64": false } }, - "Set-AzMarketplacePrivateStoreCollectionOffer+[NoContext]+UpdateExpanded+$PUT+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa0188/offers/aumatics.azure_managedservices?api-version=2021-06-01+2": { + "Set-AzMarketplacePrivateStoreCollectionOffer+[NoContext]+UpdateExpanded+$PUT+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa0188/offers/aumatics.azure_managedservices?api-version=2023-01-01+2": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa0188/offers/aumatics.azure_managedservices?api-version=2021-06-01", - "Content": "{\n \"properties\": {\n \"plans\": [\n {\n \"accessibility\": \"azure_managedservices_professional\"\n }\n ]\n }\n}", + "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa0188/offers/aumatics.azure_managedservices?api-version=2023-01-01", + "Content": "{\r\n \"properties\": {\r\n \"plans\": [\r\n {\r\n \"accessibility\": \"azure_managedservices_professional\"\r\n }\r\n ]\r\n }\r\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "124" ] + "Content-Length": [ "132" ] } }, "Response": { @@ -59,43 +62,46 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], + "Accept-Ranges": [ "bytes" ], "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=bfe2117850ddf2eb1a1bdbff379f22be7abd277495b3d0ff28b1c1254c65d847;Path=/;HttpOnly;Secure;Domain=main.prod.marketplaceprivatestore.azure.com", "ARRAffinitySameSite=bfe2117850ddf2eb1a1bdbff379f22be7abd277495b3d0ff28b1c1254c65d847;Path=/;HttpOnly;SameSite=None;Secure;Domain=main.prod.marketplaceprivatestore.azure.com" ], + "x-ms-ratelimit-remaining-tenant-writes": [ "1194" ], "X-Content-Type-Options": [ "nosniff" ], "X-XSS-Protection": [ "1; mode=block" ], - "x-ms-version": [ "6.0.01832.0004-467b09b3" ], - "Set-Cookie": [ "ARRAffinity=96b32ba767f19bc2be802a1a84fdc00853c28f5d538f067794a88bb9cdc29727;Path=/;HttpOnly;Secure;Domain=marketplacerp.azure.com", "ARRAffinitySameSite=96b32ba767f19bc2be802a1a84fdc00853c28f5d538f067794a88bb9cdc29727;Path=/;HttpOnly;SameSite=None;Secure;Domain=marketplacerp.azure.com" ], - "Server": [ "Microsoft-IIS/10.0" ], + "x-ms-version": [ "6.0.02586.90-5c77bed2" ], "X-AspNet-Version": [ "4.0.30319" ], "X-Powered-By": [ "ASP.NET" ], - "x-ms-ratelimit-remaining-tenant-writes": [ "1191" ], - "x-ms-request-id": [ "247b028f-13c3-4e80-aa2a-b04fd530b8e4" ], - "x-ms-correlation-request-id": [ "247b028f-13c3-4e80-aa2a-b04fd530b8e4" ], - "x-ms-routing-request-id": [ "UAECENTRAL:20220124T135925Z:247b028f-13c3-4e80-aa2a-b04fd530b8e4" ], + "x-azure-ref": [ "20240206T122227Z-t7c72rkz312716843t9pzrc2tg0000000aug00000000077s" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "x-ms-request-id": [ "d745028d-1b61-43a2-8729-d20a2e0713c8" ], + "x-ms-correlation-request-id": [ "d745028d-1b61-43a2-8729-d20a2e0713c8" ], + "x-ms-routing-request-id": [ "ISRAELCENTRAL:20240206T122228Z:d745028d-1b61-43a2-8729-d20a2e0713c8" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Date": [ "Mon, 24 Jan 2022 13:59:25 GMT" ] + "X-MSEdge-Ref": [ "Ref A: D3ABD943B648437E9C0F51484F22DC3B Ref B: MRS211050619051 Ref C: 2024-02-06T12:22:27Z" ], + "Date": [ "Tue, 06 Feb 2024 12:22:27 GMT" ] }, "ContentHeaders": { "Content-Length": [ "524" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa0188/offers/aumatics.azure_managedservices\",\"name\":\"aumatics.azure_managedservices\",\"type\":\"Microsoft.Marketplace/privateStores/collection/offers\",\"properties\":{\"uniqueOfferId\":\"aumatics.azure_managedservices\",\"specificPlanIdsLimitation\":null,\"eTag\":\"\\\"1e00d2b8-0000-0100-0000-61eeb0bd0000\\\"\",\"privateStoreId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"updateSuppressedDueIdempotence\":false}}", + "Content": "{\"id\":\"/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa0188/offers/aumatics.azure_managedservices\",\"name\":\"aumatics.azure_managedservices\",\"type\":\"Microsoft.Marketplace/privateStores/collection/offers\",\"properties\":{\"uniqueOfferId\":\"aumatics.azure_managedservices\",\"specificPlanIdsLimitation\":null,\"eTag\":\"\\\"f3037f86-0000-0100-0000-65c224840000\\\"\",\"privateStoreId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"updateSuppressedDueIdempotence\":false}}", "isContentBase64": false } }, - "Set-AzMarketplacePrivateStoreCollectionOffer+[NoContext]+UpdateExpanded+$GET+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa0188/offers/aumatics.azure_managedservices?api-version=2021-06-01+3": { + "Set-AzMarketplacePrivateStoreCollectionOffer+[NoContext]+UpdateExpanded+$GET+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa0188/offers/aumatics.azure_managedservices?api-version=2023-01-01+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa0188/offers/aumatics.azure_managedservices?api-version=2021-06-01", + "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa0188/offers/aumatics.azure_managedservices?api-version=2023-01-01", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "23" ], - "x-ms-client-request-id": [ "d146b7c6-f2f3-45f5-8742-dac5fe3032c6" ], + "x-ms-unique-id": [ "5" ], + "x-ms-client-request-id": [ "e8315f31-5d95-4950-b659-811c5275b084" ], "CommandName": [ "Get-AzMarketplacePrivateStoreCollectionOffer" ], "FullCommandName": [ "Get-AzMarketplacePrivateStoreCollectionOffer_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.11", "Az.Marketplace/1.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -106,27 +112,30 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], + "Accept-Ranges": [ "bytes" ], "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=71c5ecfca949e38fa6d8b6899df69a8bc1065f71ea6211c776e43d3b7b216b7d;Path=/;HttpOnly;Secure;Domain=main.prod.marketplaceprivatestore.azure.com", "ARRAffinitySameSite=71c5ecfca949e38fa6d8b6899df69a8bc1065f71ea6211c776e43d3b7b216b7d;Path=/;HttpOnly;SameSite=None;Secure;Domain=main.prod.marketplaceprivatestore.azure.com" ], + "x-ms-ratelimit-remaining-tenant-reads": [ "11989" ], "X-Content-Type-Options": [ "nosniff" ], "X-XSS-Protection": [ "1; mode=block" ], - "x-ms-version": [ "6.0.01832.0004-467b09b3" ], - "Set-Cookie": [ "ARRAffinity=b115d2f875c66b84b700975954f361f48f95995b3649b85a0990b9141d8b2e7d;Path=/;HttpOnly;Secure;Domain=marketplacerp.azure.com", "ARRAffinitySameSite=b115d2f875c66b84b700975954f361f48f95995b3649b85a0990b9141d8b2e7d;Path=/;HttpOnly;SameSite=None;Secure;Domain=marketplacerp.azure.com" ], - "Server": [ "Microsoft-IIS/10.0" ], + "x-ms-version": [ "6.0.02586.90-5c77bed2" ], "X-AspNet-Version": [ "4.0.30319" ], "X-Powered-By": [ "ASP.NET" ], - "x-ms-ratelimit-remaining-tenant-reads": [ "11993" ], - "x-ms-request-id": [ "4d483bb2-c98a-4f92-8f7f-1de8384197c5" ], - "x-ms-correlation-request-id": [ "4d483bb2-c98a-4f92-8f7f-1de8384197c5" ], - "x-ms-routing-request-id": [ "UAECENTRAL:20220124T135926Z:4d483bb2-c98a-4f92-8f7f-1de8384197c5" ], + "x-azure-ref": [ "20240206T122228Z-p4qrcvy1bt1fzaf9y6gvrq4w4g0000000beg000000001up8" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "x-ms-request-id": [ "33e2b093-e923-4731-af5f-7eee04d059c4" ], + "x-ms-correlation-request-id": [ "33e2b093-e923-4731-af5f-7eee04d059c4" ], + "x-ms-routing-request-id": [ "ISRAELCENTRAL:20240206T122228Z:33e2b093-e923-4731-af5f-7eee04d059c4" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Date": [ "Mon, 24 Jan 2022 13:59:26 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 94B49F96F82145069A3DE1FEC5CEE948 Ref B: MRS211050619051 Ref C: 2024-02-06T12:22:28Z" ], + "Date": [ "Tue, 06 Feb 2024 12:22:28 GMT" ] }, "ContentHeaders": { "Content-Length": [ "524" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa0188/offers/aumatics.azure_managedservices\",\"name\":\"aumatics.azure_managedservices\",\"type\":\"Microsoft.Marketplace/privateStores/collection/offers\",\"properties\":{\"uniqueOfferId\":\"aumatics.azure_managedservices\",\"specificPlanIdsLimitation\":null,\"eTag\":\"\\\"1e00d2b8-0000-0100-0000-61eeb0bd0000\\\"\",\"privateStoreId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"updateSuppressedDueIdempotence\":false}}", + "Content": "{\"id\":\"/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/fdb889a1-cf3e-49f0-95b8-2bb012fa0188/offers/aumatics.azure_managedservices\",\"name\":\"aumatics.azure_managedservices\",\"type\":\"Microsoft.Marketplace/privateStores/collection/offers\",\"properties\":{\"uniqueOfferId\":\"aumatics.azure_managedservices\",\"specificPlanIdsLimitation\":null,\"eTag\":\"\\\"f3037f86-0000-0100-0000-65c224840000\\\"\",\"privateStoreId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"updateSuppressedDueIdempotence\":false}}", "isContentBase64": false } } diff --git a/src/Marketplace/Marketplace.Autorest/test/Set-AzMarketplacePrivateStoreCollectionOffer.Tests.ps1 b/src/Marketplace/Marketplace.Autorest/test/Set-AzMarketplacePrivateStoreCollectionOffer.Tests.ps1 index 2d9b1ba8a2c2..ad4c5ebbd3ba 100644 --- a/src/Marketplace/Marketplace.Autorest/test/Set-AzMarketplacePrivateStoreCollectionOffer.Tests.ps1 +++ b/src/Marketplace/Marketplace.Autorest/test/Set-AzMarketplacePrivateStoreCollectionOffer.Tests.ps1 @@ -15,13 +15,13 @@ if(($null -eq $TestName) -or ($TestName -contains 'Set-AzMarketplacePrivateStore } Describe 'Set-AzMarketplacePrivateStoreCollectionOffer' { - It 'UpdateExpanded' { - New-AzMarketplacePrivateStoreCollection -CollectionName test134 -CollectionId fdb889a1-cf3e-49f0-95b8-2bb012fa0188 -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -SubscriptionsList 1052ff5a-aa43-4ca1-bd18-010399494ce5 - $acc = @{Accessibility = "azure_managedservices_professional"} - New-AzMarketplacePrivateStoreCollectionOffer -CollectionId fdb889a1-cf3e-49f0-95b8-2bb012fa0188 -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -OfferId aumatics.azure_managedservices -Plan $acc + It 'UpdateExpanded' { + New-AzMarketplacePrivateStoreCollection -CollectionName test134 -CollectionId fdb889a1-cf3e-49f0-95b8-2bb012fa0188 -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -SubscriptionsList 1052ff5a-aa43-4ca1-bd18-010399494ce5 + $acc = @{Accessibility = "azure_managedservices_professional"} + New-AzMarketplacePrivateStoreCollectionOffer -CollectionId fdb889a1-cf3e-49f0-95b8-2bb012fa0188 -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -OfferId aumatics.azure_managedservices -Plan $acc - - $res = Get-AzMarketplacePrivateStoreCollectionOffer -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -CollectionId fdb889a1-cf3e-49f0-95b8-2bb012fa0188 -OfferId aumatics.azure_managedservices - $res.UniqueOfferId | Should -Be "aumatics.azure_managedservices" + + $res = Get-AzMarketplacePrivateStoreCollectionOffer -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -CollectionId fdb889a1-cf3e-49f0-95b8-2bb012fa0188 -OfferId aumatics.azure_managedservices + $res.UniqueOfferId | Should -Be "aumatics.azure_managedservices" } } diff --git a/src/Marketplace/Marketplace.Autorest/test/Test-AzMarketplacePrivateStoreAnyExistingOffer.Recording.json b/src/Marketplace/Marketplace.Autorest/test/Test-AzMarketplacePrivateStoreAnyExistingOffer.Recording.json new file mode 100644 index 000000000000..0c3e30ee5efc --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/test/Test-AzMarketplacePrivateStoreAnyExistingOffer.Recording.json @@ -0,0 +1,52 @@ +{ + "Test-AzMarketplacePrivateStoreAnyExistingOffer+[NoContext]+Any+$POST+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/anyExistingOffersInTheCollections?api-version=2023-01-01+1": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/anyExistingOffersInTheCollections?api-version=2023-01-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "38" ], + "x-ms-client-request-id": [ "d1d22991-838d-4152-a7ce-b3ce929e546c" ], + "CommandName": [ "Test-AzMarketplacePrivateStoreAnyExistingOffer" ], + "FullCommandName": [ "Test-AzMarketplacePrivateStoreAnyExistingOffer_Any" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.11", "Az.Marketplace/1.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Accept-Ranges": [ "bytes" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=80c7a5f90186ed67b1a22b2d6ba64306a36f909c848093374b79f8b04109a233;Path=/;HttpOnly;Secure;Domain=main.prod.marketplaceprivatestore.azure.com", "ARRAffinitySameSite=80c7a5f90186ed67b1a22b2d6ba64306a36f909c848093374b79f8b04109a233;Path=/;HttpOnly;SameSite=None;Secure;Domain=main.prod.marketplaceprivatestore.azure.com" ], + "x-ms-ratelimit-remaining-tenant-writes": [ "1195" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-XSS-Protection": [ "1; mode=block" ], + "x-ms-version": [ "6.0.02586.90-5c77bed2" ], + "X-AspNet-Version": [ "4.0.30319" ], + "X-Powered-By": [ "ASP.NET" ], + "x-azure-ref": [ "20240206T121524Z-e9fr18rg4936d7qwr39u9d2ats000000030g000000007k7v" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "x-ms-request-id": [ "e0705120-f296-449d-8f22-8acf7b354711" ], + "x-ms-correlation-request-id": [ "e0705120-f296-449d-8f22-8acf7b354711" ], + "x-ms-routing-request-id": [ "ISRAELCENTRAL:20240206T121524Z:e0705120-f296-449d-8f22-8acf7b354711" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-MSEdge-Ref": [ "Ref A: F53A8437DEDF44FCA936F53D96422C46 Ref B: MRS211050313051 Ref C: 2024-02-06T12:15:24Z" ], + "Date": [ "Tue, 06 Feb 2024 12:15:23 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "14" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":true}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Marketplace/Marketplace.Autorest/test/Remove-AzMarketplacePrivateStore.Tests.ps1 b/src/Marketplace/Marketplace.Autorest/test/Test-AzMarketplacePrivateStoreAnyExistingOffer.Tests.ps1 similarity index 52% rename from src/Marketplace/Marketplace.Autorest/test/Remove-AzMarketplacePrivateStore.Tests.ps1 rename to src/Marketplace/Marketplace.Autorest/test/Test-AzMarketplacePrivateStoreAnyExistingOffer.Tests.ps1 index a3889eb75c93..0afc5fb53634 100644 --- a/src/Marketplace/Marketplace.Autorest/test/Remove-AzMarketplacePrivateStore.Tests.ps1 +++ b/src/Marketplace/Marketplace.Autorest/test/Test-AzMarketplacePrivateStoreAnyExistingOffer.Tests.ps1 @@ -1,11 +1,11 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzMarketplacePrivateStore')) +if(($null -eq $TestName) -or ($TestName -contains 'Test-AzMarketplacePrivateStoreAnyExistingOffer')) { $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' if (-Not (Test-Path -Path $loadEnvPath)) { $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' } . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzMarketplacePrivateStore.Recording.json' + $TestRecordingFile = Join-Path $PSScriptRoot 'Test-AzMarketplacePrivateStoreAnyExistingOffer.Recording.json' $currentPath = $PSScriptRoot while(-not $mockingPath) { $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File @@ -14,12 +14,9 @@ if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzMarketplacePrivateSt . ($mockingPath | Select-Object -First 1).FullName } -Describe 'Remove-AzMarketplacePrivateStore' { - It 'Delete' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'DeleteViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw +Describe 'Test-AzMarketplacePrivateStoreAnyExistingOffer' { + It 'Any' { + $res = Test-AzMarketplacePrivateStoreAnyExistingOffer -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 + $res | Should -Not -Be $null } } diff --git a/src/Marketplace/Marketplace.Autorest/test/Update-AzMarketplacePrivateStoreCollection.Recording.json b/src/Marketplace/Marketplace.Autorest/test/Update-AzMarketplacePrivateStoreCollection.Recording.json new file mode 100644 index 000000000000..eda2d9766d6a --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/test/Update-AzMarketplacePrivateStoreCollection.Recording.json @@ -0,0 +1,97 @@ +{ + "Update-AzMarketplacePrivateStoreCollection+[NoContext]+UpdateExpanded+$GET+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/8c7a91db-cd41-43b6-af47-2e869654126d?api-version=2023-01-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/8c7a91db-cd41-43b6-af47-2e869654126d?api-version=2023-01-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "39" ], + "x-ms-client-request-id": [ "8efb35e5-6863-4f1e-b40c-e8b08b8806e2" ], + "CommandName": [ "Update-AzMarketplacePrivateStoreCollection" ], + "FullCommandName": [ "Update-AzMarketplacePrivateStoreCollection_UpdateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.11", "Az.Marketplace/1.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Accept-Ranges": [ "bytes" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=71c5ecfca949e38fa6d8b6899df69a8bc1065f71ea6211c776e43d3b7b216b7d;Path=/;HttpOnly;Secure;Domain=main.prod.marketplaceprivatestore.azure.com", "ARRAffinitySameSite=71c5ecfca949e38fa6d8b6899df69a8bc1065f71ea6211c776e43d3b7b216b7d;Path=/;HttpOnly;SameSite=None;Secure;Domain=main.prod.marketplaceprivatestore.azure.com" ], + "x-ms-ratelimit-remaining-tenant-reads": [ "11998" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-XSS-Protection": [ "1; mode=block" ], + "x-ms-version": [ "6.0.02586.90-5c77bed2" ], + "X-AspNet-Version": [ "4.0.30319" ], + "X-Powered-By": [ "ASP.NET" ], + "x-azure-ref": [ "20240206T121525Z-un93fkbvw50w5bbm67x1677wk800000009c0000000008mw0" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "x-ms-request-id": [ "a0645d59-f103-4bd8-b981-c3f6ffe2add0" ], + "x-ms-correlation-request-id": [ "a0645d59-f103-4bd8-b981-c3f6ffe2add0" ], + "x-ms-routing-request-id": [ "ISRAELCENTRAL:20240206T121525Z:a0645d59-f103-4bd8-b981-c3f6ffe2add0" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-MSEdge-Ref": [ "Ref A: F753F773AB8F4912B3A9D3C95BB8CE64 Ref B: MRS211050313051 Ref C: 2024-02-06T12:15:25Z" ], + "Date": [ "Tue, 06 Feb 2024 12:15:24 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "731" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"systemData\":{\"createdBy\":\"\",\"createdByType\":\"User\",\"createdAt\":\"2024-02-06T12:14:35.3055425Z\",\"lastModifiedBy\":\"\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-02-06T12:15:22.2653871Z\"},\"id\":\"providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/8c7a91db-cd41-43b6-af47-2e869654126d\",\"name\":\"8c7a91db-cd41-43b6-af47-2e869654126d\",\"type\":\"Microsoft.Marketplace/privateStores/collections\",\"properties\":{\"appliedRules\":null,\"approveAllItems\":false,\"approveAllItemsModifiedAt\":\"0001-01-01T00:00:00.0000000\",\"collectionId\":\"8c7a91db-cd41-43b6-af47-2e869654126d\",\"collectionName\":\"PWSH_Test1\",\"claim\":null,\"allSubscriptions\":false,\"subscriptionsList\":[],\"enabled\":true,\"numberOfOffers\":1}}", + "isContentBase64": false + } + }, + "Update-AzMarketplacePrivateStoreCollection+[NoContext]+UpdateExpanded+$PUT+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/8c7a91db-cd41-43b6-af47-2e869654126d?api-version=2023-01-01+2": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/8c7a91db-cd41-43b6-af47-2e869654126d?api-version=2023-01-01", + "Content": "{\r\n \"properties\": {\r\n \"collectionName\": \"PWSH_Test1\",\r\n \"allSubscriptions\": false,\r\n \"subscriptionsList\": [ ],\r\n \"enabled\": true\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "149" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Accept-Ranges": [ "bytes" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=80c7a5f90186ed67b1a22b2d6ba64306a36f909c848093374b79f8b04109a233;Path=/;HttpOnly;Secure;Domain=main.prod.marketplaceprivatestore.azure.com", "ARRAffinitySameSite=80c7a5f90186ed67b1a22b2d6ba64306a36f909c848093374b79f8b04109a233;Path=/;HttpOnly;SameSite=None;Secure;Domain=main.prod.marketplaceprivatestore.azure.com" ], + "x-ms-ratelimit-remaining-tenant-writes": [ "1196" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-XSS-Protection": [ "1; mode=block" ], + "x-ms-version": [ "6.0.02586.90-5c77bed2" ], + "X-AspNet-Version": [ "4.0.30319" ], + "X-Powered-By": [ "ASP.NET" ], + "x-azure-ref": [ "20240206T121525Z-gwknnxeka10xrfzb2a991aarkg0000000as000000000aqnb" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "x-ms-request-id": [ "84e34e21-9e47-4218-a435-7a5844dc7949" ], + "x-ms-correlation-request-id": [ "84e34e21-9e47-4218-a435-7a5844dc7949" ], + "x-ms-routing-request-id": [ "ISRAELCENTRAL:20240206T121525Z:84e34e21-9e47-4218-a435-7a5844dc7949" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-MSEdge-Ref": [ "Ref A: C2B1105E51EC4D11BFCA5E530DC40EC0 Ref B: MRS211050313051 Ref C: 2024-02-06T12:15:25Z" ], + "Date": [ "Tue, 06 Feb 2024 12:15:24 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "629" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"systemData\":{\"createdBy\":\"\",\"createdByType\":\"User\",\"createdAt\":\"2024-02-06T12:14:35.3055425Z\",\"lastModifiedBy\":\"\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-02-06T12:15:25.4529484Z\"},\"id\":\"providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/8c7a91db-cd41-43b6-af47-2e869654126d\",\"name\":\"8c7a91db-cd41-43b6-af47-2e869654126d\",\"type\":\"Microsoft.Marketplace/privateStores/collections\",\"properties\":{\"collectionId\":\"8c7a91db-cd41-43b6-af47-2e869654126d\",\"collectionName\":\"PWSH_Test1\",\"claim\":null,\"allSubscriptions\":false,\"subscriptionsList\":[],\"enabled\":true,\"numberOfOffers\":0}}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Marketplace/Marketplace.Autorest/test/Update-AzMarketplacePrivateStoreCollection.Tests.ps1 b/src/Marketplace/Marketplace.Autorest/test/Update-AzMarketplacePrivateStoreCollection.Tests.ps1 new file mode 100644 index 000000000000..064018a7ca02 --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/test/Update-AzMarketplacePrivateStoreCollection.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzMarketplacePrivateStoreCollection')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzMarketplacePrivateStoreCollection.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Update-AzMarketplacePrivateStoreCollection' { + It 'UpdateExpanded' { + $res = Update-AzMarketplacePrivateStoreCollection -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -CollectionId 8c7a91db-cd41-43b6-af47-2e869654126d -Enabled + $res | Should -Not -Be $null + $res.Enabled | Should -Be $true + } +} diff --git a/src/Marketplace/Marketplace.Autorest/test/Update-AzMarketplacePrivateStoreCollectionOffer.Recording.json b/src/Marketplace/Marketplace.Autorest/test/Update-AzMarketplacePrivateStoreCollectionOffer.Recording.json new file mode 100644 index 000000000000..1868670502ef --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/test/Update-AzMarketplacePrivateStoreCollectionOffer.Recording.json @@ -0,0 +1,142 @@ +{ + "Update-AzMarketplacePrivateStoreCollectionOffer+[NoContext]+UpdateExpanded+$PUT+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/8c7a91db-cd41-43b6-af47-2e869654126d/offers/aumatics.azure_managedservices?api-version=2023-01-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/8c7a91db-cd41-43b6-af47-2e869654126d/offers/aumatics.azure_managedservices?api-version=2023-01-01", + "Content": "{\r\n \"properties\": {\r\n \"plans\": [\r\n {\r\n \"accessibility\": \"azure_managedservices_professional\"\r\n }\r\n ]\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "132" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Accept-Ranges": [ "bytes" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=71c5ecfca949e38fa6d8b6899df69a8bc1065f71ea6211c776e43d3b7b216b7d;Path=/;HttpOnly;Secure;Domain=main.prod.marketplaceprivatestore.azure.com", "ARRAffinitySameSite=71c5ecfca949e38fa6d8b6899df69a8bc1065f71ea6211c776e43d3b7b216b7d;Path=/;HttpOnly;SameSite=None;Secure;Domain=main.prod.marketplaceprivatestore.azure.com" ], + "x-ms-ratelimit-remaining-tenant-writes": [ "1198" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-XSS-Protection": [ "1; mode=block" ], + "x-ms-version": [ "6.0.02586.90-5c77bed2" ], + "X-AspNet-Version": [ "4.0.30319" ], + "X-Powered-By": [ "ASP.NET" ], + "x-azure-ref": [ "20240206T121526Z-puek9bzdet0fz0hz46rmzq0b5c0000000bhg000000002ef1" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "x-ms-request-id": [ "fd070792-5507-4033-ab39-bc7dc66fe9a8" ], + "x-ms-correlation-request-id": [ "fd070792-5507-4033-ab39-bc7dc66fe9a8" ], + "x-ms-routing-request-id": [ "ISRAELCENTRAL:20240206T121526Z:fd070792-5507-4033-ab39-bc7dc66fe9a8" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-MSEdge-Ref": [ "Ref A: B1B6F3F41B0245D7A2632154EF2BBF84 Ref B: MRS211050313051 Ref C: 2024-02-06T12:15:26Z" ], + "Date": [ "Tue, 06 Feb 2024 12:15:25 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "523" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/8c7a91db-cd41-43b6-af47-2e869654126d/offers/aumatics.azure_managedservices\",\"name\":\"aumatics.azure_managedservices\",\"type\":\"Microsoft.Marketplace/privateStores/collection/offers\",\"properties\":{\"uniqueOfferId\":\"aumatics.azure_managedservices\",\"specificPlanIdsLimitation\":null,\"eTag\":\"\\\"f3039b52-0000-0100-0000-65c222ad0000\\\"\",\"privateStoreId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"updateSuppressedDueIdempotence\":true}}", + "isContentBase64": false + } + }, + "Update-AzMarketplacePrivateStoreCollectionOffer+[NoContext]+UpdateExpanded+$GET+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/8c7a91db-cd41-43b6-af47-2e869654126d/offers/aumatics.azure_managedservices?api-version=2023-01-01+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/8c7a91db-cd41-43b6-af47-2e869654126d/offers/aumatics.azure_managedservices?api-version=2023-01-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "42" ], + "x-ms-client-request-id": [ "fe1fa2c4-ecf8-442b-988a-d6a1c25bc026" ], + "CommandName": [ "Update-AzMarketplacePrivateStoreCollectionOffer" ], + "FullCommandName": [ "Update-AzMarketplacePrivateStoreCollectionOffer_UpdateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.11", "Az.Marketplace/1.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Accept-Ranges": [ "bytes" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=71c5ecfca949e38fa6d8b6899df69a8bc1065f71ea6211c776e43d3b7b216b7d;Path=/;HttpOnly;Secure;Domain=main.prod.marketplaceprivatestore.azure.com", "ARRAffinitySameSite=71c5ecfca949e38fa6d8b6899df69a8bc1065f71ea6211c776e43d3b7b216b7d;Path=/;HttpOnly;SameSite=None;Secure;Domain=main.prod.marketplaceprivatestore.azure.com" ], + "x-ms-ratelimit-remaining-tenant-reads": [ "11996" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-XSS-Protection": [ "1; mode=block" ], + "x-ms-version": [ "6.0.02586.90-5c77bed2" ], + "X-AspNet-Version": [ "4.0.30319" ], + "X-Powered-By": [ "ASP.NET" ], + "x-azure-ref": [ "20240206T121526Z-e9fr18rg4936d7qwr39u9d2ats00000002x0000000007tbw" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "x-ms-request-id": [ "f9aa39ce-0d10-4ea4-a57d-6d81e9cb74a3" ], + "x-ms-correlation-request-id": [ "f9aa39ce-0d10-4ea4-a57d-6d81e9cb74a3" ], + "x-ms-routing-request-id": [ "ISRAELCENTRAL:20240206T121527Z:f9aa39ce-0d10-4ea4-a57d-6d81e9cb74a3" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-MSEdge-Ref": [ "Ref A: E8A95918DC0A4607B9578023592E9892 Ref B: MRS211050313051 Ref C: 2024-02-06T12:15:26Z" ], + "Date": [ "Tue, 06 Feb 2024 12:15:26 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "524" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/8c7a91db-cd41-43b6-af47-2e869654126d/offers/aumatics.azure_managedservices\",\"name\":\"aumatics.azure_managedservices\",\"type\":\"Microsoft.Marketplace/privateStores/collection/offers\",\"properties\":{\"uniqueOfferId\":\"aumatics.azure_managedservices\",\"specificPlanIdsLimitation\":null,\"eTag\":\"\\\"f3039b52-0000-0100-0000-65c222ad0000\\\"\",\"privateStoreId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"updateSuppressedDueIdempotence\":false}}", + "isContentBase64": false + } + }, + "Update-AzMarketplacePrivateStoreCollectionOffer+[NoContext]+UpdateExpanded+$PUT+https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/8c7a91db-cd41-43b6-af47-2e869654126d/offers/aumatics.azure_managedservices?api-version=2023-01-01+3": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/8c7a91db-cd41-43b6-af47-2e869654126d/offers/aumatics.azure_managedservices?api-version=2023-01-01", + "Content": "{\r\n \"properties\": {\r\n \"eTag\": \"\\\"f3039b52-0000-0100-0000-65c222ad0000\\\"\",\r\n \"updateSuppressedDueIdempotence\": false\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "130" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Accept-Ranges": [ "bytes" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=a3053b2a1619a6aa4b0e7e497e4fa01864cd730cd9c257837f8a0036d6c79b63;Path=/;HttpOnly;Secure;Domain=main.prod.marketplaceprivatestore.azure.com", "ARRAffinitySameSite=a3053b2a1619a6aa4b0e7e497e4fa01864cd730cd9c257837f8a0036d6c79b63;Path=/;HttpOnly;SameSite=None;Secure;Domain=main.prod.marketplaceprivatestore.azure.com" ], + "x-ms-ratelimit-remaining-tenant-writes": [ "1197" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-XSS-Protection": [ "1; mode=block" ], + "x-ms-version": [ "6.0.02586.90-5c77bed2" ], + "X-AspNet-Version": [ "4.0.30319" ], + "X-Powered-By": [ "ASP.NET" ], + "x-azure-ref": [ "20240206T121527Z-un93fkbvw50w5bbm67x1677wk800000009c0000000008mxd" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "x-ms-request-id": [ "0f6b58e5-5866-4ef1-b4f5-d82ba8f89c8c" ], + "x-ms-correlation-request-id": [ "0f6b58e5-5866-4ef1-b4f5-d82ba8f89c8c" ], + "x-ms-routing-request-id": [ "ISRAELCENTRAL:20240206T121529Z:0f6b58e5-5866-4ef1-b4f5-d82ba8f89c8c" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-MSEdge-Ref": [ "Ref A: 1DD883D762D84B88B62413A63072F4FD Ref B: MRS211050313051 Ref C: 2024-02-06T12:15:27Z" ], + "Date": [ "Tue, 06 Feb 2024 12:15:28 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "523" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/providers/Microsoft.Marketplace/privateStores/a260d38c-96cf-492d-a340-404d0c4b3ad6/collections/8c7a91db-cd41-43b6-af47-2e869654126d/offers/aumatics.azure_managedservices\",\"name\":\"aumatics.azure_managedservices\",\"type\":\"Microsoft.Marketplace/privateStores/collection/offers\",\"properties\":{\"uniqueOfferId\":\"aumatics.azure_managedservices\",\"specificPlanIdsLimitation\":null,\"eTag\":\"\\\"f3039b52-0000-0100-0000-65c222ad0000\\\"\",\"privateStoreId\":\"a260d38c-96cf-492d-a340-404d0c4b3ad6\",\"updateSuppressedDueIdempotence\":true}}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Marketplace/Marketplace.Autorest/test/Update-AzMarketplacePrivateStoreCollectionOffer.Tests.ps1 b/src/Marketplace/Marketplace.Autorest/test/Update-AzMarketplacePrivateStoreCollectionOffer.Tests.ps1 new file mode 100644 index 000000000000..bbbb89c41ffe --- /dev/null +++ b/src/Marketplace/Marketplace.Autorest/test/Update-AzMarketplacePrivateStoreCollectionOffer.Tests.ps1 @@ -0,0 +1,26 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzMarketplacePrivateStoreCollectionOffer')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzMarketplacePrivateStoreCollectionOffer.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Update-AzMarketplacePrivateStoreCollectionOffer' { + It 'UpdateExpanded' { + + $acc = @{Accessibility = "azure_managedservices_professional"} + New-AzMarketplacePrivateStoreCollectionOffer -CollectionId 8c7a91db-cd41-43b6-af47-2e869654126d -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -OfferId aumatics.azure_managedservices -Plan $acc + + $res = Update-AzMarketplacePrivateStoreCollectionOffer -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -CollectionId 8c7a91db-cd41-43b6-af47-2e869654126d -OfferId "aumatics.azure_managedservices" -SpecificPlanIdLimitation $null + $res | Should -Not -Be $null + } +} diff --git a/src/Marketplace/Marketplace.Autorest/test/env.json b/src/Marketplace/Marketplace.Autorest/test/env.json index 589ff4794a82..5449d556b770 100644 --- a/src/Marketplace/Marketplace.Autorest/test/env.json +++ b/src/Marketplace/Marketplace.Autorest/test/env.json @@ -1,4 +1,4 @@ { "Tenant": "a260d38c-96cf-492d-a340-404d0c4b3ad6", - "SubscriptionId": "1052ff5a-aa43-4ca1-bd18-010399494ce5" + "SubscriptionId": "1f58b5dd-313c-42ed-84fc-f1e351bba7fb" } diff --git a/src/Marketplace/Marketplace.Autorest/test/utils.ps1 b/src/Marketplace/Marketplace.Autorest/test/utils.ps1 index 677e4652157b..ce2b0d417c4d 100644 --- a/src/Marketplace/Marketplace.Autorest/test/utils.ps1 +++ b/src/Marketplace/Marketplace.Autorest/test/utils.ps1 @@ -20,8 +20,11 @@ function setupEnv() { $env.Tenant = (Get-AzContext).Tenant.Id # For any resources you created for test, you should add it to $env here. $envFile = 'env.json' - Connect-AzAccount -UseDeviceAuthentication -SubscriptionId 1052ff5a-aa43-4ca1-bd18-010399494ce5 - New-AzMarketplacePrivateStoreCollection -CollectionName test1 -CollectionId 8c7a91db-cd41-43b6-af47-2e869654126d -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -SubscriptionsList 1052ff5a-aa43-4ca1-bd18-010399494ce5 + #Connect-AzAccount -UseDeviceAuthentication -Tenant a260d38c-96cf-492d-a340-404d0c4b3ad6 + #ApproveAllItemsCollection + New-AzMarketplacePrivateStoreCollection -CollectionName AllItemsPWRTest1 -CollectionId fdb889a1-cf3e-49f0-95b8-2bb012fa0188 -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -SubscriptionsList 1052ff5a-aa43-4ca1-bd18-010399494ce5 + #CopyOfferCollection + New-AzMarketplacePrivateStoreCollection -CollectionName CopyPWRTest1 -CollectionId 8c7a91db-cd41-43b6-af47-2e869654126d -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -SubscriptionsList 1052ff5a-aa43-4ca1-bd18-010399494ce5 if ($TestMode -eq 'live') { $envFile = 'localEnv.json' } @@ -29,8 +32,8 @@ function setupEnv() { } function cleanupEnv() { # Clean resources you create for testing - Remove-AzMarketplacePrivateStoreCollection -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -CollectionId fdb889a1-cf3e-49f0-95b8-2bb012fa01f1 - Remove-AzMarketplacePrivateStoreCollection -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -CollectionId 7f5402e4-e8f4-46bd-9bd1-8d27866a6065 + #Remove-AzMarketplacePrivateStoreCollection -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -CollectionId fdb889a1-cf3e-49f0-95b8-2bb012fa01f1 + #Remove-AzMarketplacePrivateStoreCollection -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -CollectionId 7f5402e4-e8f4-46bd-9bd1-8d27866a6065 Remove-AzMarketplacePrivateStoreCollection -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -CollectionId fdb889a1-cf3e-49f0-95b8-2bb012fa0188 Remove-AzMarketplacePrivateStoreCollection -PrivateStoreId a260d38c-96cf-492d-a340-404d0c4b3ad6 -CollectionId 8c7a91db-cd41-43b6-af47-2e869654126d }