Skip to content

Commit

Permalink
[monitor-control-service] Update api-version with issue fix (#7616)
Browse files Browse the repository at this point in the history
* add api-version update and enum support extension
  • Loading branch information
AllyW authored Jun 13, 2024
1 parent 39bf141 commit 08dbb4c
Show file tree
Hide file tree
Showing 28 changed files with 2,871 additions and 1,267 deletions.
6 changes: 6 additions & 0 deletions src/monitor-control-service/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
Release History
===============
1.1.0
++++++
* Update api-version to `2023-03-11`
* Change default arg type of empty object to be `AAZFreeFormDictArg` to fix deserialization issue
* Add `enum_support_extension` for Enum arg type

1.0.2
++++++
* `az monitor data-collection rule/endpoint`: Removed the enum limitation for the `--kind` parameter.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class Create(AAZCommand):
"""

_aaz_info = {
"version": "2022-06-01",
"version": "2023-03-11",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.insights/datacollectionendpoints/{}", "2022-06-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.insights/datacollectionendpoints/{}", "2023-03-11"],
]
}

Expand Down Expand Up @@ -58,7 +58,9 @@ def _build_arguments_schema(cls, *args, **kwargs):
)
_args_schema.kind = AAZStrArg(
options=["--kind"],
help="The kind of the resource. Such as `Linux`, `Windows`.",
help="The kind of the resource.",
enum={"Linux": "Linux", "Windows": "Windows"},
enum_support_extension=True,
)
_args_schema.location = AAZResourceLocationArg(
help="The geo-location where the resource lives.",
Expand All @@ -81,6 +83,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
help="Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).",
required=True,
enum={"None": "None", "SystemAssigned": "SystemAssigned", "SystemAssigned,UserAssigned": "SystemAssigned,UserAssigned", "UserAssigned": "UserAssigned"},
enum_support_extension=True,
)
identity.user_assigned_identities = AAZDictArg(
options=["user-assigned-identities"],
Expand All @@ -104,6 +107,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
arg_group="Network Acls",
help="The configuration to set whether network access from public internet to the endpoints are allowed.",
enum={"Disabled": "Disabled", "Enabled": "Enabled", "SecuredByPerimeter": "SecuredByPerimeter"},
enum_support_extension=True,
)

# define Arg Group "Properties"
Expand Down Expand Up @@ -174,7 +178,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-06-01",
"api-version", "2023-03-11",
required=True,
),
}
Expand Down Expand Up @@ -367,6 +371,10 @@ def _build_schema_on_200_201(cls):
serialized_name="provisionedBy",
flags={"read_only": True},
)
metadata.provisioned_by_immutable_id = AAZStrType(
serialized_name="provisionedByImmutableId",
flags={"read_only": True},
)
metadata.provisioned_by_resource_id = AAZStrType(
serialized_name="provisionedByResourceId",
flags={"read_only": True},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ class Delete(AAZCommand):
"""

_aaz_info = {
"version": "2022-06-01",
"version": "2023-03-11",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.insights/datacollectionendpoints/{}", "2022-06-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.insights/datacollectionendpoints/{}", "2023-03-11"],
]
}

Expand Down Expand Up @@ -119,7 +119,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-06-01",
"api-version", "2023-03-11",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ class List(AAZCommand):
"""

_aaz_info = {
"version": "2022-06-01",
"version": "2023-03-11",
"resources": [
["mgmt-plane", "/subscriptions/{}/providers/microsoft.insights/datacollectionendpoints", "2022-06-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.insights/datacollectionendpoints", "2022-06-01"],
["mgmt-plane", "/subscriptions/{}/providers/microsoft.insights/datacollectionendpoints", "2023-03-11"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.insights/datacollectionendpoints", "2023-03-11"],
]
}

Expand Down Expand Up @@ -119,7 +119,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-06-01",
"api-version", "2023-03-11",
required=True,
),
}
Expand Down Expand Up @@ -283,6 +283,10 @@ def _build_schema_on_200(cls):
serialized_name="provisionedBy",
flags={"read_only": True},
)
metadata.provisioned_by_immutable_id = AAZStrType(
serialized_name="provisionedByImmutableId",
flags={"read_only": True},
)
metadata.provisioned_by_resource_id = AAZStrType(
serialized_name="provisionedByResourceId",
flags={"read_only": True},
Expand Down Expand Up @@ -374,7 +378,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-06-01",
"api-version", "2023-03-11",
required=True,
),
}
Expand Down Expand Up @@ -538,6 +542,10 @@ def _build_schema_on_200(cls):
serialized_name="provisionedBy",
flags={"read_only": True},
)
metadata.provisioned_by_immutable_id = AAZStrType(
serialized_name="provisionedByImmutableId",
flags={"read_only": True},
)
metadata.provisioned_by_resource_id = AAZStrType(
serialized_name="provisionedByResourceId",
flags={"read_only": True},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class Show(AAZCommand):
"""

_aaz_info = {
"version": "2022-06-01",
"version": "2023-03-11",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.insights/datacollectionendpoints/{}", "2022-06-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.insights/datacollectionendpoints/{}", "2023-03-11"],
]
}

Expand Down Expand Up @@ -120,7 +120,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-06-01",
"api-version", "2023-03-11",
required=True,
),
}
Expand Down Expand Up @@ -273,6 +273,10 @@ def _build_schema_on_200(cls):
serialized_name="provisionedBy",
flags={"read_only": True},
)
metadata.provisioned_by_immutable_id = AAZStrType(
serialized_name="provisionedByImmutableId",
flags={"read_only": True},
)
metadata.provisioned_by_resource_id = AAZStrType(
serialized_name="provisionedByResourceId",
flags={"read_only": True},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class Update(AAZCommand):
"""

_aaz_info = {
"version": "2022-06-01",
"version": "2023-03-11",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.insights/datacollectionendpoints/{}", "2022-06-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.insights/datacollectionendpoints/{}", "2023-03-11"],
]
}

Expand Down Expand Up @@ -62,8 +62,10 @@ def _build_arguments_schema(cls, *args, **kwargs):
)
_args_schema.kind = AAZStrArg(
options=["--kind"],
help="The kind of the resource. Such as `Linux`, `Windows`.",
help="The kind of the resource.",
nullable=True,
enum={"Linux": "Linux", "Windows": "Windows"},
enum_support_extension=True,
)
_args_schema.description = AAZStrArg(
options=["--description"],
Expand All @@ -81,6 +83,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
options=["type"],
help="Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).",
enum={"None": "None", "SystemAssigned": "SystemAssigned", "SystemAssigned,UserAssigned": "SystemAssigned,UserAssigned", "UserAssigned": "UserAssigned"},
enum_support_extension=True,
)
identity.user_assigned_identities = AAZDictArg(
options=["user-assigned-identities"],
Expand Down Expand Up @@ -108,6 +111,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
help="The configuration to set whether network access from public internet to the endpoints are allowed.",
nullable=True,
enum={"Disabled": "Disabled", "Enabled": "Enabled", "SecuredByPerimeter": "SecuredByPerimeter"},
enum_support_extension=True,
)

# define Arg Group "Properties"
Expand Down Expand Up @@ -191,7 +195,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-06-01",
"api-version", "2023-03-11",
required=True,
),
}
Expand Down Expand Up @@ -274,7 +278,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-06-01",
"api-version", "2023-03-11",
required=True,
),
}
Expand Down Expand Up @@ -513,6 +517,10 @@ def _build_schema_data_collection_endpoint_resource_read(cls, _schema):
serialized_name="provisionedBy",
flags={"read_only": True},
)
metadata.provisioned_by_immutable_id = AAZStrType(
serialized_name="provisionedByImmutableId",
flags={"read_only": True},
)
metadata.provisioned_by_resource_id = AAZStrType(
serialized_name="provisionedByResourceId",
flags={"read_only": True},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ class List(AAZCommand):
"""

_aaz_info = {
"version": "2022-06-01",
"version": "2023-03-11",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.insights/datacollectionendpoints/{}/associations", "2022-06-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.insights/datacollectionendpoints/{}/associations", "2023-03-11"],
]
}

Expand Down Expand Up @@ -118,7 +118,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-06-01",
"api-version", "2023-03-11",
required=True,
),
}
Expand Down Expand Up @@ -203,6 +203,10 @@ def _build_schema_on_200(cls):
serialized_name="provisionedBy",
flags={"read_only": True},
)
metadata.provisioned_by_immutable_id = AAZStrType(
serialized_name="provisionedByImmutableId",
flags={"read_only": True},
)
metadata.provisioned_by_resource_id = AAZStrType(
serialized_name="provisionedByResourceId",
flags={"read_only": True},
Expand Down
Loading

0 comments on commit 08dbb4c

Please sign in to comment.