Skip to content

Commit 2c5fde8

Browse files
author
SDKAuto
committed
CodeGen from PR 13227 in Azure/azure-rest-api-specs
Merge 18823c21383323bcec69bc32d7adc394af69b049 into 717f252
1 parent 32ccfec commit 2c5fde8

40 files changed

+3510
-0
lines changed

src/windowsiot/HISTORY.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.. :changelog:
2+
3+
Release History
4+
===============
5+
6+
0.1.0
7+
++++++
8+
* Initial release.

src/windowsiot/README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Azure CLI windowsiotservices Extension #
2+
This is the extension for windowsiotservices
3+
4+
### How to use ###
5+
Install this extension using the below CLI command
6+
```
7+
az extension add --name windowsiotservices
8+
```
9+
10+
### Included Features ###
11+
#### windowsiotservices service ####
12+
##### Create #####
13+
```
14+
az windowsiotservices service create --device-name "service4445" --location "East US" --admin-domain-name "d.e.f" \
15+
--billing-domain-name "a.b.c" --notes "blah" --quantity 1000000 --resource-group "res9101"
16+
```
17+
##### Show #####
18+
```
19+
az windowsiotservices service show --device-name "service8596" --resource-group "res9407"
20+
```
21+
##### List #####
22+
```
23+
az windowsiotservices service list --resource-group "res6117"
24+
```
25+
##### Update #####
26+
```
27+
az windowsiotservices service update --device-name "service8596" --location "East US" --admin-domain-name "d.e.f" \
28+
--billing-domain-name "a.b.c" --notes "blah" --quantity 1000000 --resource-group "res9407"
29+
```
30+
##### Check-device-service-name-availability #####
31+
```
32+
az windowsiotservices service check-device-service-name-availability --name "service3363"
33+
```
34+
##### Delete #####
35+
```
36+
az windowsiotservices service delete --device-name "service2434" --resource-group "res4228"
37+
```
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for
4+
# license information.
5+
#
6+
# Code generated by Microsoft (R) AutoRest Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is
8+
# regenerated.
9+
# --------------------------------------------------------------------------
10+
11+
from azure.cli.core import AzCommandsLoader
12+
from azext_windowsiotservices.generated._help import helps # pylint: disable=unused-import
13+
try:
14+
from azext_windowsiotservices.manual._help import helps # pylint: disable=reimported
15+
except ImportError:
16+
pass
17+
18+
19+
class DeviceServicesCommandsLoader(AzCommandsLoader):
20+
21+
def __init__(self, cli_ctx=None):
22+
from azure.cli.core.commands import CliCommandType
23+
from azext_windowsiotservices.generated._client_factory import cf_windowsiotservices_cl
24+
windowsiotservices_custom = CliCommandType(
25+
operations_tmpl='azext_windowsiotservices.custom#{}',
26+
client_factory=cf_windowsiotservices_cl)
27+
parent = super(DeviceServicesCommandsLoader, self)
28+
parent.__init__(cli_ctx=cli_ctx, custom_command_type=windowsiotservices_custom)
29+
30+
def load_command_table(self, args):
31+
from azext_windowsiotservices.generated.commands import load_command_table
32+
load_command_table(self, args)
33+
try:
34+
from azext_windowsiotservices.manual.commands import load_command_table as load_command_table_manual
35+
load_command_table_manual(self, args)
36+
except ImportError:
37+
pass
38+
return self.command_table
39+
40+
def load_arguments(self, command):
41+
from azext_windowsiotservices.generated._params import load_arguments
42+
load_arguments(self, command)
43+
try:
44+
from azext_windowsiotservices.manual._params import load_arguments as load_arguments_manual
45+
load_arguments_manual(self, command)
46+
except ImportError:
47+
pass
48+
49+
50+
COMMAND_LOADER_CLS = DeviceServicesCommandsLoader
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for
4+
# license information.
5+
#
6+
# Code generated by Microsoft (R) AutoRest Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is
8+
# regenerated.
9+
# --------------------------------------------------------------------------
10+
# pylint: disable=wildcard-import
11+
# pylint: disable=unused-wildcard-import
12+
13+
from .generated.action import * # noqa: F403
14+
try:
15+
from .manual.action import * # noqa: F403
16+
except ImportError:
17+
pass
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"azext.isExperimental": true,
3+
"azext.minCliCoreVersion": "2.15.0"
4+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for
4+
# license information.
5+
#
6+
# Code generated by Microsoft (R) AutoRest Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is
8+
# regenerated.
9+
# --------------------------------------------------------------------------
10+
# pylint: disable=wildcard-import
11+
# pylint: disable=unused-wildcard-import
12+
13+
from .generated.custom import * # noqa: F403
14+
try:
15+
from .manual.custom import * # noqa: F403
16+
except ImportError:
17+
pass
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for
4+
# license information.
5+
#
6+
# Code generated by Microsoft (R) AutoRest Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is
8+
# regenerated.
9+
# --------------------------------------------------------------------------
10+
11+
12+
def cf_windowsiotservices_cl(cli_ctx, *_):
13+
from azure.cli.core.commands.client_factory import get_mgmt_service_client
14+
from azext_windowsiotservices.vendored_sdks.windowsiot import DeviceServices
15+
return get_mgmt_service_client(cli_ctx,
16+
DeviceServices)
17+
18+
19+
def cf_service(cli_ctx, *_):
20+
return cf_windowsiotservices_cl(cli_ctx).services
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for
4+
# license information.
5+
#
6+
# Code generated by Microsoft (R) AutoRest Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is
8+
# regenerated.
9+
# --------------------------------------------------------------------------
10+
# pylint: disable=too-many-lines
11+
12+
from knack.help_files import helps
13+
14+
15+
helps['windowsiotservices service'] = """
16+
type: group
17+
short-summary: Manage service with windowsiotservices
18+
"""
19+
20+
helps['windowsiotservices service list'] = """
21+
type: command
22+
short-summary: "Get all the IoT hubs in a resource group. And Get all the IoT hubs in a subscription."
23+
examples:
24+
- name: Service_ListByResourceGroup
25+
text: |-
26+
az windowsiotservices service list --resource-group "res6117"
27+
- name: Service_List
28+
text: |-
29+
az windowsiotservices service list
30+
"""
31+
32+
helps['windowsiotservices service show'] = """
33+
type: command
34+
short-summary: "Get the non-security related metadata of a Windows IoT Device Service."
35+
examples:
36+
- name: Services_GetProperties
37+
text: |-
38+
az windowsiotservices service show --device-name "service8596" --resource-group "res9407"
39+
"""
40+
41+
helps['windowsiotservices service create'] = """
42+
type: command
43+
short-summary: "Create the metadata of a Windows IoT Device Service. The usual pattern to modify a property is to \
44+
retrieve the Windows IoT Device Service metadata and security metadata, and then combine them with the modified values \
45+
in a new body to update the Windows IoT Device Service."
46+
examples:
47+
- name: Service_Create
48+
text: |-
49+
az windowsiotservices service create --device-name "service4445" --location "East US" \
50+
--admin-domain-name "d.e.f" --billing-domain-name "a.b.c" --notes "blah" --quantity 1000000 --resource-group "res9101"
51+
"""
52+
53+
helps['windowsiotservices service update'] = """
54+
type: command
55+
short-summary: "Updates the metadata of a Windows IoT Device Service. The usual pattern to modify a property is to \
56+
retrieve the Windows IoT Device Service metadata and security metadata, and then combine them with the modified values \
57+
in a new body to update the Windows IoT Device Service."
58+
examples:
59+
- name: Service_Update
60+
text: |-
61+
az windowsiotservices service update --device-name "service8596" --location "East US" \
62+
--admin-domain-name "d.e.f" --billing-domain-name "a.b.c" --notes "blah" --quantity 1000000 --resource-group "res9407"
63+
"""
64+
65+
helps['windowsiotservices service delete'] = """
66+
type: command
67+
short-summary: "Delete a Windows IoT Device Service."
68+
examples:
69+
- name: Service_Delete
70+
text: |-
71+
az windowsiotservices service delete --device-name "service2434" --resource-group "res4228"
72+
"""
73+
74+
helps['windowsiotservices service check-device-service-name-availability'] = """
75+
type: command
76+
short-summary: "Check if a Windows IoT Device Service name is available."
77+
examples:
78+
- name: Service_CheckNameAvailability
79+
text: |-
80+
az windowsiotservices service check-device-service-name-availability --name "service3363"
81+
"""
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for
4+
# license information.
5+
#
6+
# Code generated by Microsoft (R) AutoRest Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is
8+
# regenerated.
9+
# --------------------------------------------------------------------------
10+
# pylint: disable=too-many-lines
11+
# pylint: disable=too-many-statements
12+
13+
from azure.cli.core.commands.parameters import (
14+
tags_type,
15+
resource_group_name_type,
16+
get_location_type
17+
)
18+
from azure.cli.core.commands.validators import get_default_location_from_resource_group
19+
20+
21+
def load_arguments(self, _):
22+
23+
with self.argument_context('windowsiotservices service list') as c:
24+
c.argument('resource_group_name', resource_group_name_type)
25+
26+
with self.argument_context('windowsiotservices service show') as c:
27+
c.argument('resource_group_name', resource_group_name_type)
28+
c.argument('device_name', type=str, help='The name of the Windows IoT Device Service.', id_part='name')
29+
30+
with self.argument_context('windowsiotservices service create') as c:
31+
c.argument('resource_group_name', resource_group_name_type)
32+
c.argument('device_name', type=str, help='The name of the Windows IoT Device Service.')
33+
c.argument('if_match', type=str, help='ETag of the Windows IoT Device Service. Do not specify for creating a '
34+
'new Windows IoT Device Service. Required to update an existing Windows IoT Device Service.')
35+
c.argument('tags', tags_type)
36+
c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False,
37+
validator=get_default_location_from_resource_group)
38+
c.argument('etag', type=str, help='The Etag field is *not* required. If it is provided in the response body, '
39+
'it must also be provided as a header per the normal ETag convention.')
40+
c.argument('notes', type=str, help='Windows IoT Device Service notes.')
41+
c.argument('quantity', type=int, help='Windows IoT Device Service device allocation,')
42+
c.argument('billing_domain_name', type=str, help='Windows IoT Device Service ODM AAD domain')
43+
c.argument('admin_domain_name', type=str, help='Windows IoT Device Service OEM AAD domain')
44+
45+
with self.argument_context('windowsiotservices service update') as c:
46+
c.argument('resource_group_name', resource_group_name_type)
47+
c.argument('device_name', type=str, help='The name of the Windows IoT Device Service.', id_part='name')
48+
c.argument('if_match', type=str, help='ETag of the Windows IoT Device Service. Do not specify for creating a '
49+
'brand new Windows IoT Device Service. Required to update an existing Windows IoT Device Service.')
50+
c.argument('tags', tags_type)
51+
c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False,
52+
validator=get_default_location_from_resource_group)
53+
c.argument('etag', type=str, help='The Etag field is *not* required. If it is provided in the response body, '
54+
'it must also be provided as a header per the normal ETag convention.')
55+
c.argument('notes', type=str, help='Windows IoT Device Service notes.')
56+
c.argument('quantity', type=int, help='Windows IoT Device Service device allocation,')
57+
c.argument('billing_domain_name', type=str, help='Windows IoT Device Service ODM AAD domain')
58+
c.argument('admin_domain_name', type=str, help='Windows IoT Device Service OEM AAD domain')
59+
60+
with self.argument_context('windowsiotservices service delete') as c:
61+
c.argument('resource_group_name', resource_group_name_type)
62+
c.argument('device_name', type=str, help='The name of the Windows IoT Device Service.', id_part='name')
63+
64+
with self.argument_context('windowsiotservices service check-device-service-name-availability') as c:
65+
c.argument('name', type=str, help='The name of the Windows IoT Device Service to check.')

0 commit comments

Comments
 (0)