All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.aws.networkmonitor.Probe Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

There is a newer version: 6.60.0-alpha.1731982519
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.aws.networkmonitor;

import com.pulumi.aws.Utilities;
import com.pulumi.aws.networkmonitor.ProbeArgs;
import com.pulumi.aws.networkmonitor.inputs.ProbeState;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Integer;
import java.lang.String;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Resource for managing an AWS Network Monitor Probe.
 * 
 * ## Example Usage
 * 
 * ### Basic Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * 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());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * Using `pulumi import`, import `aws_networkmonitor_probe` using the monitor name and probe id. For example: * * ```sh * $ pulumi import aws:networkmonitor/probe:Probe example monitor-7786087912324693644,probe-3qm8p693i4fi1h8lqylzkbp42e * ``` * */ @ResourceType(type="aws:networkmonitor/probe:Probe") public class Probe extends com.pulumi.resources.CustomResource { @Export(name="addressFamily", refs={String.class}, tree="[0]") private Output addressFamily; public Output addressFamily() { return this.addressFamily; } /** * The ARN of the attachment. * */ @Export(name="arn", refs={String.class}, tree="[0]") private Output arn; /** * @return The ARN of the attachment. * */ public Output arn() { return this.arn; } /** * The destination IP address. This must be either IPV4 or IPV6. * */ @Export(name="destination", refs={String.class}, tree="[0]") private Output destination; /** * @return The destination IP address. This must be either IPV4 or IPV6. * */ public Output destination() { return this.destination; } /** * The port associated with the destination. This is required only if the protocol is TCP and must be a number between 1 and 65536. * */ @Export(name="destinationPort", refs={Integer.class}, tree="[0]") private Output destinationPort; /** * @return The port associated with the destination. This is required only if the protocol is TCP and must be a number between 1 and 65536. * */ public Output> destinationPort() { return Codegen.optional(this.destinationPort); } /** * The name of the monitor. * */ @Export(name="monitorName", refs={String.class}, tree="[0]") private Output monitorName; /** * @return The name of the monitor. * */ public Output monitorName() { return this.monitorName; } /** * 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: * */ @Export(name="packetSize", refs={Integer.class}, tree="[0]") private Output packetSize; /** * @return 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: * */ public Output packetSize() { return this.packetSize; } @Export(name="probeId", refs={String.class}, tree="[0]") private Output probeId; public Output probeId() { return this.probeId; } /** * The protocol used for the network traffic between the source and destination. This must be either TCP or ICMP. * */ @Export(name="protocol", refs={String.class}, tree="[0]") private Output protocol; /** * @return The protocol used for the network traffic between the source and destination. This must be either TCP or ICMP. * */ public Output protocol() { return this.protocol; } /** * The ARN of the subnet. * */ @Export(name="sourceArn", refs={String.class}, tree="[0]") private Output sourceArn; /** * @return The ARN of the subnet. * */ public Output sourceArn() { return this.sourceArn; } /** * 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. * */ @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tags; /** * @return 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. * */ public Output>> tags() { return Codegen.optional(this.tags); } /** * A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block. * * @deprecated * Please use `tags` instead. * */ @Deprecated /* Please use `tags` instead. */ @Export(name="tagsAll", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tagsAll; /** * @return A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block. * */ public Output> tagsAll() { return this.tagsAll; } @Export(name="vpcId", refs={String.class}, tree="[0]") private Output vpcId; public Output vpcId() { return this.vpcId; } /** * * @param name The _unique_ name of the resulting resource. */ public Probe(java.lang.String name) { this(name, ProbeArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public Probe(java.lang.String name, ProbeArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public Probe(java.lang.String name, ProbeArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("aws:networkmonitor/probe:Probe", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private Probe(java.lang.String name, Output id, @Nullable ProbeState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("aws:networkmonitor/probe:Probe", name, state, makeResourceOptions(options, id), false); } private static ProbeArgs makeArgs(ProbeArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? ProbeArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state * @param options Optional settings to control the behavior of the CustomResource. */ public static Probe get(java.lang.String name, Output id, @Nullable ProbeState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Probe(name, id, state, options); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy