Collector policy resource.
Uses Azure REST API version 2022-11-01. In version 2.x of the Azure Native provider, it used API version 2022-11-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 = AzureNative.NetworkFunction.DestinationType.AzureMonitor,
},
},
EmissionType = AzureNative.NetworkFunction.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 = AzureNative.NetworkFunction.SourceType.Resource,
},
},
IngestionType = AzureNative.NetworkFunction.IngestionType.IPFIX,
},
Location = "West US",
ResourceGroupName = "rg1",
});
});
package main
import (
networkfunction "github.com/pulumi/pulumi-azure-native-sdk/networkfunction/v3"
"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.EmissionPoliciesPropertiesFormatArray{
&networkfunction.EmissionPoliciesPropertiesFormatArgs{
EmissionDestinations: networkfunction.EmissionPolicyDestinationArray{
&networkfunction.EmissionPolicyDestinationArgs{
DestinationType: pulumi.String(networkfunction.DestinationTypeAzureMonitor),
},
},
EmissionType: pulumi.String(networkfunction.EmissionTypeIPFIX),
},
},
IngestionPolicy: &networkfunction.IngestionPolicyPropertiesFormatArgs{
IngestionSources: networkfunction.IngestionSourcesPropertiesFormatArray{
&networkfunction.IngestionSourcesPropertiesFormatArgs{
ResourceId: pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteCircuits/circuitName"),
SourceType: pulumi.String(networkfunction.SourceTypeResource),
},
},
IngestionType: pulumi.String(networkfunction.IngestionTypeIPFIX),
},
Location: pulumi.String("West US"),
ResourceGroupName: pulumi.String("rg1"),
})
if err != nil {
return err
}
return nil
})
}
terraform {
required_providers {
azure-native = {
source = "pulumi/azure-native"
}
}
}
resource "azure-native_networkfunction_collector_policy" "collectorPolicy" {
lifecycle {
create_before_destroy = true
}
azure_traffic_collector_name = "atc"
collector_policy_name = "cp1"
emission_policies {
emission_destinations {
destination_type = "AzureMonitor"
}
emission_type = "IPFIX"
}
ingestion_policy = {
ingestion_sources = [{
resource_id = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteCircuits/circuitName"
source_type = "Resource"
}]
ingestion_type = "IPFIX"
}
location = "West US"
resource_group_name = "rg1"
}
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 com.pulumi.azurenative.networkfunction.inputs.EmissionPoliciesPropertiesFormatArgs;
import com.pulumi.azurenative.networkfunction.inputs.EmissionPolicyDestinationArgs;
import com.pulumi.azurenative.networkfunction.inputs.IngestionPolicyPropertiesFormatArgs;
import com.pulumi.azurenative.networkfunction.inputs.IngestionSourcesPropertiesFormatArgs;
import java.util.ArrayList;
import java.util.Arrays;
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(EmissionPoliciesPropertiesFormatArgs.builder()
.emissionDestinations(EmissionPolicyDestinationArgs.builder()
.destinationType("AzureMonitor")
.build())
.emissionType("IPFIX")
.build())
.ingestionPolicy(IngestionPolicyPropertiesFormatArgs.builder()
.ingestionSources(IngestionSourcesPropertiesFormatArgs.builder()
.resourceId("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteCircuits/circuitName")
.sourceType("Resource")
.build())
.ingestionType("IPFIX")
.build())
.location("West US")
.resourceGroupName("rg1")
.build());
}
}
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: azure_native.networkfunction.DestinationType.AzureMonitor,
}],
emissionType: azure_native.networkfunction.EmissionType.IPFIX,
}],
ingestionPolicy: {
ingestionSources: [{
resourceId: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteCircuits/circuitName",
sourceType: azure_native.networkfunction.SourceType.Resource,
}],
ingestionType: azure_native.networkfunction.IngestionType.IPFIX,
},
location: "West US",
resourceGroupName: "rg1",
});
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=[{
"emission_destinations": [{
"destination_type": azure_native.networkfunction.DestinationType.AZURE_MONITOR,
}],
"emission_type": azure_native.networkfunction.EmissionType.IPFIX,
}],
ingestion_policy={
"ingestion_sources": [{
"resource_id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteCircuits/circuitName",
"source_type": azure_native.networkfunction.SourceType.RESOURCE,
}],
"ingestion_type": azure_native.networkfunction.IngestionType.IPFIX,
},
location="West US",
resource_group_name="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
location: West US
resourceGroupName: rg1
Create CollectorPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
@overload
def CollectorPolicy(resource_name: str,
args: CollectorPolicyArgs,
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,
location: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None)
type: azure-native:networkfunction:CollectorPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "azure-native_networkfunction_collector_policy" "name" {
# resource properties
}
Parameters
- resource_name
str
- The unique name of the resource.
- args
CollectorPolicyArgs
- 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.
- 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[]
{
new AzureNative.NetworkFunction.Inputs.EmissionPoliciesPropertiesFormatArgs
{
EmissionDestinations = new[]
{
new AzureNative.NetworkFunction.Inputs.EmissionPolicyDestinationArgs
{
DestinationType = "string",
},
},
EmissionType = "string",
},
},
IngestionPolicy = new AzureNative.NetworkFunction.Inputs.IngestionPolicyPropertiesFormatArgs
{
IngestionSources = new[]
{
new AzureNative.NetworkFunction.Inputs.IngestionSourcesPropertiesFormatArgs
{
ResourceId = "string",
SourceType = "string",
},
},
IngestionType = "string",
},
Location = "string",
Tags =
{
{ "string", "string" },
},
});
example, err := networkfunction.NewCollectorPolicy(ctx, "collectorPolicyResource", &networkfunction.CollectorPolicyArgs{
AzureTrafficCollectorName: pulumi.String("string"),
ResourceGroupName: pulumi.String("string"),
CollectorPolicyName: pulumi.String("string"),
EmissionPolicies: networkfunction.EmissionPoliciesPropertiesFormatArray{
&networkfunction.EmissionPoliciesPropertiesFormatArgs{
EmissionDestinations: networkfunction.EmissionPolicyDestinationArray{
&networkfunction.EmissionPolicyDestinationArgs{
DestinationType: pulumi.String("string"),
},
},
EmissionType: pulumi.String("string"),
},
},
IngestionPolicy: &networkfunction.IngestionPolicyPropertiesFormatArgs{
IngestionSources: networkfunction.IngestionSourcesPropertiesFormatArray{
&networkfunction.IngestionSourcesPropertiesFormatArgs{
ResourceId: pulumi.String("string"),
SourceType: pulumi.String("string"),
},
},
IngestionType: pulumi.String("string"),
},
Location: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
resource "azure-native_networkfunction_collector_policy" "collectorPolicyResource" {
lifecycle {
create_before_destroy = true
}
azure_traffic_collector_name = "string"
resource_group_name = "string"
collector_policy_name = "string"
emission_policies {
emission_destinations {
destination_type = "string"
}
emission_type = "string"
}
ingestion_policy = {
ingestion_sources = [{
resource_id = "string"
source_type = "string"
}]
ingestion_type = "string"
}
location = "string"
tags = {
"string" = "string"
}
}
var collectorPolicyResource = new CollectorPolicy("collectorPolicyResource", CollectorPolicyArgs.builder()
.azureTrafficCollectorName("string")
.resourceGroupName("string")
.collectorPolicyName("string")
.emissionPolicies(EmissionPoliciesPropertiesFormatArgs.builder()
.emissionDestinations(EmissionPolicyDestinationArgs.builder()
.destinationType("string")
.build())
.emissionType("string")
.build())
.ingestionPolicy(IngestionPolicyPropertiesFormatArgs.builder()
.ingestionSources(IngestionSourcesPropertiesFormatArgs.builder()
.resourceId("string")
.sourceType("string")
.build())
.ingestionType("string")
.build())
.location("string")
.tags(Map.of("string", "string"))
.build());
collector_policy_resource = azure_native.networkfunction.CollectorPolicy("collectorPolicyResource",
azure_traffic_collector_name="string",
resource_group_name="string",
collector_policy_name="string",
emission_policies=[{
"emission_destinations": [{
"destination_type": "string",
}],
"emission_type": "string",
}],
ingestion_policy={
"ingestion_sources": [{
"resource_id": "string",
"source_type": "string",
}],
"ingestion_type": "string",
},
location="string",
tags={
"string": "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",
},
location: "string",
tags: {
string: "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
location: string
resourceGroupName: string
tags:
string: 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.
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:
Outputs
All input properties are implicitly available as output properties. Additionally, the CollectorPolicy resource produces the following output properties:
- AzureApiVersion
string
- The Azure API version of the resource.
- 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
- The name of the resource
- ProvisioningState
string
- The provisioning state.
- SystemData
SystemDataResponse
- Azure Resource Manager metadata containing createdBy and modifiedBy information.
- Type
string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- azure_api_version
string
- The Azure API version of the resource.
- 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
- The name of the resource
- provisioning_state
string
- The provisioning state.
- system_data
object
- Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type
string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- azureApiVersion
String
- The Azure API version of the resource.
- 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
- The name of the resource
- provisioningState
String
- The provisioning state.
- systemData
SystemDataResponse
- Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type
String
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- azureApiVersion
string
- The Azure API version of the resource.
- 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
- The name of the resource
- provisioningState
string
- The provisioning state.
- systemData
SystemDataResponse
- Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type
string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- azure_api_version
str
- The Azure API version of the resource.
- 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
- The name of the resource
- provisioning_state
str
- The provisioning state.
- system_data
SystemDataResponse
- Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type
str
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- azureApiVersion
String
- The Azure API version of the resource.
- 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
- The name of the resource
- provisioningState
String
- The provisioning state.
- systemData
Property Map
- Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type
String
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Look up Existing CollectorPolicy Resource
Get an existing CollectorPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
func GetCollectorPolicy(ctx *Context, name string, id IDInput, state *CollectorPolicyState, opts ...ResourceOption) (*CollectorPolicy, error)
public static CollectorPolicy get(String name, Output<String> id, CustomResourceOptions options)
resources: existingCollectorPolicy: type: azure-native:networkfunction:CollectorPolicy get: id: ${id}
import {
to = azure-native_networkfunction_collector_policy.example
id = "${id}"
}
- name
string
- The unique name of the resulting resource.
- id
Input<ID>
- The unique provider ID of the resource to look up.
- opts
CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name
str
- The unique name of the resulting resource.
- id
str
- The unique provider ID of the resource to look up.
- 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 resulting resource.
- id
IDInput
- The unique provider ID of the resource to look up.
- state
CollectorPolicyState
- Pass nil. This resource has no state arguments.
- opts
ResourceOption
- Bag of options to control resource's behavior.
- name
string
- The unique name of the resulting resource.
- id
Input<string>
- The unique provider ID of the resource to look up.
- opts
CustomResourceOptions
- Bag of options to control resource's behavior.
- name
String
- The unique name of the resulting resource.
- id
Output<String>
- The unique provider ID of the resource to look up.
- options
CustomResourceOptions
- Bag of options to control resource's behavior.
Supporting Types
DestinationType
Emission destination type.
| Name | Value | Description |
|---|
| AzureMonitor | AzureMonitor | AzureMonitor |
| Name | Value | Description |
|---|
| DestinationTypeAzureMonitor | AzureMonitor | AzureMonitor |
| Value | Description |
|---|
AzureMonitor | AzureMonitor |
| Name | Value | Description |
|---|
| AzureMonitor | AzureMonitor | AzureMonitor |
| Name | Value | Description |
|---|
| AzureMonitor | AzureMonitor | AzureMonitor |
| Name | Value | Description |
|---|
| AZURE_MONITOR | AzureMonitor | AzureMonitor |
| Value | Description |
|---|
AzureMonitor | AzureMonitor |
Emission policy properties.
Emission policy properties.
EmissionPolicyDestination, EmissionPolicyDestinationArgs
Emission policy destination properties.
EmissionPolicyDestinationResponse
Emission policy destination properties.
EmissionType
Emission format type.
| Name | Value | Description |
|---|
| IPFIX | IPFIX | IPFIX |
| Name | Value | Description |
|---|
| EmissionTypeIPFIX | IPFIX | IPFIX |
| Value | Description |
|---|
IPFIX | IPFIX |
| Name | Value | Description |
|---|
| IPFIX | IPFIX | IPFIX |
| Name | Value | Description |
|---|
| IPFIX | IPFIX | IPFIX |
| Name | Value | Description |
|---|
| IPFIX | IPFIX | IPFIX |
| Value | Description |
|---|
IPFIX | IPFIX |
Ingestion Policy properties.
Ingestion Policy properties.
Ingestion policy properties.
Ingestion policy properties.
IngestionType
The ingestion type.
| Name | Value | Description |
|---|
| IPFIX | IPFIX | IPFIX |
| Name | Value | Description |
|---|
| IngestionTypeIPFIX | IPFIX | IPFIX |
| Value | Description |
|---|
IPFIX | IPFIX |
| Name | Value | Description |
|---|
| IPFIX | IPFIX | IPFIX |
| Name | Value | Description |
|---|
| IPFIX | IPFIX | IPFIX |
| Name | Value | Description |
|---|
| IPFIX | IPFIX | IPFIX |
| Value | Description |
|---|
IPFIX | IPFIX |
SourceType
Ingestion source type.
| Name | Value | Description |
|---|
| Resource | Resource | Resource |
| Name | Value | Description |
|---|
| SourceTypeResource | Resource | Resource |
| Value | Description |
|---|
Resource | Resource |
| Name | Value | Description |
|---|
| Resource | Resource | Resource |
| Name | Value | Description |
|---|
| Resource | Resource | Resource |
| Name | Value | Description |
|---|
| RESOURCE | Resource | Resource |
| Value | Description |
|---|
Resource | Resource |
SystemDataResponse
Metadata pertaining to creation and last modification of the resource.
- CreatedAt
string
- The timestamp of resource creation (UTC).
- CreatedBy
string
- The identity that created the resource.
- CreatedByType
string
- The type of identity that created the resource.
- LastModifiedAt
string
- The timestamp of resource last modification (UTC)
- LastModifiedBy
string
- The identity that last modified the resource.
- LastModifiedByType
string
- The type of identity that last modified the resource.
- CreatedAt
string
- The timestamp of resource creation (UTC).
- CreatedBy
string
- The identity that created the resource.
- CreatedByType
string
- The type of identity that created the resource.
- LastModifiedAt
string
- The timestamp of resource last modification (UTC)
- LastModifiedBy
string
- The identity that last modified the resource.
- LastModifiedByType
string
- The type of identity that last modified the resource.
- createdAt
String
- The timestamp of resource creation (UTC).
- createdBy
String
- The identity that created the resource.
- createdByType
String
- The type of identity that created the resource.
- lastModifiedAt
String
- The timestamp of resource last modification (UTC)
- lastModifiedBy
String
- The identity that last modified the resource.
- lastModifiedByType
String
- The type of identity that last modified the resource.
- createdAt
string
- The timestamp of resource creation (UTC).
- createdBy
string
- The identity that created the resource.
- createdByType
string
- The type of identity that created the resource.
- lastModifiedAt
string
- The timestamp of resource last modification (UTC)
- lastModifiedBy
string
- The identity that last modified the resource.
- lastModifiedByType
string
- The type of identity that last modified the resource.
- createdAt
String
- The timestamp of resource creation (UTC).
- createdBy
String
- The identity that created the resource.
- createdByType
String
- The type of identity that created the resource.
- lastModifiedAt
String
- The timestamp of resource last modification (UTC)
- lastModifiedBy
String
- The identity that last modified the resource.
- lastModifiedByType
String
- The type of identity that last modified the 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/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}/collectorPolicies/{collectorPolicyName}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0