Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ def load_arguments(self, _):
c.argument('unique_dns_name', help="Relative DNS name for the traffic manager profile. Resulting FQDN will be `<unique-dns-name>.trafficmanager.net` and must be globally unique.")
c.argument('max_return', help="Maximum number of endpoints to be returned for MultiValue routing type.", type=int)
c.argument('ttl', help='DNS config time-to-live in seconds.', type=int)
c.argument('record_type', help='When record type is set, a traffic manager profile will allow only endpoints that match this type.', arg_type=get_enum_type(['A', 'AAAA', 'CNAME']))
c.argument('record_type', help='When record type is set, a traffic manager profile will allow only endpoints that match this type. If it is not set, traffic manager profile will allow adding all types of endpoints. It is returned as null when this is not set.', arg_type=get_enum_type(['A', 'AAAA', 'CNAME']))

with self.argument_context('network traffic-manager profile', arg_group='Monitor Configuration') as c:
c.argument('monitor_path', help='Path to monitor. Use ""(\'""\' in PowerShell) for none.', options_list=['--path', c.deprecate(target='--monitor-path', redirect='--path', hide=True)])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ class Create(AAZCommand):
"""

_aaz_info = {
"version": "2024-04-01-preview",
"version": "2026-09-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/trafficmanagerprofiles/{}/{}/{}", "2024-04-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/trafficmanagerprofiles/{}/{}/{}", "2026-09-01"],
]
}

Expand Down Expand Up @@ -252,7 +252,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-04-01-preview",
"api-version", "2026-09-01",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ class Delete(AAZCommand):
"""

_aaz_info = {
"version": "2024-04-01-preview",
"version": "2026-09-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/trafficmanagerprofiles/{}/{}/{}", "2024-04-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/trafficmanagerprofiles/{}/{}/{}", "2026-09-01"],
]
}

Expand Down Expand Up @@ -142,7 +142,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-04-01-preview",
"api-version", "2026-09-01",
required=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": "2024-04-01-preview",
"version": "2026-09-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/trafficmanagerprofiles/{}/{}/{}", "2024-04-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/trafficmanagerprofiles/{}/{}/{}", "2026-09-01"],
]
}

Expand Down Expand Up @@ -141,7 +141,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-04-01-preview",
"api-version", "2026-09-01",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class ShowGeographicHierarchy(AAZCommand):
"""

_aaz_info = {
"version": "2024-04-01-preview",
"version": "2026-09-01",
"resources": [
["mgmt-plane", "/providers/microsoft.network/trafficmanagergeographichierarchies/default", "2024-04-01-preview"],
["mgmt-plane", "/providers/microsoft.network/trafficmanagergeographichierarchies/default", "2026-09-01"],
]
}

Expand Down Expand Up @@ -80,7 +80,7 @@ def error_format(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-04-01-preview",
"api-version", "2026-09-01",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ class Update(AAZCommand):
"""

_aaz_info = {
"version": "2024-04-01-preview",
"version": "2026-09-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/trafficmanagerprofiles/{}/{}/{}", "2024-04-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/trafficmanagerprofiles/{}/{}/{}", "2026-09-01"],
]
}

Expand Down Expand Up @@ -302,7 +302,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-04-01-preview",
"api-version", "2026-09-01",
required=True,
),
}
Expand Down Expand Up @@ -393,7 +393,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-04-01-preview",
"api-version", "2026-09-01",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class CheckDns(AAZCommand):
"""

_aaz_info = {
"version": "2024-04-01-preview",
"version": "2026-09-01",
"resources": [
["mgmt-plane", "/providers/microsoft.network/checktrafficmanagernameavailability", "2024-04-01-preview"],
["mgmt-plane", "/providers/microsoft.network/checktrafficmanagernameavailability", "2026-09-01"],
]
}

Expand Down Expand Up @@ -104,7 +104,7 @@ def error_format(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-04-01-preview",
"api-version", "2026-09-01",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ class Create(AAZCommand):
"""Create a Traffic Manager profile.

:example: Create a traffic manager profile with performance routing.
az network traffic-manager profile create -g MyResourceGroup -n MyTmProfile --routing-method Performance --unique-dns-name mywebapp --ttl 30 --protocol HTTP --port 80 --path "/"
az network traffic-manager profile create -g MyResourceGroup -n MyTmProfile --routing-method Performance --unique-dns-name mywebapp --ttl 30 --protocol HTTP --port 80 --path "/" --record-type A

:example: Create a traffic manager profile.
az network traffic-manager profile create -n MyTmProfile -g MyResourceGroup --routing-method subnet --unique-dns-name mywebapp --custom-headers [{name:foo,value:bar}] --status-code-ranges [{min:200,max:202}] --path "/"
az network traffic-manager profile create -n MyTmProfile -g MyResourceGroup --routing-method subnet --unique-dns-name mywebapp --custom-headers [{name:foo,value:bar}] --status-code-ranges [{min:200,max:202}] --path "/" --record-type A
"""

_aaz_info = {
"version": "2024-04-01-preview",
"version": "2026-09-01",
Comment thread
ransinha1989 marked this conversation as resolved.
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/trafficmanagerprofiles/{}", "2024-04-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/trafficmanagerprofiles/{}", "2026-09-01"],
]
}

Expand Down Expand Up @@ -184,7 +184,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
_args_schema.record_type = AAZStrArg(
options=["--record-type"],
arg_group="Properties",
help="When record type is set, a traffic manager profile will allow only endpoints that match this type.",
help="When record type is set, a traffic manager profile will allow only endpoints that match this type. If it is not set, traffic manager profile will allow adding all types of endpoints. It is returned as null when this is not set.",
enum={"A": "A", "AAAA": "AAAA", "CNAME": "CNAME"},
)
_args_schema.routing_method = AAZStrArg(
Expand Down Expand Up @@ -260,7 +260,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-04-01-preview",
"api-version", "2026-09-01",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ class Delete(AAZCommand):
"""

_aaz_info = {
"version": "2024-04-01-preview",
"version": "2026-09-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/trafficmanagerprofiles/{}", "2024-04-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/trafficmanagerprofiles/{}", "2026-09-01"],
]
}

Expand Down Expand Up @@ -121,7 +121,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-04-01-preview",
"api-version", "2026-09-01",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ class List(AAZCommand):
"""

_aaz_info = {
"version": "2024-04-01-preview",
"version": "2026-09-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/providers/microsoft.network/trafficmanagerprofiles", "2024-04-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/trafficmanagerprofiles", "2024-04-01-preview"],
["mgmt-plane", "/subscriptions/{}/providers/microsoft.network/trafficmanagerprofiles", "2026-09-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/trafficmanagerprofiles", "2026-09-01"],
]
}

Expand Down Expand Up @@ -110,7 +110,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-04-01-preview",
"api-version", "2026-09-01",
required=True,
),
}
Expand Down Expand Up @@ -353,7 +353,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-04-01-preview",
"api-version", "2026-09-01",
required=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": "2024-04-01-preview",
"version": "2026-09-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/trafficmanagerprofiles/{}", "2024-04-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/trafficmanagerprofiles/{}", "2026-09-01"],
]
}

Expand Down Expand Up @@ -120,7 +120,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-04-01-preview",
"api-version", "2026-09-01",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,15 @@ class Update(AAZCommand):

:example: Update a traffic manager profile.
az network traffic-manager profile update -n MyTmProfile -g MyResourceGroup --status-code-ranges [{min:200,max:204}] --custom-headers [{name:foo,value:doo},{name:test,value:best}]

:example: Set the record type on a traffic manager profile where it is not already set.
az network traffic-manager profile update -g MyResourceGroup -n MyTmProfile --record-type A
"""

_aaz_info = {
"version": "2024-04-01-preview",
"version": "2026-09-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/trafficmanagerprofiles/{}", "2024-04-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/trafficmanagerprofiles/{}", "2026-09-01"],
]
}

Expand Down Expand Up @@ -195,7 +198,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
_args_schema.record_type = AAZStrArg(
options=["--record-type"],
arg_group="Properties",
help="When record type is set, a traffic manager profile will allow only endpoints that match this type.",
help="When record type is set, a traffic manager profile will allow only endpoints that match this type. If it is not set, traffic manager profile will allow adding all types of endpoints. It is returned as null when this is not set.",
nullable=True,
enum={"A": "A", "AAAA": "AAAA", "CNAME": "CNAME"},
)
Expand Down Expand Up @@ -286,7 +289,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-04-01-preview",
"api-version", "2026-09-01",
required=True,
),
}
Expand Down Expand Up @@ -369,7 +372,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-04-01-preview",
"api-version", "2026-09-01",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ interactions:
User-Agent:
- AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.8 (Windows-10-10.0.26058-SP0)
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns_alias000001/providers/Microsoft.Network/trafficmanagerprofiles/tm1?api-version=2024-04-01-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns_alias000001/providers/Microsoft.Network/trafficmanagerprofiles/tm1?api-version=2026-09-01
response:
body:
string: '{"id":"\/subscriptions\/00000000-0000-0000-0000-000000000000\/resourceGroups\/cli_test_dns_alias000001\/providers\/Microsoft.Network\/trafficManagerProfiles\/tm1","name":"tm1","type":"Microsoft.Network\/trafficManagerProfiles","location":"global","properties":{"profileStatus":"Enabled","trafficRoutingMethod":"Performance","dnsConfig":{"relativeName":"mytesttrafficmanager12","fqdn":"mytesttrafficmanager12.preprodtrafficmanager.azure","ttl":30},"monitorConfig":{"profileMonitorStatus":"Inactive","protocol":"HTTP","port":80,"path":"\/","intervalInSeconds":30,"toleratedNumberOfFailures":3,"timeoutInSeconds":10},"endpoints":[],"trafficViewEnrollmentStatus":"Disabled","maxReturn":null}}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ interactions:
User-Agent:
- AZURECLI/2.67.0 azsdk-python-core/1.28.0 Python/3.8.10 (Windows-10-10.0.26100-SP0)
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns_tmlink000001/providers/Microsoft.Network/trafficmanagerprofiles/tm2?api-version=2024-04-01-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns_tmlink000001/providers/Microsoft.Network/trafficmanagerprofiles/tm2?api-version=2026-09-01
response:
body:
string: '{"id":"\/subscriptions\/00000000-0000-0000-0000-000000000000\/resourceGroups\/cli_test_dns_tmlink000001\/providers\/Microsoft.Network\/trafficManagerProfiles\/tm2","name":"tm2","type":"Microsoft.Network\/trafficManagerProfiles","location":"global","properties":{"profileStatus":"Enabled","trafficRoutingMethod":"Performance","dnsConfig":{"relativeName":"mytesttrafficmanager2","fqdn":"mytesttrafficmanager2.trafficmanager.net","ttl":30},"monitorConfig":{"profileMonitorStatus":"Inactive","protocol":"HTTP","port":80,"path":"\/","intervalInSeconds":30,"toleratedNumberOfFailures":3,"timeoutInSeconds":10},"endpoints":[],"trafficViewEnrollmentStatus":"Disabled","maxReturn":null,"recordType":null}}'
Expand Down
Loading
Loading