-
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.
Fix to support nextLink with post calls for python sdk (#14035)
* single example with post nextLinl * address suggestions * remove examples * Add nextLink param * Post on nextLink for all requests * Add api-version as param * update readme * prettier fix * fix lint err try * rename operation id * fix generation for python * fix casing of next link * Remove package * change one next link op to normal path * readme.python config * Update readme.python.md Co-authored-by: Namrata Jagasia <[email protected]> Co-authored-by: iscai-msft <[email protected]> Co-authored-by: Zed <[email protected]> Co-authored-by: msyyc <[email protected]>
- Loading branch information
1 parent
4d6ff42
commit b189836
Showing
7 changed files
with
337 additions
and
65 deletions.
There are no files selected for viewing
82 changes: 82 additions & 0 deletions
82
...s/stable/2019-10-01/examples/PolicyEvents_QueryManagementGroupScopeNextLinkSkipToken.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,82 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2019-10-01", | ||
"$skiptoken": "WpmWfBSvPhkAK6QD", | ||
"nextLink": "{nextLink}" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"@odata.nextLink": null, | ||
"@odata.context": "https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default", | ||
"@odata.count": 2, | ||
"value": [ | ||
{ | ||
"@odata.id": null, | ||
"@odata.context": "https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", | ||
"timestamp": "2018-02-07T22:19:18.8896095Z", | ||
"resourceId": "/subscriptions/fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef/resourceGroups/myrg/providers/Microsoft.Compute/virtualMachines/myvm1/extensions/DAExtension", | ||
"policyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/1ef5d536aec743a0aa801c1a", | ||
"policyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", | ||
"effectiveParameters": null, | ||
"isCompliant": false, | ||
"subscriptionId": "fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef", | ||
"resourceType": "/Microsoft.Compute/virtualMachines/extensions", | ||
"resourceLocation": "westeurope", | ||
"resourceGroup": "myrg", | ||
"resourceTags": "tbd", | ||
"policyAssignmentName": "1ef5d536aec743a0aa801c1a", | ||
"policyAssignmentOwner": "tbd", | ||
"policyAssignmentParameters": "{}", | ||
"policyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", | ||
"policyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", | ||
"policyDefinitionAction": "audit", | ||
"policyDefinitionCategory": "tbd", | ||
"policySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/335cefd2-ab16-430f-b364-974a170eb1d5", | ||
"policySetDefinitionName": "335cefd2-ab16-430f-b364-974a170eb1d5", | ||
"policySetDefinitionOwner": null, | ||
"policySetDefinitionCategory": null, | ||
"policySetDefinitionParameters": null, | ||
"managementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", | ||
"policyDefinitionReferenceId": "15521232277412542086", | ||
"tenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", | ||
"principalOid": "fff3e452-fff2-fff1-fff8-fff12618f1b8", | ||
"complianceState": "NonCompliant" | ||
}, | ||
{ | ||
"@odata.id": null, | ||
"@odata.context": "https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", | ||
"timestamp": "2018-02-07T22:19:18.8896095Z", | ||
"resourceId": "/subscriptions/fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef/resourceGroups/myrg/providers/Microsoft.Compute/virtualMachines/myvm1/extensions/DAExtension", | ||
"policyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/95816fce53454b15a7ed803d", | ||
"policyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/a2c0414b-82e4-459d-97d5-94c79a89232c", | ||
"effectiveParameters": null, | ||
"isCompliant": false, | ||
"subscriptionId": "fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef", | ||
"resourceType": "/Microsoft.Compute/virtualMachines/extensions", | ||
"resourceLocation": "westeurope", | ||
"resourceGroup": "myrg", | ||
"resourceTags": "tbd", | ||
"policyAssignmentName": "95816fce53454b15a7ed803d", | ||
"policyAssignmentOwner": "tbd", | ||
"policyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"eastus\"]}}", | ||
"policyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", | ||
"policyDefinitionName": "a2c0414b-82e4-459d-97d5-94c79a89232c", | ||
"policyDefinitionAction": "audit", | ||
"policyDefinitionCategory": "tbd", | ||
"policySetDefinitionId": "", | ||
"policySetDefinitionName": "", | ||
"policySetDefinitionOwner": null, | ||
"policySetDefinitionCategory": null, | ||
"policySetDefinitionParameters": null, | ||
"managementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", | ||
"policyDefinitionReferenceId": "", | ||
"tenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", | ||
"principalOid": "fff3e452-fff2-fff1-fff8-fff12618f1b8", | ||
"complianceState": "NonCompliant" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
83 changes: 83 additions & 0 deletions
83
...s/stable/2019-10-01/examples/PolicyStates_QueryManagementGroupScopeNextLinkSkipToken.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,83 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2019-10-01", | ||
"$skiptoken": "WpmghrfhqlwpqqdrwpwmgWfBSvPhkAK6QD", | ||
"nextLink": "{nextLink}" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"@odata.context": "https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest", | ||
"@odata.count": 2, | ||
"value": [ | ||
{ | ||
"@odata.id": null, | ||
"@odata.context": "https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", | ||
"timestamp": "2019-10-09T17:41:47Z", | ||
"resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg1/providers/microsoft.insights/autoscalesettings/mytest1", | ||
"policyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/1ef5d536aec743a0aa801c1a", | ||
"policyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", | ||
"effectiveParameters": null, | ||
"isCompliant": false, | ||
"subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", | ||
"resourceType": "/microsoft.insights/autoscalesettings", | ||
"resourceLocation": "westus", | ||
"resourceGroup": "myrg1", | ||
"resourceTags": "tbd", | ||
"policyAssignmentName": "1ef5d536aec743a0aa801c1a", | ||
"policyAssignmentOwner": "tbd", | ||
"policyAssignmentParameters": "{}", | ||
"policyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", | ||
"policyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", | ||
"policyDefinitionAction": "audit", | ||
"policyDefinitionCategory": "tbd", | ||
"policySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/335cefd2-ab16-430f-b364-974a170eb1d5", | ||
"policySetDefinitionName": "335cefd2-ab16-430f-b364-974a170eb1d5", | ||
"policySetDefinitionOwner": null, | ||
"policySetDefinitionCategory": null, | ||
"policySetDefinitionParameters": null, | ||
"managementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", | ||
"policyDefinitionReferenceId": "15521232277412542086", | ||
"complianceState": "NonCompliant", | ||
"policyDefinitionGroupNames": [ | ||
"myGroup" | ||
] | ||
}, | ||
{ | ||
"@odata.id": null, | ||
"@odata.context": "https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", | ||
"timestamp": "2019-10-09T17:41:47Z", | ||
"resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg1/providers/microsoft.insights/autoscalesettings/mytest1", | ||
"policyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c", | ||
"policyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", | ||
"effectiveParameters": null, | ||
"isCompliant": true, | ||
"subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", | ||
"resourceType": "/microsoft.insights/autoscalesettings", | ||
"resourceLocation": "westus", | ||
"resourceGroup": "myrg1", | ||
"resourceTags": "tbd", | ||
"policyAssignmentName": "186044306c044a1d8c0ff76c", | ||
"policyAssignmentOwner": "tbd", | ||
"policyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"centralus\"]}}", | ||
"policyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", | ||
"policyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", | ||
"policyDefinitionAction": "audit", | ||
"policyDefinitionCategory": "tbd", | ||
"policySetDefinitionId": "", | ||
"policySetDefinitionName": "", | ||
"policySetDefinitionOwner": null, | ||
"policySetDefinitionCategory": null, | ||
"policySetDefinitionParameters": null, | ||
"managementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", | ||
"policyDefinitionReferenceId": "", | ||
"complianceState": "Compliant", | ||
"policyDefinitionGroupNames": [ | ||
"myGroup" | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
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
Oops, something went wrong.