az network-function traffic-collector collector-policy

Note

This reference is part of the traffic-collector extension for the Azure CLI (version 2.40.0 or higher). The extension will automatically install the first time you run an az network-function traffic-collector collector-policy command. Learn more about extensions.

Manage Collector Policy for Azure Traffic Collector resource.

Commands

Name Description Type Status
az network-function traffic-collector collector-policy create

Create a Collector Policy.

Extension GA
az network-function traffic-collector collector-policy delete

Delete a specified Collector Policy.

Extension GA
az network-function traffic-collector collector-policy list

List Collector policies.

Extension GA
az network-function traffic-collector collector-policy show

Get the specified Collector Policy.

Extension GA
az network-function traffic-collector collector-policy update

Update a specified Collector Policy.

Extension GA
az network-function traffic-collector collector-policy wait

Place the CLI in a waiting state until a condition is met.

Extension GA

az network-function traffic-collector collector-policy create

Create a Collector Policy.

az network-function traffic-collector collector-policy create --collector-policy-name
                                                              --resource-group
                                                              --traffic-collector-name
                                                              [--emission-policies]
                                                              [--ingestion-policy]
                                                              [--location]
                                                              [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                                              [--tags]

Examples

Create a new collector policy

az network-function traffic-collector collector-policy create --resource-group rg1 --traffic-collector-name atc1 --name cp1 --location eastus --ingestion-policy {ingestion-sources:[{resource-id:/subscriptions/<subscription_id>/resourceGroups/<resource_group>/providers/Microsoft.Network/expressRouteCircuits/<cp_name>,source-type:Resource}],ingestion-type:IPFIX}

Required Parameters

--collector-policy-name --name -n

Collector Policy Name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--traffic-collector-name -t

Azure Traffic Collector name.

Optional Parameters

--emission-policies

Emission policies. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--ingestion-policy

Ingestion policies. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--location -l

Resource location. When not specified, the location of the resource group will be used.

--no-wait

Do not wait for the long-running operation to finish.

accepted values: 0, 1, f, false, n, no, t, true, y, yes
--tags

Resource tags. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az network-function traffic-collector collector-policy delete

Delete a specified Collector Policy.

az network-function traffic-collector collector-policy delete [--collector-policy-name]
                                                              [--ids]
                                                              [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                                              [--resource-group]
                                                              [--subscription]
                                                              [--traffic-collector-name]
                                                              [--yes]

Examples

Delete a specified collector policy

az network-function traffic-collector collector-policy delete --resource-group rg1 --traffic-collector-name atc1 --name cp1

Optional Parameters

--collector-policy-name --name -n

Collector Policy Name.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--no-wait

Do not wait for the long-running operation to finish.

accepted values: 0, 1, f, false, n, no, t, true, y, yes
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--traffic-collector-name -t

Azure Traffic Collector name.

--yes -y

Do not prompt for confirmation.

default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az network-function traffic-collector collector-policy list

List Collector policies.

az network-function traffic-collector collector-policy list --resource-group
                                                            --traffic-collector-name

Examples

Return a list of collector policies by resource group and traffic-collector name

az network-function traffic-collector collector-policy list --resource-group rg1 --traffic-collector-name atc1

Required Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--traffic-collector-name -t

Azure Traffic Collector name.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az network-function traffic-collector collector-policy show

Get the specified Collector Policy.

az network-function traffic-collector collector-policy show [--collector-policy-name]
                                                            [--ids]
                                                            [--resource-group]
                                                            [--subscription]
                                                            [--traffic-collector-name]

Examples

Get the specified collector policy

az network-function traffic-collector collector-policy show --resource-group rg1 --traffic-collector-name atc1 --name cp1

Optional Parameters

--collector-policy-name --name -n

Collector Policy Name.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--traffic-collector-name -t

Azure Traffic Collector name.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az network-function traffic-collector collector-policy update

Update a specified Collector Policy.

az network-function traffic-collector collector-policy update [--add]
                                                              [--collector-policy-name]
                                                              [--emission-policies]
                                                              [--force-string {0, 1, f, false, n, no, t, true, y, yes}]
                                                              [--ids]
                                                              [--ingestion-policy]
                                                              [--location]
                                                              [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                                              [--remove]
                                                              [--resource-group]
                                                              [--set]
                                                              [--subscription]
                                                              [--tags]
                                                              [--traffic-collector-name]

Examples

Update a specified collector policy

az network-function traffic-collector collector-policy update --resource-group rg1 --traffic-collector-name atc1 --name cp1 --location eastus --emission-policies [0]={emission-destinations:[{destination-type:AzureMonitor}],emission-type:IPFIX}

Optional Parameters

--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.

--collector-policy-name --name -n

Collector Policy Name.

--emission-policies

Emission policies. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

accepted values: 0, 1, f, false, n, no, t, true, y, yes
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--ingestion-policy

Ingestion policies. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--location -l

Resource location.

--no-wait

Do not wait for the long-running operation to finish.

accepted values: 0, 1, f, false, n, no, t, true, y, yes
--remove

Remove a property or an element from a list. Example: --remove property.list OR --remove propertyToRemove.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--tags

Resource tags. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--traffic-collector-name -t

Azure Traffic Collector name.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az network-function traffic-collector collector-policy wait

Place the CLI in a waiting state until a condition is met.

az network-function traffic-collector collector-policy wait [--collector-policy-name]
                                                            [--created]
                                                            [--custom]
                                                            [--deleted]
                                                            [--exists]
                                                            [--ids]
                                                            [--interval]
                                                            [--resource-group]
                                                            [--subscription]
                                                            [--timeout]
                                                            [--traffic-collector-name]
                                                            [--updated]

Optional Parameters

--collector-policy-name --name -n

Collector Policy Name.

--created

Wait until created with 'provisioningState' at 'Succeeded'.

default value: False
--custom

Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].

--deleted

Wait until deleted.

default value: False
--exists

Wait until the resource exists.

default value: False
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--interval

Polling interval in seconds.

default value: 30
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--timeout

Maximum wait in seconds.

default value: 3600
--traffic-collector-name -t

Azure Traffic Collector name.

--updated

Wait until updated with provisioningState at 'Succeeded'.

default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.