зеркало из https://github.com/microsoft/azure-cli.git
[AMS CLI] Added Azure Media Service CLI Module (#6044)
* [AMS] Add baseline for ams command module.
* [AMS] Add show & list commands.
* [AMS] Add list & show transform operations based on new AMS Rest v3 swagger definitions.
* [AMS] Add create command implementation.
* [AMS] Add tests for create & list operations.
* [AMS] Add storage account not found exception handler. Add _exception_handler separate file.
* [AMS] Add test recordings & rename 'create' test.
* [AMS] Add support for adding or removing secondary storage accounts for a media service account.
* [AMS] Fix storage group help documentation.
* [AMS] Add ams sp create command.
* [AMS] Add --xml flag to enable xml output format for sp create command.
* [AMS] Add custom list media services operation with optional resource group parameter.
* [AMS] Add AMS REST API v3 client within the command module.
* [AMS] Revert change in resource manager url.
* [AMS] Add idempotence support for ams sp create command.
* [AMS] Remove external dependency on ams module.
* [AMS] Fix .pyproj path reference.
* [AMS] Improve help documentation wording.
* [AMS] Add 'account' subgroup and add --account-name parameter where necessary.
* [AMS] Fix ams sp create help documentation.
* [AMS] Add test for ams sp create command.
* [AMS] Add --years parameter to sp create command.
* [AMS] Apply missing code style guidelines.
* [AMS] Add ams account delete operation.
* [AMS] Add list & show transfrom operations.
* [AMS] Refactor sp create logic.
* [AMS] Add _utils & refactor code.
* [AMS] Refactor custom operations.
* [AMS] Add transform create operation.
* [AMS] Add transform delete operation.
* [AMS] Add support for transform description and tags in transform create operation.
* [AMS] Add transform output add/remove & update operations.
* [AMS] Fix optional parameter assignation in transform update operation.
* [AMS] Add asset list & show operations.
* [AMS] Add asset create operation.
* [AMS] Add asset delete operation.
* [AMS] Improve error handling messages.
* [AMS] Fix client_factory sdk assignation & regenerate mediav3 client.
* [AMS] Add job create operation.
* [AMS] Add show & list job operations.
* [AMS] Add delete & cancel job operations.
* [AMS] Add tests for job operations.
* [AMS] Add list of output assets & files support for job create operation.
* [AMS] Update readme & add manifest.
* [AMS] Add asset get-sas-urls command. Add test.
* [AMS] Remove --location parameter from transform create operation.
* [AMS] Add name & resource id support for --storage-account parameter.
* [AMS] Update asset get-sas-urls command to return just the urls array.
* [AMS] Add --ids support for show, delete & list commands.
* [AMS] Rename operation `job cancel` to `job start`.
* [AMS] Add --delete to `job cancel`.
* [AMS] Use space-separated list for --output-asset-names & --files.
* [AMS] Create subgroups for http & asset job inputs.
* [AMS] Move sp & storage subgroups under account. Fix rbac api update issues.
* [AMS] Add multiple preset support for transform commands.
* [AMS] Fix preset_names support for transform create.
* [AMS] Set 0.30.0 azure-mgmt-authorization version for rbac.
* [AMS] Fix `az ams account sp create` code logic due to azure-mgmt-authorization api breaking changes.
* [AMS] Add ams account update command.
* [AMS] Add asset update command.
* [AMS] Update transform update to allow generic update & multiple preset names.
* [AMS] Add sp reset-credentials command & refactor sp.py.
* [AMS] Add exception handling for generic updates commands.
* [AMS] Update media sdk to 2018-03-30-preview.
* [AMS] Add streaming locator command.
* [AMS] Update transform operations based on new api.
* [AMS] Fix job start command.
* [AMS] Add streaming policy command & update streaming locator required parameters.
* [AMS] Add start-time & end-time parameters to streaming locator command.
* [AMS] Fix code style.
* [AMS] Add streaming locator get-paths command.
* [AMS] Fix account update command. Fix unit tests.
* [AMS] Add --role completer for account sp command.
* Fix sp create datetime error
* Remove 'ids' argument for 'list' commands
* Remove ContentAdaptiveMultipleBitrateMP4 preset
* Add transform update and transform output unit tests
* Update doc_source_map
* Add media sdk package references.
* Add operations namespace reference
* Remove streaming locator and policy update help commands
* Add streaming endpoint list/start/stop implementation
* Add streaming endpoint test
* Fix pylint warnings
* Fix some PR request changes:
- Add MediaServicesCommandLoader
- Remove unnecesary parameters help commands
- Don't use tuple syntax
- Register account_name in ams scope
- Remove 'within the resource group'
- Set account_name help text generic
- Apply account_name_arg_type
- Typo: built-in
- Remove Customer-supplied
- Remove exception factory
* Change release version
* Refactor changes:
- Rename `storage_account_id` to `validate_storage_account_id`
- Assume storage account id exists to build the storage_account_id.
- Set flag for `ams job cancel`
- Set flags for protocols in `ams streaming policy`
- Support multiple permissions for `ams asset get-sas-urls`
* Add validation to expiry time
* - Set `--content-policy-name` succinct for `default_content_key_policy_name`
- Add more datetime validation
* Fix pep8 warnings
* Remove ad app for sp tests
* Remove 'parameters' from help
* Update ams setup version
* Revert number version upgrade
* Upgrade version to 0.1.0
* Add missing helps
* Update Swagger Files to commit 48f63653ca (diff-7bc850cdd18729c690d8be31d245e93b)
* Fix swagger files pep8 warnings
* Update help message for streaming endpoint start/stop commands
* Update references to target the latest SDK for Python version
* Update VS projects to include ams module
* Update get-sas-urls to support only one permission
* Update azure-mgmt-media dependency to target 1.0.0rc1
* Add video and audio analyzer presets
* Instance Audio analyzer preset
* Fix line too long on transform
This commit is contained in:
Родитель
a93c9d3878
Коммит
0cf5f8b4d8
|
@ -141,6 +141,30 @@
|
|||
<Compile Include="command_modules\azure-cli-advisor\azure\cli\command_modules\advisor\_validators.py" />
|
||||
<Compile Include="command_modules\azure-cli-advisor\azure\cli\command_modules\advisor\__init__.py" />
|
||||
<Compile Include="command_modules\azure-cli-advisor\setup.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\commands.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\operations\account.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\operations\asset.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\operations\job.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\operations\sp.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\operations\streaming.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\operations\transform.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\operations\__init__.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\tests\latest\test_ams.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\tests\__init__.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\_client_factory.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\_completers.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\_exception_handler.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\_format.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\_help.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\_params.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\_utils.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\_validators.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\__init__.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure\cli\command_modules\__init__.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure\cli\__init__.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure\__init__.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure_bdist_wheel.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\setup.py" />
|
||||
<Compile Include="command_modules\azure-cli-appservice\azure\cli\command_modules\appservice\commands.py" />
|
||||
<Compile Include="command_modules\azure-cli-appservice\azure\cli\command_modules\appservice\custom.py" />
|
||||
<Compile Include="command_modules\azure-cli-appservice\azure\cli\command_modules\appservice\tests\latest\test_webapp_commands.py" />
|
||||
|
@ -733,6 +757,15 @@
|
|||
<Folder Include="command_modules\azure-cli-advisor\azure\cli\command_modules\advisor\" />
|
||||
<Folder Include="command_modules\azure-cli-advisor\azure\cli\command_modules\advisor\tests\" />
|
||||
<Folder Include="command_modules\azure-cli-advisor\azure\cli\command_modules\advisor\tests\latest\" />
|
||||
<Folder Include="command_modules\azure-cli-ams\" />
|
||||
<Folder Include="command_modules\azure-cli-ams\azure\" />
|
||||
<Folder Include="command_modules\azure-cli-ams\azure\cli\" />
|
||||
<Folder Include="command_modules\azure-cli-ams\azure\cli\command_modules\" />
|
||||
<Folder Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\" />
|
||||
<Folder Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\operations\" />
|
||||
<Folder Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\tests\" />
|
||||
<Folder Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\tests\latest\" />
|
||||
<Folder Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\tests\latest\recordings\" />
|
||||
<Folder Include="command_modules\azure-cli-appservice\" />
|
||||
<Folder Include="command_modules\azure-cli-appservice\azure\" />
|
||||
<Folder Include="command_modules\azure-cli-appservice\azure\cli\" />
|
||||
|
@ -1017,6 +1050,22 @@
|
|||
<Content Include="command_modules\azure-cli-advisor\MANIFEST.in" />
|
||||
<Content Include="command_modules\azure-cli-advisor\README.rst" />
|
||||
<Content Include="command_modules\azure-cli-advisor\setup.cfg" />
|
||||
<Content Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\tests\latest\recordings\test_ams_asset.yaml" />
|
||||
<Content Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\tests\latest\recordings\test_ams_asset_get_sas_urls.yaml" />
|
||||
<Content Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\tests\latest\recordings\test_ams_create_show.yaml" />
|
||||
<Content Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\tests\latest\recordings\test_ams_job.yaml" />
|
||||
<Content Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\tests\latest\recordings\test_ams_list.yaml" />
|
||||
<Content Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\tests\latest\recordings\test_ams_sp_create.yaml" />
|
||||
<Content Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\tests\latest\recordings\test_ams_sp_create_reset.yaml" />
|
||||
<Content Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\tests\latest\recordings\test_ams_storage_add_remove.yaml" />
|
||||
<Content Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\tests\latest\recordings\test_ams_streaming_endpoint.yaml" />
|
||||
<Content Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\tests\latest\recordings\test_ams_streaming_locator.yaml" />
|
||||
<Content Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\tests\latest\recordings\test_ams_streaming_policy.yaml" />
|
||||
<Content Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\tests\latest\recordings\test_ams_transform.yaml" />
|
||||
<Content Include="command_modules\azure-cli-ams\HISTORY.rst" />
|
||||
<Content Include="command_modules\azure-cli-ams\MANIFEST.in" />
|
||||
<Content Include="command_modules\azure-cli-ams\README.rst" />
|
||||
<Content Include="command_modules\azure-cli-ams\setup.cfg" />
|
||||
<Content Include="command_modules\azure-cli-appservice\azure\cli\command_modules\appservice\tests\latest\sample_web\.gitignore" />
|
||||
<Content Include="command_modules\azure-cli-appservice\azure\cli\command_modules\appservice\tests\latest\sample_web\package.json" />
|
||||
<Content Include="command_modules\azure-cli-appservice\azure\cli\command_modules\appservice\tests\latest\sample_web\server.js" />
|
||||
|
|
|
@ -7,8 +7,7 @@
|
|||
<ProjectHome>src\</ProjectHome>
|
||||
<StartupFile>azure-cli\azure\cli\__main__.py</StartupFile>
|
||||
<SearchPath>.</SearchPath>
|
||||
<WorkingDirectory>
|
||||
</WorkingDirectory>
|
||||
<WorkingDirectory>.</WorkingDirectory>
|
||||
<OutputPath>.</OutputPath>
|
||||
<ProjectTypeGuids>{888888a0-9f3d-457c-b088-3a5042f75d52}</ProjectTypeGuids>
|
||||
<LaunchProvider>Standard Python launcher</LaunchProvider>
|
||||
|
@ -16,6 +15,7 @@
|
|||
<EnableNativeCodeDebugging>False</EnableNativeCodeDebugging>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
<IsWindowsApplication>False</IsWindowsApplication>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)' == 'Debug'" />
|
||||
<PropertyGroup Condition="'$(Configuration)' == 'Release'" />
|
||||
|
@ -137,6 +137,30 @@
|
|||
<Compile Include="command_modules\azure-cli-advisor\azure\cli\command_modules\advisor\__init__.py" />
|
||||
<Compile Include="command_modules\azure-cli-advisor\azure_bdist_wheel.py" />
|
||||
<Compile Include="command_modules\azure-cli-advisor\setup.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\commands.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\operations\account.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\operations\asset.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\operations\job.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\operations\sp.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\operations\streaming.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\operations\transform.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\operations\__init__.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\tests\latest\test_ams.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\tests\__init__.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\_client_factory.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\_completers.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\_exception_handler.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\_format.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\_help.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\_params.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\_utils.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\_validators.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\__init__.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure\cli\command_modules\__init__.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure\cli\__init__.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure\__init__.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\azure_bdist_wheel.py" />
|
||||
<Compile Include="command_modules\azure-cli-ams\setup.py" />
|
||||
<Compile Include="command_modules\azure-cli-appservice\azure\cli\command_modules\appservice\commands.py" />
|
||||
<Compile Include="command_modules\azure-cli-appservice\azure\cli\command_modules\appservice\custom.py" />
|
||||
<Compile Include="command_modules\azure-cli-appservice\azure\cli\command_modules\appservice\tests\latest\test_webapp_commands.py" />
|
||||
|
@ -705,6 +729,15 @@
|
|||
<Folder Include="command_modules\azure-cli-advisor\azure\cli\command_modules\advisor\" />
|
||||
<Folder Include="command_modules\azure-cli-advisor\azure\cli\command_modules\advisor\tests\" />
|
||||
<Folder Include="command_modules\azure-cli-advisor\azure\cli\command_modules\advisor\tests\latest\" />
|
||||
<Folder Include="command_modules\azure-cli-ams\" />
|
||||
<Folder Include="command_modules\azure-cli-ams\azure\" />
|
||||
<Folder Include="command_modules\azure-cli-ams\azure\cli\" />
|
||||
<Folder Include="command_modules\azure-cli-ams\azure\cli\command_modules\" />
|
||||
<Folder Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\" />
|
||||
<Folder Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\operations\" />
|
||||
<Folder Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\tests\" />
|
||||
<Folder Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\tests\latest\" />
|
||||
<Folder Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\tests\latest\recordings\" />
|
||||
<Folder Include="command_modules\azure-cli-appservice\" />
|
||||
<Folder Include="command_modules\azure-cli-appservice\azure\" />
|
||||
<Folder Include="command_modules\azure-cli-appservice\azure\cli\" />
|
||||
|
@ -871,6 +904,12 @@
|
|||
<Folder Include="command_modules\azure-cli-lab\azure\cli\command_modules\lab\" />
|
||||
<Folder Include="command_modules\azure-cli-lab\azure\cli\command_modules\lab\tests\" />
|
||||
<Folder Include="command_modules\azure-cli-lab\azure\cli\command_modules\lab\tests\latest\" />
|
||||
<Folder Include="command_modules\azure-cli-ams\" />
|
||||
<Folder Include="command_modules\azure-cli-ams\azure\" />
|
||||
<Folder Include="command_modules\azure-cli-ams\azure\cli\" />
|
||||
<Folder Include="command_modules\azure-cli-ams\azure\cli\command_modules\" />
|
||||
<Folder Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\" />
|
||||
<Folder Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\tests\" />
|
||||
<Folder Include="command_modules\azure-cli-monitor\" />
|
||||
<Folder Include="command_modules\azure-cli-monitor\azure\" />
|
||||
<Folder Include="command_modules\azure-cli-monitor\azure\cli\" />
|
||||
|
@ -994,6 +1033,22 @@
|
|||
<Content Include="command_modules\azure-cli-advisor\MANIFEST.in" />
|
||||
<Content Include="command_modules\azure-cli-advisor\README.rst" />
|
||||
<Content Include="command_modules\azure-cli-advisor\setup.cfg" />
|
||||
<Content Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\tests\latest\recordings\test_ams_asset.yaml" />
|
||||
<Content Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\tests\latest\recordings\test_ams_asset_get_sas_urls.yaml" />
|
||||
<Content Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\tests\latest\recordings\test_ams_create_show.yaml" />
|
||||
<Content Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\tests\latest\recordings\test_ams_job.yaml" />
|
||||
<Content Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\tests\latest\recordings\test_ams_list.yaml" />
|
||||
<Content Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\tests\latest\recordings\test_ams_sp_create.yaml" />
|
||||
<Content Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\tests\latest\recordings\test_ams_sp_create_reset.yaml" />
|
||||
<Content Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\tests\latest\recordings\test_ams_storage_add_remove.yaml" />
|
||||
<Content Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\tests\latest\recordings\test_ams_streaming_endpoint.yaml" />
|
||||
<Content Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\tests\latest\recordings\test_ams_streaming_locator.yaml" />
|
||||
<Content Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\tests\latest\recordings\test_ams_streaming_policy.yaml" />
|
||||
<Content Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\tests\latest\recordings\test_ams_transform.yaml" />
|
||||
<Content Include="command_modules\azure-cli-ams\HISTORY.rst" />
|
||||
<Content Include="command_modules\azure-cli-ams\MANIFEST.in" />
|
||||
<Content Include="command_modules\azure-cli-ams\README.rst" />
|
||||
<Content Include="command_modules\azure-cli-ams\setup.cfg" />
|
||||
<Content Include="command_modules\azure-cli-appservice\azure\cli\command_modules\appservice\tests\latest\sample_web\.gitignore" />
|
||||
<Content Include="command_modules\azure-cli-appservice\azure\cli\command_modules\appservice\tests\latest\sample_web\package.json" />
|
||||
<Content Include="command_modules\azure-cli-appservice\azure\cli\command_modules\appservice\tests\latest\sample_web\server.js" />
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
"acr": "src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/_help.py",
|
||||
"acs": "src/command_modules/azure-cli-acs/azure/cli/command_modules/acs/_help.py",
|
||||
"advisor": "src/command_modules/azure-cli-advisor/azure/cli/command_modules/advisor/_help.py",
|
||||
"ams": "src/command_modules/azure-cli-ams/azure/cli/command_modules/ams/_help.py",
|
||||
"appservice": "src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/_help.py",
|
||||
"batch": "src/command_modules/azure-cli-batch/azure/cli/command_modules/batch/_help.py",
|
||||
"batchai": "src/command_modules/azure-cli-batchai/azure/cli/command_modules/batchai/_help.py",
|
||||
|
|
|
@ -52,6 +52,7 @@ DEPENDENCIES = [
|
|||
'azure-cli-acr',
|
||||
'azure-cli-acs',
|
||||
'azure-cli-advisor',
|
||||
'azure-cli-ams',
|
||||
'azure-cli-appservice',
|
||||
'azure-cli-batch',
|
||||
'azure-cli-batchai',
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
.. :changelog:
|
||||
|
||||
Release History
|
||||
===============
|
||||
|
||||
0.1.0
|
||||
+++++
|
||||
|
||||
* Initial release of module.
|
|
@ -0,0 +1 @@
|
|||
include *.rst
|
|
@ -0,0 +1,7 @@
|
|||
Microsoft Azure CLI 'ams' Command Module
|
||||
============================================
|
||||
|
||||
This package is for the 'ams' module.
|
||||
i.e. 'az ams'
|
||||
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# --------------------------------------------------------------------------------------------
|
||||
|
||||
import pkg_resources
|
||||
pkg_resources.declare_namespace(__name__)
|
|
@ -0,0 +1,6 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# --------------------------------------------------------------------------------------------
|
||||
import pkg_resources
|
||||
pkg_resources.declare_namespace(__name__)
|
|
@ -0,0 +1,6 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# --------------------------------------------------------------------------------------------
|
||||
import pkg_resources
|
||||
pkg_resources.declare_namespace(__name__)
|
|
@ -0,0 +1,29 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# --------------------------------------------------------------------------------------------
|
||||
|
||||
# pylint: disable=unused-import
|
||||
|
||||
from azure.cli.core import AzCommandsLoader
|
||||
import azure.cli.command_modules.ams._help
|
||||
|
||||
|
||||
class MediaServicesCommandsLoader(AzCommandsLoader):
|
||||
|
||||
def __init__(self, cli_ctx=None):
|
||||
super(MediaServicesCommandsLoader, self).__init__(cli_ctx=cli_ctx, min_profile='2017-03-10-profile')
|
||||
|
||||
def load_command_table(self, args):
|
||||
super(MediaServicesCommandsLoader, self).load_command_table(args)
|
||||
from azure.cli.command_modules.ams.commands import load_command_table
|
||||
load_command_table(self, args)
|
||||
return self.command_table
|
||||
|
||||
def load_arguments(self, command):
|
||||
super(MediaServicesCommandsLoader, self).load_arguments(command)
|
||||
from azure.cli.command_modules.ams._params import load_arguments
|
||||
load_arguments(self, command)
|
||||
|
||||
|
||||
COMMAND_LOADER_CLS = MediaServicesCommandsLoader
|
|
@ -0,0 +1,63 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# --------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
def cf_media(cli_ctx, *_):
|
||||
from azure.cli.core.commands.client_factory import get_mgmt_service_client
|
||||
from azure.mgmt.media import AzureMediaServices
|
||||
return get_mgmt_service_client(cli_ctx, AzureMediaServices)
|
||||
|
||||
|
||||
def get_mediaservices_client(cli_ctx, *_):
|
||||
return cf_media(cli_ctx).mediaservices
|
||||
|
||||
|
||||
def _auth_client_factory(cli_ctx, scope=None):
|
||||
import re
|
||||
from azure.cli.core.commands.client_factory import get_mgmt_service_client
|
||||
from azure.mgmt.authorization import AuthorizationManagementClient
|
||||
subscription_id = None
|
||||
if scope:
|
||||
matched = re.match('/subscriptions/(?P<subscription>[^/]*)/', scope)
|
||||
if matched:
|
||||
subscription_id = matched.groupdict()['subscription']
|
||||
return get_mgmt_service_client(cli_ctx, AuthorizationManagementClient, subscription_id=subscription_id)
|
||||
|
||||
|
||||
def _graph_client_factory(cli_ctx, **_):
|
||||
from azure.cli.core._profile import Profile
|
||||
from azure.cli.core.commands.client_factory import configure_common_settings
|
||||
from azure.graphrbac import GraphRbacManagementClient
|
||||
profile = Profile(cli_ctx=cli_ctx)
|
||||
cred, _, tenant_id = profile.get_login_credentials(
|
||||
resource=cli_ctx.cloud.endpoints.active_directory_graph_resource_id)
|
||||
client = GraphRbacManagementClient(cred, tenant_id,
|
||||
base_url=cli_ctx.cloud.endpoints.active_directory_graph_resource_id)
|
||||
configure_common_settings(cli_ctx, client)
|
||||
return client
|
||||
|
||||
|
||||
def get_transforms_client(cli_ctx, *_):
|
||||
return cf_media(cli_ctx).transforms
|
||||
|
||||
|
||||
def get_assets_client(cli_ctx, *_):
|
||||
return cf_media(cli_ctx).assets
|
||||
|
||||
|
||||
def get_jobs_client(cli_ctx, *_):
|
||||
return cf_media(cli_ctx).jobs
|
||||
|
||||
|
||||
def get_streaming_locators_client(cli_ctx, *_):
|
||||
return cf_media(cli_ctx).streaming_locators
|
||||
|
||||
|
||||
def get_streaming_policies_client(cli_ctx, *_):
|
||||
return cf_media(cli_ctx).streaming_policies
|
||||
|
||||
|
||||
def get_streaming_endpoints_client(cli_ctx, *_):
|
||||
return cf_media(cli_ctx).streaming_endpoints
|
|
@ -0,0 +1,30 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# --------------------------------------------------------------------------------------------
|
||||
|
||||
from azure.cli.core.decorators import Completer
|
||||
|
||||
from azure.cli.command_modules.ams.operations.sp import list_role_definitions
|
||||
|
||||
from azure.mgmt.media.models import (EncoderNamedPreset)
|
||||
|
||||
|
||||
@Completer
|
||||
def get_role_definition_name_completion_list(cmd):
|
||||
definitions = list_role_definitions(cmd)
|
||||
return [x.properties.role_name for x in list(definitions)]
|
||||
|
||||
|
||||
def get_presets_definition_name_completion_list():
|
||||
encoder_name_presets_list = [e.value for e in EncoderNamedPreset]
|
||||
encoder_name_presets_list.extend(get_stand_alone_presets())
|
||||
return encoder_name_presets_list
|
||||
|
||||
|
||||
def get_stand_alone_presets():
|
||||
return ['AudioAnalyzer', 'VideoAnalyzer']
|
||||
|
||||
|
||||
def is_audio_analyzer(preset_name):
|
||||
return preset_name == 'AudioAnalyzer'
|
|
@ -0,0 +1,14 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# --------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
def ams_exception_handler(ex):
|
||||
from azure.mgmt.media.models.api_error import ApiErrorException
|
||||
from knack.util import CLIError
|
||||
|
||||
if isinstance(ex, ApiErrorException) \
|
||||
and ex.response is not None:
|
||||
raise CLIError(ex.message)
|
||||
raise ex
|
|
@ -0,0 +1,8 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# --------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
def get_sp_create_output_xml(result):
|
||||
return print('\n'.join(['<add key=\"{}\" value=\"{}\" />'.format(k, v) for k, v in result.items()]))
|
|
@ -0,0 +1,258 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# --------------------------------------------------------------------------------------------
|
||||
|
||||
# pylint: disable=line-too-long, too-many-lines
|
||||
|
||||
from knack.help_files import helps
|
||||
|
||||
|
||||
helps['ams'] = """
|
||||
type: group
|
||||
short-summary: Manage Azure Media Services resources.
|
||||
"""
|
||||
|
||||
helps['ams account'] = """
|
||||
type: group
|
||||
short-summary: Manage Azure Media Services accounts.
|
||||
"""
|
||||
|
||||
helps['ams account create'] = """
|
||||
type: command
|
||||
short-summary: Create an Azure Media Services account.
|
||||
"""
|
||||
|
||||
helps['ams account update'] = """
|
||||
type: command
|
||||
short-summary: Update the details of an Azure Media Services account.
|
||||
"""
|
||||
|
||||
helps['ams account list'] = """
|
||||
type: command
|
||||
short-summary: List Azure Media Services accounts for the entire subscription.
|
||||
"""
|
||||
|
||||
helps['ams account show'] = """
|
||||
type: command
|
||||
short-summary: Show the details of an Azure Media Services account.
|
||||
"""
|
||||
|
||||
helps['ams account delete'] = """
|
||||
type: command
|
||||
short-summary: Delete an Azure Media Services account.
|
||||
"""
|
||||
|
||||
helps['ams account storage'] = """
|
||||
type: group
|
||||
short-summary: Manage secondary storage for an Azure Media Services account.
|
||||
"""
|
||||
|
||||
helps['ams account storage add'] = """
|
||||
type: command
|
||||
short-summary: Attach a secondary storage to an Azure Media Services account.
|
||||
"""
|
||||
|
||||
helps['ams account storage remove'] = """
|
||||
type: command
|
||||
short-summary: Detach a secondary storage from an Azure Media Services account.
|
||||
"""
|
||||
|
||||
helps['ams account sp'] = """
|
||||
type: group
|
||||
short-summary: Manage service principal and role based access for an Azure Media Services account.
|
||||
"""
|
||||
|
||||
helps['ams account sp create'] = """
|
||||
type: command
|
||||
short-summary: Create a service principal and configure its access to an Azure Media Services account.
|
||||
examples:
|
||||
- name: Create a service principal with password and configure its access to an Azure Media Services account. Output will be in xml format.
|
||||
text: >
|
||||
az ams account sp create -a {myamsaccount} -g {myresourcegroup} -n {mySpName} -password {mySpPassword} --role {rol} --xml
|
||||
"""
|
||||
|
||||
helps['ams account sp reset-credentials'] = """
|
||||
type: command
|
||||
short-summary: Generate a new client secret for a service principal configured for an Azure Media Services account.
|
||||
"""
|
||||
|
||||
helps['ams transform'] = """
|
||||
type: group
|
||||
short-summary: Manage transforms for an Azure Media Services account.
|
||||
"""
|
||||
|
||||
helps['ams transform list'] = """
|
||||
type: command
|
||||
short-summary: List all the transforms of an Azure Media Services account.
|
||||
"""
|
||||
|
||||
helps['ams transform show'] = """
|
||||
type: command
|
||||
short-summary: Show the details of a transform.
|
||||
"""
|
||||
|
||||
helps['ams transform create'] = """
|
||||
type: command
|
||||
short-summary: Create a transform.
|
||||
"""
|
||||
|
||||
helps['ams transform delete'] = """
|
||||
type: command
|
||||
short-summary: Delete a transform.
|
||||
"""
|
||||
|
||||
helps['ams transform update'] = """
|
||||
type: command
|
||||
short-summary: Update the details of a transform.
|
||||
"""
|
||||
|
||||
helps['ams transform output'] = """
|
||||
type: group
|
||||
short-summary: Manage transform outputs for an Azure Media Services account.
|
||||
"""
|
||||
|
||||
helps['ams transform output add'] = """
|
||||
type: command
|
||||
short-summary: Add an output to an existing transform.
|
||||
"""
|
||||
|
||||
helps['ams transform output remove'] = """
|
||||
type: command
|
||||
short-summary: Remove an output from an existing transform.
|
||||
"""
|
||||
|
||||
helps['ams asset'] = """
|
||||
type: group
|
||||
short-summary: Manage assets for an Azure Media Services account.
|
||||
"""
|
||||
|
||||
helps['ams asset show'] = """
|
||||
type: command
|
||||
short-summary: Show the details of an asset.
|
||||
"""
|
||||
|
||||
helps['ams asset list'] = """
|
||||
type: command
|
||||
short-summary: List all the assets of an Azure Media Services account.
|
||||
"""
|
||||
|
||||
helps['ams asset create'] = """
|
||||
type: command
|
||||
short-summary: Create an asset.
|
||||
"""
|
||||
|
||||
helps['ams asset update'] = """
|
||||
type: command
|
||||
short-summary: Update the details of an asset.
|
||||
"""
|
||||
|
||||
helps['ams asset delete'] = """
|
||||
type: command
|
||||
short-summary: Delete an asset.
|
||||
"""
|
||||
|
||||
helps['ams asset get-sas-urls'] = """
|
||||
type: command
|
||||
short-summary: Lists the asset SAS URLs used for uploading and downloading asset content.
|
||||
"""
|
||||
|
||||
helps['ams job'] = """
|
||||
type: group
|
||||
short-summary: Manage jobs for a transform.
|
||||
"""
|
||||
|
||||
helps['ams job start'] = """
|
||||
type: command
|
||||
short-summary: Start a job.
|
||||
"""
|
||||
|
||||
helps['ams job list'] = """
|
||||
type: command
|
||||
short-summary: List all the jobs of a transform within an Azure Media Services account.
|
||||
"""
|
||||
|
||||
helps['ams job show'] = """
|
||||
type: command
|
||||
short-summary: Show the details of a job.
|
||||
"""
|
||||
|
||||
helps['ams job delete'] = """
|
||||
type: command
|
||||
short-summary: Delete a job.
|
||||
"""
|
||||
|
||||
helps['ams job cancel'] = """
|
||||
type: command
|
||||
short-summary: Cancel a job.
|
||||
"""
|
||||
|
||||
helps['ams streaming'] = """
|
||||
type: group
|
||||
short-summary: Manage streamings for an Azure Media Services account.
|
||||
"""
|
||||
|
||||
helps['ams streaming locator'] = """
|
||||
type: group
|
||||
short-summary: Manage streaming locators for an Azure Media Services account.
|
||||
"""
|
||||
|
||||
helps['ams streaming locator create'] = """
|
||||
type: command
|
||||
short-summary: Create a streaming locator.
|
||||
"""
|
||||
|
||||
helps['ams streaming locator list'] = """
|
||||
type: command
|
||||
short-summary: List all the streaming locators within an Azure Media Services account.
|
||||
"""
|
||||
|
||||
helps['ams streaming locator show'] = """
|
||||
type: command
|
||||
short-summary: Show the details of a streaming locator.
|
||||
"""
|
||||
|
||||
helps['ams streaming locator get-paths'] = """
|
||||
type: command
|
||||
short-summary: List paths supported by a streaming locator.
|
||||
"""
|
||||
|
||||
helps['ams streaming policy'] = """
|
||||
type: group
|
||||
short-summary: Manage streaming policies for an Azure Media Services account.
|
||||
"""
|
||||
|
||||
helps['ams streaming policy create'] = """
|
||||
type: command
|
||||
short-summary: Create a streaming policy.
|
||||
"""
|
||||
|
||||
helps['ams streaming policy list'] = """
|
||||
type: command
|
||||
short-summary: List all the streaming policies within an Azure Media Services account.
|
||||
"""
|
||||
|
||||
helps['ams streaming policy show'] = """
|
||||
type: command
|
||||
short-summary: Show the details of a streaming policy.
|
||||
"""
|
||||
|
||||
helps['ams streaming endpoint'] = """
|
||||
type: group
|
||||
short-summary: Manage streaming endpoints for an Azure Media Service account.
|
||||
"""
|
||||
|
||||
helps['ams streaming endpoint start'] = """
|
||||
type: command
|
||||
short-summary: Start a streaming endpoint.
|
||||
"""
|
||||
|
||||
helps['ams streaming endpoint stop'] = """
|
||||
type: command
|
||||
short-summary: Stop a streaming endpoint.
|
||||
"""
|
||||
|
||||
helps['ams streaming endpoint list'] = """
|
||||
type: command
|
||||
short-summary: List all the streaming endpoints within an Azure Media Services account.
|
||||
"""
|
|
@ -0,0 +1,163 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# --------------------------------------------------------------------------------------------
|
||||
|
||||
# pylint: disable=line-too-long
|
||||
|
||||
from knack.arguments import CLIArgumentType
|
||||
|
||||
from azure.cli.core.commands.validators import get_default_location_from_resource_group
|
||||
from azure.cli.core.commands.parameters import (get_location_type, get_enum_type, tags_type, get_three_state_flag)
|
||||
from azure.cli.command_modules.ams._completers import get_role_definition_name_completion_list, get_presets_definition_name_completion_list
|
||||
|
||||
from azure.mgmt.media.models import (Priority, AssetContainerPermission)
|
||||
|
||||
from ._validators import validate_storage_account_id, datetime_format
|
||||
|
||||
|
||||
def load_arguments(self, _): # pylint: disable=too-many-locals, too-many-statements
|
||||
name_arg_type = CLIArgumentType(options_list=['--name', '-n'], id_part='name', help='The name of the Azure Media Services account.', metavar='NAME')
|
||||
account_name_arg_type = CLIArgumentType(options_list=['--account-name', '-a'], id_part='name', help='The name of the Azure Media Services account.', metavar='ACCOUNT_NAME')
|
||||
storage_account_arg_type = CLIArgumentType(options_list=['--storage-account'], validator=validate_storage_account_id, metavar='STORAGE_NAME')
|
||||
password_arg_type = CLIArgumentType(options_list=['--password', '-p'], metavar='PASSWORD_NAME')
|
||||
transform_name_arg_type = CLIArgumentType(options_list=['--transform-name', '-t'], metavar='TRANSFORM_NAME')
|
||||
expiry_arg_type = CLIArgumentType(options_list=['--expiry'], type=datetime_format, metavar='EXPIRY_TIME')
|
||||
default_policy_name_arg_type = CLIArgumentType(options_list=['--content-policy-name'], help='The default content key policy name used by the streaming locator.', metavar='DEFAULT_CONTENT_KEY_POLICY_NAME')
|
||||
|
||||
with self.argument_context('ams') as c:
|
||||
c.argument('account_name', name_arg_type)
|
||||
|
||||
with self.argument_context('ams account') as c:
|
||||
c.argument('location', arg_type=get_location_type(self.cli_ctx),
|
||||
validator=get_default_location_from_resource_group)
|
||||
c.argument('tags', arg_type=tags_type)
|
||||
|
||||
with self.argument_context('ams account create') as c:
|
||||
c.argument('storage_account', storage_account_arg_type,
|
||||
help='The name or resource ID of the primary storage account to attach to the Azure Media Services account. Blob only accounts are not allowed as primary.')
|
||||
|
||||
with self.argument_context('ams account storage') as c:
|
||||
c.argument('account_name', account_name_arg_type)
|
||||
c.argument('storage_account', name_arg_type,
|
||||
help='The name or resource ID of the secondary storage account to detach from the Azure Media Services account.',
|
||||
validator=validate_storage_account_id)
|
||||
|
||||
with self.argument_context('ams account sp') as c:
|
||||
c.argument('account_name', account_name_arg_type)
|
||||
c.argument('sp_name', name_arg_type,
|
||||
help="The app name or app URI to associate the RBAC with. If not present, a default name like '{amsaccountname}-access-sp' will be generated.")
|
||||
c.argument('sp_password', password_arg_type,
|
||||
help="The password used to log in. Also known as 'Client Secret'. If not present, a random secret will be generated.")
|
||||
c.argument('role', help='The role of the service principal.', completer=get_role_definition_name_completion_list)
|
||||
c.argument('xml', action='store_true', help='Enables xml output format.')
|
||||
c.argument('years', help='Number of years for which the secret will be valid. Default: 1 year.', type=int, default=None)
|
||||
|
||||
with self.argument_context('ams transform') as c:
|
||||
c.argument('account_name', account_name_arg_type)
|
||||
c.argument('transform_name', name_arg_type, id_part='child_name_1',
|
||||
help='The name of the transform.')
|
||||
c.argument('preset_names',
|
||||
arg_type=get_enum_type(get_presets_definition_name_completion_list()),
|
||||
nargs='+',
|
||||
help='Space-separated list of built-in preset names.')
|
||||
c.argument('description', help='The description of the transform.')
|
||||
|
||||
with self.argument_context('ams transform list') as c:
|
||||
c.argument('account_name', id_part=None)
|
||||
|
||||
with self.argument_context('ams asset') as c:
|
||||
c.argument('account_name', account_name_arg_type)
|
||||
c.argument('asset_name', name_arg_type, id_part='child_name_1',
|
||||
help='The name of the asset.')
|
||||
|
||||
with self.argument_context('ams asset list') as c:
|
||||
c.argument('account_name', id_part=None)
|
||||
|
||||
with self.argument_context('ams asset create') as c:
|
||||
c.argument('alternate_id', help='The alternate id of the asset.')
|
||||
c.argument('description', help='The asset description.')
|
||||
c.argument('asset_name', name_arg_type, help='The name of the asset.')
|
||||
|
||||
with self.argument_context('ams asset update') as c:
|
||||
c.argument('alternate_id', help='The alternate id of the asset.')
|
||||
c.argument('description', help='The asset description.')
|
||||
|
||||
with self.argument_context('ams asset get-sas-urls') as c:
|
||||
c.argument('permissions', arg_type=get_enum_type(AssetContainerPermission),
|
||||
help='The permissions to set on the SAS URL.')
|
||||
c.argument('expiry_time', expiry_arg_type, help="Specifies the UTC datetime (Y-m-d'T'H:M:S'Z') at which the SAS becomes invalid.")
|
||||
|
||||
with self.argument_context('ams job') as c:
|
||||
c.argument('account_name', account_name_arg_type)
|
||||
c.argument('transform_name', transform_name_arg_type, id_part='child_name_1',
|
||||
help='The name of the transform.')
|
||||
c.argument('job_name', name_arg_type, id_part='child_name_2',
|
||||
help='The name of the job.')
|
||||
|
||||
with self.argument_context('ams job list') as c:
|
||||
c.argument('account_name', id_part=None)
|
||||
|
||||
with self.argument_context('ams job start') as c:
|
||||
c.argument('priority', arg_type=get_enum_type(Priority),
|
||||
help='The priority with which the job should be processed.')
|
||||
c.argument('description', help='The job description.')
|
||||
c.argument('input_asset_name',
|
||||
arg_group='Asset Job Input',
|
||||
help='The name of the input asset.')
|
||||
c.argument('output_asset_names',
|
||||
nargs='+', help='Space-separated list of output asset names.')
|
||||
c.argument('base_uri',
|
||||
arg_group='Http Job Input',
|
||||
help='Base uri for http job input. It will be concatenated with provided file names. If no base uri is given, then the provided file list is assumed to be fully qualified uris.')
|
||||
c.argument('files',
|
||||
nargs='+',
|
||||
help='Space-separated list of files. It can be used to tell the service to only use the files specified from the input asset.')
|
||||
|
||||
with self.argument_context('ams job cancel') as c:
|
||||
c.argument('delete', action='store_true', help='Delete the job being cancelled.')
|
||||
|
||||
with self.argument_context('ams streaming') as c:
|
||||
c.argument('account_name', account_name_arg_type)
|
||||
c.argument('default_content_key_policy_name', default_policy_name_arg_type)
|
||||
|
||||
with self.argument_context('ams streaming locator') as c:
|
||||
c.argument('streaming_locator_name', name_arg_type, id_part='child_name_1',
|
||||
help='The name of the streaming locator.')
|
||||
c.argument('asset_name',
|
||||
help='The name of the asset used by the streaming locator.')
|
||||
c.argument('streaming_policy_name',
|
||||
help='The name of the streaming policy used by the streaming locator.')
|
||||
c.argument('start_time', type=datetime_format,
|
||||
help="Start time (Y-m-d'T'H:M:S'Z') of the streaming locator.")
|
||||
c.argument('end_time', type=datetime_format,
|
||||
help="End time (Y-m-d'T'H:M:S'Z') of the streaming locator.")
|
||||
|
||||
with self.argument_context('ams streaming locator list') as c:
|
||||
c.argument('account_name', id_part=None)
|
||||
|
||||
with self.argument_context('ams streaming policy') as c:
|
||||
c.argument('streaming_policy_name', name_arg_type, id_part='child_name_1',
|
||||
help='The name of the streaming policy.')
|
||||
c.argument('download',
|
||||
arg_type=get_three_state_flag(),
|
||||
arg_group='Encryption Protocols',
|
||||
help='Enable Download protocol.')
|
||||
c.argument('dash',
|
||||
arg_type=get_three_state_flag(),
|
||||
arg_group='Encryption Protocols',
|
||||
help='Enable Dash protocol.')
|
||||
c.argument('hls',
|
||||
arg_type=get_three_state_flag(),
|
||||
arg_group='Encryption Protocols',
|
||||
help='Enable HLS protocol.')
|
||||
c.argument('smooth_streaming',
|
||||
arg_type=get_three_state_flag(),
|
||||
arg_group='Encryption Protocols',
|
||||
help='Enable SmoothStreaming protocol.')
|
||||
|
||||
with self.argument_context('ams streaming policy list') as c:
|
||||
c.argument('account_name', id_part=None)
|
||||
|
||||
with self.argument_context('ams streaming endpoint list') as c:
|
||||
c.argument('account_name', id_part=None)
|
|
@ -0,0 +1,19 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# --------------------------------------------------------------------------------------------
|
||||
|
||||
import uuid
|
||||
|
||||
|
||||
def _gen_guid():
|
||||
return uuid.uuid4()
|
||||
|
||||
|
||||
def _is_guid(guid):
|
||||
try:
|
||||
uuid.UUID(guid)
|
||||
return True
|
||||
except ValueError:
|
||||
pass
|
||||
return False
|
|
@ -0,0 +1,32 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# --------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
def validate_storage_account_id(cmd, namespace):
|
||||
"""Validate storage account name"""
|
||||
from azure.cli.core.commands.client_factory import get_subscription_id
|
||||
from msrestazure.tools import is_valid_resource_id, resource_id
|
||||
|
||||
if namespace.storage_account:
|
||||
if not is_valid_resource_id(namespace.storage_account):
|
||||
namespace.storage_account = resource_id(
|
||||
subscription=get_subscription_id(cmd.cli_ctx),
|
||||
resource_group=namespace.resource_group_name,
|
||||
namespace='Microsoft.Storage', type='storageAccounts',
|
||||
name=namespace.storage_account
|
||||
)
|
||||
|
||||
|
||||
def datetime_format(value):
|
||||
"""Validate the correct format of a datetime string and deserialize."""
|
||||
from msrest.serialization import Deserializer
|
||||
from msrest.exceptions import DeserializationError
|
||||
|
||||
try:
|
||||
datetime_obj = Deserializer.deserialize_iso(value)
|
||||
except DeserializationError:
|
||||
message = "Argument {} is not a valid ISO-8601 datetime format"
|
||||
raise ValueError(message.format(value))
|
||||
return datetime_obj
|
|
@ -0,0 +1,114 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# --------------------------------------------------------------------------------------------
|
||||
|
||||
from azure.cli.core.commands import CliCommandType
|
||||
from ._client_factory import (get_mediaservices_client, get_transforms_client,
|
||||
get_assets_client, get_jobs_client, get_streaming_locators_client,
|
||||
get_streaming_policies_client, get_streaming_endpoints_client)
|
||||
from ._exception_handler import ams_exception_handler
|
||||
|
||||
|
||||
# pylint: disable=line-too-long
|
||||
|
||||
def load_command_table(self, _): # pylint: disable=too-many-locals, too-many-statements
|
||||
def get_sdk(operation, client_factory):
|
||||
return CliCommandType(
|
||||
operations_tmpl='azure.mgmt.media.operations#{}Operations.'.format(operation) + '{}',
|
||||
client_factory=client_factory,
|
||||
exception_handler=ams_exception_handler
|
||||
)
|
||||
|
||||
def get_custom_sdk(custom_module, client_factory):
|
||||
return CliCommandType(
|
||||
operations_tmpl='azure.cli.command_modules.ams.operations.{}#'.format(custom_module) + '{}',
|
||||
client_factory=client_factory,
|
||||
exception_handler=ams_exception_handler
|
||||
)
|
||||
|
||||
with self.command_group('ams account', get_sdk('Mediaservices', get_mediaservices_client)) as g:
|
||||
g.command('show', 'get')
|
||||
g.command('delete', 'delete')
|
||||
g.generic_update_command('update',
|
||||
getter_name='mediaservice_update_getter',
|
||||
getter_type=get_custom_sdk('account', get_mediaservices_client),
|
||||
custom_func_name='update_mediaservice',
|
||||
custom_func_type=get_custom_sdk('account', get_mediaservices_client))
|
||||
g.custom_command('list', 'list_mediaservices',
|
||||
custom_command_type=get_custom_sdk('account', get_mediaservices_client))
|
||||
g.custom_command('create', 'create_mediaservice',
|
||||
custom_command_type=get_custom_sdk('account', get_mediaservices_client))
|
||||
|
||||
with self.command_group('ams account storage', get_sdk('Mediaservices', get_mediaservices_client)) as g:
|
||||
g.custom_command('add', 'add_mediaservice_secondary_storage',
|
||||
custom_command_type=get_custom_sdk('account', get_mediaservices_client))
|
||||
g.custom_command('remove', 'remove_mediaservice_secondary_storage',
|
||||
custom_command_type=get_custom_sdk('account', get_mediaservices_client))
|
||||
|
||||
with self.command_group('ams account sp', get_sdk('Mediaservices', get_mediaservices_client)) as g:
|
||||
g.custom_command('create', 'create_assign_sp_to_mediaservice',
|
||||
custom_command_type=get_custom_sdk('sp', get_mediaservices_client))
|
||||
g.custom_command('reset-credentials', 'reset_sp_credentials_for_mediaservice',
|
||||
custom_command_type=get_custom_sdk('sp', get_mediaservices_client))
|
||||
|
||||
with self.command_group('ams transform', get_sdk('Transforms', get_transforms_client)) as g:
|
||||
g.command('show', 'get')
|
||||
g.command('list', 'list')
|
||||
g.command('delete', 'delete')
|
||||
g.custom_command('create', 'create_transform',
|
||||
custom_command_type=get_custom_sdk('transform', get_transforms_client))
|
||||
g.custom_command('update', 'update_transform',
|
||||
custom_command_type=get_custom_sdk('transform', get_transforms_client))
|
||||
g.generic_update_command('update',
|
||||
setter_name='transform_update_setter',
|
||||
setter_type=get_custom_sdk('transform', get_mediaservices_client),
|
||||
custom_func_name='update_transform',
|
||||
custom_func_type=get_custom_sdk('transform', get_mediaservices_client))
|
||||
|
||||
with self.command_group('ams transform output', get_sdk('Transforms', get_mediaservices_client)) as g:
|
||||
g.custom_command('add', 'add_transform_output',
|
||||
custom_command_type=get_custom_sdk('transform', get_transforms_client))
|
||||
g.custom_command('remove', 'remove_transform_output',
|
||||
custom_command_type=get_custom_sdk('transform', get_transforms_client))
|
||||
|
||||
with self.command_group('ams asset', get_sdk('Assets', get_assets_client)) as g:
|
||||
g.command('show', 'get')
|
||||
g.command('list', 'list')
|
||||
g.command('delete', 'delete')
|
||||
g.generic_update_command('update',
|
||||
custom_func_name='update_asset',
|
||||
custom_func_type=get_custom_sdk('asset', get_mediaservices_client))
|
||||
g.custom_command('get-sas-urls', 'get_sas_urls',
|
||||
custom_command_type=get_custom_sdk('asset', get_assets_client))
|
||||
g.custom_command('create', 'create_asset',
|
||||
custom_command_type=get_custom_sdk('asset', get_assets_client))
|
||||
|
||||
with self.command_group('ams job', get_sdk('Jobs', get_jobs_client)) as g:
|
||||
g.command('show', 'get')
|
||||
g.command('list', 'list')
|
||||
g.command('delete', 'delete')
|
||||
g.custom_command('cancel', 'cancel_job',
|
||||
custom_command_type=get_custom_sdk('job', get_jobs_client))
|
||||
g.custom_command('start', 'create_job',
|
||||
custom_command_type=get_custom_sdk('job', get_jobs_client))
|
||||
|
||||
with self.command_group('ams streaming locator', get_sdk('StreamingLocators', get_streaming_locators_client)) as g:
|
||||
g.custom_command('create', 'create_streaming_locator',
|
||||
custom_command_type=get_custom_sdk('streaming', get_streaming_locators_client))
|
||||
g.command('list', 'list')
|
||||
g.command('show', 'get')
|
||||
g.command('delete', 'delete')
|
||||
g.command('get-paths', 'list_paths')
|
||||
|
||||
with self.command_group('ams streaming policy', get_sdk('StreamingPolicies', get_streaming_policies_client)) as g:
|
||||
g.custom_command('create', 'create_streaming_policy',
|
||||
custom_command_type=get_custom_sdk('streaming', get_streaming_policies_client))
|
||||
g.command('list', 'list')
|
||||
g.command('show', 'get')
|
||||
g.command('delete', 'delete')
|
||||
|
||||
with self.command_group('ams streaming endpoint', get_sdk('StreamingEndpoints', get_streaming_endpoints_client)) as g:
|
||||
g.command('list', 'list')
|
||||
g.command('start', 'start')
|
||||
g.command('stop', 'stop')
|
|
@ -0,0 +1,4 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# --------------------------------------------------------------------------------------------
|
|
@ -0,0 +1,76 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# --------------------------------------------------------------------------------------------
|
||||
|
||||
from knack.util import CLIError
|
||||
|
||||
|
||||
def list_mediaservices(client, resource_group_name=None):
|
||||
return client.list(resource_group_name) if resource_group_name else client.list_by_subscription()
|
||||
|
||||
|
||||
def create_mediaservice(client, resource_group_name, account_name, storage_account, location=None, tags=None):
|
||||
from azure.mgmt.media.models import StorageAccount
|
||||
storage_account_primary = StorageAccount(type='Primary', id=storage_account)
|
||||
|
||||
return create_or_update_mediaservice(client, resource_group_name, account_name, [storage_account_primary],
|
||||
location,
|
||||
tags)
|
||||
|
||||
|
||||
def add_mediaservice_secondary_storage(client, resource_group_name, account_name, storage_account):
|
||||
ams = client.get(resource_group_name, account_name)
|
||||
|
||||
storage_accounts_filtered = list(filter(lambda s: storage_account in s.id, ams.storage_accounts))
|
||||
|
||||
from azure.mgmt.media.models import StorageAccount
|
||||
storage_account_secondary = StorageAccount(type='Secondary', id=storage_account)
|
||||
|
||||
if not storage_accounts_filtered:
|
||||
ams.storage_accounts.append(storage_account_secondary)
|
||||
|
||||
return create_or_update_mediaservice(client, resource_group_name, account_name,
|
||||
ams.storage_accounts,
|
||||
ams.location,
|
||||
ams.tags)
|
||||
|
||||
|
||||
def remove_mediaservice_secondary_storage(client, resource_group_name, account_name, storage_account):
|
||||
ams = client.get(resource_group_name, account_name)
|
||||
|
||||
storage_accounts_filtered = list(filter(lambda s: storage_account not in s.id and 'Secondary' in s.type.value,
|
||||
ams.storage_accounts))
|
||||
|
||||
primary_storage_account = list(filter(lambda s: 'Primary' in s.type.value, ams.storage_accounts))[0]
|
||||
storage_accounts_filtered.append(primary_storage_account)
|
||||
|
||||
return create_or_update_mediaservice(client, resource_group_name, account_name, storage_accounts_filtered,
|
||||
ams.location,
|
||||
ams.tags)
|
||||
|
||||
|
||||
def create_or_update_mediaservice(client, resource_group_name, account_name, storage_accounts=None,
|
||||
location=None,
|
||||
tags=None):
|
||||
|
||||
from azure.mgmt.media.models import MediaService
|
||||
media_service = MediaService(location=location, storage_accounts=storage_accounts, tags=tags)
|
||||
|
||||
return client.create_or_update(resource_group_name, account_name, media_service)
|
||||
|
||||
|
||||
def mediaservice_update_getter(client, resource_group_name, account_name):
|
||||
from azure.mgmt.media.models import ApiErrorException
|
||||
|
||||
try:
|
||||
return client.get(resource_group_name, account_name)
|
||||
except ApiErrorException as ex:
|
||||
raise CLIError(ex.message)
|
||||
|
||||
|
||||
def update_mediaservice(instance, tags=None):
|
||||
if tags:
|
||||
instance.tags = tags
|
||||
|
||||
return instance
|
|
@ -0,0 +1,32 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# --------------------------------------------------------------------------------------------
|
||||
|
||||
from knack.util import CLIError
|
||||
|
||||
|
||||
def create_asset(client, account_name, resource_group_name, asset_name, alternate_id=None, description=None):
|
||||
from azure.mgmt.media.models import Asset
|
||||
|
||||
asset = Asset(alternate_id=alternate_id, description=description)
|
||||
|
||||
return client.create_or_update(resource_group_name, account_name, asset_name, asset)
|
||||
|
||||
|
||||
def get_sas_urls(client, resource_group_name, account_name, asset_name, permissions=None, expiry_time=None):
|
||||
return client.list_container_sas(resource_group_name, account_name,
|
||||
asset_name, permissions, expiry_time).asset_container_sas_urls
|
||||
|
||||
|
||||
def update_asset(instance, alternate_id=None, description=None):
|
||||
if not instance:
|
||||
raise CLIError('The asset resource was not found.')
|
||||
|
||||
if alternate_id:
|
||||
instance.alternate_id = alternate_id
|
||||
|
||||
if description:
|
||||
instance.description = description
|
||||
|
||||
return instance
|
|
@ -0,0 +1,39 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# --------------------------------------------------------------------------------------------
|
||||
|
||||
from knack.util import CLIError
|
||||
|
||||
|
||||
def create_job(client, resource_group_name, account_name, transform_name, job_name,
|
||||
output_asset_names, input_asset_name=None,
|
||||
description=None, priority=None, files=None, base_uri=None):
|
||||
from azure.mgmt.media.models import (Job, JobInputAsset, JobInputHttp, JobOutputAsset)
|
||||
|
||||
if input_asset_name:
|
||||
job_input = JobInputAsset(asset_name=input_asset_name, files=files)
|
||||
else:
|
||||
if base_uri is None and files is None:
|
||||
raise CLIError("Missing required arguments.\nEither --input-asset-name, "
|
||||
"or both --files or --base-uri must be specified.")
|
||||
else:
|
||||
job_input = JobInputHttp(files=files, base_uri=base_uri)
|
||||
|
||||
job_outputs = list(map(lambda x: JobOutputAsset(asset_name=x), output_asset_names))
|
||||
|
||||
job = Job(input=job_input, outputs=job_outputs, description=description, priority=priority)
|
||||
|
||||
return client.create(resource_group_name, account_name, transform_name, job_name, job)
|
||||
|
||||
|
||||
def cancel_job(client, resource_group_name, account_name,
|
||||
transform_name, job_name, delete=False):
|
||||
cancel_result = client.cancel_job(resource_group_name, account_name,
|
||||
transform_name, job_name)
|
||||
|
||||
if delete:
|
||||
return client.delete(resource_group_name, account_name,
|
||||
transform_name, job_name)
|
||||
|
||||
return cancel_result
|
|
@ -0,0 +1,328 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# --------------------------------------------------------------------------------------------
|
||||
|
||||
import importlib
|
||||
import datetime
|
||||
import time
|
||||
|
||||
import re
|
||||
from dateutil.relativedelta import relativedelta
|
||||
import pytz
|
||||
|
||||
from knack.util import CLIError, todict
|
||||
from knack.log import get_logger
|
||||
|
||||
from msrestazure.azure_exceptions import CloudError
|
||||
from azure.graphrbac.models.graph_error import GraphErrorException
|
||||
from azure.graphrbac.models import (ApplicationCreateParameters,
|
||||
ServicePrincipalCreateParameters)
|
||||
|
||||
from azure.cli.command_modules.ams._client_factory import (_graph_client_factory, _auth_client_factory)
|
||||
from azure.cli.command_modules.ams._utils import (_gen_guid, _is_guid)
|
||||
|
||||
logger = get_logger(__name__)
|
||||
|
||||
|
||||
def reset_sp_credentials_for_mediaservice(cmd, client, account_name, resource_group_name, sp_name=None,
|
||||
role='Contributor', sp_password=None, xml=False, years=None):
|
||||
ams = client.get(resource_group_name, account_name)
|
||||
|
||||
graph_client = _graph_client_factory(cmd.cli_ctx)
|
||||
|
||||
sp_name = _create_sp_name(account_name, sp_name)
|
||||
sp_password = _create_sp_password(sp_password)
|
||||
|
||||
app_display_name = sp_name.replace('http://', '')
|
||||
|
||||
aad_sp = _get_service_principal(graph_client, sp_name)
|
||||
if not aad_sp:
|
||||
raise CLIError("Can't find a service principal matching '{}'".format(app_display_name))
|
||||
|
||||
tenant = graph_client.config.tenant_id
|
||||
sp_oid = aad_sp.object_id
|
||||
app_id = aad_sp.app_id
|
||||
|
||||
app_object_id = _get_application_object_id(graph_client.applications, app_id)
|
||||
|
||||
_update_password_credentials(graph_client, app_object_id, sp_password, years)
|
||||
|
||||
_assign_role(cmd, role, sp_oid, ams.id)
|
||||
|
||||
return _build_sp_result(client.config.subscription_id, ams.location, resource_group_name, account_name,
|
||||
tenant, app_id, sp_password, cmd.cli_ctx.cloud.endpoints.management,
|
||||
cmd.cli_ctx.cloud.endpoints.active_directory,
|
||||
cmd.cli_ctx.cloud.endpoints.resource_manager, xml)
|
||||
|
||||
|
||||
def create_assign_sp_to_mediaservice(cmd, client, account_name, resource_group_name, sp_name=None,
|
||||
role='Contributor', sp_password=None, xml=False, years=None):
|
||||
ams = client.get(resource_group_name, account_name)
|
||||
|
||||
graph_client = _graph_client_factory(cmd.cli_ctx)
|
||||
|
||||
sp_name = _create_sp_name(account_name, sp_name)
|
||||
sp_password = _create_sp_password(sp_password)
|
||||
|
||||
app_display_name = sp_name.replace('http://', '')
|
||||
|
||||
aad_sp = _get_service_principal(graph_client, sp_name)
|
||||
if aad_sp:
|
||||
raise CLIError("Service principal '{}' already exists.".format(app_display_name))
|
||||
|
||||
aad_application = create_application(graph_client.applications,
|
||||
display_name=app_display_name,
|
||||
homepage=sp_name,
|
||||
years=years,
|
||||
password=sp_password,
|
||||
identifier_uris=[sp_name],
|
||||
available_to_other_tenants=False)
|
||||
|
||||
app_id = aad_application.app_id
|
||||
tenant = graph_client.config.tenant_id
|
||||
sp_oid = _create_service_principal(graph_client, name=sp_name,
|
||||
app_id=app_id)
|
||||
|
||||
_assign_role(cmd, role, sp_oid, ams.id)
|
||||
|
||||
return _build_sp_result(client.config.subscription_id, ams.location, resource_group_name, account_name,
|
||||
tenant, app_id, sp_password, cmd.cli_ctx.cloud.endpoints.management,
|
||||
cmd.cli_ctx.cloud.endpoints.active_directory,
|
||||
cmd.cli_ctx.cloud.endpoints.resource_manager, xml)
|
||||
|
||||
|
||||
def _update_password_credentials(client, app_object_id, sp_password, years):
|
||||
app_creds = list(client.applications.list_password_credentials(app_object_id))
|
||||
app_creds.append(_build_password_credential(sp_password, years))
|
||||
client.applications.update_password_credentials(app_object_id, app_creds)
|
||||
|
||||
|
||||
def _get_displayable_name(graph_object):
|
||||
if graph_object.user_principal_name:
|
||||
return graph_object.user_principal_name
|
||||
elif graph_object.service_principal_names:
|
||||
return graph_object.service_principal_names[0]
|
||||
return graph_object.display_name or ''
|
||||
|
||||
|
||||
def list_role_assignments(cmd, assignee_object_id):
|
||||
'''
|
||||
:param include_groups: include extra assignments to the groups of which the user is a
|
||||
member(transitively). Supported only for a user principal.
|
||||
'''
|
||||
graph_client = _graph_client_factory(cmd.cli_ctx)
|
||||
factory = _auth_client_factory(cmd.cli_ctx)
|
||||
assignments_client = factory.role_assignments
|
||||
definitions_client = factory.role_definitions
|
||||
|
||||
assignments = _search_role_assignments(assignments_client, assignee_object_id)
|
||||
|
||||
results = todict(assignments) if assignments else []
|
||||
|
||||
if not results:
|
||||
return []
|
||||
|
||||
# 1. fill in logic names to get things understandable.
|
||||
# (it's possible that associated roles and principals were deleted, and we just do nothing.)
|
||||
# 2. fill in role names
|
||||
role_defs = list(definitions_client.list(
|
||||
scope=('/subscriptions/' + definitions_client.config.subscription_id)))
|
||||
role_dics = {i.id: i.role_name for i in role_defs}
|
||||
for i in results:
|
||||
if role_dics.get(i['roleDefinitionId']):
|
||||
i['roleDefinitionName'] = role_dics[i['roleDefinitionId']]
|
||||
|
||||
# fill in principal names
|
||||
principal_ids = set(i['principalId'] for i in results if i['principalId'])
|
||||
if principal_ids:
|
||||
try:
|
||||
principals = _get_object_stubs(graph_client, principal_ids)
|
||||
principal_dics = {i.object_id: _get_displayable_name(i) for i in principals}
|
||||
|
||||
for i in [r for r in results if not r.get('principalName')]:
|
||||
i['principalName'] = ''
|
||||
if principal_dics.get(i['principalId']):
|
||||
i['principalName'] = principal_dics[i['principalId']]
|
||||
except (CloudError, GraphErrorException) as ex:
|
||||
# failure on resolving principal due to graph permission should not fail the whole thing
|
||||
logger.info("Failed to resolve graph object information per error '%s'", ex)
|
||||
|
||||
return results
|
||||
|
||||
|
||||
def _create_role_assignment(cli_ctx, role, assignee_object_id, scope):
|
||||
factory = _auth_client_factory(cli_ctx, scope)
|
||||
assignments_client = factory.role_assignments
|
||||
definitions_client = factory.role_definitions
|
||||
|
||||
scope = '/subscriptions/' + assignments_client.config.subscription_id
|
||||
|
||||
role_id = _resolve_role_id(role, scope, definitions_client)
|
||||
|
||||
from azure.mgmt.authorization.models import RoleAssignmentCreateParameters
|
||||
parameters = RoleAssignmentCreateParameters(role_definition_id=role_id, principal_id=assignee_object_id)
|
||||
|
||||
return assignments_client.create(scope=scope,
|
||||
role_assignment_name=_gen_guid(),
|
||||
parameters=parameters)
|
||||
|
||||
|
||||
def _resolve_role_id(role, scope, definitions_client):
|
||||
role_id = None
|
||||
if re.match(r'/subscriptions/.+/providers/Microsoft.Authorization/roleDefinitions/',
|
||||
role, re.I):
|
||||
role_id = role
|
||||
else:
|
||||
if _is_guid(role):
|
||||
role_id = '/subscriptions/{}/providers/Microsoft.Authorization/roleDefinitions/{}'.format(
|
||||
definitions_client.config.subscription_id, role)
|
||||
if not role_id: # retrieve role id
|
||||
role_defs = list(definitions_client.list(scope, "roleName eq '{}'".format(role)))
|
||||
if not role_defs:
|
||||
raise CLIError("Role '{}' doesn't exist.".format(role))
|
||||
elif len(role_defs) > 1:
|
||||
ids = [r.id for r in role_defs]
|
||||
err = "More than one role matches the given name '{}'. Please pick a value from '{}'"
|
||||
raise CLIError(err.format(role, ids))
|
||||
role_id = role_defs[0].id
|
||||
return role_id
|
||||
|
||||
|
||||
def _get_object_stubs(graph_client, assignees):
|
||||
from azure.graphrbac.models import GetObjectsParameters
|
||||
params = GetObjectsParameters(include_directory_object_references=True, object_ids=assignees)
|
||||
return list(graph_client.objects.get_objects_by_object_ids(params))
|
||||
|
||||
|
||||
def _get_application_object_id(client, identifier):
|
||||
return list(client.list(filter="appId eq '{}'".format(identifier)))[0].object_id
|
||||
|
||||
|
||||
def _build_password_credential(password, years):
|
||||
years = years or 1
|
||||
|
||||
start_date = datetime.datetime.now(pytz.utc)
|
||||
end_date = start_date + relativedelta(years=years)
|
||||
|
||||
from azure.graphrbac.models import PasswordCredential
|
||||
return PasswordCredential(start_date=start_date, end_date=end_date, key_id=str(_gen_guid()), value=password)
|
||||
|
||||
|
||||
def _create_service_principal(
|
||||
graph_client, name, app_id):
|
||||
_RETRY_TIMES = 36
|
||||
# retry till server replication is done
|
||||
for l in range(0, _RETRY_TIMES):
|
||||
try:
|
||||
aad_sp = graph_client.service_principals.create(ServicePrincipalCreateParameters(app_id, True))
|
||||
break
|
||||
except Exception as ex: # pylint: disable=broad-except
|
||||
if l < _RETRY_TIMES and (
|
||||
' does not reference ' in str(ex) or ' does not exist ' in str(ex)):
|
||||
time.sleep(5)
|
||||
logger.warning('Retrying service principal creation: %s/%s', l + 1, _RETRY_TIMES)
|
||||
else:
|
||||
logger.warning(
|
||||
"Creating service principal failed for appid '%s'. Trace followed:\n%s",
|
||||
name, ex.response.headers if hasattr(ex, 'response') else ex) # pylint: disable=no-member
|
||||
raise
|
||||
|
||||
return aad_sp.object_id
|
||||
|
||||
|
||||
def create_application(client, display_name, homepage, years, password, identifier_uris,
|
||||
available_to_other_tenants=False, reply_urls=None):
|
||||
password_credential = _build_password_credential(password, years)
|
||||
|
||||
app_create_param = ApplicationCreateParameters(available_to_other_tenants,
|
||||
display_name,
|
||||
identifier_uris,
|
||||
homepage=homepage,
|
||||
reply_urls=reply_urls,
|
||||
password_credentials=[password_credential])
|
||||
|
||||
try:
|
||||
return client.create(app_create_param)
|
||||
except GraphErrorException as ex:
|
||||
if 'insufficient privileges' in str(ex).lower():
|
||||
link = 'https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-create-service-principal-portal' # pylint: disable=line-too-long
|
||||
raise CLIError("Directory permission is needed for the current user to register the application. "
|
||||
"For how to configure, please refer '{}'. Original error: {}".format(link, ex))
|
||||
raise
|
||||
|
||||
|
||||
def _search_role_assignments(assignments_client, assignee_object_id):
|
||||
f = "principalId eq '{}'".format(assignee_object_id)
|
||||
assignments = list(assignments_client.list(filter=f))
|
||||
return assignments
|
||||
|
||||
|
||||
def _assign_role(cmd, role, sp_oid, scope):
|
||||
assignments = list_role_assignments(cmd, sp_oid)
|
||||
if assignments and list(filter(lambda x: x['roleDefinitionName'] == role, assignments)):
|
||||
return
|
||||
|
||||
_RETRY_TIMES = 36
|
||||
for l in range(0, _RETRY_TIMES):
|
||||
try:
|
||||
_create_role_assignment(cmd.cli_ctx, role, sp_oid, scope)
|
||||
break
|
||||
except Exception as ex: # pylint: disable=broad-except
|
||||
if l < _RETRY_TIMES and ' does not exist in the directory ' in str(ex):
|
||||
time.sleep(5)
|
||||
logger.warning('Retrying role assignment creation: %s/%s', l + 1,
|
||||
_RETRY_TIMES)
|
||||
continue
|
||||
else:
|
||||
# dump out history for diagnoses
|
||||
logger.warning('Role assignment creation failed.\n')
|
||||
if getattr(ex, 'response', None) is not None:
|
||||
logger.warning('role assignment response headers: %s\n',
|
||||
ex.response.headers) # pylint: disable=no-member
|
||||
raise
|
||||
|
||||
|
||||
def _build_sp_result(subscription_id, location, resource_group_name, account_name,
|
||||
tenant, app_id, sp_password, management_endpoint,
|
||||
active_directory_endpoint, resource_manager_endoint, xml):
|
||||
result = {
|
||||
'SubscriptionId': subscription_id,
|
||||
'Region': location,
|
||||
'ResourceGroup': resource_group_name,
|
||||
'AccountName': account_name,
|
||||
'AadTenantId': tenant,
|
||||
'AadClientId': app_id,
|
||||
'AadSecret': sp_password,
|
||||
'ArmAadAudience': management_endpoint,
|
||||
'AadEndpoint': active_directory_endpoint,
|
||||
'ArmEndpoint': resource_manager_endoint
|
||||
}
|
||||
|
||||
format_xml_fn = getattr(importlib.import_module('azure.cli.command_modules.ams._format'),
|
||||
'get_sp_create_output_{}'.format('xml'))
|
||||
|
||||
return format_xml_fn(result) if xml else result
|
||||
|
||||
|
||||
def _get_service_principal(graph_client, sp_name):
|
||||
query_exp = 'servicePrincipalNames/any(x:x eq \'{}\')'.format(sp_name)
|
||||
aad_sps = list(graph_client.service_principals.list(filter=query_exp))
|
||||
return aad_sps[0] if aad_sps else None
|
||||
|
||||
|
||||
def _create_sp_password(sp_password):
|
||||
return str(_gen_guid()) if sp_password is None else sp_password
|
||||
|
||||
|
||||
def _create_sp_name(account_name, sp_name):
|
||||
sp_name = '{}-access-sp'.format(account_name) if sp_name is None else sp_name
|
||||
if '://' not in sp_name:
|
||||
sp_name = "http://" + sp_name
|
||||
return sp_name
|
||||
|
||||
|
||||
def list_role_definitions(cmd):
|
||||
definitions_client = _auth_client_factory(cmd.cli_ctx, None).role_definitions
|
||||
scope = '/subscriptions/' + definitions_client.config.subscription_id
|
||||
return list(definitions_client.list(scope))
|
|
@ -0,0 +1,34 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# --------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
def create_streaming_locator(client, resource_group_name, account_name,
|
||||
streaming_locator_name, streaming_policy_name,
|
||||
asset_name, start_time=None, default_content_key_policy_name=None,
|
||||
end_time=None):
|
||||
from azure.mgmt.media.models import StreamingLocator
|
||||
|
||||
streaming_locator = StreamingLocator(asset_name=asset_name,
|
||||
start_time=start_time, end_time=end_time,
|
||||
streaming_policy_name=streaming_policy_name,
|
||||
default_content_key_policy_name=default_content_key_policy_name)
|
||||
|
||||
return client.create(resource_group_name, account_name, streaming_locator_name, streaming_locator)
|
||||
|
||||
|
||||
def create_streaming_policy(cmd, resource_group_name, account_name,
|
||||
streaming_policy_name,
|
||||
download=False, dash=False, hls=False, smooth_streaming=False,
|
||||
default_content_key_policy_name=None):
|
||||
from azure.cli.command_modules.ams._client_factory import get_streaming_policies_client
|
||||
from azure.mgmt.media.models import (StreamingPolicy, NoEncryption, EnabledProtocols)
|
||||
|
||||
enabled_protocols = EnabledProtocols(download=download, dash=dash, hls=hls, smooth_streaming=smooth_streaming)
|
||||
|
||||
streaming_policy = StreamingPolicy(default_content_key_policy_name=default_content_key_policy_name,
|
||||
no_encryption=NoEncryption(enabled_protocols=enabled_protocols))
|
||||
|
||||
return get_streaming_policies_client(cmd.cli_ctx).create(resource_group_name, account_name,
|
||||
streaming_policy_name, streaming_policy)
|
|
@ -0,0 +1,84 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# --------------------------------------------------------------------------------------------
|
||||
|
||||
from knack.util import CLIError
|
||||
|
||||
# pylint: disable=line-too-long
|
||||
|
||||
|
||||
def create_transform(client, account_name, resource_group_name,
|
||||
transform_name, preset_names, description=None):
|
||||
outputs = []
|
||||
|
||||
for preset in preset_names:
|
||||
outputs.append(get_transform_output(preset))
|
||||
|
||||
return client.create_or_update(resource_group_name, account_name, transform_name, outputs, description)
|
||||
|
||||
|
||||
def add_transform_output(client, account_name, resource_group_name, transform_name, preset_names):
|
||||
transform = client.get(resource_group_name, account_name, transform_name)
|
||||
|
||||
set_preset_names = set(preset_names)
|
||||
set_existent_preset_names = set(map(lambda x: x.preset.preset_name.value, transform.outputs))
|
||||
|
||||
set_preset_names = set_preset_names.difference(set_existent_preset_names)
|
||||
|
||||
for preset in set_preset_names:
|
||||
transform.outputs.append(get_transform_output(preset))
|
||||
|
||||
return client.create_or_update(resource_group_name, account_name, transform_name, transform.outputs)
|
||||
|
||||
|
||||
def remove_transform_output(client, account_name, resource_group_name, transform_name, preset_names):
|
||||
transform = client.get(resource_group_name, account_name, transform_name)
|
||||
|
||||
set_preset_names = set(preset_names)
|
||||
set_existent_preset_names = set(map(lambda x: x.preset.preset_name.value, transform.outputs))
|
||||
|
||||
set_existent_preset_names = set_existent_preset_names.difference(set_preset_names)
|
||||
|
||||
transform_output_list = list(filter(lambda x: x.preset.preset_name.value in set_existent_preset_names,
|
||||
transform.outputs))
|
||||
|
||||
return client.create_or_update(resource_group_name, account_name, transform_name, transform_output_list)
|
||||
|
||||
|
||||
def transform_update_setter(client, resource_group_name,
|
||||
account_name, transform_name, parameters):
|
||||
parameters.outputs = list(map(lambda x: get_transform_output(x) if isinstance(x, str) else x, parameters.outputs))
|
||||
return client.create_or_update(resource_group_name, account_name, transform_name,
|
||||
parameters.outputs, parameters.description)
|
||||
|
||||
|
||||
def update_transform(instance, description=None, preset_names=None):
|
||||
if not instance:
|
||||
raise CLIError('The transform resource was not found.')
|
||||
|
||||
if description:
|
||||
instance.description = description
|
||||
|
||||
if preset_names:
|
||||
instance.outputs = []
|
||||
for preset in preset_names:
|
||||
instance.outputs.append(get_transform_output(preset))
|
||||
|
||||
return instance
|
||||
|
||||
|
||||
def get_transform_output(preset):
|
||||
from azure.mgmt.media.models import (TransformOutput, BuiltInStandardEncoderPreset, VideoAnalyzerPreset, AudioAnalyzerPreset)
|
||||
from azure.cli.command_modules.ams._completers import (get_stand_alone_presets, is_audio_analyzer)
|
||||
|
||||
if preset in get_stand_alone_presets():
|
||||
if is_audio_analyzer(preset_name=preset):
|
||||
transform_preset = AudioAnalyzerPreset()
|
||||
else:
|
||||
transform_preset = VideoAnalyzerPreset()
|
||||
else:
|
||||
transform_preset = BuiltInStandardEncoderPreset(preset_name=preset)
|
||||
|
||||
transform_output = TransformOutput(preset=transform_preset)
|
||||
return transform_output
|
|
@ -0,0 +1,4 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# --------------------------------------------------------------------------------------------
|
|
@ -0,0 +1,396 @@
|
|||
interactions:
|
||||
- request:
|
||||
body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation",
|
||||
"date": "2018-04-18T18:14:10Z"}}'
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [group create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['110']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 resourcemanagementclient/1.2.1 Azure-SDK-For-Python
|
||||
AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2017-05-10
|
||||
response:
|
||||
body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-04-18T18:14:10Z"},"properties":{"provisioningState":"Succeeded"}}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['384']
|
||||
content-type: [application/json; charset=utf-8]
|
||||
date: ['Wed, 18 Apr 2018 18:14:14 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1187']
|
||||
status: {code: 201, message: Created}
|
||||
- request:
|
||||
body: '{"sku": {"name": "Standard_LRS"}, "kind": "Storage", "location": "westus",
|
||||
"properties": {"supportsHttpsTrafficOnly": false}}'
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [storage account create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['125']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-storage/1.5.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002?api-version=2017-10-01
|
||||
response:
|
||||
body: {string: ''}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['0']
|
||||
content-type: [text/plain; charset=utf-8]
|
||||
date: ['Wed, 18 Apr 2018 18:14:18 GMT']
|
||||
expires: ['-1']
|
||||
location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/3831f9a9-34b7-43ce-b312-223abd0b498d?monitor=true&api-version=2017-10-01']
|
||||
pragma: [no-cache]
|
||||
server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
|
||||
Microsoft-HTTPAPI/2.0']
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1194']
|
||||
status: {code: 202, message: Accepted}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [storage account create]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-storage/1.5.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/3831f9a9-34b7-43ce-b312-223abd0b498d?monitor=true&api-version=2017-10-01
|
||||
response:
|
||||
body: {string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002","name":"clitest000002","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["479473dc-cfef-474c-ba12-cba2854af0f6"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-04-18T18:14:18.2620405Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-04-18T18:14:18.2620405Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-04-18T18:14:18.1838868Z","primaryEndpoints":{"blob":"https://clitest000002.blob.core.windows.net/","queue":"https://clitest000002.queue.core.windows.net/","table":"https://clitest000002.table.core.windows.net/","file":"https://clitest000002.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['1231']
|
||||
content-type: [application/json]
|
||||
date: ['Wed, 18 Apr 2018 18:14:36 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
|
||||
Microsoft-HTTPAPI/2.0']
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [storage account keys list]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['0']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-storage/1.5.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: POST
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002/listKeys?api-version=2017-10-01
|
||||
response:
|
||||
body: {string: '{"keys":[{"keyName":"key1","value":"WwiX1TfKaD56pOo7C/nZ+spKklmU+vUaYeqAFE0Hsgy4Px6Nnhcw83BZ/FQt6YsUzy0ewYr/ITCJly7DmeX/UQ==","permissions":"FULL"},{"keyName":"key2","value":"UNXaKesSg2GGyltuJSpdIxBp+bQLAmfX+pkF63Is8mLHw2g0arV5rdDIs+wchMEcSFOyYcMBk05NG3gnNqzOzQ==","permissions":"FULL"}]}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['288']
|
||||
content-type: [application/json]
|
||||
date: ['Wed, 18 Apr 2018 18:14:38 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
|
||||
Microsoft-HTTPAPI/2.0']
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1186']
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: 'b''b\''{"location": "westus2", "properties": {"storageAccounts": [{"id":
|
||||
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002",
|
||||
"type": "Primary"}]}}\'''''
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams account create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['302']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"name\":\"ams000003\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices\",\"location\":\"West US 2\",\"\
|
||||
tags\":null,\"properties\":{\r\n \"mediaServiceId\":\"38d0dc03-7d82-4a5f-a7ef-635fc10f8f64\"\
|
||||
,\"storageAccounts\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002\"\
|
||||
,\"type\":\"Primary\"\r\n }\r\n ]\r\n }\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['677']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:14:46 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1199']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 201, message: Created}
|
||||
- request:
|
||||
body: 'b''b\''{"properties": {"alternateId": "aid000005", "description": "desc000006"}}\'''''
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams asset create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['78']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaServices/ams000003/assets/asset000004?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"name\":\"asset000004\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003/assets/asset000004\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices/assets\",\"properties\":{\r\n \
|
||||
\ \"assetId\":\"914878f6-1095-4ee5-8c24-473b1a0a7239\",\"created\":\"2018-04-18T18:14:50.223Z\"\
|
||||
,\"lastModified\":\"2018-04-18T18:14:50.223Z\",\"alternateId\":\"aid000005\"\
|
||||
,\"description\":\"desc000006\",\"container\":null,\"storageAccountId\":null,\"\
|
||||
storageEncryptionFormat\":\"None\",\"storageEncryptionKey\":null\r\n }\r\n\
|
||||
}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['611']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:14:49 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/10.0]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1198']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 201, message: Created}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams asset update]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaServices/ams000003/assets/asset000004?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"name\":\"asset000004\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003/assets/asset000004\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices/assets\",\"properties\":{\r\n \
|
||||
\ \"assetId\":\"914878f6-1095-4ee5-8c24-473b1a0a7239\",\"created\":\"2018-04-18T18:14:50.223Z\"\
|
||||
,\"lastModified\":\"2018-04-18T18:14:50.223Z\",\"alternateId\":\"aid000005\"\
|
||||
,\"description\":\"desc000006\",\"container\":null,\"storageAccountId\":null,\"\
|
||||
storageEncryptionFormat\":\"None\",\"storageEncryptionKey\":null\r\n }\r\n\
|
||||
}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['611']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:14:51 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/10.0]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: ['Accept-Encoding,Accept-Encoding']
|
||||
x-content-type-options: [nosniff]
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: '{"properties": {"alternateId": "myaid", "description": "mydesc", "storageEncryptionFormat":
|
||||
"None"}}'
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams asset update]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['100']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaServices/ams000003/assets/asset000004?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"name\":\"asset000004\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003/assets/asset000004\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices/assets\",\"properties\":{\r\n \
|
||||
\ \"assetId\":\"914878f6-1095-4ee5-8c24-473b1a0a7239\",\"created\":\"2018-04-18T18:14:50.223Z\"\
|
||||
,\"lastModified\":\"2018-04-18T18:14:55.417Z\",\"alternateId\":\"myaid\",\"\
|
||||
description\":\"mydesc\",\"container\":null,\"storageAccountId\":null,\"storageEncryptionFormat\"\
|
||||
:\"None\",\"storageEncryptionKey\":null\r\n }\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['598']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:14:55 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/10.0]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: ['Accept-Encoding,Accept-Encoding']
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1193']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams asset show]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaServices/ams000003/assets/asset000004?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"name\":\"asset000004\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003/assets/asset000004\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices/assets\",\"properties\":{\r\n \
|
||||
\ \"assetId\":\"914878f6-1095-4ee5-8c24-473b1a0a7239\",\"created\":\"2018-04-18T18:14:50.223Z\"\
|
||||
,\"lastModified\":\"2018-04-18T18:14:55.417Z\",\"alternateId\":\"myaid\",\"\
|
||||
description\":\"mydesc\",\"container\":null,\"storageAccountId\":null,\"storageEncryptionFormat\"\
|
||||
:\"None\",\"storageEncryptionKey\":null\r\n }\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['598']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:14:57 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/10.0]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: ['Accept-Encoding,Accept-Encoding']
|
||||
x-content-type-options: [nosniff]
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams asset list]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaServices/ams000003/assets?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"value\":[\r\n {\r\n \"name\":\"asset000004\"\
|
||||
,\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003/assets/asset000004\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices/assets\",\"properties\":{\r\n \
|
||||
\ \"assetId\":\"914878f6-1095-4ee5-8c24-473b1a0a7239\",\"created\":\"\
|
||||
2018-04-18T18:14:50.223Z\",\"lastModified\":\"2018-04-18T18:14:55.417Z\",\"\
|
||||
alternateId\":\"myaid\",\"description\":\"mydesc\",\"container\":null,\"storageAccountId\"\
|
||||
:null,\"storageEncryptionFormat\":\"None\",\"storageEncryptionKey\":null\r\
|
||||
\n }\r\n }\r\n ]\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['642']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:14:57 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/10.0]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: ['Accept-Encoding,Accept-Encoding']
|
||||
x-content-type-options: [nosniff]
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams asset delete]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['0']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: DELETE
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaServices/ams000003/assets/asset000004?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: ''}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['0']
|
||||
date: ['Wed, 18 Apr 2018 18:14:59 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/10.0]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1196']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [group delete]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['0']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 resourcemanagementclient/1.2.1 Azure-SDK-For-Python
|
||||
AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: DELETE
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2017-05-10
|
||||
response:
|
||||
body: {string: ''}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['0']
|
||||
date: ['Wed, 18 Apr 2018 18:15:03 GMT']
|
||||
expires: ['-1']
|
||||
location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdSTzJCT1VZUkJFNkhKM1ZPUloyVEFKVkVSNTdQSEJOUDJSSnxBMEZENzIyQUM2NjlDRUVBLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10']
|
||||
pragma: [no-cache]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1197']
|
||||
status: {code: 202, message: Accepted}
|
||||
version: 1
|
|
@ -0,0 +1,256 @@
|
|||
interactions:
|
||||
- request:
|
||||
body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation",
|
||||
"date": "2018-04-18T18:15:04Z"}}'
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [group create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['110']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 resourcemanagementclient/1.2.1 Azure-SDK-For-Python
|
||||
AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2017-05-10
|
||||
response:
|
||||
body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-04-18T18:15:04Z"},"properties":{"provisioningState":"Succeeded"}}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['384']
|
||||
content-type: [application/json; charset=utf-8]
|
||||
date: ['Wed, 18 Apr 2018 18:15:06 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1185']
|
||||
status: {code: 201, message: Created}
|
||||
- request:
|
||||
body: '{"sku": {"name": "Standard_LRS"}, "kind": "Storage", "location": "westus",
|
||||
"properties": {"supportsHttpsTrafficOnly": false}}'
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [storage account create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['125']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-storage/1.5.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002?api-version=2017-10-01
|
||||
response:
|
||||
body: {string: ''}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['0']
|
||||
content-type: [text/plain; charset=utf-8]
|
||||
date: ['Wed, 18 Apr 2018 18:15:10 GMT']
|
||||
expires: ['-1']
|
||||
location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/e6013dd0-e3af-420c-bbeb-1d30bc460a16?monitor=true&api-version=2017-10-01']
|
||||
pragma: [no-cache]
|
||||
server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
|
||||
Microsoft-HTTPAPI/2.0']
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1191']
|
||||
status: {code: 202, message: Accepted}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [storage account create]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-storage/1.5.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/e6013dd0-e3af-420c-bbeb-1d30bc460a16?monitor=true&api-version=2017-10-01
|
||||
response:
|
||||
body: {string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002","name":"clitest000002","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["479473dc-cfef-474c-ba12-cba2854af0f6"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-04-18T18:15:09.9902754Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-04-18T18:15:09.9902754Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-04-18T18:15:09.9121499Z","primaryEndpoints":{"blob":"https://clitest000002.blob.core.windows.net/","queue":"https://clitest000002.queue.core.windows.net/","table":"https://clitest000002.table.core.windows.net/","file":"https://clitest000002.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['1231']
|
||||
content-type: [application/json]
|
||||
date: ['Wed, 18 Apr 2018 18:15:28 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
|
||||
Microsoft-HTTPAPI/2.0']
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [storage account keys list]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['0']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-storage/1.5.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: POST
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002/listKeys?api-version=2017-10-01
|
||||
response:
|
||||
body: {string: '{"keys":[{"keyName":"key1","value":"EBS+Dk7O/oHcXzQMAtdSVOcWK4lKIAVNfK+MJkqgoghTXhusRCbs+VJFj19CtDxNSxn9HokPSJsc8Lr/xKrvLw==","permissions":"FULL"},{"keyName":"key2","value":"oibL9VSjU2HojX3DlqsW5sI7dU5KBcVn8xaS0kOzI9CUagQSKOasgKhtQ4mkPKuvLqo+DGMeVbQTuu+see02sQ==","permissions":"FULL"}]}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['288']
|
||||
content-type: [application/json]
|
||||
date: ['Wed, 18 Apr 2018 18:15:30 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
|
||||
Microsoft-HTTPAPI/2.0']
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1184']
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: 'b''b\''{"location": "westus2", "properties": {"storageAccounts": [{"id":
|
||||
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002",
|
||||
"type": "Primary"}]}}\'''''
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams account create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['302']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"name\":\"ams000003\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices\",\"location\":\"West US 2\",\"\
|
||||
tags\":null,\"properties\":{\r\n \"mediaServiceId\":\"6440f762-d3ab-4704-9039-bab0753c3ef1\"\
|
||||
,\"storageAccounts\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002\"\
|
||||
,\"type\":\"Primary\"\r\n }\r\n ]\r\n }\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['677']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:15:35 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1190']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 201, message: Created}
|
||||
- request:
|
||||
body: 'b''b\''{"properties": {"alternateId": "aid000005", "description": "desc000006"}}\'''''
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams asset create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['78']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaServices/ams000003/assets/asset000004?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"name\":\"asset000004\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003/assets/asset000004\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices/assets\",\"properties\":{\r\n \
|
||||
\ \"assetId\":\"b6d43715-d164-4228-836e-892aabd7c81b\",\"created\":\"2018-04-18T18:15:39.077Z\"\
|
||||
,\"lastModified\":\"2018-04-18T18:15:39.077Z\",\"alternateId\":\"aid000005\"\
|
||||
,\"description\":\"desc000006\",\"container\":null,\"storageAccountId\":null,\"\
|
||||
storageEncryptionFormat\":\"None\",\"storageEncryptionKey\":null\r\n }\r\n\
|
||||
}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['611']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:15:38 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/10.0]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1185']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 201, message: Created}
|
||||
- request:
|
||||
body: '{}'
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams asset get-sas-urls]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['2']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: POST
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaServices/ams000003/assets/asset000004/listContainerSas?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"assetContainerSasUrls\":[\r\n \"https://clitest000002.blob.core.windows.net/asset-b6d43715-d164-4228-836e-892aabd7c81b?sv=2015-07-08&sr=c&sig=gmxCK%2FmPxalZjtrLizEnuPnIlLHp3W3LEootU6%2FW2Yc%3D&se=0001-01-01T00:00:00Z\"\
|
||||
,\"https://clitest000002.blob.core.windows.net/asset-b6d43715-d164-4228-836e-892aabd7c81b?sv=2015-07-08&sr=c&sig=YcLI0iLKLKgNevjjLdUO%2BdHhJehGW5oOtKJs8293Nc8%3D&se=0001-01-01T00:00:00Z\"\
|
||||
\r\n ]\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['437']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:15:41 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/10.0]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: ['Accept-Encoding,Accept-Encoding']
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1190']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [group delete]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['0']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 resourcemanagementclient/1.2.1 Azure-SDK-For-Python
|
||||
AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: DELETE
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2017-05-10
|
||||
response:
|
||||
body: {string: ''}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['0']
|
||||
date: ['Wed, 18 Apr 2018 18:15:44 GMT']
|
||||
expires: ['-1']
|
||||
location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdVWkU3UU5QR05ZNjJSTDVUWUw3T0IySElLQ1lWR0hZMjZaUHwxNEE2NDY0ODhBMzNEQUYwLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10']
|
||||
pragma: [no-cache]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1189']
|
||||
status: {code: 202, message: Accepted}
|
||||
version: 1
|
|
@ -0,0 +1,357 @@
|
|||
interactions:
|
||||
- request:
|
||||
body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation",
|
||||
"date": "2018-04-18T18:15:45Z"}}'
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [group create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['110']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 resourcemanagementclient/1.2.1 Azure-SDK-For-Python
|
||||
AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2017-05-10
|
||||
response:
|
||||
body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-04-18T18:15:45Z"},"properties":{"provisioningState":"Succeeded"}}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['384']
|
||||
content-type: [application/json; charset=utf-8]
|
||||
date: ['Wed, 18 Apr 2018 18:15:46 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1183']
|
||||
status: {code: 201, message: Created}
|
||||
- request:
|
||||
body: '{"sku": {"name": "Standard_LRS"}, "kind": "Storage", "location": "westus",
|
||||
"properties": {"supportsHttpsTrafficOnly": false}}'
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [storage account create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['125']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-storage/1.5.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002?api-version=2017-10-01
|
||||
response:
|
||||
body: {string: ''}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['0']
|
||||
content-type: [text/plain; charset=utf-8]
|
||||
date: ['Wed, 18 Apr 2018 18:15:49 GMT']
|
||||
expires: ['-1']
|
||||
location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/b8904275-3d12-43dc-8a88-f451526ef925?monitor=true&api-version=2017-10-01']
|
||||
pragma: [no-cache]
|
||||
server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
|
||||
Microsoft-HTTPAPI/2.0']
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1192']
|
||||
status: {code: 202, message: Accepted}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [storage account create]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-storage/1.5.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/b8904275-3d12-43dc-8a88-f451526ef925?monitor=true&api-version=2017-10-01
|
||||
response:
|
||||
body: {string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002","name":"clitest000002","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["479473dc-cfef-474c-ba12-cba2854af0f6"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-04-18T18:15:50.1350723Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-04-18T18:15:50.1350723Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-04-18T18:15:50.0569995Z","primaryEndpoints":{"blob":"https://clitest000002.blob.core.windows.net/","queue":"https://clitest000002.queue.core.windows.net/","table":"https://clitest000002.table.core.windows.net/","file":"https://clitest000002.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['1231']
|
||||
content-type: [application/json]
|
||||
date: ['Wed, 18 Apr 2018 18:16:08 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
|
||||
Microsoft-HTTPAPI/2.0']
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [storage account keys list]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['0']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-storage/1.5.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: POST
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002/listKeys?api-version=2017-10-01
|
||||
response:
|
||||
body: {string: '{"keys":[{"keyName":"key1","value":"u39k4I5ddR9Lt9DSt2iX2ZqomZyi5S7NFIspjvhBop/XJkxAzxXbfsxLNo1YbgeHNWPyQtlTNxYtGxd0RqC7FQ==","permissions":"FULL"},{"keyName":"key2","value":"Fx+engnjwwmLDwpJfHNORhJ2L/rIhHqyiYO5u5w0UWrfQqiHim8H6nD1pdYvax74byjJCxYxFwILzHLBwigSOw==","permissions":"FULL"}]}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['288']
|
||||
content-type: [application/json]
|
||||
date: ['Wed, 18 Apr 2018 18:16:10 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
|
||||
Microsoft-HTTPAPI/2.0']
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1195']
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: 'b''b\''{"location": "westus2", "properties": {"storageAccounts": [{"id":
|
||||
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002",
|
||||
"type": "Primary"}]}}\'''''
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams account create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['302']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"name\":\"ams000003\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices\",\"location\":\"West US 2\",\"\
|
||||
tags\":null,\"properties\":{\r\n \"mediaServiceId\":\"7bf9fa76-1f75-4f7a-9853-9de9e1de5b98\"\
|
||||
,\"storageAccounts\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002\"\
|
||||
,\"type\":\"Primary\"\r\n }\r\n ]\r\n }\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['677']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:16:16 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1188']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 201, message: Created}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams account update]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"name\":\"ams000003\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices\",\"location\":\"West US 2\",\"\
|
||||
tags\":null,\"properties\":{\r\n \"mediaServiceId\":\"7bf9fa76-1f75-4f7a-9853-9de9e1de5b98\"\
|
||||
,\"storageAccounts\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002\"\
|
||||
,\"type\":\"Primary\"\r\n }\r\n ]\r\n }\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['677']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:16:18 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: 'b''b\''{"tags": {"key": "value"}, "location": "West US 2", "properties":
|
||||
{"storageAccounts": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002",
|
||||
"type": "Primary"}]}}\'''''
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams account update]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['330']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"name\":\"ams000003\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices\",\"location\":\"West US 2\",\"\
|
||||
tags\":{\r\n \"key\":\"value\"\r\n },\"properties\":{\r\n \"mediaServiceId\"\
|
||||
:\"7bf9fa76-1f75-4f7a-9853-9de9e1de5b98\",\"storageAccounts\":[\r\n {\r\
|
||||
\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002\"\
|
||||
,\"type\":\"Primary\"\r\n }\r\n ]\r\n }\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['698']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:16:21 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1189']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 201, message: Created}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams account list]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"value\":[\r\n {\r\n \"name\":\"ams000003\",\"\
|
||||
id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices\",\"location\":\"West US 2\",\"\
|
||||
tags\":{\r\n \"key\":\"value\"\r\n },\"properties\":{\r\n \
|
||||
\ \"mediaServiceId\":\"7bf9fa76-1f75-4f7a-9853-9de9e1de5b98\",\"storageAccounts\"\
|
||||
:[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002\"\
|
||||
,\"type\":\"Primary\"\r\n }\r\n ]\r\n }\r\n }\r\n\
|
||||
\ ]\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['766']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:16:23 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams account show]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"name\":\"ams000003\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices\",\"location\":\"West US 2\",\"\
|
||||
tags\":{\r\n \"key\":\"value\"\r\n },\"properties\":{\r\n \"mediaServiceId\"\
|
||||
:\"7bf9fa76-1f75-4f7a-9853-9de9e1de5b98\",\"storageAccounts\":[\r\n {\r\
|
||||
\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002\"\
|
||||
,\"type\":\"Primary\"\r\n }\r\n ]\r\n }\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['698']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:16:24 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams account delete]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['0']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: DELETE
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: ''}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['0']
|
||||
date: ['Wed, 18 Apr 2018 18:16:30 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1186']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [group delete]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['0']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 resourcemanagementclient/1.2.1 Azure-SDK-For-Python
|
||||
AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: DELETE
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2017-05-10
|
||||
response:
|
||||
body: {string: ''}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['0']
|
||||
date: ['Wed, 18 Apr 2018 18:16:33 GMT']
|
||||
expires: ['-1']
|
||||
location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdFQkxBUDUzVkg2WU9FVkEyM05FWUhRSFhMSEtGQkNVNUxPR3wyNDRDMjkzQkI3N0I5QzVFLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10']
|
||||
pragma: [no-cache]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1188']
|
||||
status: {code: 202, message: Accepted}
|
||||
version: 1
|
|
@ -0,0 +1,479 @@
|
|||
interactions:
|
||||
- request:
|
||||
body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation",
|
||||
"date": "2018-04-18T18:16:33Z"}}'
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [group create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['110']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 resourcemanagementclient/1.2.1 Azure-SDK-For-Python
|
||||
AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2017-05-10
|
||||
response:
|
||||
body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-04-18T18:16:33Z"},"properties":{"provisioningState":"Succeeded"}}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['384']
|
||||
content-type: [application/json; charset=utf-8]
|
||||
date: ['Wed, 18 Apr 2018 18:16:35 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1187']
|
||||
status: {code: 201, message: Created}
|
||||
- request:
|
||||
body: '{"sku": {"name": "Standard_LRS"}, "kind": "Storage", "location": "westus",
|
||||
"properties": {"supportsHttpsTrafficOnly": false}}'
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [storage account create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['125']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-storage/1.5.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002?api-version=2017-10-01
|
||||
response:
|
||||
body: {string: ''}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['0']
|
||||
content-type: [text/plain; charset=utf-8]
|
||||
date: ['Wed, 18 Apr 2018 18:16:38 GMT']
|
||||
expires: ['-1']
|
||||
location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/61ab7532-2221-499c-949e-054b7203bd6e?monitor=true&api-version=2017-10-01']
|
||||
pragma: [no-cache]
|
||||
server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
|
||||
Microsoft-HTTPAPI/2.0']
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1191']
|
||||
status: {code: 202, message: Accepted}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [storage account create]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-storage/1.5.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/61ab7532-2221-499c-949e-054b7203bd6e?monitor=true&api-version=2017-10-01
|
||||
response:
|
||||
body: {string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002","name":"clitest000002","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["479473dc-cfef-474c-ba12-cba2854af0f6"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-04-18T18:16:38.5266211Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-04-18T18:16:38.5266211Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-04-18T18:16:38.4641205Z","primaryEndpoints":{"blob":"https://clitest000002.blob.core.windows.net/","queue":"https://clitest000002.queue.core.windows.net/","table":"https://clitest000002.table.core.windows.net/","file":"https://clitest000002.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['1231']
|
||||
content-type: [application/json]
|
||||
date: ['Wed, 18 Apr 2018 18:16:56 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
|
||||
Microsoft-HTTPAPI/2.0']
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [storage account keys list]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['0']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-storage/1.5.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: POST
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002/listKeys?api-version=2017-10-01
|
||||
response:
|
||||
body: {string: '{"keys":[{"keyName":"key1","value":"/Y/aeCgGVZdrjTFxSQryNZiI82gbjiBs0zkMrOaAyb/LkikxUu+Gt0gnle3cGrEYK0Kbkw9a07l/xwu6GHaamg==","permissions":"FULL"},{"keyName":"key2","value":"Zgnm/aekJlAy1LPBYBsCK/awCGHP4YFSDKeETQj6iuOLJ0nNDEH9eQbJspyA5TSSWW1TtZl1pa1wzXjAUKXM/A==","permissions":"FULL"}]}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['288']
|
||||
content-type: [application/json]
|
||||
date: ['Wed, 18 Apr 2018 18:16:57 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
|
||||
Microsoft-HTTPAPI/2.0']
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1185']
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: 'b''b\''{"location": "westus2", "properties": {"storageAccounts": [{"id":
|
||||
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002",
|
||||
"type": "Primary"}]}}\'''''
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams account create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['302']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"name\":\"ams000003\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices\",\"location\":\"West US 2\",\"\
|
||||
tags\":null,\"properties\":{\r\n \"mediaServiceId\":\"e3f05566-0be0-4376-b023-f971ec92d1e8\"\
|
||||
,\"storageAccounts\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002\"\
|
||||
,\"type\":\"Primary\"\r\n }\r\n ]\r\n }\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['677']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:17:02 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1190']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 201, message: Created}
|
||||
- request:
|
||||
body: '{}'
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams asset create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['2']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaServices/ams000003/assets/asset000004?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"name\":\"asset000004\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003/assets/asset000004\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices/assets\",\"properties\":{\r\n \
|
||||
\ \"assetId\":\"0a72e039-26ee-4719-80f1-099de1c02139\",\"created\":\"2018-04-18T18:17:05.7Z\"\
|
||||
,\"lastModified\":\"2018-04-18T18:17:05.7Z\",\"alternateId\":null,\"description\"\
|
||||
:null,\"container\":null,\"storageAccountId\":null,\"storageEncryptionFormat\"\
|
||||
:\"None\",\"storageEncryptionKey\":null\r\n }\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['587']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:17:05 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/10.0]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1184']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 201, message: Created}
|
||||
- request:
|
||||
body: '{"properties": {"outputs": [{"preset": {"@odata.type": "#Microsoft.Media.BuiltInStandardEncoderPreset",
|
||||
"presetName": "AACGoodQualityAudio"}}]}}'
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams transform create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['144']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaServices/ams000003/transforms/tra000005?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"name\":\"tra000005\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003/transforms/tra000005\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices/transforms\",\"properties\":{\r\n\
|
||||
\ \"created\":\"2018-04-18T18:17:08.4271265Z\",\"description\":null,\"\
|
||||
lastModified\":\"2018-04-18T18:17:08.4271265Z\",\"outputs\":[\r\n {\r\
|
||||
\n \"onError\":\"StopProcessingJob\",\"relativePriority\":\"Normal\"\
|
||||
,\"preset\":{\r\n \"@odata.type\":\"#Microsoft.Media.BuiltInStandardEncoderPreset\"\
|
||||
,\"presetName\":\"AACGoodQualityAudio\"\r\n }\r\n }\r\n ]\r\
|
||||
\n }\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['667']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:17:08 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1182']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 201, message: Created}
|
||||
- request:
|
||||
body: 'b''{"properties": {"input": {"@odata.type": "#Microsoft.Media.JobInputAsset",
|
||||
"assetName": "asset000004"}, "outputs": [{"@odata.type": "#Microsoft.Media.JobOutputAsset",
|
||||
"assetName": "asset000004"}], "priority": "High"}}'''
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams job start]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['219']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaServices/ams000003/transforms/tra000005/jobs/job000006?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"name\":\"job000006\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003/transforms/tra000005/jobs/job000006\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices/transforms/jobs\",\"properties\"\
|
||||
:{\r\n \"created\":\"2018-04-18T18:17:10.9273207Z\",\"state\":\"Queued\"\
|
||||
,\"description\":null,\"input\":{\r\n \"@odata.type\":\"#Microsoft.Media.JobInputs\"\
|
||||
,\"label\":null,\"inputs\":[\r\n {\r\n \"@odata.type\":\"\
|
||||
#Microsoft.Media.JobInputAsset\",\"label\":null,\"files\":[\r\n \
|
||||
\ \r\n ],\"assetName\":\"asset000004\"\r\n }\r\n ]\r\
|
||||
\n },\"lastModified\":\"2018-04-18T18:17:10.9273207Z\",\"outputs\":[\r\n\
|
||||
\ {\r\n \"@odata.type\":\"#Microsoft.Media.JobOutputAsset\",\"\
|
||||
error\":null,\"state\":\"Queued\",\"progress\":0,\"assetName\":\"asset000004\"\
|
||||
\r\n }\r\n ],\"priority\":\"High\"\r\n }\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['910']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:17:11 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1184']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 201, message: Created}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams job show]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaServices/ams000003/transforms/tra000005/jobs/job000006?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"name\":\"job000006\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003/transforms/tra000005/jobs/job000006\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices/transforms/jobs\",\"properties\"\
|
||||
:{\r\n \"created\":\"2018-04-18T18:17:10.927Z\",\"state\":\"Queued\",\"\
|
||||
description\":null,\"input\":{\r\n \"@odata.type\":\"#Microsoft.Media.JobInputs\"\
|
||||
,\"label\":null,\"inputs\":[\r\n {\r\n \"@odata.type\":\"\
|
||||
#Microsoft.Media.JobInputAsset\",\"label\":null,\"files\":[\r\n \
|
||||
\ \r\n ],\"assetName\":\"asset000004\"\r\n }\r\n ]\r\
|
||||
\n },\"lastModified\":\"2018-04-18T18:17:10.927Z\",\"outputs\":[\r\n \
|
||||
\ {\r\n \"@odata.type\":\"#Microsoft.Media.JobOutputAsset\",\"error\"\
|
||||
:null,\"state\":\"Queued\",\"progress\":0,\"assetName\":\"asset000004\"\r\n\
|
||||
\ }\r\n ],\"priority\":\"High\"\r\n }\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['902']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:17:13 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams job list]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaServices/ams000003/transforms/tra000005/jobs?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"value\":[\r\n {\r\n \"name\":\"job000006\",\"\
|
||||
id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003/transforms/tra000005/jobs/job000006\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices/transforms/jobs\",\"properties\"\
|
||||
:{\r\n \"created\":\"2018-04-18T18:17:10.927Z\",\"state\":\"Queued\"\
|
||||
,\"description\":null,\"input\":{\r\n \"@odata.type\":\"#Microsoft.Media.JobInputs\"\
|
||||
,\"label\":null,\"inputs\":[\r\n {\r\n \"@odata.type\"\
|
||||
:\"#Microsoft.Media.JobInputAsset\",\"label\":null,\"files\":[\r\n \
|
||||
\ \r\n ],\"assetName\":\"asset000004\"\r\n \
|
||||
\ }\r\n ]\r\n },\"lastModified\":\"2018-04-18T18:17:10.927Z\"\
|
||||
,\"outputs\":[\r\n {\r\n \"@odata.type\":\"#Microsoft.Media.JobOutputAsset\"\
|
||||
,\"error\":null,\"state\":\"Queued\",\"progress\":0,\"assetName\":\"asset000004\"\
|
||||
\r\n }\r\n ],\"priority\":\"High\"\r\n }\r\n }\r\n\
|
||||
\ ]\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['994']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:17:15 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams job cancel]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['0']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: POST
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaServices/ams000003/transforms/tra000005/jobs/job000006/cancelJob?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: ''}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['0']
|
||||
date: ['Wed, 18 Apr 2018 18:17:17 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1186']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams job show]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaServices/ams000003/transforms/tra000005/jobs/job000006?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"name\":\"job000006\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003/transforms/tra000005/jobs/job000006\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices/transforms/jobs\",\"properties\"\
|
||||
:{\r\n \"created\":\"2018-04-18T18:17:10.927Z\",\"state\":\"Canceled\"\
|
||||
,\"description\":null,\"input\":{\r\n \"@odata.type\":\"#Microsoft.Media.JobInputs\"\
|
||||
,\"label\":null,\"inputs\":[\r\n {\r\n \"@odata.type\":\"\
|
||||
#Microsoft.Media.JobInputAsset\",\"label\":null,\"files\":[\r\n \
|
||||
\ \r\n ],\"assetName\":\"asset000004\"\r\n }\r\n ]\r\
|
||||
\n },\"lastModified\":\"2018-04-18T18:17:10.927Z\",\"outputs\":[\r\n \
|
||||
\ {\r\n \"@odata.type\":\"#Microsoft.Media.JobOutputAsset\",\"error\"\
|
||||
:null,\"state\":\"Canceled\",\"progress\":0,\"assetName\":\"asset000004\"\r\
|
||||
\n }\r\n ],\"priority\":\"High\"\r\n }\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['906']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:17:19 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams job delete]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['0']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: DELETE
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaServices/ams000003/transforms/tra000005/jobs/job000006?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: ''}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['0']
|
||||
date: ['Wed, 18 Apr 2018 18:17:20 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1183']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [group delete]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['0']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 resourcemanagementclient/1.2.1 Azure-SDK-For-Python
|
||||
AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: DELETE
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2017-05-10
|
||||
response:
|
||||
body: {string: ''}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['0']
|
||||
date: ['Wed, 18 Apr 2018 18:17:23 GMT']
|
||||
expires: ['-1']
|
||||
location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkc2QjdKV1FZUVBFSUMyWkxBV1hOVkU3NTdHSUVDTUJWWjdOM3w5RUFEQkUzNTMyQ0M3NDg3LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10']
|
||||
pragma: [no-cache]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1196']
|
||||
status: {code: 202, message: Accepted}
|
||||
version: 1
|
|
@ -0,0 +1,89 @@
|
|||
interactions:
|
||||
- request:
|
||||
body: '{"location": "westus", "tags": {"use": "az-test"}}'
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [group create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['50']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.23 resourcemanagementclient/1.2.1 Azure-SDK-For-Python
|
||||
AZURECLI/2.0.30]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2017-05-10
|
||||
response:
|
||||
body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['328']
|
||||
content-type: [application/json; charset=utf-8]
|
||||
date: ['Wed, 21 Mar 2018 19:43:42 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1197']
|
||||
status: {code: 201, message: Created}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams account list]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.23 azuremediaservices/2018-02-01-privatepreview Azure-SDK-For-Python
|
||||
AZURECLI/2.0.30]
|
||||
accept-language: [en-US]
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices?api-version=2018-02-01-privatepreview
|
||||
response:
|
||||
body: {string: "{\r\n \"value\":[\r\n \r\n ]\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['28']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 21 Mar 2018 19:43:44 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [group delete]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['0']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.23 resourcemanagementclient/1.2.1 Azure-SDK-For-Python
|
||||
AZURECLI/2.0.30]
|
||||
accept-language: [en-US]
|
||||
method: DELETE
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2017-05-10
|
||||
response:
|
||||
body: {string: ''}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['0']
|
||||
date: ['Wed, 21 Mar 2018 19:43:47 GMT']
|
||||
expires: ['-1']
|
||||
location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdFS1FFM1VXT1RZVFdHUENZVUI3RjJUNU5OTklGTkdZTE1TRnxFNTdENEM2NzE2REVGMDdDLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10']
|
||||
pragma: [no-cache]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1195']
|
||||
status: {code: 202, message: Accepted}
|
||||
version: 1
|
|
@ -0,0 +1,604 @@
|
|||
interactions:
|
||||
- request:
|
||||
body: '{"location": "westus", "tags": {"use": "az-test"}}'
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [group create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['50']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.23 resourcemanagementclient/1.2.1 Azure-SDK-For-Python
|
||||
AZURECLI/2.0.30]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2017-05-10
|
||||
response:
|
||||
body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['328']
|
||||
content-type: [application/json; charset=utf-8]
|
||||
date: ['Wed, 21 Mar 2018 19:43:50 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1192']
|
||||
status: {code: 201, message: Created}
|
||||
- request:
|
||||
body: '{"sku": {"name": "Standard_LRS"}, "kind": "Storage", "location": "westus",
|
||||
"properties": {"supportsHttpsTrafficOnly": false}}'
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [storage account create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['125']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.23 azure-mgmt-storage/1.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002?api-version=2017-10-01
|
||||
response:
|
||||
body: {string: ''}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['0']
|
||||
content-type: [text/plain; charset=utf-8]
|
||||
date: ['Wed, 21 Mar 2018 19:43:52 GMT']
|
||||
expires: ['-1']
|
||||
location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/c29a7b69-b450-43aa-b014-089051635818?monitor=true&api-version=2017-10-01']
|
||||
pragma: [no-cache]
|
||||
server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
|
||||
Microsoft-HTTPAPI/2.0']
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1197']
|
||||
status: {code: 202, message: Accepted}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [storage account create]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.23 azure-mgmt-storage/1.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
|
||||
accept-language: [en-US]
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/c29a7b69-b450-43aa-b014-089051635818?monitor=true&api-version=2017-10-01
|
||||
response:
|
||||
body: {string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002","name":"clitest000002","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["479473dc-cfef-474c-ba12-cba2854af0f6"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-03-21T19:43:52.8040139Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-03-21T19:43:52.8040139Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-03-21T19:43:52.7883675Z","primaryEndpoints":{"blob":"https://clitest000002.blob.core.windows.net/","queue":"https://clitest000002.queue.core.windows.net/","table":"https://clitest000002.table.core.windows.net/","file":"https://clitest000002.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['1231']
|
||||
content-type: [application/json]
|
||||
date: ['Wed, 21 Mar 2018 19:44:11 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
|
||||
Microsoft-HTTPAPI/2.0']
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [storage account keys list]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['0']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.23 azure-mgmt-storage/1.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
|
||||
accept-language: [en-US]
|
||||
method: POST
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002/listKeys?api-version=2017-10-01
|
||||
response:
|
||||
body: {string: '{"keys":[{"keyName":"key1","value":"jhJkUQArGxYJi1ysiIuFUniaxwu2r604v/YCXohk+/E/mK8dvBzCFTInIg956aU9ieZ3nl5h/VXGy9in1pf+yA==","permissions":"FULL"},{"keyName":"key2","value":"t478m6TSpV7UqI/rI7sX5zo2iy35L0QOfF2AVS3fpYu+c2g6VV8kCtPKVdIQWNErZhORnLn3xp7cyhZ8Najrfw==","permissions":"FULL"}]}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['288']
|
||||
content-type: [application/json]
|
||||
date: ['Wed, 21 Mar 2018 19:44:12 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
|
||||
Microsoft-HTTPAPI/2.0']
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1196']
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams account create]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.23 azure-mgmt-storage/1.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
|
||||
accept-language: [en-US]
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002?api-version=2017-10-01
|
||||
response:
|
||||
body: {string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002","name":"clitest000002","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["479473dc-cfef-474c-ba12-cba2854af0f6"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-03-21T19:43:52.8040139Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-03-21T19:43:52.8040139Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-03-21T19:43:52.7883675Z","primaryEndpoints":{"blob":"https://clitest000002.blob.core.windows.net/","queue":"https://clitest000002.queue.core.windows.net/","table":"https://clitest000002.table.core.windows.net/","file":"https://clitest000002.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['1231']
|
||||
content-type: [application/json]
|
||||
date: ['Wed, 21 Mar 2018 19:44:15 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
|
||||
Microsoft-HTTPAPI/2.0']
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: 'b''b\''{"location": "westus2", "properties": {"storageAccounts": [{"id":
|
||||
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002",
|
||||
"type": "Primary"}]}}\'''''
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams account create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['302']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.23 azuremediaservices/2018-02-01-privatepreview Azure-SDK-For-Python
|
||||
AZURECLI/2.0.30]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003?api-version=2018-02-01-privatepreview
|
||||
response:
|
||||
body: {string: "{\r\n \"name\":\"ams000003\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices\",\"location\":\"West US 2\",\"\
|
||||
tags\":null,\"properties\":{\r\n \"mediaServiceId\":\"afe14136-87b4-40a5-aedd-1342f773f0f7\"\
|
||||
,\"storageAccounts\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002\"\
|
||||
,\"type\":\"Primary\"\r\n }\r\n ]\r\n }\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['677']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 21 Mar 2018 19:44:19 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1197']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 201, message: Created}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams account sp create]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.23 azuremediaservices/2018-02-01-privatepreview Azure-SDK-For-Python
|
||||
AZURECLI/2.0.30]
|
||||
accept-language: [en-US]
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003?api-version=2018-02-01-privatepreview
|
||||
response:
|
||||
body: {string: "{\r\n \"name\":\"ams000003\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices\",\"location\":\"West US 2\",\"\
|
||||
tags\":null,\"properties\":{\r\n \"mediaServiceId\":\"afe14136-87b4-40a5-aedd-1342f773f0f7\"\
|
||||
,\"storageAccounts\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002\"\
|
||||
,\"type\":\"Primary\"\r\n }\r\n ]\r\n }\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['677']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 21 Mar 2018 19:44:20 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams account sp create]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.23 graphrbacmanagementclient/0.31.0 Azure-SDK-For-Python
|
||||
AZURECLI/2.0.30]
|
||||
accept-language: [en-US]
|
||||
method: GET
|
||||
uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/servicePrincipals?$filter=servicePrincipalNames%2Fany%28x%3Ax%20eq%20%27http%3A%2F%2Fspn000004%27%29&api-version=1.6
|
||||
response:
|
||||
body: {string: '{"odata.metadata":"https://graph.windows.net/00000000-0000-0000-0000-000000000000/$metadata#directoryObjects/Microsoft.DirectoryServices.ServicePrincipal","value":[]}'}
|
||||
headers:
|
||||
access-control-allow-origin: ['*']
|
||||
cache-control: [no-cache]
|
||||
content-length: ['166']
|
||||
content-type: [application/json; odata=minimalmetadata; streaming=true; charset=utf-8]
|
||||
dataserviceversion: [3.0;]
|
||||
date: ['Wed, 21 Mar 2018 19:44:23 GMT']
|
||||
duration: ['2180145']
|
||||
expires: ['-1']
|
||||
ocp-aad-diagnostics-server-name: [yjFpNiVH7H4hNgUCg7e4viVgl8ghPqdy05PYLJHsfOI=]
|
||||
ocp-aad-session-key: [IFB4D5cmVshByhoQLRG9jzq2DKB9GV_9MKbjEHSiJEZynFWeYqshtIw5-3wQy1wQXtmWcWo3GQmv7qZl_MRTiDGWbpzNq0MQhq3Wre_IqEpLnyE2cYYoEFBH8dMbwhLCs1dXa_dmnW2TouIUdzD5RA.0t3zVuxq399XfseF2UjCGgk_LhpfSx3Sh1wjq3V9JC4]
|
||||
pragma: [no-cache]
|
||||
request-id: [f33d8fe3-9803-4abd-a8bf-c700f9209389]
|
||||
server: [Microsoft-IIS/10.0]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-aspnet-version: [4.0.30319]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-dirapi-data-contract-version: ['1.6']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: 'b''b\''{"availableToOtherTenants": false, "displayName": "spn000004", "homepage":
|
||||
"http://spn000004", "identifierUris": ["http://spn000004"], "passwordCredentials":
|
||||
[{"startDate": "2018-03-21T19:44:21.33586099999999997Z", "endDate": "2019-03-21T19:44:21.33586099999999997Z",
|
||||
"keyId": "1696d539-4510-4ad4-b267-cb65b81c8d16", "value": "spp000005"}]}\'''''
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams account sp create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['344']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.23 graphrbacmanagementclient/0.31.0 Azure-SDK-For-Python
|
||||
AZURECLI/2.0.30]
|
||||
accept-language: [en-US]
|
||||
method: POST
|
||||
uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/applications?api-version=1.6
|
||||
response:
|
||||
body: {string: '{"odata.metadata":"https://graph.windows.net/00000000-0000-0000-0000-000000000000/$metadata#directoryObjects/Microsoft.DirectoryServices.Application/@Element","odata.type":"Microsoft.DirectoryServices.Application","objectType":"Application","objectId":"93ad516c-0fcf-4883-b0be-28f683e15155","deletionTimestamp":null,"acceptMappedClaims":null,"addIns":[],"appId":"8bfda84a-ba78-40d9-8375-58188f9315c3","appRoles":[],"availableToOtherTenants":false,"displayName":"spn000004","errorUrl":null,"groupMembershipClaims":null,"homepage":"http://spn000004","identifierUris":["http://spn000004"],"informationalUrls":{"termsOfService":null,"support":null,"privacy":null,"marketing":null},"isDeviceOnlyAuthSupported":null,"keyCredentials":[],"knownClientApplications":[],"logoutUrl":null,"logo@odata.mediaContentType":"application/json;odata=minimalmetadata;
|
||||
charset=utf-8","logoUrl":null,"oauth2AllowIdTokenImplicitFlow":false,"oauth2AllowImplicitFlow":false,"oauth2AllowUrlPathMatching":false,"oauth2Permissions":[{"adminConsentDescription":"Allow
|
||||
the application to access spn000004 on behalf of the signed-in user.","adminConsentDisplayName":"Access
|
||||
spn000004","id":"1a030f8f-ff13-491d-8941-a6a1f47c2d2c","isEnabled":true,"type":"User","userConsentDescription":"Allow
|
||||
the application to access spn000004 on your behalf.","userConsentDisplayName":"Access
|
||||
spn000004","value":"user_impersonation"}],"oauth2RequirePostResponse":false,"optionalClaims":null,"parentalControlSettings":{"countriesBlockedForMinors":[],"legalAgeGroupRule":"Allow"},"passwordCredentials":[{"customKeyIdentifier":null,"endDate":"2019-03-21T19:44:21.335861Z","keyId":"1696d539-4510-4ad4-b267-cb65b81c8d16","startDate":"2018-03-21T19:44:21.335861Z","value":null}],"publicClient":null,"recordConsentConditions":null,"replyUrls":[],"requiredResourceAccess":[],"samlMetadataUrl":null,"tokenEncryptionKeyId":null}'}
|
||||
headers:
|
||||
access-control-allow-origin: ['*']
|
||||
cache-control: [no-cache]
|
||||
content-length: ['1878']
|
||||
content-type: [application/json; odata=minimalmetadata; streaming=true; charset=utf-8]
|
||||
dataserviceversion: [3.0;]
|
||||
date: ['Wed, 21 Mar 2018 19:44:25 GMT']
|
||||
duration: ['6524546']
|
||||
expires: ['-1']
|
||||
location: ['https://graph.windows.net/00000000-0000-0000-0000-000000000000/directoryObjects/93ad516c-0fcf-4883-b0be-28f683e15155/Microsoft.DirectoryServices.Application']
|
||||
ocp-aad-diagnostics-server-name: [36LDubY7nJC/vY3gTMr8VE1Q2g2ARMYGQXXSKBzluxE=]
|
||||
ocp-aad-session-key: [ZiBQvJvWd8iRlVf7lGqNRltQcvqZ7c18bGEIx811siDjuXRMKZLq0OM2qns67N84diEoUXWkFe1pF21afbypA-8zzWf4nVCj9Dqg8XAzQ5xwumNL_v9YE1V_47WawZKpUGZrkhA9-VayY2jH92Lo7Q.UPPQ2dGfw4XxsJP93z8CXQQnG2HTOm3V4BOsZKOXR_A]
|
||||
pragma: [no-cache]
|
||||
request-id: [43a3eaae-0b97-404d-a0b4-840cdd36a1b0]
|
||||
server: [Microsoft-IIS/10.0]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-aspnet-version: [4.0.30319]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-dirapi-data-contract-version: ['1.6']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 201, message: Created}
|
||||
- request:
|
||||
body: '{"appId": "8bfda84a-ba78-40d9-8375-58188f9315c3", "accountEnabled": true}'
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams account sp create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['73']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.23 graphrbacmanagementclient/0.31.0 Azure-SDK-For-Python
|
||||
AZURECLI/2.0.30]
|
||||
accept-language: [en-US]
|
||||
method: POST
|
||||
uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/servicePrincipals?api-version=1.6
|
||||
response:
|
||||
body: {string: '{"odata.metadata":"https://graph.windows.net/00000000-0000-0000-0000-000000000000/$metadata#directoryObjects/Microsoft.DirectoryServices.ServicePrincipal/@Element","odata.type":"Microsoft.DirectoryServices.ServicePrincipal","objectType":"ServicePrincipal","objectId":"81ce4115-7e5a-4d76-85c0-7f2afb79ff27","deletionTimestamp":null,"accountEnabled":true,"addIns":[],"alternativeNames":[],"appDisplayName":"spn000004","appId":"8bfda84a-ba78-40d9-8375-58188f9315c3","appOwnerTenantId":"479473dc-cfef-474c-ba12-cba2854af0f6","appRoleAssignmentRequired":false,"appRoles":[],"displayName":"spn000004","errorUrl":null,"homepage":"http://spn000004","keyCredentials":[],"logoutUrl":null,"oauth2Permissions":[{"adminConsentDescription":"Allow
|
||||
the application to access spn000004 on behalf of the signed-in user.","adminConsentDisplayName":"Access
|
||||
spn000004","id":"1a030f8f-ff13-491d-8941-a6a1f47c2d2c","isEnabled":true,"type":"User","userConsentDescription":"Allow
|
||||
the application to access spn000004 on your behalf.","userConsentDisplayName":"Access
|
||||
spn000004","value":"user_impersonation"}],"passwordCredentials":[],"preferredTokenSigningKeyThumbprint":null,"publisherName":"MediaSouthWorksDirectory","replyUrls":[],"samlMetadataUrl":null,"servicePrincipalNames":["8bfda84a-ba78-40d9-8375-58188f9315c3","http://spn000004"],"servicePrincipalType":"Application","tags":[],"tokenEncryptionKeyId":null}'}
|
||||
headers:
|
||||
access-control-allow-origin: ['*']
|
||||
cache-control: [no-cache]
|
||||
content-length: ['1398']
|
||||
content-type: [application/json; odata=minimalmetadata; streaming=true; charset=utf-8]
|
||||
dataserviceversion: [3.0;]
|
||||
date: ['Wed, 21 Mar 2018 19:44:26 GMT']
|
||||
duration: ['4677390']
|
||||
expires: ['-1']
|
||||
location: ['https://graph.windows.net/00000000-0000-0000-0000-000000000000/directoryObjects/81ce4115-7e5a-4d76-85c0-7f2afb79ff27/Microsoft.DirectoryServices.ServicePrincipal']
|
||||
ocp-aad-diagnostics-server-name: [3rF5dNvuHO6o1tAJ9yOBRpCQjpIX3MtrAUMmsK1IkuE=]
|
||||
ocp-aad-session-key: [2lfNlQNHnfblcLuobGn-eF-PM95eqTQRvq6ZfR7OEbGu39wuY6EcL6-Fkp3IPacQryYZTi2nWBdDPIWv1yWdpBp2TRjdbezX0M2MeRDnzjrQLb9nZaTbBBJ5pQmmr6TNwppCRgkGSOjQh0GdmzM4yA.6Qt6_72E3irKRBfkG5ki0_B5RB0tAd7n1BSpk_CD64U]
|
||||
pragma: [no-cache]
|
||||
request-id: [da53f2f1-f6fc-4fdd-9ea8-13410a9a3c5d]
|
||||
server: [Microsoft-IIS/10.0]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-aspnet-version: [4.0.30319]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-dirapi-data-contract-version: ['1.6']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 201, message: Created}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams account sp create]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.23 azure-mgmt-authorization/0.40.0 Azure-SDK-For-Python
|
||||
AZURECLI/2.0.30]
|
||||
accept-language: [en-US]
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments?$filter=principalId%20eq%20%2781ce4115-7e5a-4d76-85c0-7f2afb79ff27%27&api-version=2018-01-01-preview
|
||||
response:
|
||||
body: {string: '{"value":[]}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['12']
|
||||
content-type: [application/json; charset=utf-8]
|
||||
date: ['Wed, 21 Mar 2018 19:44:27 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/10.0]
|
||||
set-cookie: [x-ms-gateway-slice=productionb; path=/; secure; HttpOnly]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-request-charge: ['1']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams account sp create]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.23 azure-mgmt-authorization/0.40.0 Azure-SDK-For-Python
|
||||
AZURECLI/2.0.30]
|
||||
accept-language: [en-US]
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions?$filter=roleName%20eq%20%27Owner%27&api-version=2018-01-01-preview
|
||||
response:
|
||||
body: {string: '{"value":[{"properties":{"roleName":"Owner","type":"BuiltInRole","description":"Lets
|
||||
you manage everything, including access to resources.","assignableScopes":["/"],"permissions":[{"actions":["*"],"notActions":[],"dataActions":[],"notDataActions":[]}],"createdOn":"0001-01-01T08:00:00.0000000Z","updatedOn":"2016-05-31T23:14:00.9179619Z","createdBy":null,"updatedBy":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635","type":"Microsoft.Authorization/roleDefinitions","name":"8e3af657-a8ff-443c-a75c-2fe8c4bcb635"}]}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['616']
|
||||
content-type: [application/json; charset=utf-8]
|
||||
date: ['Wed, 21 Mar 2018 19:44:29 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/10.0]
|
||||
set-cookie: [x-ms-gateway-slice=productionb; path=/; secure; HttpOnly]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-request-charge: ['1']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: '{"properties": {"roleDefinitionId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635",
|
||||
"principalId": "81ce4115-7e5a-4d76-85c0-7f2afb79ff27"}}'
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams account sp create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['233']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.23 azure-mgmt-authorization/0.40.0 Azure-SDK-For-Python
|
||||
AZURECLI/2.0.30]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/212354d3-2367-4c1f-ac46-78f872cd5833?api-version=2018-01-01-preview
|
||||
response:
|
||||
body: {string: '{"error":{"code":"PrincipalNotFound","message":"Principal 81ce41157e5a4d7685c07f2afb79ff27
|
||||
does not exist in the directory 479473dc-cfef-474c-ba12-cba2854af0f6."}}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['163']
|
||||
content-type: [application/json; charset=utf-8]
|
||||
date: ['Wed, 21 Mar 2018 19:44:32 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/10.0]
|
||||
set-cookie: [x-ms-gateway-slice=productionb; path=/; secure; HttpOnly]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1193']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 400, message: Bad Request}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams account sp create]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.23 azure-mgmt-authorization/0.40.0 Azure-SDK-For-Python
|
||||
AZURECLI/2.0.30]
|
||||
accept-language: [en-US]
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions?$filter=roleName%20eq%20%27Owner%27&api-version=2018-01-01-preview
|
||||
response:
|
||||
body: {string: '{"value":[{"properties":{"roleName":"Owner","type":"BuiltInRole","description":"Lets
|
||||
you manage everything, including access to resources.","assignableScopes":["/"],"permissions":[{"actions":["*"],"notActions":[],"dataActions":[],"notDataActions":[]}],"createdOn":"0001-01-01T08:00:00.0000000Z","updatedOn":"2016-05-31T23:14:00.9179619Z","createdBy":null,"updatedBy":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635","type":"Microsoft.Authorization/roleDefinitions","name":"8e3af657-a8ff-443c-a75c-2fe8c4bcb635"}]}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['616']
|
||||
content-type: [application/json; charset=utf-8]
|
||||
date: ['Wed, 21 Mar 2018 19:44:42 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/10.0]
|
||||
set-cookie: [x-ms-gateway-slice=productionb; path=/; secure; HttpOnly]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-request-charge: ['1']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: '{"properties": {"roleDefinitionId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635",
|
||||
"principalId": "81ce4115-7e5a-4d76-85c0-7f2afb79ff27"}}'
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams account sp create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['233']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.23 azure-mgmt-authorization/0.40.0 Azure-SDK-For-Python
|
||||
AZURECLI/2.0.30]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/2f328bfd-9d64-4220-ad34-f873f48833ab?api-version=2018-01-01-preview
|
||||
response:
|
||||
body: {string: '{"error":{"code":"PrincipalNotFound","message":"Principal 81ce41157e5a4d7685c07f2afb79ff27
|
||||
does not exist in the directory 479473dc-cfef-474c-ba12-cba2854af0f6."}}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['163']
|
||||
content-type: [application/json; charset=utf-8]
|
||||
date: ['Wed, 21 Mar 2018 19:44:45 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/10.0]
|
||||
set-cookie: [x-ms-gateway-slice=productionb; path=/; secure; HttpOnly]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1196']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 400, message: Bad Request}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams account sp create]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.23 azure-mgmt-authorization/0.40.0 Azure-SDK-For-Python
|
||||
AZURECLI/2.0.30]
|
||||
accept-language: [en-US]
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions?$filter=roleName%20eq%20%27Owner%27&api-version=2018-01-01-preview
|
||||
response:
|
||||
body: {string: '{"value":[{"properties":{"roleName":"Owner","type":"BuiltInRole","description":"Lets
|
||||
you manage everything, including access to resources.","assignableScopes":["/"],"permissions":[{"actions":["*"],"notActions":[],"dataActions":[],"notDataActions":[]}],"createdOn":"0001-01-01T08:00:00.0000000Z","updatedOn":"2016-05-31T23:14:00.9179619Z","createdBy":null,"updatedBy":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635","type":"Microsoft.Authorization/roleDefinitions","name":"8e3af657-a8ff-443c-a75c-2fe8c4bcb635"}]}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['616']
|
||||
content-type: [application/json; charset=utf-8]
|
||||
date: ['Wed, 21 Mar 2018 19:44:56 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/10.0]
|
||||
set-cookie: [x-ms-gateway-slice=productionb; path=/; secure; HttpOnly]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-request-charge: ['1']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: '{"properties": {"roleDefinitionId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635",
|
||||
"principalId": "81ce4115-7e5a-4d76-85c0-7f2afb79ff27"}}'
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams account sp create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['233']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.23 azure-mgmt-authorization/0.40.0 Azure-SDK-For-Python
|
||||
AZURECLI/2.0.30]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/b0955f5d-0c04-44af-bd3c-e705d87177c8?api-version=2018-01-01-preview
|
||||
response:
|
||||
body: {string: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635","principalId":"81ce4115-7e5a-4d76-85c0-7f2afb79ff27","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","createdOn":"2018-03-21T19:45:05.0825864Z","updatedOn":"2018-03-21T19:45:05.0825864Z","createdBy":null,"updatedBy":"9c251169-a6e5-46a1-a3dd-a488a71bfb3a"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/b0955f5d-0c04-44af-bd3c-e705d87177c8","type":"Microsoft.Authorization/roleAssignments","name":"b0955f5d-0c04-44af-bd3c-e705d87177c8"}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['721']
|
||||
content-type: [application/json; charset=utf-8]
|
||||
date: ['Wed, 21 Mar 2018 19:45:06 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/10.0]
|
||||
set-cookie: [x-ms-gateway-slice=productionb; path=/; secure; HttpOnly]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1199']
|
||||
x-ms-request-charge: ['3']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 201, message: Created}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [group delete]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['0']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.23 resourcemanagementclient/1.2.1 Azure-SDK-For-Python
|
||||
AZURECLI/2.0.30]
|
||||
accept-language: [en-US]
|
||||
method: DELETE
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2017-05-10
|
||||
response:
|
||||
body: {string: ''}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['0']
|
||||
date: ['Wed, 21 Mar 2018 19:45:08 GMT']
|
||||
expires: ['-1']
|
||||
location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdWSElTVkEzVFNNVFoySTJLWFZUV1FKRk1JQlVVSE9JSEs0N3wzNUUzQTVFOTc3RTlFMUNELVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10']
|
||||
pragma: [no-cache]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1197']
|
||||
status: {code: 202, message: Accepted}
|
||||
version: 1
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,420 @@
|
|||
interactions:
|
||||
- request:
|
||||
body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation",
|
||||
"date": "2018-04-18T18:18:32Z"}}'
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [group create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['110']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 resourcemanagementclient/1.2.1 Azure-SDK-For-Python
|
||||
AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2017-05-10
|
||||
response:
|
||||
body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-04-18T18:18:32Z"},"properties":{"provisioningState":"Succeeded"}}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['384']
|
||||
content-type: [application/json; charset=utf-8]
|
||||
date: ['Wed, 18 Apr 2018 18:18:35 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1185']
|
||||
status: {code: 201, message: Created}
|
||||
- request:
|
||||
body: '{"sku": {"name": "Standard_LRS"}, "kind": "Storage", "location": "westus",
|
||||
"properties": {"supportsHttpsTrafficOnly": false}}'
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [storage account create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['125']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-storage/1.5.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002?api-version=2017-10-01
|
||||
response:
|
||||
body: {string: ''}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['0']
|
||||
content-type: [text/plain; charset=utf-8]
|
||||
date: ['Wed, 18 Apr 2018 18:18:38 GMT']
|
||||
expires: ['-1']
|
||||
location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/4cac4776-f568-4c1e-b354-8f4e04dbd71a?monitor=true&api-version=2017-10-01']
|
||||
pragma: [no-cache]
|
||||
server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
|
||||
Microsoft-HTTPAPI/2.0']
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1182']
|
||||
status: {code: 202, message: Accepted}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [storage account create]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-storage/1.5.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/4cac4776-f568-4c1e-b354-8f4e04dbd71a?monitor=true&api-version=2017-10-01
|
||||
response:
|
||||
body: {string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002","name":"clitest000002","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["479473dc-cfef-474c-ba12-cba2854af0f6"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-04-18T18:18:38.9953802Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-04-18T18:18:38.9953802Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-04-18T18:18:38.7297275Z","primaryEndpoints":{"blob":"https://clitest000002.blob.core.windows.net/","queue":"https://clitest000002.queue.core.windows.net/","table":"https://clitest000002.table.core.windows.net/","file":"https://clitest000002.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['1231']
|
||||
content-type: [application/json]
|
||||
date: ['Wed, 18 Apr 2018 18:18:56 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
|
||||
Microsoft-HTTPAPI/2.0']
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [storage account keys list]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['0']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-storage/1.5.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: POST
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002/listKeys?api-version=2017-10-01
|
||||
response:
|
||||
body: {string: '{"keys":[{"keyName":"key1","value":"L2vXsObbY6N6kLCCSSeADOM0UbB7GQHSX0FVeergyffguuZEbY9JvEFFX82ESydDqxKp5UdPyK1KMIw+1KeBZA==","permissions":"FULL"},{"keyName":"key2","value":"GiKF3h3Q/wyGD9o7NImtV/DaBPn0LFNHQq+LB1LI4jiBtYeIEuYB3no5YL65PfDB/yWT7ZtjnlRLO+t4DbdMwg==","permissions":"FULL"}]}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['288']
|
||||
content-type: [application/json]
|
||||
date: ['Wed, 18 Apr 2018 18:18:58 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
|
||||
Microsoft-HTTPAPI/2.0']
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1181']
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: '{"sku": {"name": "Standard_LRS"}, "kind": "Storage", "location": "westus",
|
||||
"properties": {"supportsHttpsTrafficOnly": false}}'
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [storage account create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['125']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-storage/1.5.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000003?api-version=2017-10-01
|
||||
response:
|
||||
body: {string: ''}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['0']
|
||||
content-type: [text/plain; charset=utf-8]
|
||||
date: ['Wed, 18 Apr 2018 18:19:00 GMT']
|
||||
expires: ['-1']
|
||||
location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/e20768b8-dc9e-42c5-a33f-98c55bcfcb05?monitor=true&api-version=2017-10-01']
|
||||
pragma: [no-cache]
|
||||
server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
|
||||
Microsoft-HTTPAPI/2.0']
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1180']
|
||||
status: {code: 202, message: Accepted}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [storage account create]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-storage/1.5.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/e20768b8-dc9e-42c5-a33f-98c55bcfcb05?monitor=true&api-version=2017-10-01
|
||||
response:
|
||||
body: {string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000003","name":"clitest000003","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["479473dc-cfef-474c-ba12-cba2854af0f6"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-04-18T18:19:00.6047567Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-04-18T18:19:00.6047567Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-04-18T18:19:00.4172275Z","primaryEndpoints":{"blob":"https://clitest000003.blob.core.windows.net/","queue":"https://clitest000003.queue.core.windows.net/","table":"https://clitest000003.table.core.windows.net/","file":"https://clitest000003.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['1231']
|
||||
content-type: [application/json]
|
||||
date: ['Wed, 18 Apr 2018 18:19:17 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
|
||||
Microsoft-HTTPAPI/2.0']
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [storage account keys list]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['0']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-storage/1.5.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: POST
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000003/listKeys?api-version=2017-10-01
|
||||
response:
|
||||
body: {string: '{"keys":[{"keyName":"key1","value":"QRsu0uEuCR6Y4NXEoSyREPC2hsPk68du/V+nKbhE53JFLTnDhpBV6ODV3zElGagnkKqBEG+wjOZ8Zdel5jUX7A==","permissions":"FULL"},{"keyName":"key2","value":"EuwzqW7v+qczbPfiWIxQlokuTyzK79id4+NHqwnRWKIu3haT7PEtnefDk962mrWDQmoFECwmWdpDDiMaJRoPqw==","permissions":"FULL"}]}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['288']
|
||||
content-type: [application/json]
|
||||
date: ['Wed, 18 Apr 2018 18:19:18 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
|
||||
Microsoft-HTTPAPI/2.0']
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1189']
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: 'b''b\''{"location": "westus2", "properties": {"storageAccounts": [{"id":
|
||||
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002",
|
||||
"type": "Primary"}]}}\'''''
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams account create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['302']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000004?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"name\":\"ams000004\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000004\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices\",\"location\":\"West US 2\",\"\
|
||||
tags\":null,\"properties\":{\r\n \"mediaServiceId\":\"0713e6fb-6d5d-44fe-acd9-f0686ccda73e\"\
|
||||
,\"storageAccounts\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002\"\
|
||||
,\"type\":\"Primary\"\r\n }\r\n ]\r\n }\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['677']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:19:25 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1195']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 201, message: Created}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams account storage add]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000004?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"name\":\"ams000004\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000004\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices\",\"location\":\"West US 2\",\"\
|
||||
tags\":null,\"properties\":{\r\n \"mediaServiceId\":\"0713e6fb-6d5d-44fe-acd9-f0686ccda73e\"\
|
||||
,\"storageAccounts\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002\"\
|
||||
,\"type\":\"Primary\"\r\n }\r\n ]\r\n }\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['677']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:19:27 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: 'b''b\''b\\\''{"location": "West US 2", "properties": {"storageAccounts":
|
||||
[{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002",
|
||||
"type": "Primary"}, {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000003",
|
||||
"type": "Secondary"}]}}\\\''\'''''
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams account storage add]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['548']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000004?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"name\":\"ams000004\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000004\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices\",\"location\":\"West US 2\",\"\
|
||||
tags\":null,\"properties\":{\r\n \"mediaServiceId\":\"0713e6fb-6d5d-44fe-acd9-f0686ccda73e\"\
|
||||
,\"storageAccounts\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002\"\
|
||||
,\"type\":\"Primary\"\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000003\"\
|
||||
,\"type\":\"Secondary\"\r\n }\r\n ]\r\n }\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['935']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:19:30 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1184']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 201, message: Created}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams account storage remove]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000004?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"name\":\"ams000004\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000004\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices\",\"location\":\"West US 2\",\"\
|
||||
tags\":null,\"properties\":{\r\n \"mediaServiceId\":\"0713e6fb-6d5d-44fe-acd9-f0686ccda73e\"\
|
||||
,\"storageAccounts\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002\"\
|
||||
,\"type\":\"Primary\"\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000003\"\
|
||||
,\"type\":\"Secondary\"\r\n }\r\n ]\r\n }\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['935']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:19:32 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: 'b''b\''{"location": "West US 2", "properties": {"storageAccounts": [{"id":
|
||||
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002",
|
||||
"type": "Primary"}]}}\'''''
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams account storage remove]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['304']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000004?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"name\":\"ams000004\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000004\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices\",\"location\":\"West US 2\",\"\
|
||||
tags\":null,\"properties\":{\r\n \"mediaServiceId\":\"0713e6fb-6d5d-44fe-acd9-f0686ccda73e\"\
|
||||
,\"storageAccounts\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002\"\
|
||||
,\"type\":\"Primary\"\r\n }\r\n ]\r\n }\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['677']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:19:36 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1184']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 201, message: Created}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [group delete]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['0']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 resourcemanagementclient/1.2.1 Azure-SDK-For-Python
|
||||
AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: DELETE
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2017-05-10
|
||||
response:
|
||||
body: {string: ''}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['0']
|
||||
date: ['Wed, 18 Apr 2018 18:19:38 GMT']
|
||||
expires: ['-1']
|
||||
location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdNSzJNU1JKUjRORTQ2SlpMU1hVQU1aRldOV1pFSlYyWlQ1Q3w3MkZCQjI2RTQwM0E1ODAwLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10']
|
||||
pragma: [no-cache]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1179']
|
||||
status: {code: 202, message: Accepted}
|
||||
version: 1
|
|
@ -0,0 +1,227 @@
|
|||
interactions:
|
||||
- request:
|
||||
body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation",
|
||||
"date": "2018-04-18T18:19:39Z"}}'
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [group create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['110']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 resourcemanagementclient/1.2.1 Azure-SDK-For-Python
|
||||
AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2017-05-10
|
||||
response:
|
||||
body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-04-18T18:19:39Z"},"properties":{"provisioningState":"Succeeded"}}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['384']
|
||||
content-type: [application/json; charset=utf-8]
|
||||
date: ['Wed, 18 Apr 2018 18:19:40 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1178']
|
||||
status: {code: 201, message: Created}
|
||||
- request:
|
||||
body: '{"sku": {"name": "Standard_LRS"}, "kind": "Storage", "location": "westus",
|
||||
"properties": {"supportsHttpsTrafficOnly": false}}'
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [storage account create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['125']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-storage/1.5.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002?api-version=2017-10-01
|
||||
response:
|
||||
body: {string: ''}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['0']
|
||||
content-type: [text/plain; charset=utf-8]
|
||||
date: ['Wed, 18 Apr 2018 18:19:44 GMT']
|
||||
expires: ['-1']
|
||||
location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/80570742-0f87-4bd7-9826-89954e0d6316?monitor=true&api-version=2017-10-01']
|
||||
pragma: [no-cache]
|
||||
server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
|
||||
Microsoft-HTTPAPI/2.0']
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1183']
|
||||
status: {code: 202, message: Accepted}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [storage account create]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-storage/1.5.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/80570742-0f87-4bd7-9826-89954e0d6316?monitor=true&api-version=2017-10-01
|
||||
response:
|
||||
body: {string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002","name":"clitest000002","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["479473dc-cfef-474c-ba12-cba2854af0f6"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-04-18T18:19:44.7736446Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-04-18T18:19:44.7736446Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-04-18T18:19:44.6954697Z","primaryEndpoints":{"blob":"https://clitest000002.blob.core.windows.net/","queue":"https://clitest000002.queue.core.windows.net/","table":"https://clitest000002.table.core.windows.net/","file":"https://clitest000002.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['1231']
|
||||
content-type: [application/json]
|
||||
date: ['Wed, 18 Apr 2018 18:20:02 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
|
||||
Microsoft-HTTPAPI/2.0']
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [storage account keys list]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['0']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-storage/1.5.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: POST
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002/listKeys?api-version=2017-10-01
|
||||
response:
|
||||
body: {string: '{"keys":[{"keyName":"key1","value":"MYy/dtWBJ9MX8gvrhZ8+5AAKwPrrLSGv6n9MiTIflxZSR7wSXGIuX9oWGVu3YQGf+ffz8evgQt8AVailyQBXUg==","permissions":"FULL"},{"keyName":"key2","value":"Gq7gQoBO3RDfcZS6caeu3czSIEUuKMv+2hVm3FgZacIB1TtkfJUFKwmwVFxjc36WAMwH+2ddxAL8GgB+Y/4cQQ==","permissions":"FULL"}]}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['288']
|
||||
content-type: [application/json]
|
||||
date: ['Wed, 18 Apr 2018 18:20:03 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
|
||||
Microsoft-HTTPAPI/2.0']
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1181']
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: 'b''b\''{"location": "westus2", "properties": {"storageAccounts": [{"id":
|
||||
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002",
|
||||
"type": "Primary"}]}}\'''''
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams account create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['302']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"name\":\"ams000003\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices\",\"location\":\"West US 2\",\"\
|
||||
tags\":null,\"properties\":{\r\n \"mediaServiceId\":\"0416af9c-da26-4ae2-bb47-7380a507e60d\"\
|
||||
,\"storageAccounts\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002\"\
|
||||
,\"type\":\"Primary\"\r\n }\r\n ]\r\n }\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['677']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:20:09 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1180']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 201, message: Created}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams streaming endpoint list]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003/streamingEndpoints?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"value\":[\r\n {\r\n \"name\":\"default\",\"id\"\
|
||||
:\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003/streamingendpoints/default\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices/streamingEndpoints\",\"location\"\
|
||||
:\"West US 2\",\"tags\":{\r\n \r\n },\"properties\":{\r\n \
|
||||
\ \"description\":\"\",\"scaleUnits\":0,\"availabilitySetName\":null,\"\
|
||||
cdnEnabled\":true,\"cdnProvider\":\"StandardVerizon\",\"cdnProfile\":\"AzureMediaStreamingPlatformCdnProfile-StandardVerizon\"\
|
||||
,\"customHostNames\":[\r\n \r\n ],\"accessControl\":null,\"\
|
||||
maxCacheAge\":null,\"crossSiteAccessPolicies\":null,\"hostName\":\"ams000003-usw22.streaming.media.azure.net\"\
|
||||
,\"freeTrialEndTime\":\"0001-01-01T00:00:00Z\",\"provisioningState\":\"InProgress\"\
|
||||
,\"resourceState\":\"Starting\",\"created\":\"2018-04-18T18:20:09.8751084Z\"\
|
||||
,\"lastModified\":\"2018-04-18T18:20:09.8751084Z\"\r\n }\r\n }\r\n\
|
||||
\ ]\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['971']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:20:11 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [group delete]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['0']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 resourcemanagementclient/1.2.1 Azure-SDK-For-Python
|
||||
AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: DELETE
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2017-05-10
|
||||
response:
|
||||
body: {string: ''}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['0']
|
||||
date: ['Wed, 18 Apr 2018 18:20:15 GMT']
|
||||
expires: ['-1']
|
||||
location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdKQ05WUFNQTjdKVVM0MjJZMlA1SlU2QVBWVkQzNjZJUFNIUXxBRTM3NTk3MzVERUZDRDgzLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10']
|
||||
pragma: [no-cache]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1183']
|
||||
status: {code: 202, message: Accepted}
|
||||
version: 1
|
|
@ -0,0 +1,429 @@
|
|||
interactions:
|
||||
- request:
|
||||
body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation",
|
||||
"date": "2018-04-18T18:20:15Z"}}'
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [group create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['110']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 resourcemanagementclient/1.2.1 Azure-SDK-For-Python
|
||||
AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2017-05-10
|
||||
response:
|
||||
body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-04-18T18:20:15Z"},"properties":{"provisioningState":"Succeeded"}}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['384']
|
||||
content-type: [application/json; charset=utf-8]
|
||||
date: ['Wed, 18 Apr 2018 18:20:19 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1180']
|
||||
status: {code: 201, message: Created}
|
||||
- request:
|
||||
body: '{"sku": {"name": "Standard_LRS"}, "kind": "Storage", "location": "westus",
|
||||
"properties": {"supportsHttpsTrafficOnly": false}}'
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [storage account create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['125']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-storage/1.5.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002?api-version=2017-10-01
|
||||
response:
|
||||
body: {string: ''}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['0']
|
||||
content-type: [text/plain; charset=utf-8]
|
||||
date: ['Wed, 18 Apr 2018 18:20:21 GMT']
|
||||
expires: ['-1']
|
||||
location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/095f13f0-ff93-43ea-9f52-27cbd886370d?monitor=true&api-version=2017-10-01']
|
||||
pragma: [no-cache]
|
||||
server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
|
||||
Microsoft-HTTPAPI/2.0']
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1179']
|
||||
status: {code: 202, message: Accepted}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [storage account create]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-storage/1.5.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/095f13f0-ff93-43ea-9f52-27cbd886370d?monitor=true&api-version=2017-10-01
|
||||
response:
|
||||
body: {string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002","name":"clitest000002","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["479473dc-cfef-474c-ba12-cba2854af0f6"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-04-18T18:20:21.9172380Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-04-18T18:20:21.9172380Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-04-18T18:20:21.8390997Z","primaryEndpoints":{"blob":"https://clitest000002.blob.core.windows.net/","queue":"https://clitest000002.queue.core.windows.net/","table":"https://clitest000002.table.core.windows.net/","file":"https://clitest000002.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['1231']
|
||||
content-type: [application/json]
|
||||
date: ['Wed, 18 Apr 2018 18:20:39 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
|
||||
Microsoft-HTTPAPI/2.0']
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [storage account keys list]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['0']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-storage/1.5.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: POST
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002/listKeys?api-version=2017-10-01
|
||||
response:
|
||||
body: {string: '{"keys":[{"keyName":"key1","value":"yd9OidxCQfzQwzFrkEljbe78ggkJU3kndbQO7DlDwdCYxogeyZ2/Epi4IqrjF2ZnMOZn5f7vdRj1BXNS8LTd6A==","permissions":"FULL"},{"keyName":"key2","value":"O2W0kj731Hc0k8oiMxpBnzAKJuwIGhkwWWndRoy8a9JAnovg42gflcsOepoPXxAxl6RIr3GB+zLuF5QaBrARWw==","permissions":"FULL"}]}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['288']
|
||||
content-type: [application/json]
|
||||
date: ['Wed, 18 Apr 2018 18:20:40 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
|
||||
Microsoft-HTTPAPI/2.0']
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1178']
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: 'b''b\''{"location": "westus2", "properties": {"storageAccounts": [{"id":
|
||||
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002",
|
||||
"type": "Primary"}]}}\'''''
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams account create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['302']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"name\":\"ams000003\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices\",\"location\":\"West US 2\",\"\
|
||||
tags\":null,\"properties\":{\r\n \"mediaServiceId\":\"fb51714d-6141-4541-ad3b-f71076b1dfc3\"\
|
||||
,\"storageAccounts\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002\"\
|
||||
,\"type\":\"Primary\"\r\n }\r\n ]\r\n }\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['677']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:20:46 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1194']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 201, message: Created}
|
||||
- request:
|
||||
body: '{}'
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams asset create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['2']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaServices/ams000003/assets/asset000004?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"name\":\"asset000004\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003/assets/asset000004\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices/assets\",\"properties\":{\r\n \
|
||||
\ \"assetId\":\"16e9f7d8-b913-4377-a89a-bd3c8b22b015\",\"created\":\"2018-04-18T18:20:49.22Z\"\
|
||||
,\"lastModified\":\"2018-04-18T18:20:49.22Z\",\"alternateId\":null,\"description\"\
|
||||
:null,\"container\":null,\"storageAccountId\":null,\"storageEncryptionFormat\"\
|
||||
:\"None\",\"storageEncryptionKey\":null\r\n }\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['589']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:20:48 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/10.0]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1188']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 201, message: Created}
|
||||
- request:
|
||||
body: '{"properties": {"noEncryption": {"enabledProtocols": {"download": true,
|
||||
"dash": false, "hls": false, "smoothStreaming": false}}}}'
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams streaming policy create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['129']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaServices/ams000003/streamingPolicies/spn000005?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"name\":\"spn000005\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003/streamingPolicies/spn000005\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices/streamingPolicies\",\"properties\"\
|
||||
:{\r\n \"created\":\"2018-04-18T18:20:51.6960884Z\",\"defaultContentKeyPolicyName\"\
|
||||
:null,\"envelopeEncryption\":null,\"commonEncryptionCenc\":null,\"commonEncryptionCbcs\"\
|
||||
:null,\"noEncryption\":{\r\n \"enabledProtocols\":{\r\n \"download\"\
|
||||
:true,\"dash\":false,\"hls\":false,\"smoothStreaming\":false\r\n }\r\n\
|
||||
\ }\r\n }\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['634']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:20:51 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/10.0]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1182']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 201, message: Created}
|
||||
- request:
|
||||
body: 'b''b\''{"properties": {"assetName": "asset000004", "startTime": "2018-03-29T10:00:00.000Z",
|
||||
"endTime": "2018-03-29T12:00:00.000Z", "streamingPolicyName": "spn000005"}}\'''''
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams streaming locator create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['162']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaServices/ams000003/streamingLocators/sln000006?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"name\":\"sln000006\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003/streamingLocators/sln000006\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices/streamingLocators\",\"properties\"\
|
||||
:{\r\n \"assetName\":\"asset000004\",\"created\":\"2018-04-18T18:20:54.1053465Z\"\
|
||||
,\"startTime\":\"2018-03-29T10:00:00Z\",\"endTime\":\"2018-03-29T12:00:00Z\"\
|
||||
,\"streamingLocatorId\":\"96dcbfb8-17e7-4b4e-a169-8bbf9fb04656\",\"streamingPolicyName\"\
|
||||
:\"spn000005\",\"defaultContentKeyPolicyName\":null,\"contentKeys\":[\r\n\
|
||||
\ \r\n ]\r\n }\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['638']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:20:54 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/10.0]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1177']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 201, message: Created}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams streaming locator show]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaServices/ams000003/streamingLocators/sln000006?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"name\":\"sln000006\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003/streamingLocators/sln000006\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices/streamingLocators\",\"properties\"\
|
||||
:{\r\n \"assetName\":\"asset000004\",\"created\":\"2018-04-18T18:20:54.107Z\"\
|
||||
,\"startTime\":\"2018-03-29T10:00:00Z\",\"endTime\":\"2018-03-29T12:00:00Z\"\
|
||||
,\"streamingLocatorId\":\"96dcbfb8-17e7-4b4e-a169-8bbf9fb04656\",\"streamingPolicyName\"\
|
||||
:\"spn000005\",\"defaultContentKeyPolicyName\":null,\"contentKeys\":[\r\n\
|
||||
\ \r\n ]\r\n }\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['634']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:20:56 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/10.0]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: ['Accept-Encoding,Accept-Encoding']
|
||||
x-content-type-options: [nosniff]
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams streaming locator list]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaServices/ams000003/streamingLocators?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"value\":[\r\n {\r\n \"name\":\"sln000006\",\"\
|
||||
id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003/streamingLocators/sln000006\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices/streamingLocators\",\"properties\"\
|
||||
:{\r\n \"assetName\":\"asset000004\",\"created\":\"2018-04-18T18:20:54.107Z\"\
|
||||
,\"startTime\":\"2018-03-29T10:00:00Z\",\"endTime\":\"2018-03-29T12:00:00Z\"\
|
||||
,\"streamingLocatorId\":\"96dcbfb8-17e7-4b4e-a169-8bbf9fb04656\",\"streamingPolicyName\"\
|
||||
:\"spn000005\",\"defaultContentKeyPolicyName\":null,\"contentKeys\":[\r\n\
|
||||
\ \r\n ]\r\n }\r\n }\r\n ]\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['686']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:20:58 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/10.0]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: ['Accept-Encoding,Accept-Encoding']
|
||||
x-content-type-options: [nosniff]
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams streaming locator get-paths]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['0']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: POST
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaServices/ams000003/streamingLocators/sln000006/listPaths?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"streamingPaths\":[\r\n \r\n ],\"downloadPaths\":[\r\
|
||||
\n \r\n ]\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['66']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:21:00 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/10.0]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: ['Accept-Encoding,Accept-Encoding']
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1182']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams streaming locator delete]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['0']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: DELETE
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaServices/ams000003/streamingLocators/sln000006?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: ''}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['0']
|
||||
date: ['Wed, 18 Apr 2018 18:21:02 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/10.0]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1177']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [group delete]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['0']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 resourcemanagementclient/1.2.1 Azure-SDK-For-Python
|
||||
AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: DELETE
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2017-05-10
|
||||
response:
|
||||
body: {string: ''}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['0']
|
||||
date: ['Wed, 18 Apr 2018 18:21:06 GMT']
|
||||
expires: ['-1']
|
||||
location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdJWlJFMjZWVkMzQ1JDSDRBSlIzR0NaT1BLSFpNSkJDU0pZM3xFMTgxQkJCM0MwNTdFQTExLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10']
|
||||
pragma: [no-cache]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1193']
|
||||
status: {code: 202, message: Accepted}
|
||||
version: 1
|
|
@ -0,0 +1,402 @@
|
|||
interactions:
|
||||
- request:
|
||||
body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation",
|
||||
"date": "2018-04-18T18:21:06Z"}}'
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [group create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['110']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 resourcemanagementclient/1.2.1 Azure-SDK-For-Python
|
||||
AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2017-05-10
|
||||
response:
|
||||
body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-04-18T18:21:06Z"},"properties":{"provisioningState":"Succeeded"}}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['384']
|
||||
content-type: [application/json; charset=utf-8]
|
||||
date: ['Wed, 18 Apr 2018 18:21:08 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1179']
|
||||
status: {code: 201, message: Created}
|
||||
- request:
|
||||
body: '{"sku": {"name": "Standard_LRS"}, "kind": "Storage", "location": "westus",
|
||||
"properties": {"supportsHttpsTrafficOnly": false}}'
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [storage account create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['125']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-storage/1.5.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002?api-version=2017-10-01
|
||||
response:
|
||||
body: {string: ''}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['0']
|
||||
content-type: [text/plain; charset=utf-8]
|
||||
date: ['Wed, 18 Apr 2018 18:21:10 GMT']
|
||||
expires: ['-1']
|
||||
location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/8e685c7e-4f82-4741-ba27-f3d928795241?monitor=true&api-version=2017-10-01']
|
||||
pragma: [no-cache]
|
||||
server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
|
||||
Microsoft-HTTPAPI/2.0']
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1193']
|
||||
status: {code: 202, message: Accepted}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [storage account create]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-storage/1.5.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/8e685c7e-4f82-4741-ba27-f3d928795241?monitor=true&api-version=2017-10-01
|
||||
response:
|
||||
body: {string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002","name":"clitest000002","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["479473dc-cfef-474c-ba12-cba2854af0f6"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-04-18T18:21:10.7657454Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-04-18T18:21:10.7657454Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-04-18T18:21:10.6876532Z","primaryEndpoints":{"blob":"https://clitest000002.blob.core.windows.net/","queue":"https://clitest000002.queue.core.windows.net/","table":"https://clitest000002.table.core.windows.net/","file":"https://clitest000002.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['1231']
|
||||
content-type: [application/json]
|
||||
date: ['Wed, 18 Apr 2018 18:21:28 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
|
||||
Microsoft-HTTPAPI/2.0']
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [storage account keys list]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['0']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-storage/1.5.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: POST
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002/listKeys?api-version=2017-10-01
|
||||
response:
|
||||
body: {string: '{"keys":[{"keyName":"key1","value":"KTss9rFLRl3gHX5plXk7D23LAbzlZ3mkVAUTG8JZCu/n/thve2C4ROvguOXS1YEFjTXrSp3h7TAdPSaruJuRCA==","permissions":"FULL"},{"keyName":"key2","value":"KdtiFyTsaBFawr5fmE4QMm3kHNAGDYtwvo9Lhx7lU7Gt3xmegXi6diQXsHlmKqYZd9o6VqF4yZR19FUTSZyuKQ==","permissions":"FULL"}]}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['288']
|
||||
content-type: [application/json]
|
||||
date: ['Wed, 18 Apr 2018 18:21:29 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
|
||||
Microsoft-HTTPAPI/2.0']
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1176']
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: 'b''b\''{"location": "westus2", "properties": {"storageAccounts": [{"id":
|
||||
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002",
|
||||
"type": "Primary"}]}}\'''''
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams account create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['302']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"name\":\"ams000003\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices\",\"location\":\"West US 2\",\"\
|
||||
tags\":null,\"properties\":{\r\n \"mediaServiceId\":\"7e9058cd-5127-4d6b-828b-68fb7fca6d47\"\
|
||||
,\"storageAccounts\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002\"\
|
||||
,\"type\":\"Primary\"\r\n }\r\n ]\r\n }\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['677']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:21:35 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1181']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 201, message: Created}
|
||||
- request:
|
||||
body: '{"properties": {"noEncryption": {"enabledProtocols": {"download": true,
|
||||
"dash": false, "hls": false, "smoothStreaming": false}}}}'
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams streaming policy create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['129']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaServices/ams000003/streamingPolicies/spn000004?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"name\":\"spn000004\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003/streamingPolicies/spn000004\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices/streamingPolicies\",\"properties\"\
|
||||
:{\r\n \"created\":\"2018-04-18T18:21:36.7811532Z\",\"defaultContentKeyPolicyName\"\
|
||||
:null,\"envelopeEncryption\":null,\"commonEncryptionCenc\":null,\"commonEncryptionCbcs\"\
|
||||
:null,\"noEncryption\":{\r\n \"enabledProtocols\":{\r\n \"download\"\
|
||||
:true,\"dash\":false,\"hls\":false,\"smoothStreaming\":false\r\n }\r\n\
|
||||
\ }\r\n }\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['634']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:21:36 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/10.0]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1180']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 201, message: Created}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams streaming policy show]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaServices/ams000003/streamingPolicies/spn000004?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"name\":\"spn000004\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003/streamingPolicies/spn000004\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices/streamingPolicies\",\"properties\"\
|
||||
:{\r\n \"created\":\"2018-04-18T18:21:36.7811532Z\",\"defaultContentKeyPolicyName\"\
|
||||
:null,\"envelopeEncryption\":null,\"commonEncryptionCenc\":null,\"commonEncryptionCbcs\"\
|
||||
:null,\"noEncryption\":{\r\n \"enabledProtocols\":{\r\n \"download\"\
|
||||
:true,\"dash\":false,\"hls\":false,\"smoothStreaming\":false\r\n }\r\n\
|
||||
\ }\r\n }\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['634']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:21:38 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/10.0]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: ['Accept-Encoding,Accept-Encoding']
|
||||
x-content-type-options: [nosniff]
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams streaming policy list]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaServices/ams000003/streamingPolicies?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"value\":[\r\n {\r\n \"name\":\"Predefined_ClearKey\"\
|
||||
,\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003/streamingPolicies/Predefined_ClearKey\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices/streamingPolicies\",\"properties\"\
|
||||
:{\r\n \"created\":\"2018-03-19T06:06:06Z\",\"defaultContentKeyPolicyName\"\
|
||||
:null,\"envelopeEncryption\":{\r\n \"enabledProtocols\":{\r\n \
|
||||
\ \"download\":false,\"dash\":true,\"hls\":true,\"smoothStreaming\"\
|
||||
:true\r\n },\"clearTracks\":[\r\n \r\n ],\"contentKeys\"\
|
||||
:{\r\n \"defaultKey\":{\r\n \"label\":\"clearKeyDefault\"\
|
||||
,\"policyName\":null\r\n },\"keyToTrackMappings\":[\r\n \
|
||||
\ \r\n ]\r\n },\"customLicenseAcquisitionUrlTemplate\"\
|
||||
:null\r\n },\"commonEncryptionCenc\":null,\"commonEncryptionCbcs\"\
|
||||
:null,\"noEncryption\":null\r\n }\r\n },{\r\n \"name\":\"Predefined_ClearStreamingOnly\"\
|
||||
,\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003/streamingPolicies/Predefined_ClearStreamingOnly\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices/streamingPolicies\",\"properties\"\
|
||||
:{\r\n \"created\":\"2018-03-19T06:06:06Z\",\"defaultContentKeyPolicyName\"\
|
||||
:null,\"envelopeEncryption\":null,\"commonEncryptionCenc\":null,\"commonEncryptionCbcs\"\
|
||||
:null,\"noEncryption\":{\r\n \"enabledProtocols\":{\r\n \
|
||||
\ \"download\":false,\"dash\":true,\"hls\":true,\"smoothStreaming\":true\r\
|
||||
\n }\r\n }\r\n }\r\n },{\r\n \"name\":\"Predefined_DownloadAndClearStreaming\"\
|
||||
,\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003/streamingPolicies/Predefined_DownloadAndClearStreaming\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices/streamingPolicies\",\"properties\"\
|
||||
:{\r\n \"created\":\"2018-03-19T06:06:06Z\",\"defaultContentKeyPolicyName\"\
|
||||
:null,\"envelopeEncryption\":null,\"commonEncryptionCenc\":null,\"commonEncryptionCbcs\"\
|
||||
:null,\"noEncryption\":{\r\n \"enabledProtocols\":{\r\n \
|
||||
\ \"download\":true,\"dash\":true,\"hls\":true,\"smoothStreaming\":true\r\
|
||||
\n }\r\n }\r\n }\r\n },{\r\n \"name\":\"Predefined_DownloadOnly\"\
|
||||
,\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003/streamingPolicies/Predefined_DownloadOnly\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices/streamingPolicies\",\"properties\"\
|
||||
:{\r\n \"created\":\"2018-03-19T06:06:06Z\",\"defaultContentKeyPolicyName\"\
|
||||
:null,\"envelopeEncryption\":null,\"commonEncryptionCenc\":null,\"commonEncryptionCbcs\"\
|
||||
:null,\"noEncryption\":{\r\n \"enabledProtocols\":{\r\n \
|
||||
\ \"download\":true,\"dash\":false,\"hls\":false,\"smoothStreaming\":false\r\
|
||||
\n }\r\n }\r\n }\r\n },{\r\n \"name\":\"Predefined_SecureStreaming\"\
|
||||
,\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003/streamingPolicies/Predefined_SecureStreaming\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices/streamingPolicies\",\"properties\"\
|
||||
:{\r\n \"created\":\"2018-03-19T06:06:06Z\",\"defaultContentKeyPolicyName\"\
|
||||
:null,\"envelopeEncryption\":{\r\n \"enabledProtocols\":{\r\n \
|
||||
\ \"download\":false,\"dash\":true,\"hls\":true,\"smoothStreaming\"\
|
||||
:true\r\n },\"clearTracks\":[\r\n \r\n ],\"contentKeys\"\
|
||||
:{\r\n \"defaultKey\":{\r\n \"label\":\"clearKeyDefault\"\
|
||||
,\"policyName\":null\r\n },\"keyToTrackMappings\":[\r\n \
|
||||
\ \r\n ]\r\n },\"customLicenseAcquisitionUrlTemplate\"\
|
||||
:null\r\n },\"commonEncryptionCenc\":{\r\n \"enabledProtocols\"\
|
||||
:{\r\n \"download\":false,\"dash\":true,\"hls\":false,\"smoothStreaming\"\
|
||||
:true\r\n },\"clearTracks\":[\r\n \r\n ],\"contentKeys\"\
|
||||
:{\r\n \"defaultKey\":{\r\n \"label\":\"cencKeyDefault\"\
|
||||
,\"policyName\":null\r\n },\"keyToTrackMappings\":[\r\n \
|
||||
\ \r\n ]\r\n },\"drm\":{\r\n \"playReady\"\
|
||||
:{\r\n \"customLicenseAcquisitionUrlTemplate\":null,\"playReadyCustomAttributes\"\
|
||||
:null\r\n },\"widevine\":{\r\n \"customLicenseAcquisitionUrlTemplate\"\
|
||||
:null\r\n }\r\n }\r\n },\"commonEncryptionCbcs\"\
|
||||
:null,\"noEncryption\":null\r\n }\r\n },{\r\n \"name\":\"Predefined_SecureStreamingWithFairPlay\"\
|
||||
,\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003/streamingPolicies/Predefined_SecureStreamingWithFairPlay\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices/streamingPolicies\",\"properties\"\
|
||||
:{\r\n \"created\":\"2018-03-19T06:06:06Z\",\"defaultContentKeyPolicyName\"\
|
||||
:null,\"envelopeEncryption\":{\r\n \"enabledProtocols\":{\r\n \
|
||||
\ \"download\":false,\"dash\":true,\"hls\":true,\"smoothStreaming\"\
|
||||
:true\r\n },\"clearTracks\":[\r\n \r\n ],\"contentKeys\"\
|
||||
:{\r\n \"defaultKey\":{\r\n \"label\":\"clearKeyDefault\"\
|
||||
,\"policyName\":null\r\n },\"keyToTrackMappings\":[\r\n \
|
||||
\ \r\n ]\r\n },\"customLicenseAcquisitionUrlTemplate\"\
|
||||
:null\r\n },\"commonEncryptionCenc\":{\r\n \"enabledProtocols\"\
|
||||
:{\r\n \"download\":false,\"dash\":true,\"hls\":false,\"smoothStreaming\"\
|
||||
:true\r\n },\"clearTracks\":[\r\n \r\n ],\"contentKeys\"\
|
||||
:{\r\n \"defaultKey\":{\r\n \"label\":\"cencKeyDefault\"\
|
||||
,\"policyName\":null\r\n },\"keyToTrackMappings\":[\r\n \
|
||||
\ \r\n ]\r\n },\"drm\":{\r\n \"playReady\"\
|
||||
:{\r\n \"customLicenseAcquisitionUrlTemplate\":null,\"playReadyCustomAttributes\"\
|
||||
:null\r\n },\"widevine\":{\r\n \"customLicenseAcquisitionUrlTemplate\"\
|
||||
:null\r\n }\r\n }\r\n },\"commonEncryptionCbcs\"\
|
||||
:{\r\n \"enabledProtocols\":{\r\n \"download\":false,\"\
|
||||
dash\":false,\"hls\":true,\"smoothStreaming\":false\r\n },\"clearTracks\"\
|
||||
:[\r\n \r\n ],\"contentKeys\":{\r\n \"defaultKey\"\
|
||||
:{\r\n \"label\":\"cbcsKeyDefault\",\"policyName\":null\r\n \
|
||||
\ },\"keyToTrackMappings\":[\r\n \r\n ]\r\
|
||||
\n },\"drm\":{\r\n \"fairPlay\":{\r\n \"\
|
||||
customLicenseAcquisitionUrlTemplate\":null,\"allowPersistentLicense\":false\r\
|
||||
\n },\"playReady\":null,\"widevine\":null\r\n }\r\n \
|
||||
\ },\"noEncryption\":null\r\n }\r\n },{\r\n \"name\":\"\
|
||||
spn000004\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003/streamingPolicies/spn000004\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices/streamingPolicies\",\"properties\"\
|
||||
:{\r\n \"created\":\"2018-04-18T18:21:36.7811532Z\",\"defaultContentKeyPolicyName\"\
|
||||
:null,\"envelopeEncryption\":null,\"commonEncryptionCenc\":null,\"commonEncryptionCbcs\"\
|
||||
:null,\"noEncryption\":{\r\n \"enabledProtocols\":{\r\n \
|
||||
\ \"download\":true,\"dash\":false,\"hls\":false,\"smoothStreaming\":false\r\
|
||||
\n }\r\n }\r\n }\r\n }\r\n ]\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['7408']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:21:38 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/10.0]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: ['Accept-Encoding,Accept-Encoding']
|
||||
x-content-type-options: [nosniff]
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams streaming policy delete]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['0']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: DELETE
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaServices/ams000003/streamingPolicies/spn000004?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: ''}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['0']
|
||||
date: ['Wed, 18 Apr 2018 18:21:39 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/10.0]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1176']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [group delete]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['0']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 resourcemanagementclient/1.2.1 Azure-SDK-For-Python
|
||||
AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: DELETE
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2017-05-10
|
||||
response:
|
||||
body: {string: ''}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['0']
|
||||
date: ['Wed, 18 Apr 2018 18:21:42 GMT']
|
||||
expires: ['-1']
|
||||
location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdSSERFT0xHS0JaRUtaR08yWDRJRUdXUUFHSEhVS0s3SUdJMnwwM0MwRTg5ODA1RjIwRjk0LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10']
|
||||
pragma: [no-cache]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1192']
|
||||
status: {code: 202, message: Accepted}
|
||||
version: 1
|
|
@ -0,0 +1,574 @@
|
|||
interactions:
|
||||
- request:
|
||||
body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation",
|
||||
"date": "2018-04-18T18:21:43Z"}}'
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [group create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['110']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 resourcemanagementclient/1.2.1 Azure-SDK-For-Python
|
||||
AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2017-05-10
|
||||
response:
|
||||
body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-04-18T18:21:43Z"},"properties":{"provisioningState":"Succeeded"}}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['384']
|
||||
content-type: [application/json; charset=utf-8]
|
||||
date: ['Wed, 18 Apr 2018 18:21:45 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1175']
|
||||
status: {code: 201, message: Created}
|
||||
- request:
|
||||
body: '{"sku": {"name": "Standard_LRS"}, "kind": "Storage", "location": "westus",
|
||||
"properties": {"supportsHttpsTrafficOnly": false}}'
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [storage account create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['125']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-storage/1.5.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002?api-version=2017-10-01
|
||||
response:
|
||||
body: {string: ''}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['0']
|
||||
content-type: [text/plain; charset=utf-8]
|
||||
date: ['Wed, 18 Apr 2018 18:21:47 GMT']
|
||||
expires: ['-1']
|
||||
location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/5444bd77-e1e9-437e-a4a3-6a990fb2fdfd?monitor=true&api-version=2017-10-01']
|
||||
pragma: [no-cache]
|
||||
server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
|
||||
Microsoft-HTTPAPI/2.0']
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1179']
|
||||
status: {code: 202, message: Accepted}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [storage account create]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-storage/1.5.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/5444bd77-e1e9-437e-a4a3-6a990fb2fdfd?monitor=true&api-version=2017-10-01
|
||||
response:
|
||||
body: {string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002","name":"clitest000002","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["479473dc-cfef-474c-ba12-cba2854af0f6"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-04-18T18:21:48.0725244Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-04-18T18:21:48.0725244Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-04-18T18:21:47.9943917Z","primaryEndpoints":{"blob":"https://clitest000002.blob.core.windows.net/","queue":"https://clitest000002.queue.core.windows.net/","table":"https://clitest000002.table.core.windows.net/","file":"https://clitest000002.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['1231']
|
||||
content-type: [application/json]
|
||||
date: ['Wed, 18 Apr 2018 18:22:06 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
|
||||
Microsoft-HTTPAPI/2.0']
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [storage account keys list]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['0']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-storage/1.5.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: POST
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002/listKeys?api-version=2017-10-01
|
||||
response:
|
||||
body: {string: '{"keys":[{"keyName":"key1","value":"InJ0Ir4OJZAmcQo/7BiO9VVnA2zn6TNNg2ZsrwB1xKRQC5iFcna3L77m8OZ5CPbKOJ6QF7gtHfLGUyerj0i4+Q==","permissions":"FULL"},{"keyName":"key2","value":"IZuKbjA6pDYdLvP1xFH004tbT/wUxakZ80Rh6zFpr1yCYFzYoZovjU9hBpk2VsEgiXPiPTThZy2qsax/3xh6ww==","permissions":"FULL"}]}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['288']
|
||||
content-type: [application/json]
|
||||
date: ['Wed, 18 Apr 2018 18:22:07 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
|
||||
Microsoft-HTTPAPI/2.0']
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1187']
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: 'b''b\''{"location": "westus2", "properties": {"storageAccounts": [{"id":
|
||||
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002",
|
||||
"type": "Primary"}]}}\'''''
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams account create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['302']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"name\":\"ams000003\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices\",\"location\":\"West US 2\",\"\
|
||||
tags\":null,\"properties\":{\r\n \"mediaServiceId\":\"3ecb7c5a-ef39-4f5b-a2bc-1702ebfdb226\"\
|
||||
,\"storageAccounts\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002\"\
|
||||
,\"type\":\"Primary\"\r\n }\r\n ]\r\n }\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['677']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:22:13 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1191']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 201, message: Created}
|
||||
- request:
|
||||
body: '{"properties": {"outputs": [{"preset": {"@odata.type": "#Microsoft.Media.BuiltInStandardEncoderPreset",
|
||||
"presetName": "AACGoodQualityAudio"}}]}}'
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams transform create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['144']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaServices/ams000003/transforms/tra000004?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"name\":\"tra000004\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003/transforms/tra000004\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices/transforms\",\"properties\":{\r\n\
|
||||
\ \"created\":\"2018-04-18T18:22:15.91612Z\",\"description\":null,\"lastModified\"\
|
||||
:\"2018-04-18T18:22:15.91612Z\",\"outputs\":[\r\n {\r\n \"onError\"\
|
||||
:\"StopProcessingJob\",\"relativePriority\":\"Normal\",\"preset\":{\r\n \
|
||||
\ \"@odata.type\":\"#Microsoft.Media.BuiltInStandardEncoderPreset\"\
|
||||
,\"presetName\":\"AACGoodQualityAudio\"\r\n }\r\n }\r\n ]\r\
|
||||
\n }\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['663']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:22:15 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1181']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 201, message: Created}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams transform show]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaServices/ams000003/transforms/tra000004?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"name\":\"tra000004\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003/transforms/tra000004\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices/transforms\",\"properties\":{\r\n\
|
||||
\ \"created\":\"2018-04-18T18:22:15.91612Z\",\"description\":null,\"lastModified\"\
|
||||
:\"2018-04-18T18:22:15.91612Z\",\"outputs\":[\r\n {\r\n \"onError\"\
|
||||
:\"StopProcessingJob\",\"relativePriority\":\"Normal\",\"preset\":{\r\n \
|
||||
\ \"@odata.type\":\"#Microsoft.Media.BuiltInStandardEncoderPreset\"\
|
||||
,\"presetName\":\"AACGoodQualityAudio\"\r\n }\r\n }\r\n ]\r\
|
||||
\n }\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['663']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:22:16 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams transform update]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaServices/ams000003/transforms/tra000004?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"name\":\"tra000004\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003/transforms/tra000004\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices/transforms\",\"properties\":{\r\n\
|
||||
\ \"created\":\"2018-04-18T18:22:15.91612Z\",\"description\":null,\"lastModified\"\
|
||||
:\"2018-04-18T18:22:15.91612Z\",\"outputs\":[\r\n {\r\n \"onError\"\
|
||||
:\"StopProcessingJob\",\"relativePriority\":\"Normal\",\"preset\":{\r\n \
|
||||
\ \"@odata.type\":\"#Microsoft.Media.BuiltInStandardEncoderPreset\"\
|
||||
,\"presetName\":\"AACGoodQualityAudio\"\r\n }\r\n }\r\n ]\r\
|
||||
\n }\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['663']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:22:18 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: '{"properties": {"description": "mydesc", "outputs": [{"preset": {"@odata.type":
|
||||
"#Microsoft.Media.BuiltInStandardEncoderPreset", "presetName": "H264MultipleBitrate720p"}}]}}'
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams transform update]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['173']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaServices/ams000003/transforms/tra000004?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"name\":\"tra000004\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003/transforms/tra000004\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices/transforms\",\"properties\":{\r\n\
|
||||
\ \"created\":\"2018-04-18T18:22:15.91612Z\",\"description\":\"mydesc\"\
|
||||
,\"lastModified\":\"2018-04-18T18:22:20.1167179Z\",\"outputs\":[\r\n \
|
||||
\ {\r\n \"onError\":\"StopProcessingJob\",\"relativePriority\":\"Normal\"\
|
||||
,\"preset\":{\r\n \"@odata.type\":\"#Microsoft.Media.BuiltInStandardEncoderPreset\"\
|
||||
,\"presetName\":\"H264MultipleBitrate720p\"\r\n }\r\n }\r\n \
|
||||
\ ]\r\n }\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['673']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:22:19 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1178']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams transform output add]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaServices/ams000003/transforms/tra000004?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"name\":\"tra000004\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003/transforms/tra000004\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices/transforms\",\"properties\":{\r\n\
|
||||
\ \"created\":\"2018-04-18T18:22:15.91612Z\",\"description\":\"mydesc\"\
|
||||
,\"lastModified\":\"2018-04-18T18:22:20.1167179Z\",\"outputs\":[\r\n \
|
||||
\ {\r\n \"onError\":\"StopProcessingJob\",\"relativePriority\":\"Normal\"\
|
||||
,\"preset\":{\r\n \"@odata.type\":\"#Microsoft.Media.BuiltInStandardEncoderPreset\"\
|
||||
,\"presetName\":\"H264MultipleBitrate720p\"\r\n }\r\n }\r\n \
|
||||
\ ]\r\n }\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['673']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:22:21 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: '{"properties": {"outputs": [{"onError": "StopProcessingJob", "relativePriority":
|
||||
"Normal", "preset": {"@odata.type": "#Microsoft.Media.BuiltInStandardEncoderPreset",
|
||||
"presetName": "H264MultipleBitrate720p"}}, {"preset": {"@odata.type": "#Microsoft.Media.BuiltInStandardEncoderPreset",
|
||||
"presetName": "AdaptiveStreaming"}}, {"preset": {"@odata.type": "#Microsoft.Media.BuiltInStandardEncoderPreset",
|
||||
"presetName": "AACGoodQualityAudio"}}]}}'
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams transform output add]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['438']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaServices/ams000003/transforms/tra000004?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"name\":\"tra000004\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003/transforms/tra000004\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices/transforms\",\"properties\":{\r\n\
|
||||
\ \"created\":\"2018-04-18T18:22:15.91612Z\",\"description\":null,\"lastModified\"\
|
||||
:\"2018-04-18T18:22:25.0886145Z\",\"outputs\":[\r\n {\r\n \"onError\"\
|
||||
:\"StopProcessingJob\",\"relativePriority\":\"Normal\",\"preset\":{\r\n \
|
||||
\ \"@odata.type\":\"#Microsoft.Media.BuiltInStandardEncoderPreset\"\
|
||||
,\"presetName\":\"H264MultipleBitrate720p\"\r\n }\r\n },{\r\n\
|
||||
\ \"onError\":\"StopProcessingJob\",\"relativePriority\":\"Normal\"\
|
||||
,\"preset\":{\r\n \"@odata.type\":\"#Microsoft.Media.BuiltInStandardEncoderPreset\"\
|
||||
,\"presetName\":\"AdaptiveStreaming\"\r\n }\r\n },{\r\n \
|
||||
\ \"onError\":\"StopProcessingJob\",\"relativePriority\":\"Normal\",\"preset\"\
|
||||
:{\r\n \"@odata.type\":\"#Microsoft.Media.BuiltInStandardEncoderPreset\"\
|
||||
,\"presetName\":\"AACGoodQualityAudio\"\r\n }\r\n }\r\n ]\r\
|
||||
\n }\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['1083']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:22:24 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1178']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams transform output remove]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaServices/ams000003/transforms/tra000004?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"name\":\"tra000004\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003/transforms/tra000004\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices/transforms\",\"properties\":{\r\n\
|
||||
\ \"created\":\"2018-04-18T18:22:15.91612Z\",\"description\":null,\"lastModified\"\
|
||||
:\"2018-04-18T18:22:25.0886145Z\",\"outputs\":[\r\n {\r\n \"onError\"\
|
||||
:\"StopProcessingJob\",\"relativePriority\":\"Normal\",\"preset\":{\r\n \
|
||||
\ \"@odata.type\":\"#Microsoft.Media.BuiltInStandardEncoderPreset\"\
|
||||
,\"presetName\":\"H264MultipleBitrate720p\"\r\n }\r\n },{\r\n\
|
||||
\ \"onError\":\"StopProcessingJob\",\"relativePriority\":\"Normal\"\
|
||||
,\"preset\":{\r\n \"@odata.type\":\"#Microsoft.Media.BuiltInStandardEncoderPreset\"\
|
||||
,\"presetName\":\"AdaptiveStreaming\"\r\n }\r\n },{\r\n \
|
||||
\ \"onError\":\"StopProcessingJob\",\"relativePriority\":\"Normal\",\"preset\"\
|
||||
:{\r\n \"@odata.type\":\"#Microsoft.Media.BuiltInStandardEncoderPreset\"\
|
||||
,\"presetName\":\"AACGoodQualityAudio\"\r\n }\r\n }\r\n ]\r\
|
||||
\n }\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['1083']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:22:25 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: '{"properties": {"outputs": [{"onError": "StopProcessingJob", "relativePriority":
|
||||
"Normal", "preset": {"@odata.type": "#Microsoft.Media.BuiltInStandardEncoderPreset",
|
||||
"presetName": "H264MultipleBitrate720p"}}]}}'
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams transform output remove]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['210']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaServices/ams000003/transforms/tra000004?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"name\":\"tra000004\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003/transforms/tra000004\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices/transforms\",\"properties\":{\r\n\
|
||||
\ \"created\":\"2018-04-18T18:22:15.91612Z\",\"description\":null,\"lastModified\"\
|
||||
:\"2018-04-18T18:22:28.5924949Z\",\"outputs\":[\r\n {\r\n \"onError\"\
|
||||
:\"StopProcessingJob\",\"relativePriority\":\"Normal\",\"preset\":{\r\n \
|
||||
\ \"@odata.type\":\"#Microsoft.Media.BuiltInStandardEncoderPreset\"\
|
||||
,\"presetName\":\"H264MultipleBitrate720p\"\r\n }\r\n }\r\n \
|
||||
\ ]\r\n }\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['669']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:22:28 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1192']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams transform list]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaServices/ams000003/transforms?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: "{\r\n \"value\":[\r\n {\r\n \"name\":\"tra000004\",\"\
|
||||
id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaservices/ams000003/transforms/tra000004\"\
|
||||
,\"type\":\"Microsoft.Media/mediaservices/transforms\",\"properties\":{\r\n\
|
||||
\ \"created\":\"2018-04-18T18:22:15.91612Z\",\"description\":null,\"\
|
||||
lastModified\":\"2018-04-18T18:22:28.5924949Z\",\"outputs\":[\r\n \
|
||||
\ {\r\n \"onError\":\"StopProcessingJob\",\"relativePriority\"\
|
||||
:\"Normal\",\"preset\":{\r\n \"@odata.type\":\"#Microsoft.Media.BuiltInStandardEncoderPreset\"\
|
||||
,\"presetName\":\"H264MultipleBitrate720p\"\r\n }\r\n \
|
||||
\ }\r\n ]\r\n }\r\n }\r\n ]\r\n}"}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['737']
|
||||
content-type: [application/json; odata.metadata=minimal]
|
||||
date: ['Wed, 18 Apr 2018 18:22:28 GMT']
|
||||
expires: ['-1']
|
||||
odata-version: ['4.0']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
transfer-encoding: [chunked]
|
||||
vary: [Accept-Encoding]
|
||||
x-content-type-options: [nosniff]
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [ams transform delete]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['0']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 azure-mgmt-media/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: DELETE
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Media/mediaServices/ams000003/transforms/tra000004?api-version=2018-03-30-preview
|
||||
response:
|
||||
body: {string: ''}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['0']
|
||||
date: ['Wed, 18 Apr 2018 18:22:31 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1175']
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [group delete]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['0']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.3 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
|
||||
msrest_azure/0.4.26 resourcemanagementclient/1.2.1 Azure-SDK-For-Python
|
||||
AZURECLI/2.0.32]
|
||||
accept-language: [en-US]
|
||||
method: DELETE
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2017-05-10
|
||||
response:
|
||||
body: {string: ''}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['0']
|
||||
date: ['Wed, 18 Apr 2018 18:22:34 GMT']
|
||||
expires: ['-1']
|
||||
location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdYTUc0M1hCNkZTUVBSUE1OSzRTTTZWVk9VSExRQlZTQlJKTXw3MEZGNTdGRTYxMDlEMUE0LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10']
|
||||
pragma: [no-cache]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1177']
|
||||
status: {code: 202, message: Accepted}
|
||||
version: 1
|
|
@ -0,0 +1,446 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# --------------------------------------------------------------------------------------------
|
||||
|
||||
from azure.cli.testsdk import ScenarioTest, ResourceGroupPreparer, StorageAccountPreparer
|
||||
|
||||
|
||||
class AmsTests(ScenarioTest):
|
||||
|
||||
@ResourceGroupPreparer()
|
||||
@StorageAccountPreparer(parameter_name='storage_account_for_create')
|
||||
def test_ams_create_show(self, resource_group, storage_account_for_create):
|
||||
amsname = self.create_random_name(prefix='ams', length=12)
|
||||
|
||||
self.kwargs.update({
|
||||
'amsname': amsname,
|
||||
'storageAccount': storage_account_for_create,
|
||||
'location': 'westus2'
|
||||
})
|
||||
|
||||
self.cmd('az ams account create -n {amsname} -g {rg} --storage-account {storageAccount} -l {location}', checks=[
|
||||
self.check('name', '{amsname}'),
|
||||
self.check('location', 'West US 2')
|
||||
])
|
||||
|
||||
self.cmd('az ams account update -n {amsname} -g {rg} --tags key=value', checks=[
|
||||
self.check('tags.key', 'value'),
|
||||
])
|
||||
|
||||
list = self.cmd('az ams account list -g {}'.format(resource_group)).get_output_in_json()
|
||||
assert len(list) > 0
|
||||
|
||||
self.cmd('az ams account show -n {amsname} -g {rg}', checks=[
|
||||
self.check('name', '{amsname}'),
|
||||
self.check('resourceGroup', '{rg}')
|
||||
])
|
||||
|
||||
self.cmd('az ams account delete -n {amsname} -g {rg}')
|
||||
|
||||
@ResourceGroupPreparer()
|
||||
@StorageAccountPreparer(parameter_name='storage_account_for_create')
|
||||
@StorageAccountPreparer(parameter_name='storage_account_for_update')
|
||||
def test_ams_storage_add_remove(self, resource_group, storage_account_for_create, storage_account_for_update):
|
||||
amsname = self.create_random_name(prefix='ams', length=12)
|
||||
|
||||
self.kwargs.update({
|
||||
'amsname': amsname,
|
||||
'storageAccount': storage_account_for_create,
|
||||
'location': 'westus2'
|
||||
})
|
||||
|
||||
self.cmd('az ams account create -n {amsname} -g {rg} --storage-account {storageAccount} -l {location}', checks=[
|
||||
self.check('name', '{amsname}'),
|
||||
self.check('location', 'West US 2')
|
||||
])
|
||||
|
||||
self.kwargs.update({
|
||||
'storageAccount': storage_account_for_update
|
||||
})
|
||||
|
||||
self.cmd('az ams account storage add -a {amsname} -g {rg} -n {storageAccount}', checks=[
|
||||
self.check('name', '{amsname}'),
|
||||
self.check('resourceGroup', '{rg}')
|
||||
])
|
||||
|
||||
self.cmd('az ams account storage remove -a {amsname} -g {rg} -n {storageAccount}', checks=[
|
||||
self.check('name', '{amsname}'),
|
||||
self.check('resourceGroup', '{rg}')
|
||||
])
|
||||
|
||||
@ResourceGroupPreparer()
|
||||
@StorageAccountPreparer(parameter_name='storage_account_for_create')
|
||||
def test_ams_sp_create_reset(self, resource_group, storage_account_for_create):
|
||||
amsname = self.create_random_name(prefix='ams', length=12)
|
||||
|
||||
self.kwargs.update({
|
||||
'amsname': amsname,
|
||||
'storageAccount': storage_account_for_create,
|
||||
'location': 'westus2'
|
||||
})
|
||||
|
||||
self.cmd('az ams account create -n {amsname} -g {rg} --storage-account {storageAccount} -l {location}', checks=[
|
||||
self.check('name', '{amsname}'),
|
||||
self.check('location', 'West US 2')
|
||||
])
|
||||
|
||||
spPassword = self.create_random_name(prefix='spp', length=10)
|
||||
|
||||
self.kwargs.update({
|
||||
'spName': 'http://{}'.format(resource_group),
|
||||
'spPassword': spPassword,
|
||||
'role': 'Owner'
|
||||
})
|
||||
|
||||
try:
|
||||
self.cmd('az ams account sp create -a {amsname} -n {spName} -g {rg} -p {spPassword} --role {role}', checks=[
|
||||
self.check('AadSecret', '{spPassword}'),
|
||||
self.check('ResourceGroup', '{rg}'),
|
||||
self.check('AccountName', '{amsname}')
|
||||
])
|
||||
|
||||
self.cmd('az ams account sp reset-credentials -a {amsname} -n {spName} -g {rg} -p mynewpassword --role {role}', checks=[
|
||||
self.check('AadSecret', 'mynewpassword'),
|
||||
self.check('ResourceGroup', '{rg}'),
|
||||
self.check('AccountName', '{amsname}')
|
||||
])
|
||||
finally:
|
||||
self.cmd('ad app delete --id {spName}')
|
||||
|
||||
@ResourceGroupPreparer()
|
||||
@StorageAccountPreparer(parameter_name='storage_account_for_create')
|
||||
def test_ams_transform(self, resource_group, storage_account_for_create):
|
||||
amsname = self.create_random_name(prefix='ams', length=12)
|
||||
|
||||
self.kwargs.update({
|
||||
'amsname': amsname,
|
||||
'storageAccount': storage_account_for_create,
|
||||
'location': 'westus2'
|
||||
})
|
||||
|
||||
self.cmd('az ams account create -n {amsname} -g {rg} --storage-account {storageAccount} -l {location}', checks=[
|
||||
self.check('name', '{amsname}'),
|
||||
self.check('location', 'West US 2')
|
||||
])
|
||||
|
||||
transformName = self.create_random_name(prefix='tra', length=10)
|
||||
|
||||
self.kwargs.update({
|
||||
'transformName': transformName,
|
||||
'presetName': 'AACGoodQualityAudio'
|
||||
})
|
||||
|
||||
self.cmd('az ams transform create -a {amsname} -n {transformName} -g {rg} --preset-names {presetName}', checks=[
|
||||
self.check('name', '{transformName}'),
|
||||
self.check('resourceGroup', '{rg}')
|
||||
])
|
||||
|
||||
self.cmd('az ams transform show -a {amsname} -n {transformName} -g {rg}', checks=[
|
||||
self.check('name', '{transformName}'),
|
||||
self.check('resourceGroup', '{rg}')
|
||||
])
|
||||
|
||||
self.cmd('az ams transform update --preset-names H264MultipleBitrate720p --description mydesc -a {amsname} -n {transformName} -g {rg}', checks=[
|
||||
self.check('name', '{transformName}'),
|
||||
self.check('resourceGroup', '{rg}'),
|
||||
self.check('description', 'mydesc')
|
||||
])
|
||||
|
||||
self.cmd('az ams transform output add --preset-names AACGoodQualityAudio AdaptiveStreaming -a {amsname} -n {transformName} -g {rg}', checks=[
|
||||
self.check('name', '{transformName}'),
|
||||
self.check('resourceGroup', '{rg}'),
|
||||
self.check('length(outputs)', 3)
|
||||
])
|
||||
|
||||
self.cmd('az ams transform output remove --preset-names AACGoodQualityAudio AdaptiveStreaming -a {amsname} -n {transformName} -g {rg}', checks=[
|
||||
self.check('name', '{transformName}'),
|
||||
self.check('resourceGroup', '{rg}'),
|
||||
self.check('length(outputs)', 1)
|
||||
])
|
||||
|
||||
list = self.cmd('az ams transform list -a {amsname} -g {rg}').get_output_in_json()
|
||||
assert len(list) > 0
|
||||
|
||||
self.cmd('az ams transform delete -n {transformName} -a {amsname} -g {rg}')
|
||||
|
||||
@ResourceGroupPreparer()
|
||||
@StorageAccountPreparer(parameter_name='storage_account_for_create')
|
||||
def test_ams_asset(self, resource_group, storage_account_for_create):
|
||||
amsname = self.create_random_name(prefix='ams', length=12)
|
||||
|
||||
self.kwargs.update({
|
||||
'amsname': amsname,
|
||||
'storageAccount': storage_account_for_create,
|
||||
'location': 'westus2'
|
||||
})
|
||||
|
||||
self.cmd('az ams account create -n {amsname} -g {rg} --storage-account {storageAccount} -l {location}', checks=[
|
||||
self.check('name', '{amsname}'),
|
||||
self.check('location', 'West US 2')
|
||||
])
|
||||
|
||||
assetName = self.create_random_name(prefix='asset', length=12)
|
||||
alternateId = self.create_random_name(prefix='aid', length=12)
|
||||
description = self.create_random_name(prefix='desc', length=12)
|
||||
|
||||
self.kwargs.update({
|
||||
'assetName': assetName,
|
||||
'alternateId': alternateId,
|
||||
'description': description
|
||||
})
|
||||
|
||||
self.cmd('az ams asset create -a {amsname} -n {assetName} -g {rg} --description {description} --alternate-id {alternateId}', checks=[
|
||||
self.check('name', '{assetName}'),
|
||||
self.check('resourceGroup', '{rg}'),
|
||||
self.check('alternateId', '{alternateId}'),
|
||||
self.check('description', '{description}')
|
||||
])
|
||||
|
||||
self.cmd('az ams asset update -a {amsname} -n {assetName} -g {rg} --set description=mydesc alternateId=myaid', checks=[
|
||||
self.check('name', '{assetName}'),
|
||||
self.check('resourceGroup', '{rg}'),
|
||||
self.check('alternateId', 'myaid'),
|
||||
self.check('description', 'mydesc')
|
||||
])
|
||||
|
||||
self.cmd('az ams asset show -a {amsname} -n {assetName} -g {rg}', checks=[
|
||||
self.check('name', '{assetName}'),
|
||||
self.check('resourceGroup', '{rg}'),
|
||||
self.check('alternateId', 'myaid'),
|
||||
self.check('description', 'mydesc')
|
||||
])
|
||||
|
||||
list = self.cmd('az ams asset list -a {amsname} -g {rg}').get_output_in_json()
|
||||
assert len(list) > 0
|
||||
|
||||
self.cmd('az ams asset delete -n {assetName} -a {amsname} -g {rg}')
|
||||
|
||||
@ResourceGroupPreparer()
|
||||
@StorageAccountPreparer(parameter_name='storage_account_for_create')
|
||||
def test_ams_asset_get_sas_urls(self, resource_group, storage_account_for_create):
|
||||
amsname = self.create_random_name(prefix='ams', length=12)
|
||||
|
||||
self.kwargs.update({
|
||||
'amsname': amsname,
|
||||
'storageAccount': storage_account_for_create,
|
||||
'location': 'westus2'
|
||||
})
|
||||
|
||||
self.cmd('az ams account create -n {amsname} -g {rg} --storage-account {storageAccount} -l {location}', checks=[
|
||||
self.check('name', '{amsname}'),
|
||||
self.check('location', 'West US 2')
|
||||
])
|
||||
|
||||
assetName = self.create_random_name(prefix='asset', length=12)
|
||||
alternateId = self.create_random_name(prefix='aid', length=12)
|
||||
description = self.create_random_name(prefix='desc', length=12)
|
||||
|
||||
self.kwargs.update({
|
||||
'assetName': assetName,
|
||||
'alternateId': alternateId,
|
||||
'description': description
|
||||
})
|
||||
|
||||
self.cmd('az ams asset create -a {amsname} -n {assetName} -g {rg} --description {description} --alternate-id {alternateId}', checks=[
|
||||
self.check('name', '{assetName}'),
|
||||
self.check('resourceGroup', '{rg}'),
|
||||
self.check('alternateId', '{alternateId}'),
|
||||
self.check('description', '{description}')
|
||||
])
|
||||
|
||||
self.cmd('az ams asset get-sas-urls -a {amsname} -n {assetName} -g {rg}', checks=[
|
||||
self.check('length(@)', 2)
|
||||
])
|
||||
|
||||
@ResourceGroupPreparer()
|
||||
@StorageAccountPreparer(parameter_name='storage_account_for_create')
|
||||
def test_ams_job(self, resource_group, storage_account_for_create):
|
||||
amsname = self.create_random_name(prefix='ams', length=12)
|
||||
|
||||
self.kwargs.update({
|
||||
'amsname': amsname,
|
||||
'storageAccount': storage_account_for_create,
|
||||
'location': 'westus2'
|
||||
})
|
||||
|
||||
self.cmd('az ams account create -n {amsname} -g {rg} --storage-account {storageAccount} -l {location}', checks=[
|
||||
self.check('name', '{amsname}'),
|
||||
self.check('location', 'West US 2')
|
||||
])
|
||||
|
||||
assetName = self.create_random_name(prefix='asset', length=12)
|
||||
|
||||
self.kwargs.update({
|
||||
'assetName': assetName
|
||||
})
|
||||
|
||||
self.cmd('az ams asset create -a {amsname} -n {assetName} -g {rg}', checks=[
|
||||
self.check('name', '{assetName}'),
|
||||
self.check('resourceGroup', '{rg}')
|
||||
])
|
||||
|
||||
transformName = self.create_random_name(prefix='tra', length=10)
|
||||
|
||||
self.kwargs.update({
|
||||
'transformName': transformName,
|
||||
'presetName': 'AACGoodQualityAudio'
|
||||
})
|
||||
|
||||
self.cmd('az ams transform create -a {amsname} -n {transformName} -g {rg} --preset-names {presetName}', checks=[
|
||||
self.check('name', '{transformName}'),
|
||||
self.check('resourceGroup', '{rg}')
|
||||
])
|
||||
|
||||
jobName = self.create_random_name(prefix='job', length=10)
|
||||
|
||||
self.kwargs.update({
|
||||
'jobName': jobName,
|
||||
'priority': 'High'
|
||||
})
|
||||
|
||||
self.cmd('az ams job start -t {transformName} -a {amsname} -g {rg} -n {jobName} --input-asset-name {assetName} --output-asset-names {assetName} --priority {priority}', checks=[
|
||||
self.check('name', '{jobName}'),
|
||||
self.check('resourceGroup', '{rg}'),
|
||||
self.check('priority', '{priority}')
|
||||
])
|
||||
|
||||
self.cmd('az ams job show -a {amsname} -n {jobName} -g {rg} -t {transformName}', checks=[
|
||||
self.check('name', '{jobName}'),
|
||||
self.check('resourceGroup', '{rg}'),
|
||||
self.check('priority', '{priority}')
|
||||
])
|
||||
|
||||
list = self.cmd('az ams job list -a {amsname} -g {rg} -t {transformName}').get_output_in_json()
|
||||
assert len(list) > 0
|
||||
|
||||
self.cmd('az ams job cancel -n {jobName} -a {amsname} -g {rg} -t {transformName}')
|
||||
|
||||
job = self.cmd('az ams job show -a {amsname} -n {jobName} -g {rg} -t {transformName}', checks=[
|
||||
self.check('name', '{jobName}'),
|
||||
self.check('resourceGroup', '{rg}'),
|
||||
self.check('priority', '{priority}')
|
||||
]).get_output_in_json()
|
||||
|
||||
assert job['state'] == 'Canceled' or job['state'] == 'Canceling'
|
||||
|
||||
self.cmd('az ams job delete -n {jobName} -a {amsname} -g {rg} -t {transformName}')
|
||||
|
||||
@ResourceGroupPreparer()
|
||||
@StorageAccountPreparer(parameter_name='storage_account_for_create')
|
||||
def test_ams_streaming_locator(self, resource_group, storage_account_for_create):
|
||||
amsname = self.create_random_name(prefix='ams', length=12)
|
||||
|
||||
self.kwargs.update({
|
||||
'amsname': amsname,
|
||||
'storageAccount': storage_account_for_create,
|
||||
'location': 'westus2'
|
||||
})
|
||||
|
||||
self.cmd('az ams account create -n {amsname} -g {rg} --storage-account {storageAccount} -l {location}', checks=[
|
||||
self.check('name', '{amsname}'),
|
||||
self.check('location', 'West US 2')
|
||||
])
|
||||
|
||||
assetName = self.create_random_name(prefix='asset', length=12)
|
||||
|
||||
self.kwargs.update({
|
||||
'assetName': assetName
|
||||
})
|
||||
|
||||
self.cmd('az ams asset create -a {amsname} -n {assetName} -g {rg}', checks=[
|
||||
self.check('name', '{assetName}'),
|
||||
self.check('resourceGroup', '{rg}')
|
||||
])
|
||||
|
||||
streamingPolicyName = self.create_random_name(prefix='spn', length=10)
|
||||
|
||||
self.kwargs.update({
|
||||
'streamingPolicyName': streamingPolicyName
|
||||
})
|
||||
|
||||
self.cmd('az ams streaming policy create -a {amsname} -n {streamingPolicyName} -g {rg} --download', checks=[
|
||||
self.check('name', '{streamingPolicyName}'),
|
||||
self.check('resourceGroup', '{rg}')
|
||||
])
|
||||
|
||||
streamingLocatorName = self.create_random_name(prefix='sln', length=10)
|
||||
|
||||
self.kwargs.update({
|
||||
'streamingLocatorName': streamingLocatorName,
|
||||
'startTime': '2018-03-29T10:00:00',
|
||||
'endTime': '2018-03-29T12:00:00'
|
||||
})
|
||||
|
||||
self.cmd('az ams streaming locator create -n {streamingLocatorName} -a {amsname} -g {rg} --streaming-policy-name {streamingPolicyName} --asset-name {assetName} --start-time {startTime} --end-time {endTime}', checks=[
|
||||
self.check('name', '{streamingLocatorName}'),
|
||||
self.check('resourceGroup', '{rg}')
|
||||
])
|
||||
|
||||
self.cmd('az ams streaming locator show -a {amsname} -n {streamingLocatorName} -g {rg}', checks=[
|
||||
self.check('name', '{streamingLocatorName}'),
|
||||
self.check('resourceGroup', '{rg}')
|
||||
])
|
||||
|
||||
list = self.cmd('az ams streaming locator list -a {amsname} -g {rg}').get_output_in_json()
|
||||
assert len(list) > 0
|
||||
|
||||
self.cmd('az ams streaming locator get-paths -a {amsname} -n {streamingLocatorName} -g {rg}')
|
||||
|
||||
self.cmd('az ams streaming locator delete -n {streamingLocatorName} -a {amsname} -g {rg}')
|
||||
|
||||
@ResourceGroupPreparer()
|
||||
@StorageAccountPreparer(parameter_name='storage_account_for_create')
|
||||
def test_ams_streaming_policy(self, resource_group, storage_account_for_create):
|
||||
amsname = self.create_random_name(prefix='ams', length=12)
|
||||
|
||||
self.kwargs.update({
|
||||
'amsname': amsname,
|
||||
'storageAccount': storage_account_for_create,
|
||||
'location': 'westus2'
|
||||
})
|
||||
|
||||
self.cmd('az ams account create -n {amsname} -g {rg} --storage-account {storageAccount} -l {location}', checks=[
|
||||
self.check('name', '{amsname}'),
|
||||
self.check('location', 'West US 2')
|
||||
])
|
||||
|
||||
streamingPolicyName = self.create_random_name(prefix='spn', length=10)
|
||||
|
||||
self.kwargs.update({
|
||||
'streamingPolicyName': streamingPolicyName
|
||||
})
|
||||
|
||||
self.cmd('az ams streaming policy create -a {amsname} -n {streamingPolicyName} -g {rg} --download', checks=[
|
||||
self.check('name', '{streamingPolicyName}'),
|
||||
self.check('resourceGroup', '{rg}')
|
||||
])
|
||||
|
||||
self.cmd('az ams streaming policy show -a {amsname} -n {streamingPolicyName} -g {rg}', checks=[
|
||||
self.check('name', '{streamingPolicyName}'),
|
||||
self.check('resourceGroup', '{rg}')
|
||||
])
|
||||
|
||||
list = self.cmd('az ams streaming policy list -a {amsname} -g {rg}').get_output_in_json()
|
||||
assert len(list) > 0
|
||||
|
||||
self.cmd('az ams streaming policy delete -n {streamingPolicyName} -a {amsname} -g {rg}')
|
||||
|
||||
@ResourceGroupPreparer()
|
||||
@StorageAccountPreparer(parameter_name='storage_account_for_create')
|
||||
def test_ams_streaming_endpoint(self, resource_group, storage_account_for_create):
|
||||
amsname = self.create_random_name(prefix='ams', length=12)
|
||||
|
||||
self.kwargs.update({
|
||||
'amsname': amsname,
|
||||
'storageAccount': storage_account_for_create,
|
||||
'location': 'westus2'
|
||||
})
|
||||
|
||||
self.cmd('az ams account create -n {amsname} -g {rg} --storage-account {storageAccount} -l {location}', checks=[
|
||||
self.check('name', '{amsname}'),
|
||||
self.check('location', 'West US 2')
|
||||
])
|
||||
|
||||
list = self.cmd('az ams streaming endpoint list -a {amsname} -g {rg}').get_output_in_json()
|
||||
assert len(list) > 0
|
|
@ -0,0 +1,533 @@
|
|||
"""
|
||||
"wheel" copyright (c) 2012-2017 Daniel Holth <dholth@fastmail.fm> and
|
||||
contributors.
|
||||
|
||||
The MIT License
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Create a Azure wheel (.whl) distribution (a wheel is a built archive format).
|
||||
|
||||
This file is a copy of the official bdist_wheel file from wheel 0.30.0a0, enhanced
|
||||
of the bottom with some Microsoft extension for Azure SDK for Python
|
||||
|
||||
"""
|
||||
|
||||
import csv
|
||||
import hashlib
|
||||
import os
|
||||
import subprocess
|
||||
import warnings
|
||||
import shutil
|
||||
import json
|
||||
import sys
|
||||
|
||||
try:
|
||||
import sysconfig
|
||||
except ImportError: # pragma nocover
|
||||
# Python < 2.7
|
||||
import distutils.sysconfig as sysconfig
|
||||
|
||||
import pkg_resources
|
||||
|
||||
safe_name = pkg_resources.safe_name
|
||||
safe_version = pkg_resources.safe_version
|
||||
|
||||
from shutil import rmtree
|
||||
from email.generator import Generator
|
||||
|
||||
from distutils.core import Command
|
||||
from distutils.sysconfig import get_python_version
|
||||
|
||||
from distutils import log as logger
|
||||
|
||||
from wheel.pep425tags import get_abbr_impl, get_impl_ver, get_abi_tag, get_platform
|
||||
from wheel.util import native, open_for_csv
|
||||
from wheel.archive import archive_wheelfile
|
||||
from wheel.pkginfo import read_pkg_info, write_pkg_info
|
||||
from wheel.metadata import pkginfo_to_dict
|
||||
from wheel import pep425tags, metadata
|
||||
from wheel import __version__ as wheel_version
|
||||
|
||||
def safer_name(name):
|
||||
return safe_name(name).replace('-', '_')
|
||||
|
||||
def safer_version(version):
|
||||
return safe_version(version).replace('-', '_')
|
||||
|
||||
class bdist_wheel(Command):
|
||||
|
||||
description = 'create a wheel distribution'
|
||||
|
||||
user_options = [('bdist-dir=', 'b',
|
||||
"temporary directory for creating the distribution"),
|
||||
('plat-name=', 'p',
|
||||
"platform name to embed in generated filenames "
|
||||
"(default: %s)" % get_platform()),
|
||||
('keep-temp', 'k',
|
||||
"keep the pseudo-installation tree around after " +
|
||||
"creating the distribution archive"),
|
||||
('dist-dir=', 'd',
|
||||
"directory to put final built distributions in"),
|
||||
('skip-build', None,
|
||||
"skip rebuilding everything (for testing/debugging)"),
|
||||
('relative', None,
|
||||
"build the archive using relative paths"
|
||||
"(default: false)"),
|
||||
('owner=', 'u',
|
||||
"Owner name used when creating a tar file"
|
||||
" [default: current user]"),
|
||||
('group=', 'g',
|
||||
"Group name used when creating a tar file"
|
||||
" [default: current group]"),
|
||||
('universal', None,
|
||||
"make a universal wheel"
|
||||
" (default: false)"),
|
||||
('python-tag=', None,
|
||||
"Python implementation compatibility tag"
|
||||
" (default: py%s)" % get_impl_ver()[0]),
|
||||
]
|
||||
|
||||
boolean_options = ['keep-temp', 'skip-build', 'relative', 'universal']
|
||||
|
||||
def initialize_options(self):
|
||||
self.bdist_dir = None
|
||||
self.data_dir = None
|
||||
self.plat_name = None
|
||||
self.plat_tag = None
|
||||
self.format = 'zip'
|
||||
self.keep_temp = False
|
||||
self.dist_dir = None
|
||||
self.distinfo_dir = None
|
||||
self.egginfo_dir = None
|
||||
self.root_is_pure = None
|
||||
self.skip_build = None
|
||||
self.relative = False
|
||||
self.owner = None
|
||||
self.group = None
|
||||
self.universal = False
|
||||
self.python_tag = 'py' + get_impl_ver()[0]
|
||||
self.plat_name_supplied = False
|
||||
|
||||
def finalize_options(self):
|
||||
if self.bdist_dir is None:
|
||||
bdist_base = self.get_finalized_command('bdist').bdist_base
|
||||
self.bdist_dir = os.path.join(bdist_base, 'wheel')
|
||||
|
||||
self.data_dir = self.wheel_dist_name + '.data'
|
||||
self.plat_name_supplied = self.plat_name is not None
|
||||
|
||||
need_options = ('dist_dir', 'plat_name', 'skip_build')
|
||||
|
||||
self.set_undefined_options('bdist',
|
||||
*zip(need_options, need_options))
|
||||
|
||||
self.root_is_pure = not (self.distribution.has_ext_modules()
|
||||
or self.distribution.has_c_libraries())
|
||||
|
||||
# Support legacy [wheel] section for setting universal
|
||||
wheel = self.distribution.get_option_dict('wheel')
|
||||
if 'universal' in wheel:
|
||||
# please don't define this in your global configs
|
||||
val = wheel['universal'][1].strip()
|
||||
if val.lower() in ('1', 'true', 'yes'):
|
||||
self.universal = True
|
||||
|
||||
@property
|
||||
def wheel_dist_name(self):
|
||||
"""Return distribution full name with - replaced with _"""
|
||||
return '-'.join((safer_name(self.distribution.get_name()),
|
||||
safer_version(self.distribution.get_version())))
|
||||
|
||||
def get_tag(self):
|
||||
# bdist sets self.plat_name if unset, we should only use it for purepy
|
||||
# wheels if the user supplied it.
|
||||
if self.plat_name_supplied:
|
||||
plat_name = self.plat_name
|
||||
elif self.root_is_pure:
|
||||
plat_name = 'any'
|
||||
else:
|
||||
plat_name = self.plat_name or get_platform()
|
||||
if plat_name in ('linux-x86_64', 'linux_x86_64') and sys.maxsize == 2147483647:
|
||||
plat_name = 'linux_i686'
|
||||
plat_name = plat_name.replace('-', '_').replace('.', '_')
|
||||
|
||||
|
||||
if self.root_is_pure:
|
||||
if self.universal:
|
||||
impl = 'py2.py3'
|
||||
else:
|
||||
impl = self.python_tag
|
||||
tag = (impl, 'none', plat_name)
|
||||
else:
|
||||
impl_name = get_abbr_impl()
|
||||
impl_ver = get_impl_ver()
|
||||
# PEP 3149
|
||||
abi_tag = str(get_abi_tag()).lower()
|
||||
tag = (impl_name + impl_ver, abi_tag, plat_name)
|
||||
supported_tags = pep425tags.get_supported(
|
||||
supplied_platform=plat_name if self.plat_name_supplied else None)
|
||||
# XXX switch to this alternate implementation for non-pure:
|
||||
assert tag == supported_tags[0], "%s != %s" % (tag, supported_tags[0])
|
||||
return tag
|
||||
|
||||
def get_archive_basename(self):
|
||||
"""Return archive name without extension"""
|
||||
|
||||
impl_tag, abi_tag, plat_tag = self.get_tag()
|
||||
|
||||
archive_basename = "%s-%s-%s-%s" % (
|
||||
self.wheel_dist_name,
|
||||
impl_tag,
|
||||
abi_tag,
|
||||
plat_tag)
|
||||
return archive_basename
|
||||
|
||||
def run(self):
|
||||
build_scripts = self.reinitialize_command('build_scripts')
|
||||
build_scripts.executable = 'python'
|
||||
|
||||
if not self.skip_build:
|
||||
self.run_command('build')
|
||||
|
||||
install = self.reinitialize_command('install',
|
||||
reinit_subcommands=True)
|
||||
install.root = self.bdist_dir
|
||||
install.compile = False
|
||||
install.skip_build = self.skip_build
|
||||
install.warn_dir = False
|
||||
|
||||
# A wheel without setuptools scripts is more cross-platform.
|
||||
# Use the (undocumented) `no_ep` option to setuptools'
|
||||
# install_scripts command to avoid creating entry point scripts.
|
||||
install_scripts = self.reinitialize_command('install_scripts')
|
||||
install_scripts.no_ep = True
|
||||
|
||||
# Use a custom scheme for the archive, because we have to decide
|
||||
# at installation time which scheme to use.
|
||||
for key in ('headers', 'scripts', 'data', 'purelib', 'platlib'):
|
||||
setattr(install,
|
||||
'install_' + key,
|
||||
os.path.join(self.data_dir, key))
|
||||
|
||||
basedir_observed = ''
|
||||
|
||||
if os.name == 'nt':
|
||||
# win32 barfs if any of these are ''; could be '.'?
|
||||
# (distutils.command.install:change_roots bug)
|
||||
basedir_observed = os.path.normpath(os.path.join(self.data_dir, '..'))
|
||||
self.install_libbase = self.install_lib = basedir_observed
|
||||
|
||||
setattr(install,
|
||||
'install_purelib' if self.root_is_pure else 'install_platlib',
|
||||
basedir_observed)
|
||||
|
||||
logger.info("installing to %s", self.bdist_dir)
|
||||
|
||||
self.run_command('install')
|
||||
|
||||
archive_basename = self.get_archive_basename()
|
||||
|
||||
pseudoinstall_root = os.path.join(self.dist_dir, archive_basename)
|
||||
if not self.relative:
|
||||
archive_root = self.bdist_dir
|
||||
else:
|
||||
archive_root = os.path.join(
|
||||
self.bdist_dir,
|
||||
self._ensure_relative(install.install_base))
|
||||
|
||||
self.set_undefined_options(
|
||||
'install_egg_info', ('target', 'egginfo_dir'))
|
||||
self.distinfo_dir = os.path.join(self.bdist_dir,
|
||||
'%s.dist-info' % self.wheel_dist_name)
|
||||
self.egg2dist(self.egginfo_dir,
|
||||
self.distinfo_dir)
|
||||
|
||||
self.write_wheelfile(self.distinfo_dir)
|
||||
|
||||
self.write_record(self.bdist_dir, self.distinfo_dir)
|
||||
|
||||
# Make the archive
|
||||
if not os.path.exists(self.dist_dir):
|
||||
os.makedirs(self.dist_dir)
|
||||
wheel_name = archive_wheelfile(pseudoinstall_root, archive_root)
|
||||
|
||||
# Sign the archive
|
||||
if 'WHEEL_TOOL' in os.environ:
|
||||
subprocess.call([os.environ['WHEEL_TOOL'], 'sign', wheel_name])
|
||||
|
||||
# Add to 'Distribution.dist_files' so that the "upload" command works
|
||||
getattr(self.distribution, 'dist_files', []).append(
|
||||
('bdist_wheel', get_python_version(), wheel_name))
|
||||
|
||||
if not self.keep_temp:
|
||||
if self.dry_run:
|
||||
logger.info('removing %s', self.bdist_dir)
|
||||
else:
|
||||
rmtree(self.bdist_dir)
|
||||
|
||||
def write_wheelfile(self, wheelfile_base, generator='bdist_wheel (' + wheel_version + ')'):
|
||||
from email.message import Message
|
||||
msg = Message()
|
||||
msg['Wheel-Version'] = '1.0' # of the spec
|
||||
msg['Generator'] = generator
|
||||
msg['Root-Is-Purelib'] = str(self.root_is_pure).lower()
|
||||
|
||||
# Doesn't work for bdist_wininst
|
||||
impl_tag, abi_tag, plat_tag = self.get_tag()
|
||||
for impl in impl_tag.split('.'):
|
||||
for abi in abi_tag.split('.'):
|
||||
for plat in plat_tag.split('.'):
|
||||
msg['Tag'] = '-'.join((impl, abi, plat))
|
||||
|
||||
wheelfile_path = os.path.join(wheelfile_base, 'WHEEL')
|
||||
logger.info('creating %s', wheelfile_path)
|
||||
with open(wheelfile_path, 'w') as f:
|
||||
Generator(f, maxheaderlen=0).flatten(msg)
|
||||
|
||||
def _ensure_relative(self, path):
|
||||
# copied from dir_util, deleted
|
||||
drive, path = os.path.splitdrive(path)
|
||||
if path[0:1] == os.sep:
|
||||
path = drive + path[1:]
|
||||
return path
|
||||
|
||||
def _pkginfo_to_metadata(self, egg_info_path, pkginfo_path):
|
||||
return metadata.pkginfo_to_metadata(egg_info_path, pkginfo_path)
|
||||
|
||||
def license_file(self):
|
||||
"""Return license filename from a license-file key in setup.cfg, or None."""
|
||||
metadata = self.distribution.get_option_dict('metadata')
|
||||
if not 'license_file' in metadata:
|
||||
return None
|
||||
return metadata['license_file'][1]
|
||||
|
||||
def setupcfg_requirements(self):
|
||||
"""Generate requirements from setup.cfg as
|
||||
('Requires-Dist', 'requirement; qualifier') tuples. From a metadata
|
||||
section in setup.cfg:
|
||||
|
||||
[metadata]
|
||||
provides-extra = extra1
|
||||
extra2
|
||||
requires-dist = requirement; qualifier
|
||||
another; qualifier2
|
||||
unqualified
|
||||
|
||||
Yields
|
||||
|
||||
('Provides-Extra', 'extra1'),
|
||||
('Provides-Extra', 'extra2'),
|
||||
('Requires-Dist', 'requirement; qualifier'),
|
||||
('Requires-Dist', 'another; qualifier2'),
|
||||
('Requires-Dist', 'unqualified')
|
||||
"""
|
||||
metadata = self.distribution.get_option_dict('metadata')
|
||||
|
||||
# our .ini parser folds - to _ in key names:
|
||||
for key, title in (('provides_extra', 'Provides-Extra'),
|
||||
('requires_dist', 'Requires-Dist')):
|
||||
if not key in metadata:
|
||||
continue
|
||||
field = metadata[key]
|
||||
for line in field[1].splitlines():
|
||||
line = line.strip()
|
||||
if not line:
|
||||
continue
|
||||
yield (title, line)
|
||||
|
||||
def add_requirements(self, metadata_path):
|
||||
"""Add additional requirements from setup.cfg to file metadata_path"""
|
||||
additional = list(self.setupcfg_requirements())
|
||||
if not additional: return
|
||||
pkg_info = read_pkg_info(metadata_path)
|
||||
if 'Provides-Extra' in pkg_info or 'Requires-Dist' in pkg_info:
|
||||
warnings.warn('setup.cfg requirements overwrite values from setup.py')
|
||||
del pkg_info['Provides-Extra']
|
||||
del pkg_info['Requires-Dist']
|
||||
for k, v in additional:
|
||||
pkg_info[k] = v
|
||||
write_pkg_info(metadata_path, pkg_info)
|
||||
|
||||
def egg2dist(self, egginfo_path, distinfo_path):
|
||||
"""Convert an .egg-info directory into a .dist-info directory"""
|
||||
def adios(p):
|
||||
"""Appropriately delete directory, file or link."""
|
||||
if os.path.exists(p) and not os.path.islink(p) and os.path.isdir(p):
|
||||
shutil.rmtree(p)
|
||||
elif os.path.exists(p):
|
||||
os.unlink(p)
|
||||
|
||||
adios(distinfo_path)
|
||||
|
||||
if not os.path.exists(egginfo_path):
|
||||
# There is no egg-info. This is probably because the egg-info
|
||||
# file/directory is not named matching the distribution name used
|
||||
# to name the archive file. Check for this case and report
|
||||
# accordingly.
|
||||
import glob
|
||||
pat = os.path.join(os.path.dirname(egginfo_path), '*.egg-info')
|
||||
possible = glob.glob(pat)
|
||||
err = "Egg metadata expected at %s but not found" % (egginfo_path,)
|
||||
if possible:
|
||||
alt = os.path.basename(possible[0])
|
||||
err += " (%s found - possible misnamed archive file?)" % (alt,)
|
||||
|
||||
raise ValueError(err)
|
||||
|
||||
if os.path.isfile(egginfo_path):
|
||||
# .egg-info is a single file
|
||||
pkginfo_path = egginfo_path
|
||||
pkg_info = self._pkginfo_to_metadata(egginfo_path, egginfo_path)
|
||||
os.mkdir(distinfo_path)
|
||||
else:
|
||||
# .egg-info is a directory
|
||||
pkginfo_path = os.path.join(egginfo_path, 'PKG-INFO')
|
||||
pkg_info = self._pkginfo_to_metadata(egginfo_path, pkginfo_path)
|
||||
|
||||
# ignore common egg metadata that is useless to wheel
|
||||
shutil.copytree(egginfo_path, distinfo_path,
|
||||
ignore=lambda x, y: set(('PKG-INFO',
|
||||
'requires.txt',
|
||||
'SOURCES.txt',
|
||||
'not-zip-safe',)))
|
||||
|
||||
# delete dependency_links if it is only whitespace
|
||||
dependency_links_path = os.path.join(distinfo_path, 'dependency_links.txt')
|
||||
with open(dependency_links_path, 'r') as dependency_links_file:
|
||||
dependency_links = dependency_links_file.read().strip()
|
||||
if not dependency_links:
|
||||
adios(dependency_links_path)
|
||||
|
||||
write_pkg_info(os.path.join(distinfo_path, 'METADATA'), pkg_info)
|
||||
|
||||
# XXX deprecated. Still useful for current distribute/setuptools.
|
||||
metadata_path = os.path.join(distinfo_path, 'METADATA')
|
||||
self.add_requirements(metadata_path)
|
||||
|
||||
# XXX intentionally a different path than the PEP.
|
||||
metadata_json_path = os.path.join(distinfo_path, 'metadata.json')
|
||||
pymeta = pkginfo_to_dict(metadata_path,
|
||||
distribution=self.distribution)
|
||||
|
||||
if 'description' in pymeta:
|
||||
description_filename = 'DESCRIPTION.rst'
|
||||
description_text = pymeta.pop('description')
|
||||
description_path = os.path.join(distinfo_path,
|
||||
description_filename)
|
||||
with open(description_path, "wb") as description_file:
|
||||
description_file.write(description_text.encode('utf-8'))
|
||||
pymeta['extensions']['python.details']['document_names']['description'] = description_filename
|
||||
|
||||
# XXX heuristically copy any LICENSE/LICENSE.txt?
|
||||
license = self.license_file()
|
||||
if license:
|
||||
license_filename = 'LICENSE.txt'
|
||||
shutil.copy(license, os.path.join(self.distinfo_dir, license_filename))
|
||||
pymeta['extensions']['python.details']['document_names']['license'] = license_filename
|
||||
|
||||
with open(metadata_json_path, "w") as metadata_json:
|
||||
json.dump(pymeta, metadata_json, sort_keys=True)
|
||||
|
||||
adios(egginfo_path)
|
||||
|
||||
def write_record(self, bdist_dir, distinfo_dir):
|
||||
from wheel.util import urlsafe_b64encode
|
||||
|
||||
record_path = os.path.join(distinfo_dir, 'RECORD')
|
||||
record_relpath = os.path.relpath(record_path, bdist_dir)
|
||||
|
||||
def walk():
|
||||
for dir, dirs, files in os.walk(bdist_dir):
|
||||
dirs.sort()
|
||||
for f in sorted(files):
|
||||
yield os.path.join(dir, f)
|
||||
|
||||
def skip(path):
|
||||
"""Wheel hashes every possible file."""
|
||||
return (path == record_relpath)
|
||||
|
||||
with open_for_csv(record_path, 'w+') as record_file:
|
||||
writer = csv.writer(record_file)
|
||||
for path in walk():
|
||||
relpath = os.path.relpath(path, bdist_dir)
|
||||
if skip(relpath):
|
||||
hash = ''
|
||||
size = ''
|
||||
else:
|
||||
with open(path, 'rb') as f:
|
||||
data = f.read()
|
||||
digest = hashlib.sha256(data).digest()
|
||||
hash = 'sha256=' + native(urlsafe_b64encode(digest))
|
||||
size = len(data)
|
||||
record_path = os.path.relpath(
|
||||
path, bdist_dir).replace(os.path.sep, '/')
|
||||
writer.writerow((record_path, hash, size))
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for
|
||||
# license information.
|
||||
#--------------------------------------------------------------------------
|
||||
|
||||
from distutils import log as logger
|
||||
import os.path
|
||||
|
||||
#from wheel.bdist_wheel import bdist_wheel
|
||||
class azure_bdist_wheel(bdist_wheel):
|
||||
|
||||
description = "Create an Azure wheel distribution"
|
||||
|
||||
user_options = bdist_wheel.user_options + \
|
||||
[('azure-namespace-package=', None,
|
||||
"Name of the deepest nspkg used")]
|
||||
|
||||
def initialize_options(self):
|
||||
bdist_wheel.initialize_options(self)
|
||||
self.azure_namespace_package = None
|
||||
|
||||
def finalize_options(self):
|
||||
bdist_wheel.finalize_options(self)
|
||||
if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"):
|
||||
raise ValueError("azure_namespace_package must finish by -nspkg")
|
||||
|
||||
def run(self):
|
||||
if not self.distribution.install_requires:
|
||||
self.distribution.install_requires = []
|
||||
self.distribution.install_requires.append(
|
||||
"{}>=2.0.0".format(self.azure_namespace_package.replace('_', '-')))
|
||||
bdist_wheel.run(self)
|
||||
|
||||
def write_record(self, bdist_dir, distinfo_dir):
|
||||
if self.azure_namespace_package:
|
||||
# Split and remove last part, assuming it's "nspkg"
|
||||
subparts = self.azure_namespace_package.split('-')[0:-1]
|
||||
folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))]
|
||||
for azure_sub_package in folder_with_init:
|
||||
init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py')
|
||||
if os.path.isfile(init_file):
|
||||
logger.info("manually remove {} while building the wheel".format(init_file))
|
||||
os.remove(init_file)
|
||||
else:
|
||||
raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file))
|
||||
bdist_wheel.write_record(self, bdist_dir, distinfo_dir)
|
||||
cmdclass = {
|
||||
'bdist_wheel': azure_bdist_wheel,
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
[bdist_wheel]
|
||||
universal=1
|
||||
azure-namespace-package=azure-cli-command_modules-nspkg
|
|
@ -0,0 +1,63 @@
|
|||
#!/usr/bin/env python
|
||||
# --------------------------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# --------------------------------------------------------------------------------------------
|
||||
|
||||
from codecs import open
|
||||
from setuptools import setup
|
||||
|
||||
try:
|
||||
from azure_bdist_wheel import cmdclass
|
||||
except ImportError:
|
||||
from distutils import log as logger
|
||||
logger.warn("Wheel is not available, disabling bdist_wheel hook")
|
||||
cmdclass = {}
|
||||
|
||||
VERSION = "0.1.0"
|
||||
|
||||
# The full list of classifiers is available at
|
||||
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
|
||||
CLASSIFIERS = [
|
||||
'Development Status :: 4 - Beta',
|
||||
'Intended Audience :: Developers',
|
||||
'Intended Audience :: System Administrators',
|
||||
'Programming Language :: Python',
|
||||
'Programming Language :: Python :: 2',
|
||||
'Programming Language :: Python :: 2.7',
|
||||
'Programming Language :: Python :: 3',
|
||||
'Programming Language :: Python :: 3.4',
|
||||
'Programming Language :: Python :: 3.5',
|
||||
'Programming Language :: Python :: 3.6',
|
||||
]
|
||||
|
||||
DEPENDENCIES = [
|
||||
'azure-cli-core',
|
||||
'azure-mgmt-media==1.0.0rc1'
|
||||
]
|
||||
|
||||
with open('README.rst', 'r', encoding='utf-8') as f:
|
||||
README = f.read()
|
||||
with open('HISTORY.rst', 'r', encoding='utf-8') as f:
|
||||
HISTORY = f.read()
|
||||
|
||||
setup(
|
||||
name='azure-cli-ams',
|
||||
version=VERSION,
|
||||
description='Microsoft Azure Command-Line Tools AMS Command Module',
|
||||
long_description=README + '\n\n' + HISTORY,
|
||||
license='MIT',
|
||||
author='Microsoft Corporation',
|
||||
author_email='azpycli@microsoft.com',
|
||||
url='https://github.com/Azure/azure-cli',
|
||||
classifiers=CLASSIFIERS,
|
||||
packages=[
|
||||
'azure',
|
||||
'azure.cli',
|
||||
'azure.cli.command_modules',
|
||||
'azure.cli.command_modules.ams',
|
||||
'azure.cli.command_modules.ams.operations'
|
||||
],
|
||||
install_requires=DEPENDENCIES,
|
||||
cmdclass=cmdclass
|
||||
)
|
Загрузка…
Ссылка в новой задаче