Skip to content

Commit 699762e

Browse files
authored
add README file for cost management (#3321)
1 parent fd89b6a commit 699762e

File tree

1 file changed

+155
-0
lines changed
  • specification/cost-management/resource-manager

1 file changed

+155
-0
lines changed
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
# CostManagement
2+
3+
> see https://aka.ms/autorest
4+
5+
This is the AutoRest configuration file for Cost Management.
6+
7+
---
8+
## Getting Started
9+
To build the SDK for Cost Management, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run:
10+
11+
> `autorest`
12+
13+
To see additional help and options, run:
14+
15+
> `autorest --help`
16+
---
17+
18+
## Configuration
19+
20+
### Basic Information
21+
These are the global settings for the Cost Management API.
22+
23+
``` yaml
24+
openapi-type: arm
25+
tag: package-2018-05
26+
```
27+
28+
---
29+
### Tag: package-2018-05
30+
31+
These settings apply only when `--tag=package-2018-05` is specified on the command line.
32+
33+
``` yaml $(tag) == 'package-2018-05'
34+
input-file:
35+
- Microsoft.CostManagement/stable/2018-05-31/costmanagement.json
36+
```
37+
38+
---
39+
# Code Generation
40+
41+
## Swagger to SDK
42+
43+
This section describes what SDK should be generated by the automatic system.
44+
This is not used by Autorest itself.
45+
46+
``` yaml $(swagger-to-sdk)
47+
swagger-to-sdk:
48+
- repo: azure-sdk-for-go
49+
- repo: azure-sdk-for-python
50+
- repo: azure-sdk-for-node
51+
- repo: azure-sdk-for-ruby
52+
after_scripts:
53+
- bundle install && rake arm:regen_all_profiles['azure_mgmt_costmanagement']
54+
```
55+
56+
## C#
57+
58+
These settings apply only when `--csharp` is specified on the command line.
59+
Please also specify `--csharp-sdks-folder=<path to "SDKs" directory of your azure-sdk-for-net clone>`.
60+
61+
``` yaml $(csharp)
62+
csharp:
63+
azure-arm: true
64+
license-header: MICROSOFT_MIT_NO_VERSION
65+
namespace: Microsoft.Azure.Management.CostManagement
66+
output-folder: $(csharp-sdks-folder)/CostManagement/Management.CostManagement/Generated
67+
clear-output-folder: true
68+
```
69+
70+
## Python
71+
72+
These settings apply only when `--python` is specified on the command line.
73+
Please also specify `--python-sdks-folder=<path to the root directory of your azure-sdk-for-python clone>`.
74+
Use `--python-mode=update` if you already have a setup.py and just want to update the code itself.
75+
76+
``` yaml $(python)
77+
python-mode: create
78+
python:
79+
azure-arm: true
80+
license-header: MICROSOFT_MIT_NO_VERSION
81+
payload-flattening-threshold: 2
82+
namespace: azure.mgmt.costmanagement
83+
package-name: azure-mgmt-costmanagement
84+
package-version: 1.2.0
85+
clear-output-folder: true
86+
```
87+
``` yaml $(python) && $(python-mode) == 'update'
88+
python:
89+
no-namespace-folders: true
90+
output-folder: $(python-sdks-folder)/azure-mgmt-costmanagement/azure/mgmt/costmanagement
91+
```
92+
``` yaml $(python) && $(python-mode) == 'create'
93+
python:
94+
basic-setup-py: true
95+
output-folder: $(python-sdks-folder)/azure-mgmt-costmanagement
96+
```
97+
98+
## Go
99+
100+
These settings apply only when `--go` is specified on the command line.
101+
102+
``` yaml $(go)
103+
go:
104+
license-header: MICROSOFT_APACHE_NO_VERSION
105+
namespace: costmanagement
106+
clear-output-folder: true
107+
```
108+
109+
### Go multi-api
110+
``` yaml $(go) && $(multiapi)
111+
batch:
112+
- tag: package-2018-05
113+
```
114+
115+
### Tag: package-2018-05 and go
116+
These settings apply only when `--tag=package-2018-05 --go` is specified on the command line.
117+
Please also specify `--go-sdk-folder=<path to the root directory of your azure-sdk-for-go clone>`.
118+
119+
``` yaml $(tag) == 'package-2018-05' && $(go)
120+
output-folder: $(go-sdk-folder)/services/$(namespace)/mgmt/2018-05-31/$(namespace)
121+
```
122+
123+
## Java
124+
125+
These settings apply only when `--java` is specified on the command line.
126+
Please also specify `--azure-libraries-for-java-folder=<path to the root directory of your azure-libraries-for-java clone>`.
127+
128+
``` yaml $(java)
129+
azure-arm: true
130+
fluent: true
131+
namespace: com.microsoft.azure.management.costmanagement
132+
license-header: MICROSOFT_MIT_NO_CODEGEN
133+
payload-flattening-threshold: 1
134+
output-folder: $(azure-libraries-for-java-folder)/azure-mgmt-costmanagement
135+
```
136+
137+
### Java multi-api
138+
139+
``` yaml $(java) && $(multiapi)
140+
batch:
141+
- tag: package-2018-05
142+
```
143+
144+
### Tag: package-2018-05 and java
145+
146+
These settings apply only when `--tag=package-2018-05 --java` is specified on the command line.
147+
Please also specify `--azure-libraries-for-java=<path to the root directory of your azure-sdk-for-java clone>`.
148+
149+
``` yaml $(tag) == 'package-2018-05' && $(java) && $(multiapi)
150+
java:
151+
namespace: com.microsoft.azure.management.costmanagement.v2018_05_31
152+
output-folder: $(azure-libraries-for-java-folder)/costmanagement/resource-manager/v2018_05_31
153+
regenerate-manager: true
154+
generate-interface: true
155+
```

0 commit comments

Comments
 (0)