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

Blueprints API update for excludedPrincipals and whoIsBlueprint #5470

Merged
merged 16 commits into from
Mar 28, 2019
Merged
Show file tree
Hide file tree
Changes from 13 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
Expand Up @@ -141,6 +141,36 @@
}
}
},
"/{scope}/providers/Microsoft.Blueprint/blueprintAssignments/{assignmentName}/WhoIsBlueprint": {
"post": {
"operationId": "Assignments_WhoIsBlueprint",
"description": "Get Blueprints service SPN objectId",
"x-ms-examples": {
"WhoIsBlueprint_Action": {
"$ref": "./examples/WhoIsBlueprint_Action.json"
}
},
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/ScopeParameter"
},
{
"$ref": "#/parameters/AssignmentNameParameter"
}
],
"responses": {
"200": {
"description": "Blueprints service SPN objectId",
"schema":{
"$ref": "#/definitions/WhoIsBlueprintContract"
}
}
}
}
},
"/{scope}/providers/Microsoft.Blueprint/blueprintAssignments": {
"get": {
"tags": [
Expand Down Expand Up @@ -293,6 +323,13 @@
"name": "AssignmentLockMode",
"modelAsString": true
}
},
"excludedPrincipals": {
filizt marked this conversation as resolved.
Show resolved Hide resolved
"type": "array",
"description": "List of AAD principals excluded from blueprint locks. Up to 5 principals are permitted.",
"items": {
"type": "string"
}
}
}
},
Expand Down Expand Up @@ -525,6 +562,15 @@
"description": "Last modified time of this blueprint definition."
}
}
},
"WhoIsBlueprintContract":{
filizt marked this conversation as resolved.
Show resolved Hide resolved
"description": "Response schema for querying the Azure Blueprints service principal in the tenant.",
"properties": {
"objectId": {
"type": "string",
"description": "AAD object Id of the Azure Blueprints service principal in the tenant."
}
}
}
},
"parameters": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -550,22 +550,22 @@
"description": "Get an artifact for a published blueprint definition.",
"x-ms-examples": {
"Sub-ARMTemplateArtifact": {
"$ref": "./examples/subscriptionBPDef/ARMTemplateArtifact_Get.json"
"$ref": "./examples/subscriptionBPDef/SealedARMTemplateArtifact_Get.json"
},
"Sub-PolicyAssignmentArtifact": {
"$ref": "./examples/subscriptionBPDef/PolicyAssignmentArtifact_Get.json"
"$ref": "./examples/subscriptionBPDef/SealedPolicyAssignmentArtifact_Get.json"
},
"Sub-RoleAssignmentArtifact": {
"$ref": "./examples/subscriptionBPDef/RoleAssignmentArtifact_Get.json"
"$ref": "./examples/subscriptionBPDef/SealedRoleAssignmentArtifact_Get.json"
},
"MG-ARMTemplateArtifact": {
"$ref": "./examples/managementGroupBPDef/ARMTemplateArtifact_Get.json"
"$ref": "./examples/managementGroupBPDef/SealedARMTemplateArtifact_Get.json"
},
"MG-PolicyAssignmentArtifact": {
"$ref": "./examples/managementGroupBPDef/PolicyAssignmentArtifact_Get.json"
"$ref": "./examples/managementGroupBPDef/SealedPolicyAssignmentArtifact_Get.json"
},
"MG-RoleAssignmentArtifact": {
"$ref": "./examples/managementGroupBPDef/RoleAssignmentArtifact_Get.json"
"$ref": "./examples/managementGroupBPDef/SealedRoleAssignmentArtifact_Get.json"
}
},
"parameters": [
Expand Down Expand Up @@ -817,14 +817,24 @@
},
"targetScope": {
"type": "string",
"description": "The scope where this blueprint definition can be assigned.",
"description": "The scope where this blueprint definition can be assigned. Management group is reserved for future use.",
"enum": [
"subscription",
"managementGroup"
],
"x-ms-enum": {
"name": "BlueprintTargetScope",
"modelAsString": true
"modelAsString": false,
"values": [
{
"value": "subscription",
"description": "The blueprint targets a subscription during blueprint assignment."
},
{
"value": "managementGroup",
"description": "The blueprint targets a management group during blueprint assignment. This is reserved for future use."
}
]
}
},
"parameters": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"parameters": {
"api-version": "2018-11-01-preview",
"scope": "subscriptions/{subscriptionId}",
"assignmentName": "assignSimpleBlueprint"
},
"responses": {
"200": {
"body": {
"objectId" : "00000000-0000-0000-0000-000000000000"
}
}
}
}
29 changes: 2 additions & 27 deletions specification/blueprint/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ This is not used by Autorest itself.
``` yaml $(swagger-to-sdk)
swagger-to-sdk:
- repo: azure-sdk-for-go
- repo: azure-sdk-for-node
- repo: azure-sdk-for-js
- repo: azure-sdk-for-python
```

Expand All @@ -82,32 +82,7 @@ csharp:

## 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.blueprint
package-name: azure-mgmt-blueprint
title: BlueprintManagementClient
description: The Blueprint Client.
clear-output-folder: true
```
``` yaml $(python) && $(python-mode) == 'update'
python:
no-namespace-folders: true
output-folder: $(python-sdks-folder)/azure-mgmt-blueprint/azure/mgmt/blueprint
```
``` yaml $(python) && $(python-mode) == 'create'
python:
basic-setup-py: true
output-folder: $(python-sdks-folder)/azure-mgmt-blueprint
```
See configuration in [readme.python.md](./readme.python.md)

## Go

Expand Down
28 changes: 28 additions & 0 deletions specification/blueprint/resource-manager/readme.python.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
## Python
filizt marked this conversation as resolved.
Show resolved Hide resolved

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.blueprint
package-name: azure-mgmt-blueprint
title: BlueprintManagementClient
description: The Blueprint Client.
clear-output-folder: true
```
``` yaml $(python) && $(python-mode) == 'update'
python:
no-namespace-folders: true
output-folder: $(python-sdks-folder)/azure-mgmt-blueprint/azure/mgmt/blueprint
```
``` yaml $(python) && $(python-mode) == 'create'
python:
basic-setup-py: true
output-folder: $(python-sdks-folder)/azure-mgmt-blueprint
```
12 changes: 12 additions & 0 deletions specification/blueprint/resource-manager/readme.typescript.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## TypeScript

These settings apply only when `--typescript` is specified on the command line.
Please also specify `--typescript-sdks-folder=<path to root folder of your azure-sdk-for-js clone>`.

``` yaml $(typescript)
typescript:
azure-arm: true
package-name: "@azure/arm-blueprint"
output-folder: "$(typescript-sdks-folder)/packages/@azure/arm-blueprint"
generate-metadata: true
```