diff --git a/specification/blueprint/resource-manager/Microsoft.Blueprint/preview/2018-11-01-preview/assignmentOperation.json b/specification/blueprint/resource-manager/Microsoft.Blueprint/preview/2018-11-01-preview/assignmentOperation.json index d202e0591ce5..30d1a8ac3608 100644 --- a/specification/blueprint/resource-manager/Microsoft.Blueprint/preview/2018-11-01-preview/assignmentOperation.json +++ b/specification/blueprint/resource-manager/Microsoft.Blueprint/preview/2018-11-01-preview/assignmentOperation.json @@ -290,7 +290,7 @@ "in": "path", "required": true, "type": "string", - "description": "The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').", + "description": "The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'). For blueprint assignments management group scope is reserved for future use.", "x-ms-parameter-location": "method", "x-ms-skip-url-encoding": true }, diff --git a/specification/blueprint/resource-manager/Microsoft.Blueprint/preview/2018-11-01-preview/blueprintAssignment.json b/specification/blueprint/resource-manager/Microsoft.Blueprint/preview/2018-11-01-preview/blueprintAssignment.json index 9579c91c9d25..446cf241282c 100644 --- a/specification/blueprint/resource-manager/Microsoft.Blueprint/preview/2018-11-01-preview/blueprintAssignment.json +++ b/specification/blueprint/resource-manager/Microsoft.Blueprint/preview/2018-11-01-preview/blueprintAssignment.json @@ -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": [ @@ -293,6 +323,13 @@ "name": "AssignmentLockMode", "modelAsString": true } + }, + "excludedPrincipals": { + "type": "array", + "description": "List of AAD principals excluded from blueprint locks. Up to 5 principals are permitted.", + "items": { + "type": "string" + } } } }, @@ -525,6 +562,15 @@ "description": "Last modified time of this blueprint definition." } } + }, + "WhoIsBlueprintContract":{ + "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": { @@ -533,7 +579,7 @@ "in": "path", "required": true, "type": "string", - "description": "The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').", + "description": "The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'). For blueprint assignments management group scope is reserved for future use.", "x-ms-parameter-location": "method", "x-ms-skip-url-encoding": true }, diff --git a/specification/blueprint/resource-manager/Microsoft.Blueprint/preview/2018-11-01-preview/blueprintDefinition.json b/specification/blueprint/resource-manager/Microsoft.Blueprint/preview/2018-11-01-preview/blueprintDefinition.json index 99f4bb5b87c3..ccd636c4873d 100644 --- a/specification/blueprint/resource-manager/Microsoft.Blueprint/preview/2018-11-01-preview/blueprintDefinition.json +++ b/specification/blueprint/resource-manager/Microsoft.Blueprint/preview/2018-11-01-preview/blueprintDefinition.json @@ -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": [ @@ -824,7 +824,17 @@ ], "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": { @@ -1342,7 +1352,7 @@ "in": "path", "required": true, "type": "string", - "description": "The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').", + "description": "The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'). For blueprint assignments management group scope is reserved for future use.", "x-ms-parameter-location": "method", "x-ms-skip-url-encoding": true }, diff --git a/specification/blueprint/resource-manager/Microsoft.Blueprint/preview/2018-11-01-preview/examples/WhoIsBlueprint_Action.json b/specification/blueprint/resource-manager/Microsoft.Blueprint/preview/2018-11-01-preview/examples/WhoIsBlueprint_Action.json new file mode 100644 index 000000000000..034e791371ba --- /dev/null +++ b/specification/blueprint/resource-manager/Microsoft.Blueprint/preview/2018-11-01-preview/examples/WhoIsBlueprint_Action.json @@ -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" + } + } + } +} \ No newline at end of file diff --git a/specification/blueprint/resource-manager/readme.md b/specification/blueprint/resource-manager/readme.md index 003beb57cc0b..b82324c68be6 100644 --- a/specification/blueprint/resource-manager/readme.md +++ b/specification/blueprint/resource-manager/readme.md @@ -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 ``` @@ -82,32 +82,7 @@ csharp: ## Python -These settings apply only when `--python` is specified on the command line. -Please also specify `--python-sdks-folder=`. -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 diff --git a/specification/blueprint/resource-manager/readme.python.md b/specification/blueprint/resource-manager/readme.python.md new file mode 100644 index 000000000000..c5fa5e96e328 --- /dev/null +++ b/specification/blueprint/resource-manager/readme.python.md @@ -0,0 +1,28 @@ +## Python + +These settings apply only when `--python` is specified on the command line. +Please also specify `--python-sdks-folder=`. +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 +``` \ No newline at end of file diff --git a/specification/blueprint/resource-manager/readme.typescript.md b/specification/blueprint/resource-manager/readme.typescript.md new file mode 100644 index 000000000000..118904eb0f0c --- /dev/null +++ b/specification/blueprint/resource-manager/readme.typescript.md @@ -0,0 +1,12 @@ +## TypeScript + +These settings apply only when `--typescript` is specified on the command line. +Please also specify `--typescript-sdks-folder=`. + +``` yaml $(typescript) +typescript: + azure-arm: true + package-name: "@azure/arm-blueprint" + output-folder: "$(typescript-sdks-folder)/packages/@azure/arm-blueprint" + generate-metadata: true +```