azure-native.networkfunction.CollectorPolicy
Explore with Pulumi AI
Collector policy resource. API Version: 2022-05-01.
Example Usage
Create a collection policy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var collectorPolicy = new AzureNative.NetworkFunction.CollectorPolicy("collectorPolicy", new()
{
AzureTrafficCollectorName = "atc",
CollectorPolicyName = "cp1",
EmissionPolicies = new[]
{
new AzureNative.NetworkFunction.Inputs.EmissionPoliciesPropertiesFormatArgs
{
EmissionDestinations = new[]
{
new AzureNative.NetworkFunction.Inputs.EmissionPolicyDestinationArgs
{
DestinationType = "AzureMonitor",
},
},
EmissionType = "IPFIX",
},
},
IngestionPolicy = new AzureNative.NetworkFunction.Inputs.IngestionPolicyPropertiesFormatArgs
{
IngestionSources = new[]
{
new AzureNative.NetworkFunction.Inputs.IngestionSourcesPropertiesFormatArgs
{
ResourceId = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteCircuits/circuitName",
SourceType = "Resource",
},
},
IngestionType = "IPFIX",
},
ResourceGroupName = "rg1",
});
});
package main
import (
networkfunction "github.com/pulumi/pulumi-azure-native-sdk/networkfunction"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := networkfunction.NewCollectorPolicy(ctx, "collectorPolicy", &networkfunction.CollectorPolicyArgs{
AzureTrafficCollectorName: pulumi.String("atc"),
CollectorPolicyName: pulumi.String("cp1"),
EmissionPolicies: []networkfunction.EmissionPoliciesPropertiesFormatArgs{
{
EmissionDestinations: networkfunction.EmissionPolicyDestinationArray{
{
DestinationType: pulumi.String("AzureMonitor"),
},
},
EmissionType: pulumi.String("IPFIX"),
},
},
IngestionPolicy: networkfunction.IngestionPolicyPropertiesFormatResponse{
IngestionSources: networkfunction.IngestionSourcesPropertiesFormatArray{
&networkfunction.IngestionSourcesPropertiesFormatArgs{
ResourceId: pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteCircuits/circuitName"),
SourceType: pulumi.String("Resource"),
},
},
IngestionType: pulumi.String("IPFIX"),
},
ResourceGroupName: pulumi.String("rg1"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.networkfunction.CollectorPolicy;
import com.pulumi.azurenative.networkfunction.CollectorPolicyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var collectorPolicy = new CollectorPolicy("collectorPolicy", CollectorPolicyArgs.builder()
.azureTrafficCollectorName("atc")
.collectorPolicyName("cp1")
.emissionPolicies(Map.ofEntries(
Map.entry("emissionDestinations", Map.of("destinationType", "AzureMonitor")),
Map.entry("emissionType", "IPFIX")
))
.ingestionPolicy(Map.ofEntries(
Map.entry("ingestionSources", Map.ofEntries(
Map.entry("resourceId", "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteCircuits/circuitName"),
Map.entry("sourceType", "Resource")
)),
Map.entry("ingestionType", "IPFIX")
))
.resourceGroupName("rg1")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
collector_policy = azure_native.networkfunction.CollectorPolicy("collectorPolicy",
azure_traffic_collector_name="atc",
collector_policy_name="cp1",
emission_policies=[{
"emissionDestinations": [azure_native.networkfunction.EmissionPolicyDestinationArgs(
destination_type="AzureMonitor",
)],
"emissionType": "IPFIX",
}],
ingestion_policy=azure_native.networkfunction.IngestionPolicyPropertiesFormatResponseArgs(
ingestion_sources=[azure_native.networkfunction.IngestionSourcesPropertiesFormatArgs(
resource_id="/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteCircuits/circuitName",
source_type="Resource",
)],
ingestion_type="IPFIX",
),
resource_group_name="rg1")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const collectorPolicy = new azure_native.networkfunction.CollectorPolicy("collectorPolicy", {
azureTrafficCollectorName: "atc",
collectorPolicyName: "cp1",
emissionPolicies: [{
emissionDestinations: [{
destinationType: "AzureMonitor",
}],
emissionType: "IPFIX",
}],
ingestionPolicy: {
ingestionSources: [{
resourceId: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteCircuits/circuitName",
sourceType: "Resource",
}],
ingestionType: "IPFIX",
},
resourceGroupName: "rg1",
});
resources:
collectorPolicy:
type: azure-native:networkfunction:CollectorPolicy
properties:
azureTrafficCollectorName: atc
collectorPolicyName: cp1
emissionPolicies:
- emissionDestinations:
- destinationType: AzureMonitor
emissionType: IPFIX
ingestionPolicy:
ingestionSources:
- resourceId: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteCircuits/circuitName
sourceType: Resource
ingestionType: IPFIX
resourceGroupName: rg1
Create CollectorPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CollectorPolicy(name: string, args: CollectorPolicyArgs, opts?: CustomResourceOptions);
@overload
def CollectorPolicy(resource_name: str,
args: CollectorPolicyInitArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CollectorPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
azure_traffic_collector_name: Optional[str] = None,
resource_group_name: Optional[str] = None,
collector_policy_name: Optional[str] = None,
emission_policies: Optional[Sequence[EmissionPoliciesPropertiesFormatArgs]] = None,
ingestion_policy: Optional[IngestionPolicyPropertiesFormatArgs] = None)
func NewCollectorPolicy(ctx *Context, name string, args CollectorPolicyArgs, opts ...ResourceOption) (*CollectorPolicy, error)
public CollectorPolicy(string name, CollectorPolicyArgs args, CustomResourceOptions? opts = null)
public CollectorPolicy(String name, CollectorPolicyArgs args)
public CollectorPolicy(String name, CollectorPolicyArgs args, CustomResourceOptions options)
type: azure-native:networkfunction:CollectorPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args CollectorPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args CollectorPolicyInitArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args CollectorPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CollectorPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CollectorPolicyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var collectorPolicyResource = new AzureNative.Networkfunction.CollectorPolicy("collectorPolicyResource", new()
{
AzureTrafficCollectorName = "string",
ResourceGroupName = "string",
CollectorPolicyName = "string",
EmissionPolicies = new[]
{
{
{ "emissionDestinations", new[]
{
{
{ "destinationType", "string" },
},
} },
{ "emissionType", "string" },
},
},
IngestionPolicy =
{
{ "ingestionSources", new[]
{
{
{ "resourceId", "string" },
{ "sourceType", "string" },
},
} },
{ "ingestionType", "string" },
},
});
example, err := networkfunction.NewCollectorPolicy(ctx, "collectorPolicyResource", &networkfunction.CollectorPolicyArgs{
AzureTrafficCollectorName: "string",
ResourceGroupName: "string",
CollectorPolicyName: "string",
EmissionPolicies: []map[string]interface{}{
map[string]interface{}{
"emissionDestinations": []map[string]interface{}{
map[string]interface{}{
"destinationType": "string",
},
},
"emissionType": "string",
},
},
IngestionPolicy: map[string]interface{}{
"ingestionSources": []map[string]interface{}{
map[string]interface{}{
"resourceId": "string",
"sourceType": "string",
},
},
"ingestionType": "string",
},
})
var collectorPolicyResource = new CollectorPolicy("collectorPolicyResource", CollectorPolicyArgs.builder()
.azureTrafficCollectorName("string")
.resourceGroupName("string")
.collectorPolicyName("string")
.emissionPolicies(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.ingestionPolicy(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.build());
collector_policy_resource = azure_native.networkfunction.CollectorPolicy("collectorPolicyResource",
azure_traffic_collector_name=string,
resource_group_name=string,
collector_policy_name=string,
emission_policies=[{
emissionDestinations: [{
destinationType: string,
}],
emissionType: string,
}],
ingestion_policy={
ingestionSources: [{
resourceId: string,
sourceType: string,
}],
ingestionType: string,
})
const collectorPolicyResource = new azure_native.networkfunction.CollectorPolicy("collectorPolicyResource", {
azureTrafficCollectorName: "string",
resourceGroupName: "string",
collectorPolicyName: "string",
emissionPolicies: [{
emissionDestinations: [{
destinationType: "string",
}],
emissionType: "string",
}],
ingestionPolicy: {
ingestionSources: [{
resourceId: "string",
sourceType: "string",
}],
ingestionType: "string",
},
});
type: azure-native:networkfunction:CollectorPolicy
properties:
azureTrafficCollectorName: string
collectorPolicyName: string
emissionPolicies:
- emissionDestinations:
- destinationType: string
emissionType: string
ingestionPolicy:
ingestionSources:
- resourceId: string
sourceType: string
ingestionType: string
resourceGroupName: string
CollectorPolicy Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The CollectorPolicy resource accepts the following input properties:
- Azure
Traffic stringCollector Name - Azure Traffic Collector name
- Resource
Group stringName - The name of the resource group.
- Collector
Policy stringName - Collector Policy Name
- Emission
Policies List<Pulumi.Azure Native. Network Function. Inputs. Emission Policies Properties Format> - Emission policies.
- Ingestion
Policy Pulumi.Azure Native. Network Function. Inputs. Ingestion Policy Properties Format - Ingestion policies.
- Azure
Traffic stringCollector Name - Azure Traffic Collector name
- Resource
Group stringName - The name of the resource group.
- Collector
Policy stringName - Collector Policy Name
- Emission
Policies []EmissionPolicies Properties Format Args - Emission policies.
- Ingestion
Policy IngestionPolicy Properties Format Args - Ingestion policies.
- azure
Traffic StringCollector Name - Azure Traffic Collector name
- resource
Group StringName - The name of the resource group.
- collector
Policy StringName - Collector Policy Name
- emission
Policies List<EmissionPolicies Properties Format> - Emission policies.
- ingestion
Policy IngestionPolicy Properties Format - Ingestion policies.
- azure
Traffic stringCollector Name - Azure Traffic Collector name
- resource
Group stringName - The name of the resource group.
- collector
Policy stringName - Collector Policy Name
- emission
Policies EmissionPolicies Properties Format[] - Emission policies.
- ingestion
Policy IngestionPolicy Properties Format - Ingestion policies.
- azure_
traffic_ strcollector_ name - Azure Traffic Collector name
- resource_
group_ strname - The name of the resource group.
- collector_
policy_ strname - Collector Policy Name
- emission_
policies Sequence[EmissionPolicies Properties Format Args] - Emission policies.
- ingestion_
policy IngestionPolicy Properties Format Args - Ingestion policies.
- azure
Traffic StringCollector Name - Azure Traffic Collector name
- resource
Group StringName - The name of the resource group.
- collector
Policy StringName - Collector Policy Name
- emission
Policies List<Property Map> - Emission policies.
- ingestion
Policy Property Map - Ingestion policies.
Outputs
All input properties are implicitly available as output properties. Additionally, the CollectorPolicy resource produces the following output properties:
- Etag string
- A unique read-only string that changes whenever the resource is updated.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Azure resource name
- Provisioning
State string - The provisioning state.
- System
Data Pulumi.Azure Native. Network Function. Outputs. Collector Policy Response System Data - Metadata pertaining to creation and last modification of the resource.
- Type string
- Azure resource type
- Etag string
- A unique read-only string that changes whenever the resource is updated.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Azure resource name
- Provisioning
State string - The provisioning state.
- System
Data CollectorPolicy Response System Data - Metadata pertaining to creation and last modification of the resource.
- Type string
- Azure resource type
- etag String
- A unique read-only string that changes whenever the resource is updated.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Azure resource name
- provisioning
State String - The provisioning state.
- system
Data CollectorPolicy Response System Data - Metadata pertaining to creation and last modification of the resource.
- type String
- Azure resource type
- etag string
- A unique read-only string that changes whenever the resource is updated.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- Azure resource name
- provisioning
State string - The provisioning state.
- system
Data CollectorPolicy Response System Data - Metadata pertaining to creation and last modification of the resource.
- type string
- Azure resource type
- etag str
- A unique read-only string that changes whenever the resource is updated.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- Azure resource name
- provisioning_
state str - The provisioning state.
- system_
data CollectorPolicy Response System Data - Metadata pertaining to creation and last modification of the resource.
- type str
- Azure resource type
- etag String
- A unique read-only string that changes whenever the resource is updated.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Azure resource name
- provisioning
State String - The provisioning state.
- system
Data Property Map - Metadata pertaining to creation and last modification of the resource.
- type String
- Azure resource type
Supporting Types
CollectorPolicyResponseSystemData, CollectorPolicyResponseSystemDataArgs
- Created
At string - The timestamp of resource creation (UTC).
- Created
By string - The identity that created the resource.
- Created
By stringType - The type of identity that created the resource.
- Last
Modified stringBy - The identity that last modified the resource.
- Last
Modified stringBy Type - The type of identity that last modified the resource.
- Created
At string - The timestamp of resource creation (UTC).
- Created
By string - The identity that created the resource.
- Created
By stringType - The type of identity that created the resource.
- Last
Modified stringBy - The identity that last modified the resource.
- Last
Modified stringBy Type - The type of identity that last modified the resource.
- created
At String - The timestamp of resource creation (UTC).
- created
By String - The identity that created the resource.
- created
By StringType - The type of identity that created the resource.
- last
Modified StringBy - The identity that last modified the resource.
- last
Modified StringBy Type - The type of identity that last modified the resource.
- created
At string - The timestamp of resource creation (UTC).
- created
By string - The identity that created the resource.
- created
By stringType - The type of identity that created the resource.
- last
Modified stringBy - The identity that last modified the resource.
- last
Modified stringBy Type - The type of identity that last modified the resource.
- created_
at str - The timestamp of resource creation (UTC).
- created_
by str - The identity that created the resource.
- created_
by_ strtype - The type of identity that created the resource.
- last_
modified_ strby - The identity that last modified the resource.
- last_
modified_ strby_ type - The type of identity that last modified the resource.
- created
At String - The timestamp of resource creation (UTC).
- created
By String - The identity that created the resource.
- created
By StringType - The type of identity that created the resource.
- last
Modified StringBy - The identity that last modified the resource.
- last
Modified StringBy Type - The type of identity that last modified the resource.
DestinationType, DestinationTypeArgs
- Azure
Monitor - AzureMonitor
- Destination
Type Azure Monitor - AzureMonitor
- Azure
Monitor - AzureMonitor
- Azure
Monitor - AzureMonitor
- AZURE_MONITOR
- AzureMonitor
- "Azure
Monitor" - AzureMonitor
EmissionPoliciesPropertiesFormat, EmissionPoliciesPropertiesFormatArgs
- Emission
Destinations List<Pulumi.Azure Native. Network Function. Inputs. Emission Policy Destination> - Emission policy destinations.
- Emission
Type string | Pulumi.Azure Native. Network Function. Emission Type - Emission format type.
- Emission
Destinations []EmissionPolicy Destination - Emission policy destinations.
- Emission
Type string | EmissionType - Emission format type.
- emission
Destinations List<EmissionPolicy Destination> - Emission policy destinations.
- emission
Type String | EmissionType - Emission format type.
- emission
Destinations EmissionPolicy Destination[] - Emission policy destinations.
- emission
Type string | EmissionType - Emission format type.
- emission_
destinations Sequence[EmissionPolicy Destination] - Emission policy destinations.
- emission_
type str | EmissionType - Emission format type.
- emission
Destinations List<Property Map> - Emission policy destinations.
- emission
Type String | "IPFIX" - Emission format type.
EmissionPoliciesPropertiesFormatResponse, EmissionPoliciesPropertiesFormatResponseArgs
- Emission
Destinations List<Pulumi.Azure Native. Network Function. Inputs. Emission Policy Destination Response> - Emission policy destinations.
- Emission
Type string - Emission format type.
- Emission
Destinations []EmissionPolicy Destination Response - Emission policy destinations.
- Emission
Type string - Emission format type.
- emission
Destinations List<EmissionPolicy Destination Response> - Emission policy destinations.
- emission
Type String - Emission format type.
- emission
Destinations EmissionPolicy Destination Response[] - Emission policy destinations.
- emission
Type string - Emission format type.
- emission_
destinations Sequence[EmissionPolicy Destination Response] - Emission policy destinations.
- emission_
type str - Emission format type.
- emission
Destinations List<Property Map> - Emission policy destinations.
- emission
Type String - Emission format type.
EmissionPolicyDestination, EmissionPolicyDestinationArgs
- Destination
Type string | Pulumi.Azure Native. Network Function. Destination Type - Emission destination type.
- Destination
Type string | DestinationType - Emission destination type.
- destination
Type String | DestinationType - Emission destination type.
- destination
Type string | DestinationType - Emission destination type.
- destination_
type str | DestinationType - Emission destination type.
- destination
Type String | "AzureMonitor" - Emission destination type.
EmissionPolicyDestinationResponse, EmissionPolicyDestinationResponseArgs
- Destination
Type string - Emission destination type.
- Destination
Type string - Emission destination type.
- destination
Type String - Emission destination type.
- destination
Type string - Emission destination type.
- destination_
type str - Emission destination type.
- destination
Type String - Emission destination type.
EmissionType, EmissionTypeArgs
- IPFIX
- IPFIX
- Emission
Type IPFIX - IPFIX
- IPFIX
- IPFIX
- IPFIX
- IPFIX
- IPFIX
- IPFIX
- "IPFIX"
- IPFIX
IngestionPolicyPropertiesFormat, IngestionPolicyPropertiesFormatArgs
- Ingestion
Sources List<Pulumi.Azure Native. Network Function. Inputs. Ingestion Sources Properties Format> - Ingestion Sources.
- Ingestion
Type string | Pulumi.Azure Native. Network Function. Ingestion Type - The ingestion type.
- Ingestion
Sources []IngestionSources Properties Format - Ingestion Sources.
- Ingestion
Type string | IngestionType - The ingestion type.
- ingestion
Sources List<IngestionSources Properties Format> - Ingestion Sources.
- ingestion
Type String | IngestionType - The ingestion type.
- ingestion
Sources IngestionSources Properties Format[] - Ingestion Sources.
- ingestion
Type string | IngestionType - The ingestion type.
- ingestion_
sources Sequence[IngestionSources Properties Format] - Ingestion Sources.
- ingestion_
type str | IngestionType - The ingestion type.
- ingestion
Sources List<Property Map> - Ingestion Sources.
- ingestion
Type String | "IPFIX" - The ingestion type.
IngestionPolicyPropertiesFormatResponse, IngestionPolicyPropertiesFormatResponseArgs
- Ingestion
Sources List<Pulumi.Azure Native. Network Function. Inputs. Ingestion Sources Properties Format Response> - Ingestion Sources.
- Ingestion
Type string - The ingestion type.
- Ingestion
Sources []IngestionSources Properties Format Response - Ingestion Sources.
- Ingestion
Type string - The ingestion type.
- ingestion
Sources List<IngestionSources Properties Format Response> - Ingestion Sources.
- ingestion
Type String - The ingestion type.
- ingestion
Sources IngestionSources Properties Format Response[] - Ingestion Sources.
- ingestion
Type string - The ingestion type.
- ingestion_
sources Sequence[IngestionSources Properties Format Response] - Ingestion Sources.
- ingestion_
type str - The ingestion type.
- ingestion
Sources List<Property Map> - Ingestion Sources.
- ingestion
Type String - The ingestion type.
IngestionSourcesPropertiesFormat, IngestionSourcesPropertiesFormatArgs
- Resource
Id string - Resource ID.
- Source
Type string | Pulumi.Azure Native. Network Function. Source Type - Ingestion source type.
- Resource
Id string - Resource ID.
- Source
Type string | SourceType - Ingestion source type.
- resource
Id String - Resource ID.
- source
Type String | SourceType - Ingestion source type.
- resource
Id string - Resource ID.
- source
Type string | SourceType - Ingestion source type.
- resource_
id str - Resource ID.
- source_
type str | SourceType - Ingestion source type.
- resource
Id String - Resource ID.
- source
Type String | "Resource" - Ingestion source type.
IngestionSourcesPropertiesFormatResponse, IngestionSourcesPropertiesFormatResponseArgs
- Resource
Id string - Resource ID.
- Source
Type string - Ingestion source type.
- Resource
Id string - Resource ID.
- Source
Type string - Ingestion source type.
- resource
Id String - Resource ID.
- source
Type String - Ingestion source type.
- resource
Id string - Resource ID.
- source
Type string - Ingestion source type.
- resource_
id str - Resource ID.
- source_
type str - Ingestion source type.
- resource
Id String - Resource ID.
- source
Type String - Ingestion source type.
IngestionType, IngestionTypeArgs
- IPFIX
- IPFIX
- Ingestion
Type IPFIX - IPFIX
- IPFIX
- IPFIX
- IPFIX
- IPFIX
- IPFIX
- IPFIX
- "IPFIX"
- IPFIX
SourceType, SourceTypeArgs
- Resource
- Resource
- Source
Type Resource - Resource
- Resource
- Resource
- Resource
- Resource
- RESOURCE
- Resource
- "Resource"
- Resource
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:networkfunction:CollectorPolicy cp1 /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.NetworkFunction/AzureTrafficCollector/atc/collectorPolicies/cp1
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- azure-native-v1 pulumi/pulumi-azure-native
- License
- Apache-2.0