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

com.pulumi.azurenative.managednetworkfabric.NetworkTapRule Maven / Gradle / Ivy

There is a newer version: 2.72.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.managednetworkfabric;

import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.managednetworkfabric.NetworkTapRuleArgs;
import com.pulumi.azurenative.managednetworkfabric.outputs.CommonDynamicMatchConfigurationResponse;
import com.pulumi.azurenative.managednetworkfabric.outputs.NetworkTapRuleMatchConfigurationResponse;
import com.pulumi.azurenative.managednetworkfabric.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.Integer;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * The NetworkTapRule resource definition.
 * Azure REST API version: 2023-06-15.
 * 
 * ## Example Usage
 * ### NetworkTapRules_Create_MaximumSet_Gen
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.managednetworkfabric.NetworkTapRule;
 * import com.pulumi.azurenative.managednetworkfabric.NetworkTapRuleArgs;
 * import com.pulumi.azurenative.managednetworkfabric.inputs.CommonDynamicMatchConfigurationArgs;
 * import com.pulumi.azurenative.managednetworkfabric.inputs.NetworkTapRuleMatchConfigurationArgs;
 * 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 networkTapRule = new NetworkTapRule("networkTapRule", NetworkTapRuleArgs.builder()
 *             .annotation("annotation")
 *             .configurationType("File")
 *             .dynamicMatchConfigurations(CommonDynamicMatchConfigurationArgs.builder()
 *                 .ipGroups(IpGroupPropertiesArgs.builder()
 *                     .ipAddressType("IPv4")
 *                     .ipPrefixes("10.10.10.10/30")
 *                     .name("example-ipGroup1")
 *                     .build())
 *                 .portGroups(                
 *                     PortGroupPropertiesArgs.builder()
 *                         .name("example-portGroup1")
 *                         .ports("100-200")
 *                         .build(),
 *                     PortGroupPropertiesArgs.builder()
 *                         .name("example-portGroup2")
 *                         .ports(                        
 *                             "900",
 *                             "1000-2000")
 *                         .build())
 *                 .vlanGroups(VlanGroupPropertiesArgs.builder()
 *                     .name("exmaple-vlanGroup")
 *                     .vlans(                    
 *                         "10",
 *                         "100-200")
 *                     .build())
 *                 .build())
 *             .location("eastus")
 *             .matchConfigurations(NetworkTapRuleMatchConfigurationArgs.builder()
 *                 .actions(NetworkTapRuleActionArgs.builder()
 *                     .destinationId("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/neighborGroups/example-neighborGroup")
 *                     .isTimestampEnabled("True")
 *                     .matchConfigurationName("match1")
 *                     .truncate("100")
 *                     .type("Drop")
 *                     .build())
 *                 .ipAddressType("IPv4")
 *                 .matchConditions(NetworkTapRuleMatchConditionArgs.builder()
 *                     .encapsulationType("None")
 *                     .ipCondition(IpMatchConditionArgs.builder()
 *                         .ipGroupNames("example-ipGroup")
 *                         .ipPrefixValues("10.10.10.10/20")
 *                         .prefixType("Prefix")
 *                         .type("SourceIP")
 *                         .build())
 *                     .portCondition(PortConditionArgs.builder()
 *                         .layer4Protocol("TCP")
 *                         .portGroupNames("example-portGroup1")
 *                         .portType("SourcePort")
 *                         .ports("100")
 *                         .build())
 *                     .protocolTypes("TCP")
 *                     .vlanMatchCondition(VlanMatchConditionArgs.builder()
 *                         .innerVlans("11-20")
 *                         .vlanGroupNames("exmaple-vlanGroup")
 *                         .vlans("10")
 *                         .build())
 *                     .build())
 *                 .matchConfigurationName("config1")
 *                 .sequenceNumber(10)
 *                 .build())
 *             .networkTapRuleName("example-tapRule")
 *             .pollingIntervalInSeconds(30)
 *             .resourceGroupName("example-rg")
 *             .tags(Map.of("keyID", "keyValue"))
 *             .tapRulesUrl("https://microsoft.com/a")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:managednetworkfabric:NetworkTapRule example-tapRule /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName} * ``` * */ @ResourceType(type="azure-native:managednetworkfabric:NetworkTapRule") public class NetworkTapRule extends com.pulumi.resources.CustomResource { /** * Administrative state of the resource. * */ @Export(name="administrativeState", refs={String.class}, tree="[0]") private Output administrativeState; /** * @return Administrative state of the resource. * */ public Output administrativeState() { return this.administrativeState; } /** * Switch configuration description. * */ @Export(name="annotation", refs={String.class}, tree="[0]") private Output annotation; /** * @return Switch configuration description. * */ public Output> annotation() { return Codegen.optional(this.annotation); } /** * Configuration state of the resource. * */ @Export(name="configurationState", refs={String.class}, tree="[0]") private Output configurationState; /** * @return Configuration state of the resource. * */ public Output configurationState() { return this.configurationState; } /** * Input method to configure Network Tap Rule. * */ @Export(name="configurationType", refs={String.class}, tree="[0]") private Output configurationType; /** * @return Input method to configure Network Tap Rule. * */ public Output configurationType() { return this.configurationType; } /** * List of dynamic match configurations. * */ @Export(name="dynamicMatchConfigurations", refs={List.class,CommonDynamicMatchConfigurationResponse.class}, tree="[0,1]") private Output> dynamicMatchConfigurations; /** * @return List of dynamic match configurations. * */ public Output>> dynamicMatchConfigurations() { return Codegen.optional(this.dynamicMatchConfigurations); } /** * The last sync timestamp. * */ @Export(name="lastSyncedTime", refs={String.class}, tree="[0]") private Output lastSyncedTime; /** * @return The last sync timestamp. * */ public Output lastSyncedTime() { return this.lastSyncedTime; } /** * The geo-location where the resource lives * */ @Export(name="location", refs={String.class}, tree="[0]") private Output location; /** * @return The geo-location where the resource lives * */ public Output location() { return this.location; } /** * List of match configurations. * */ @Export(name="matchConfigurations", refs={List.class,NetworkTapRuleMatchConfigurationResponse.class}, tree="[0,1]") private Output> matchConfigurations; /** * @return List of match configurations. * */ public Output>> matchConfigurations() { return Codegen.optional(this.matchConfigurations); } /** * 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; } /** * The ARM resource Id of the NetworkTap. * */ @Export(name="networkTapId", refs={String.class}, tree="[0]") private Output networkTapId; /** * @return The ARM resource Id of the NetworkTap. * */ public Output networkTapId() { return this.networkTapId; } /** * Polling interval in seconds. * */ @Export(name="pollingIntervalInSeconds", refs={Integer.class}, tree="[0]") private Output pollingIntervalInSeconds; /** * @return Polling interval in seconds. * */ public Output> pollingIntervalInSeconds() { return Codegen.optional(this.pollingIntervalInSeconds); } /** * Provisioning state of the resource. * */ @Export(name="provisioningState", refs={String.class}, tree="[0]") private Output provisioningState; /** * @return Provisioning state of the resource. * */ public Output provisioningState() { return this.provisioningState; } /** * 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; } /** * Resource tags. * */ @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tags; /** * @return Resource tags. * */ public Output>> tags() { return Codegen.optional(this.tags); } /** * Network Tap Rules file URL. * */ @Export(name="tapRulesUrl", refs={String.class}, tree="[0]") private Output tapRulesUrl; /** * @return Network Tap Rules file URL. * */ public Output> tapRulesUrl() { return Codegen.optional(this.tapRulesUrl); } /** * 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 NetworkTapRule(java.lang.String name) { this(name, NetworkTapRuleArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public NetworkTapRule(java.lang.String name, NetworkTapRuleArgs 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 NetworkTapRule(java.lang.String name, NetworkTapRuleArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:managednetworkfabric:NetworkTapRule", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private NetworkTapRule(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:managednetworkfabric:NetworkTapRule", name, null, makeResourceOptions(options, id), false); } private static NetworkTapRuleArgs makeArgs(NetworkTapRuleArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? NetworkTapRuleArgs.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:managednetworkfabric/v20230615:NetworkTapRule").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 NetworkTapRule get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new NetworkTapRule(name, id, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy