-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Add deployment APIs for Microsoft.Resources #5737
Merged
Merged
Changes from 12 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
561b51c
copy from 2019-03-01.
Tiano2017 53ffdba
Add changes for management group deployment.
Tiano2017 dff86dc
add changes in readme.md.
Tiano2017 b66c68e
refactor.
Tiano2017 427d8d2
Merge remote-tracking branch 'origin/master' into tiano-mg-deployment
Tiano2017 e44e929
add example.
Tiano2017 3861ead
more changes.
Tiano2017 2327cba
revert the tagname and tagvalue change.
Tiano2017 acbe276
reference exmple file.
Tiano2017 8dcf9c3
update example file.
Tiano2017 56031e9
fixes
Tiano2017 7829634
Merge remote-tracking branch 'origin/master' into tiano-mg-deployment
Tiano2017 621a104
Add descriptions.
Tiano2017 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
32 changes: 32 additions & 0 deletions
32
.../resource-manager/Microsoft.Resources/stable/2019-05-01/examples/CreateResourceGroup.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,32 @@ | ||
{ | ||
"parameters": { | ||
"subscriptionId": "{subscription-id}", | ||
"resourceGroupName": "myResourceGroup", | ||
"api-version": "2019-05-01", | ||
"parameters": { | ||
"location": "eastus" | ||
} | ||
}, | ||
"responses": { | ||
"201": { | ||
"body": { | ||
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup", | ||
"name": "myResourceGroup", | ||
"location": "eastus", | ||
"properties": { | ||
"provisioningState":"Succeeded" | ||
} | ||
} | ||
}, | ||
"200": { | ||
"body": { | ||
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup", | ||
"name": "myResourceGroup", | ||
"location": "eastus", | ||
"properties": { | ||
"provisioningState":"Succeeded" | ||
} | ||
} | ||
} | ||
} | ||
} |
137 changes: 137 additions & 0 deletions
137
...anager/Microsoft.Resources/stable/2019-05-01/examples/PutDeploymentAtManagementGroup.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,137 @@ | ||
{ | ||
"parameters": { | ||
"groupId": "tiano-group1", | ||
"deploymentName": "mg-dep01", | ||
"api-version": "2019-05-01", | ||
"parameters": { | ||
"location": "eastus", | ||
"properties": { | ||
"templateLink": "{templateUri}", | ||
"parameters": {}, | ||
"mode": "Incremental" | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"id": "/providers/Microsoft.Management/managementGroups/tiano-group1/providers/Microsoft.Resources/deployments/mg-dep01", | ||
"name": "mg-dep01", | ||
"type": "Microsoft.Resources/deployments", | ||
"location": "eastus", | ||
"properties": { | ||
"parameters": {}, | ||
"mode": "Incremental", | ||
"provisioningState": "Accepted", | ||
"timestamp": "2019-04-24T22:52:38.7895563Z", | ||
"duration": "PT1.2970875S", | ||
"correlationId": "{correlationId}", | ||
"providers": [ | ||
{ | ||
"namespace": "Microsoft.Authorization", | ||
"resourceTypes": [ | ||
{ | ||
"resourceType": "policyDefinitions", | ||
"locations": [ | ||
null | ||
] | ||
}, | ||
{ | ||
"resourceType": "policyAssignments", | ||
"locations": [ | ||
null | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"namespace": "Microsoft.Resources", | ||
"resourceTypes": [ | ||
{ | ||
"resourceType": "deployments", | ||
"locations": [ | ||
"eastus" | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"dependencies": [ | ||
{ | ||
"dependsOn": [ | ||
{ | ||
"id": "/providers/Microsoft.Management/managementGroups/tiano-group1/providers/Microsoft.Authorization/policyDefinitions/policy2", | ||
"resourceType": "Microsoft.Authorization/policyDefinitions", | ||
"resourceName": "policy2" | ||
} | ||
], | ||
"id": "/providers/Microsoft.Management/managementGroups/tiano-group1/providers/Microsoft.Authorization/policyAssignments/location-lock", | ||
"resourceType": "Microsoft.Authorization/policyAssignments", | ||
"resourceName": "location-lock" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"201": { | ||
"body": { | ||
"id": "/providers/Microsoft.Management/managementGroups/tiano-group1/providers/Microsoft.Resources/deployments/mg-dep01", | ||
"name": "mg-dep01", | ||
"type": "Microsoft.Resources/deployments", | ||
"location": "eastus", | ||
"properties": { | ||
"parameters": {}, | ||
"mode": "Incremental", | ||
"provisioningState": "Accepted", | ||
"timestamp": "2019-04-24T22:52:38.7895563Z", | ||
"duration": "PT1.2970875S", | ||
"correlationId": "{correlationId}", | ||
"providers": [ | ||
{ | ||
"namespace": "Microsoft.Authorization", | ||
"resourceTypes": [ | ||
{ | ||
"resourceType": "policyDefinitions", | ||
"locations": [ | ||
null | ||
] | ||
}, | ||
{ | ||
"resourceType": "policyAssignments", | ||
"locations": [ | ||
null | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"namespace": "Microsoft.Resources", | ||
"resourceTypes": [ | ||
{ | ||
"resourceType": "deployments", | ||
"locations": [ | ||
"eastus" | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"dependencies": [ | ||
{ | ||
"dependsOn": [ | ||
{ | ||
"id": "/providers/Microsoft.Management/managementGroups/tiano-group1/providers/Microsoft.Authorization/policyDefinitions/policy2", | ||
"resourceType": "Microsoft.Authorization/policyDefinitions", | ||
"resourceName": "policy2" | ||
} | ||
], | ||
"id": "/providers/Microsoft.Management/managementGroups/tiano-group1/providers/Microsoft.Authorization/policyAssignments/location-lock", | ||
"resourceType": "Microsoft.Authorization/policyAssignments", | ||
"resourceName": "location-lock" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} |
54 changes: 54 additions & 0 deletions
54
...esources/stable/2019-05-01/examples/PutDeploymentWithOnErrorDeploymentLastSuccessful.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,54 @@ | ||
{ | ||
"parameters": { | ||
"subscriptionId": "{subscriptionId}", | ||
"resourceGroupName": "myResourceGroup", | ||
"deploymentName": "exampleDeploymentName", | ||
"api-version": "2019-05-01", | ||
"parameters": { | ||
"properties": { | ||
"templateLink": "{templateUri}", | ||
"parameters": {}, | ||
"mode": "Complete", | ||
"onErrorDeployment": { | ||
"type": "LastSuccessful" | ||
} | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"id": "/subscriptions/{subscriptionId}/resourcegroups/myResourceGroup/providers/Microsoft.Resources/deployments/exampleDeploymentName", | ||
"name": "exampleDeploymentName", | ||
"type": "Microsoft.Resources/deployments", | ||
"properties": { | ||
"provisioningState": "Accepted", | ||
"correlationId": "{correlationId}", | ||
"timestamp": "2019-03-01T00:00:00.0000000Z", | ||
"mode": "Complete", | ||
"onErrorDeployment": { | ||
"type": "LastSuccessful", | ||
"deploymentName": "{nameOfLastSuccesfulDeployment}" | ||
} | ||
} | ||
} | ||
}, | ||
"201": { | ||
"body": { | ||
"id": "/subscriptions/{subscriptionId}/resourcegroups/myResourceGroup/providers/Microsoft.Resources/deployments/exampleDeploymentName", | ||
"name": "exampleDeploymentName", | ||
"type": "Microsoft.Resources/deployments", | ||
"properties": { | ||
"provisioningState": "Accepted", | ||
"correlationId": "{correlationId}", | ||
"timestamp": "2019-03-01T00:00:00.0000000Z", | ||
"mode": "Complete", | ||
"onErrorDeployment": { | ||
"type": "LastSuccessful", | ||
"deploymentName": "{nameOfLastSuccesfulDeployment}" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
55 changes: 55 additions & 0 deletions
55
...rces/stable/2019-05-01/examples/PutDeploymentWithOnErrorDeploymentSpecificDeployment.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,55 @@ | ||
{ | ||
"parameters": { | ||
"subscriptionId": "{subscriptionId}", | ||
"resourceGroupName": "myResourceGroup", | ||
"deploymentName": "exampleDeploymentName", | ||
"api-version": "2019-05-01", | ||
"parameters": { | ||
"properties": { | ||
"templateLink": "{templateUri}", | ||
"parameters": {}, | ||
"mode": "Complete", | ||
"onErrorDeployment": { | ||
"type": "SpecificDeployment", | ||
"deploymentName": "{nameOfDeploymentToUse}" | ||
} | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"id": "/subscriptions/{subscriptionId}/resourcegroups/myResourceGroup/providers/Microsoft.Resources/deployments/exampleDeploymentName", | ||
"name": "exampleDeploymentName", | ||
"type": "Microsoft.Resources/deployments", | ||
"properties": { | ||
"provisioningState": "Accepted", | ||
"correlationId": "{correlationId}", | ||
"timestamp": "2019-03-01T00:00:00.0000000Z", | ||
"mode": "Complete", | ||
"onErrorDeployment": { | ||
"type": "SpecificDeployment", | ||
"deploymentName": "{nameOfDeploymentToUse}" | ||
} | ||
} | ||
} | ||
}, | ||
"201": { | ||
"body": { | ||
"id": "/subscriptions/{subscriptionId}/resourcegroups/myResourceGroup/providers/Microsoft.Resources/deployments/exampleDeploymentName", | ||
"name": "exampleDeploymentName", | ||
"type": "Microsoft.Resources/deployments", | ||
"properties": { | ||
"provisioningState": "Accepted", | ||
"correlationId": "{correlationId}", | ||
"timestamp": "2019-03-01T00:00:00.0000000Z", | ||
"mode": "Complete", | ||
"onErrorDeployment": { | ||
"type": "SpecificDeployment", | ||
"deploymentName": "{nameOfDeploymentToUse}" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we had this API version? That's bad. I assume, now we may have some SDK breaking changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we haven't released any package with this swagger, so I think it's still fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Tiano2017 as far as I know, if the spec was merged to master, some SDK packages could be released.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what's the right approach here. This change is more like fixing a bug, and I assume it's only going to impact future versions of packages. can we assume it's safe in that case?