1. Packages
  2. AWS
  3. API Docs
  4. networkmonitor
  5. Probe
AWS v6.77.0 published on Wednesday, Apr 9, 2025 by Pulumi

aws.networkmonitor.Probe

Explore with Pulumi AI

Resource for managing an AWS Network Monitor Probe.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.networkmonitor.Monitor("example", {
    aggregationPeriod: 30,
    monitorName: "example",
});
const exampleProbe = new aws.networkmonitor.Probe("example", {
    monitorName: example.monitorName,
    destination: "127.0.0.1",
    destinationPort: 80,
    protocol: "TCP",
    sourceArn: exampleAwsSubnet.arn,
    packetSize: 200,
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.networkmonitor.Monitor("example",
    aggregation_period=30,
    monitor_name="example")
example_probe = aws.networkmonitor.Probe("example",
    monitor_name=example.monitor_name,
    destination="127.0.0.1",
    destination_port=80,
    protocol="TCP",
    source_arn=example_aws_subnet["arn"],
    packet_size=200)
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/networkmonitor"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := networkmonitor.NewMonitor(ctx, "example", &networkmonitor.MonitorArgs{
			AggregationPeriod: pulumi.Int(30),
			MonitorName:       pulumi.String("example"),
		})
		if err != nil {
			return err
		}
		_, err = networkmonitor.NewProbe(ctx, "example", &networkmonitor.ProbeArgs{
			MonitorName:     example.MonitorName,
			Destination:     pulumi.String("127.0.0.1"),
			DestinationPort: pulumi.Int(80),
			Protocol:        pulumi.String("TCP"),
			SourceArn:       pulumi.Any(exampleAwsSubnet.Arn),
			PacketSize:      pulumi.Int(200),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = new Aws.NetworkMonitor.Monitor("example", new()
    {
        AggregationPeriod = 30,
        MonitorName = "example",
    });

    var exampleProbe = new Aws.NetworkMonitor.Probe("example", new()
    {
        MonitorName = example.MonitorName,
        Destination = "127.0.0.1",
        DestinationPort = 80,
        Protocol = "TCP",
        SourceArn = exampleAwsSubnet.Arn,
        PacketSize = 200,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.networkmonitor.Monitor;
import com.pulumi.aws.networkmonitor.MonitorArgs;
import com.pulumi.aws.networkmonitor.Probe;
import com.pulumi.aws.networkmonitor.ProbeArgs;
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 Monitor("example", MonitorArgs.builder()
            .aggregationPeriod(30)
            .monitorName("example")
            .build());

        var exampleProbe = new Probe("exampleProbe", ProbeArgs.builder()
            .monitorName(example.monitorName())
            .destination("127.0.0.1")
            .destinationPort(80)
            .protocol("TCP")
            .sourceArn(exampleAwsSubnet.arn())
            .packetSize(200)
            .build());

    }
}
Copy
resources:
  example:
    type: aws:networkmonitor:Monitor
    properties:
      aggregationPeriod: 30
      monitorName: example
  exampleProbe:
    type: aws:networkmonitor:Probe
    name: example
    properties:
      monitorName: ${example.monitorName}
      destination: 127.0.0.1
      destinationPort: 80
      protocol: TCP
      sourceArn: ${exampleAwsSubnet.arn}
      packetSize: 200
Copy

Create Probe Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Probe(name: string, args: ProbeArgs, opts?: CustomResourceOptions);
@overload
def Probe(resource_name: str,
          args: ProbeArgs,
          opts: Optional[ResourceOptions] = None)

@overload
def Probe(resource_name: str,
          opts: Optional[ResourceOptions] = None,
          destination: Optional[str] = None,
          monitor_name: Optional[str] = None,
          protocol: Optional[str] = None,
          source_arn: Optional[str] = None,
          destination_port: Optional[int] = None,
          packet_size: Optional[int] = None,
          tags: Optional[Mapping[str, str]] = None)
func NewProbe(ctx *Context, name string, args ProbeArgs, opts ...ResourceOption) (*Probe, error)
public Probe(string name, ProbeArgs args, CustomResourceOptions? opts = null)
public Probe(String name, ProbeArgs args)
public Probe(String name, ProbeArgs args, CustomResourceOptions options)
type: aws:networkmonitor:Probe
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ProbeArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ProbeArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ProbeArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ProbeArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ProbeArgs
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 probeResource = new Aws.NetworkMonitor.Probe("probeResource", new()
{
    Destination = "string",
    MonitorName = "string",
    Protocol = "string",
    SourceArn = "string",
    DestinationPort = 0,
    PacketSize = 0,
    Tags = 
    {
        { "string", "string" },
    },
});
Copy
example, err := networkmonitor.NewProbe(ctx, "probeResource", &networkmonitor.ProbeArgs{
	Destination:     pulumi.String("string"),
	MonitorName:     pulumi.String("string"),
	Protocol:        pulumi.String("string"),
	SourceArn:       pulumi.String("string"),
	DestinationPort: pulumi.Int(0),
	PacketSize:      pulumi.Int(0),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
Copy
var probeResource = new Probe("probeResource", ProbeArgs.builder()
    .destination("string")
    .monitorName("string")
    .protocol("string")
    .sourceArn("string")
    .destinationPort(0)
    .packetSize(0)
    .tags(Map.of("string", "string"))
    .build());
Copy
probe_resource = aws.networkmonitor.Probe("probeResource",
    destination="string",
    monitor_name="string",
    protocol="string",
    source_arn="string",
    destination_port=0,
    packet_size=0,
    tags={
        "string": "string",
    })
Copy
const probeResource = new aws.networkmonitor.Probe("probeResource", {
    destination: "string",
    monitorName: "string",
    protocol: "string",
    sourceArn: "string",
    destinationPort: 0,
    packetSize: 0,
    tags: {
        string: "string",
    },
});
Copy
type: aws:networkmonitor:Probe
properties:
    destination: string
    destinationPort: 0
    monitorName: string
    packetSize: 0
    protocol: string
    sourceArn: string
    tags:
        string: string
Copy

Probe 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 Probe resource accepts the following input properties:

Destination This property is required. string
The destination IP address. This must be either IPV4 or IPV6.
MonitorName This property is required. string
The name of the monitor.
Protocol This property is required. string
The protocol used for the network traffic between the source and destination. This must be either TCP or ICMP.
SourceArn This property is required. string
The ARN of the subnet.
DestinationPort int
The port associated with the destination. This is required only if the protocol is TCP and must be a number between 1 and 65536.
PacketSize int

The size of the packets sent between the source and destination. This must be a number between 56 and 8500.

The following arguments are optional:

Tags Dictionary<string, string>
Key-value tags for the monitor. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Destination This property is required. string
The destination IP address. This must be either IPV4 or IPV6.
MonitorName This property is required. string
The name of the monitor.
Protocol This property is required. string
The protocol used for the network traffic between the source and destination. This must be either TCP or ICMP.
SourceArn This property is required. string
The ARN of the subnet.
DestinationPort int
The port associated with the destination. This is required only if the protocol is TCP and must be a number between 1 and 65536.
PacketSize int

The size of the packets sent between the source and destination. This must be a number between 56 and 8500.

The following arguments are optional:

Tags map[string]string
Key-value tags for the monitor. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
destination This property is required. String
The destination IP address. This must be either IPV4 or IPV6.
monitorName This property is required. String
The name of the monitor.
protocol This property is required. String
The protocol used for the network traffic between the source and destination. This must be either TCP or ICMP.
sourceArn This property is required. String
The ARN of the subnet.
destinationPort Integer
The port associated with the destination. This is required only if the protocol is TCP and must be a number between 1 and 65536.
packetSize Integer

The size of the packets sent between the source and destination. This must be a number between 56 and 8500.

The following arguments are optional:

tags Map<String,String>
Key-value tags for the monitor. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
destination This property is required. string
The destination IP address. This must be either IPV4 or IPV6.
monitorName This property is required. string
The name of the monitor.
protocol This property is required. string
The protocol used for the network traffic between the source and destination. This must be either TCP or ICMP.
sourceArn This property is required. string
The ARN of the subnet.
destinationPort number
The port associated with the destination. This is required only if the protocol is TCP and must be a number between 1 and 65536.
packetSize number

The size of the packets sent between the source and destination. This must be a number between 56 and 8500.

The following arguments are optional:

tags {[key: string]: string}
Key-value tags for the monitor. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
destination This property is required. str
The destination IP address. This must be either IPV4 or IPV6.
monitor_name This property is required. str
The name of the monitor.
protocol This property is required. str
The protocol used for the network traffic between the source and destination. This must be either TCP or ICMP.
source_arn This property is required. str
The ARN of the subnet.
destination_port int
The port associated with the destination. This is required only if the protocol is TCP and must be a number between 1 and 65536.
packet_size int

The size of the packets sent between the source and destination. This must be a number between 56 and 8500.

The following arguments are optional:

tags Mapping[str, str]
Key-value tags for the monitor. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
destination This property is required. String
The destination IP address. This must be either IPV4 or IPV6.
monitorName This property is required. String
The name of the monitor.
protocol This property is required. String
The protocol used for the network traffic between the source and destination. This must be either TCP or ICMP.
sourceArn This property is required. String
The ARN of the subnet.
destinationPort Number
The port associated with the destination. This is required only if the protocol is TCP and must be a number between 1 and 65536.
packetSize Number

The size of the packets sent between the source and destination. This must be a number between 56 and 8500.

The following arguments are optional:

tags Map<String>
Key-value tags for the monitor. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Outputs

All input properties are implicitly available as output properties. Additionally, the Probe resource produces the following output properties:

AddressFamily string
Arn string
The ARN of the attachment.
Id string
The provider-assigned unique ID for this managed resource.
ProbeId string
TagsAll Dictionary<string, string>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

VpcId string
AddressFamily string
Arn string
The ARN of the attachment.
Id string
The provider-assigned unique ID for this managed resource.
ProbeId string
TagsAll map[string]string
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

VpcId string
addressFamily String
arn String
The ARN of the attachment.
id String
The provider-assigned unique ID for this managed resource.
probeId String
tagsAll Map<String,String>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

vpcId String
addressFamily string
arn string
The ARN of the attachment.
id string
The provider-assigned unique ID for this managed resource.
probeId string
tagsAll {[key: string]: string}
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

vpcId string
address_family str
arn str
The ARN of the attachment.
id str
The provider-assigned unique ID for this managed resource.
probe_id str
tags_all Mapping[str, str]
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

vpc_id str
addressFamily String
arn String
The ARN of the attachment.
id String
The provider-assigned unique ID for this managed resource.
probeId String
tagsAll Map<String>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

vpcId String

Look up Existing Probe Resource

Get an existing Probe 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?: ProbeState, opts?: CustomResourceOptions): Probe
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        address_family: Optional[str] = None,
        arn: Optional[str] = None,
        destination: Optional[str] = None,
        destination_port: Optional[int] = None,
        monitor_name: Optional[str] = None,
        packet_size: Optional[int] = None,
        probe_id: Optional[str] = None,
        protocol: Optional[str] = None,
        source_arn: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None,
        vpc_id: Optional[str] = None) -> Probe
func GetProbe(ctx *Context, name string, id IDInput, state *ProbeState, opts ...ResourceOption) (*Probe, error)
public static Probe Get(string name, Input<string> id, ProbeState? state, CustomResourceOptions? opts = null)
public static Probe get(String name, Output<String> id, ProbeState state, CustomResourceOptions options)
resources:  _:    type: aws:networkmonitor:Probe    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
AddressFamily string
Arn string
The ARN of the attachment.
Destination string
The destination IP address. This must be either IPV4 or IPV6.
DestinationPort int
The port associated with the destination. This is required only if the protocol is TCP and must be a number between 1 and 65536.
MonitorName string
The name of the monitor.
PacketSize int

The size of the packets sent between the source and destination. This must be a number between 56 and 8500.

The following arguments are optional:

ProbeId string
Protocol string
The protocol used for the network traffic between the source and destination. This must be either TCP or ICMP.
SourceArn string
The ARN of the subnet.
Tags Dictionary<string, string>
Key-value tags for the monitor. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
TagsAll Dictionary<string, string>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

VpcId string
AddressFamily string
Arn string
The ARN of the attachment.
Destination string
The destination IP address. This must be either IPV4 or IPV6.
DestinationPort int
The port associated with the destination. This is required only if the protocol is TCP and must be a number between 1 and 65536.
MonitorName string
The name of the monitor.
PacketSize int

The size of the packets sent between the source and destination. This must be a number between 56 and 8500.

The following arguments are optional:

ProbeId string
Protocol string
The protocol used for the network traffic between the source and destination. This must be either TCP or ICMP.
SourceArn string
The ARN of the subnet.
Tags map[string]string
Key-value tags for the monitor. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
TagsAll map[string]string
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

VpcId string
addressFamily String
arn String
The ARN of the attachment.
destination String
The destination IP address. This must be either IPV4 or IPV6.
destinationPort Integer
The port associated with the destination. This is required only if the protocol is TCP and must be a number between 1 and 65536.
monitorName String
The name of the monitor.
packetSize Integer

The size of the packets sent between the source and destination. This must be a number between 56 and 8500.

The following arguments are optional:

probeId String
protocol String
The protocol used for the network traffic between the source and destination. This must be either TCP or ICMP.
sourceArn String
The ARN of the subnet.
tags Map<String,String>
Key-value tags for the monitor. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tagsAll Map<String,String>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

vpcId String
addressFamily string
arn string
The ARN of the attachment.
destination string
The destination IP address. This must be either IPV4 or IPV6.
destinationPort number
The port associated with the destination. This is required only if the protocol is TCP and must be a number between 1 and 65536.
monitorName string
The name of the monitor.
packetSize number

The size of the packets sent between the source and destination. This must be a number between 56 and 8500.

The following arguments are optional:

probeId string
protocol string
The protocol used for the network traffic between the source and destination. This must be either TCP or ICMP.
sourceArn string
The ARN of the subnet.
tags {[key: string]: string}
Key-value tags for the monitor. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tagsAll {[key: string]: string}
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

vpcId string
address_family str
arn str
The ARN of the attachment.
destination str
The destination IP address. This must be either IPV4 or IPV6.
destination_port int
The port associated with the destination. This is required only if the protocol is TCP and must be a number between 1 and 65536.
monitor_name str
The name of the monitor.
packet_size int

The size of the packets sent between the source and destination. This must be a number between 56 and 8500.

The following arguments are optional:

probe_id str
protocol str
The protocol used for the network traffic between the source and destination. This must be either TCP or ICMP.
source_arn str
The ARN of the subnet.
tags Mapping[str, str]
Key-value tags for the monitor. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tags_all Mapping[str, str]
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

vpc_id str
addressFamily String
arn String
The ARN of the attachment.
destination String
The destination IP address. This must be either IPV4 or IPV6.
destinationPort Number
The port associated with the destination. This is required only if the protocol is TCP and must be a number between 1 and 65536.
monitorName String
The name of the monitor.
packetSize Number

The size of the packets sent between the source and destination. This must be a number between 56 and 8500.

The following arguments are optional:

probeId String
protocol String
The protocol used for the network traffic between the source and destination. This must be either TCP or ICMP.
sourceArn String
The ARN of the subnet.
tags Map<String>
Key-value tags for the monitor. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tagsAll Map<String>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

vpcId String

Import

Using pulumi import, import aws_networkmonitor_probe using the monitor name and probe id. For example:

$ pulumi import aws:networkmonitor/probe:Probe example monitor-7786087912324693644,probe-3qm8p693i4fi1h8lqylzkbp42e
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.