com.pulumi.gcp.monitoring.kotlin.outputs.UptimeCheckConfigHttpCheck.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.monitoring.kotlin.outputs
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.collections.Map
/**
*
* @property acceptedResponseStatusCodes If present, the check will only pass if the HTTP response status code is in this set of status codes. If empty, the HTTP status code will only pass if the HTTP status code is 200-299.
* Structure is documented below.
* @property authInfo The authentication information using username and password. Optional when creating an HTTP check; defaults to empty. Do not use with other authentication fields.
* Structure is documented below.
* @property body The request body associated with the HTTP POST request. If `content_type` is `URL_ENCODED`, the body passed in must be URL-encoded. Users can provide a `Content-Length` header via the `headers` field or the API will do so. If the `request_method` is `GET` and `body` is not empty, the API will return an error. The maximum byte size is 1 megabyte. Note - As with all bytes fields JSON representations are base64 encoded. e.g. `foo=bar` in URL-encoded form is `foo%3Dbar` and in base64 encoding is `Zm9vJTI1M0RiYXI=`.
* @property contentType The content type to use for the check.
* Possible values are: `TYPE_UNSPECIFIED`, `URL_ENCODED`, `USER_PROVIDED`.
* @property customContentType A user provided content type header to use for the check. The invalid configurations outlined in the `content_type` field apply to custom_content_type`, as well as the following 1. `content_type` is `URL_ENCODED` and `custom_content_type` is set. 2. `content_type` is `USER_PROVIDED` and `custom_content_type` is not set.
* @property headers The list of headers to send as part of the uptime check request. If two headers have the same key and different values, they should be entered as a single header, with the value being a comma-separated list of all the desired values as described in [RFC 2616 (page 31)](https://www.w3.org/Protocols/rfc2616/rfc2616.txt). Entering two separate headers with the same key in a Create call will cause the first to be overwritten by the second. The maximum number of headers allowed is 100.
* @property maskHeaders Boolean specifying whether to encrypt the header information. Encryption should be specified for any headers related to authentication that you do not wish to be seen when retrieving the configuration. The server will be responsible for encrypting the headers. On Get/List calls, if `mask_headers` is set to `true` then the headers will be obscured with `******`.
* @property path The path to the page to run the check against. Will be combined with the host (specified within the MonitoredResource) and port to construct the full URL. If the provided path does not begin with `/`, a `/` will be prepended automatically. Optional (defaults to `/`).
* @property pingConfig Contains information needed to add pings to an HTTP check.
* Structure is documented below.
* @property port The port to the page to run the check against. Will be combined with `host` (specified within the `monitored_resource`) and path to construct the full URL. Optional (defaults to 80 without SSL, or 443 with SSL).
* @property requestMethod The HTTP request method to use for the check. If set to `METHOD_UNSPECIFIED` then `request_method` defaults to `GET`.
* Default value is `GET`.
* Possible values are: `METHOD_UNSPECIFIED`, `GET`, `POST`.
* @property serviceAgentAuthentication The authentication information using the Monitoring Service Agent. Optional when creating an HTTPS check; defaults to empty. Do not use with other authentication fields.
* Structure is documented below.
* @property useSsl If true, use HTTPS instead of HTTP to run the check.
* @property validateSsl Boolean specifying whether to include SSL certificate validation as a part of the Uptime check. Only applies to checks where `monitored_resource` is set to `uptime_url`. If `use_ssl` is `false`, setting `validate_ssl` to `true` has no effect.
*/
public data class UptimeCheckConfigHttpCheck(
public val acceptedResponseStatusCodes: List? = null,
public val authInfo: UptimeCheckConfigHttpCheckAuthInfo? = null,
public val body: String? = null,
public val contentType: String? = null,
public val customContentType: String? = null,
public val headers: Map? = null,
public val maskHeaders: Boolean? = null,
public val path: String? = null,
public val pingConfig: UptimeCheckConfigHttpCheckPingConfig? = null,
public val port: Int? = null,
public val requestMethod: String? = null,
public val serviceAgentAuthentication: UptimeCheckConfigHttpCheckServiceAgentAuthentication? =
null,
public val useSsl: Boolean? = null,
public val validateSsl: Boolean? = null,
) {
public companion object {
public fun toKotlin(javaType: com.pulumi.gcp.monitoring.outputs.UptimeCheckConfigHttpCheck): UptimeCheckConfigHttpCheck = UptimeCheckConfigHttpCheck(
acceptedResponseStatusCodes = javaType.acceptedResponseStatusCodes().map({ args0 ->
args0.let({ args0 ->
com.pulumi.gcp.monitoring.kotlin.outputs.UptimeCheckConfigHttpCheckAcceptedResponseStatusCode.Companion.toKotlin(args0)
})
}),
authInfo = javaType.authInfo().map({ args0 ->
args0.let({ args0 ->
com.pulumi.gcp.monitoring.kotlin.outputs.UptimeCheckConfigHttpCheckAuthInfo.Companion.toKotlin(args0)
})
}).orElse(null),
body = javaType.body().map({ args0 -> args0 }).orElse(null),
contentType = javaType.contentType().map({ args0 -> args0 }).orElse(null),
customContentType = javaType.customContentType().map({ args0 -> args0 }).orElse(null),
headers = javaType.headers().map({ args0 -> args0.key.to(args0.value) }).toMap(),
maskHeaders = javaType.maskHeaders().map({ args0 -> args0 }).orElse(null),
path = javaType.path().map({ args0 -> args0 }).orElse(null),
pingConfig = javaType.pingConfig().map({ args0 ->
args0.let({ args0 ->
com.pulumi.gcp.monitoring.kotlin.outputs.UptimeCheckConfigHttpCheckPingConfig.Companion.toKotlin(args0)
})
}).orElse(null),
port = javaType.port().map({ args0 -> args0 }).orElse(null),
requestMethod = javaType.requestMethod().map({ args0 -> args0 }).orElse(null),
serviceAgentAuthentication = javaType.serviceAgentAuthentication().map({ args0 ->
args0.let({ args0 ->
com.pulumi.gcp.monitoring.kotlin.outputs.UptimeCheckConfigHttpCheckServiceAgentAuthentication.Companion.toKotlin(args0)
})
}).orElse(null),
useSsl = javaType.useSsl().map({ args0 -> args0 }).orElse(null),
validateSsl = javaType.validateSsl().map({ args0 -> args0 }).orElse(null),
)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy