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

com.pulumi.alicloud.dns.AlidnsRecordArgs Maven / Gradle / Ivy

There is a newer version: 3.63.0-alpha.1727424957
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.alicloud.dns;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
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;


public final class AlidnsRecordArgs extends com.pulumi.resources.ResourceArgs {

    public static final AlidnsRecordArgs Empty = new AlidnsRecordArgs();

    /**
     * Name of the domain. This name without suffix can have a string of 1 to 63 characters, must contain only alphanumeric characters or "-", and must not begin or end with "-", and "-" must not in the 3th and 4th character positions at the same time. Suffix `.sh` and `.tel` are not supported.
     * 
     */
    @Import(name="domainName", required=true)
    private Output domainName;

    /**
     * @return Name of the domain. This name without suffix can have a string of 1 to 63 characters, must contain only alphanumeric characters or "-", and must not begin or end with "-", and "-" must not in the 3th and 4th character positions at the same time. Suffix `.sh` and `.tel` are not supported.
     * 
     */
    public Output domainName() {
        return this.domainName;
    }

    /**
     * User language.
     * 
     */
    @Import(name="lang")
    private @Nullable Output lang;

    /**
     * @return User language.
     * 
     */
    public Optional> lang() {
        return Optional.ofNullable(this.lang);
    }

    /**
     * The resolution line of domain record. When the `type` is `FORWORD_URL`, this parameter must be `default`. Default value is `default`. For checking all resolution lines enumeration please visit [Alibaba Cloud DNS doc](https://www.alibabacloud.com/help/en/alibaba-cloud-dns/latest/adding-a-dns-record) or using alicloud.dns.getResolutionLines in data source to get the value.
     * 
     */
    @Import(name="line")
    private @Nullable Output line;

    /**
     * @return The resolution line of domain record. When the `type` is `FORWORD_URL`, this parameter must be `default`. Default value is `default`. For checking all resolution lines enumeration please visit [Alibaba Cloud DNS doc](https://www.alibabacloud.com/help/en/alibaba-cloud-dns/latest/adding-a-dns-record) or using alicloud.dns.getResolutionLines in data source to get the value.
     * 
     */
    public Optional> line() {
        return Optional.ofNullable(this.line);
    }

    /**
     * The priority of domain record. Valid values: `[1-10]`. When the `type` is `MX`, this parameter is required.
     * 
     */
    @Import(name="priority")
    private @Nullable Output priority;

    /**
     * @return The priority of domain record. Valid values: `[1-10]`. When the `type` is `MX`, this parameter is required.
     * 
     */
    public Optional> priority() {
        return Optional.ofNullable(this.priority);
    }

    /**
     * The remark of the domain record.
     * 
     */
    @Import(name="remark")
    private @Nullable Output remark;

    /**
     * @return The remark of the domain record.
     * 
     */
    public Optional> remark() {
        return Optional.ofNullable(this.remark);
    }

    /**
     * Host record for the domain record. This host_record can have at most 253 characters, and each part split with `.` can have at most 63 characters, and must contain only alphanumeric characters or hyphens, such as `-`, `.`, `*`, `{@literal @}`, and must not begin or end with `-`.
     * 
     */
    @Import(name="rr", required=true)
    private Output rr;

    /**
     * @return Host record for the domain record. This host_record can have at most 253 characters, and each part split with `.` can have at most 63 characters, and must contain only alphanumeric characters or hyphens, such as `-`, `.`, `*`, `{@literal @}`, and must not begin or end with `-`.
     * 
     */
    public Output rr() {
        return this.rr;
    }

    /**
     * The status of the domain record. Valid values: `ENABLE`,`DISABLE`.
     * 
     */
    @Import(name="status")
    private @Nullable Output status;

    /**
     * @return The status of the domain record. Valid values: `ENABLE`,`DISABLE`.
     * 
     */
    public Optional> status() {
        return Optional.ofNullable(this.status);
    }

    /**
     * The effective time of domain record. Its scope depends on the edition of the cloud resolution. Free is `[600, 86400]`, Basic is `[120, 86400]`, Standard is `[60, 86400]`, Ultimate is `[10, 86400]`, Exclusive is `[1, 86400]`. Default value is `600`.
     * 
     */
    @Import(name="ttl")
    private @Nullable Output ttl;

    /**
     * @return The effective time of domain record. Its scope depends on the edition of the cloud resolution. Free is `[600, 86400]`, Basic is `[120, 86400]`, Standard is `[60, 86400]`, Ultimate is `[10, 86400]`, Exclusive is `[1, 86400]`. Default value is `600`.
     * 
     */
    public Optional> ttl() {
        return Optional.ofNullable(this.ttl);
    }

    /**
     * The type of domain record. Valid values: `A`,`NS`,`MX`,`TXT`,`CNAME`,`SRV`,`AAAA`,`CAA`, `REDIRECT_URL` and `FORWORD_URL`.
     * 
     */
    @Import(name="type", required=true)
    private Output type;

    /**
     * @return The type of domain record. Valid values: `A`,`NS`,`MX`,`TXT`,`CNAME`,`SRV`,`AAAA`,`CAA`, `REDIRECT_URL` and `FORWORD_URL`.
     * 
     */
    public Output type() {
        return this.type;
    }

    /**
     * The IP address of the client.
     * 
     */
    @Import(name="userClientIp")
    private @Nullable Output userClientIp;

    /**
     * @return The IP address of the client.
     * 
     */
    public Optional> userClientIp() {
        return Optional.ofNullable(this.userClientIp);
    }

    /**
     * The value of domain record, When the `type` is `MX`,`NS`,`CNAME`,`SRV`, the server will treat the `value` as a fully qualified domain name, so it's no need to add a `.` at the end.
     * 
     */
    @Import(name="value", required=true)
    private Output value;

    /**
     * @return The value of domain record, When the `type` is `MX`,`NS`,`CNAME`,`SRV`, the server will treat the `value` as a fully qualified domain name, so it's no need to add a `.` at the end.
     * 
     */
    public Output value() {
        return this.value;
    }

    private AlidnsRecordArgs() {}

    private AlidnsRecordArgs(AlidnsRecordArgs $) {
        this.domainName = $.domainName;
        this.lang = $.lang;
        this.line = $.line;
        this.priority = $.priority;
        this.remark = $.remark;
        this.rr = $.rr;
        this.status = $.status;
        this.ttl = $.ttl;
        this.type = $.type;
        this.userClientIp = $.userClientIp;
        this.value = $.value;
    }

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

    public static final class Builder {
        private AlidnsRecordArgs $;

        public Builder() {
            $ = new AlidnsRecordArgs();
        }

        public Builder(AlidnsRecordArgs defaults) {
            $ = new AlidnsRecordArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param domainName Name of the domain. This name without suffix can have a string of 1 to 63 characters, must contain only alphanumeric characters or "-", and must not begin or end with "-", and "-" must not in the 3th and 4th character positions at the same time. Suffix `.sh` and `.tel` are not supported.
         * 
         * @return builder
         * 
         */
        public Builder domainName(Output domainName) {
            $.domainName = domainName;
            return this;
        }

        /**
         * @param domainName Name of the domain. This name without suffix can have a string of 1 to 63 characters, must contain only alphanumeric characters or "-", and must not begin or end with "-", and "-" must not in the 3th and 4th character positions at the same time. Suffix `.sh` and `.tel` are not supported.
         * 
         * @return builder
         * 
         */
        public Builder domainName(String domainName) {
            return domainName(Output.of(domainName));
        }

        /**
         * @param lang User language.
         * 
         * @return builder
         * 
         */
        public Builder lang(@Nullable Output lang) {
            $.lang = lang;
            return this;
        }

        /**
         * @param lang User language.
         * 
         * @return builder
         * 
         */
        public Builder lang(String lang) {
            return lang(Output.of(lang));
        }

        /**
         * @param line The resolution line of domain record. When the `type` is `FORWORD_URL`, this parameter must be `default`. Default value is `default`. For checking all resolution lines enumeration please visit [Alibaba Cloud DNS doc](https://www.alibabacloud.com/help/en/alibaba-cloud-dns/latest/adding-a-dns-record) or using alicloud.dns.getResolutionLines in data source to get the value.
         * 
         * @return builder
         * 
         */
        public Builder line(@Nullable Output line) {
            $.line = line;
            return this;
        }

        /**
         * @param line The resolution line of domain record. When the `type` is `FORWORD_URL`, this parameter must be `default`. Default value is `default`. For checking all resolution lines enumeration please visit [Alibaba Cloud DNS doc](https://www.alibabacloud.com/help/en/alibaba-cloud-dns/latest/adding-a-dns-record) or using alicloud.dns.getResolutionLines in data source to get the value.
         * 
         * @return builder
         * 
         */
        public Builder line(String line) {
            return line(Output.of(line));
        }

        /**
         * @param priority The priority of domain record. Valid values: `[1-10]`. When the `type` is `MX`, this parameter is required.
         * 
         * @return builder
         * 
         */
        public Builder priority(@Nullable Output priority) {
            $.priority = priority;
            return this;
        }

        /**
         * @param priority The priority of domain record. Valid values: `[1-10]`. When the `type` is `MX`, this parameter is required.
         * 
         * @return builder
         * 
         */
        public Builder priority(Integer priority) {
            return priority(Output.of(priority));
        }

        /**
         * @param remark The remark of the domain record.
         * 
         * @return builder
         * 
         */
        public Builder remark(@Nullable Output remark) {
            $.remark = remark;
            return this;
        }

        /**
         * @param remark The remark of the domain record.
         * 
         * @return builder
         * 
         */
        public Builder remark(String remark) {
            return remark(Output.of(remark));
        }

        /**
         * @param rr Host record for the domain record. This host_record can have at most 253 characters, and each part split with `.` can have at most 63 characters, and must contain only alphanumeric characters or hyphens, such as `-`, `.`, `*`, `{@literal @}`, and must not begin or end with `-`.
         * 
         * @return builder
         * 
         */
        public Builder rr(Output rr) {
            $.rr = rr;
            return this;
        }

        /**
         * @param rr Host record for the domain record. This host_record can have at most 253 characters, and each part split with `.` can have at most 63 characters, and must contain only alphanumeric characters or hyphens, such as `-`, `.`, `*`, `{@literal @}`, and must not begin or end with `-`.
         * 
         * @return builder
         * 
         */
        public Builder rr(String rr) {
            return rr(Output.of(rr));
        }

        /**
         * @param status The status of the domain record. Valid values: `ENABLE`,`DISABLE`.
         * 
         * @return builder
         * 
         */
        public Builder status(@Nullable Output status) {
            $.status = status;
            return this;
        }

        /**
         * @param status The status of the domain record. Valid values: `ENABLE`,`DISABLE`.
         * 
         * @return builder
         * 
         */
        public Builder status(String status) {
            return status(Output.of(status));
        }

        /**
         * @param ttl The effective time of domain record. Its scope depends on the edition of the cloud resolution. Free is `[600, 86400]`, Basic is `[120, 86400]`, Standard is `[60, 86400]`, Ultimate is `[10, 86400]`, Exclusive is `[1, 86400]`. Default value is `600`.
         * 
         * @return builder
         * 
         */
        public Builder ttl(@Nullable Output ttl) {
            $.ttl = ttl;
            return this;
        }

        /**
         * @param ttl The effective time of domain record. Its scope depends on the edition of the cloud resolution. Free is `[600, 86400]`, Basic is `[120, 86400]`, Standard is `[60, 86400]`, Ultimate is `[10, 86400]`, Exclusive is `[1, 86400]`. Default value is `600`.
         * 
         * @return builder
         * 
         */
        public Builder ttl(Integer ttl) {
            return ttl(Output.of(ttl));
        }

        /**
         * @param type The type of domain record. Valid values: `A`,`NS`,`MX`,`TXT`,`CNAME`,`SRV`,`AAAA`,`CAA`, `REDIRECT_URL` and `FORWORD_URL`.
         * 
         * @return builder
         * 
         */
        public Builder type(Output type) {
            $.type = type;
            return this;
        }

        /**
         * @param type The type of domain record. Valid values: `A`,`NS`,`MX`,`TXT`,`CNAME`,`SRV`,`AAAA`,`CAA`, `REDIRECT_URL` and `FORWORD_URL`.
         * 
         * @return builder
         * 
         */
        public Builder type(String type) {
            return type(Output.of(type));
        }

        /**
         * @param userClientIp The IP address of the client.
         * 
         * @return builder
         * 
         */
        public Builder userClientIp(@Nullable Output userClientIp) {
            $.userClientIp = userClientIp;
            return this;
        }

        /**
         * @param userClientIp The IP address of the client.
         * 
         * @return builder
         * 
         */
        public Builder userClientIp(String userClientIp) {
            return userClientIp(Output.of(userClientIp));
        }

        /**
         * @param value The value of domain record, When the `type` is `MX`,`NS`,`CNAME`,`SRV`, the server will treat the `value` as a fully qualified domain name, so it's no need to add a `.` at the end.
         * 
         * @return builder
         * 
         */
        public Builder value(Output value) {
            $.value = value;
            return this;
        }

        /**
         * @param value The value of domain record, When the `type` is `MX`,`NS`,`CNAME`,`SRV`, the server will treat the `value` as a fully qualified domain name, so it's no need to add a `.` at the end.
         * 
         * @return builder
         * 
         */
        public Builder value(String value) {
            return value(Output.of(value));
        }

        public AlidnsRecordArgs build() {
            if ($.domainName == null) {
                throw new MissingRequiredPropertyException("AlidnsRecordArgs", "domainName");
            }
            if ($.rr == null) {
                throw new MissingRequiredPropertyException("AlidnsRecordArgs", "rr");
            }
            if ($.type == null) {
                throw new MissingRequiredPropertyException("AlidnsRecordArgs", "type");
            }
            if ($.value == null) {
                throw new MissingRequiredPropertyException("AlidnsRecordArgs", "value");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy