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

com.pulumi.aws.ec2.TrafficMirrorSessionArgs Maven / Gradle / Ivy

// *** 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.ec2;

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

    public static final TrafficMirrorSessionArgs Empty = new TrafficMirrorSessionArgs();

    /**
     * A description of the traffic mirror session.
     * 
     */
    @Import(name="description")
    private @Nullable Output description;

    /**
     * @return A description of the traffic mirror session.
     * 
     */
    public Optional> description() {
        return Optional.ofNullable(this.description);
    }

    /**
     * ID of the source network interface. Not all network interfaces are eligible as mirror sources. On EC2 instances only nitro based instances support mirroring.
     * 
     */
    @Import(name="networkInterfaceId", required=true)
    private Output networkInterfaceId;

    /**
     * @return ID of the source network interface. Not all network interfaces are eligible as mirror sources. On EC2 instances only nitro based instances support mirroring.
     * 
     */
    public Output networkInterfaceId() {
        return this.networkInterfaceId;
    }

    /**
     * The number of bytes in each packet to mirror. These are bytes after the VXLAN header. Do not specify this parameter when you want to mirror the entire packet. To mirror a subset of the packet, set this to the length (in bytes) that you want to mirror.
     * 
     */
    @Import(name="packetLength")
    private @Nullable Output packetLength;

    /**
     * @return The number of bytes in each packet to mirror. These are bytes after the VXLAN header. Do not specify this parameter when you want to mirror the entire packet. To mirror a subset of the packet, set this to the length (in bytes) that you want to mirror.
     * 
     */
    public Optional> packetLength() {
        return Optional.ofNullable(this.packetLength);
    }

    /**
     * The session number determines the order in which sessions are evaluated when an interface is used by multiple sessions. The first session with a matching filter is the one that mirrors the packets.
     * 
     */
    @Import(name="sessionNumber", required=true)
    private Output sessionNumber;

    /**
     * @return The session number determines the order in which sessions are evaluated when an interface is used by multiple sessions. The first session with a matching filter is the one that mirrors the packets.
     * 
     */
    public Output sessionNumber() {
        return this.sessionNumber;
    }

    /**
     * Key-value map of resource tags. 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 Key-value map of resource tags. 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);
    }

    /**
     * ID of the traffic mirror filter to be used
     * 
     */
    @Import(name="trafficMirrorFilterId", required=true)
    private Output trafficMirrorFilterId;

    /**
     * @return ID of the traffic mirror filter to be used
     * 
     */
    public Output trafficMirrorFilterId() {
        return this.trafficMirrorFilterId;
    }

    /**
     * ID of the traffic mirror target to be used
     * 
     */
    @Import(name="trafficMirrorTargetId", required=true)
    private Output trafficMirrorTargetId;

    /**
     * @return ID of the traffic mirror target to be used
     * 
     */
    public Output trafficMirrorTargetId() {
        return this.trafficMirrorTargetId;
    }

    /**
     * The VXLAN ID for the Traffic Mirror session. For more information about the VXLAN protocol, see RFC 7348. If you do not specify a VirtualNetworkId, an account-wide unique id is chosen at random.
     * 
     */
    @Import(name="virtualNetworkId")
    private @Nullable Output virtualNetworkId;

    /**
     * @return The VXLAN ID for the Traffic Mirror session. For more information about the VXLAN protocol, see RFC 7348. If you do not specify a VirtualNetworkId, an account-wide unique id is chosen at random.
     * 
     */
    public Optional> virtualNetworkId() {
        return Optional.ofNullable(this.virtualNetworkId);
    }

    private TrafficMirrorSessionArgs() {}

    private TrafficMirrorSessionArgs(TrafficMirrorSessionArgs $) {
        this.description = $.description;
        this.networkInterfaceId = $.networkInterfaceId;
        this.packetLength = $.packetLength;
        this.sessionNumber = $.sessionNumber;
        this.tags = $.tags;
        this.trafficMirrorFilterId = $.trafficMirrorFilterId;
        this.trafficMirrorTargetId = $.trafficMirrorTargetId;
        this.virtualNetworkId = $.virtualNetworkId;
    }

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

    public static final class Builder {
        private TrafficMirrorSessionArgs $;

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

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

        /**
         * @param description A description of the traffic mirror session.
         * 
         * @return builder
         * 
         */
        public Builder description(@Nullable Output description) {
            $.description = description;
            return this;
        }

        /**
         * @param description A description of the traffic mirror session.
         * 
         * @return builder
         * 
         */
        public Builder description(String description) {
            return description(Output.of(description));
        }

        /**
         * @param networkInterfaceId ID of the source network interface. Not all network interfaces are eligible as mirror sources. On EC2 instances only nitro based instances support mirroring.
         * 
         * @return builder
         * 
         */
        public Builder networkInterfaceId(Output networkInterfaceId) {
            $.networkInterfaceId = networkInterfaceId;
            return this;
        }

        /**
         * @param networkInterfaceId ID of the source network interface. Not all network interfaces are eligible as mirror sources. On EC2 instances only nitro based instances support mirroring.
         * 
         * @return builder
         * 
         */
        public Builder networkInterfaceId(String networkInterfaceId) {
            return networkInterfaceId(Output.of(networkInterfaceId));
        }

        /**
         * @param packetLength The number of bytes in each packet to mirror. These are bytes after the VXLAN header. Do not specify this parameter when you want to mirror the entire packet. To mirror a subset of the packet, set this to the length (in bytes) that you want to mirror.
         * 
         * @return builder
         * 
         */
        public Builder packetLength(@Nullable Output packetLength) {
            $.packetLength = packetLength;
            return this;
        }

        /**
         * @param packetLength The number of bytes in each packet to mirror. These are bytes after the VXLAN header. Do not specify this parameter when you want to mirror the entire packet. To mirror a subset of the packet, set this to the length (in bytes) that you want to mirror.
         * 
         * @return builder
         * 
         */
        public Builder packetLength(Integer packetLength) {
            return packetLength(Output.of(packetLength));
        }

        /**
         * @param sessionNumber The session number determines the order in which sessions are evaluated when an interface is used by multiple sessions. The first session with a matching filter is the one that mirrors the packets.
         * 
         * @return builder
         * 
         */
        public Builder sessionNumber(Output sessionNumber) {
            $.sessionNumber = sessionNumber;
            return this;
        }

        /**
         * @param sessionNumber The session number determines the order in which sessions are evaluated when an interface is used by multiple sessions. The first session with a matching filter is the one that mirrors the packets.
         * 
         * @return builder
         * 
         */
        public Builder sessionNumber(Integer sessionNumber) {
            return sessionNumber(Output.of(sessionNumber));
        }

        /**
         * @param tags Key-value map of resource tags. 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 Key-value map of resource tags. 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 trafficMirrorFilterId ID of the traffic mirror filter to be used
         * 
         * @return builder
         * 
         */
        public Builder trafficMirrorFilterId(Output trafficMirrorFilterId) {
            $.trafficMirrorFilterId = trafficMirrorFilterId;
            return this;
        }

        /**
         * @param trafficMirrorFilterId ID of the traffic mirror filter to be used
         * 
         * @return builder
         * 
         */
        public Builder trafficMirrorFilterId(String trafficMirrorFilterId) {
            return trafficMirrorFilterId(Output.of(trafficMirrorFilterId));
        }

        /**
         * @param trafficMirrorTargetId ID of the traffic mirror target to be used
         * 
         * @return builder
         * 
         */
        public Builder trafficMirrorTargetId(Output trafficMirrorTargetId) {
            $.trafficMirrorTargetId = trafficMirrorTargetId;
            return this;
        }

        /**
         * @param trafficMirrorTargetId ID of the traffic mirror target to be used
         * 
         * @return builder
         * 
         */
        public Builder trafficMirrorTargetId(String trafficMirrorTargetId) {
            return trafficMirrorTargetId(Output.of(trafficMirrorTargetId));
        }

        /**
         * @param virtualNetworkId The VXLAN ID for the Traffic Mirror session. For more information about the VXLAN protocol, see RFC 7348. If you do not specify a VirtualNetworkId, an account-wide unique id is chosen at random.
         * 
         * @return builder
         * 
         */
        public Builder virtualNetworkId(@Nullable Output virtualNetworkId) {
            $.virtualNetworkId = virtualNetworkId;
            return this;
        }

        /**
         * @param virtualNetworkId The VXLAN ID for the Traffic Mirror session. For more information about the VXLAN protocol, see RFC 7348. If you do not specify a VirtualNetworkId, an account-wide unique id is chosen at random.
         * 
         * @return builder
         * 
         */
        public Builder virtualNetworkId(Integer virtualNetworkId) {
            return virtualNetworkId(Output.of(virtualNetworkId));
        }

        public TrafficMirrorSessionArgs build() {
            if ($.networkInterfaceId == null) {
                throw new MissingRequiredPropertyException("TrafficMirrorSessionArgs", "networkInterfaceId");
            }
            if ($.sessionNumber == null) {
                throw new MissingRequiredPropertyException("TrafficMirrorSessionArgs", "sessionNumber");
            }
            if ($.trafficMirrorFilterId == null) {
                throw new MissingRequiredPropertyException("TrafficMirrorSessionArgs", "trafficMirrorFilterId");
            }
            if ($.trafficMirrorTargetId == null) {
                throw new MissingRequiredPropertyException("TrafficMirrorSessionArgs", "trafficMirrorTargetId");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy