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

com.pulumi.aws.vpc.SecurityGroupEgressRuleArgs Maven / Gradle / Ivy

Go to download

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

The 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.vpc;

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.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final SecurityGroupEgressRuleArgs Empty = new SecurityGroupEgressRuleArgs();

    /**
     * The destination IPv4 CIDR range.
     * 
     */
    @Import(name="cidrIpv4")
    private @Nullable Output cidrIpv4;

    /**
     * @return The destination IPv4 CIDR range.
     * 
     */
    public Optional> cidrIpv4() {
        return Optional.ofNullable(this.cidrIpv4);
    }

    /**
     * The destination IPv6 CIDR range.
     * 
     */
    @Import(name="cidrIpv6")
    private @Nullable Output cidrIpv6;

    /**
     * @return The destination IPv6 CIDR range.
     * 
     */
    public Optional> cidrIpv6() {
        return Optional.ofNullable(this.cidrIpv6);
    }

    /**
     * The security group rule description.
     * 
     */
    @Import(name="description")
    private @Nullable Output description;

    /**
     * @return The security group rule description.
     * 
     */
    public Optional> description() {
        return Optional.ofNullable(this.description);
    }

    /**
     * The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type.
     * 
     */
    @Import(name="fromPort")
    private @Nullable Output fromPort;

    /**
     * @return The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type.
     * 
     */
    public Optional> fromPort() {
        return Optional.ofNullable(this.fromPort);
    }

    /**
     * The IP protocol name or number. Use `-1` to specify all protocols. Note that if `ip_protocol` is set to `-1`, it translates to all protocols, all port ranges, and `from_port` and `to_port` values should not be defined.
     * 
     */
    @Import(name="ipProtocol", required=true)
    private Output ipProtocol;

    /**
     * @return The IP protocol name or number. Use `-1` to specify all protocols. Note that if `ip_protocol` is set to `-1`, it translates to all protocols, all port ranges, and `from_port` and `to_port` values should not be defined.
     * 
     */
    public Output ipProtocol() {
        return this.ipProtocol;
    }

    /**
     * The ID of the destination prefix list.
     * 
     */
    @Import(name="prefixListId")
    private @Nullable Output prefixListId;

    /**
     * @return The ID of the destination prefix list.
     * 
     */
    public Optional> prefixListId() {
        return Optional.ofNullable(this.prefixListId);
    }

    /**
     * The destination security group that is referenced in the rule.
     * 
     */
    @Import(name="referencedSecurityGroupId")
    private @Nullable Output referencedSecurityGroupId;

    /**
     * @return The destination security group that is referenced in the rule.
     * 
     */
    public Optional> referencedSecurityGroupId() {
        return Optional.ofNullable(this.referencedSecurityGroupId);
    }

    /**
     * The ID of the security group.
     * 
     */
    @Import(name="securityGroupId", required=true)
    private Output securityGroupId;

    /**
     * @return The ID of the security group.
     * 
     */
    public Output securityGroupId() {
        return this.securityGroupId;
    }

    /**
     * A map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     * 
     */
    @Import(name="tags")
    private @Nullable Output> tags;

    /**
     * @return A map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     * 
     */
    public Optional>> tags() {
        return Optional.ofNullable(this.tags);
    }

    /**
     * The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code.
     * 
     */
    @Import(name="toPort")
    private @Nullable Output toPort;

    /**
     * @return The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code.
     * 
     */
    public Optional> toPort() {
        return Optional.ofNullable(this.toPort);
    }

    private SecurityGroupEgressRuleArgs() {}

    private SecurityGroupEgressRuleArgs(SecurityGroupEgressRuleArgs $) {
        this.cidrIpv4 = $.cidrIpv4;
        this.cidrIpv6 = $.cidrIpv6;
        this.description = $.description;
        this.fromPort = $.fromPort;
        this.ipProtocol = $.ipProtocol;
        this.prefixListId = $.prefixListId;
        this.referencedSecurityGroupId = $.referencedSecurityGroupId;
        this.securityGroupId = $.securityGroupId;
        this.tags = $.tags;
        this.toPort = $.toPort;
    }

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

    public static final class Builder {
        private SecurityGroupEgressRuleArgs $;

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

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

        /**
         * @param cidrIpv4 The destination IPv4 CIDR range.
         * 
         * @return builder
         * 
         */
        public Builder cidrIpv4(@Nullable Output cidrIpv4) {
            $.cidrIpv4 = cidrIpv4;
            return this;
        }

        /**
         * @param cidrIpv4 The destination IPv4 CIDR range.
         * 
         * @return builder
         * 
         */
        public Builder cidrIpv4(String cidrIpv4) {
            return cidrIpv4(Output.of(cidrIpv4));
        }

        /**
         * @param cidrIpv6 The destination IPv6 CIDR range.
         * 
         * @return builder
         * 
         */
        public Builder cidrIpv6(@Nullable Output cidrIpv6) {
            $.cidrIpv6 = cidrIpv6;
            return this;
        }

        /**
         * @param cidrIpv6 The destination IPv6 CIDR range.
         * 
         * @return builder
         * 
         */
        public Builder cidrIpv6(String cidrIpv6) {
            return cidrIpv6(Output.of(cidrIpv6));
        }

        /**
         * @param description The security group rule description.
         * 
         * @return builder
         * 
         */
        public Builder description(@Nullable Output description) {
            $.description = description;
            return this;
        }

        /**
         * @param description The security group rule description.
         * 
         * @return builder
         * 
         */
        public Builder description(String description) {
            return description(Output.of(description));
        }

        /**
         * @param fromPort The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type.
         * 
         * @return builder
         * 
         */
        public Builder fromPort(@Nullable Output fromPort) {
            $.fromPort = fromPort;
            return this;
        }

        /**
         * @param fromPort The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type.
         * 
         * @return builder
         * 
         */
        public Builder fromPort(Integer fromPort) {
            return fromPort(Output.of(fromPort));
        }

        /**
         * @param ipProtocol The IP protocol name or number. Use `-1` to specify all protocols. Note that if `ip_protocol` is set to `-1`, it translates to all protocols, all port ranges, and `from_port` and `to_port` values should not be defined.
         * 
         * @return builder
         * 
         */
        public Builder ipProtocol(Output ipProtocol) {
            $.ipProtocol = ipProtocol;
            return this;
        }

        /**
         * @param ipProtocol The IP protocol name or number. Use `-1` to specify all protocols. Note that if `ip_protocol` is set to `-1`, it translates to all protocols, all port ranges, and `from_port` and `to_port` values should not be defined.
         * 
         * @return builder
         * 
         */
        public Builder ipProtocol(String ipProtocol) {
            return ipProtocol(Output.of(ipProtocol));
        }

        /**
         * @param prefixListId The ID of the destination prefix list.
         * 
         * @return builder
         * 
         */
        public Builder prefixListId(@Nullable Output prefixListId) {
            $.prefixListId = prefixListId;
            return this;
        }

        /**
         * @param prefixListId The ID of the destination prefix list.
         * 
         * @return builder
         * 
         */
        public Builder prefixListId(String prefixListId) {
            return prefixListId(Output.of(prefixListId));
        }

        /**
         * @param referencedSecurityGroupId The destination security group that is referenced in the rule.
         * 
         * @return builder
         * 
         */
        public Builder referencedSecurityGroupId(@Nullable Output referencedSecurityGroupId) {
            $.referencedSecurityGroupId = referencedSecurityGroupId;
            return this;
        }

        /**
         * @param referencedSecurityGroupId The destination security group that is referenced in the rule.
         * 
         * @return builder
         * 
         */
        public Builder referencedSecurityGroupId(String referencedSecurityGroupId) {
            return referencedSecurityGroupId(Output.of(referencedSecurityGroupId));
        }

        /**
         * @param securityGroupId The ID of the security group.
         * 
         * @return builder
         * 
         */
        public Builder securityGroupId(Output securityGroupId) {
            $.securityGroupId = securityGroupId;
            return this;
        }

        /**
         * @param securityGroupId The ID of the security group.
         * 
         * @return builder
         * 
         */
        public Builder securityGroupId(String securityGroupId) {
            return securityGroupId(Output.of(securityGroupId));
        }

        /**
         * @param tags A map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags A map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
         * 
         * @return builder
         * 
         */
        public Builder tags(Map tags) {
            return tags(Output.of(tags));
        }

        /**
         * @param toPort The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code.
         * 
         * @return builder
         * 
         */
        public Builder toPort(@Nullable Output toPort) {
            $.toPort = toPort;
            return this;
        }

        /**
         * @param toPort The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code.
         * 
         * @return builder
         * 
         */
        public Builder toPort(Integer toPort) {
            return toPort(Output.of(toPort));
        }

        public SecurityGroupEgressRuleArgs build() {
            if ($.ipProtocol == null) {
                throw new MissingRequiredPropertyException("SecurityGroupEgressRuleArgs", "ipProtocol");
            }
            if ($.securityGroupId == null) {
                throw new MissingRequiredPropertyException("SecurityGroupEgressRuleArgs", "securityGroupId");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy