meraki.networks.TrafficAnalysis
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as meraki from "@pulumi/meraki";
const example = new meraki.networks.TrafficAnalysis("example", {
customPieChartItems: [{
name: "Item from hostname",
type: "host",
value: "example.com",
}],
mode: "disabled",
networkId: "string",
});
export const merakiNetworksTrafficAnalysisExample = example;
import pulumi
import pulumi_meraki as meraki
example = meraki.networks.TrafficAnalysis("example",
custom_pie_chart_items=[{
"name": "Item from hostname",
"type": "host",
"value": "example.com",
}],
mode="disabled",
network_id="string")
pulumi.export("merakiNetworksTrafficAnalysisExample", example)
package main
import (
"github.com/pulumi/pulumi-meraki/sdk/go/meraki/networks"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := networks.NewTrafficAnalysis(ctx, "example", &networks.TrafficAnalysisArgs{
CustomPieChartItems: networks.TrafficAnalysisCustomPieChartItemArray{
&networks.TrafficAnalysisCustomPieChartItemArgs{
Name: pulumi.String("Item from hostname"),
Type: pulumi.String("host"),
Value: pulumi.String("example.com"),
},
},
Mode: pulumi.String("disabled"),
NetworkId: pulumi.String("string"),
})
if err != nil {
return err
}
ctx.Export("merakiNetworksTrafficAnalysisExample", example)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Meraki = Pulumi.Meraki;
return await Deployment.RunAsync(() =>
{
var example = new Meraki.Networks.TrafficAnalysis("example", new()
{
CustomPieChartItems = new[]
{
new Meraki.Networks.Inputs.TrafficAnalysisCustomPieChartItemArgs
{
Name = "Item from hostname",
Type = "host",
Value = "example.com",
},
},
Mode = "disabled",
NetworkId = "string",
});
return new Dictionary<string, object?>
{
["merakiNetworksTrafficAnalysisExample"] = example,
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.meraki.networks.TrafficAnalysis;
import com.pulumi.meraki.networks.TrafficAnalysisArgs;
import com.pulumi.meraki.networks.inputs.TrafficAnalysisCustomPieChartItemArgs;
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 example = new TrafficAnalysis("example", TrafficAnalysisArgs.builder()
.customPieChartItems(TrafficAnalysisCustomPieChartItemArgs.builder()
.name("Item from hostname")
.type("host")
.value("example.com")
.build())
.mode("disabled")
.networkId("string")
.build());
ctx.export("merakiNetworksTrafficAnalysisExample", example);
}
}
resources:
example:
type: meraki:networks:TrafficAnalysis
properties:
customPieChartItems:
- name: Item from hostname
type: host
value: example.com
mode: disabled
networkId: string
outputs:
merakiNetworksTrafficAnalysisExample: ${example}
Create TrafficAnalysis Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TrafficAnalysis(name: string, args: TrafficAnalysisArgs, opts?: CustomResourceOptions);
@overload
def TrafficAnalysis(resource_name: str,
args: TrafficAnalysisArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TrafficAnalysis(resource_name: str,
opts: Optional[ResourceOptions] = None,
network_id: Optional[str] = None,
custom_pie_chart_items: Optional[Sequence[TrafficAnalysisCustomPieChartItemArgs]] = None,
mode: Optional[str] = None)
func NewTrafficAnalysis(ctx *Context, name string, args TrafficAnalysisArgs, opts ...ResourceOption) (*TrafficAnalysis, error)
public TrafficAnalysis(string name, TrafficAnalysisArgs args, CustomResourceOptions? opts = null)
public TrafficAnalysis(String name, TrafficAnalysisArgs args)
public TrafficAnalysis(String name, TrafficAnalysisArgs args, CustomResourceOptions options)
type: meraki:networks:TrafficAnalysis
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 TrafficAnalysisArgs
- 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 TrafficAnalysisArgs
- 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 TrafficAnalysisArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TrafficAnalysisArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TrafficAnalysisArgs
- 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 trafficAnalysisResource = new Meraki.Networks.TrafficAnalysis("trafficAnalysisResource", new()
{
NetworkId = "string",
CustomPieChartItems = new[]
{
new Meraki.Networks.Inputs.TrafficAnalysisCustomPieChartItemArgs
{
Name = "string",
Type = "string",
Value = "string",
},
},
Mode = "string",
});
example, err := networks.NewTrafficAnalysis(ctx, "trafficAnalysisResource", &networks.TrafficAnalysisArgs{
NetworkId: pulumi.String("string"),
CustomPieChartItems: networks.TrafficAnalysisCustomPieChartItemArray{
&networks.TrafficAnalysisCustomPieChartItemArgs{
Name: pulumi.String("string"),
Type: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
Mode: pulumi.String("string"),
})
var trafficAnalysisResource = new TrafficAnalysis("trafficAnalysisResource", TrafficAnalysisArgs.builder()
.networkId("string")
.customPieChartItems(TrafficAnalysisCustomPieChartItemArgs.builder()
.name("string")
.type("string")
.value("string")
.build())
.mode("string")
.build());
traffic_analysis_resource = meraki.networks.TrafficAnalysis("trafficAnalysisResource",
network_id="string",
custom_pie_chart_items=[{
"name": "string",
"type": "string",
"value": "string",
}],
mode="string")
const trafficAnalysisResource = new meraki.networks.TrafficAnalysis("trafficAnalysisResource", {
networkId: "string",
customPieChartItems: [{
name: "string",
type: "string",
value: "string",
}],
mode: "string",
});
type: meraki:networks:TrafficAnalysis
properties:
customPieChartItems:
- name: string
type: string
value: string
mode: string
networkId: string
TrafficAnalysis 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 TrafficAnalysis resource accepts the following input properties:
- Network
Id string - networkId path parameter. Network ID
- Custom
Pie List<TrafficChart Items Analysis Custom Pie Chart Item> - The list of items that make up the custom pie chart for traffic reporting.
- Mode string
- The traffic analysis mode for the network. Can be one of 'disabled' (do not collect traffic types), 'basic' (collect generic traffic categories), or 'detailed' (collect destination hostnames).
- Network
Id string - networkId path parameter. Network ID
- Custom
Pie []TrafficChart Items Analysis Custom Pie Chart Item Args - The list of items that make up the custom pie chart for traffic reporting.
- Mode string
- The traffic analysis mode for the network. Can be one of 'disabled' (do not collect traffic types), 'basic' (collect generic traffic categories), or 'detailed' (collect destination hostnames).
- network
Id String - networkId path parameter. Network ID
- custom
Pie List<TrafficChart Items Analysis Custom Pie Chart Item> - The list of items that make up the custom pie chart for traffic reporting.
- mode String
- The traffic analysis mode for the network. Can be one of 'disabled' (do not collect traffic types), 'basic' (collect generic traffic categories), or 'detailed' (collect destination hostnames).
- network
Id string - networkId path parameter. Network ID
- custom
Pie TrafficChart Items Analysis Custom Pie Chart Item[] - The list of items that make up the custom pie chart for traffic reporting.
- mode string
- The traffic analysis mode for the network. Can be one of 'disabled' (do not collect traffic types), 'basic' (collect generic traffic categories), or 'detailed' (collect destination hostnames).
- network_
id str - networkId path parameter. Network ID
- custom_
pie_ Sequence[Trafficchart_ items Analysis Custom Pie Chart Item Args] - The list of items that make up the custom pie chart for traffic reporting.
- mode str
- The traffic analysis mode for the network. Can be one of 'disabled' (do not collect traffic types), 'basic' (collect generic traffic categories), or 'detailed' (collect destination hostnames).
- network
Id String - networkId path parameter. Network ID
- custom
Pie List<Property Map>Chart Items - The list of items that make up the custom pie chart for traffic reporting.
- mode String
- The traffic analysis mode for the network. Can be one of 'disabled' (do not collect traffic types), 'basic' (collect generic traffic categories), or 'detailed' (collect destination hostnames).
Outputs
All input properties are implicitly available as output properties. Additionally, the TrafficAnalysis resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing TrafficAnalysis Resource
Get an existing TrafficAnalysis resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: TrafficAnalysisState, opts?: CustomResourceOptions): TrafficAnalysis
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
custom_pie_chart_items: Optional[Sequence[TrafficAnalysisCustomPieChartItemArgs]] = None,
mode: Optional[str] = None,
network_id: Optional[str] = None) -> TrafficAnalysis
func GetTrafficAnalysis(ctx *Context, name string, id IDInput, state *TrafficAnalysisState, opts ...ResourceOption) (*TrafficAnalysis, error)
public static TrafficAnalysis Get(string name, Input<string> id, TrafficAnalysisState? state, CustomResourceOptions? opts = null)
public static TrafficAnalysis get(String name, Output<String> id, TrafficAnalysisState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Custom
Pie List<TrafficChart Items Analysis Custom Pie Chart Item> - The list of items that make up the custom pie chart for traffic reporting.
- Mode string
- The traffic analysis mode for the network. Can be one of 'disabled' (do not collect traffic types), 'basic' (collect generic traffic categories), or 'detailed' (collect destination hostnames).
- Network
Id string - networkId path parameter. Network ID
- Custom
Pie []TrafficChart Items Analysis Custom Pie Chart Item Args - The list of items that make up the custom pie chart for traffic reporting.
- Mode string
- The traffic analysis mode for the network. Can be one of 'disabled' (do not collect traffic types), 'basic' (collect generic traffic categories), or 'detailed' (collect destination hostnames).
- Network
Id string - networkId path parameter. Network ID
- custom
Pie List<TrafficChart Items Analysis Custom Pie Chart Item> - The list of items that make up the custom pie chart for traffic reporting.
- mode String
- The traffic analysis mode for the network. Can be one of 'disabled' (do not collect traffic types), 'basic' (collect generic traffic categories), or 'detailed' (collect destination hostnames).
- network
Id String - networkId path parameter. Network ID
- custom
Pie TrafficChart Items Analysis Custom Pie Chart Item[] - The list of items that make up the custom pie chart for traffic reporting.
- mode string
- The traffic analysis mode for the network. Can be one of 'disabled' (do not collect traffic types), 'basic' (collect generic traffic categories), or 'detailed' (collect destination hostnames).
- network
Id string - networkId path parameter. Network ID
- custom_
pie_ Sequence[Trafficchart_ items Analysis Custom Pie Chart Item Args] - The list of items that make up the custom pie chart for traffic reporting.
- mode str
- The traffic analysis mode for the network. Can be one of 'disabled' (do not collect traffic types), 'basic' (collect generic traffic categories), or 'detailed' (collect destination hostnames).
- network_
id str - networkId path parameter. Network ID
- custom
Pie List<Property Map>Chart Items - The list of items that make up the custom pie chart for traffic reporting.
- mode String
- The traffic analysis mode for the network. Can be one of 'disabled' (do not collect traffic types), 'basic' (collect generic traffic categories), or 'detailed' (collect destination hostnames).
- network
Id String - networkId path parameter. Network ID
Supporting Types
TrafficAnalysisCustomPieChartItem, TrafficAnalysisCustomPieChartItemArgs
- Name string
- The name of the custom pie chart item.
- Type string
- The signature type for the custom pie chart item. Can be one of 'host', 'port' or 'ipRange'.
- Value string
- The value of the custom pie chart item. Valid syntax depends on the signature type of the chart item (see sample request/response for more details).
- Name string
- The name of the custom pie chart item.
- Type string
- The signature type for the custom pie chart item. Can be one of 'host', 'port' or 'ipRange'.
- Value string
- The value of the custom pie chart item. Valid syntax depends on the signature type of the chart item (see sample request/response for more details).
- name String
- The name of the custom pie chart item.
- type String
- The signature type for the custom pie chart item. Can be one of 'host', 'port' or 'ipRange'.
- value String
- The value of the custom pie chart item. Valid syntax depends on the signature type of the chart item (see sample request/response for more details).
- name string
- The name of the custom pie chart item.
- type string
- The signature type for the custom pie chart item. Can be one of 'host', 'port' or 'ipRange'.
- value string
- The value of the custom pie chart item. Valid syntax depends on the signature type of the chart item (see sample request/response for more details).
- name str
- The name of the custom pie chart item.
- type str
- The signature type for the custom pie chart item. Can be one of 'host', 'port' or 'ipRange'.
- value str
- The value of the custom pie chart item. Valid syntax depends on the signature type of the chart item (see sample request/response for more details).
- name String
- The name of the custom pie chart item.
- type String
- The signature type for the custom pie chart item. Can be one of 'host', 'port' or 'ipRange'.
- value String
- The value of the custom pie chart item. Valid syntax depends on the signature type of the chart item (see sample request/response for more details).
Import
$ pulumi import meraki:networks/trafficAnalysis:TrafficAnalysis example "network_id"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- meraki pulumi/pulumi-meraki
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
meraki
Terraform Provider.