com.pulumi.azurenative.mobilenetwork.PacketCapture Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-native Show documentation
Show all versions of azure-native Show documentation
A native Pulumi package for creating and managing Azure resources.
// *** 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.mobilenetwork;
import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.mobilenetwork.PacketCaptureArgs;
import com.pulumi.azurenative.mobilenetwork.outputs.SystemDataResponse;
import com.pulumi.core.Alias;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Double;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Packet capture session resource.
* Azure REST API version: 2023-06-01.
*
* Other available API versions: 2023-09-01, 2024-02-01, 2024-04-01.
*
* ## Example Usage
* ### Create packet capture
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.mobilenetwork.PacketCapture;
* import com.pulumi.azurenative.mobilenetwork.PacketCaptureArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
*
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
*
* public static void stack(Context ctx) {
* var packetCapture = new PacketCapture("packetCapture", PacketCaptureArgs.builder()
* .bytesToCapturePerPacket(10000)
* .networkInterfaces(
* "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP",
* "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP",
* "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestADN")
* .packetCaptureName("pc1")
* .packetCoreControlPlaneName("TestPacketCoreCP")
* .resourceGroupName("rg1")
* .timeLimitInSeconds(100)
* .totalBytesPerSession(100000)
* .build());
*
* }
* }
*
* }
*
*
* ## Import
*
* An existing resource can be imported using its type token, name, and identifier, e.g.
*
* ```sh
* $ pulumi import azure-native:mobilenetwork:PacketCapture pc1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCaptures/{packetCaptureName}
* ```
*
*/
@ResourceType(type="azure-native:mobilenetwork:PacketCapture")
public class PacketCapture extends com.pulumi.resources.CustomResource {
/**
* Number of bytes captured per packet, the remaining bytes are truncated. The default "0" means the entire packet is captured.
*
*/
@Export(name="bytesToCapturePerPacket", refs={Double.class}, tree="[0]")
private Output* @Nullable */ Double> bytesToCapturePerPacket;
/**
* @return Number of bytes captured per packet, the remaining bytes are truncated. The default "0" means the entire packet is captured.
*
*/
public Output> bytesToCapturePerPacket() {
return Codegen.optional(this.bytesToCapturePerPacket);
}
/**
* The start time of the packet capture session.
*
*/
@Export(name="captureStartTime", refs={String.class}, tree="[0]")
private Output captureStartTime;
/**
* @return The start time of the packet capture session.
*
*/
public Output captureStartTime() {
return this.captureStartTime;
}
/**
* The name of the resource
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return The name of the resource
*
*/
public Output name() {
return this.name;
}
/**
* List of network interfaces to capture on.
*
*/
@Export(name="networkInterfaces", refs={List.class,String.class}, tree="[0,1]")
private Output* @Nullable */ List> networkInterfaces;
/**
* @return List of network interfaces to capture on.
*
*/
public Output>> networkInterfaces() {
return Codegen.optional(this.networkInterfaces);
}
/**
* The provisioning state of the packet capture session resource.
*
*/
@Export(name="provisioningState", refs={String.class}, tree="[0]")
private Output provisioningState;
/**
* @return The provisioning state of the packet capture session resource.
*
*/
public Output provisioningState() {
return this.provisioningState;
}
/**
* The reason the current packet capture session state.
*
*/
@Export(name="reason", refs={String.class}, tree="[0]")
private Output reason;
/**
* @return The reason the current packet capture session state.
*
*/
public Output reason() {
return this.reason;
}
/**
* The status of the packet capture session.
*
*/
@Export(name="status", refs={String.class}, tree="[0]")
private Output status;
/**
* @return The status of the packet capture session.
*
*/
public Output status() {
return this.status;
}
/**
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
*/
@Export(name="systemData", refs={SystemDataResponse.class}, tree="[0]")
private Output systemData;
/**
* @return Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
*/
public Output systemData() {
return this.systemData;
}
/**
* Maximum duration of the capture session in seconds.
*
*/
@Export(name="timeLimitInSeconds", refs={Integer.class}, tree="[0]")
private Output* @Nullable */ Integer> timeLimitInSeconds;
/**
* @return Maximum duration of the capture session in seconds.
*
*/
public Output> timeLimitInSeconds() {
return Codegen.optional(this.timeLimitInSeconds);
}
/**
* Maximum size of the capture output.
*
*/
@Export(name="totalBytesPerSession", refs={Double.class}, tree="[0]")
private Output* @Nullable */ Double> totalBytesPerSession;
/**
* @return Maximum size of the capture output.
*
*/
public Output> totalBytesPerSession() {
return Codegen.optional(this.totalBytesPerSession);
}
/**
* The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
*
*/
@Export(name="type", refs={String.class}, tree="[0]")
private Output type;
/**
* @return The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
*
*/
public Output type() {
return this.type;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public PacketCapture(java.lang.String name) {
this(name, PacketCaptureArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public PacketCapture(java.lang.String name, PacketCaptureArgs args) {
this(name, args, null);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
* @param options A bag of options that control this resource's behavior.
*/
public PacketCapture(java.lang.String name, PacketCaptureArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:mobilenetwork:PacketCapture", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private PacketCapture(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:mobilenetwork:PacketCapture", name, null, makeResourceOptions(options, id), false);
}
private static PacketCaptureArgs makeArgs(PacketCaptureArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? PacketCaptureArgs.Empty : args;
}
private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) {
var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
.version(Utilities.getVersion())
.aliases(List.of(
Output.of(Alias.builder().type("azure-native:mobilenetwork/v20230601:PacketCapture").build()),
Output.of(Alias.builder().type("azure-native:mobilenetwork/v20230901:PacketCapture").build()),
Output.of(Alias.builder().type("azure-native:mobilenetwork/v20240201:PacketCapture").build()),
Output.of(Alias.builder().type("azure-native:mobilenetwork/v20240401:PacketCapture").build())
))
.build();
return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
}
/**
* Get an existing Host resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param options Optional settings to control the behavior of the CustomResource.
*/
public static PacketCapture get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new PacketCapture(name, id, options);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy