|
16 | 16 | ) |
17 | 17 | class Test(AAZCommand): |
18 | 18 | """Tests whether an output’s datasource is reachable and usable by the Azure Stream Analytics service. |
19 | | -
|
20 | | - :example: Test the connection for an output |
21 | | - az stream-analytics output test --resource-group sjrg2157 --job-name sj6458 --output-name output1755 |
22 | 19 | """ |
23 | 20 |
|
24 | 21 | _aaz_info = { |
@@ -52,52 +49,30 @@ def _build_arguments_schema(cls, *args, **kwargs): |
52 | 49 | id_part="name", |
53 | 50 | ) |
54 | 51 | _args_schema.output_name = AAZStrArg( |
55 | | - options=["--output-name"], |
| 52 | + options=["-n", "--name", "--output-name"], |
56 | 53 | help="The name of the output.", |
57 | 54 | required=True, |
58 | 55 | id_part="child_name_1", |
59 | 56 | ) |
60 | 57 | _args_schema.resource_group = AAZResourceGroupNameArg( |
61 | 58 | required=True, |
62 | 59 | ) |
63 | | - |
64 | | - # define Arg Group "Output" |
65 | | - |
66 | | - _args_schema = cls._args_schema |
67 | | - _args_schema.name = AAZStrArg( |
68 | | - options=["--name"], |
69 | | - arg_group="Output", |
70 | | - help="Resource name", |
71 | | - ) |
72 | | - |
73 | | - # define Arg Group "Properties" |
74 | | - |
75 | | - _args_schema = cls._args_schema |
76 | 60 | _args_schema.datasource = AAZObjectArg( |
77 | 61 | options=["--datasource"], |
78 | | - arg_group="Properties", |
79 | 62 | help="Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests.", |
80 | 63 | ) |
81 | 64 | _args_schema.serialization = AAZObjectArg( |
82 | 65 | options=["--serialization"], |
83 | | - arg_group="Properties", |
84 | 66 | help="Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) requests.", |
85 | 67 | ) |
86 | 68 | _args_schema.size_window = AAZIntArg( |
87 | 69 | options=["--size-window"], |
88 | | - arg_group="Properties", |
89 | 70 | help="The size window to constrain a Stream Analytics output to.", |
90 | 71 | ) |
91 | 72 | _args_schema.time_window = AAZStrArg( |
92 | 73 | options=["--time-window"], |
93 | | - arg_group="Properties", |
94 | 74 | help="The time frame for filtering Stream Analytics job outputs.", |
95 | 75 | ) |
96 | | - _args_schema.watermark_settings = AAZObjectArg( |
97 | | - options=["--watermark-settings"], |
98 | | - arg_group="Properties", |
99 | | - help="Settings which determine whether to send watermarks to downstream.", |
100 | | - ) |
101 | 76 |
|
102 | 77 | datasource = cls._args_schema.datasource |
103 | 78 | datasource.gateway_message_bus = AAZObjectArg( |
@@ -654,6 +629,17 @@ def _build_arguments_schema(cls, *args, **kwargs): |
654 | 629 | enum={"Array": "Array", "LineSeparated": "LineSeparated"}, |
655 | 630 | ) |
656 | 631 |
|
| 632 | + # define Arg Group "Output" |
| 633 | + |
| 634 | + # define Arg Group "Properties" |
| 635 | + |
| 636 | + _args_schema = cls._args_schema |
| 637 | + _args_schema.watermark_settings = AAZObjectArg( |
| 638 | + options=["--watermark-settings"], |
| 639 | + arg_group="Properties", |
| 640 | + help="Settings which determine whether to send watermarks to downstream.", |
| 641 | + ) |
| 642 | + |
657 | 643 | watermark_settings = cls._args_schema.watermark_settings |
658 | 644 | watermark_settings.max_watermark_difference_across_partitions = AAZStrArg( |
659 | 645 | options=["max-watermark-difference-across-partitions"], |
@@ -841,7 +827,6 @@ def content(self): |
841 | 827 | typ=AAZObjectType, |
842 | 828 | typ_kwargs={"flags": {"client_flatten": True}} |
843 | 829 | ) |
844 | | - _builder.set_prop("name", AAZStrType, ".name") |
845 | 830 | _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) |
846 | 831 |
|
847 | 832 | properties = _builder.get(".properties") |
|
0 commit comments