1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. HealthChecks
  5. PingProbe
Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

oci.HealthChecks.PingProbe

Explore with Pulumi AI

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

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

const testPingProbe = new oci.healthchecks.PingProbe("test_ping_probe", {
    compartmentId: compartmentId,
    protocol: pingProbeProtocol,
    targets: pingProbeTargets,
    port: pingProbePort,
    timeoutInSeconds: pingProbeTimeoutInSeconds,
    vantagePointNames: pingProbeVantagePointNames,
});
Copy
import pulumi
import pulumi_oci as oci

test_ping_probe = oci.health_checks.PingProbe("test_ping_probe",
    compartment_id=compartment_id,
    protocol=ping_probe_protocol,
    targets=ping_probe_targets,
    port=ping_probe_port,
    timeout_in_seconds=ping_probe_timeout_in_seconds,
    vantage_point_names=ping_probe_vantage_point_names)
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := healthchecks.NewPingProbe(ctx, "test_ping_probe", &healthchecks.PingProbeArgs{
			CompartmentId:     pulumi.Any(compartmentId),
			Protocol:          pulumi.Any(pingProbeProtocol),
			Targets:           pulumi.Any(pingProbeTargets),
			Port:              pulumi.Any(pingProbePort),
			TimeoutInSeconds:  pulumi.Any(pingProbeTimeoutInSeconds),
			VantagePointNames: pulumi.Any(pingProbeVantagePointNames),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testPingProbe = new Oci.HealthChecks.PingProbe("test_ping_probe", new()
    {
        CompartmentId = compartmentId,
        Protocol = pingProbeProtocol,
        Targets = pingProbeTargets,
        Port = pingProbePort,
        TimeoutInSeconds = pingProbeTimeoutInSeconds,
        VantagePointNames = pingProbeVantagePointNames,
    });

});
Copy
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(compartmentId)
            .protocol(pingProbeProtocol)
            .targets(pingProbeTargets)
            .port(pingProbePort)
            .timeoutInSeconds(pingProbeTimeoutInSeconds)
            .vantagePointNames(pingProbeVantagePointNames)
            .build());

    }
}
Copy
resources:
  testPingProbe:
    type: oci:HealthChecks:PingProbe
    name: test_ping_probe
    properties:
      compartmentId: ${compartmentId}
      protocol: ${pingProbeProtocol}
      targets: ${pingProbeTargets}
      port: ${pingProbePort}
      timeoutInSeconds: ${pingProbeTimeoutInSeconds}
      vantagePointNames: ${pingProbeVantagePointNames}
Copy

Create PingProbe Resource

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

Constructor syntax

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

@overload
def PingProbe(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              compartment_id: Optional[str] = None,
              protocol: Optional[str] = None,
              targets: Optional[Sequence[str]] = None,
              port: Optional[int] = None,
              timeout_in_seconds: Optional[int] = None,
              vantage_point_names: Optional[Sequence[str]] = 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.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. PingProbeArgs
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. 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 This property is required. string
The unique name of the resource.
args This property is required. PingProbeArgs
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. PingProbeArgs
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. PingProbeArgs
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 pingProbeResource = new Oci.HealthChecks.PingProbe("pingProbeResource", new()
{
    CompartmentId = "string",
    Protocol = "string",
    Targets = new[]
    {
        "string",
    },
    Port = 0,
    TimeoutInSeconds = 0,
    VantagePointNames = new[]
    {
        "string",
    },
});
Copy
example, err := HealthChecks.NewPingProbe(ctx, "pingProbeResource", &HealthChecks.PingProbeArgs{
	CompartmentId: pulumi.String("string"),
	Protocol:      pulumi.String("string"),
	Targets: pulumi.StringArray{
		pulumi.String("string"),
	},
	Port:             pulumi.Int(0),
	TimeoutInSeconds: pulumi.Int(0),
	VantagePointNames: pulumi.StringArray{
		pulumi.String("string"),
	},
})
Copy
var pingProbeResource = new PingProbe("pingProbeResource", PingProbeArgs.builder()
    .compartmentId("string")
    .protocol("string")
    .targets("string")
    .port(0)
    .timeoutInSeconds(0)
    .vantagePointNames("string")
    .build());
Copy
ping_probe_resource = oci.health_checks.PingProbe("pingProbeResource",
    compartment_id="string",
    protocol="string",
    targets=["string"],
    port=0,
    timeout_in_seconds=0,
    vantage_point_names=["string"])
Copy
const pingProbeResource = new oci.healthchecks.PingProbe("pingProbeResource", {
    compartmentId: "string",
    protocol: "string",
    targets: ["string"],
    port: 0,
    timeoutInSeconds: 0,
    vantagePointNames: ["string"],
});
Copy
type: oci:HealthChecks:PingProbe
properties:
    compartmentId: string
    port: 0
    protocol: string
    targets:
        - string
    timeoutInSeconds: 0
    vantagePointNames:
        - string
Copy

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

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The PingProbe resource accepts the following input properties:

CompartmentId
This property is required.
Changes to this property will trigger replacement.
string
The OCID of the compartment.
Protocol
This property is required.
Changes to this property will trigger replacement.
string
The protocols for ping probes.
Targets
This property is required.
Changes to this property will trigger replacement.
List<string>
A list of targets (hostnames or IP addresses) of the probe.
Port Changes to this property will trigger replacement. int
The port on which to probe endpoints. If unspecified, probes will use the default port of their protocol.
TimeoutInSeconds Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. List<string>

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

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

CompartmentId
This property is required.
Changes to this property will trigger replacement.
string
The OCID of the compartment.
Protocol
This property is required.
Changes to this property will trigger replacement.
string
The protocols for ping probes.
Targets
This property is required.
Changes to this property will trigger replacement.
[]string
A list of targets (hostnames or IP addresses) of the probe.
Port Changes to this property will trigger replacement. int
The port on which to probe endpoints. If unspecified, probes will use the default port of their protocol.
TimeoutInSeconds Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. []string

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

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

compartmentId
This property is required.
Changes to this property will trigger replacement.
String
The OCID of the compartment.
protocol
This property is required.
Changes to this property will trigger replacement.
String
The protocols for ping probes.
targets
This property is required.
Changes to this property will trigger replacement.
List<String>
A list of targets (hostnames or IP addresses) of the probe.
port Changes to this property will trigger replacement. Integer
The port on which to probe endpoints. If unspecified, probes will use the default port of their protocol.
timeoutInSeconds Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. List<String>

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

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

compartmentId
This property is required.
Changes to this property will trigger replacement.
string
The OCID of the compartment.
protocol
This property is required.
Changes to this property will trigger replacement.
string
The protocols for ping probes.
targets
This property is required.
Changes to this property will trigger replacement.
string[]
A list of targets (hostnames or IP addresses) of the probe.
port Changes to this property will trigger replacement. number
The port on which to probe endpoints. If unspecified, probes will use the default port of their protocol.
timeoutInSeconds Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string[]

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

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

compartment_id
This property is required.
Changes to this property will trigger replacement.
str
The OCID of the compartment.
protocol
This property is required.
Changes to this property will trigger replacement.
str
The protocols for ping probes.
targets
This property is required.
Changes to this property will trigger replacement.
Sequence[str]
A list of targets (hostnames or IP addresses) of the probe.
port Changes to this property will trigger replacement. int
The port on which to probe endpoints. If unspecified, probes will use the default port of their protocol.
timeout_in_seconds Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. Sequence[str]

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

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

compartmentId
This property is required.
Changes to this property will trigger replacement.
String
The OCID of the compartment.
protocol
This property is required.
Changes to this property will trigger replacement.
String
The protocols for ping probes.
targets
This property is required.
Changes to this property will trigger replacement.
List<String>
A list of targets (hostnames or IP addresses) of the probe.
port Changes to this property will trigger replacement. Number
The port on which to probe endpoints. If unspecified, probes will use the default port of their protocol.
timeoutInSeconds Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. List<String>

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

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

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)
resources:  _:    type: oci:HealthChecks:PingProbe    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:
CompartmentId Changes to this property will trigger replacement. string
The OCID of the compartment.
HomeRegion string
The region where updates must be made and where results must be fetched from.
Port Changes to this property will trigger replacement. int
The port on which to probe endpoints. If unspecified, probes will use the default port of their protocol.
Protocol Changes to this property will trigger replacement. string
The protocols for ping probes.
ResultsUrl string
A URL for fetching the probe results.
Targets Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. List<string>

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

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

CompartmentId Changes to this property will trigger replacement. string
The OCID of the compartment.
HomeRegion string
The region where updates must be made and where results must be fetched from.
Port Changes to this property will trigger replacement. int
The port on which to probe endpoints. If unspecified, probes will use the default port of their protocol.
Protocol Changes to this property will trigger replacement. string
The protocols for ping probes.
ResultsUrl string
A URL for fetching the probe results.
Targets Changes to this property will trigger replacement. []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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. []string

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

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

compartmentId Changes to this property will trigger replacement. String
The OCID of the compartment.
homeRegion String
The region where updates must be made and where results must be fetched from.
port Changes to this property will trigger replacement. Integer
The port on which to probe endpoints. If unspecified, probes will use the default port of their protocol.
protocol Changes to this property will trigger replacement. String
The protocols for ping probes.
resultsUrl String
A URL for fetching the probe results.
targets Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. List<String>

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

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

compartmentId Changes to this property will trigger replacement. string
The OCID of the compartment.
homeRegion string
The region where updates must be made and where results must be fetched from.
port Changes to this property will trigger replacement. number
The port on which to probe endpoints. If unspecified, probes will use the default port of their protocol.
protocol Changes to this property will trigger replacement. string
The protocols for ping probes.
resultsUrl string
A URL for fetching the probe results.
targets Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string[]

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

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

compartment_id Changes to this property will trigger replacement. str
The OCID of the compartment.
home_region str
The region where updates must be made and where results must be fetched from.
port Changes to this property will trigger replacement. int
The port on which to probe endpoints. If unspecified, probes will use the default port of their protocol.
protocol Changes to this property will trigger replacement. str
The protocols for ping probes.
results_url str
A URL for fetching the probe results.
targets Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. Sequence[str]

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

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

compartmentId Changes to this property will trigger replacement. String
The OCID of the compartment.
homeRegion String
The region where updates must be made and where results must be fetched from.
port Changes to this property will trigger replacement. Number
The port on which to probe endpoints. If unspecified, probes will use the default port of their protocol.
protocol Changes to this property will trigger replacement. String
The protocols for ping probes.
resultsUrl String
A URL for fetching the probe results.
targets Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. List<String>

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

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

Import

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

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

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

Package Details

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