Skip to content
Open
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
42 changes: 42 additions & 0 deletions src/front-door/azext_front_door/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
helps['network front-door create'] = """
type: command
short-summary: Create a Front Door.
examples:
- name: Create a Front Door.
text: az network front-door create -g rg -n frontdoor --backend-address 202.120.2.3
"""

helps['network front-door list'] = """
Expand Down Expand Up @@ -69,6 +72,9 @@
Since a backend pool must contain a backend, this command
also creates the first backend. To add additional backends,
use the `az network front-door backend-pool backend add` command.
examples:
- name: Create a Front Door backend pool.
text: az network front-door backend-pool create -f frontdoor -g rg -n bkp1 --address 202.120.2.3 --load-balancing DefaultLoadBalancingSettings --probe DefaultProbeSettings
"""

helps['network front-door backend-pool list'] = """
Expand Down Expand Up @@ -96,6 +102,9 @@
helps['network front-door backend-pool backend add'] = """
type: command
short-summary: Add a backend to a Front Door backend pool.
examples:
- name: Add a backend to a Front Door backend pool.
text: az network front-door backend-pool backend add -g rg --front-door-name myfrontdoor --pool-name pool --address 202.120.2.3 --backend-host-header "" --disabled true --http-port 80 --https-port 443 --priority 2 --weight 1
"""

helps['network front-door backend-pool backend update'] = """
Expand Down Expand Up @@ -123,6 +132,9 @@
helps['network front-door frontend-endpoint create'] = """
type: command
short-summary: Create a Front Door frontend endpoint.
examples:
- name: Create a Front Door frontend endpoint.
text: az network front-door frontend-endpoint create -g rg -f frontdoor -n endpoint --host-name www.contoso.com --session-affinity-enabled
"""

helps['network front-door frontend-endpoint list'] = """
Expand Down Expand Up @@ -171,6 +183,9 @@
helps['network front-door load-balancing create'] = """
type: command
short-summary: Create Front Door load-balancing settings.
examples:
- name: Create Front Door load-balancing settings.
text: az network front-door load-balancing create -f frontdoor -g rg -n lb --sample-size 5 --successful-samples-required 1 --additional-latency 100
"""

helps['network front-door load-balancing list'] = """
Expand Down Expand Up @@ -203,6 +218,9 @@
helps['network front-door probe create'] = """
type: command
short-summary: Create Front Door health probe settings.
examples:
- name: Create Front Door health probe settings.
text: az network front-door probe create -f frontdoor -g rg -n pb --interval 100 --path /abc --enabled Disabled --probeMethod GET --protocol Http
"""

helps['network front-door probe list'] = """
Expand Down Expand Up @@ -289,6 +307,9 @@
This command allows creating Rules Engine configuration with Header
action type. To add additional actions like Route overrides,
use the `az network front-door rules-engine rule action add` command.
examples:
- name: Create a Rules Engine rule for a Front Door.
text: az network front-door rules-engine rule create -f frontdoor -g rg --rules-engine-name rulesengine --name rule --priority 2 --action-type ResponseHeader --header-action Append --header-name Security --header-value Strict --match-variable RequestPath --operator Contains --match-values private
"""

helps['network front-door rules-engine rule update'] = """
Expand Down Expand Up @@ -319,6 +340,9 @@
helps['network front-door rules-engine rule action add'] = """
type: command
short-summary: Add an action to a Rules Engine rule.
examples:
- name: Add an action to a Rules Engine rule.
text: az network front-door rules-engine rule action add -f frontdoor -g rg -r rulesengine --name rule1 --action-type RedirectRouteOverride --custom-path /redirect
"""

helps['network front-door rules-engine rule action list'] = """
Expand All @@ -339,6 +363,9 @@
helps['network front-door rules-engine rule condition add'] = """
type: command
short-summary: Add a match condition to a Rules Engine rule.
examples:
- name: Add a match condition to a Rules Engine rule.
text: az network front-door rules-engine rule condition add -f frontdoor -g rg -r rulesengine --name rule1 --match-variable RequestPath --operator Any
"""

helps['network front-door rules-engine rule condition list'] = """
Expand All @@ -361,6 +388,9 @@
helps['network front-door waf-policy create'] = """
type: command
short-summary: Create a WAF policy.
examples:
- name: Create a WAF policy.
text: az network front-door waf-policy create -g rg -n policy --mode prevention
"""

helps['network front-door waf-policy list'] = """
Expand Down Expand Up @@ -409,6 +439,9 @@
Variable allowed values: {variables}

Operator allowed values: {operators}
examples:
- name: Add a match-condition to a WAF policy custom rule.
text: az network front-door waf-policy rule match-condition add -g rg --policy-name policy -n custom1 --match-variable RequestBody --operator RegEx --values "hello"
""".format(
variables=', '.join([x.value for x in MatchVariable]),
operators=', '.join([x.value for x in Operator])
Expand Down Expand Up @@ -459,6 +492,9 @@
short-summary: Add a managed rule set to a WAF policy.
long-summary: >
Use 'az network front-door waf-policy managed-rule-definition list' to see the available managed rulesets.
examples:
- name: Add a managed rule set to a WAF policy.
text: az network front-door waf-policy managed-rules add -g rg --policy-name policy1 --type DefaultRuleSet --version 1.0
"""

helps['network front-door waf-policy managed-rules remove'] = """
Expand All @@ -471,6 +507,9 @@
short-summary: Add an override on a managed rule within a managed rule set.
long-summary: >
Use 'az network front-door waf-policy managed-rule-definition list' to see the available rules.
examples:
- name: Add an override on a managed rule within a managed rule set.
text: az network front-door waf-policy managed-rules override add -g rg --policy-name policy1 --type DefaultRuleSet --rule-group-id SQLI --rule-id id --action Block --disabled
"""

helps['network front-door waf-policy managed-rules override remove'] = """
Expand Down Expand Up @@ -499,6 +538,9 @@
long-summary: >
Prevents the rule set, rule group, or rule from being applied to the content of the specified variable.
Use 'az network front-door waf-policy managed-rule-definition list' to see the available rules.
examples:
- name: Add an exclusion on a managed rule set, rule group, or rule within a managed rule set.
text: az network front-door waf-policy managed-rules exclusion add -g rg --policy-name policy1 --type DefaultRuleSet --match-variable RequestHeaderNames --operator Contains --value ignoreme
"""

helps['network front-door waf-policy managed-rules exclusion remove'] = """
Expand Down
Loading