All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.digitalocean.inputs.AppSpecJobArgs Maven / Gradle / Ivy
Go to download
A Pulumi package for creating and managing DigitalOcean cloud resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.digitalocean.inputs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.digitalocean.inputs.AppSpecJobAlertArgs;
import com.pulumi.digitalocean.inputs.AppSpecJobEnvArgs;
import com.pulumi.digitalocean.inputs.AppSpecJobGitArgs;
import com.pulumi.digitalocean.inputs.AppSpecJobGithubArgs;
import com.pulumi.digitalocean.inputs.AppSpecJobGitlabArgs;
import com.pulumi.digitalocean.inputs.AppSpecJobImageArgs;
import com.pulumi.digitalocean.inputs.AppSpecJobLogDestinationArgs;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
public final class AppSpecJobArgs extends com.pulumi.resources.ResourceArgs {
public static final AppSpecJobArgs Empty = new AppSpecJobArgs();
/**
* Describes an alert policy for the component.
*
*/
@Import(name="alerts")
private @Nullable Output> alerts;
/**
* @return Describes an alert policy for the component.
*
*/
public Optional>> alerts() {
return Optional.ofNullable(this.alerts);
}
/**
* An optional build command to run while building this component from source.
*
*/
@Import(name="buildCommand")
private @Nullable Output buildCommand;
/**
* @return An optional build command to run while building this component from source.
*
*/
public Optional> buildCommand() {
return Optional.ofNullable(this.buildCommand);
}
/**
* The path to a Dockerfile relative to the root of the repo. If set, overrides usage of buildpacks.
*
*/
@Import(name="dockerfilePath")
private @Nullable Output dockerfilePath;
/**
* @return The path to a Dockerfile relative to the root of the repo. If set, overrides usage of buildpacks.
*
*/
public Optional> dockerfilePath() {
return Optional.ofNullable(this.dockerfilePath);
}
/**
* An environment slug describing the type of this app.
*
*/
@Import(name="environmentSlug")
private @Nullable Output environmentSlug;
/**
* @return An environment slug describing the type of this app.
*
*/
public Optional> environmentSlug() {
return Optional.ofNullable(this.environmentSlug);
}
/**
* Describes an environment variable made available to an app competent.
*
*/
@Import(name="envs")
private @Nullable Output> envs;
/**
* @return Describes an environment variable made available to an app competent.
*
*/
public Optional>> envs() {
return Optional.ofNullable(this.envs);
}
/**
* 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.
*
*/
@Import(name="git")
private @Nullable Output git;
/**
* @return 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.
*
*/
public Optional> git() {
return Optional.ofNullable(this.git);
}
/**
* 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.
*
*/
@Import(name="github")
private @Nullable Output github;
/**
* @return 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.
*
*/
public Optional> github() {
return Optional.ofNullable(this.github);
}
/**
* 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.
*
*/
@Import(name="gitlab")
private @Nullable Output gitlab;
/**
* @return 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.
*
*/
public Optional> gitlab() {
return Optional.ofNullable(this.gitlab);
}
/**
* An image to use as the component's source. Only one of `git`, `github`, `gitlab`, or `image` may be set.
*
*/
@Import(name="image")
private @Nullable Output image;
/**
* @return An image to use as the component's source. Only one of `git`, `github`, `gitlab`, or `image` may be set.
*
*/
public Optional> image() {
return Optional.ofNullable(this.image);
}
/**
* The amount of instances that this component should be scaled to.
*
*/
@Import(name="instanceCount")
private @Nullable Output instanceCount;
/**
* @return The amount of instances that this component should be scaled to.
*
*/
public Optional> instanceCount() {
return Optional.ofNullable(this.instanceCount);
}
/**
* The instance size to use for this component. This determines the plan (basic or professional) and the available CPU and memory. The list of available instance sizes can be [found with the API](https://docs.digitalocean.com/reference/api/api-reference/#operation/list_instance_sizes) or using the [doctl CLI](https://docs.digitalocean.com/reference/doctl/) (`doctl apps tier instance-size list`). Default: `basic-xxs`
*
*/
@Import(name="instanceSizeSlug")
private @Nullable Output instanceSizeSlug;
/**
* @return The instance size to use for this component. This determines the plan (basic or professional) and the available CPU and memory. The list of available instance sizes can be [found with the API](https://docs.digitalocean.com/reference/api/api-reference/#operation/list_instance_sizes) or using the [doctl CLI](https://docs.digitalocean.com/reference/doctl/) (`doctl apps tier instance-size list`). Default: `basic-xxs`
*
*/
public Optional> instanceSizeSlug() {
return Optional.ofNullable(this.instanceSizeSlug);
}
/**
* The type of job and when it will be run during the deployment process. It may be one of:
* - `UNSPECIFIED`: Default job type, will auto-complete to POST_DEPLOY kind.
* - `PRE_DEPLOY`: Indicates a job that runs before an app deployment.
* - `POST_DEPLOY`: Indicates a job that runs after an app deployment.
* - `FAILED_DEPLOY`: Indicates a job that runs after a component fails to deploy.
*
*/
@Import(name="kind")
private @Nullable Output kind;
/**
* @return The type of job and when it will be run during the deployment process. It may be one of:
* - `UNSPECIFIED`: Default job type, will auto-complete to POST_DEPLOY kind.
* - `PRE_DEPLOY`: Indicates a job that runs before an app deployment.
* - `POST_DEPLOY`: Indicates a job that runs after an app deployment.
* - `FAILED_DEPLOY`: Indicates a job that runs after a component fails to deploy.
*
*/
public Optional> kind() {
return Optional.ofNullable(this.kind);
}
/**
* Describes a log forwarding destination.
*
*/
@Import(name="logDestinations")
private @Nullable Output> logDestinations;
/**
* @return Describes a log forwarding destination.
*
*/
public Optional>> logDestinations() {
return Optional.ofNullable(this.logDestinations);
}
/**
* The name of the component.
*
*/
@Import(name="name", required=true)
private Output name;
/**
* @return The name of the component.
*
*/
public Output name() {
return this.name;
}
/**
* An optional run command to override the component's default.
*
*/
@Import(name="runCommand")
private @Nullable Output runCommand;
/**
* @return An optional run command to override the component's default.
*
*/
public Optional> runCommand() {
return Optional.ofNullable(this.runCommand);
}
/**
* An optional path to the working directory to use for the build.
*
*/
@Import(name="sourceDir")
private @Nullable Output sourceDir;
/**
* @return An optional path to the working directory to use for the build.
*
*/
public Optional> sourceDir() {
return Optional.ofNullable(this.sourceDir);
}
private AppSpecJobArgs() {}
private AppSpecJobArgs(AppSpecJobArgs $) {
this.alerts = $.alerts;
this.buildCommand = $.buildCommand;
this.dockerfilePath = $.dockerfilePath;
this.environmentSlug = $.environmentSlug;
this.envs = $.envs;
this.git = $.git;
this.github = $.github;
this.gitlab = $.gitlab;
this.image = $.image;
this.instanceCount = $.instanceCount;
this.instanceSizeSlug = $.instanceSizeSlug;
this.kind = $.kind;
this.logDestinations = $.logDestinations;
this.name = $.name;
this.runCommand = $.runCommand;
this.sourceDir = $.sourceDir;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(AppSpecJobArgs defaults) {
return new Builder(defaults);
}
public static final class Builder {
private AppSpecJobArgs $;
public Builder() {
$ = new AppSpecJobArgs();
}
public Builder(AppSpecJobArgs defaults) {
$ = new AppSpecJobArgs(Objects.requireNonNull(defaults));
}
/**
* @param alerts Describes an alert policy for the component.
*
* @return builder
*
*/
public Builder alerts(@Nullable Output> alerts) {
$.alerts = alerts;
return this;
}
/**
* @param alerts Describes an alert policy for the component.
*
* @return builder
*
*/
public Builder alerts(List alerts) {
return alerts(Output.of(alerts));
}
/**
* @param alerts Describes an alert policy for the component.
*
* @return builder
*
*/
public Builder alerts(AppSpecJobAlertArgs... alerts) {
return alerts(List.of(alerts));
}
/**
* @param buildCommand An optional build command to run while building this component from source.
*
* @return builder
*
*/
public Builder buildCommand(@Nullable Output buildCommand) {
$.buildCommand = buildCommand;
return this;
}
/**
* @param buildCommand An optional build command to run while building this component from source.
*
* @return builder
*
*/
public Builder buildCommand(String buildCommand) {
return buildCommand(Output.of(buildCommand));
}
/**
* @param dockerfilePath The path to a Dockerfile relative to the root of the repo. If set, overrides usage of buildpacks.
*
* @return builder
*
*/
public Builder dockerfilePath(@Nullable Output dockerfilePath) {
$.dockerfilePath = dockerfilePath;
return this;
}
/**
* @param dockerfilePath The path to a Dockerfile relative to the root of the repo. If set, overrides usage of buildpacks.
*
* @return builder
*
*/
public Builder dockerfilePath(String dockerfilePath) {
return dockerfilePath(Output.of(dockerfilePath));
}
/**
* @param environmentSlug An environment slug describing the type of this app.
*
* @return builder
*
*/
public Builder environmentSlug(@Nullable Output environmentSlug) {
$.environmentSlug = environmentSlug;
return this;
}
/**
* @param environmentSlug An environment slug describing the type of this app.
*
* @return builder
*
*/
public Builder environmentSlug(String environmentSlug) {
return environmentSlug(Output.of(environmentSlug));
}
/**
* @param envs Describes an environment variable made available to an app competent.
*
* @return builder
*
*/
public Builder envs(@Nullable Output> envs) {
$.envs = envs;
return this;
}
/**
* @param envs Describes an environment variable made available to an app competent.
*
* @return builder
*
*/
public Builder envs(List envs) {
return envs(Output.of(envs));
}
/**
* @param envs Describes an environment variable made available to an app competent.
*
* @return builder
*
*/
public Builder envs(AppSpecJobEnvArgs... envs) {
return envs(List.of(envs));
}
/**
* @param 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.
*
* @return builder
*
*/
public Builder git(@Nullable Output git) {
$.git = git;
return this;
}
/**
* @param 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.
*
* @return builder
*
*/
public Builder git(AppSpecJobGitArgs git) {
return git(Output.of(git));
}
/**
* @param 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.
*
* @return builder
*
*/
public Builder github(@Nullable Output github) {
$.github = github;
return this;
}
/**
* @param 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.
*
* @return builder
*
*/
public Builder github(AppSpecJobGithubArgs github) {
return github(Output.of(github));
}
/**
* @param 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.
*
* @return builder
*
*/
public Builder gitlab(@Nullable Output gitlab) {
$.gitlab = gitlab;
return this;
}
/**
* @param 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.
*
* @return builder
*
*/
public Builder gitlab(AppSpecJobGitlabArgs gitlab) {
return gitlab(Output.of(gitlab));
}
/**
* @param image An image to use as the component's source. Only one of `git`, `github`, `gitlab`, or `image` may be set.
*
* @return builder
*
*/
public Builder image(@Nullable Output image) {
$.image = image;
return this;
}
/**
* @param image An image to use as the component's source. Only one of `git`, `github`, `gitlab`, or `image` may be set.
*
* @return builder
*
*/
public Builder image(AppSpecJobImageArgs image) {
return image(Output.of(image));
}
/**
* @param instanceCount The amount of instances that this component should be scaled to.
*
* @return builder
*
*/
public Builder instanceCount(@Nullable Output instanceCount) {
$.instanceCount = instanceCount;
return this;
}
/**
* @param instanceCount The amount of instances that this component should be scaled to.
*
* @return builder
*
*/
public Builder instanceCount(Integer instanceCount) {
return instanceCount(Output.of(instanceCount));
}
/**
* @param instanceSizeSlug The instance size to use for this component. This determines the plan (basic or professional) and the available CPU and memory. The list of available instance sizes can be [found with the API](https://docs.digitalocean.com/reference/api/api-reference/#operation/list_instance_sizes) or using the [doctl CLI](https://docs.digitalocean.com/reference/doctl/) (`doctl apps tier instance-size list`). Default: `basic-xxs`
*
* @return builder
*
*/
public Builder instanceSizeSlug(@Nullable Output instanceSizeSlug) {
$.instanceSizeSlug = instanceSizeSlug;
return this;
}
/**
* @param instanceSizeSlug The instance size to use for this component. This determines the plan (basic or professional) and the available CPU and memory. The list of available instance sizes can be [found with the API](https://docs.digitalocean.com/reference/api/api-reference/#operation/list_instance_sizes) or using the [doctl CLI](https://docs.digitalocean.com/reference/doctl/) (`doctl apps tier instance-size list`). Default: `basic-xxs`
*
* @return builder
*
*/
public Builder instanceSizeSlug(String instanceSizeSlug) {
return instanceSizeSlug(Output.of(instanceSizeSlug));
}
/**
* @param kind The type of job and when it will be run during the deployment process. It may be one of:
* - `UNSPECIFIED`: Default job type, will auto-complete to POST_DEPLOY kind.
* - `PRE_DEPLOY`: Indicates a job that runs before an app deployment.
* - `POST_DEPLOY`: Indicates a job that runs after an app deployment.
* - `FAILED_DEPLOY`: Indicates a job that runs after a component fails to deploy.
*
* @return builder
*
*/
public Builder kind(@Nullable Output kind) {
$.kind = kind;
return this;
}
/**
* @param kind The type of job and when it will be run during the deployment process. It may be one of:
* - `UNSPECIFIED`: Default job type, will auto-complete to POST_DEPLOY kind.
* - `PRE_DEPLOY`: Indicates a job that runs before an app deployment.
* - `POST_DEPLOY`: Indicates a job that runs after an app deployment.
* - `FAILED_DEPLOY`: Indicates a job that runs after a component fails to deploy.
*
* @return builder
*
*/
public Builder kind(String kind) {
return kind(Output.of(kind));
}
/**
* @param logDestinations Describes a log forwarding destination.
*
* @return builder
*
*/
public Builder logDestinations(@Nullable Output> logDestinations) {
$.logDestinations = logDestinations;
return this;
}
/**
* @param logDestinations Describes a log forwarding destination.
*
* @return builder
*
*/
public Builder logDestinations(List logDestinations) {
return logDestinations(Output.of(logDestinations));
}
/**
* @param logDestinations Describes a log forwarding destination.
*
* @return builder
*
*/
public Builder logDestinations(AppSpecJobLogDestinationArgs... logDestinations) {
return logDestinations(List.of(logDestinations));
}
/**
* @param name The name of the component.
*
* @return builder
*
*/
public Builder name(Output name) {
$.name = name;
return this;
}
/**
* @param name The name of the component.
*
* @return builder
*
*/
public Builder name(String name) {
return name(Output.of(name));
}
/**
* @param runCommand An optional run command to override the component's default.
*
* @return builder
*
*/
public Builder runCommand(@Nullable Output runCommand) {
$.runCommand = runCommand;
return this;
}
/**
* @param runCommand An optional run command to override the component's default.
*
* @return builder
*
*/
public Builder runCommand(String runCommand) {
return runCommand(Output.of(runCommand));
}
/**
* @param sourceDir An optional path to the working directory to use for the build.
*
* @return builder
*
*/
public Builder sourceDir(@Nullable Output sourceDir) {
$.sourceDir = sourceDir;
return this;
}
/**
* @param sourceDir An optional path to the working directory to use for the build.
*
* @return builder
*
*/
public Builder sourceDir(String sourceDir) {
return sourceDir(Output.of(sourceDir));
}
public AppSpecJobArgs build() {
if ($.name == null) {
throw new MissingRequiredPropertyException("AppSpecJobArgs", "name");
}
return $;
}
}
}