From 255c685ddb5065afe77235e77da4f977d28449dc Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 5 Nov 2018 17:42:33 -0800 Subject: [PATCH] [AutoPR authorization/resource-manager] Python conf for Authorization 2018-09-01-preview (#3710) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * KeyVault multiapi template * Multi-api template for KV data-plane * Generated from 7f4d093f3d4cdee21f74d6cf1538a2c7e9197a9d * Fix multiapi Client * [AutoPR keyvault/resource-manager] KV multiapi Readme (#2928) * Generated from dc6eeefac40f35620e785bd22e81c8dc97984c79 KV multiapi Readme * Fix multiapi client * Remove pointless SwaggerToSdk conf if KV is multiapi * updates for DP multi-api client * test import updates * [AutoPR] hanaonazure/resource-manager (#3070) * [AutoPR hanaonazure/resource-manager] Added power state to Hana Instance (#3069) * Generated from 49201e1122012eafd505ebcf228a908f85c9146f Added power state to Hana Instance * Generated from b9bb485143557a4cd2d295adde6dcfdd74b741da moved power state under properties * Generated from cd61ee2c6bc8da6444de839e4c5715c815031587 added power state enum * Packaging * docstring and PR feedback updates * updated pythonsdk for new swagger api-version for botservice (#3073) * add newly generated python sdk * added tests for sdk changes * generated sdk with latest autorest * generated sdk with autorest.python=3.x and fixed tests * BotService packagin * Update OSX Travis (#3083) * updates for msrest pipeline compatibility * update msrest version and release status in setup.py * updating release notes for azure-keyvault and azure-mgmt-keyvault * [AutoPR] network/resource-manager (#3090) * Generated from db3abd4808cfaefc761842ca5b70fe8303db2b52 (#3089) add x-ms-long-running-operation-options to query packet capture status * 2.0.1 * [AutoPR] iotcentral/resource-manager (#2987) * Generated from 1dda4e455040e612e0553c6d9503d29509cde751 (#2968) Add iotcentral version 2018-09-01 * IoT Central version 2018-09-01 (#3098) * Generated from 1dda4e455040e612e0553c6d9503d29509cde751 (#2968) Add iotcentral version 2018-09-01 * Update iotcentral test recording for version 2018-09-01 * Packaging * [AutoPR] containerservices/resource-manager (#3097) * Generated from 9efd958bbea2c84b6c5dfa98d5d598b43dcfba45 (#3096) modify the 2017-07-01 version * Generated from b8860f73880880a13c2491f965f2aa8e58a01822 (#3101) modify credentialResults keyName to kubeconfigs * Packaging * [HDInsight] Adding support for HDInsight (#3088) * Added/recorded test for HDInsight * Added author email * HDInsight packaging * HDInsight package-2015-03-preview with Autorest.Python 3.x * History date * [AutoPR] containerservices/resource-manager (#3110) * Generated from 73dab353224c59ad704cdd7632f734e316128aa4 (#3109) fix credentialResult value format to byte * Update version.py * Update HISTORY.rst * [AutoPR] azure-kusto/resource-manager (#3082) * [AutoPR azure-kusto/resource-manager] Kusto: Add Kusto swagger specification, documentation and examples (#3081) * Generated from e74c7d26a62942c0124daf6bedc0649af3bd5f8a Fixing default tag of Kusto Mgmt * Kusto packaging * Update HISTORY.rst * Clean tests (#3130) * Remove pointless import * Remove unused file * [AutoPR cognitiveservices/data-plane/LUIS/Runtime/cognitiveservices/data-plane/LUIS/Authoring] [Cognitive Services] Update endpoint URL template for LUIS. (#2995) * Generated from 8dfedc91e10fb96edb9aff8158500e9d369ab36a [Cognitive Services] Update endpoint URL template for LUIS. * Generated from 8dfedc91e10fb96edb9aff8158500e9d369ab36a [Cognitive Services] Update endpoint URL template for LUIS. * Manual fix of LUIS enum * LUIS packaging * Release date * LUIS doesn't need msrestazure * ContentModerator patched models (#3165) * ContentModerator patched * ContentModerator packaging * [AutoPR] reservations/resource-manager (#3185) * [AutoPR reservations/resource-manager] Add new reserved resource type CosmosDb (#3177) * Generated from e35a2cd6d6d494556677a36fff18e4a3e6f4faaa Add new reserved resource type CosmosDb * Generated from 5401c4a8548e73bec9577c902035e056fbc8657d Reservations RP 2018-06-01: Add name property in Patch parameter. Remove auto generate Java SDK * Generated from e9bea317fb008ae36028d5900a56253fd6c8abb5 Reservation RP: Update python package version to 0.2.2 * Updated packaging setup * Bumped version + changelog * Updated setup.py * EventGrid DataPlane SDK: Regenerated the SDK based on latest swagger. (#3181) * Regenerated SDK based on latest Swagger specifications to include new/modified IotHub events and new ARM events. * Updated version and history information. * Updated date in release history. * EventGrid packaging * [AutoPR] iothub/resource-manager (#3201) * Generated from 85ab219e8f4f326e7f6b6a5eb2068c4b7ccb5408 (#3200) IoTHub conf py * IoTHub packaging * [AutoPR] web/resource-manager (#2065) * Generated from 38e4303e047f81ab46e00d32d6356c4db74ddce1 (#2064) Web Python conf * [AutoPR web/resource-manager] Fix recommendation resource properties, add disable recommendation APIs (#2063) * Generated from 00ffb2040dfb1d813a1780159b322c53cd2efb30 Add disable recommendation APIs * Generated from 00ffb2040dfb1d813a1780159b322c53cd2efb30 Add disable recommendation APIs * Generated from 6b4f8a041355f71703ff968f9a7209ab27d93605 (#2090) Add missing type specifier to enum definition. * Generated from 2cfd4201a8ac6728ed176142e879fa13c9aff776 (#2177) Fix for https://github.com/Azure/azure-rest-api-specs/issues/1697#issuecomment-367167726 * [AutoPR web/resource-manager] Update logicAppsManagementClient.json to current offerings (#2289) * Generated from a708b01ae8047043514cb507bebd12838177c896 PR Updates * Generated from d8ef07295ba7ceb1c9a3d1bbd15f5507dbd59a45 PR Updates * [AutoPR web/resource-manager] Adding BillingMeters API (#2271) * Generated from 346651741dcafd1a91d0741d726aef7cdac29c4d Adding BillingMeters API * Generated from 2c9ced71b2b53f7039ec9ddbcbe4f23f05897e89 Adding reference to readme.md * Generated from 1723dbe3e971a273cd0d143700e69c20912f9bce Merge branch 'master' of https://github.com/andreyse/azure-rest-api-specs * Generated from 1723dbe3e971a273cd0d143700e69c20912f9bce Merge branch 'master' of https://github.com/andreyse/azure-rest-api-specs * [AutoPR web/resource-manager] Adding new API version for Microsoft.Web RP which fixes swagger errors (#2340) * Generated from 574e458be59a062c8af950ba83768ea41095a1d2 Fixing API version in the examples * Generated from 8957477812a8f2abbc895a363756062be9f2ca45 Removed location element for top level domain examples * Generated from 78c1d019bfd4816ca21ad4f3cbebe6b9aed3175d (#2436) Fix for https://github.com/Azure/azure-rest-api-specs/issues/2907 * Generated from 803aa2f0154403f9b82544013d0f108a5f0781d2 (#2533) https://github.com/Azure/azure-rest-api-specs/issues/2907 * Rebuild by https://github.com/Azure/azure-sdk-for-python/pull/2065 * Generated from 0ba75505cddaddce442eb2172170ccd408e6cfd5 (#2925) Update default package version for WebSiteManagementClient * Generated from 783f10df76a37c1a43432530a30deb10d7aceb50 (#2955) Add API for adding external storage account configurations to a web app * Generated from a20537a953e03d3177877f92d7c1fc00d79ac635 (#3048) Fix documentation issues with metrics APIs * Generated from 45ce1882ee5af7ce8fa4f25cf5f871bc7aa9821b (#3116) Include DRSecondary endpoint for GetPublishingProfileXml * [AutoPR web/resource-manager] WebApps - Add BackupName to backup API models (#3058) * Generated from 6162973ef0993464a1806f8db5ca913f0fa5d6c8 WebApps - Add BackupName to replace non-ARM-compliant Name property on Backup API models * Generated from c8664a06cff19844eb381ad410872b34cba23b27 Revert breaking change to BackupItem. BackupItemName property will be fine in place of BackupName for now. * [AutoPR web/resource-manager] Add HyperV property for AppServicePlan and Site model and deprecating… (#3169) * Generated from 45a695f12bca8bf8b3532a4d1c8f02571f83bf51 Add HyperV property for AppServicePlan and Site model and deprecating IsXenon property * Generated from 5a76ead1e9a3559ab3bce148ec8f282f068d18d1 Merge remote-tracking branch 'upstream/master' * [AutoPR web/resource-manager] WebApps - Add ResourceHealthMetadata.json to readme.md for SDK generation (#3178) * Generated from 1c9e1028cea9b1119b0fb396906d412c6d228c8e WebApps - Add ResourceHealthMetadata.json to readme.md for SDK generation * Generated from 4038e1418fea2b1092005a07b4ff72442d0038a1 Change deleted site model to be proxy only resource * WebApp packaging * Web 0.40.0 * Generated from 2cc983b453f0fe2064a3242375bc0979d990bde8 (#3164) Fix unrecognized character in service fabric data plane swagger file * Update Batch SDK to new API version 2018-08-01.7.0. (#3194) * [AutoPR] network/resource-manager (#3154) * [AutoPR network/resource-manager] Added NetworkConfigurationDiagnostic rest API + example (#3095) * Generated from 6ad7c8a080cf905ffcbe9c42c0382059ce753188 Added NetworkConfigurationDiagnostic rest API + example * Generated from 6909b52c5e23056444d410930b8702e7540811e2 Removed 'read-only' from queries in NetworkConfigurationDiagnostic API * Generated from 6e6b30b52851dcd98880dc07125d2fc2faf97576 Added long-running-operation-options: final-state-via location to networkConfigurationDiagnostic API * Generated from f12e6b41326c05506097b75dce076c297074a3d2 Fixed example name * Generated from 9e5daf5f1cd3c59140eec06d6fb55e6456323c54 Fixed reference to ErrorDetails * Generated from 0858a238c818aa119584a9d61deddc2a26494de9 Fixed response for QueryConnectionMonitors API + fixed example * Generated from 377e5cc3f8f10f71d7816d78462fbb68685453bd Fixed types for latencies in networkwatcher.json * Generated from 6b8368dd434d71e004539fe305ae2c2c9cc100a3 (#3166) Removed QueryConnectionMonitors API * Rebuild by https://github.com/Azure/azure-sdk-for-python/pull/3154 * Generated from c588675255041df691fc413f19c346a30538fbb9 (#3189) Fetch upstream master * Make 2018-07-01 the default * Network 2.1.0 * Support __init__.py in packaging [skip ci] * Remove unused space [skip ci] * Update swagger_to_sdk_config.json with JSON schema (#3253) * Update swagger_to_sdk_config.json * Update swagger_to_sdk_config.json * Privates folder and SDK * [AutoPR] hanaonazure/resource-manager (#3251) * Generated from d1446d423e320cce211206a2c7e4230223361674 (#3226) Added HANA instance restart API * Package 0.2.1 * [AutoPR] signalr/resource-manager (#2835) * Generated from 03e114d3a1f7e25099ec02d897257b49db4d196b (#2830) add a new tier * [AutoPR signalr/resource-manager] Add api to list usages of Azure SignalR resources (#3020) * Generated from 6ec3df9b7b3881359ed9687408ab6f6bd0fefed7 add api to list usages of Azure SignalR resources * Generated from 6ec3df9b7b3881359ed9687408ab6f6bd0fefed7 add api to list usages of Azure SignalR resources * Generated from e93d86167dc28119dd3ae4505c5dce528ad92ad6 (#3176) return version/connection string of SignalR * SignalR packaging * SignalR version changelog * Packaging on Jenkins (#3263) * Update PR [skip ci] * [AutoPR] containerinstance/resource-manager (#3055) * Generated from 130558caf04982e77015ceb76133473847b3f061 (#3054) Fix errors in container group update example * Adding restart test * Generated from 5e3cbec47d171de4a66d7303dbc455298817a1e5 (#3265) Adding new changes to the september swagger * Packaging update of azure-mgmt-containerinstance * adding new recording files for updates * Update settings.json * ChangeLog * Generated from 41afecad86851cf0f2955c9042941e245b85d15a (#3285) Adding ability to use private ip * Update version.py * [AutoPR] containerservices/resource-manager (#3298) * Generated from e2c35dbffab196ef19c9580f5ed301e8a4b8d341 (#3297) [AKS] note that only one agent pool is currently supported * Update version.py * [AutoPR] resourcegraph/resource-manager (#3208) * Generated from e58725f13e72bf5ed0b17808debf9d7caeac793c (#3207) ResourceGraph Py conf * ResourceGraph packaging * Add tests for Microsoft.ResourceGraph SDK (#3224) * Add tests * Python 2 support * Generated from 7442759cb5c9c5e38cc411680346176c17a80b08 (#3255) Promote additionalProperties to a dictionary * Update tests for ResourceGraph additionalProperties change (#3268) * Packaging update of azure-mgmt-resourcegraph * Update versionning * [AutoPR] datamigration/resource-manager (#3213) * [AutoPR datamigration/resource-manager] Syncpublicpreview (#3066) * Generated from df63583b7b2c2fcecd4869290499edeb10958d1f Changes for new API version 2018-07-15-preview for database migration service * Generated from 89c9f8caf3a630d2b8897d5c996b453d0c9e0078 additional removal of non-publicpreview items; update default package generated * Generated from 85b755380d05647fca7f26009c998b111fafab63 address multiple comments about phrasing and terminology * Generated from b671aca13c85d49cafa7070fc58749e662c06627 remove extra unexposed scenario mysql to sql * Generated from a1391ee91507153a22e2604974b7003e20442c9a rename data migration to database migration; remove more unused objects * Generated from 79e04cb85ee19db28b0378fa9df03cf4c5b7a4c9 missed a few Data Migration to Database Migration locations * Generated from e09f71700aa005b3d2808e949aab9b2d1c95972d Update readme.md to fix path for PostgreSql task json Update readme.md to fix path for PostgreSql task json * Generated from 17cbeffa83e108bb0c328df426033b94267aa57a Merge branch 'syncpublicpreview' of https://github.com/huang91shu/azure-rest-api-specs into syncpublicpreview * Generated from 6f4da7ea06b3babea19c684ce895ae9b44de85c4 fix travis CI failures due to style * Modified the tests with a new recording file and changed the skus input (#3293) * Packaging update of azure-mgmt-datamigration * Version data migration * [AutoPR] dns/resource-manager (#3272) * Generated from 4cd4e98cda01544d59ad18dbbb293473560c88cd (#3271) Py DNS 2018-05 * Update HISTORY.rst * Update version.py * Make 2018-05-01 default * PyPI client [skip ci] * Detect mixed operation group (#3289) * Detect mixed operation group * Guessing conflicts * [AutoPR] network/resource-manager (#3246) * Generated from 40a59444fdb1c16031dbb33bcb8c81c12effb1c5 (#3245) Add network 2018-07-01 API to Go sdk Also moved Go SDK config to its own config file. * Generated from aafca9c5d4b05246548aeb1b83ce0f1c96c1f635 (#3273) CR rename * [AutoPR network/resource-manager] Local september branch merge to master (#3316) * Generated from cae1d45d0e97bdb064573cb8cb684b881656e4ff Merge branch 'master' into Network-September-Release # Conflicts: # package.json # specification/authorization/resource-manager/readme.nodejs.md # specification/batch/data-plane/Microsoft.Batch/stable/2018-08-01.7.0/BatchService.json # specification/batch/data-plane/readme.md # specification/batch/data-plane/readme.nodejs.md # specification/batchai/resource-manager/readme.nodejs.md # specification/dns/resource-manager/readme.nodejs.md # specification/network/resource-manager/readme.md # specification/notificationhubs/resource-manager/readme.nodejs.md # specification/storage/resource-manager/readme.nodejs.md # specification/storagesync/resource-manager/readme.nodejs.md * Generated from ec5a468540d009a1c1a5ea68073816c00baddd5d fixed api version in azure firewall example * Packaging update of azure-mgmt-network * Generated from e4e4d8af1431b33e8cc8dc7a46448c06dd90d7a4 Merge branch 'Network-September-Release' into local-september-branch * 2.2.0 * Make 2018-08-01 the default * [AutoPR] containerregistry/resource-manager (#3140) * Generated from 86b5463c9e7a593a222031b8c652836efb5f159f (#3123) add option to import images from public registries Allows users to import images from public registries instead of only Azure Container Registries. Only one registry source can be specified. * Generated from 8211af77ca617639df4c4668ca621b6f65c05918 (#3210) Renamed BuildTask to FileTask and RunTask to EncodedTask * Generated from 197f395100edb86248b530d5fd7c794aa00079ed (#3287) ACR conf for 2018-09 and Python * Packaging update of azure-mgmt-containerregistry * Fixing ACR main client * Change default API * ACR 2.2.0 * Code report scanning package [skip ci] * [AutoPR] compute/resource-manager (#2982) * Generated from e5a65ec23a4d0a2102a5a0f1a56ab71672e2730f (#2980) Revert "updated description of sku name values (#3467)" This reverts commit aa50b23846677a1301341f0291ce7f44e3bbb61d. * [AutoPR compute/resource-manager] [Compute] add zone and rolling upgrade. (#3148) * Generated from 8f16e79b245d1c099de8ba5252eee3950d22f3c9 Update compute.json and disk.json for some issues and add zone and rolling upgrade. * Generated from 88a505b7a2de9272891f77bbf24c4eeeb34aa0d2 Update compute.json and disk.json for some issues and add zone and rolling upgrade. * Generated from ad08836a41b5c4ea212ffcd06af67ba8eb6a3fdb (#3195) RDBug 13056055 Public documentation should be updated to reflect that VMSizesController.GetVMSizes api is deprecated * Generated from 8741aed33b77989e144e30c2229e44db19aa1265 (#3223) Added the replica count change. * Generated from 8075c104d20105cdae5434e5d808f827dd9f19de (#3278) Fix description for disk size * Compute 4.1.0 * Packaging update of azure-mgmt-compute * [AutoPR compute/resource-manager] Swagger spec for disk.json 2018-06 (#3310) * Generated from f128ff0876f538e2cba5b92988bc54b3c041b623 Update readme.md * Packaging update of azure-mgmt-compute * Change default API * Generated from c5cdad53036869893fca1fc5c7658a1dd85e3e59 deleting duplicates * Fix tests * ChangeLog * Add new profile 2018-03-01-hybrid (#3288) * Add new profile 2018-03-01-hybrid * Add Dns, storage-data, cosmosdb modules * Removed multiapi.storage and cosmosdb packages from 2018-profile * azure-common 1.1.15 * Rdbms1.3.0 (#3340) * Generated from 3ef310e770e8238acf53b192ef2a19295a7e3302 (#3150) (#3182) Add serverSecurityAlertPolicies APIs for MySQL servers * Generated from 16bfdf572dc08bae96c0b6ee521c1524b19254d7 (#2875) (#2876) Add support for PG 10 * [AutoPR] mariadb/resource-manager (#3332) * [AutoPR mariadb/resource-manager] Add mariadb swagger spec (#3257) * Generated from d76559bb32dbc6be98d3f9cc774377be21694188 Add mariadb swagger spec * Generated from 74e04a40cc63c0e6634cce5256bc660b8986132e Fix readme and set properties * Packaging update of azure-mgmt-rdbms * Update version.py * 1.3.0 * Add support for more complex output file [skip ci] * [AutoPR] network/resource-manager (#3347) * [AutoPR network/resource-manager] Add 202 response code as expected for network profile deletion (#3346) * Generated from 5f80ab752b1ce5f0c6f8f85f77faac6a761c0923 add 202 response code as expected for network profile deletion add 202 to delete example * Generated from 29d8e659f90393d32f1a762f293cd7b3acb5644f added 200 response code for network profile * 2.2.1 * Improve code report [skip ci] * Code report and ChangeLog improvment [skip ci] * [Batch] Patch TaskOperations.add_collection with convenience functionality (#3217) * patch file for bulk add task * Update bulk task add to use local sdk references and added tests * Update error handling * update doc text * Dynamically inject custom error into models * [AutoPR] alertsmanagement/resource-manager (#3342) * [AutoPR alertsmanagement/resource-manager] AlertsManagement RP GA version (#3336) * Generated from e42ba135c9a4ce5aeef15e2335197e579b532cd9 Modifying the pointers to stable version * Generated from 796b77aad1e4117699fe386eb6bd5245d8bfac9c Fixing the linter diff errors * Packaging update of azure-mgmt-alertsmanagement * Generated from 22519ee816e721f80fe5c8f1d19c1e4c62cbb092 Fixing linter error - duplicate parameter * Update version.py * Update sdk_packaging.toml * Packaging update of azure-mgmt-alertsmanagement * Update HISTORY.rst * 3.4 allowed failure to workaround vcrpy 2.0.0 (#3405) * Update PR should do nothing on nspkg * Revert "3.4 allowed failure to workaround vcrpy 2.0.0" (#3416) * Revert "Update PR should do nothing on nspkg" This reverts commit e14eaf78425e733645442f6aebf72c70c79efc92. * Revert "3.4 allowed failure to workaround vcrpy 2.0.0 (#3405)" This reverts commit 41ff15bfbd48dd318c87d467218b375df316c631. * Auto-update parameter for toml (#3419) * Update Batch patch structure and documentation - no functionality change (#3421) * azure nspkg 3.0 (#3412) * Main azure nspkg 3.0 * Adapt dev_setup to new nspkg * New nspkg system * Auto-update parameter for toml * Common with new packaging style * Kill install old nspkg * Ignore packaging for bundle package * Don't auto-update Cognitive Services nspkg * azure-nspkg no auto-update * Cognitive Services new packaging * Dataplane new packaging * Never auto-update the nspkg * All packages which didn't have toml file * Manual pkgutil for not auto-update * Batch commit all package with already a toml * azure-nspkg 3.0.0 and dev_setup for easy backward compat * Python ignore requires on Py3 * Ignore required for all packages * Uninstall azure-nspkg * Install nspkg in wheel mode, not editable * Improve gitignore * Cognitive Services new nspkg * Improve azure-mgmt-nspkg * Update ADL nspkg * PEP420 ChangeLog [skip ci] * [AutoPR] compute/resource-manager (#3383) * [AutoPR compute/resource-manager] More detail added to the descriptions. (#3379) * Generated from 3e469dd4a038e012849e46c67479c06383438b59 More detail added to the descriptions. Changes made to description strings. * Generated from 67ce182a3a8d197dc80e43e909f4497f5187447e Addressed review comments Addressed review comments on the updateable fields. * Generated from a92afaeaf927c92e6784981875d29e83174a6e07 Added another updateable property description Added another updateable property description * Generated from ad369e69d0583a6198e9969b7c318e267d8c6729 (#3394) Updated comments and introduced AvailabilitySetSkuType to help users use predefined constants * Generated from 7d119071aeb883d55e9860d9ccdbf74050ce856b (#3402) Made minor change to gallery swagger. * [AutoPR compute/resource-manager] Add api version 2018-10-01 for Microsoft.Compute (#3404) * Generated from cf4aa82f2f8b9745ddac737bf309b1feec83c5bc Soft reset from Azure Repository * Generated from 71cfd635af943e3e36cb382a4677700861afae02 Added API version 2018-10-01 * [AutoPR compute/resource-manager] Swagger changes for adding diffdisksettings property for the Ephemeral OS Disks (#3373) * Generated from 2f5219561aefc8c0d87bb9b62d5fc8f222f2b842 updated comment * Generated from 3286411fb1aa50b4ef9633cfdd4403f6357d1cf0 updated swagger specs for diffdisksettings property * Generated from f8934d4e93099dec66995c9fdeccd02d7fb535bd updated swagger spec comments for diff disk settings [property * Generated from 474d5b03008f5780dcb546ed5264bae7eb3d8e59 updated 2018-10-01 version specs with diffdisk property * [AutoPR compute/resource-manager] Swagger change for adding status to BootDiagnosticsInstanceView (#3407) * Generated from 9855ec03e53f44f96c32a2fa1089ac852998dfee Updated compute.json * Generated from 05aee80018965c46bc328df16dc79b315e4ecc22 Made BootDiagnosticsInstanceView properties readOnly * Generated from 05aee80018965c46bc328df16dc79b315e4ecc22 Made BootDiagnosticsInstanceView properties readOnly * [AutoPR compute/resource-manager] Swagger change for listing virtual machines in a subscription by location (#3418) * Generated from 3be1a911d16b8296adaedaa7f947fbdd04e85d19 Updated compute.json * Generated from ae050a8fdd8c727b1344880df360fc78188bbd56 Merge branch 'master' into locations_virtualMachines * Generated from f8fd0b64d1e5cdcbac402960aea82d5f0b2838a0 Merge branch 'master' into locations_virtualMachines * Packaging update of azure-mgmt-compute * [AutoPR compute/resource-manager] Set location for the final state option of the POST long running disk… (#3431) * Generated from 001427fae9affdb238c7bcb30cf81da5fd96e546 Set location for the final state option of the POST long running disk operations. * GrantAccess test (#3430) * Remove deprecated file * Compute 4.2.0 * azure-common 1.1.16 (#3441) * [AutoPR] storage/resource-manager (#3352) * [AutoPR storage/resource-manager] [Storage] add new stroage account kind "FileStorage" and "BlockBlobStorage" and new feature fileaadIntegration (#3318) * Generated from b302acfa33f5057b5fe7a77668a47130a6e4318c [Storage] Support FileAadIntegration * Packaging update of azure-mgmt-storage * Generated from 3007b1499f670d9d89bbbc28a3c33b100e7ca8bc Storage Python conf * Generated from ee55d36d740bf9dfd5dcf1b5c451c6258098febf Merge branch 'newkindFileaad' of https://github.com/blueww/azure-rest-api-specs into newkindFileaad * Generated from 3499e479c52c5c82aefb739d1c36f58437c532b1 Merge branch 'newkindFileaad' of https://github.com/blueww/azure-rest-api-specs into newkindFileaad * Generated from 123546805d4694682929d84962c0e806253d4e7c [Storage] modify as server change: remove global usage and add Premium_ZRS * Generated from 7a5b7c3085a95f87c2e25177e4790f7fabd59b58 [Storage] Add back ManagmentPolicy on 2018-03-01-preview * Generated from fc863cb848af5814389229e3b0eecd75bce5721a [Storage] remove global usage as server change * Generated from d6eb4ce08758f93e2568173ff26e3b21fa50edec [Storage] move Management policy swagger to 2018-03-01-preview folder * 2018-07-01 new default * Storage 3.0 * [AutoPR] servicebus/resource-manager (#3331) * Generated from 573a9f4a9ab376dfb55727afc18d90f7b9c6a498 (#3221) changed the preview swagger name * Packaging update of azure-mgmt-servicebus * [AutoPR servicebus/resource-manager] ServiceBus: Added read-only property migrationState to MigrationConfig (#3435) * Generated from 9a98bac6ece54a9768cde679cb75741e9ccd993f Added readonly property migrationState to MigrationConfig * Packaging update of azure-mgmt-servicebus * Update version.py * ChangeLog 0.5.2 * ChangeLog fixes [skip ci] * azure-nspkg 3.0.1 (#3483) * azure-nspkg 3.0.1 * azure-mgmt-nspkg 3.0.1 * azure-mgmt-nspkg 3.0.1 * nspkg 3.0.2 (#3488) * azure-nspkg 3.0.2 * azure-mgmt-nspkg 3.0.2 * [AutoPR] compute/resource-manager (#3437) * Generated from bc9772e8cab8538e646287e7842dbccc968c59c6 (#3436) Typo * Update version.py * Generated from fe7933fcaf05884a7da733e0979f26c42e30c917 (#3450) Compute conf for py 2018-10-01 * Generated from 4927713e353793ac5f22f0c0954e51ba5623034e (#3454) Added VirtualMachineImageProperties.AutomaticOSUpgradeProperties in GET VMImageVersion API Added VirtualMachineImageProperties.AutomaticOSUpgradeProperties in GET VMImageVersion API * Move to 2018-10-01 * ChangeLog 4.3.0 * [AutoPR] mediaservices/resource-manager (#3446) * [AutoPR mediaservices/resource-manager] Adding version 2018-07-01 for Microsoft.Media (#3401) * Generated from fa2a9f24f25160f19703cda53546c96088bbe1d8 Adding version 2018-07-01 for Microsoft.Media * Packaging update of azure-mgmt-media * Update version.py * ChangeLog * Makie it stable * [AutoPR] containerinstance/resource-manager (#3489) * Generated from 9a5541421e8815773449ba570834099b97025183 (#3484) Moving MSI Identity object to correct properties * adding test for msi identity in container groups * Update version.py * ACI changelog * [AutoPR] cosmos-db/resource-manager (#2781) * Generated from 6d9c73eb24e60d117da852b974504d93e47d1a3c (#2744) renaming older operation * [AutoPR cosmos-db/resource-manager] Adding parameter enableMultipleWriteLocations in Cosmos DB (#3466) * Generated from 6b73420d0a83a786389d2ef92484aa8df383c74a adding parameter enableMultipleWriteLocations when creating account to support multi-master * Packaging update of azure-mgmt-cosmosdb * Packaging update of azure-mgmt-cosmosdb * Re-record tests * Version 0.5.0 * [AutoPR] restapi_auto_graphrbac/data-plane (#2032) * Generated from 282617e562ce86949c550d7aaf5e10fb86552272 (#2013) Added custom key identifier * [AutoPR graphrbac/data-plane] Added OAuth2 GET and POST to GraphRBAC.json spec (#3063) * Generated from 7e6768db7f5cf3600aa596cf9c488c6b5ca34ca2 OAuth2 Permissions added to GraphRBAC stable * Generated from dfc2c5676d5c7be8c4ec55a4356e36cc677ee916 OAuth2Permissions and added Service Principal query by AppId * Generated from 6aa96687989842d043047ab3b93cd2e5e66b5dd5 OAuth2 Permissions added to GraphRBAC stable cleanup and validate * Generated from d2bcb30a79b50cc976ba2b049ff780f8ab8d8292 Permissions added to GraphRBAC model rename and linter issues addressed * Generated from 34825096e936c6c8ee69981113b58cd094f18e8f Add description to post body for OAuth2 Permissions * Rebuild by https://github.com/Azure/azure-sdk-for-python/pull/2032 * Fix test for GraphRbac and Autorest 3.x * Packaging update of azure-graphrbac * [AutoPR graphrbac/data-plane] GraphRBAC (#3244) * Generated from 38da2338b7f2a290829acc0a0cd49cf1edc4cc0b Backward compat for ApplicationAddOwnerParameter * Generated from cdebe8cf0d91d18108365b4a12041034983e9c93 Fix pageable * Generated from b4cbab2542757412fd65a260fce4db66402f7339 Odata support for me/ownedObjects * Generated from cdebe8cf0d91d18108365b4a12041034983e9c93 Fix pageable * Generated from 89ee79b8d1b444917dc0f8962ecfaf6a9cfa3328 Rename list deleted apps * Generated from 876ad7a85c38b9cebaf850cc330e9426c1cf6b37 Fix pageable * Generated from fd2fd304255560910d77c7c6a9befe9463f9435c Add filter to list deletedApp * Generated from 8128b10ff61e1bfa9804116016b123bc3f3eb472 ListOwnedObject next * Generated from 3a866e49fbfe1527711a06527c86e3834d049ad8 AppRoles to create/update * Test SignedInUser * Test deleted apps * Test AppRoles * Generated from 04d197ad2a8922a79bd2ea253b07aff0175d4f87 Add SP update * Generated from 48aa8260d0f81091922fd75f5b5f2038f99ca4dc Add SP update * Generated from f338c565c9b0d1073820c866848e3003e36bd15d Add SP update * SP update * Generated from 0e9e02eb70d464b996b5870f0a25d7be243fe1ac Breaking changes to clean-up * Generated from 9c0eebd27cb20ef36a1f377d3550bebce47b0def Fix doc * Generated from 203554316693c183cd5e1c03f4cac598e42c4ed8 Remove incorrect required * Packaging update of azure-graphrbac * Test get_objects_by_object_ids * Packaging update of azure-graphrbac * Update version.py * Packaging update of azure-graphrbac * Generated from 3854ef67da587db1215bfdd4cba1d34bcd2ebc79 (#3533) Update graphrbac.json * Rebuild by https://github.com/Azure/azure-sdk-for-python/pull/2032 * 0.50.0 ChangeLog * Remove deprecated file * GraphRBAC 0.50.0 from #2032 * Generated from dad49351288e4f30220300156d2cfccf9055a949 (#3546) (#3547) Fix operation named missed in #3947 * [AutoPR] mysql/resource-manager (#3469) * Generated from 76883a32f2c9aa596a7c0ceefb356637708d6ed3 (#3468) Change 'primary' to 'master' in replication specs * Update version.py * MySQL ChangeLog * Make RDBMS stable officially * Packaging update of azure-mgmt-rdbms * [AutoPR] graphrbac/data-plane (#3570) * [AutoPR graphrbac/data-plane] [GraphRBAC] Add delete owner (#3560) * Generated from 46cf67ff714c2a733555738f1a78662d8d865d1c Add delete owner * Test remove owner * ChangeLog and version * Make multiapi script better in extracting api_version from inside the code [skip ci] * [AutoPR] advisor/resource-manager (#2843) * [AutoPR advisor/resource-manager] Swaggerfix (#2721) * Generated from 8f325f540f597ae184379bed0676e8cdfd42039f Add C# settings * Generated from a3db9ba57ede1858830cee525cf8f2bb9124e143 Remove wrong tag * [AutoPR advisor/resource-manager] Add extended properties to recommendation model (#3015) * Generated from 2be7ef7e6f683c16e394595b2570e3e9d131e676 Add extended properties to recommendation model * Generated from 2be7ef7e6f683c16e394595b2570e3e9d131e676 Add extended properties to recommendation model * Packaging * Packaging update of azure-mgmt-advisor * Fix sdist template * Compute 4.3.1 (#3619) * Fixes warning about session reuse. (#3613) * azure-batch 5.1.1 (#3625) * Fixing broken sdist (#3624) * azure-mgmt-advisor 2.0.1 * azure-graphrbac 0.51.1 * azure-mgmt-rdbms 1.4.1 * azure-mgmt-cosmosdb 0.5.1 * azure-mgmt-containerinstance 1.2.1 * azure-mgmt-media 1.0.1 * ADL nskpkg 3.0.1 (#3631) * ADL nskpkg 3.0.1 * missing sys * Improve manifest * [AutoPR] cognitiveservices/data-plane/Face (#3011) * Generated from 3822585577dd1ffd3c0c742aa30b131f84d20183 (#2993) [cognitive Services] Update endpoint URL template for Face. * [AutoPR cognitiveservices/data-plane/Face] [Cogs Face] Align with latest released version of Face API with million-scale features. (#3049) * Generated from 9b4c21a58071bdaf26a5ced0fa4a283077617af1 Nit fix documentation. * Generated from a2c9e881121ab738c6142713fd66d08629b7a475 Nit path case refinement. * Generated from 40abfc7205d1bf373e19dca40394598fa9da4843 Fix LargeFaceListFace_List to LargeFaceList_ListFaces and refine example naming. * Generated from 6019c551df19f24b8a70a2c9d8f691b43cf7f195 [Minor] Person_AddPersonFace to Person_AddFace. * Generated from a43b96d1f8ebea7d96449c4fa459519b0c48335e [Minor] Amend last commit of Person_AddPersonFace to Person_AddFace. * Update face test aligning with latest changes. (#3103) * Update version.py * Packaging update of azure-cognitiveservices-vision-face * Packaging update of azure-cognitiveservices-vision-face * Face packaging adjustement * Improve venv management [skip ci] * [AutoPR] containerregistry/resource-manager (#3467) * Generated from 13f78c9f9be8ff71afffbe76b21c7b0687b70ea8 (#3452) Add ContextPath and source location URL for encode task and run type, add support for pull request based trigger. * Generated from 7d58dd0e73fb2740d7ebe8e534a973e959395d68 (#3477) allow specifying credentials for source registry on import image * [AutoPR containerregistry/resource-manager] [ACR] Auto Build Swagger: Added identity to registry properties (#3491) * Generated from a9ff5f330e569cbbdfded62d6506e9fe2b71f9ae Added identity to registry properties * Generated from 454d0e161ff250d2b0d4301d8375d74487249f30 CR comments * Generated from 185e2e930d7cd67eb43fee8264dd52b805f87ec0 CR comments * Generated from 185e2e930d7cd67eb43fee8264dd52b805f87ec0 CR comments * [AutoPR containerregistry/resource-manager] Xiadu/msi (#3580) * Generated from 9a9e5ed8ac100538a6ceaff6c0a24b16ad2c0e26 remove the identity properties * Generated from f3b3520c32cfe447a5f85b6491d65d59855b440a remove the identity properties * Packaging update of azure-mgmt-containerregistry * ACR 2.3.0 * [AutoPR] sql/resource-manager (#2671) * [AutoPR sql/resource-manager] Adding new value to VA baseline name (#2640) * Generated from 03645a856ba34f572618832814b410d8e2410ba2 Adding new value to VA baseline name Adding new value to VA baseline name * Generated from c9946efbfaf9f6a9f7765878a337784756ce951c Fix typo Fix typo * Generated from c3621b01ece4897d91763a7e4ba8d1e29d4d6832 Updating VulnerabilityAssessmentPolicyBaselineName * Generated from 5c8646bff054ea42bb05bef708e3c66c7d005c2e Fixed all comments * [AutoPR sql/resource-manager] Adding serverSecurityAlertPolicies.json from pr (#2697) * Generated from 462e8a68d6f8e8d169a1bf4340ca64ebdbce314d Fix validation error * Generated from bd7ff47b3e8549566c77c4ebc7de1e86703ac29e fixed comments * Generated from bd7ff47b3e8549566c77c4ebc7de1e86703ac29e fixed comments * [AutoPR sql/resource-manager] Add BackupShortTermRetentionListResult and update exceptions (#2711) * Generated from f2bb07205397d5771778173d8fc08e1660441fc7 Add BackupShortTermRetentionListResult and update exceptions * Generated from ca8661c9673dc5775e0bc7ce94fb773805235953 Use comnmon definition for ProxyResource * Generated from 65482c1a0eb55bd7b3dbf9be9f7018a0df05d229 Add ListShortTermRetentionPoliciesByDatabase example * [AutoPR sql/resource-manager] Fixed inconsistent definitions for SQL 2014 apis. (#2719) * Generated from 929fcc6c506c0ca401f39a48a3ea55a0a948f9e9 Fixed inconsistent definitions for SQL 2014 apis. * Generated from 929fcc6c506c0ca401f39a48a3ea55a0a948f9e9 Fixed inconsistent definitions for SQL 2014 apis. * Generated from a82909eab07e7a383975701b09d09a5fd0dfb967 (#2751) adding new state value to keep backward competiblity adding new state value to keep backward competiblity * [AutoPR sql/resource-manager] Adding Swagger for POST APIs used to upload a customer TDE certificates (#2759) * Generated from e3529a46fd8d20ae6db5a542fe9762a365879439 Adding Swagger for POST APIs used to upload a customer TDE certificate in CMS * Generated from 9f0ba3d29675d6160b4cd881c52991fef58e0927 Addressing Jared's comment on PR - Remove certificateName property - Remove Resource and ProxyResource manually - Edit TdeCertificate to reference "../../../common/v1/types.json#/definitions/ProxyResource" * Generated from 8a72b9ba5c2b5c8621cd628c62702a0bd4933259 Adding to all package-composite-v* and package-pure of appropriate version * Generated from 7ddb78c4a14cb8b09c405b2ae17b49ff26c23bf5 (#2892) Swagger of sensitivity labels APIs Adding swagger containing APIs of sensitivity labels, as long as usage examples of these APIs. * [AutoPR sql/resource-manager] [DO NOT MERGE] Add DatabaseVulnerabilityAssessments swagger (#2831) * Generated from 6444d2002961b584bdaf3c93623a498ca3066cde Clean non required params in version 10-2017 clean databaseVulnerabilityAssessmentScans * Generated from 135edfbe1c84314a9e283bc0f095e673dadbf6e0 fix error in execute scan example * Generated from 359416b0d2b799768c78568f0ecc5acab439c956 (#3077) fix SQL VA command copy paste typo Fix storageAccountAccessKey description. * [AutoPR sql/resource-manager] [DO NOT MERGE] Adding VA support for manged instance (#2872) * Generated from cb4adee8b49beb3221fbdb9f601ac7ea44b5af4a Adding VA support for manged instance * Generated from cb4adee8b49beb3221fbdb9f601ac7ea44b5af4a Adding VA support for manged instance * Generated from 05549665a5f0b09fc5e7058ffec2c09d91bf3ab0 (#3127) managed instance data classification REST API for version 2018-06-01-preview * [AutoPR sql/resource-manager] New Cmdlets for Management.Sql to allow customers to add TDE keys and set TDE protector (#3227) * Generated from bdb271f9fc7fa148176e6470e7e5b27cc2450c73 Changes for ManagedInstanceEncryptionProtectors * Generated from 724082f8646ab05191f7eee135fd674fd26d1a94 Changing operation id to ListByInstance as per Jared's recommendation * Generated from f5321fc054067d1d4e8937cfc92452bf4a6a4950 Addressed comments By @anuchandy - Changed comment to created or updated - changed operation if to listByInstance * [AutoPR sql/resource-manager] Remove sensitivityLabels from sql readme.md (#3296) * Generated from d49a9a7c5467546766948196e4ea8604951dbd1f Remove sensitivityLabels from sql readme.md There is a temporary issue with publishing the SDK containing this API, so it is removed from readme.md to avoid generating SDK. * Packaging update of azure-mgmt-sql * Generated from ae5e50da51607b6c59745d9d2969c4f6acba0d81 (#3326) Add algorithm types to threat detection disabled alerts description Added Data_Exfiltration and Unsafe_Action as allowed values to disabled alert. * [AutoPR sql/resource-manager] Swagger Changes to Add DnsZonePartner and Collation into Managed Instance (#3323) * Generated from d2e5203aaa23dc19a85a7242ff35baf7f45a5a54 Merge branch 'master' of https://github.com/ziwa-msft/azure-rest-api-specs * Generated from c4ce7b1e5f908cad7a0e13b6d9f5e2cbc54fce45 Manually removing specific definations for SKU and ResourceIdentity * Generated from 4e408cf25e90c40117abd3e7672f42187936a80d Fix indentations and misspel * [AutoPR sql/resource-manager] Adding VA support for manged instance - Update readme.md (#3482) * Generated from 1d3074c3f3f50b396875f414d62eec4195234f83 Update readme.md * Packaging update of azure-mgmt-sql * Packaging update of azure-mgmt-sql * Update version.py * Update HISTORY.rst * Update HISTORY.rst * [AutoPR] eventgrid/resource-manager (#2902) * Generated from e1fc2e1bdad54c396693d98c655354fc82f8f36b (#2885) 1) Fix for linter error "Properties of a PATCH request body must not be default-valued. PATCH operation: 'EventSubscriptions_Update' Model Definition: 'EventSubscriptionUpdateParameters' Property: 'eventDeliverySchema'". 2) Updated the default value of EventDeliverySchema to the correct value used by the service. * Generated from b4273ec0b368f83e73154dec7bfcffc5b9135f5f (#3229) Swagger changes for 2018-09-15-preview API version. * Packaging update of azure-mgmt-eventgrid * [AutoPR eventgrid/resource-manager] EventGrid: Updated README.MD configuration to include the new preview API version. (#3292) * Generated from 569674609f3c16360c668e5b0693bdd4385700ec Merge remote-tracking branch 'upstream/master' * Generated from f05cde9aaf9ffa3a4a72406033a5d6527cd94fab Added two new operatorTypes to AdvancedFilter + marked a couple of properties readOnly. * Generated from 731d3b6b72a89918dcd03171a26854c8e55b4147 (#3364) README.md changes: Updated default tag for global settings and updates to multi-api settings. * [AutoPR eventgrid/resource-manager] EventGrid: Update README files to include the current new preview api… (#3615) * Generated from ce8469266acf934b97b1cc71b6610123b24710b6 EventGrid: Update README files to include the current new preview api version 2018-09-preview * Packaging update of azure-mgmt-eventgrid * Packaging update of azure-mgmt-eventgrid * Packaging update of azure-mgmt-eventgrid * EventGrid 2.0.0rc2 * Added a new test + re-recorded all tests. * [AutoPR] iotcentral/resource-manager (#3137) * Generated from e12609aa0c7e69c6c34418f791480e311efe1317 (#3132) move stable iotcentral Go SDK package out of preview directory The 2018-09-01 package was incorrectly placed under the preview directory. Moved Go SDK config section to its own config file. * [AutoPR iotcentral/resource-manager] IoTCentral - Add ARM endpoint, update model responses/inputs to align with expected values (#3444) * Generated from ddbb8ffb2dd676863a74cd5d44748fbd93a93025 Update models to align with expected responses * Packaging update of azure-mgmt-iotcentral * Generated from 09b4a4594660bc1c21dc7122a3784f64867a041e Fix build errors * Generated from 1c89739e3a40c9bf7a6f40e86367d50e6b88f776 Add required field to definitions * Generated from 92118d9753329c57349608f197514100d250974a Revert model name change. * Generated from f0df5982f4b75520b1b163b84ea33c9a81d6e79b add x-ms-client-flatten to errorSchema * Generated from 08b88d3a11055327409eafebcdac134e797bd38b Test default required field for .net SDK * Packaging update of azure-mgmt-iotcentral * Generated from 3089cb519400047ddfeaffa5fac50c5f1c7a3c85 test enum default * Generated from f878943d61f7e1cd88a4c5ff31a56c73e3ec0a00 revert test changes * Packaging update of azure-mgmt-iotcentral * IOTCentral 0.3.0 * IoT is 1.0.0 * SBMgmt 0.5.3 (#3708) * SBMgmt 0.5.3 * Packaging update of azure-mgmt-servicebus * [AutoPR] eventhub/resource-manager (#3240) * Generated from 45160436f44d3449f1959b1fc0b98ef313140d06 (#3232) correction in the type of List API of VirtualNetwork * [AutoPR eventhub/resource-manager] EventHub: moved VNet, IpFilter rules and Kafka from 2018-preview to 2017 API Version (#3627) * Generated from 9bda7330f3302a3aca9893b278456f3b3b81fc45 moved VNet, IpFilter rules and Kafka from 2018-preview to 2017 API version * Packaging update of azure-mgmt-eventhub * Generated from 51ea9d092ef7f025479e8e3b616f5d67a7271483 (#3686) added kafkaEnabled to Namespace * Packaging update of azure-mgmt-eventhub * EH Mgmt 2.2.0 * Generated from 891aee387f50b4c4cad82149d7eefb77cc477e54 Python conf for Authorization 2018-09-01-preview * Packaging update of azure-mgmt-authorization * Generated from a9de6520660dc3ec1b309616e098c2d6668898c0 Missing batch conf * Remove pointless file * Hub client for authorization --- azure-mgmt-authorization/MANIFEST.in | 3 + .../authorization_management_client.py | 38 +- .../v2018_07_01_preview/__init__.py | 18 + .../authorization_management_client.py | 81 ++ .../v2018_07_01_preview/models/__init__.py | 30 + .../models/deny_assignment.py | 85 ++ .../models/deny_assignment_filter.py | 39 + .../models/deny_assignment_filter_py3.py | 39 + .../models/deny_assignment_paged.py | 27 + .../models/deny_assignment_permission.py | 44 ++ .../models/deny_assignment_permission_py3.py | 44 ++ .../models/deny_assignment_py3.py | 85 ++ .../v2018_07_01_preview/models/principal.py | 46 ++ .../models/principal_py3.py | 46 ++ .../operations/__init__.py | 16 + .../operations/deny_assignments_operations.py | 510 ++++++++++++ .../v2018_07_01_preview/version.py | 13 + .../v2018_09_01_preview/__init__.py | 18 + .../authorization_management_client.py | 96 +++ .../v2018_09_01_preview/models/__init__.py | 55 ++ .../authorization_management_client_enums.py | 26 + .../v2018_09_01_preview/models/permission.py | 40 + .../models/permission_paged.py | 27 + .../models/permission_py3.py | 40 + .../models/provider_operation.py | 48 ++ .../models/provider_operation_py3.py | 48 ++ .../models/provider_operations_metadata.py | 50 ++ .../provider_operations_metadata_paged.py | 27 + .../provider_operations_metadata_py3.py | 50 ++ .../models/resource_type.py | 37 + .../models/resource_type_py3.py | 37 + .../models/role_assignment.py | 61 ++ .../role_assignment_create_parameters.py | 55 ++ .../role_assignment_create_parameters_py3.py | 55 ++ .../models/role_assignment_filter.py | 32 + .../models/role_assignment_filter_py3.py | 32 + .../models/role_assignment_paged.py | 27 + .../models/role_assignment_py3.py | 61 ++ .../models/role_definition.py | 66 ++ .../models/role_definition_filter.py | 32 + .../models/role_definition_filter_py3.py | 32 + .../models/role_definition_paged.py | 27 + .../models/role_definition_py3.py | 66 ++ .../operations/__init__.py | 22 + .../operations/permissions_operations.py | 186 +++++ ...provider_operations_metadata_operations.py | 166 ++++ .../operations/role_assignments_operations.py | 729 ++++++++++++++++++ .../operations/role_definitions_operations.py | 366 +++++++++ .../v2018_09_01_preview/version.py | 13 + azure-mgmt-authorization/build.json | 183 ----- 50 files changed, 3789 insertions(+), 185 deletions(-) create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/__init__.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/authorization_management_client.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/models/__init__.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/models/deny_assignment.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/models/deny_assignment_filter.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/models/deny_assignment_filter_py3.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/models/deny_assignment_paged.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/models/deny_assignment_permission.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/models/deny_assignment_permission_py3.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/models/deny_assignment_py3.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/models/principal.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/models/principal_py3.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/operations/__init__.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/operations/deny_assignments_operations.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/version.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/__init__.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/authorization_management_client.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/__init__.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/authorization_management_client_enums.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/permission.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/permission_paged.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/permission_py3.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/provider_operation.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/provider_operation_py3.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/provider_operations_metadata.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/provider_operations_metadata_paged.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/provider_operations_metadata_py3.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/resource_type.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/resource_type_py3.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_assignment.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_assignment_create_parameters.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_assignment_create_parameters_py3.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_assignment_filter.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_assignment_filter_py3.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_assignment_paged.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_assignment_py3.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_definition.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_definition_filter.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_definition_filter_py3.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_definition_paged.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_definition_py3.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/operations/__init__.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/operations/permissions_operations.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/operations/provider_operations_metadata_operations.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/operations/role_assignments_operations.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/operations/role_definitions_operations.py create mode 100644 azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/version.py delete mode 100644 azure-mgmt-authorization/build.json diff --git a/azure-mgmt-authorization/MANIFEST.in b/azure-mgmt-authorization/MANIFEST.in index bb37a2723dae..6ceb27f7a96e 100644 --- a/azure-mgmt-authorization/MANIFEST.in +++ b/azure-mgmt-authorization/MANIFEST.in @@ -1 +1,4 @@ include *.rst +include azure/__init__.py +include azure/mgmt/__init__.py + diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/authorization_management_client.py b/azure-mgmt-authorization/azure/mgmt/authorization/authorization_management_client.py index edbb71132e28..6184af881cef 100644 --- a/azure-mgmt-authorization/azure/mgmt/authorization/authorization_management_client.py +++ b/azure-mgmt-authorization/azure/mgmt/authorization/authorization_management_client.py @@ -78,11 +78,12 @@ class AuthorizationManagementClient(MultiApiClientMixin, SDKClient): :type profile: azure.profiles.KnownProfiles """ - DEFAULT_API_VERSION='2018-01-01-preview' + DEFAULT_API_VERSION='2018-09-01-preview' _PROFILE_TAG = "azure.mgmt.authorization.AuthorizationManagementClient" LATEST_PROFILE = ProfileDefinition({ _PROFILE_TAG: { 'classic_administrators': '2015-06-01', + 'deny_assignments': '2018-07-01-preview', None: DEFAULT_API_VERSION }}, _PROFILE_TAG + " latest" @@ -110,6 +111,8 @@ def models(cls, api_version=DEFAULT_API_VERSION): * 2015-06-01: :mod:`v2015_06_01.models` * 2015-07-01: :mod:`v2015_07_01.models` * 2018-01-01-preview: :mod:`v2018_01_01_preview.models` + * 2018-07-01-preview: :mod:`v2018_07_01_preview.models` + * 2018-09-01-preview: :mod:`v2018_09_01_preview.models` """ if api_version == '2015-06-01': from .v2015_06_01 import models @@ -120,8 +123,14 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2018-01-01-preview': from .v2018_01_01_preview import models return models + elif api_version == '2018-07-01-preview': + from .v2018_07_01_preview import models + return models + elif api_version == '2018-09-01-preview': + from .v2018_09_01_preview import models + return models raise NotImplementedError("APIVersion {} is not available".format(api_version)) - + @property def classic_administrators(self): """Instance depends on the API version: @@ -135,18 +144,34 @@ def classic_administrators(self): raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def deny_assignments(self): + """Instance depends on the API version: + + * 2018-07-01-preview: :class:`DenyAssignmentsOperations` + """ + api_version = self._get_api_version('deny_assignments') + if api_version == '2018-07-01-preview': + from .v2018_07_01_preview.operations import DenyAssignmentsOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def permissions(self): """Instance depends on the API version: * 2015-07-01: :class:`PermissionsOperations` * 2018-01-01-preview: :class:`PermissionsOperations` + * 2018-09-01-preview: :class:`PermissionsOperations` """ api_version = self._get_api_version('permissions') if api_version == '2015-07-01': from .v2015_07_01.operations import PermissionsOperations as OperationClass elif api_version == '2018-01-01-preview': from .v2018_01_01_preview.operations import PermissionsOperations as OperationClass + elif api_version == '2018-09-01-preview': + from .v2018_09_01_preview.operations import PermissionsOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -157,12 +182,15 @@ def provider_operations_metadata(self): * 2015-07-01: :class:`ProviderOperationsMetadataOperations` * 2018-01-01-preview: :class:`ProviderOperationsMetadataOperations` + * 2018-09-01-preview: :class:`ProviderOperationsMetadataOperations` """ api_version = self._get_api_version('provider_operations_metadata') if api_version == '2015-07-01': from .v2015_07_01.operations import ProviderOperationsMetadataOperations as OperationClass elif api_version == '2018-01-01-preview': from .v2018_01_01_preview.operations import ProviderOperationsMetadataOperations as OperationClass + elif api_version == '2018-09-01-preview': + from .v2018_09_01_preview.operations import ProviderOperationsMetadataOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -173,12 +201,15 @@ def role_assignments(self): * 2015-07-01: :class:`RoleAssignmentsOperations` * 2018-01-01-preview: :class:`RoleAssignmentsOperations` + * 2018-09-01-preview: :class:`RoleAssignmentsOperations` """ api_version = self._get_api_version('role_assignments') if api_version == '2015-07-01': from .v2015_07_01.operations import RoleAssignmentsOperations as OperationClass elif api_version == '2018-01-01-preview': from .v2018_01_01_preview.operations import RoleAssignmentsOperations as OperationClass + elif api_version == '2018-09-01-preview': + from .v2018_09_01_preview.operations import RoleAssignmentsOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -189,12 +220,15 @@ def role_definitions(self): * 2015-07-01: :class:`RoleDefinitionsOperations` * 2018-01-01-preview: :class:`RoleDefinitionsOperations` + * 2018-09-01-preview: :class:`RoleDefinitionsOperations` """ api_version = self._get_api_version('role_definitions') if api_version == '2015-07-01': from .v2015_07_01.operations import RoleDefinitionsOperations as OperationClass elif api_version == '2018-01-01-preview': from .v2018_01_01_preview.operations import RoleDefinitionsOperations as OperationClass + elif api_version == '2018-09-01-preview': + from .v2018_09_01_preview.operations import RoleDefinitionsOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/__init__.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/__init__.py new file mode 100644 index 000000000000..05f283c292d4 --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/__init__.py @@ -0,0 +1,18 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .authorization_management_client import AuthorizationManagementClient +from .version import VERSION + +__all__ = ['AuthorizationManagementClient'] + +__version__ = VERSION + diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/authorization_management_client.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/authorization_management_client.py new file mode 100644 index 000000000000..4be0d8c94163 --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/authorization_management_client.py @@ -0,0 +1,81 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer +from msrestazure import AzureConfiguration +from .version import VERSION +from .operations.deny_assignments_operations import DenyAssignmentsOperations +from . import models + + +class AuthorizationManagementClientConfiguration(AzureConfiguration): + """Configuration for AuthorizationManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(AuthorizationManagementClientConfiguration, self).__init__(base_url) + + self.add_user_agent('azure-mgmt-authorization/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + + +class AuthorizationManagementClient(SDKClient): + """Role based access control provides you a way to apply granular level policy administration down to individual resources or resource groups. These operations enable you to get deny assignments. A deny assignment describes the set of actions on resources that are denied for Azure Active Directory users. + + :ivar config: Configuration for client. + :vartype config: AuthorizationManagementClientConfiguration + + :ivar deny_assignments: DenyAssignments operations + :vartype deny_assignments: azure.mgmt.authorization.v2018_07_01_preview.operations.DenyAssignmentsOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = AuthorizationManagementClientConfiguration(credentials, subscription_id, base_url) + super(AuthorizationManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2018-07-01-preview' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.deny_assignments = DenyAssignmentsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/models/__init__.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/models/__init__.py new file mode 100644 index 000000000000..cc4c8ddc5fff --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/models/__init__.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +try: + from .deny_assignment_filter_py3 import DenyAssignmentFilter + from .deny_assignment_permission_py3 import DenyAssignmentPermission + from .principal_py3 import Principal + from .deny_assignment_py3 import DenyAssignment +except (SyntaxError, ImportError): + from .deny_assignment_filter import DenyAssignmentFilter + from .deny_assignment_permission import DenyAssignmentPermission + from .principal import Principal + from .deny_assignment import DenyAssignment +from .deny_assignment_paged import DenyAssignmentPaged + +__all__ = [ + 'DenyAssignmentFilter', + 'DenyAssignmentPermission', + 'Principal', + 'DenyAssignment', + 'DenyAssignmentPaged', +] diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/models/deny_assignment.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/models/deny_assignment.py new file mode 100644 index 000000000000..36116fb8912e --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/models/deny_assignment.py @@ -0,0 +1,85 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DenyAssignment(Model): + """Deny Assignment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The deny assignment ID. + :vartype id: str + :ivar name: The deny assignment name. + :vartype name: str + :ivar type: The deny assignment type. + :vartype type: str + :param deny_assignment_name: The display name of the deny assignment. + :type deny_assignment_name: str + :param description: The description of the deny assignment. + :type description: str + :param permissions: An array of permissions that are denied by the deny + assignment. + :type permissions: + list[~azure.mgmt.authorization.v2018_07_01_preview.models.DenyAssignmentPermission] + :param scope: The deny assignment scope. + :type scope: str + :param do_not_apply_to_child_scopes: Determines if the deny assignment + applies to child scopes. Default value is false. + :type do_not_apply_to_child_scopes: bool + :param principals: Array of principals to which the deny assignment + applies. + :type principals: + list[~azure.mgmt.authorization.v2018_07_01_preview.models.Principal] + :param exclude_principals: Array of principals to which the deny + assignment does not apply. + :type exclude_principals: + list[~azure.mgmt.authorization.v2018_07_01_preview.models.Principal] + :param is_system_protected: Specifies whether this deny assignment was + created by Azure and cannot be edited or deleted. + :type is_system_protected: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'deny_assignment_name': {'key': 'properties.denyAssignmentName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'permissions': {'key': 'properties.permissions', 'type': '[DenyAssignmentPermission]'}, + 'scope': {'key': 'properties.scope', 'type': 'str'}, + 'do_not_apply_to_child_scopes': {'key': 'properties.doNotApplyToChildScopes', 'type': 'bool'}, + 'principals': {'key': 'properties.principals', 'type': '[Principal]'}, + 'exclude_principals': {'key': 'properties.excludePrincipals', 'type': '[Principal]'}, + 'is_system_protected': {'key': 'properties.isSystemProtected', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(DenyAssignment, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.deny_assignment_name = kwargs.get('deny_assignment_name', None) + self.description = kwargs.get('description', None) + self.permissions = kwargs.get('permissions', None) + self.scope = kwargs.get('scope', None) + self.do_not_apply_to_child_scopes = kwargs.get('do_not_apply_to_child_scopes', None) + self.principals = kwargs.get('principals', None) + self.exclude_principals = kwargs.get('exclude_principals', None) + self.is_system_protected = kwargs.get('is_system_protected', None) diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/models/deny_assignment_filter.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/models/deny_assignment_filter.py new file mode 100644 index 000000000000..6988d5f04893 --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/models/deny_assignment_filter.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DenyAssignmentFilter(Model): + """Deny Assignments filter. + + :param deny_assignment_name: Return deny assignment with specified name. + :type deny_assignment_name: str + :param principal_id: Return all deny assignments where the specified + principal is listed in the principals list of deny assignments. + :type principal_id: str + :param gdpr_export_principal_id: Return all deny assignments where the + specified principal is listed either in the principals list or exclude + principals list of deny assignments. + :type gdpr_export_principal_id: str + """ + + _attribute_map = { + 'deny_assignment_name': {'key': 'denyAssignmentName', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'gdpr_export_principal_id': {'key': 'gdprExportPrincipalId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DenyAssignmentFilter, self).__init__(**kwargs) + self.deny_assignment_name = kwargs.get('deny_assignment_name', None) + self.principal_id = kwargs.get('principal_id', None) + self.gdpr_export_principal_id = kwargs.get('gdpr_export_principal_id', None) diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/models/deny_assignment_filter_py3.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/models/deny_assignment_filter_py3.py new file mode 100644 index 000000000000..355f4e95ff82 --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/models/deny_assignment_filter_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DenyAssignmentFilter(Model): + """Deny Assignments filter. + + :param deny_assignment_name: Return deny assignment with specified name. + :type deny_assignment_name: str + :param principal_id: Return all deny assignments where the specified + principal is listed in the principals list of deny assignments. + :type principal_id: str + :param gdpr_export_principal_id: Return all deny assignments where the + specified principal is listed either in the principals list or exclude + principals list of deny assignments. + :type gdpr_export_principal_id: str + """ + + _attribute_map = { + 'deny_assignment_name': {'key': 'denyAssignmentName', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'gdpr_export_principal_id': {'key': 'gdprExportPrincipalId', 'type': 'str'}, + } + + def __init__(self, *, deny_assignment_name: str=None, principal_id: str=None, gdpr_export_principal_id: str=None, **kwargs) -> None: + super(DenyAssignmentFilter, self).__init__(**kwargs) + self.deny_assignment_name = deny_assignment_name + self.principal_id = principal_id + self.gdpr_export_principal_id = gdpr_export_principal_id diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/models/deny_assignment_paged.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/models/deny_assignment_paged.py new file mode 100644 index 000000000000..f1062e69ff3c --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/models/deny_assignment_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class DenyAssignmentPaged(Paged): + """ + A paging container for iterating over a list of :class:`DenyAssignment ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DenyAssignment]'} + } + + def __init__(self, *args, **kwargs): + + super(DenyAssignmentPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/models/deny_assignment_permission.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/models/deny_assignment_permission.py new file mode 100644 index 000000000000..c29b9944d959 --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/models/deny_assignment_permission.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DenyAssignmentPermission(Model): + """Deny assignment permissions. + + :param actions: Actions to which the deny assignment does not grant + access. + :type actions: list[str] + :param not_actions: Actions to exclude from that the deny assignment does + not grant access. + :type not_actions: list[str] + :param data_actions: Data actions to which the deny assignment does not + grant access. + :type data_actions: list[str] + :param not_data_actions: Data actions to exclude from that the deny + assignment does not grant access. + :type not_data_actions: list[str] + """ + + _attribute_map = { + 'actions': {'key': 'actions', 'type': '[str]'}, + 'not_actions': {'key': 'notActions', 'type': '[str]'}, + 'data_actions': {'key': 'dataActions', 'type': '[str]'}, + 'not_data_actions': {'key': 'notDataActions', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(DenyAssignmentPermission, self).__init__(**kwargs) + self.actions = kwargs.get('actions', None) + self.not_actions = kwargs.get('not_actions', None) + self.data_actions = kwargs.get('data_actions', None) + self.not_data_actions = kwargs.get('not_data_actions', None) diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/models/deny_assignment_permission_py3.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/models/deny_assignment_permission_py3.py new file mode 100644 index 000000000000..e1e5e9ab75fc --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/models/deny_assignment_permission_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DenyAssignmentPermission(Model): + """Deny assignment permissions. + + :param actions: Actions to which the deny assignment does not grant + access. + :type actions: list[str] + :param not_actions: Actions to exclude from that the deny assignment does + not grant access. + :type not_actions: list[str] + :param data_actions: Data actions to which the deny assignment does not + grant access. + :type data_actions: list[str] + :param not_data_actions: Data actions to exclude from that the deny + assignment does not grant access. + :type not_data_actions: list[str] + """ + + _attribute_map = { + 'actions': {'key': 'actions', 'type': '[str]'}, + 'not_actions': {'key': 'notActions', 'type': '[str]'}, + 'data_actions': {'key': 'dataActions', 'type': '[str]'}, + 'not_data_actions': {'key': 'notDataActions', 'type': '[str]'}, + } + + def __init__(self, *, actions=None, not_actions=None, data_actions=None, not_data_actions=None, **kwargs) -> None: + super(DenyAssignmentPermission, self).__init__(**kwargs) + self.actions = actions + self.not_actions = not_actions + self.data_actions = data_actions + self.not_data_actions = not_data_actions diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/models/deny_assignment_py3.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/models/deny_assignment_py3.py new file mode 100644 index 000000000000..cf566f59c948 --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/models/deny_assignment_py3.py @@ -0,0 +1,85 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DenyAssignment(Model): + """Deny Assignment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The deny assignment ID. + :vartype id: str + :ivar name: The deny assignment name. + :vartype name: str + :ivar type: The deny assignment type. + :vartype type: str + :param deny_assignment_name: The display name of the deny assignment. + :type deny_assignment_name: str + :param description: The description of the deny assignment. + :type description: str + :param permissions: An array of permissions that are denied by the deny + assignment. + :type permissions: + list[~azure.mgmt.authorization.v2018_07_01_preview.models.DenyAssignmentPermission] + :param scope: The deny assignment scope. + :type scope: str + :param do_not_apply_to_child_scopes: Determines if the deny assignment + applies to child scopes. Default value is false. + :type do_not_apply_to_child_scopes: bool + :param principals: Array of principals to which the deny assignment + applies. + :type principals: + list[~azure.mgmt.authorization.v2018_07_01_preview.models.Principal] + :param exclude_principals: Array of principals to which the deny + assignment does not apply. + :type exclude_principals: + list[~azure.mgmt.authorization.v2018_07_01_preview.models.Principal] + :param is_system_protected: Specifies whether this deny assignment was + created by Azure and cannot be edited or deleted. + :type is_system_protected: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'deny_assignment_name': {'key': 'properties.denyAssignmentName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'permissions': {'key': 'properties.permissions', 'type': '[DenyAssignmentPermission]'}, + 'scope': {'key': 'properties.scope', 'type': 'str'}, + 'do_not_apply_to_child_scopes': {'key': 'properties.doNotApplyToChildScopes', 'type': 'bool'}, + 'principals': {'key': 'properties.principals', 'type': '[Principal]'}, + 'exclude_principals': {'key': 'properties.excludePrincipals', 'type': '[Principal]'}, + 'is_system_protected': {'key': 'properties.isSystemProtected', 'type': 'bool'}, + } + + def __init__(self, *, deny_assignment_name: str=None, description: str=None, permissions=None, scope: str=None, do_not_apply_to_child_scopes: bool=None, principals=None, exclude_principals=None, is_system_protected: bool=None, **kwargs) -> None: + super(DenyAssignment, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.deny_assignment_name = deny_assignment_name + self.description = description + self.permissions = permissions + self.scope = scope + self.do_not_apply_to_child_scopes = do_not_apply_to_child_scopes + self.principals = principals + self.exclude_principals = exclude_principals + self.is_system_protected = is_system_protected diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/models/principal.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/models/principal.py new file mode 100644 index 000000000000..f1707cd04ffb --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/models/principal.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Principal(Model): + """Deny assignment principal. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Object ID of the Azure AD principal (user, group, or service + principal) to which the deny assignment applies. An empty guid + '00000000-0000-0000-0000-000000000000' as principal id and principal type + as 'Everyone' represents all users, groups and service principals. + :vartype id: str + :ivar type: Type of object represented by principal id (user, group, or + service principal). An empty guid '00000000-0000-0000-0000-000000000000' + as principal id and principal type as 'Everyone' represents all users, + groups and service principals. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Principal, self).__init__(**kwargs) + self.id = None + self.type = None diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/models/principal_py3.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/models/principal_py3.py new file mode 100644 index 000000000000..d41628e88e81 --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/models/principal_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Principal(Model): + """Deny assignment principal. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Object ID of the Azure AD principal (user, group, or service + principal) to which the deny assignment applies. An empty guid + '00000000-0000-0000-0000-000000000000' as principal id and principal type + as 'Everyone' represents all users, groups and service principals. + :vartype id: str + :ivar type: Type of object represented by principal id (user, group, or + service principal). An empty guid '00000000-0000-0000-0000-000000000000' + as principal id and principal type as 'Everyone' represents all users, + groups and service principals. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Principal, self).__init__(**kwargs) + self.id = None + self.type = None diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/operations/__init__.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/operations/__init__.py new file mode 100644 index 000000000000..597fcdcf388e --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/operations/__init__.py @@ -0,0 +1,16 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .deny_assignments_operations import DenyAssignmentsOperations + +__all__ = [ + 'DenyAssignmentsOperations', +] diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/operations/deny_assignments_operations.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/operations/deny_assignments_operations.py new file mode 100644 index 000000000000..3d294efc66a5 --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/operations/deny_assignments_operations.py @@ -0,0 +1,510 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class DenyAssignmentsOperations(object): + """DenyAssignmentsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2018-07-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-07-01-preview" + + self.config = config + + def list_for_resource( + self, resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter=None, custom_headers=None, raw=False, **operation_config): + """Gets deny assignments for a resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_provider_namespace: The namespace of the resource + provider. + :type resource_provider_namespace: str + :param parent_resource_path: The parent resource identity. + :type parent_resource_path: str + :param resource_type: The resource type of the resource. + :type resource_type: str + :param resource_name: The name of the resource to get deny assignments + for. + :type resource_name: str + :param filter: The filter to apply on the operation. Use + $filter=atScope() to return all deny assignments at or above the + scope. Use $filter=denyAssignmentName eq '{name}' to search deny + assignments by name at specified scope. Use $filter=principalId eq + '{id}' to return all deny assignments at, above and below the scope + for the specified principal. Use $filter=gdprExportPrincipalId eq + '{id}' to return all deny assignments at, above and below the scope + for the specified principal. This filter is different from the + principalId filter as it returns not only those deny assignments that + contain the specified principal is the Principals list but also those + deny assignments that contain the specified principal is the + ExcludePrincipals list. Additionally, when gdprExportPrincipalId + filter is used, only the deny assignment name and description + properties are returned. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DenyAssignment + :rtype: + ~azure.mgmt.authorization.v2018_07_01_preview.models.DenyAssignmentPaged[~azure.mgmt.authorization.v2018_07_01_preview.models.DenyAssignment] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_for_resource.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), + 'parentResourcePath': self._serialize.url("parent_resource_path", parent_resource_path, 'str', skip_quote=True), + 'resourceType': self._serialize.url("resource_type", resource_type, 'str', skip_quote=True), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DenyAssignmentPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DenyAssignmentPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_for_resource.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/denyAssignments'} + + def list_for_resource_group( + self, resource_group_name, filter=None, custom_headers=None, raw=False, **operation_config): + """Gets deny assignments for a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param filter: The filter to apply on the operation. Use + $filter=atScope() to return all deny assignments at or above the + scope. Use $filter=denyAssignmentName eq '{name}' to search deny + assignments by name at specified scope. Use $filter=principalId eq + '{id}' to return all deny assignments at, above and below the scope + for the specified principal. Use $filter=gdprExportPrincipalId eq + '{id}' to return all deny assignments at, above and below the scope + for the specified principal. This filter is different from the + principalId filter as it returns not only those deny assignments that + contain the specified principal is the Principals list but also those + deny assignments that contain the specified principal is the + ExcludePrincipals list. Additionally, when gdprExportPrincipalId + filter is used, only the deny assignment name and description + properties are returned. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DenyAssignment + :rtype: + ~azure.mgmt.authorization.v2018_07_01_preview.models.DenyAssignmentPaged[~azure.mgmt.authorization.v2018_07_01_preview.models.DenyAssignment] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_for_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DenyAssignmentPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DenyAssignmentPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_for_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/denyAssignments'} + + def list( + self, filter=None, custom_headers=None, raw=False, **operation_config): + """Gets all deny assignments for the subscription. + + :param filter: The filter to apply on the operation. Use + $filter=atScope() to return all deny assignments at or above the + scope. Use $filter=denyAssignmentName eq '{name}' to search deny + assignments by name at specified scope. Use $filter=principalId eq + '{id}' to return all deny assignments at, above and below the scope + for the specified principal. Use $filter=gdprExportPrincipalId eq + '{id}' to return all deny assignments at, above and below the scope + for the specified principal. This filter is different from the + principalId filter as it returns not only those deny assignments that + contain the specified principal is the Principals list but also those + deny assignments that contain the specified principal is the + ExcludePrincipals list. Additionally, when gdprExportPrincipalId + filter is used, only the deny assignment name and description + properties are returned. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DenyAssignment + :rtype: + ~azure.mgmt.authorization.v2018_07_01_preview.models.DenyAssignmentPaged[~azure.mgmt.authorization.v2018_07_01_preview.models.DenyAssignment] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DenyAssignmentPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DenyAssignmentPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/denyAssignments'} + + def get( + self, scope, deny_assignment_id, custom_headers=None, raw=False, **operation_config): + """Get the specified deny assignment. + + :param scope: The scope of the deny assignment. + :type scope: str + :param deny_assignment_id: The ID of the deny assignment to get. + :type deny_assignment_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DenyAssignment or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.authorization.v2018_07_01_preview.models.DenyAssignment or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + 'denyAssignmentId': self._serialize.url("deny_assignment_id", deny_assignment_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('DenyAssignment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/denyAssignments/{denyAssignmentId}'} + + def get_by_id( + self, deny_assignment_id, custom_headers=None, raw=False, **operation_config): + """Gets a deny assignment by ID. + + :param deny_assignment_id: The fully qualified deny assignment ID. For + example, use the format, + /subscriptions/{guid}/providers/Microsoft.Authorization/denyAssignments/{denyAssignmentId} + for subscription level deny assignments, or + /providers/Microsoft.Authorization/denyAssignments/{denyAssignmentId} + for tenant level deny assignments. + :type deny_assignment_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DenyAssignment or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.authorization.v2018_07_01_preview.models.DenyAssignment or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_by_id.metadata['url'] + path_format_arguments = { + 'denyAssignmentId': self._serialize.url("deny_assignment_id", deny_assignment_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('DenyAssignment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_by_id.metadata = {'url': '/{denyAssignmentId}'} + + def list_for_scope( + self, scope, filter=None, custom_headers=None, raw=False, **operation_config): + """Gets deny assignments for a scope. + + :param scope: The scope of the deny assignments. + :type scope: str + :param filter: The filter to apply on the operation. Use + $filter=atScope() to return all deny assignments at or above the + scope. Use $filter=denyAssignmentName eq '{name}' to search deny + assignments by name at specified scope. Use $filter=principalId eq + '{id}' to return all deny assignments at, above and below the scope + for the specified principal. Use $filter=gdprExportPrincipalId eq + '{id}' to return all deny assignments at, above and below the scope + for the specified principal. This filter is different from the + principalId filter as it returns not only those deny assignments that + contain the specified principal is the Principals list but also those + deny assignments that contain the specified principal is the + ExcludePrincipals list. Additionally, when gdprExportPrincipalId + filter is used, only the deny assignment name and description + properties are returned. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DenyAssignment + :rtype: + ~azure.mgmt.authorization.v2018_07_01_preview.models.DenyAssignmentPaged[~azure.mgmt.authorization.v2018_07_01_preview.models.DenyAssignment] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_for_scope.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DenyAssignmentPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DenyAssignmentPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_for_scope.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/denyAssignments'} diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/version.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/version.py new file mode 100644 index 000000000000..640f86d33a0d --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview/version.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +VERSION = "2018-07-01-preview" + diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/__init__.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/__init__.py new file mode 100644 index 000000000000..05f283c292d4 --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/__init__.py @@ -0,0 +1,18 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .authorization_management_client import AuthorizationManagementClient +from .version import VERSION + +__all__ = ['AuthorizationManagementClient'] + +__version__ = VERSION + diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/authorization_management_client.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/authorization_management_client.py new file mode 100644 index 000000000000..66a03be8f383 --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/authorization_management_client.py @@ -0,0 +1,96 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer +from msrestazure import AzureConfiguration +from .version import VERSION +from .operations.provider_operations_metadata_operations import ProviderOperationsMetadataOperations +from .operations.permissions_operations import PermissionsOperations +from .operations.role_assignments_operations import RoleAssignmentsOperations +from .operations.role_definitions_operations import RoleDefinitionsOperations +from . import models + + +class AuthorizationManagementClientConfiguration(AzureConfiguration): + """Configuration for AuthorizationManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(AuthorizationManagementClientConfiguration, self).__init__(base_url) + + self.add_user_agent('azure-mgmt-authorization/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + + +class AuthorizationManagementClient(SDKClient): + """Role based access control provides you a way to apply granular level policy administration down to individual resources or resource groups. These operations enable you to manage role definitions and role assignments. A role definition describes the set of actions that can be performed on resources. A role assignment grants access to Azure Active Directory users. + + :ivar config: Configuration for client. + :vartype config: AuthorizationManagementClientConfiguration + + :ivar provider_operations_metadata: ProviderOperationsMetadata operations + :vartype provider_operations_metadata: azure.mgmt.authorization.v2018_09_01_preview.operations.ProviderOperationsMetadataOperations + :ivar permissions: Permissions operations + :vartype permissions: azure.mgmt.authorization.v2018_09_01_preview.operations.PermissionsOperations + :ivar role_assignments: RoleAssignments operations + :vartype role_assignments: azure.mgmt.authorization.v2018_09_01_preview.operations.RoleAssignmentsOperations + :ivar role_definitions: RoleDefinitions operations + :vartype role_definitions: azure.mgmt.authorization.v2018_09_01_preview.operations.RoleDefinitionsOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = AuthorizationManagementClientConfiguration(credentials, subscription_id, base_url) + super(AuthorizationManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2018-09-01-preview' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.provider_operations_metadata = ProviderOperationsMetadataOperations( + self._client, self.config, self._serialize, self._deserialize) + self.permissions = PermissionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.role_assignments = RoleAssignmentsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.role_definitions = RoleDefinitionsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/__init__.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/__init__.py new file mode 100644 index 000000000000..e2d7cbdfc9e5 --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/__init__.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +try: + from .provider_operation_py3 import ProviderOperation + from .resource_type_py3 import ResourceType + from .provider_operations_metadata_py3 import ProviderOperationsMetadata + from .permission_py3 import Permission + from .role_definition_filter_py3 import RoleDefinitionFilter + from .role_definition_py3 import RoleDefinition + from .role_assignment_filter_py3 import RoleAssignmentFilter + from .role_assignment_py3 import RoleAssignment + from .role_assignment_create_parameters_py3 import RoleAssignmentCreateParameters +except (SyntaxError, ImportError): + from .provider_operation import ProviderOperation + from .resource_type import ResourceType + from .provider_operations_metadata import ProviderOperationsMetadata + from .permission import Permission + from .role_definition_filter import RoleDefinitionFilter + from .role_definition import RoleDefinition + from .role_assignment_filter import RoleAssignmentFilter + from .role_assignment import RoleAssignment + from .role_assignment_create_parameters import RoleAssignmentCreateParameters +from .provider_operations_metadata_paged import ProviderOperationsMetadataPaged +from .permission_paged import PermissionPaged +from .role_assignment_paged import RoleAssignmentPaged +from .role_definition_paged import RoleDefinitionPaged +from .authorization_management_client_enums import ( + PrincipalType, +) + +__all__ = [ + 'ProviderOperation', + 'ResourceType', + 'ProviderOperationsMetadata', + 'Permission', + 'RoleDefinitionFilter', + 'RoleDefinition', + 'RoleAssignmentFilter', + 'RoleAssignment', + 'RoleAssignmentCreateParameters', + 'ProviderOperationsMetadataPaged', + 'PermissionPaged', + 'RoleAssignmentPaged', + 'RoleDefinitionPaged', + 'PrincipalType', +] diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/authorization_management_client_enums.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/authorization_management_client_enums.py new file mode 100644 index 000000000000..470522d4174d --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/authorization_management_client_enums.py @@ -0,0 +1,26 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class PrincipalType(str, Enum): + + user = "User" + group = "Group" + service_principal = "ServicePrincipal" + unknown = "Unknown" + directory_role_template = "DirectoryRoleTemplate" + foreign_group = "ForeignGroup" + application = "Application" + msi = "MSI" + directory_object_or_group = "DirectoryObjectOrGroup" + everyone = "Everyone" diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/permission.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/permission.py new file mode 100644 index 000000000000..3c86802d5d9e --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/permission.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Permission(Model): + """Role definition permissions. + + :param actions: Allowed actions. + :type actions: list[str] + :param not_actions: Denied actions. + :type not_actions: list[str] + :param data_actions: Allowed Data actions. + :type data_actions: list[str] + :param not_data_actions: Denied Data actions. + :type not_data_actions: list[str] + """ + + _attribute_map = { + 'actions': {'key': 'actions', 'type': '[str]'}, + 'not_actions': {'key': 'notActions', 'type': '[str]'}, + 'data_actions': {'key': 'dataActions', 'type': '[str]'}, + 'not_data_actions': {'key': 'notDataActions', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(Permission, self).__init__(**kwargs) + self.actions = kwargs.get('actions', None) + self.not_actions = kwargs.get('not_actions', None) + self.data_actions = kwargs.get('data_actions', None) + self.not_data_actions = kwargs.get('not_data_actions', None) diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/permission_paged.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/permission_paged.py new file mode 100644 index 000000000000..e293159b4b08 --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/permission_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class PermissionPaged(Paged): + """ + A paging container for iterating over a list of :class:`Permission ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Permission]'} + } + + def __init__(self, *args, **kwargs): + + super(PermissionPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/permission_py3.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/permission_py3.py new file mode 100644 index 000000000000..1b5a16e6acac --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/permission_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Permission(Model): + """Role definition permissions. + + :param actions: Allowed actions. + :type actions: list[str] + :param not_actions: Denied actions. + :type not_actions: list[str] + :param data_actions: Allowed Data actions. + :type data_actions: list[str] + :param not_data_actions: Denied Data actions. + :type not_data_actions: list[str] + """ + + _attribute_map = { + 'actions': {'key': 'actions', 'type': '[str]'}, + 'not_actions': {'key': 'notActions', 'type': '[str]'}, + 'data_actions': {'key': 'dataActions', 'type': '[str]'}, + 'not_data_actions': {'key': 'notDataActions', 'type': '[str]'}, + } + + def __init__(self, *, actions=None, not_actions=None, data_actions=None, not_data_actions=None, **kwargs) -> None: + super(Permission, self).__init__(**kwargs) + self.actions = actions + self.not_actions = not_actions + self.data_actions = data_actions + self.not_data_actions = not_data_actions diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/provider_operation.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/provider_operation.py new file mode 100644 index 000000000000..6ffdb218c04c --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/provider_operation.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ProviderOperation(Model): + """Operation. + + :param name: The operation name. + :type name: str + :param display_name: The operation display name. + :type display_name: str + :param description: The operation description. + :type description: str + :param origin: The operation origin. + :type origin: str + :param properties: The operation properties. + :type properties: object + :param is_data_action: The dataAction flag to specify the operation type. + :type is_data_action: bool + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ProviderOperation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.origin = kwargs.get('origin', None) + self.properties = kwargs.get('properties', None) + self.is_data_action = kwargs.get('is_data_action', None) diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/provider_operation_py3.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/provider_operation_py3.py new file mode 100644 index 000000000000..67e16f94b8a7 --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/provider_operation_py3.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ProviderOperation(Model): + """Operation. + + :param name: The operation name. + :type name: str + :param display_name: The operation display name. + :type display_name: str + :param description: The operation description. + :type description: str + :param origin: The operation origin. + :type origin: str + :param properties: The operation properties. + :type properties: object + :param is_data_action: The dataAction flag to specify the operation type. + :type is_data_action: bool + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, description: str=None, origin: str=None, properties=None, is_data_action: bool=None, **kwargs) -> None: + super(ProviderOperation, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.description = description + self.origin = origin + self.properties = properties + self.is_data_action = is_data_action diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/provider_operations_metadata.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/provider_operations_metadata.py new file mode 100644 index 000000000000..afcd93fe1808 --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/provider_operations_metadata.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ProviderOperationsMetadata(Model): + """Provider Operations metadata. + + :param id: The provider id. + :type id: str + :param name: The provider name. + :type name: str + :param type: The provider type. + :type type: str + :param display_name: The provider display name. + :type display_name: str + :param resource_types: The provider resource types + :type resource_types: + list[~azure.mgmt.authorization.v2018_09_01_preview.models.ResourceType] + :param operations: The provider operations. + :type operations: + list[~azure.mgmt.authorization.v2018_09_01_preview.models.ProviderOperation] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'resource_types': {'key': 'resourceTypes', 'type': '[ResourceType]'}, + 'operations': {'key': 'operations', 'type': '[ProviderOperation]'}, + } + + def __init__(self, **kwargs): + super(ProviderOperationsMetadata, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.display_name = kwargs.get('display_name', None) + self.resource_types = kwargs.get('resource_types', None) + self.operations = kwargs.get('operations', None) diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/provider_operations_metadata_paged.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/provider_operations_metadata_paged.py new file mode 100644 index 000000000000..bbba6393065c --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/provider_operations_metadata_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class ProviderOperationsMetadataPaged(Paged): + """ + A paging container for iterating over a list of :class:`ProviderOperationsMetadata ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ProviderOperationsMetadata]'} + } + + def __init__(self, *args, **kwargs): + + super(ProviderOperationsMetadataPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/provider_operations_metadata_py3.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/provider_operations_metadata_py3.py new file mode 100644 index 000000000000..48197c342e78 --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/provider_operations_metadata_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ProviderOperationsMetadata(Model): + """Provider Operations metadata. + + :param id: The provider id. + :type id: str + :param name: The provider name. + :type name: str + :param type: The provider type. + :type type: str + :param display_name: The provider display name. + :type display_name: str + :param resource_types: The provider resource types + :type resource_types: + list[~azure.mgmt.authorization.v2018_09_01_preview.models.ResourceType] + :param operations: The provider operations. + :type operations: + list[~azure.mgmt.authorization.v2018_09_01_preview.models.ProviderOperation] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'resource_types': {'key': 'resourceTypes', 'type': '[ResourceType]'}, + 'operations': {'key': 'operations', 'type': '[ProviderOperation]'}, + } + + def __init__(self, *, id: str=None, name: str=None, type: str=None, display_name: str=None, resource_types=None, operations=None, **kwargs) -> None: + super(ProviderOperationsMetadata, self).__init__(**kwargs) + self.id = id + self.name = name + self.type = type + self.display_name = display_name + self.resource_types = resource_types + self.operations = operations diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/resource_type.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/resource_type.py new file mode 100644 index 000000000000..5ee1d4eadb27 --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/resource_type.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceType(Model): + """Resource Type. + + :param name: The resource type name. + :type name: str + :param display_name: The resource type display name. + :type display_name: str + :param operations: The resource type operations. + :type operations: + list[~azure.mgmt.authorization.v2018_09_01_preview.models.ProviderOperation] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'operations': {'key': 'operations', 'type': '[ProviderOperation]'}, + } + + def __init__(self, **kwargs): + super(ResourceType, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.operations = kwargs.get('operations', None) diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/resource_type_py3.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/resource_type_py3.py new file mode 100644 index 000000000000..e4be5a016c1c --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/resource_type_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceType(Model): + """Resource Type. + + :param name: The resource type name. + :type name: str + :param display_name: The resource type display name. + :type display_name: str + :param operations: The resource type operations. + :type operations: + list[~azure.mgmt.authorization.v2018_09_01_preview.models.ProviderOperation] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'operations': {'key': 'operations', 'type': '[ProviderOperation]'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, operations=None, **kwargs) -> None: + super(ResourceType, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.operations = operations diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_assignment.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_assignment.py new file mode 100644 index 000000000000..599d04d0b2cf --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_assignment.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RoleAssignment(Model): + """Role Assignments. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The role assignment ID. + :vartype id: str + :ivar name: The role assignment name. + :vartype name: str + :ivar type: The role assignment type. + :vartype type: str + :param scope: The role assignment scope. + :type scope: str + :param role_definition_id: The role definition ID. + :type role_definition_id: str + :param principal_id: The principal ID. + :type principal_id: str + :param can_delegate: The Delegation flag for the roleassignment + :type can_delegate: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'scope': {'key': 'properties.scope', 'type': 'str'}, + 'role_definition_id': {'key': 'properties.roleDefinitionId', 'type': 'str'}, + 'principal_id': {'key': 'properties.principalId', 'type': 'str'}, + 'can_delegate': {'key': 'properties.canDelegate', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(RoleAssignment, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.scope = kwargs.get('scope', None) + self.role_definition_id = kwargs.get('role_definition_id', None) + self.principal_id = kwargs.get('principal_id', None) + self.can_delegate = kwargs.get('can_delegate', None) diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_assignment_create_parameters.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_assignment_create_parameters.py new file mode 100644 index 000000000000..2144b9d8d063 --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_assignment_create_parameters.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RoleAssignmentCreateParameters(Model): + """Role assignment create parameters. + + All required parameters must be populated in order to send to Azure. + + :param role_definition_id: Required. The role definition ID used in the + role assignment. + :type role_definition_id: str + :param principal_id: Required. The principal ID assigned to the role. This + maps to the ID inside the Active Directory. It can point to a user, + service principal, or security group. + :type principal_id: str + :param principal_type: The principal type of the assigned principal ID. + Possible values include: 'User', 'Group', 'ServicePrincipal', 'Unknown', + 'DirectoryRoleTemplate', 'ForeignGroup', 'Application', 'MSI', + 'DirectoryObjectOrGroup', 'Everyone' + :type principal_type: str or + ~azure.mgmt.authorization.v2018_09_01_preview.models.PrincipalType + :param can_delegate: The delgation flag used for creating a role + assignment + :type can_delegate: bool + """ + + _validation = { + 'role_definition_id': {'required': True}, + 'principal_id': {'required': True}, + } + + _attribute_map = { + 'role_definition_id': {'key': 'properties.roleDefinitionId', 'type': 'str'}, + 'principal_id': {'key': 'properties.principalId', 'type': 'str'}, + 'principal_type': {'key': 'properties.principalType', 'type': 'str'}, + 'can_delegate': {'key': 'properties.canDelegate', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(RoleAssignmentCreateParameters, self).__init__(**kwargs) + self.role_definition_id = kwargs.get('role_definition_id', None) + self.principal_id = kwargs.get('principal_id', None) + self.principal_type = kwargs.get('principal_type', None) + self.can_delegate = kwargs.get('can_delegate', None) diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_assignment_create_parameters_py3.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_assignment_create_parameters_py3.py new file mode 100644 index 000000000000..7b102e91fe18 --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_assignment_create_parameters_py3.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RoleAssignmentCreateParameters(Model): + """Role assignment create parameters. + + All required parameters must be populated in order to send to Azure. + + :param role_definition_id: Required. The role definition ID used in the + role assignment. + :type role_definition_id: str + :param principal_id: Required. The principal ID assigned to the role. This + maps to the ID inside the Active Directory. It can point to a user, + service principal, or security group. + :type principal_id: str + :param principal_type: The principal type of the assigned principal ID. + Possible values include: 'User', 'Group', 'ServicePrincipal', 'Unknown', + 'DirectoryRoleTemplate', 'ForeignGroup', 'Application', 'MSI', + 'DirectoryObjectOrGroup', 'Everyone' + :type principal_type: str or + ~azure.mgmt.authorization.v2018_09_01_preview.models.PrincipalType + :param can_delegate: The delgation flag used for creating a role + assignment + :type can_delegate: bool + """ + + _validation = { + 'role_definition_id': {'required': True}, + 'principal_id': {'required': True}, + } + + _attribute_map = { + 'role_definition_id': {'key': 'properties.roleDefinitionId', 'type': 'str'}, + 'principal_id': {'key': 'properties.principalId', 'type': 'str'}, + 'principal_type': {'key': 'properties.principalType', 'type': 'str'}, + 'can_delegate': {'key': 'properties.canDelegate', 'type': 'bool'}, + } + + def __init__(self, *, role_definition_id: str, principal_id: str, principal_type=None, can_delegate: bool=None, **kwargs) -> None: + super(RoleAssignmentCreateParameters, self).__init__(**kwargs) + self.role_definition_id = role_definition_id + self.principal_id = principal_id + self.principal_type = principal_type + self.can_delegate = can_delegate diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_assignment_filter.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_assignment_filter.py new file mode 100644 index 000000000000..940b6baccc3c --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_assignment_filter.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RoleAssignmentFilter(Model): + """Role Assignments filter. + + :param principal_id: Returns role assignment of the specific principal. + :type principal_id: str + :param can_delegate: The Delegation flag for the roleassignment + :type can_delegate: bool + """ + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'can_delegate': {'key': 'canDelegate', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(RoleAssignmentFilter, self).__init__(**kwargs) + self.principal_id = kwargs.get('principal_id', None) + self.can_delegate = kwargs.get('can_delegate', None) diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_assignment_filter_py3.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_assignment_filter_py3.py new file mode 100644 index 000000000000..cfa2af336134 --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_assignment_filter_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RoleAssignmentFilter(Model): + """Role Assignments filter. + + :param principal_id: Returns role assignment of the specific principal. + :type principal_id: str + :param can_delegate: The Delegation flag for the roleassignment + :type can_delegate: bool + """ + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'can_delegate': {'key': 'canDelegate', 'type': 'bool'}, + } + + def __init__(self, *, principal_id: str=None, can_delegate: bool=None, **kwargs) -> None: + super(RoleAssignmentFilter, self).__init__(**kwargs) + self.principal_id = principal_id + self.can_delegate = can_delegate diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_assignment_paged.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_assignment_paged.py new file mode 100644 index 000000000000..7df3204e28fb --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_assignment_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class RoleAssignmentPaged(Paged): + """ + A paging container for iterating over a list of :class:`RoleAssignment ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RoleAssignment]'} + } + + def __init__(self, *args, **kwargs): + + super(RoleAssignmentPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_assignment_py3.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_assignment_py3.py new file mode 100644 index 000000000000..15af2402089d --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_assignment_py3.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RoleAssignment(Model): + """Role Assignments. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The role assignment ID. + :vartype id: str + :ivar name: The role assignment name. + :vartype name: str + :ivar type: The role assignment type. + :vartype type: str + :param scope: The role assignment scope. + :type scope: str + :param role_definition_id: The role definition ID. + :type role_definition_id: str + :param principal_id: The principal ID. + :type principal_id: str + :param can_delegate: The Delegation flag for the roleassignment + :type can_delegate: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'scope': {'key': 'properties.scope', 'type': 'str'}, + 'role_definition_id': {'key': 'properties.roleDefinitionId', 'type': 'str'}, + 'principal_id': {'key': 'properties.principalId', 'type': 'str'}, + 'can_delegate': {'key': 'properties.canDelegate', 'type': 'bool'}, + } + + def __init__(self, *, scope: str=None, role_definition_id: str=None, principal_id: str=None, can_delegate: bool=None, **kwargs) -> None: + super(RoleAssignment, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.scope = scope + self.role_definition_id = role_definition_id + self.principal_id = principal_id + self.can_delegate = can_delegate diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_definition.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_definition.py new file mode 100644 index 000000000000..72cf774ccae5 --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_definition.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RoleDefinition(Model): + """Role definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The role definition ID. + :vartype id: str + :ivar name: The role definition name. + :vartype name: str + :ivar type: The role definition type. + :vartype type: str + :param role_name: The role name. + :type role_name: str + :param description: The role definition description. + :type description: str + :param role_type: The role type. + :type role_type: str + :param permissions: Role definition permissions. + :type permissions: + list[~azure.mgmt.authorization.v2018_09_01_preview.models.Permission] + :param assignable_scopes: Role definition assignable scopes. + :type assignable_scopes: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'role_name': {'key': 'properties.roleName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'role_type': {'key': 'properties.type', 'type': 'str'}, + 'permissions': {'key': 'properties.permissions', 'type': '[Permission]'}, + 'assignable_scopes': {'key': 'properties.assignableScopes', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(RoleDefinition, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.role_name = kwargs.get('role_name', None) + self.description = kwargs.get('description', None) + self.role_type = kwargs.get('role_type', None) + self.permissions = kwargs.get('permissions', None) + self.assignable_scopes = kwargs.get('assignable_scopes', None) diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_definition_filter.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_definition_filter.py new file mode 100644 index 000000000000..1fc9ae59aa3a --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_definition_filter.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RoleDefinitionFilter(Model): + """Role Definitions filter. + + :param role_name: Returns role definition with the specific name. + :type role_name: str + :param type: Returns role definition with the specific type. + :type type: str + """ + + _attribute_map = { + 'role_name': {'key': 'roleName', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RoleDefinitionFilter, self).__init__(**kwargs) + self.role_name = kwargs.get('role_name', None) + self.type = kwargs.get('type', None) diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_definition_filter_py3.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_definition_filter_py3.py new file mode 100644 index 000000000000..e511adc3df35 --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_definition_filter_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RoleDefinitionFilter(Model): + """Role Definitions filter. + + :param role_name: Returns role definition with the specific name. + :type role_name: str + :param type: Returns role definition with the specific type. + :type type: str + """ + + _attribute_map = { + 'role_name': {'key': 'roleName', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, role_name: str=None, type: str=None, **kwargs) -> None: + super(RoleDefinitionFilter, self).__init__(**kwargs) + self.role_name = role_name + self.type = type diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_definition_paged.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_definition_paged.py new file mode 100644 index 000000000000..fcf22bfa1eeb --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_definition_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class RoleDefinitionPaged(Paged): + """ + A paging container for iterating over a list of :class:`RoleDefinition ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RoleDefinition]'} + } + + def __init__(self, *args, **kwargs): + + super(RoleDefinitionPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_definition_py3.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_definition_py3.py new file mode 100644 index 000000000000..e706ad03ad6c --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_definition_py3.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RoleDefinition(Model): + """Role definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The role definition ID. + :vartype id: str + :ivar name: The role definition name. + :vartype name: str + :ivar type: The role definition type. + :vartype type: str + :param role_name: The role name. + :type role_name: str + :param description: The role definition description. + :type description: str + :param role_type: The role type. + :type role_type: str + :param permissions: Role definition permissions. + :type permissions: + list[~azure.mgmt.authorization.v2018_09_01_preview.models.Permission] + :param assignable_scopes: Role definition assignable scopes. + :type assignable_scopes: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'role_name': {'key': 'properties.roleName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'role_type': {'key': 'properties.type', 'type': 'str'}, + 'permissions': {'key': 'properties.permissions', 'type': '[Permission]'}, + 'assignable_scopes': {'key': 'properties.assignableScopes', 'type': '[str]'}, + } + + def __init__(self, *, role_name: str=None, description: str=None, role_type: str=None, permissions=None, assignable_scopes=None, **kwargs) -> None: + super(RoleDefinition, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.role_name = role_name + self.description = description + self.role_type = role_type + self.permissions = permissions + self.assignable_scopes = assignable_scopes diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/operations/__init__.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/operations/__init__.py new file mode 100644 index 000000000000..460a4b779f97 --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/operations/__init__.py @@ -0,0 +1,22 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .provider_operations_metadata_operations import ProviderOperationsMetadataOperations +from .permissions_operations import PermissionsOperations +from .role_assignments_operations import RoleAssignmentsOperations +from .role_definitions_operations import RoleDefinitionsOperations + +__all__ = [ + 'ProviderOperationsMetadataOperations', + 'PermissionsOperations', + 'RoleAssignmentsOperations', + 'RoleDefinitionsOperations', +] diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/operations/permissions_operations.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/operations/permissions_operations.py new file mode 100644 index 000000000000..d0580c18cb4a --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/operations/permissions_operations.py @@ -0,0 +1,186 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class PermissionsOperations(object): + """PermissionsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2018-09-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-09-01-preview" + + self.config = config + + def list_for_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets all permissions the caller has for a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Permission + :rtype: + ~azure.mgmt.authorization.v2018_09_01_preview.models.PermissionPaged[~azure.mgmt.authorization.v2018_09_01_preview.models.Permission] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_for_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.PermissionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.PermissionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_for_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Authorization/permissions'} + + def list_for_resource( + self, resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, custom_headers=None, raw=False, **operation_config): + """Gets all permissions the caller has for a resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_provider_namespace: The namespace of the resource + provider. + :type resource_provider_namespace: str + :param parent_resource_path: The parent resource identity. + :type parent_resource_path: str + :param resource_type: The resource type of the resource. + :type resource_type: str + :param resource_name: The name of the resource to get the permissions + for. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Permission + :rtype: + ~azure.mgmt.authorization.v2018_09_01_preview.models.PermissionPaged[~azure.mgmt.authorization.v2018_09_01_preview.models.Permission] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_for_resource.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), + 'parentResourcePath': self._serialize.url("parent_resource_path", parent_resource_path, 'str', skip_quote=True), + 'resourceType': self._serialize.url("resource_type", resource_type, 'str', skip_quote=True), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.PermissionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.PermissionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_for_resource.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/permissions'} diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/operations/provider_operations_metadata_operations.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/operations/provider_operations_metadata_operations.py new file mode 100644 index 000000000000..ff2abce71115 --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/operations/provider_operations_metadata_operations.py @@ -0,0 +1,166 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ProviderOperationsMetadataOperations(object): + """ProviderOperationsMetadataOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2018-09-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-09-01-preview" + + self.config = config + + def get( + self, resource_provider_namespace, expand="resourceTypes", custom_headers=None, raw=False, **operation_config): + """Gets provider operations metadata for the specified resource provider. + + :param resource_provider_namespace: The namespace of the resource + provider. + :type resource_provider_namespace: str + :param expand: Specifies whether to expand the values. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProviderOperationsMetadata or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.authorization.v2018_09_01_preview.models.ProviderOperationsMetadata + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ProviderOperationsMetadata', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/providers/Microsoft.Authorization/providerOperations/{resourceProviderNamespace}'} + + def list( + self, expand="resourceTypes", custom_headers=None, raw=False, **operation_config): + """Gets provider operations metadata for all resource providers. + + :param expand: Specifies whether to expand the values. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProviderOperationsMetadata + :rtype: + ~azure.mgmt.authorization.v2018_09_01_preview.models.ProviderOperationsMetadataPaged[~azure.mgmt.authorization.v2018_09_01_preview.models.ProviderOperationsMetadata] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.ProviderOperationsMetadataPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ProviderOperationsMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/providers/Microsoft.Authorization/providerOperations'} diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/operations/role_assignments_operations.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/operations/role_assignments_operations.py new file mode 100644 index 000000000000..8a6cac34b8aa --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/operations/role_assignments_operations.py @@ -0,0 +1,729 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class RoleAssignmentsOperations(object): + """RoleAssignmentsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2018-09-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-09-01-preview" + + self.config = config + + def list_for_resource( + self, resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter=None, custom_headers=None, raw=False, **operation_config): + """Gets role assignments for a resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_provider_namespace: The namespace of the resource + provider. + :type resource_provider_namespace: str + :param parent_resource_path: The parent resource identity. + :type parent_resource_path: str + :param resource_type: The resource type of the resource. + :type resource_type: str + :param resource_name: The name of the resource to get role assignments + for. + :type resource_name: str + :param filter: The filter to apply on the operation. Use + $filter=atScope() to return all role assignments at or above the + scope. Use $filter=principalId eq {id} to return all role assignments + at, above or below the scope for the specified principal. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of RoleAssignment + :rtype: + ~azure.mgmt.authorization.v2018_09_01_preview.models.RoleAssignmentPaged[~azure.mgmt.authorization.v2018_09_01_preview.models.RoleAssignment] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_for_resource.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str'), + 'parentResourcePath': self._serialize.url("parent_resource_path", parent_resource_path, 'str', skip_quote=True), + 'resourceType': self._serialize.url("resource_type", resource_type, 'str', skip_quote=True), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.RoleAssignmentPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.RoleAssignmentPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_for_resource.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/roleAssignments'} + + def list_for_resource_group( + self, resource_group_name, filter=None, custom_headers=None, raw=False, **operation_config): + """Gets role assignments for a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param filter: The filter to apply on the operation. Use + $filter=atScope() to return all role assignments at or above the + scope. Use $filter=principalId eq {id} to return all role assignments + at, above or below the scope for the specified principal. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of RoleAssignment + :rtype: + ~azure.mgmt.authorization.v2018_09_01_preview.models.RoleAssignmentPaged[~azure.mgmt.authorization.v2018_09_01_preview.models.RoleAssignment] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_for_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.RoleAssignmentPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.RoleAssignmentPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_for_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/roleAssignments'} + + def delete( + self, scope, role_assignment_name, custom_headers=None, raw=False, **operation_config): + """Deletes a role assignment. + + :param scope: The scope of the role assignment to delete. + :type scope: str + :param role_assignment_name: The name of the role assignment to + delete. + :type role_assignment_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RoleAssignment or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.authorization.v2018_09_01_preview.models.RoleAssignment or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + 'roleAssignmentName': self._serialize.url("role_assignment_name", role_assignment_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RoleAssignment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}'} + + def create( + self, scope, role_assignment_name, parameters, custom_headers=None, raw=False, **operation_config): + """Creates a role assignment. + + :param scope: The scope of the role assignment to create. The scope + can be any REST resource instance. For example, use + '/subscriptions/{subscription-id}/' for a subscription, + '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' + for a resource group, and + '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}' + for a resource. + :type scope: str + :param role_assignment_name: The name of the role assignment to + create. It can be any valid GUID. + :type role_assignment_name: str + :param parameters: Parameters for the role assignment. + :type parameters: + ~azure.mgmt.authorization.v2018_09_01_preview.models.RoleAssignmentCreateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RoleAssignment or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.authorization.v2018_09_01_preview.models.RoleAssignment or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + 'roleAssignmentName': self._serialize.url("role_assignment_name", role_assignment_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'RoleAssignmentCreateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('RoleAssignment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}'} + + def get( + self, scope, role_assignment_name, custom_headers=None, raw=False, **operation_config): + """Get the specified role assignment. + + :param scope: The scope of the role assignment. + :type scope: str + :param role_assignment_name: The name of the role assignment to get. + :type role_assignment_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RoleAssignment or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.authorization.v2018_09_01_preview.models.RoleAssignment or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + 'roleAssignmentName': self._serialize.url("role_assignment_name", role_assignment_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RoleAssignment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}'} + + def delete_by_id( + self, role_id, custom_headers=None, raw=False, **operation_config): + """Deletes a role assignment. + + :param role_id: The ID of the role assignment to delete. + :type role_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RoleAssignment or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.authorization.v2018_09_01_preview.models.RoleAssignment or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_by_id.metadata['url'] + path_format_arguments = { + 'roleId': self._serialize.url("role_id", role_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RoleAssignment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete_by_id.metadata = {'url': '/{roleId}'} + + def create_by_id( + self, role_id, parameters, custom_headers=None, raw=False, **operation_config): + """Creates a role assignment by ID. + + :param role_id: The ID of the role assignment to create. + :type role_id: str + :param parameters: Parameters for the role assignment. + :type parameters: + ~azure.mgmt.authorization.v2018_09_01_preview.models.RoleAssignmentCreateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RoleAssignment or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.authorization.v2018_09_01_preview.models.RoleAssignment or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_by_id.metadata['url'] + path_format_arguments = { + 'roleId': self._serialize.url("role_id", role_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'RoleAssignmentCreateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('RoleAssignment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_by_id.metadata = {'url': '/{roleId}'} + + def get_by_id( + self, role_id, custom_headers=None, raw=False, **operation_config): + """Gets a role assignment by ID. + + :param role_id: The ID of the role assignment to get. + :type role_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RoleAssignment or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.authorization.v2018_09_01_preview.models.RoleAssignment or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_by_id.metadata['url'] + path_format_arguments = { + 'roleId': self._serialize.url("role_id", role_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RoleAssignment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_by_id.metadata = {'url': '/{roleId}'} + + def list( + self, filter=None, custom_headers=None, raw=False, **operation_config): + """Gets all role assignments for the subscription. + + :param filter: The filter to apply on the operation. Use + $filter=atScope() to return all role assignments at or above the + scope. Use $filter=principalId eq {id} to return all role assignments + at, above or below the scope for the specified principal. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of RoleAssignment + :rtype: + ~azure.mgmt.authorization.v2018_09_01_preview.models.RoleAssignmentPaged[~azure.mgmt.authorization.v2018_09_01_preview.models.RoleAssignment] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.RoleAssignmentPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.RoleAssignmentPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/roleAssignments'} + + def list_for_scope( + self, scope, filter=None, custom_headers=None, raw=False, **operation_config): + """Gets role assignments for a scope. + + :param scope: The scope of the role assignments. + :type scope: str + :param filter: The filter to apply on the operation. Use + $filter=atScope() to return all role assignments at or above the + scope. Use $filter=principalId eq {id} to return all role assignments + at, above or below the scope for the specified principal. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of RoleAssignment + :rtype: + ~azure.mgmt.authorization.v2018_09_01_preview.models.RoleAssignmentPaged[~azure.mgmt.authorization.v2018_09_01_preview.models.RoleAssignment] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_for_scope.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.RoleAssignmentPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.RoleAssignmentPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_for_scope.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/roleAssignments'} diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/operations/role_definitions_operations.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/operations/role_definitions_operations.py new file mode 100644 index 000000000000..d488489981c4 --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/operations/role_definitions_operations.py @@ -0,0 +1,366 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class RoleDefinitionsOperations(object): + """RoleDefinitionsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2018-09-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-09-01-preview" + + self.config = config + + def delete( + self, scope, role_definition_id, custom_headers=None, raw=False, **operation_config): + """Deletes a role definition. + + :param scope: The scope of the role definition. + :type scope: str + :param role_definition_id: The ID of the role definition to delete. + :type role_definition_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RoleDefinition or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.authorization.v2018_09_01_preview.models.RoleDefinition or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + 'roleDefinitionId': self._serialize.url("role_definition_id", role_definition_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RoleDefinition', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId}'} + + def get( + self, scope, role_definition_id, custom_headers=None, raw=False, **operation_config): + """Get role definition by name (GUID). + + :param scope: The scope of the role definition. + :type scope: str + :param role_definition_id: The ID of the role definition. + :type role_definition_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RoleDefinition or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.authorization.v2018_09_01_preview.models.RoleDefinition or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + 'roleDefinitionId': self._serialize.url("role_definition_id", role_definition_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RoleDefinition', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId}'} + + def create_or_update( + self, scope, role_definition_id, role_definition, custom_headers=None, raw=False, **operation_config): + """Creates or updates a role definition. + + :param scope: The scope of the role definition. + :type scope: str + :param role_definition_id: The ID of the role definition. + :type role_definition_id: str + :param role_definition: The values for the role definition. + :type role_definition: + ~azure.mgmt.authorization.v2018_09_01_preview.models.RoleDefinition + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RoleDefinition or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.authorization.v2018_09_01_preview.models.RoleDefinition or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + 'roleDefinitionId': self._serialize.url("role_definition_id", role_definition_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(role_definition, 'RoleDefinition') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('RoleDefinition', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId}'} + + def list( + self, scope, filter=None, custom_headers=None, raw=False, **operation_config): + """Get all role definitions that are applicable at scope and above. + + :param scope: The scope of the role definition. + :type scope: str + :param filter: The filter to apply on the operation. Use + atScopeAndBelow filter to search below the given scope as well. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of RoleDefinition + :rtype: + ~azure.mgmt.authorization.v2018_09_01_preview.models.RoleDefinitionPaged[~azure.mgmt.authorization.v2018_09_01_preview.models.RoleDefinition] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.RoleDefinitionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.RoleDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/roleDefinitions'} + + def get_by_id( + self, role_id, custom_headers=None, raw=False, **operation_config): + """Gets a role definition by ID. + + :param role_id: The fully qualified role definition ID. Use the + format, + /subscriptions/{guid}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId} + for subscription level role definitions, or + /providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId} + for tenant level role definitions. + :type role_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RoleDefinition or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.authorization.v2018_09_01_preview.models.RoleDefinition or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_by_id.metadata['url'] + path_format_arguments = { + 'roleId': self._serialize.url("role_id", role_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RoleDefinition', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_by_id.metadata = {'url': '/{roleId}'} diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/version.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/version.py new file mode 100644 index 000000000000..b8bbafae36fe --- /dev/null +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/version.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +VERSION = "2018-09-01-preview" + diff --git a/azure-mgmt-authorization/build.json b/azure-mgmt-authorization/build.json deleted file mode 100644 index 3141ecaf1a95..000000000000 --- a/azure-mgmt-authorization/build.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "autorest": [ - { - "resolvedInfo": null, - "packageMetadata": { - "name": "@microsoft.azure/autorest-core", - "version": "2.0.4168", - "engines": { - "node": ">=7.10.0" - }, - "dependencies": {}, - "optionalDependencies": {}, - "devDependencies": { - "@microsoft.azure/async-io": "~1.0.22", - "@microsoft.azure/extension": "~1.2.12", - "@types/commonmark": "^0.27.0", - "@types/jsonpath": "^0.1.29", - "@types/node": "^8.0.28", - "@types/pify": "0.0.28", - "@types/source-map": "^0.5.0", - "@types/yargs": "^8.0.2", - "commonmark": "^0.27.0", - "file-url": "^2.0.2", - "get-uri": "^2.0.0", - "jsonpath": "^0.2.11", - "linq-es2015": "^2.4.25", - "mocha": "3.4.2", - "mocha-typescript": "1.1.5", - "pify": "^3.0.0", - "safe-eval": "^0.3.0", - "shx": "^0.2.2", - "source-map": "^0.5.6", - "source-map-support": "^0.4.15", - "strip-bom": "^3.0.0", - "typescript": "2.5.3", - "untildify": "^3.0.2", - "urijs": "^1.18.10", - "vscode-jsonrpc": "^3.3.1", - "yaml-ast-parser": "https://github.com/olydis/yaml-ast-parser/releases/download/0.0.34/yaml-ast-parser-0.0.34.tgz", - "yargs": "^8.0.2" - }, - "bundleDependencies": false, - "peerDependencies": {}, - "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", - "_shasum": "33813111fc9bfa488bd600fbba48bc53cc9182c7", - "_shrinkwrap": null, - "bin": null, - "_id": "@microsoft.azure/autorest-core@2.0.4168", - "_from": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", - "_requested": { - "type": "directory", - "where": "/git-restapi", - "raw": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core" - }, - "_spec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", - "_where": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core" - }, - "extensionManager": { - "installationPath": "/root/.autorest", - "dotnetPath": "/root/.dotnet" - }, - "installationPath": "/root/.autorest" - }, - { - "resolvedInfo": null, - "packageMetadata": { - "name": "@microsoft.azure/autorest.modeler", - "version": "2.1.22", - "dependencies": { - "dotnet-2.0.0": "^1.4.4" - }, - "optionalDependencies": {}, - "devDependencies": { - "coffee-script": "^1.11.1", - "dotnet-sdk-2.0.0": "^1.4.4", - "gulp": "^3.9.1", - "gulp-filter": "^5.0.0", - "gulp-line-ending-corrector": "^1.0.1", - "iced-coffee-script": "^108.0.11", - "marked": "^0.3.6", - "marked-terminal": "^2.0.0", - "moment": "^2.17.1", - "run-sequence": "*", - "shx": "^0.2.2", - "through2-parallel": "^0.1.3", - "yargs": "^8.0.2", - "yarn": "^1.0.2" - }, - "bundleDependencies": false, - "peerDependencies": {}, - "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", - "_shasum": "ca425289fa38a210d279729048a4a91673f09c67", - "_shrinkwrap": null, - "bin": null, - "_id": "@microsoft.azure/autorest.modeler@2.1.22", - "_from": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", - "_requested": { - "type": "directory", - "where": "/git-restapi", - "raw": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler" - }, - "_spec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", - "_where": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler" - }, - "extensionManager": { - "installationPath": "/root/.autorest", - "dotnetPath": "/root/.dotnet" - }, - "installationPath": "/root/.autorest" - }, - { - "resolvedInfo": null, - "packageMetadata": { - "name": "@microsoft.azure/autorest.python", - "version": "2.0.17", - "dependencies": { - "dotnet-2.0.0": "^1.4.4" - }, - "optionalDependencies": {}, - "devDependencies": { - "@microsoft.azure/autorest.testserver": "^1.9.0", - "autorest": "^2.0.0", - "coffee-script": "^1.11.1", - "dotnet-sdk-2.0.0": "^1.4.4", - "gulp": "^3.9.1", - "gulp-filter": "^5.0.0", - "gulp-line-ending-corrector": "^1.0.1", - "iced-coffee-script": "^108.0.11", - "marked": "^0.3.6", - "marked-terminal": "^2.0.0", - "moment": "^2.17.1", - "run-sequence": "*", - "shx": "^0.2.2", - "through2-parallel": "^0.1.3", - "yargs": "^8.0.2", - "yarn": "^1.0.2" - }, - "bundleDependencies": false, - "peerDependencies": {}, - "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest.python@2.0.17/node_modules/@microsoft.azure/autorest.python", - "_shasum": "84a951c19c502343726cfe33cf43cefa76219b39", - "_shrinkwrap": null, - "bin": null, - "_id": "@microsoft.azure/autorest.python@2.0.17", - "_from": "file:/root/.autorest/@microsoft.azure_autorest.python@2.0.17/node_modules/@microsoft.azure/autorest.python", - "_requested": { - "type": "directory", - "where": "/git-restapi", - "raw": "/root/.autorest/@microsoft.azure_autorest.python@2.0.17/node_modules/@microsoft.azure/autorest.python", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.0.17/node_modules/@microsoft.azure/autorest.python", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.python@2.0.17/node_modules/@microsoft.azure/autorest.python", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.0.17/node_modules/@microsoft.azure/autorest.python" - }, - "_spec": "/root/.autorest/@microsoft.azure_autorest.python@2.0.17/node_modules/@microsoft.azure/autorest.python", - "_where": "/root/.autorest/@microsoft.azure_autorest.python@2.0.17/node_modules/@microsoft.azure/autorest.python" - }, - "extensionManager": { - "installationPath": "/root/.autorest", - "dotnetPath": "/root/.dotnet" - }, - "installationPath": "/root/.autorest" - } - ], - "autorest_bootstrap": { - "dependencies": { - "autorest": { - "version": "2.0.4147", - "from": "autorest@latest", - "resolved": "https://registry.npmjs.org/autorest/-/autorest-2.0.4147.tgz" - } - } - }, - "date": "2017-10-17T19:17:51Z" -} \ No newline at end of file