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 new file mode 100644 index 000000000000..445a8bc0af6e --- /dev/null +++ b/specification/blueprint/resource-manager/Microsoft.Blueprint/preview/2018-11-01-preview/assignmentOperation.json @@ -0,0 +1,322 @@ +{ + "swagger": "2.0", + "info": { + "title": "BlueprintClient", + "description": "Azure Blueprint Client.", + "version": "2018-11-01-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/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": { + "/{scope}/providers/Microsoft.Blueprint/blueprintAssignments/{assignmentName}/assignmentOperations": { + "get": { + "tags": [ + "AssignmentOperations" + ], + "operationId": "AssignmentOperations_List", + "description": "List Operations for given blueprint assignment within a subscription.", + "x-ms-examples": { + "Assignment": { + "$ref": "./examples/BlueprintAssignmentOperation_List.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ScopeParameter" + }, + { + "$ref": "#/parameters/AssignmentNameParameter" + } + ], + "responses": { + "200": { + "description": "OK - all Blueprint assignment Operation retrieved.", + "schema": { + "$ref": "#/definitions/AssignmentOperationList" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/{scope}/providers/Microsoft.Blueprint/blueprintAssignments/{assignmentName}/assignmentOperations/{assignmentOperationName}": { + "get": { + "tags": [ + "AssignmentOperations" + ], + "operationId": "AssignmentOperations_Get", + "description": "Get a Blueprint assignment operation.", + "x-ms-examples": { + "Assignment": { + "$ref": "./examples/BlueprintAssignmentOperation_Get.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ScopeParameter" + }, + { + "$ref": "#/parameters/AssignmentNameParameter" + }, + { + "$ref": "#/parameters/AssignmentOperationNameParameter" + } + ], + "responses": { + "200": { + "description": "OK - Blueprint assignment retrieved.", + "schema": { + "$ref": "#/definitions/AssignmentOperation" + } + } + } + } + } + }, + "definitions": { + "AssignmentOperation": { + "type": "object", + "description": "Represents underlying deployment detail for each update to the assignment.", + "allOf": [ + { "$ref": "#/definitions/AzureResourceBase" } + ], + "properties": { + "properties": { + "description": "Properties for AssignmentOperation", + "x-ms-client-flatten": true, + "$ref": "#/definitions/AssignmentOperationProperties" + } + } + }, + "AssignmentOperationList":{ + "type": "object", + "description": "List of AssignmentOperation.", + "properties": { + "value": { + "type": "array", + "description": "List of AssignmentOperation.", + "items": { + "$ref": "#/definitions/AssignmentOperation" + } + }, + "nextLink": { + "type": "string", + "readOnly": true, + "description": "Link to the next page of results." + } + } + + }, + "AssignmentOperationProperties": { + "type": "object", + "description": "Properties of AssignmentOperation.", + "properties": { + "blueprintVersion": { + "type": "string", + "description": "The blueprint version used for the assignment operation." + }, + "assignmentState": { + "type": "string", + "description": "State of this assignment operation." + }, + "timeCreated": { + "type": "string", + "description": "Create time of this Assignment Operation." + }, + "timeStarted": { + "type": "string", + "description": "Start time of the underlying deployment." + }, + "timeFinished": { + "type": "string", + "description": "Finish time of the overall underlying deployments." + }, + "deployments": { + "type": "array", + "description": "List of jobs in this assignment operation.", + "items": { + "$ref": "#/definitions/AssignmentDeploymentJob" + } + } + } + }, + "AssignmentDeploymentJob": { + "type": "object", + "description": "Represents individual job in given assignment operation.", + "properties": { + "kind": { + "type": "string", + "description": "Kind of the job." + }, + "action": { + "type": "string", + "description": "Name of the action performed in this job." + }, + "jobId": { + "type": "string", + "description": "Id of this job." + }, + "jobState": { + "type": "string", + "description": "State of this job." + }, + "result": { + "description": "Deployment job result.", + "$ref": "#/definitions/AssignmentDeploymentJobResult" + }, + "history": { + "type": "array", + "description": "Result of this deployment job for each retry.", + "items": { + "$ref": "#/definitions/AssignmentDeploymentJobResult" + } + }, + "requestUri": { + "type": "string", + "description": "Reference to deployment job resource id." + } + } + }, + "AssignmentDeploymentJobResult": { + "type": "object", + "description": "Result of each individual deployment in a blueprint assignment.", + "properties": { + "error": { + "description": "Contains error details if deployment job failed.", + "$ref": "#/definitions/AzureResourceManagerError" + }, + "resources": { + "type": "array", + "description": "Resources created as result of the deployment job.", + "items": { + "$ref": "#/definitions/AssignmentJobCreatedResource" + } + } + } + }, + "AssignmentJobCreatedResource": { + "type": "object", + "description": "Azure resource created from deployment job.", + "properties": { + "properties": { + "type": "object", + "description": "Additional properties in a dictionary.", + "additionalProperties": { + "type": "string", + "description": "property value" + } + } + }, + "allOf": [ + { "$ref": "#/definitions/AzureResourceBase" } + ] + }, + + "AzureResourceBase": { + "description": "Common properties for all Azure resources.", + "type": "object", + "x-ms-azure-resource": true, + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "String Id used to locate any resource on Azure." + }, + "type": { + "readOnly": true, + "type": "string", + "description": "Type of this resource." + }, + "name": { + "readOnly": true, + "type": "string", + "description": "Name of this resource." + } + } + }, + "AzureResourceManagerError": { + "type": "object", + "description": "Error code and message", + "properties": { + "code": { + "type": "string", + "description": "Error code." + }, + "message": { + "type": "string", + "description": "Error message." + } + + } + } + }, + "parameters": { + "ScopeParameter": { + "name": "scope", + "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}').", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + }, + "AssignmentNameParameter": { + "name": "assignmentName", + "in": "path", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "description": "name of the assignment." + }, + "AssignmentOperationNameParameter": { + "name": "assignmentOperationName", + "in": "path", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "description": "Name of the assignment operation." + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "x-ms-parameter-location": "client", + "description": "Client Api Version." + } + } +} diff --git a/specification/blueprint/resource-manager/Microsoft.Blueprint/preview/2018-11-01-preview/examples/BlueprintAssignmentOperation_Get.json b/specification/blueprint/resource-manager/Microsoft.Blueprint/preview/2018-11-01-preview/examples/BlueprintAssignmentOperation_Get.json new file mode 100644 index 000000000000..3a6c0b507eca --- /dev/null +++ b/specification/blueprint/resource-manager/Microsoft.Blueprint/preview/2018-11-01-preview/examples/BlueprintAssignmentOperation_Get.json @@ -0,0 +1,49 @@ +{ + "parameters":{ + "api-version":"2018-11-01-preview", + "scope":"subscriptions/f8df94f2-2f5a-4f4a-bcaf-1bb992fb564b", + "assignmentName":"assignSimpleBlueprint", + "assignmentOperationName":"fb5d4dcb-7ce2-4087-ba7a-459aa74e5e0f" + }, + "responses":{ + "200":{ + "body":{ + "id":"/subscriptions/f8df94f2-2f5a-4f4a-bcaf-1bb992fb564b/providers/microsoft.blueprint/blueprintAssignments/assignSimpleBlueprint/assignmentOperations/fb5d4dcb-7ce2-4087-ba7a-459aa74e5e0f", + "type": "microsoft.blueprint/blueprintAssignments/operations", + "name": "fb5d4dcb-7ce2-4087-ba7a-459aa74e5e0f", + "properties": { + "blueprintVersion": "v20181101", + "assignmentState": "succeed", + "timeCreated": "2018-11-13T15:19:45-08:00", + "timeStarted": "2018-11-13T15:21:49-08:00", + "timeFinished": "2018-11-13T15:26:02-08:00", + "deployments":[ + { + "kind": "azureResource", + "action": "put", + "jobState": "succeeded", + "requestUri": "/subscriptions/f8df94f2-2f5a-4f4a-bcaf-1bb992fb564b/providers/microsoft.deployments/deployments/48432786-2f1b-4925-8032-a5d57bcb5b6e", + "result": { + "resources": [ + { + "id": "blabla", + "name":"foobar", + "type":"foo/bar" + } + ] + }, + "history":[ + { + "error":{ + "code": "dummy", + "message":"dummy" + } + } + ] + } + ] + } + } + } + } +} \ No newline at end of file diff --git a/specification/blueprint/resource-manager/Microsoft.Blueprint/preview/2018-11-01-preview/examples/BlueprintAssignmentOperation_List.json b/specification/blueprint/resource-manager/Microsoft.Blueprint/preview/2018-11-01-preview/examples/BlueprintAssignmentOperation_List.json new file mode 100644 index 000000000000..040bc621dc99 --- /dev/null +++ b/specification/blueprint/resource-manager/Microsoft.Blueprint/preview/2018-11-01-preview/examples/BlueprintAssignmentOperation_List.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "api-version": "2018-11-01-preview", + "scope":"subscriptions/f8df94f2-2f5a-4f4a-bcaf-1bb992fb564b", + "assignmentName": "assignSimpleBlueprint" + }, + "responses": { + "200": { + "body": { + "value":[{ + "id": "/subscriptions/f8df94f2-2f5a-4f4a-bcaf-1bb992fb564b/providers/microsoft.blueprint/blueprintAssignments/assignSimpleBlueprint/assignmentOperations/fb5d4dcb-7ce2-4087-ba7a-459aa74e5e0f", + "type": "microsoft.blueprint/blueprintAssignments/operations", + "name": "fb5d4dcb-7ce2-4087-ba7a-459aa74e5e0f", + "properties": { + "blueprintVersion": "v20181101", + "assignmentState": "succeed", + "timeCreated": "2018-11-13T15:19:45-08:00", + "timeStarted": "2018-11-13T15:21:49-08:00", + "timeFinished": "2018-11-13T15:26:02-08:00", + "deployments": [ + { + "kind": "azureResource", + "action": "put", + "jobState": "succeeded", + "requestUri": "/subscriptions/f8df94f2-2f5a-4f4a-bcaf-1bb992fb564b/providers/microsoft.deployments/deployments/48432786-2f1b-4925-8032-a5d57bcb5b6e", + "result": { + "resources": [ + { + "id": "blabla", + "name": "foobar", + "type": "foo/bar" + } + ] + }, + "history": [ + { + "error": { + "code": "dummy", + "message": "dummy" + } + } + ] + } + ] + } + }], + "nextLink":null + } + } + } +} \ No newline at end of file diff --git a/specification/blueprint/resource-manager/readme.go.md b/specification/blueprint/resource-manager/readme.go.md index 37f2194ec7d6..2cb0822c1816 100644 --- a/specification/blueprint/resource-manager/readme.go.md +++ b/specification/blueprint/resource-manager/readme.go.md @@ -13,14 +13,23 @@ go: ``` yaml $(go) && $(multiapi) batch: - - tag: package-2017-11-preview + - tag: package-2018-11-preview ``` ### Tag: package-2017-11-preview and go -These settings apply only when `--tag=package-2015-11-preview --go` is specified on the command line. +These settings apply only when `--tag=package-2017-11-preview --go` is specified on the command line. Please also specify `--go-sdk-folder=`. ``` yaml $(tag) == 'package-2017-11-preview' && $(go) output-folder: $(go-sdk-folder)/services/preview/$(namespace)/mgmt/2017-11-11-preview/$(namespace) ``` + +### Tag: package-2018-11-preview and go + +These settings apply only when `--tag=package-2018-11-preview --go` is specified on the command line. +Please also specify `--go-sdk-folder=`. + +``` yaml $(tag) == 'package-2018-11-preview' && $(go) +output-folder: $(go-sdk-folder)/services/preview/$(namespace)/mgmt/2017-11-11-preview/$(namespace) +``` \ No newline at end of file diff --git a/specification/blueprint/resource-manager/readme.md b/specification/blueprint/resource-manager/readme.md index 1c86463570e2..b30929a56692 100644 --- a/specification/blueprint/resource-manager/readme.md +++ b/specification/blueprint/resource-manager/readme.md @@ -24,7 +24,7 @@ These are the global settings for the Blueprint API. title: BlueprintManagementClient description: Blueprint Client openapi-type: arm -tag: package-2017-11-preview +tag: package-2018-11-preview ``` @@ -38,6 +38,17 @@ input-file: - Microsoft.Blueprint/preview/2017-11-11-preview/blueprintAssignment.json ``` +### Tag: package-2018-11-preview + +These settings apply only when `--tag=package-2018-11-preview` is specified on the command line. + +``` yaml $(tag) == 'package-2018-11-preview' +input-file: +- Microsoft.Blueprint/preview/2017-11-11-preview/blueprintDefinition.json +- Microsoft.Blueprint/preview/2017-11-11-preview/blueprintAssignment.json +- Microsoft.Blueprint/preview/2018-11-01-preview/assignmentOperation.json +``` + --- # Code Generation @@ -50,6 +61,7 @@ This is not used by Autorest itself. swagger-to-sdk: - repo: azure-sdk-for-go - repo: azure-sdk-for-node + - repo: azure-sdk-for-python ``` @@ -137,4 +149,8 @@ directive: suppress: OperationsAPIImplementation where: $.paths reason: OperationsAPI for Microsoft.Management is out of scope. + - from: assignmentOperation.json + suppress: OperationsAPIImplementation + where: $.paths + reason: OperationsAPI for Microsoft.Management is out of scope. ```