-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
modeling assignmentOperations with api-version 2018-11-01 (#4590)
* move blueprint from private repo to public * address comment * fat finger * add description in ResourceProviderOperation * camelCase for resourceType * strongType ParameterValueCollection * remove the hacky workaround for extension resource path * init apiVersion=Nov2018 * api definition * progress * split assignment and blueprint definition * assignmentOperation api * split swagger to multiple area for easy upgrade * update suppression due to file split * modeling assignmentOperations * suppress warnings on new file * fix assignmentOperation list * typo * add python repo * add title and description, fix old apiversion in examples * update assignmentOperation use scope for more flexbility * rename blueprintAssignments/operations to blueprintAssignments/assignmentOperations * fix double forward slashes * description update * more capital letters * werid casing error
- Loading branch information
Showing
5 changed files
with
450 additions
and
3 deletions.
There are no files selected for viewing
322 changes: 322 additions & 0 deletions
322
.../resource-manager/Microsoft.Blueprint/preview/2018-11-01-preview/assignmentOperation.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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." | ||
} | ||
} | ||
} |
49 changes: 49 additions & 0 deletions
49
...osoft.Blueprint/preview/2018-11-01-preview/examples/BlueprintAssignmentOperation_Get.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.