Skip to content

Latest commit

 

History

History
165 lines (110 loc) · 4.34 KB

File metadata and controls

165 lines (110 loc) · 4.34 KB

Marketplace Agreements API

see https://aka.ms/autorest

The underlying APIs are available to users who would like to write their own REST calls. These APIs would allow the user to accept the terms at a subscription, offer and SKU level. These apis are invoked in the context of azure subscription.


GetAzureRmMarketplaceTerms

Request

This api returns the latest terms for a given Subscription, Publisher, Product and Name.

Reply

200 OK. Agreement Terms in response body.

SaveAzureRmMarketplaceTerms

Request

This api sends the license information retrieved by the first API along with Accepted flag which confirms that the terms are accepted(true) or not accepted(false).

Reply

  1. 200 OK. The request was successfully processed and the terms were accepted or acceptance revoked as per the request body.
  2. 400 Bad/Malformed request. E.g. Signature doesn’t match, please retrieve terms again and request acceptance.
  3. 403 Forbidden. E.g. The caller does not have permission to accept terms for given subscription. (only a reader).
  4. 404 E.g. The Publisher/Offer/Plan tuple is not a valid virtual machine.

Getting Started

To build the SDK for Marketplace Agreements, simply Install AutoRest and in this folder, run:

autorest

To see additional help and options, run:

autorest --help


Configuration

Basic Information

These are the global settings for the Marketplace Agreements API.

openapi-type: arm
tag: package-2021-01-01

Tag: package-2021-01-01

These settings apply only when --tag=package-2021-01-01 is specified on the command line.

input-file:
- Microsoft.MarketplaceOrdering/stable/2021-01-01/Agreements.json

Tag: package-2015-06-01

These settings apply only when --tag=package-2015-06-01 is specified on the command line.

input-file:
- Microsoft.MarketplaceOrdering/stable/2015-06-01/Agreements.json
directive:
  # suppress each RPC 3016 error
- where: $.definitions.UnsupportedMediaTypeErrorResponse.properties.Message
  suppress: R3016
  reason: This requires a change in code thats in production for several years

Code Generation

Swagger to SDK

This section describes what SDK should be generated by the automatic system. This is not used by Autorest itself.

swagger-to-sdk:
  - repo: azure-sdk-for-net-track2
  - repo: azure-sdk-for-python
  - repo: azure-sdk-for-go
  - repo: azure-sdk-for-js
  - repo: azure-sdk-for-node
  - repo: azure-sdk-for-ruby
    after_scripts:
      - bundle install && rake arm:regen_all_profiles['azure_mgmt_marketplace_ordering']
  - repo: azure-resource-manager-schemas
  - repo: azure-powershell

Python

See configuration in readme.python.md

Node.js

directive:
  - from: swagger-document
    where: $.definitions.AgreementProperties.properties.retrieveDatetime
    transform: delete $.format

TypeScript

directive:
  - from: swagger-document
    where: $.definitions.AgreementProperties.properties.retrieveDatetime
    transform: delete $.format

Go

See configuration in readme.go.md

Java

These settings apply only when --java is specified on the command line. Please also specify --azure-libraries-for-java-folder=<path to the root directory of your azure-libraries-for-java clone>.

azure-arm: true
fluent: true
namespace: com.microsoft.azure.management.marketplaceordering
license-header: MICROSOFT_MIT_NO_CODEGEN
payload-flattening-threshold: 1
output-folder: $(azure-libraries-for-java-folder)/azure-mgmt-marketplaceordering

Java multi-api

batch:
  - tag: package-2015-06-01

Tag: package-2015-06-01 and java

These settings apply only when --tag=package-2015-06-01 --java is specified on the command line. Please also specify --azure-libraries-for-java=<path to the root directory of your azure-sdk-for-java clone>.

java:
  namespace: com.microsoft.azure.management.marketplaceagreementsapi.v2015_06_01
  output-folder: $(azure-libraries-for-java-folder)/sdk/marketplaceagreementsapi/mgmt-v2015_06_01
regenerate-manager: true
generate-interface: true