Class UptimeCheckConfig
This message configures which resources and services to monitor for availability.
To get more information about UptimeCheckConfig, see:
- API documentation
- How-to Guides
- Official Documentation
Warning: All arguments including
http_check.auth_info.passwordwill be stored in the raw state as plain-text. Read more about secrets in state.
Example Usage - Uptime Check Config Http
using Pulumi;
using Gcp = Pulumi.Gcp;
class MyStack : Stack
{
public MyStack()
{
var http = new Gcp.Monitoring.UptimeCheckConfig("http", new Gcp.Monitoring.UptimeCheckConfigArgs
{
ContentMatchers =
{
new Gcp.Monitoring.Inputs.UptimeCheckConfigContentMatcherArgs
{
Content = "example",
},
},
DisplayName = "http-uptime-check",
HttpCheck = new Gcp.Monitoring.Inputs.UptimeCheckConfigHttpCheckArgs
{
Path = "/some-path",
Port = "8010",
},
MonitoredResource = new Gcp.Monitoring.Inputs.UptimeCheckConfigMonitoredResourceArgs
{
Labels =
{
{ "host", "192.168.1.1" },
{ "project_id", "my-project-name" },
},
Type = "uptime_url",
},
Timeout = "60s",
});
}
}
Example Usage - Uptime Check Config Https
using Pulumi;
using Gcp = Pulumi.Gcp;
class MyStack : Stack
{
public MyStack()
{
var https = new Gcp.Monitoring.UptimeCheckConfig("https", new Gcp.Monitoring.UptimeCheckConfigArgs
{
ContentMatchers =
{
new Gcp.Monitoring.Inputs.UptimeCheckConfigContentMatcherArgs
{
Content = "example",
},
},
DisplayName = "https-uptime-check",
HttpCheck = new Gcp.Monitoring.Inputs.UptimeCheckConfigHttpCheckArgs
{
Path = "/some-path",
Port = "443",
UseSsl = true,
ValidateSsl = true,
},
MonitoredResource = new Gcp.Monitoring.Inputs.UptimeCheckConfigMonitoredResourceArgs
{
Labels =
{
{ "host", "192.168.1.1" },
{ "project_id", "my-project-name" },
},
Type = "uptime_url",
},
Timeout = "60s",
});
}
}
Inherited Members
Namespace: Pulumi.Gcp.Monitoring
Assembly: Pulumi.Gcp.dll
Syntax
public class UptimeCheckConfig : CustomResource
Constructors
View SourceUptimeCheckConfig(String, UptimeCheckConfigArgs, CustomResourceOptions)
Create a UptimeCheckConfig resource with the given unique name, arguments, and options.
Declaration
public UptimeCheckConfig(string name, UptimeCheckConfigArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| UptimeCheckConfigArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceContentMatchers
The expected content on the page the check is run against. Currently, only the first entry in the list is supported, and other entries will be ignored. The server will look for an exact match of the string in the page response's content. This field is optional and should only be specified if a content match is required. Structure is documented below.
Declaration
public Output<ImmutableArray<UptimeCheckConfigContentMatcher>> ContentMatchers { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<UptimeCheckConfigContentMatcher>> |
DisplayName
A human-friendly name for the uptime check configuration. The display name should be unique within a Stackdriver Workspace in order to make it easier to identify; however, uniqueness is not enforced.
Declaration
public Output<string> DisplayName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
HttpCheck
Contains information needed to make an HTTP or HTTPS check. Structure is documented below.
Declaration
public Output<UptimeCheckConfigHttpCheck> HttpCheck { get; }
Property Value
| Type | Description |
|---|---|
| Output<UptimeCheckConfigHttpCheck> |
MonitoredResource
The monitored resource (https://cloud.google.com/monitoring/api/resources) associated with the configuration. The following monitored resource types are supported for uptime checks: uptime_url gce_instance gae_app aws_ec2_instance aws_elb_load_balancer Structure is documented below.
Declaration
public Output<UptimeCheckConfigMonitoredResource> MonitoredResource { get; }
Property Value
| Type | Description |
|---|---|
| Output<UptimeCheckConfigMonitoredResource> |
Name
A unique resource name for this UptimeCheckConfig. The format is projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID].
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Period
How often, in seconds, the uptime check is performed. Currently, the only supported values are 60s (1 minute), 300s (5 minutes), 600s (10 minutes), and 900s (15 minutes). Optional, defaults to 300s.
Declaration
public Output<string> Period { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Project
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Declaration
public Output<string> Project { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ResourceGroup
The group resource associated with the configuration. Structure is documented below.
Declaration
public Output<UptimeCheckConfigResourceGroup> ResourceGroup { get; }
Property Value
| Type | Description |
|---|---|
| Output<UptimeCheckConfigResourceGroup> |
SelectedRegions
The list of regions from which the check will be run. Some regions contain one location, and others contain more than one. If this field is specified, enough regions to include a minimum of 3 locations must be provided, or an error message is returned. Not specifying this field will result in uptime checks running from all regions.
Declaration
public Output<ImmutableArray<string>> SelectedRegions { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
TcpCheck
Contains information needed to make a TCP check. Structure is documented below.
Declaration
public Output<UptimeCheckConfigTcpCheck> TcpCheck { get; }
Property Value
| Type | Description |
|---|---|
| Output<UptimeCheckConfigTcpCheck> |
Timeout
The maximum amount of time to wait for the request to complete (must be between 1 and 60 seconds). Accepted formats https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Duration
Declaration
public Output<string> Timeout { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
UptimeCheckId
The id of the uptime check
Declaration
public Output<string> UptimeCheckId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, UptimeCheckConfigState, CustomResourceOptions)
Get an existing UptimeCheckConfig resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static UptimeCheckConfig Get(string name, Input<string> id, UptimeCheckConfigState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| UptimeCheckConfigState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| UptimeCheckConfig |