Class VirtualNetworkGatewayNatRule


  • public class VirtualNetworkGatewayNatRule
    extends com.pulumi.resources.CustomResource
    VirtualNetworkGatewayNatRule Resource. Azure REST API version: 2023-02-01. Prior API version in Azure Native 1.x: 2021-03-01. Other available API versions: 2023-04-01, 2023-05-01, 2023-06-01, 2023-09-01. ## Example Usage ### VirtualNetworkGatewayNatRulePut ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.azurenative.network.VirtualNetworkGatewayNatRule; import com.pulumi.azurenative.network.VirtualNetworkGatewayNatRuleArgs; 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 virtualNetworkGatewayNatRule = new VirtualNetworkGatewayNatRule("virtualNetworkGatewayNatRule", VirtualNetworkGatewayNatRuleArgs.builder() .externalMappings(Map.ofEntries( Map.entry("addressSpace", "192.168.21.0/24"), Map.entry("portRange", "300-400") )) .internalMappings(Map.ofEntries( Map.entry("addressSpace", "10.4.0.0/24"), Map.entry("portRange", "200-300") )) .ipConfigurationId("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/gateway1/ipConfigurations/default") .mode("EgressSnat") .natRuleName("natRule1") .resourceGroupName("rg1") .type("Static") .virtualNetworkGatewayName("gateway1") .build()); } } ``` ## Import An existing resource can be imported using its type token, name, and identifier, e.g. ```sh $ pulumi import azure-native:network:VirtualNetworkGatewayNatRule natRule1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName} ```
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.pulumi.core.Output<java.lang.String> etag()  
      com.pulumi.core.Output<java.util.Optional<java.util.List<VpnNatRuleMappingResponse>>> externalMappings()  
      static VirtualNetworkGatewayNatRule get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, com.pulumi.resources.CustomResourceOptions options)
      Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
      com.pulumi.core.Output<java.util.Optional<java.util.List<VpnNatRuleMappingResponse>>> internalMappings()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> ipConfigurationId()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> mode()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> name()  
      com.pulumi.core.Output<java.lang.String> provisioningState()  
      com.pulumi.core.Output<java.lang.String> type()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • VirtualNetworkGatewayNatRule

        public VirtualNetworkGatewayNatRule​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • VirtualNetworkGatewayNatRule

        public VirtualNetworkGatewayNatRule​(java.lang.String name,
                                            VirtualNetworkGatewayNatRuleArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • VirtualNetworkGatewayNatRule

        public VirtualNetworkGatewayNatRule​(java.lang.String name,
                                            VirtualNetworkGatewayNatRuleArgs args,
                                            @Nullable
                                            com.pulumi.resources.CustomResourceOptions options)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
        options - A bag of options that control this resource's behavior.
    • Method Detail

      • etag

        public com.pulumi.core.Output<java.lang.String> etag()
        Returns:
        A unique read-only string that changes whenever the resource is updated.
      • externalMappings

        public com.pulumi.core.Output<java.util.Optional<java.util.List<VpnNatRuleMappingResponse>>> externalMappings()
        Returns:
        The private IP address external mapping for NAT.
      • internalMappings

        public com.pulumi.core.Output<java.util.Optional<java.util.List<VpnNatRuleMappingResponse>>> internalMappings()
        Returns:
        The private IP address internal mapping for NAT.
      • ipConfigurationId

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> ipConfigurationId()
        Returns:
        The IP Configuration ID this NAT rule applies to.
      • mode

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> mode()
        Returns:
        The Source NAT direction of a VPN NAT.
      • name

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> name()
        Returns:
        The name of the resource that is unique within a resource group. This name can be used to access the resource.
      • provisioningState

        public com.pulumi.core.Output<java.lang.String> provisioningState()
        Returns:
        The provisioning state of the NAT Rule resource.
      • type

        public com.pulumi.core.Output<java.lang.String> type()
        Returns:
        Resource type.
      • get

        public static VirtualNetworkGatewayNatRule get​(java.lang.String name,
                                                       com.pulumi.core.Output<java.lang.String> id,
                                                       @Nullable
                                                       com.pulumi.resources.CustomResourceOptions options)
        Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
        Parameters:
        name - The _unique_ name of the resulting resource.
        id - The _unique_ provider ID of the resource to lookup.
        options - Optional settings to control the behavior of the CustomResource.