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

com.pulumi.azurenative.network.PacketCaptureArgs Maven / Gradle / Ivy

There is a newer version: 2.78.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.azurenative.network;

import com.pulumi.azurenative.network.enums.PacketCaptureTargetType;
import com.pulumi.azurenative.network.inputs.PacketCaptureFilterArgs;
import com.pulumi.azurenative.network.inputs.PacketCaptureMachineScopeArgs;
import com.pulumi.azurenative.network.inputs.PacketCaptureStorageLocationArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.core.internal.Codegen;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Double;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final PacketCaptureArgs Empty = new PacketCaptureArgs();

    /**
     * Number of bytes captured per packet, the remaining bytes are truncated.
     * 
     */
    @Import(name="bytesToCapturePerPacket")
    private @Nullable Output bytesToCapturePerPacket;

    /**
     * @return Number of bytes captured per packet, the remaining bytes are truncated.
     * 
     */
    public Optional> bytesToCapturePerPacket() {
        return Optional.ofNullable(this.bytesToCapturePerPacket);
    }

    /**
     * A list of packet capture filters.
     * 
     */
    @Import(name="filters")
    private @Nullable Output> filters;

    /**
     * @return A list of packet capture filters.
     * 
     */
    public Optional>> filters() {
        return Optional.ofNullable(this.filters);
    }

    /**
     * The name of the network watcher.
     * 
     */
    @Import(name="networkWatcherName", required=true)
    private Output networkWatcherName;

    /**
     * @return The name of the network watcher.
     * 
     */
    public Output networkWatcherName() {
        return this.networkWatcherName;
    }

    /**
     * The name of the packet capture session.
     * 
     */
    @Import(name="packetCaptureName")
    private @Nullable Output packetCaptureName;

    /**
     * @return The name of the packet capture session.
     * 
     */
    public Optional> packetCaptureName() {
        return Optional.ofNullable(this.packetCaptureName);
    }

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

    /**
     * @return The name of the resource group.
     * 
     */
    public Output resourceGroupName() {
        return this.resourceGroupName;
    }

    /**
     * A list of AzureVMSS instances which can be included or excluded to run packet capture. If both included and excluded are empty, then the packet capture will run on all instances of AzureVMSS.
     * 
     */
    @Import(name="scope")
    private @Nullable Output scope;

    /**
     * @return A list of AzureVMSS instances which can be included or excluded to run packet capture. If both included and excluded are empty, then the packet capture will run on all instances of AzureVMSS.
     * 
     */
    public Optional> scope() {
        return Optional.ofNullable(this.scope);
    }

    /**
     * The storage location for a packet capture session.
     * 
     */
    @Import(name="storageLocation", required=true)
    private Output storageLocation;

    /**
     * @return The storage location for a packet capture session.
     * 
     */
    public Output storageLocation() {
        return this.storageLocation;
    }

    /**
     * The ID of the targeted resource, only AzureVM and AzureVMSS as target type are currently supported.
     * 
     */
    @Import(name="target", required=true)
    private Output target;

    /**
     * @return The ID of the targeted resource, only AzureVM and AzureVMSS as target type are currently supported.
     * 
     */
    public Output target() {
        return this.target;
    }

    /**
     * Target type of the resource provided.
     * 
     */
    @Import(name="targetType")
    private @Nullable Output targetType;

    /**
     * @return Target type of the resource provided.
     * 
     */
    public Optional> targetType() {
        return Optional.ofNullable(this.targetType);
    }

    /**
     * Maximum duration of the capture session in seconds.
     * 
     */
    @Import(name="timeLimitInSeconds")
    private @Nullable Output timeLimitInSeconds;

    /**
     * @return Maximum duration of the capture session in seconds.
     * 
     */
    public Optional> timeLimitInSeconds() {
        return Optional.ofNullable(this.timeLimitInSeconds);
    }

    /**
     * Maximum size of the capture output.
     * 
     */
    @Import(name="totalBytesPerSession")
    private @Nullable Output totalBytesPerSession;

    /**
     * @return Maximum size of the capture output.
     * 
     */
    public Optional> totalBytesPerSession() {
        return Optional.ofNullable(this.totalBytesPerSession);
    }

    private PacketCaptureArgs() {}

    private PacketCaptureArgs(PacketCaptureArgs $) {
        this.bytesToCapturePerPacket = $.bytesToCapturePerPacket;
        this.filters = $.filters;
        this.networkWatcherName = $.networkWatcherName;
        this.packetCaptureName = $.packetCaptureName;
        this.resourceGroupName = $.resourceGroupName;
        this.scope = $.scope;
        this.storageLocation = $.storageLocation;
        this.target = $.target;
        this.targetType = $.targetType;
        this.timeLimitInSeconds = $.timeLimitInSeconds;
        this.totalBytesPerSession = $.totalBytesPerSession;
    }

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

    public static final class Builder {
        private PacketCaptureArgs $;

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

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

        /**
         * @param bytesToCapturePerPacket Number of bytes captured per packet, the remaining bytes are truncated.
         * 
         * @return builder
         * 
         */
        public Builder bytesToCapturePerPacket(@Nullable Output bytesToCapturePerPacket) {
            $.bytesToCapturePerPacket = bytesToCapturePerPacket;
            return this;
        }

        /**
         * @param bytesToCapturePerPacket Number of bytes captured per packet, the remaining bytes are truncated.
         * 
         * @return builder
         * 
         */
        public Builder bytesToCapturePerPacket(Double bytesToCapturePerPacket) {
            return bytesToCapturePerPacket(Output.of(bytesToCapturePerPacket));
        }

        /**
         * @param filters A list of packet capture filters.
         * 
         * @return builder
         * 
         */
        public Builder filters(@Nullable Output> filters) {
            $.filters = filters;
            return this;
        }

        /**
         * @param filters A list of packet capture filters.
         * 
         * @return builder
         * 
         */
        public Builder filters(List filters) {
            return filters(Output.of(filters));
        }

        /**
         * @param filters A list of packet capture filters.
         * 
         * @return builder
         * 
         */
        public Builder filters(PacketCaptureFilterArgs... filters) {
            return filters(List.of(filters));
        }

        /**
         * @param networkWatcherName The name of the network watcher.
         * 
         * @return builder
         * 
         */
        public Builder networkWatcherName(Output networkWatcherName) {
            $.networkWatcherName = networkWatcherName;
            return this;
        }

        /**
         * @param networkWatcherName The name of the network watcher.
         * 
         * @return builder
         * 
         */
        public Builder networkWatcherName(String networkWatcherName) {
            return networkWatcherName(Output.of(networkWatcherName));
        }

        /**
         * @param packetCaptureName The name of the packet capture session.
         * 
         * @return builder
         * 
         */
        public Builder packetCaptureName(@Nullable Output packetCaptureName) {
            $.packetCaptureName = packetCaptureName;
            return this;
        }

        /**
         * @param packetCaptureName The name of the packet capture session.
         * 
         * @return builder
         * 
         */
        public Builder packetCaptureName(String packetCaptureName) {
            return packetCaptureName(Output.of(packetCaptureName));
        }

        /**
         * @param resourceGroupName The name of the resource group.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the resource group.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param scope A list of AzureVMSS instances which can be included or excluded to run packet capture. If both included and excluded are empty, then the packet capture will run on all instances of AzureVMSS.
         * 
         * @return builder
         * 
         */
        public Builder scope(@Nullable Output scope) {
            $.scope = scope;
            return this;
        }

        /**
         * @param scope A list of AzureVMSS instances which can be included or excluded to run packet capture. If both included and excluded are empty, then the packet capture will run on all instances of AzureVMSS.
         * 
         * @return builder
         * 
         */
        public Builder scope(PacketCaptureMachineScopeArgs scope) {
            return scope(Output.of(scope));
        }

        /**
         * @param storageLocation The storage location for a packet capture session.
         * 
         * @return builder
         * 
         */
        public Builder storageLocation(Output storageLocation) {
            $.storageLocation = storageLocation;
            return this;
        }

        /**
         * @param storageLocation The storage location for a packet capture session.
         * 
         * @return builder
         * 
         */
        public Builder storageLocation(PacketCaptureStorageLocationArgs storageLocation) {
            return storageLocation(Output.of(storageLocation));
        }

        /**
         * @param target The ID of the targeted resource, only AzureVM and AzureVMSS as target type are currently supported.
         * 
         * @return builder
         * 
         */
        public Builder target(Output target) {
            $.target = target;
            return this;
        }

        /**
         * @param target The ID of the targeted resource, only AzureVM and AzureVMSS as target type are currently supported.
         * 
         * @return builder
         * 
         */
        public Builder target(String target) {
            return target(Output.of(target));
        }

        /**
         * @param targetType Target type of the resource provided.
         * 
         * @return builder
         * 
         */
        public Builder targetType(@Nullable Output targetType) {
            $.targetType = targetType;
            return this;
        }

        /**
         * @param targetType Target type of the resource provided.
         * 
         * @return builder
         * 
         */
        public Builder targetType(PacketCaptureTargetType targetType) {
            return targetType(Output.of(targetType));
        }

        /**
         * @param timeLimitInSeconds Maximum duration of the capture session in seconds.
         * 
         * @return builder
         * 
         */
        public Builder timeLimitInSeconds(@Nullable Output timeLimitInSeconds) {
            $.timeLimitInSeconds = timeLimitInSeconds;
            return this;
        }

        /**
         * @param timeLimitInSeconds Maximum duration of the capture session in seconds.
         * 
         * @return builder
         * 
         */
        public Builder timeLimitInSeconds(Integer timeLimitInSeconds) {
            return timeLimitInSeconds(Output.of(timeLimitInSeconds));
        }

        /**
         * @param totalBytesPerSession Maximum size of the capture output.
         * 
         * @return builder
         * 
         */
        public Builder totalBytesPerSession(@Nullable Output totalBytesPerSession) {
            $.totalBytesPerSession = totalBytesPerSession;
            return this;
        }

        /**
         * @param totalBytesPerSession Maximum size of the capture output.
         * 
         * @return builder
         * 
         */
        public Builder totalBytesPerSession(Double totalBytesPerSession) {
            return totalBytesPerSession(Output.of(totalBytesPerSession));
        }

        public PacketCaptureArgs build() {
            $.bytesToCapturePerPacket = Codegen.doubleProp("bytesToCapturePerPacket").output().arg($.bytesToCapturePerPacket).def(0e+00).getNullable();
            if ($.networkWatcherName == null) {
                throw new MissingRequiredPropertyException("PacketCaptureArgs", "networkWatcherName");
            }
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("PacketCaptureArgs", "resourceGroupName");
            }
            if ($.storageLocation == null) {
                throw new MissingRequiredPropertyException("PacketCaptureArgs", "storageLocation");
            }
            if ($.target == null) {
                throw new MissingRequiredPropertyException("PacketCaptureArgs", "target");
            }
            $.timeLimitInSeconds = Codegen.integerProp("timeLimitInSeconds").output().arg($.timeLimitInSeconds).def(18000).getNullable();
            $.totalBytesPerSession = Codegen.doubleProp("totalBytesPerSession").output().arg($.totalBytesPerSession).def(1.073741824e+09).getNullable();
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy