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,
});
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)
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
})
}
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,
});
});
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());
}
}
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
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)
type: aws:networkmonitor:Probe
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 ProbeArgs
- 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 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 string
- The unique name of the resource.
- args ProbeArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ProbeArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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" },
},
});
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"),
},
})
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());
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",
})
const probeResource = new aws.networkmonitor.Probe("probeResource", {
destination: "string",
monitorName: "string",
protocol: "string",
sourceArn: "string",
destinationPort: 0,
packetSize: 0,
tags: {
string: "string",
},
});
type: aws:networkmonitor:Probe
properties:
destination: string
destinationPort: 0
monitorName: string
packetSize: 0
protocol: string
sourceArn: string
tags:
string: string
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
The Probe resource accepts the following input properties:
- Destination string
- The destination IP address. This must be either IPV4 or IPV6.
- Monitor
Name string - The name of the monitor.
- Protocol string
- The protocol used for the network traffic between the source and destination. This must be either TCP or ICMP.
- Source
Arn string - 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:
- 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 string
- The destination IP address. This must be either IPV4 or IPV6.
- Monitor
Name string - The name of the monitor.
- Protocol string
- The protocol used for the network traffic between the source and destination. This must be either TCP or ICMP.
- Source
Arn string - 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:
- 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 String
- The destination IP address. This must be either IPV4 or IPV6.
- monitor
Name String - The name of the monitor.
- protocol String
- The protocol used for the network traffic between the source and destination. This must be either TCP or ICMP.
- source
Arn String - The ARN of the subnet.
- destination
Port 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.
- packet
Size 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:
- 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 string
- The destination IP address. This must be either IPV4 or IPV6.
- monitor
Name string - The name of the monitor.
- protocol string
- The protocol used for the network traffic between the source and destination. This must be either TCP or ICMP.
- source
Arn string - The ARN of the subnet.
- destination
Port 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.
- packet
Size 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:
- {[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 str
- The destination IP address. This must be either IPV4 or IPV6.
- monitor_
name str - The name of the monitor.
- 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.
- 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:
- 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 String
- The destination IP address. This must be either IPV4 or IPV6.
- monitor
Name String - The name of the monitor.
- protocol String
- The protocol used for the network traffic between the source and destination. This must be either TCP or ICMP.
- source
Arn String - The ARN of the subnet.
- destination
Port 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.
- packet
Size 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:
- 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:
- Address
Family string - Arn string
- The ARN of the attachment.
- Id string
- The provider-assigned unique ID for this managed resource.
- Probe
Id string - Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Vpc
Id string
- Address
Family string - Arn string
- The ARN of the attachment.
- Id string
- The provider-assigned unique ID for this managed resource.
- Probe
Id string - map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Vpc
Id string
- address
Family String - arn String
- The ARN of the attachment.
- id String
- The provider-assigned unique ID for this managed resource.
- probe
Id String - Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - vpc
Id String
- address
Family string - arn string
- The ARN of the attachment.
- id string
- The provider-assigned unique ID for this managed resource.
- probe
Id string - {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - vpc
Id 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 - Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - vpc_
id str
- address
Family String - arn String
- The ARN of the attachment.
- id String
- The provider-assigned unique ID for this managed resource.
- probe
Id String - Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - vpc
Id 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)
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.
- Address
Family string - Arn string
- The ARN of the attachment.
- Destination string
- 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 string - 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 string - Protocol string
- The protocol used for the network traffic between the source and destination. This must be either TCP or ICMP.
- Source
Arn string - The ARN of the subnet.
- 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. - Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Vpc
Id string
- Address
Family string - Arn string
- The ARN of the attachment.
- Destination string
- 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 string - 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 string - Protocol string
- The protocol used for the network traffic between the source and destination. This must be either TCP or ICMP.
- Source
Arn string - The ARN of the subnet.
- 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. - map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Vpc
Id string
- address
Family String - arn String
- The ARN of the attachment.
- destination String
- The destination IP address. This must be either IPV4 or IPV6.
- destination
Port 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.
- monitor
Name String - The name of the monitor.
- packet
Size 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:
- probe
Id String - protocol String
- The protocol used for the network traffic between the source and destination. This must be either TCP or ICMP.
- source
Arn String - The ARN of the subnet.
- 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. - Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - vpc
Id String
- address
Family string - arn string
- The ARN of the attachment.
- destination string
- The destination IP address. This must be either IPV4 or IPV6.
- destination
Port 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.
- monitor
Name string - The name of the monitor.
- packet
Size 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:
- probe
Id string - protocol string
- The protocol used for the network traffic between the source and destination. This must be either TCP or ICMP.
- source
Arn string - The ARN of the subnet.
- {[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. - {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - vpc
Id 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.
- 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. - Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - vpc_
id str
- address
Family String - arn String
- The ARN of the attachment.
- destination String
- The destination IP address. This must be either IPV4 or IPV6.
- destination
Port 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.
- monitor
Name String - The name of the monitor.
- packet
Size 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:
- probe
Id String - protocol String
- The protocol used for the network traffic between the source and destination. This must be either TCP or ICMP.
- source
Arn String - The ARN of the subnet.
- 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. - Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - vpc
Id 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
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.