Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ReleasePR videoanalyzer] mgmt, video analyzer java, update readme and description #3293

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/videoanalyzer/HISTORY.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.. :changelog:

Release History
===============

0.1.0
++++++
* Initial release.
116 changes: 116 additions & 0 deletions src/videoanalyzer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
# Azure CLI videoanalyzer Extension #
This is the extension for videoanalyzer

### How to use ###
Install this extension using the below CLI command
```
az extension add --name videoanalyzer
```

### Included Features ###
#### videoanalyzer video-analyzer ####
##### Create #####
```
az videoanalyzer video-analyzer create --account-name "contosotv" --video-analyzer-identity-type "UserAssigned" \
--user-assigned-identities "{\\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1\\":{},\\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2\\":{},\\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id3\\":{}}" \
--location "South Central US" --type "SystemKey" \
--storage-accounts id="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Storage/storageAccounts/storage1" user-assigned-identity="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2" \
--tags tag1="value1" tag2="value2" --resource-group "contoso"
```
##### Show #####
```
az videoanalyzer video-analyzer show --account-name "contosotv" --resource-group "contoso"
```
##### List #####
```
az videoanalyzer video-analyzer list --resource-group "contoso"
```
##### Update #####
```
az videoanalyzer video-analyzer update --account-name "contosotv" --tags key1="value3" --resource-group "contoso"
```
##### Sync-storage-key #####
```
az videoanalyzer video-analyzer sync-storage-key --account-name "contosotv" \
--id "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Storage/storageAccounts/contosotvstore" \
--resource-group "contoso"
```
##### Delete #####
```
az videoanalyzer video-analyzer delete --account-name "contosotv" --resource-group "contoso"
```
#### videoanalyzer edge-module ####
##### Create #####
```
az videoanalyzer edge-module create --account-name "testaccount2" --name "edgeModule1" --resource-group "testrg"
```
##### Show #####
```
az videoanalyzer edge-module show --account-name "testaccount2" --name "edgeModule1" --resource-group "testrg"
```
##### List #####
```
az videoanalyzer edge-module list --account-name "testaccount2" --resource-group "testrg"
```
##### List-provisioning-token #####
```
az videoanalyzer edge-module list-provisioning-token --account-name "testaccount2" --name "edgeModule1" \
--expiration-date "3021-01-23T11:04:49.0526841-08:00" --resource-group "testrg"
```
##### Delete #####
```
az videoanalyzer edge-module delete --account-name "testaccount2" --name "edgeModule1" --resource-group "testrg"
```
#### videoanalyzer video ####
##### Create #####
```
az videoanalyzer video create --account-name "testaccount2" --description "Sample Description 1" \
--title "Sample Title 1" --resource-group "testrg" --name "video1"
```
##### Show #####
```
az videoanalyzer video show --account-name "testaccount2" --resource-group "testrg" --name "video1"
```
##### List #####
```
az videoanalyzer video list --top "2" --account-name "testaccount2" --resource-group "testrg"
```
##### Update #####
```
az videoanalyzer video update --account-name "testaccount2" --description "Parking Lot East Entrance" \
--resource-group "testrg" --name "video1"
```
##### List-streaming-token #####
```
az videoanalyzer video list-streaming-token --account-name "testaccount2" --resource-group "testrg" --name "video3"
```
##### Delete #####
```
az videoanalyzer video delete --account-name "testaccount2" --resource-group "testrg" --name "video1"
```
#### videoanalyzer access-policy ####
##### Create #####
```
az videoanalyzer access-policy create --name "accessPolicyName1" --account-name "testaccount2" \
--authentication "{\\"@type\\":\\"#Microsoft.VideoAnalyzer.JwtAuthentication\\",\\"audiences\\":[\\"audience1\\"],\\"claims\\":[{\\"name\\":\\"claimname1\\",\\"value\\":\\"claimvalue1\\"},{\\"name\\":\\"claimname2\\",\\"value\\":\\"claimvalue2\\"}],\\"issuers\\":[\\"issuer1\\",\\"issuer2\\"],\\"keys\\":[{\\"@type\\":\\"#Microsoft.VideoAnalyzer.RsaTokenKey\\",\\"alg\\":\\"RS256\\",\\"e\\":\\"ZLFzZTY0IQ==\\",\\"kid\\":\\"123\\",\\"n\\":\\"YmFzZTY0IQ==\\"},{\\"@type\\":\\"#Microsoft.VideoAnalyzer.EccTokenKey\\",\\"alg\\":\\"ES256\\",\\"kid\\":\\"124\\",\\"x\\":\\"XX==\\",\\"y\\":\\"YY==\\"}]}" \
--resource-group "testrg"
```
##### Show #####
```
az videoanalyzer access-policy show --name "accessPolicyName1" --account-name "testaccount2" --resource-group "testrg"
```
##### List #####
```
az videoanalyzer access-policy list --top "2" --account-name "testaccount2" --resource-group "testrg"
```
##### Update #####
```
az videoanalyzer access-policy update --name "accessPolicyName1" --account-name "testaccount2" \
--authentication "{\\"@type\\":\\"#Microsoft.VideoAnalyzer.JwtAuthentication\\",\\"keys\\":[{\\"@type\\":\\"#Microsoft.VideoAnalyzer.RsaTokenKey\\",\\"alg\\":\\"RS256\\",\\"e\\":\\"ZLFzZTY0IQ==\\",\\"kid\\":\\"123\\",\\"n\\":\\"YmFzZTY0IQ==\\"},{\\"@type\\":\\"#Microsoft.VideoAnalyzer.EccTokenKey\\",\\"alg\\":\\"Updated\\",\\"kid\\":\\"124\\",\\"x\\":\\"XX==\\",\\"y\\":\\"YY==\\"}]}" \
--resource-group "testrg"
```
##### Delete #####
```
az videoanalyzer access-policy delete --name "accessPolicyName1" --account-name "testaccount2" \
--resource-group "testrg"
```
50 changes: 50 additions & 0 deletions src/videoanalyzer/azext_videoanalyzer/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from azure.cli.core import AzCommandsLoader
from azext_videoanalyzer.generated._help import helps # pylint: disable=unused-import
try:
from azext_videoanalyzer.manual._help import helps # pylint: disable=reimported
except ImportError:
pass


class AzureVideoAnalyzerCommandsLoader(AzCommandsLoader):

def __init__(self, cli_ctx=None):
from azure.cli.core.commands import CliCommandType
from azext_videoanalyzer.generated._client_factory import cf_videoanalyzer_cl
videoanalyzer_custom = CliCommandType(
operations_tmpl='azext_videoanalyzer.custom#{}',
client_factory=cf_videoanalyzer_cl)
parent = super(AzureVideoAnalyzerCommandsLoader, self)
parent.__init__(cli_ctx=cli_ctx, custom_command_type=videoanalyzer_custom)

def load_command_table(self, args):
from azext_videoanalyzer.generated.commands import load_command_table
load_command_table(self, args)
try:
from azext_videoanalyzer.manual.commands import load_command_table as load_command_table_manual
load_command_table_manual(self, args)
except ImportError:
pass
return self.command_table

def load_arguments(self, command):
from azext_videoanalyzer.generated._params import load_arguments
load_arguments(self, command)
try:
from azext_videoanalyzer.manual._params import load_arguments as load_arguments_manual
load_arguments_manual(self, command)
except ImportError:
pass


COMMAND_LOADER_CLS = AzureVideoAnalyzerCommandsLoader
17 changes: 17 additions & 0 deletions src/videoanalyzer/azext_videoanalyzer/action.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
# pylint: disable=wildcard-import
# pylint: disable=unused-wildcard-import

from .generated.action import * # noqa: F403
try:
from .manual.action import * # noqa: F403
except ImportError:
pass
4 changes: 4 additions & 0 deletions src/videoanalyzer/azext_videoanalyzer/azext_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"azext.isExperimental": true,
"azext.minCliCoreVersion": "2.15.0"
}
17 changes: 17 additions & 0 deletions src/videoanalyzer/azext_videoanalyzer/custom.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
# pylint: disable=wildcard-import
# pylint: disable=unused-wildcard-import

from .generated.custom import * # noqa: F403
try:
from .manual.custom import * # noqa: F403
except ImportError:
pass
12 changes: 12 additions & 0 deletions src/videoanalyzer/azext_videoanalyzer/generated/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

__path__ = __import__('pkgutil').extend_path(__path__, __name__)
32 changes: 32 additions & 0 deletions src/videoanalyzer/azext_videoanalyzer/generated/_client_factory.py
Original file line number Diff line number Diff line change
@@ -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.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------


def cf_videoanalyzer_cl(cli_ctx, *_):
from azure.cli.core.commands.client_factory import get_mgmt_service_client
from azext_videoanalyzer.vendored_sdks.videoanalyzer import AzureVideoAnalyzer
return get_mgmt_service_client(cli_ctx,
AzureVideoAnalyzer)


def cf_video_analyzer(cli_ctx, *_):
return cf_videoanalyzer_cl(cli_ctx).video_analyzers


def cf_edge_module(cli_ctx, *_):
return cf_videoanalyzer_cl(cli_ctx).edge_modules


def cf_video(cli_ctx, *_):
return cf_videoanalyzer_cl(cli_ctx).videos


def cf_access_policy(cli_ctx, *_):
return cf_videoanalyzer_cl(cli_ctx).access_policies
Loading