Skip to content
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
{
"swagger": "2.0",
"info": {
"title": "AuthorizationManagementClient",
"version": "2015-07-01",
"description": "Role based access control provides you a way to apply granular level policy administration down to individual resources or resource groups. These operations enable you to manage role definitions and role assignments. A role definition describes the set of actions that can be performed on resources. A role assignment grants access to Azure Active Directory users."
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json",
"text/json"
],
"produces": [
"application/json",
"text/json"
],
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"paths": {
"/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/classicAdministrators": {
"get": {
"tags": [
"ClassicAdministrators"
],
"operationId": "ClassicAdministrators_List",
"description": "Gets service administrator, account administrator, and co-administrators for the subscription.",
"parameters": [
{
"name": "api-version",
"in": "query",
"required": true,
"type": "string",
"description": "The API version to use for this operation."
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Returns an array of administrators.",
"schema": {
"$ref": "#/definitions/ClassicAdministratorListResult"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"GetConfigurations": {
"$ref": "./examples/GetClassicAdministrators.json"
}
}
}
}
},
"definitions": {
"ClassicAdministratorProperties": {
"properties": {
"emailAddress": {
"type": "string",
"description": "The email address of the administrator."
},
"role": {
"type": "string",
"description": "The role of the administrator."
}
},
"description": "Classic Administrator properties."
},
"ClassicAdministrator": {
"properties": {
"id": {
"type": "string",
"description": "The ID of the administrator."
},
"name": {
"type": "string",
"description": "The name of the administrator."
},
"type": {
"type": "string",
"description": "The type of the administrator."
},
"properties": {
"$ref": "#/definitions/ClassicAdministratorProperties",
"description": "Properties for the classic administrator."
}
},
"description": "Classic Administrators"
},
"ClassicAdministratorListResult": {
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/ClassicAdministrator"
},
"description": "An array of administrators."
},
"nextLink": {
"type": "string",
"description": "The URL to use for getting the next set of results."
}
},
"description": "ClassicAdministrator list result information."
}
},
"parameters": {
"SubscriptionIdParameter": {
"name": "subscriptionId",
"in": "path",
"required": true,
"type": "string",
"description": "The ID of the target subscription."
},
"ApiVersionParameter": {
"name": "api-version",
"in": "query",
"required": true,
"type": "string",
"description": "The API version to use for this operation."
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,43 +36,6 @@
}
},
"paths": {
"/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/classicAdministrators": {
"get": {
"tags": [
"ClassicAdministrators"
],
"operationId": "ClassicAdministrators_List",
"description": "Gets service administrator, account administrator, and co-administrators for the subscription.",
"parameters": [
{
"name": "api-version",
"in": "query",
"required": true,
"type": "string",
"description": "The API version to use for this operation."
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Returns an array of administrators.",
"schema": {
"$ref": "#/definitions/ClassicAdministratorListResult"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"GetConfigurations": {
"$ref": "./examples/GetClassicAdministrators.json"
}
}
}
},
"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Authorization/permissions": {
"get": {
"tags": [
Expand Down Expand Up @@ -959,56 +922,6 @@
},
"description": "Role Definitions filter"
},
"ClassicAdministratorProperties": {
"properties": {
"emailAddress": {
"type": "string",
"description": "The email address of the administrator."
},
"role": {
"type": "string",
"description": "The role of the administrator."
}
},
"description": "Classic Administrator properties."
},
"ClassicAdministrator": {
"properties": {
"id": {
"type": "string",
"description": "The ID of the administrator."
},
"name": {
"type": "string",
"description": "The name of the administrator."
},
"type": {
"type": "string",
"description": "The type of the administrator."
},
"properties": {
"$ref": "#/definitions/ClassicAdministratorProperties",
"description": "Properties for the classic administrator."
}
},
"description": "Classic Administrators"
},
"ClassicAdministratorListResult": {
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/ClassicAdministrator"
},
"description": "An array of administrators."
},
"nextLink": {
"type": "string",
"description": "The URL to use for getting the next set of results."
}
},
"description": "ClassicAdministrator list result information."
},
"Permission": {
"properties": {
"actions": {
Expand Down
40 changes: 12 additions & 28 deletions specification/authorization/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,16 @@ These settings apply only when `--tag=package-2015-07` is specified on the comma
``` yaml $(tag) == 'package-2015-07'
input-file:
- Microsoft.Authorization/stable/2015-07-01/authorization.json
- Microsoft.Authorization/stable/2015-07-01/authorization-ClassicAdminCalls.json
```

### Tag: package-2015-07-authorization-only

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

``` yaml $(tag) == 'package-2015-07-authorization-only'
input-file:
- Microsoft.Authorization/stable/2015-07-01/authorization.json
```

### Tag: package-2015-06-01-preview
Expand Down Expand Up @@ -117,6 +127,8 @@ This is not used by Autorest itself.
``` yaml $(swagger-to-sdk)
swagger-to-sdk:
- repo: azure-sdk-for-python
after_scripts:
- python ./scripts/multiapi_init_gen.py azure-mgmt-authorization
- repo: azure-sdk-for-java
- repo: azure-sdk-for-go
- repo: azure-sdk-for-node
Expand All @@ -125,34 +137,6 @@ swagger-to-sdk:
- bundle install && rake arm:regen_all_profiles['azure_mgmt_authorization']
```

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

``` yaml $(python)
python-mode: create
python:
azure-arm: true
license-header: MICROSOFT_MIT_NO_VERSION
payload-flattening-threshold: 2
namespace: azure.mgmt.authorization
package-name: azure-mgmt-authorization
package-version: 0.40.0
clear-output-folder: true
```
``` yaml $(python) && $(python-mode) == 'update'
python:
no-namespace-folders: true
output-folder: $(python-sdks-folder)/azure-mgmt-authorization/azure/mgmt/authorization
```
``` yaml $(python) && $(python-mode) == 'create'
python:
basic-setup-py: true
output-folder: $(python-sdks-folder)/azure-mgmt-authorization
```

## Go

These settings apply only when `--go` is specified on the command line.
Expand Down
57 changes: 57 additions & 0 deletions specification/authorization/resource-manager/readme.python.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
## 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.

``` yaml $(python)
python-mode: create
python:
azure-arm: true
license-header: MICROSOFT_MIT_NO_VERSION
payload-flattening-threshold: 2
package-name: azure-mgmt-authorization
clear-output-folder: true
no-namespace-folders: true
```

### Python multi-api

Generate all API versions currently shipped for this package

```yaml $(python) && $(multiapi)
batch:
- tag: package-2018-01-01-preview-only
- tag: package-2015-07-authorization-only
- tag: package-2015-06-01-preview
```

### Tag: package-2018-01-01-preview-only and python

These settings apply only when `--tag=package-2018-01-01-preview-only --python` is specified on the command line.

``` yaml $(tag) == 'package-2018-01-01-preview-only' && $(python)
python:
namespace: azure.mgmt.authorization.v2018_01_01_preview
output-folder: $(python-sdks-folder)/azure-mgmt-authorization/azure/mgmt/authorization/v2018_01_01_preview
```

### Tag: package-2015-07-authorization-only and python

These settings apply only when `--tag=package-2015-07-authorization-only --python` is specified on the command line.

``` yaml $(tag) == 'package-2015-07-authorization-only' && $(python)
python:
namespace: azure.mgmt.authorization.v2015_07_01
output-folder: $(python-sdks-folder)/azure-mgmt-authorization/azure/mgmt/authorization/v2015_07_01
```

### Tag: 2015-06-01-preview and python

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

``` yaml $(tag) == 'package-2015-06-01-preview' && $(python)
python:
namespace: azure.mgmt.authorization.v2015_06_01
output-folder: $(python-sdks-folder)/azure-mgmt-authorization/azure/mgmt/authorization/v2015_06_01
```