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

com.ovhcloud.pulumi.ovh.CloudProjectDatabase.IpRestrictionArgs Maven / Gradle / Ivy

There is a newer version: 1.1.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.ovhcloud.pulumi.ovh.CloudProjectDatabase;

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


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

    public static final IpRestrictionArgs Empty = new IpRestrictionArgs();

    /**
     * Cluster ID.
     * 
     */
    @Import(name="clusterId", required=true)
    private Output clusterId;

    /**
     * @return Cluster ID.
     * 
     */
    public Output clusterId() {
        return this.clusterId;
    }

    /**
     * Description of the IP restriction.
     * 
     */
    @Import(name="description")
    private @Nullable Output description;

    /**
     * @return Description of the IP restriction.
     * 
     */
    public Optional> description() {
        return Optional.ofNullable(this.description);
    }

    /**
     * The engine of the database cluster you want to add an IP restriction. To get a full list of available engine visit.
     * [public documentation](https://docs.ovh.com/gb/en/publiccloud/databases).
     * 
     */
    @Import(name="engine", required=true)
    private Output engine;

    /**
     * @return The engine of the database cluster you want to add an IP restriction. To get a full list of available engine visit.
     * [public documentation](https://docs.ovh.com/gb/en/publiccloud/databases).
     * 
     */
    public Output engine() {
        return this.engine;
    }

    /**
     * Authorized IP.
     * 
     */
    @Import(name="ip", required=true)
    private Output ip;

    /**
     * @return Authorized IP.
     * 
     */
    public Output ip() {
        return this.ip;
    }

    /**
     * The id of the public cloud project. If omitted,
     * the `OVH_CLOUD_PROJECT_SERVICE` environment variable is used.
     * 
     */
    @Import(name="serviceName", required=true)
    private Output serviceName;

    /**
     * @return The id of the public cloud project. If omitted,
     * the `OVH_CLOUD_PROJECT_SERVICE` environment variable is used.
     * 
     */
    public Output serviceName() {
        return this.serviceName;
    }

    private IpRestrictionArgs() {}

    private IpRestrictionArgs(IpRestrictionArgs $) {
        this.clusterId = $.clusterId;
        this.description = $.description;
        this.engine = $.engine;
        this.ip = $.ip;
        this.serviceName = $.serviceName;
    }

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

    public static final class Builder {
        private IpRestrictionArgs $;

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

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

        /**
         * @param clusterId Cluster ID.
         * 
         * @return builder
         * 
         */
        public Builder clusterId(Output clusterId) {
            $.clusterId = clusterId;
            return this;
        }

        /**
         * @param clusterId Cluster ID.
         * 
         * @return builder
         * 
         */
        public Builder clusterId(String clusterId) {
            return clusterId(Output.of(clusterId));
        }

        /**
         * @param description Description of the IP restriction.
         * 
         * @return builder
         * 
         */
        public Builder description(@Nullable Output description) {
            $.description = description;
            return this;
        }

        /**
         * @param description Description of the IP restriction.
         * 
         * @return builder
         * 
         */
        public Builder description(String description) {
            return description(Output.of(description));
        }

        /**
         * @param engine The engine of the database cluster you want to add an IP restriction. To get a full list of available engine visit.
         * [public documentation](https://docs.ovh.com/gb/en/publiccloud/databases).
         * 
         * @return builder
         * 
         */
        public Builder engine(Output engine) {
            $.engine = engine;
            return this;
        }

        /**
         * @param engine The engine of the database cluster you want to add an IP restriction. To get a full list of available engine visit.
         * [public documentation](https://docs.ovh.com/gb/en/publiccloud/databases).
         * 
         * @return builder
         * 
         */
        public Builder engine(String engine) {
            return engine(Output.of(engine));
        }

        /**
         * @param ip Authorized IP.
         * 
         * @return builder
         * 
         */
        public Builder ip(Output ip) {
            $.ip = ip;
            return this;
        }

        /**
         * @param ip Authorized IP.
         * 
         * @return builder
         * 
         */
        public Builder ip(String ip) {
            return ip(Output.of(ip));
        }

        /**
         * @param serviceName The id of the public cloud project. If omitted,
         * the `OVH_CLOUD_PROJECT_SERVICE` environment variable is used.
         * 
         * @return builder
         * 
         */
        public Builder serviceName(Output serviceName) {
            $.serviceName = serviceName;
            return this;
        }

        /**
         * @param serviceName The id of the public cloud project. If omitted,
         * the `OVH_CLOUD_PROJECT_SERVICE` environment variable is used.
         * 
         * @return builder
         * 
         */
        public Builder serviceName(String serviceName) {
            return serviceName(Output.of(serviceName));
        }

        public IpRestrictionArgs build() {
            if ($.clusterId == null) {
                throw new MissingRequiredPropertyException("IpRestrictionArgs", "clusterId");
            }
            if ($.engine == null) {
                throw new MissingRequiredPropertyException("IpRestrictionArgs", "engine");
            }
            if ($.ip == null) {
                throw new MissingRequiredPropertyException("IpRestrictionArgs", "ip");
            }
            if ($.serviceName == null) {
                throw new MissingRequiredPropertyException("IpRestrictionArgs", "serviceName");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy