oci logo
Oracle Cloud Infrastructure v0.13.0, Mar 28 23

oci.HealthChecks.PingProbe

This resource provides the Ping Probe resource in Oracle Cloud Infrastructure Health Checks service.

Creates an on-demand ping probe. The location response header contains the URL for fetching probe results.

Note: The on-demand probe configuration is not saved.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testPingProbe = new Oci.HealthChecks.PingProbe("testPingProbe", new()
    {
        CompartmentId = @var.Compartment_id,
        Protocol = @var.Ping_probe_protocol,
        Targets = @var.Ping_probe_targets,
        Port = @var.Ping_probe_port,
        TimeoutInSeconds = @var.Ping_probe_timeout_in_seconds,
        VantagePointNames = @var.Ping_probe_vantage_point_names,
    });

});
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/go/oci/HealthChecks"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := HealthChecks.NewPingProbe(ctx, "testPingProbe", &HealthChecks.PingProbeArgs{
			CompartmentId:     pulumi.Any(_var.Compartment_id),
			Protocol:          pulumi.Any(_var.Ping_probe_protocol),
			Targets:           pulumi.Any(_var.Ping_probe_targets),
			Port:              pulumi.Any(_var.Ping_probe_port),
			TimeoutInSeconds:  pulumi.Any(_var.Ping_probe_timeout_in_seconds),
			VantagePointNames: pulumi.Any(_var.Ping_probe_vantage_point_names),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.HealthChecks.PingProbe;
import com.pulumi.oci.HealthChecks.PingProbeArgs;
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 testPingProbe = new PingProbe("testPingProbe", PingProbeArgs.builder()        
            .compartmentId(var_.compartment_id())
            .protocol(var_.ping_probe_protocol())
            .targets(var_.ping_probe_targets())
            .port(var_.ping_probe_port())
            .timeoutInSeconds(var_.ping_probe_timeout_in_seconds())
            .vantagePointNames(var_.ping_probe_vantage_point_names())
            .build());

    }
}
import pulumi
import pulumi_oci as oci

test_ping_probe = oci.health_checks.PingProbe("testPingProbe",
    compartment_id=var["compartment_id"],
    protocol=var["ping_probe_protocol"],
    targets=var["ping_probe_targets"],
    port=var["ping_probe_port"],
    timeout_in_seconds=var["ping_probe_timeout_in_seconds"],
    vantage_point_names=var["ping_probe_vantage_point_names"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testPingProbe = new oci.healthchecks.PingProbe("testPingProbe", {
    compartmentId: _var.compartment_id,
    protocol: _var.ping_probe_protocol,
    targets: _var.ping_probe_targets,
    port: _var.ping_probe_port,
    timeoutInSeconds: _var.ping_probe_timeout_in_seconds,
    vantagePointNames: _var.ping_probe_vantage_point_names,
});
resources:
  testPingProbe:
    type: oci:HealthChecks:PingProbe
    properties:
      #Required
      compartmentId: ${var.compartment_id}
      protocol: ${var.ping_probe_protocol}
      targets: ${var.ping_probe_targets}
      #Optional
      port: ${var.ping_probe_port}
      timeoutInSeconds: ${var.ping_probe_timeout_in_seconds}
      vantagePointNames: ${var.ping_probe_vantage_point_names}

Create PingProbe Resource

new PingProbe(name: string, args: PingProbeArgs, opts?: CustomResourceOptions);
@overload
def PingProbe(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              compartment_id: Optional[str] = None,
              port: Optional[int] = None,
              protocol: Optional[str] = None,
              targets: Optional[Sequence[str]] = None,
              timeout_in_seconds: Optional[int] = None,
              vantage_point_names: Optional[Sequence[str]] = None)
@overload
def PingProbe(resource_name: str,
              args: PingProbeArgs,
              opts: Optional[ResourceOptions] = None)
func NewPingProbe(ctx *Context, name string, args PingProbeArgs, opts ...ResourceOption) (*PingProbe, error)
public PingProbe(string name, PingProbeArgs args, CustomResourceOptions? opts = null)
public PingProbe(String name, PingProbeArgs args)
public PingProbe(String name, PingProbeArgs args, CustomResourceOptions options)
type: oci:HealthChecks:PingProbe
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args PingProbeArgs
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 PingProbeArgs
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 PingProbeArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args PingProbeArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args PingProbeArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

CompartmentId string

The OCID of the compartment.

Protocol string

The protocols for ping probes.

Targets List<string>

A list of targets (hostnames or IP addresses) of the probe.

Port int

The port on which to probe endpoints. If unspecified, probes will use the default port of their protocol.

TimeoutInSeconds int

The probe timeout in seconds. Valid values: 10, 20, 30, and 60. The probe timeout must be less than or equal to intervalInSeconds for monitors.

VantagePointNames List<string>

A list of names of vantage points from which to execute the probe.

CompartmentId string

The OCID of the compartment.

Protocol string

The protocols for ping probes.

Targets []string

A list of targets (hostnames or IP addresses) of the probe.

Port int

The port on which to probe endpoints. If unspecified, probes will use the default port of their protocol.

TimeoutInSeconds int

The probe timeout in seconds. Valid values: 10, 20, 30, and 60. The probe timeout must be less than or equal to intervalInSeconds for monitors.

VantagePointNames []string

A list of names of vantage points from which to execute the probe.

compartmentId String

The OCID of the compartment.

protocol String

The protocols for ping probes.

targets List<String>

A list of targets (hostnames or IP addresses) of the probe.

port Integer

The port on which to probe endpoints. If unspecified, probes will use the default port of their protocol.

timeoutInSeconds Integer

The probe timeout in seconds. Valid values: 10, 20, 30, and 60. The probe timeout must be less than or equal to intervalInSeconds for monitors.

vantagePointNames List<String>

A list of names of vantage points from which to execute the probe.

compartmentId string

The OCID of the compartment.

protocol string

The protocols for ping probes.

targets string[]

A list of targets (hostnames or IP addresses) of the probe.

port number

The port on which to probe endpoints. If unspecified, probes will use the default port of their protocol.

timeoutInSeconds number

The probe timeout in seconds. Valid values: 10, 20, 30, and 60. The probe timeout must be less than or equal to intervalInSeconds for monitors.

vantagePointNames string[]

A list of names of vantage points from which to execute the probe.

compartment_id str

The OCID of the compartment.

protocol str

The protocols for ping probes.

targets Sequence[str]

A list of targets (hostnames or IP addresses) of the probe.

port int

The port on which to probe endpoints. If unspecified, probes will use the default port of their protocol.

timeout_in_seconds int

The probe timeout in seconds. Valid values: 10, 20, 30, and 60. The probe timeout must be less than or equal to intervalInSeconds for monitors.

vantage_point_names Sequence[str]

A list of names of vantage points from which to execute the probe.

compartmentId String

The OCID of the compartment.

protocol String

The protocols for ping probes.

targets List<String>

A list of targets (hostnames or IP addresses) of the probe.

port Number

The port on which to probe endpoints. If unspecified, probes will use the default port of their protocol.

timeoutInSeconds Number

The probe timeout in seconds. Valid values: 10, 20, 30, and 60. The probe timeout must be less than or equal to intervalInSeconds for monitors.

vantagePointNames List<String>

A list of names of vantage points from which to execute the probe.

Outputs

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

HomeRegion string

The region where updates must be made and where results must be fetched from.

Id string

The provider-assigned unique ID for this managed resource.

ResultsUrl string

A URL for fetching the probe results.

TimeCreated string

The RFC 3339-formatted creation date and time of the probe.

HomeRegion string

The region where updates must be made and where results must be fetched from.

Id string

The provider-assigned unique ID for this managed resource.

ResultsUrl string

A URL for fetching the probe results.

TimeCreated string

The RFC 3339-formatted creation date and time of the probe.

homeRegion String

The region where updates must be made and where results must be fetched from.

id String

The provider-assigned unique ID for this managed resource.

resultsUrl String

A URL for fetching the probe results.

timeCreated String

The RFC 3339-formatted creation date and time of the probe.

homeRegion string

The region where updates must be made and where results must be fetched from.

id string

The provider-assigned unique ID for this managed resource.

resultsUrl string

A URL for fetching the probe results.

timeCreated string

The RFC 3339-formatted creation date and time of the probe.

home_region str

The region where updates must be made and where results must be fetched from.

id str

The provider-assigned unique ID for this managed resource.

results_url str

A URL for fetching the probe results.

time_created str

The RFC 3339-formatted creation date and time of the probe.

homeRegion String

The region where updates must be made and where results must be fetched from.

id String

The provider-assigned unique ID for this managed resource.

resultsUrl String

A URL for fetching the probe results.

timeCreated String

The RFC 3339-formatted creation date and time of the probe.

Look up Existing PingProbe Resource

Get an existing PingProbe 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?: PingProbeState, opts?: CustomResourceOptions): PingProbe
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        compartment_id: Optional[str] = None,
        home_region: Optional[str] = None,
        port: Optional[int] = None,
        protocol: Optional[str] = None,
        results_url: Optional[str] = None,
        targets: Optional[Sequence[str]] = None,
        time_created: Optional[str] = None,
        timeout_in_seconds: Optional[int] = None,
        vantage_point_names: Optional[Sequence[str]] = None) -> PingProbe
func GetPingProbe(ctx *Context, name string, id IDInput, state *PingProbeState, opts ...ResourceOption) (*PingProbe, error)
public static PingProbe Get(string name, Input<string> id, PingProbeState? state, CustomResourceOptions? opts = null)
public static PingProbe get(String name, Output<String> id, PingProbeState 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.
The following state arguments are supported:
CompartmentId string

The OCID of the compartment.

HomeRegion string

The region where updates must be made and where results must be fetched from.

Port int

The port on which to probe endpoints. If unspecified, probes will use the default port of their protocol.

Protocol string

The protocols for ping probes.

ResultsUrl string

A URL for fetching the probe results.

Targets List<string>

A list of targets (hostnames or IP addresses) of the probe.

TimeCreated string

The RFC 3339-formatted creation date and time of the probe.

TimeoutInSeconds int

The probe timeout in seconds. Valid values: 10, 20, 30, and 60. The probe timeout must be less than or equal to intervalInSeconds for monitors.

VantagePointNames List<string>

A list of names of vantage points from which to execute the probe.

CompartmentId string

The OCID of the compartment.

HomeRegion string

The region where updates must be made and where results must be fetched from.

Port int

The port on which to probe endpoints. If unspecified, probes will use the default port of their protocol.

Protocol string

The protocols for ping probes.

ResultsUrl string

A URL for fetching the probe results.

Targets []string

A list of targets (hostnames or IP addresses) of the probe.

TimeCreated string

The RFC 3339-formatted creation date and time of the probe.

TimeoutInSeconds int

The probe timeout in seconds. Valid values: 10, 20, 30, and 60. The probe timeout must be less than or equal to intervalInSeconds for monitors.

VantagePointNames []string

A list of names of vantage points from which to execute the probe.

compartmentId String

The OCID of the compartment.

homeRegion String

The region where updates must be made and where results must be fetched from.

port Integer

The port on which to probe endpoints. If unspecified, probes will use the default port of their protocol.

protocol String

The protocols for ping probes.

resultsUrl String

A URL for fetching the probe results.

targets List<String>

A list of targets (hostnames or IP addresses) of the probe.

timeCreated String

The RFC 3339-formatted creation date and time of the probe.

timeoutInSeconds Integer

The probe timeout in seconds. Valid values: 10, 20, 30, and 60. The probe timeout must be less than or equal to intervalInSeconds for monitors.

vantagePointNames List<String>

A list of names of vantage points from which to execute the probe.

compartmentId string

The OCID of the compartment.

homeRegion string

The region where updates must be made and where results must be fetched from.

port number

The port on which to probe endpoints. If unspecified, probes will use the default port of their protocol.

protocol string

The protocols for ping probes.

resultsUrl string

A URL for fetching the probe results.

targets string[]

A list of targets (hostnames or IP addresses) of the probe.

timeCreated string

The RFC 3339-formatted creation date and time of the probe.

timeoutInSeconds number

The probe timeout in seconds. Valid values: 10, 20, 30, and 60. The probe timeout must be less than or equal to intervalInSeconds for monitors.

vantagePointNames string[]

A list of names of vantage points from which to execute the probe.

compartment_id str

The OCID of the compartment.

home_region str

The region where updates must be made and where results must be fetched from.

port int

The port on which to probe endpoints. If unspecified, probes will use the default port of their protocol.

protocol str

The protocols for ping probes.

results_url str

A URL for fetching the probe results.

targets Sequence[str]

A list of targets (hostnames or IP addresses) of the probe.

time_created str

The RFC 3339-formatted creation date and time of the probe.

timeout_in_seconds int

The probe timeout in seconds. Valid values: 10, 20, 30, and 60. The probe timeout must be less than or equal to intervalInSeconds for monitors.

vantage_point_names Sequence[str]

A list of names of vantage points from which to execute the probe.

compartmentId String

The OCID of the compartment.

homeRegion String

The region where updates must be made and where results must be fetched from.

port Number

The port on which to probe endpoints. If unspecified, probes will use the default port of their protocol.

protocol String

The protocols for ping probes.

resultsUrl String

A URL for fetching the probe results.

targets List<String>

A list of targets (hostnames or IP addresses) of the probe.

timeCreated String

The RFC 3339-formatted creation date and time of the probe.

timeoutInSeconds Number

The probe timeout in seconds. Valid values: 10, 20, 30, and 60. The probe timeout must be less than or equal to intervalInSeconds for monitors.

vantagePointNames List<String>

A list of names of vantage points from which to execute the probe.

Import

PingProbes can be imported using the id, e.g.

 $ pulumi import oci:HealthChecks/pingProbe:PingProbe test_ping_probe "id"

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.