1. Packages
  2. Digitalocean Provider
  3. API Docs
  4. UptimeCheck
DigitalOcean v4.34.0 published on Monday, Oct 21, 2024 by Pulumi

digitalocean.UptimeCheck

Explore with Pulumi AI

digitalocean logo
DigitalOcean v4.34.0 published on Monday, Oct 21, 2024 by Pulumi

    Provides a DigitalOcean Uptime Checks resource. Uptime Checks provide the ability to monitor your endpoints from around the world, and alert you when they’re slow, unavailable, or SSL certificates are expiring.

    Create UptimeCheck Resource

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

    Constructor syntax

    new UptimeCheck(name: string, args: UptimeCheckArgs, opts?: CustomResourceOptions);
    @overload
    def UptimeCheck(resource_name: str,
                    args: UptimeCheckArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def UptimeCheck(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    target: Optional[str] = None,
                    enabled: Optional[bool] = None,
                    name: Optional[str] = None,
                    regions: Optional[Sequence[str]] = None,
                    type: Optional[str] = None)
    func NewUptimeCheck(ctx *Context, name string, args UptimeCheckArgs, opts ...ResourceOption) (*UptimeCheck, error)
    public UptimeCheck(string name, UptimeCheckArgs args, CustomResourceOptions? opts = null)
    public UptimeCheck(String name, UptimeCheckArgs args)
    public UptimeCheck(String name, UptimeCheckArgs args, CustomResourceOptions options)
    
    type: digitalocean:UptimeCheck
    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 UptimeCheckArgs
    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 UptimeCheckArgs
    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 UptimeCheckArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args UptimeCheckArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args UptimeCheckArgs
    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 uptimeCheckResource = new DigitalOcean.UptimeCheck("uptimeCheckResource", new()
    {
        Target = "string",
        Enabled = false,
        Name = "string",
        Regions = new[]
        {
            "string",
        },
        Type = "string",
    });
    
    example, err := digitalocean.NewUptimeCheck(ctx, "uptimeCheckResource", &digitalocean.UptimeCheckArgs{
    	Target:  pulumi.String("string"),
    	Enabled: pulumi.Bool(false),
    	Name:    pulumi.String("string"),
    	Regions: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Type: pulumi.String("string"),
    })
    
    var uptimeCheckResource = new UptimeCheck("uptimeCheckResource", UptimeCheckArgs.builder()
        .target("string")
        .enabled(false)
        .name("string")
        .regions("string")
        .type("string")
        .build());
    
    uptime_check_resource = digitalocean.UptimeCheck("uptimeCheckResource",
        target="string",
        enabled=False,
        name="string",
        regions=["string"],
        type="string")
    
    const uptimeCheckResource = new digitalocean.UptimeCheck("uptimeCheckResource", {
        target: "string",
        enabled: false,
        name: "string",
        regions: ["string"],
        type: "string",
    });
    
    type: digitalocean:UptimeCheck
    properties:
        enabled: false
        name: string
        regions:
            - string
        target: string
        type: string
    

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

    Target string
    The endpoint to perform healthchecks on.
    Enabled bool
    A boolean value indicating whether the check is enabled/disabled.
    Name string
    A human-friendly display name for the check.
    Regions List<string>
    An array containing the selected regions to perform healthchecks from: "us_east", "us_west", "eu_west", "se_asia"
    Type string
    The type of health check to perform: 'ping' 'http' 'https'.
    Target string
    The endpoint to perform healthchecks on.
    Enabled bool
    A boolean value indicating whether the check is enabled/disabled.
    Name string
    A human-friendly display name for the check.
    Regions []string
    An array containing the selected regions to perform healthchecks from: "us_east", "us_west", "eu_west", "se_asia"
    Type string
    The type of health check to perform: 'ping' 'http' 'https'.
    target String
    The endpoint to perform healthchecks on.
    enabled Boolean
    A boolean value indicating whether the check is enabled/disabled.
    name String
    A human-friendly display name for the check.
    regions List<String>
    An array containing the selected regions to perform healthchecks from: "us_east", "us_west", "eu_west", "se_asia"
    type String
    The type of health check to perform: 'ping' 'http' 'https'.
    target string
    The endpoint to perform healthchecks on.
    enabled boolean
    A boolean value indicating whether the check is enabled/disabled.
    name string
    A human-friendly display name for the check.
    regions string[]
    An array containing the selected regions to perform healthchecks from: "us_east", "us_west", "eu_west", "se_asia"
    type string
    The type of health check to perform: 'ping' 'http' 'https'.
    target str
    The endpoint to perform healthchecks on.
    enabled bool
    A boolean value indicating whether the check is enabled/disabled.
    name str
    A human-friendly display name for the check.
    regions Sequence[str]
    An array containing the selected regions to perform healthchecks from: "us_east", "us_west", "eu_west", "se_asia"
    type str
    The type of health check to perform: 'ping' 'http' 'https'.
    target String
    The endpoint to perform healthchecks on.
    enabled Boolean
    A boolean value indicating whether the check is enabled/disabled.
    name String
    A human-friendly display name for the check.
    regions List<String>
    An array containing the selected regions to perform healthchecks from: "us_east", "us_west", "eu_west", "se_asia"
    type String
    The type of health check to perform: 'ping' 'http' 'https'.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing UptimeCheck Resource

    Get an existing UptimeCheck 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?: UptimeCheckState, opts?: CustomResourceOptions): UptimeCheck
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            enabled: Optional[bool] = None,
            name: Optional[str] = None,
            regions: Optional[Sequence[str]] = None,
            target: Optional[str] = None,
            type: Optional[str] = None) -> UptimeCheck
    func GetUptimeCheck(ctx *Context, name string, id IDInput, state *UptimeCheckState, opts ...ResourceOption) (*UptimeCheck, error)
    public static UptimeCheck Get(string name, Input<string> id, UptimeCheckState? state, CustomResourceOptions? opts = null)
    public static UptimeCheck get(String name, Output<String> id, UptimeCheckState 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:
    Enabled bool
    A boolean value indicating whether the check is enabled/disabled.
    Name string
    A human-friendly display name for the check.
    Regions List<string>
    An array containing the selected regions to perform healthchecks from: "us_east", "us_west", "eu_west", "se_asia"
    Target string
    The endpoint to perform healthchecks on.
    Type string
    The type of health check to perform: 'ping' 'http' 'https'.
    Enabled bool
    A boolean value indicating whether the check is enabled/disabled.
    Name string
    A human-friendly display name for the check.
    Regions []string
    An array containing the selected regions to perform healthchecks from: "us_east", "us_west", "eu_west", "se_asia"
    Target string
    The endpoint to perform healthchecks on.
    Type string
    The type of health check to perform: 'ping' 'http' 'https'.
    enabled Boolean
    A boolean value indicating whether the check is enabled/disabled.
    name String
    A human-friendly display name for the check.
    regions List<String>
    An array containing the selected regions to perform healthchecks from: "us_east", "us_west", "eu_west", "se_asia"
    target String
    The endpoint to perform healthchecks on.
    type String
    The type of health check to perform: 'ping' 'http' 'https'.
    enabled boolean
    A boolean value indicating whether the check is enabled/disabled.
    name string
    A human-friendly display name for the check.
    regions string[]
    An array containing the selected regions to perform healthchecks from: "us_east", "us_west", "eu_west", "se_asia"
    target string
    The endpoint to perform healthchecks on.
    type string
    The type of health check to perform: 'ping' 'http' 'https'.
    enabled bool
    A boolean value indicating whether the check is enabled/disabled.
    name str
    A human-friendly display name for the check.
    regions Sequence[str]
    An array containing the selected regions to perform healthchecks from: "us_east", "us_west", "eu_west", "se_asia"
    target str
    The endpoint to perform healthchecks on.
    type str
    The type of health check to perform: 'ping' 'http' 'https'.
    enabled Boolean
    A boolean value indicating whether the check is enabled/disabled.
    name String
    A human-friendly display name for the check.
    regions List<String>
    An array containing the selected regions to perform healthchecks from: "us_east", "us_west", "eu_west", "se_asia"
    target String
    The endpoint to perform healthchecks on.
    type String
    The type of health check to perform: 'ping' 'http' 'https'.

    Import

    Uptime checks can be imported using the uptime check’s id, e.g.

    $ pulumi import digitalocean:index/uptimeCheck:UptimeCheck target 5a4981aa-9653-4bd1-bef5-d6bff52042e4
    

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

    Package Details

    Repository
    DigitalOcean pulumi/pulumi-digitalocean
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the digitalocean Terraform Provider.
    digitalocean logo
    DigitalOcean v4.34.0 published on Monday, Oct 21, 2024 by Pulumi