Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

PolicyInsights

see https://aka.ms/autorest

This is the AutoRest configuration file for PolicyInsights.


Getting Started

To build the SDK for PolicyInsights, 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 PolicyInsights API.

title: PolicyInsightsClient
openapi-type: arm
tag: package-2018-07

Validations

Run validations when --validate is specified on command line

azure-validator: true
semantic-validator: true
model-validator: true
message-format: json

Suppression

directive:
  - suppress: EnumInsteadOfBoolean
    reason: The data type in store is boolean. If we change the type in RP, it will break existing clients, and we will incur runtime conversion cost.
    where:
      - $.definitions.PolicyEvent.properties.isCompliant
      - $.definitions.PolicyState.properties.isCompliant

  - suppress: NonApplicationJsonType
    reason: ODATA $metadata endpoint for each resource type returns metadata document as XML.
    where:
      - $.paths["/{scope}/providers/Microsoft.PolicyInsights/policyEvents/$metadata"].get.produces[0]
      - $.paths["/{scope}/providers/Microsoft.PolicyInsights/policyStates/$metadata"].get.produces[0]

Tag: package-2018-07

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

input-file:
- Microsoft.PolicyInsights/preview/2018-07-01-preview/policyTrackedResources.json
- Microsoft.PolicyInsights/preview/2018-07-01-preview/remediations.json
- Microsoft.PolicyInsights/stable/2018-04-04/policyEvents.json
- Microsoft.PolicyInsights/preview/2018-07-01-preview/policyStates.json

Tag: package-2018-04

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

input-file:
- Microsoft.PolicyInsights/stable/2018-04-04/policyEvents.json
- Microsoft.PolicyInsights/stable/2018-04-04/policyStates.json

Tag: package-2017-12

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

input-file:
- Microsoft.PolicyInsights/preview/2017-12-12-preview/policyEvents.json
- Microsoft.PolicyInsights/preview/2017-12-12-preview/policyStates.json

Tag: package-2017-10

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

input-file:
- Microsoft.PolicyInsights/preview/2017-10-17-preview/policyEvents.json
- Microsoft.PolicyInsights/preview/2017-10-17-preview/policyStates.json

Tag: package-2017-08

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

input-file:
- Microsoft.PolicyInsights/preview/2017-08-09-preview/policyEvents.json
- Microsoft.PolicyInsights/preview/2017-08-09-preview/policyStates.json

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-python
  - repo: azure-sdk-for-java
  - repo: azure-sdk-for-go
  - repo: azure-sdk-for-js
  - repo: azure-sdk-for-node

C#

These settings apply only when --csharp is specified on the command line. Please also specify --csharp-sdks-folder=<path to "SDKs" directory of your azure-sdk-for-net clone>.

csharp:
  azure-arm: true
  license-header: MICROSOFT_MIT_NO_VERSION
  namespace: Microsoft.Azure.Management.PolicyInsights
  output-folder: $(csharp-sdks-folder)/PolicyInsights/Management/Management.PolicyInsights/Generated
  clear-output-folder: true

Python

These settings apply only when --python is specified on the command line. Please also specify --python-sdks-folder=<path to the root directory of your azure-sdk-for-python clone>. Use --python-mode=update if you already have a setup.py and just want to update the code itself.

python-mode: create
python:
  azure-arm: true
  license-header: MICROSOFT_MIT_NO_VERSION
  payload-flattening-threshold: 2
  namespace: azure.mgmt.policyinsights
  package-name: azure-mgmt-policyinsights
  clear-output-folder: true
python:
  no-namespace-folders: true
  output-folder: $(python-sdks-folder)/azure-mgmt-policyinsights/azure/mgmt/policyinsights
python:
  basic-setup-py: true
  output-folder: $(python-sdks-folder)/azure-mgmt-policyinsights

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.policyinsights
license-header: MICROSOFT_MIT_NO_CODEGEN
payload-flattening-threshold: 1
output-folder: $(azure-libraries-for-java-folder)/azure-mgmt-policyinsights

Java multi-api

batch:
  - tag: package-2018-07
  - tag: package-2018-04

Tag: package-2018-07 and java

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

java:
  namespace: com.microsoft.azure.management.policyinsights.v2018_07_01_preview
  output-folder: $(azure-libraries-for-java-folder)/policyinsights/resource-manager/v2018_07_01_preview
regenerate-manager: true
generate-interface: true

Tag: package-2018-04 and java

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

java:
  namespace: com.microsoft.azure.management.policyinsights.v2018_04_04
  output-folder: $(azure-libraries-for-java-folder)/policyinsights/resource-manager/v2018_04_04
regenerate-manager: true
generate-interface: true