Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[MarketplaceOrdering] release Api 2021-01-01 version. #19389

Merged
merged 5 commits into from
Sep 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/MarketplaceOrdering/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
16 changes: 16 additions & 0 deletions src/MarketplaceOrdering/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
bin
obj
.vs
generated
internal
exports
tools
custom/*.psm1
custom/autogen-model-cmdlets
test/*-TestResults.xml
/*.ps1
/*.ps1xml
/*.psm1
/*.snk
/*.csproj
/*.nuspec
24 changes: 24 additions & 0 deletions src/MarketplaceOrdering/Az.MarketplaceOrdering.psd1
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
@{
GUID = 'f781d2f9-c4c6-4d0b-bcfb-26973544c41d'
RootModule = './Az.MarketplaceOrdering.psm1'
ModuleVersion = '0.1.0'
CompatiblePSEditions = 'Core', 'Desktop'
Author = 'Microsoft Corporation'
CompanyName = 'Microsoft Corporation'
Copyright = 'Microsoft Corporation. All rights reserved.'
Description = 'Microsoft Azure PowerShell: MarketplaceOrdering cmdlets'
PowerShellVersion = '5.1'
DotNetFrameworkVersion = '4.7.2'
RequiredAssemblies = './bin/Az.MarketplaceOrdering.private.dll'
FormatsToProcess = './Az.MarketplaceOrdering.format.ps1xml'
FunctionsToExport = 'Get-AzMarketplaceTerms', 'Invoke-AzMarketplaceSignTerms', 'Set-AzMarketplaceTerms', 'Stop-AzMarketplaceTerms', '*'
AliasesToExport = '*'
PrivateData = @{
PSData = @{
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'MarketplaceOrdering'
LicenseUri = 'https://aka.ms/azps-license'
ProjectUri = 'https://github.com/Azure/azure-powershell'
ReleaseNotes = ''
}
}
}
160 changes: 160 additions & 0 deletions src/MarketplaceOrdering/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
<!-- region Generated -->
# Az.MarketplaceOrdering
This directory contains the PowerShell module for the MarketplaceOrdering service.

---
## Status
[![Az.MarketplaceOrdering](https://img.shields.io/powershellgallery/v/Az.MarketplaceOrdering.svg?style=flat-square&label=Az.MarketplaceOrdering "Az.MarketplaceOrdering")](https://www.powershellgallery.com/packages/Az.MarketplaceOrdering/)

## Info
- Modifiable: yes
- Generated: all
- Committed: yes
- Packaged: yes

---
## Detail
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.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.

## Development
For information on how to develop for `Az.MarketplaceOrdering`, see [how-to.md](how-to.md).
<!-- endregion -->

### AutoRest Configuration
> see https://aka.ms/autorest

``` yaml
branch: ee9fe9888e8d4e5a583e275c4c35deff6c6f96e0
require:
- $(this-folder)/../readme.azure.noprofile.md
input-file:
- $(repo)/specification/marketplaceordering/resource-manager/Microsoft.MarketplaceOrdering/stable/2021-01-01/Agreements.json

title: MarketplaceOrdering
subject-prefix: Marketplace

identity-correction-for-post: true
nested-object-to-string: true
inlining-threshold: 50

directive:
- where:
subject: MarketplaceAgreement
set:
subject: MarketplaceTerms

- where:
subject: SignMarketplaceAgreement
set:
subject: SignTerms

- where:
subject: ^MarketplaceTerms$
variant: ^CreateExpanded$|^CreateViaIdentity$|^CreateViaIdentityExpanded$
remove: true

# List response not mapp swagger define.
- where:
verb: Get
subject: MarketplaceTerms
variant: ^List$|^GetViaIdentity1$|^GetViaIdentity$
remove: true

# For map old cmdlet
- where:
verb: Get|Stop
subject: MarketplaceTerms
parameter-name: OfferId
set:
parameter-name: Product

- where:
verb: Get|Stop
subject: MarketplaceTerms
parameter-name: PublisherId
set:
parameter-name: Publisher

- where:
verb: Get|Stop
subject: MarketplaceTerms
parameter-name: PlanId
set:
parameter-name: Name

- where:
verb: Get
subject: MarketplaceTerms
hide: true

- where:
verb: New
subject: MarketplaceTerms
set:
verb: Set

- where:
verb: Set
subject: MarketplaceTerms
parameter-name: OfferId
set:
parameter-name: Product

- where:
verb: Set
subject: MarketplaceTerms
parameter-name: PublisherId
set:
parameter-name: Publisher

- where:
verb: Set
subject: MarketplaceTerms
parameter-name: PlanId
set:
parameter-name: Name

- where:
verb: Set
subject: MarketplaceTerms
hide: true

- where:
verb: Invoke
subject: SignTerms
parameter-name: OfferId
set:
parameter-name: Product

- where:
verb: Invoke
subject: SignTerms
parameter-name: PublisherId
set:
parameter-name: Publisher

- where:
verb: Invoke
subject: SignTerms
parameter-name: PlanId
set:
parameter-name: Name

- where:
model-name: AgreementTerms
set:
format-table:
properties:
- Name
- Product
- Publisher
- Accepted
- Signature
- PrivacyPolicyLink
```
180 changes: 180 additions & 0 deletions src/MarketplaceOrdering/custom/Get-AzMarketplaceTerms.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@

# ----------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
# is regenerated.
# ----------------------------------------------------------------------------------

<#
.Synopsis
Get marketplace terms.
.Description
Get marketplace terms.
.Example
{{ Add code here }}
.Example
{{ Add code here }}

.Inputs
Microsoft.Azure.PowerShell.Cmdlets.MarketplaceOrdering.Models.IMarketplaceOrderingIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.MarketplaceOrdering.Models.Api202101.IAgreementTerms
.Notes
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 <IMarketplaceOrderingIdentity>: Identity Parameter
[Id <String>]: Resource identity path
[OfferId <String>]: Offer identifier string of image being deployed.
[OfferType <OfferType?>]: Offer Type, currently only virtualmachine type is supported.
[PlanId <String>]: Plan identifier string of image being deployed.
[PublisherId <String>]: Publisher identifier string of image being deployed.
[SubscriptionId <String>]: The subscription ID that identifies an Azure subscription.
.Link
https://docs.microsoft.com/powershell/module/az.marketplaceordering/get-azmarketplaceterms
#>
function Get-AzMarketplaceTerms {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.MarketplaceOrdering.Models.Api202101.IAgreementTerms])]
[CmdletBinding(DefaultParameterSetName='Get1', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
[Parameter(ParameterSetName='Get1', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.MarketplaceOrdering.Category('Path')]
[System.String]
# Plan identifier string of image being deployed.
${Name},

[Parameter(ParameterSetName='Get', Mandatory)]
[Parameter(ParameterSetName='Get1', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.MarketplaceOrdering.Category('Path')]
[System.String]
# Offer identifier string of image being deployed.
${Product},

[Parameter(ParameterSetName='Get', Mandatory)]
[Parameter(ParameterSetName='Get1', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.MarketplaceOrdering.Category('Path')]
[System.String]
# Publisher identifier string of image being deployed.
${Publisher},

[Parameter(ParameterSetName='Get', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.MarketplaceOrdering.Category('Path')]
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.MarketplaceOrdering.Support.OfferType])]
[Microsoft.Azure.PowerShell.Cmdlets.MarketplaceOrdering.Support.OfferType]
# Publisher identifier string of image being deployed.
${OfferType},

[Parameter(ParameterSetName='Get')]
[Parameter(ParameterSetName='Get1')]
[Microsoft.Azure.PowerShell.Cmdlets.MarketplaceOrdering.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.MarketplaceOrdering.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String[]]
# The subscription ID that identifies an Azure subscription.
${SubscriptionId},

[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.MarketplaceOrdering.Category('Azure')]
[System.Management.Automation.PSObject]
# The credentials, account, tenant, and subscription used for communication with Azure.
${DefaultProfile},

[Parameter(DontShow)]
[Microsoft.Azure.PowerShell.Cmdlets.MarketplaceOrdering.Category('Runtime')]
[System.Management.Automation.SwitchParameter]
# Wait for .NET debugger to attach
${Break},

[Parameter(DontShow)]
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.MarketplaceOrdering.Category('Runtime')]
[Microsoft.Azure.PowerShell.Cmdlets.MarketplaceOrdering.Runtime.SendAsyncStep[]]
# SendAsync Pipeline Steps to be appended to the front of the pipeline
${HttpPipelineAppend},

[Parameter(DontShow)]
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.MarketplaceOrdering.Category('Runtime')]
[Microsoft.Azure.PowerShell.Cmdlets.MarketplaceOrdering.Runtime.SendAsyncStep[]]
# SendAsync Pipeline Steps to be prepended to the front of the pipeline
${HttpPipelinePrepend},

[Parameter(DontShow)]
[Microsoft.Azure.PowerShell.Cmdlets.MarketplaceOrdering.Category('Runtime')]
[System.Uri]
# The URI for the proxy server to use
${Proxy},

[Parameter(DontShow)]
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.MarketplaceOrdering.Category('Runtime')]
[System.Management.Automation.PSCredential]
# Credentials for a proxy server to use for the remote call
${ProxyCredential},

[Parameter(DontShow)]
[Microsoft.Azure.PowerShell.Cmdlets.MarketplaceOrdering.Category('Runtime')]
[System.Management.Automation.SwitchParameter]
# Use the default credentials for the proxy
${ProxyUseDefaultCredentials}
)

begin {
try {
$outBuffer = $null
if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
if ($PSBoundParameters.ContainsKey('OfferType')) {
$null = $PSBoundParameters.Remove('OfferType')
}
$mapping = @{
Get = 'Az.MarketplaceOrdering.private\Get-AzMarketplaceTerms_Get';
Get1 = 'Az.MarketplaceOrdering.private\Get-AzMarketplaceTerms_Get1';
}
if (('Get', 'Get1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
}

$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
} catch {

throw
}
}

process {
try {
$steppablePipeline.Process($_)
} catch {

throw
}

}
end {
try {
$steppablePipeline.End()

} catch {

throw
}
}
}
Loading