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

com.pulumi.aws.appmesh.inputs.RouteSpecGrpcRouteActionWeightedTargetArgs 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.60.0-alpha.1731982519
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.appmesh.inputs;

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 RouteSpecGrpcRouteActionWeightedTargetArgs extends com.pulumi.resources.ResourceArgs {

    public static final RouteSpecGrpcRouteActionWeightedTargetArgs Empty = new RouteSpecGrpcRouteActionWeightedTargetArgs();

    /**
     * The targeted port of the weighted object.
     * 
     */
    @Import(name="port")
    private @Nullable Output port;

    /**
     * @return The targeted port of the weighted object.
     * 
     */
    public Optional> port() {
        return Optional.ofNullable(this.port);
    }

    /**
     * Virtual node to associate with the weighted target. Must be between 1 and 255 characters in length.
     * 
     */
    @Import(name="virtualNode", required=true)
    private Output virtualNode;

    /**
     * @return Virtual node to associate with the weighted target. Must be between 1 and 255 characters in length.
     * 
     */
    public Output virtualNode() {
        return this.virtualNode;
    }

    /**
     * Relative weight of the weighted target. An integer between 0 and 100.
     * 
     */
    @Import(name="weight", required=true)
    private Output weight;

    /**
     * @return Relative weight of the weighted target. An integer between 0 and 100.
     * 
     */
    public Output weight() {
        return this.weight;
    }

    private RouteSpecGrpcRouteActionWeightedTargetArgs() {}

    private RouteSpecGrpcRouteActionWeightedTargetArgs(RouteSpecGrpcRouteActionWeightedTargetArgs $) {
        this.port = $.port;
        this.virtualNode = $.virtualNode;
        this.weight = $.weight;
    }

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

    public static final class Builder {
        private RouteSpecGrpcRouteActionWeightedTargetArgs $;

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

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

        /**
         * @param port The targeted port of the weighted object.
         * 
         * @return builder
         * 
         */
        public Builder port(@Nullable Output port) {
            $.port = port;
            return this;
        }

        /**
         * @param port The targeted port of the weighted object.
         * 
         * @return builder
         * 
         */
        public Builder port(Integer port) {
            return port(Output.of(port));
        }

        /**
         * @param virtualNode Virtual node to associate with the weighted target. Must be between 1 and 255 characters in length.
         * 
         * @return builder
         * 
         */
        public Builder virtualNode(Output virtualNode) {
            $.virtualNode = virtualNode;
            return this;
        }

        /**
         * @param virtualNode Virtual node to associate with the weighted target. Must be between 1 and 255 characters in length.
         * 
         * @return builder
         * 
         */
        public Builder virtualNode(String virtualNode) {
            return virtualNode(Output.of(virtualNode));
        }

        /**
         * @param weight Relative weight of the weighted target. An integer between 0 and 100.
         * 
         * @return builder
         * 
         */
        public Builder weight(Output weight) {
            $.weight = weight;
            return this;
        }

        /**
         * @param weight Relative weight of the weighted target. An integer between 0 and 100.
         * 
         * @return builder
         * 
         */
        public Builder weight(Integer weight) {
            return weight(Output.of(weight));
        }

        public RouteSpecGrpcRouteActionWeightedTargetArgs build() {
            if ($.virtualNode == null) {
                throw new MissingRequiredPropertyException("RouteSpecGrpcRouteActionWeightedTargetArgs", "virtualNode");
            }
            if ($.weight == null) {
                throw new MissingRequiredPropertyException("RouteSpecGrpcRouteActionWeightedTargetArgs", "weight");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy