com.pulumi.digitalocean.kotlin.outputs.GetAppSpecService.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-digitalocean-kotlin Show documentation
Show all versions of pulumi-digitalocean-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.digitalocean.kotlin.outputs
import kotlin.Deprecated
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
/**
*
* @property alerts Describes an alert policy for the component.
* @property autoscaling Configuration for automatically scaling this component based on metrics.
* @property buildCommand An optional build command to run while building this component from source.
* @property cors The [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) policies of the app.
* @property dockerfilePath The path to a Dockerfile relative to the root of the repo. If set, overrides usage of buildpacks.
* @property environmentSlug An environment slug describing the type of this app.
* @property envs Describes an environment variable made available to an app competent.
* @property git A Git repo to use as the component's source. The repository must be able to be cloned without authentication. Only one of `git`, `github` or `gitlab` may be set.
* @property github A GitHub repo to use as the component's source. DigitalOcean App Platform must have [access to the repository](https://cloud.digitalocean.com/apps/github/install). Only one of `git`, `github`, `gitlab`, or `image` may be set.
* @property gitlab A Gitlab repo to use as the component's source. DigitalOcean App Platform must have [access to the repository](https://cloud.digitalocean.com/apps/gitlab/install). Only one of `git`, `github`, `gitlab`, or `image` may be set.
* @property healthCheck A health check to determine the availability of this component.
* @property httpPort The internal port on which this service's run command will listen.
* @property image An image to use as the component's source. Only one of `git`, `github`, `gitlab`, or `image` may be set.
* @property instanceCount The amount of instances that this component should be scaled to.
* @property instanceSizeSlug The instance size to use for this component.
* @property internalPorts A list of ports on which this service will listen for internal traffic.
* @property logDestinations Describes a log forwarding destination.
* @property name The name of the component.
* @property routes
* @property runCommand An optional run command to override the component's default.
* @property sourceDir An optional path to the working directory to use for the build.
*/
public data class GetAppSpecService(
public val alerts: List? = null,
public val autoscaling: GetAppSpecServiceAutoscaling? = null,
public val buildCommand: String? = null,
@Deprecated(
message = """
Service level CORS rules are deprecated in favor of ingresses
""",
)
public val cors: GetAppSpecServiceCors? = null,
public val dockerfilePath: String? = null,
public val environmentSlug: String? = null,
public val envs: List? = null,
public val git: GetAppSpecServiceGit? = null,
public val github: GetAppSpecServiceGithub? = null,
public val gitlab: GetAppSpecServiceGitlab? = null,
public val healthCheck: GetAppSpecServiceHealthCheck? = null,
public val httpPort: Int,
public val image: GetAppSpecServiceImage? = null,
public val instanceCount: Int? = null,
public val instanceSizeSlug: String? = null,
public val internalPorts: List,
public val logDestinations: List? = null,
public val name: String,
@Deprecated(
message = """
Service level routes are deprecated in favor of ingresses
""",
)
public val routes: List,
public val runCommand: String,
public val sourceDir: String? = null,
) {
public companion object {
public fun toKotlin(javaType: com.pulumi.digitalocean.outputs.GetAppSpecService): GetAppSpecService = GetAppSpecService(
alerts = javaType.alerts().map({ args0 ->
args0.let({ args0 ->
com.pulumi.digitalocean.kotlin.outputs.GetAppSpecServiceAlert.Companion.toKotlin(args0)
})
}),
autoscaling = javaType.autoscaling().map({ args0 ->
args0.let({ args0 ->
com.pulumi.digitalocean.kotlin.outputs.GetAppSpecServiceAutoscaling.Companion.toKotlin(args0)
})
}).orElse(null),
buildCommand = javaType.buildCommand().map({ args0 -> args0 }).orElse(null),
cors = javaType.cors().map({ args0 ->
args0.let({ args0 ->
com.pulumi.digitalocean.kotlin.outputs.GetAppSpecServiceCors.Companion.toKotlin(args0)
})
}).orElse(null),
dockerfilePath = javaType.dockerfilePath().map({ args0 -> args0 }).orElse(null),
environmentSlug = javaType.environmentSlug().map({ args0 -> args0 }).orElse(null),
envs = javaType.envs().map({ args0 ->
args0.let({ args0 ->
com.pulumi.digitalocean.kotlin.outputs.GetAppSpecServiceEnv.Companion.toKotlin(args0)
})
}),
git = javaType.git().map({ args0 ->
args0.let({ args0 ->
com.pulumi.digitalocean.kotlin.outputs.GetAppSpecServiceGit.Companion.toKotlin(args0)
})
}).orElse(null),
github = javaType.github().map({ args0 ->
args0.let({ args0 ->
com.pulumi.digitalocean.kotlin.outputs.GetAppSpecServiceGithub.Companion.toKotlin(args0)
})
}).orElse(null),
gitlab = javaType.gitlab().map({ args0 ->
args0.let({ args0 ->
com.pulumi.digitalocean.kotlin.outputs.GetAppSpecServiceGitlab.Companion.toKotlin(args0)
})
}).orElse(null),
healthCheck = javaType.healthCheck().map({ args0 ->
args0.let({ args0 ->
com.pulumi.digitalocean.kotlin.outputs.GetAppSpecServiceHealthCheck.Companion.toKotlin(args0)
})
}).orElse(null),
httpPort = javaType.httpPort(),
image = javaType.image().map({ args0 ->
args0.let({ args0 ->
com.pulumi.digitalocean.kotlin.outputs.GetAppSpecServiceImage.Companion.toKotlin(args0)
})
}).orElse(null),
instanceCount = javaType.instanceCount().map({ args0 -> args0 }).orElse(null),
instanceSizeSlug = javaType.instanceSizeSlug().map({ args0 -> args0 }).orElse(null),
internalPorts = javaType.internalPorts().map({ args0 -> args0 }),
logDestinations = javaType.logDestinations().map({ args0 ->
args0.let({ args0 ->
com.pulumi.digitalocean.kotlin.outputs.GetAppSpecServiceLogDestination.Companion.toKotlin(args0)
})
}),
name = javaType.name(),
routes = javaType.routes().map({ args0 ->
args0.let({ args0 ->
com.pulumi.digitalocean.kotlin.outputs.GetAppSpecServiceRoute.Companion.toKotlin(args0)
})
}),
runCommand = javaType.runCommand(),
sourceDir = javaType.sourceDir().map({ args0 -> args0 }).orElse(null),
)
}
}