All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.aws.synthetics.outputs.CanarySchedule Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

There is a newer version: 6.72.0
Show newest version
// *** 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.aws.synthetics.outputs;

import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class CanarySchedule {
    /**
     * @return Duration in seconds, for the canary to continue making regular runs according to the schedule in the Expression value.
     * 
     */
    private @Nullable Integer durationInSeconds;
    /**
     * @return Rate expression or cron expression that defines how often the canary is to run. For rate expression, the syntax is `rate(number unit)`. _unit_ can be `minute`, `minutes`, or `hour`. For cron expression, the syntax is `cron(expression)`. For more information about the syntax for cron expressions, see [Scheduling canary runs using cron](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_cron.html).
     * 
     */
    private String expression;

    private CanarySchedule() {}
    /**
     * @return Duration in seconds, for the canary to continue making regular runs according to the schedule in the Expression value.
     * 
     */
    public Optional durationInSeconds() {
        return Optional.ofNullable(this.durationInSeconds);
    }
    /**
     * @return Rate expression or cron expression that defines how often the canary is to run. For rate expression, the syntax is `rate(number unit)`. _unit_ can be `minute`, `minutes`, or `hour`. For cron expression, the syntax is `cron(expression)`. For more information about the syntax for cron expressions, see [Scheduling canary runs using cron](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_cron.html).
     * 
     */
    public String expression() {
        return this.expression;
    }

    public static Builder builder() {
        return new Builder();
    }

    public static Builder builder(CanarySchedule defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable Integer durationInSeconds;
        private String expression;
        public Builder() {}
        public Builder(CanarySchedule defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.durationInSeconds = defaults.durationInSeconds;
    	      this.expression = defaults.expression;
        }

        @CustomType.Setter
        public Builder durationInSeconds(@Nullable Integer durationInSeconds) {

            this.durationInSeconds = durationInSeconds;
            return this;
        }
        @CustomType.Setter
        public Builder expression(String expression) {
            if (expression == null) {
              throw new MissingRequiredPropertyException("CanarySchedule", "expression");
            }
            this.expression = expression;
            return this;
        }
        public CanarySchedule build() {
            final var _resultValue = new CanarySchedule();
            _resultValue.durationInSeconds = durationInSeconds;
            _resultValue.expression = expression;
            return _resultValue;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy