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

com.pulumi.kubernetes.flowcontrol.v1alpha1.inputs.NonResourcePolicyRuleArgs Maven / Gradle / Ivy

There is a newer version: 4.19.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.kubernetes.flowcontrol.v1alpha1.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.List;
import java.util.Objects;


/**
 * NonResourcePolicyRule is a predicate that matches non-resource requests according to their verb and the target non-resource URL. A NonResourcePolicyRule matches a request if and only if both (a) at least one member of verbs matches the request and (b) at least one member of nonResourceURLs matches the request.
 * 
 */
public final class NonResourcePolicyRuleArgs extends com.pulumi.resources.ResourceArgs {

    public static final NonResourcePolicyRuleArgs Empty = new NonResourcePolicyRuleArgs();

    /**
     * `nonResourceURLs` is a set of url prefixes that a user should have access to and may not be empty. For example:
     *   - "/healthz" is legal
     *   - "/hea*" is illegal
     *   - "/hea" is legal but matches nothing
     *   - "/hea/*" also matches nothing
     *   - "/healthz/*" matches all per-component health checks.
     *     "*" matches all non-resource urls. if it is present, it must be the only entry. Required.
     * 
     */
    @Import(name="nonResourceURLs", required=true)
    private Output> nonResourceURLs;

    /**
     * @return `nonResourceURLs` is a set of url prefixes that a user should have access to and may not be empty. For example:
     *   - "/healthz" is legal
     *   - "/hea*" is illegal
     *   - "/hea" is legal but matches nothing
     *   - "/hea/*" also matches nothing
     *   - "/healthz/*" matches all per-component health checks.
     *     "*" matches all non-resource urls. if it is present, it must be the only entry. Required.
     * 
     */
    public Output> nonResourceURLs() {
        return this.nonResourceURLs;
    }

    /**
     * `verbs` is a list of matching verbs and may not be empty. "*" matches all verbs. If it is present, it must be the only entry. Required.
     * 
     */
    @Import(name="verbs", required=true)
    private Output> verbs;

    /**
     * @return `verbs` is a list of matching verbs and may not be empty. "*" matches all verbs. If it is present, it must be the only entry. Required.
     * 
     */
    public Output> verbs() {
        return this.verbs;
    }

    private NonResourcePolicyRuleArgs() {}

    private NonResourcePolicyRuleArgs(NonResourcePolicyRuleArgs $) {
        this.nonResourceURLs = $.nonResourceURLs;
        this.verbs = $.verbs;
    }

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

    public static final class Builder {
        private NonResourcePolicyRuleArgs $;

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

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

        /**
         * @param nonResourceURLs `nonResourceURLs` is a set of url prefixes that a user should have access to and may not be empty. For example:
         *   - "/healthz" is legal
         *   - "/hea*" is illegal
         *   - "/hea" is legal but matches nothing
         *   - "/hea/*" also matches nothing
         *   - "/healthz/*" matches all per-component health checks.
         *     "*" matches all non-resource urls. if it is present, it must be the only entry. Required.
         * 
         * @return builder
         * 
         */
        public Builder nonResourceURLs(Output> nonResourceURLs) {
            $.nonResourceURLs = nonResourceURLs;
            return this;
        }

        /**
         * @param nonResourceURLs `nonResourceURLs` is a set of url prefixes that a user should have access to and may not be empty. For example:
         *   - "/healthz" is legal
         *   - "/hea*" is illegal
         *   - "/hea" is legal but matches nothing
         *   - "/hea/*" also matches nothing
         *   - "/healthz/*" matches all per-component health checks.
         *     "*" matches all non-resource urls. if it is present, it must be the only entry. Required.
         * 
         * @return builder
         * 
         */
        public Builder nonResourceURLs(List nonResourceURLs) {
            return nonResourceURLs(Output.of(nonResourceURLs));
        }

        /**
         * @param nonResourceURLs `nonResourceURLs` is a set of url prefixes that a user should have access to and may not be empty. For example:
         *   - "/healthz" is legal
         *   - "/hea*" is illegal
         *   - "/hea" is legal but matches nothing
         *   - "/hea/*" also matches nothing
         *   - "/healthz/*" matches all per-component health checks.
         *     "*" matches all non-resource urls. if it is present, it must be the only entry. Required.
         * 
         * @return builder
         * 
         */
        public Builder nonResourceURLs(String... nonResourceURLs) {
            return nonResourceURLs(List.of(nonResourceURLs));
        }

        /**
         * @param verbs `verbs` is a list of matching verbs and may not be empty. "*" matches all verbs. If it is present, it must be the only entry. Required.
         * 
         * @return builder
         * 
         */
        public Builder verbs(Output> verbs) {
            $.verbs = verbs;
            return this;
        }

        /**
         * @param verbs `verbs` is a list of matching verbs and may not be empty. "*" matches all verbs. If it is present, it must be the only entry. Required.
         * 
         * @return builder
         * 
         */
        public Builder verbs(List verbs) {
            return verbs(Output.of(verbs));
        }

        /**
         * @param verbs `verbs` is a list of matching verbs and may not be empty. "*" matches all verbs. If it is present, it must be the only entry. Required.
         * 
         * @return builder
         * 
         */
        public Builder verbs(String... verbs) {
            return verbs(List.of(verbs));
        }

        public NonResourcePolicyRuleArgs build() {
            if ($.nonResourceURLs == null) {
                throw new MissingRequiredPropertyException("NonResourcePolicyRuleArgs", "nonResourceURLs");
            }
            if ($.verbs == null) {
                throw new MissingRequiredPropertyException("NonResourcePolicyRuleArgs", "verbs");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy