com.pulumi.azure.lb.NatRule Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure Show documentation
Show all versions of azure Show documentation
A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.
// *** 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.azure.lb;
import com.pulumi.azure.Utilities;
import com.pulumi.azure.lb.NatRuleArgs;
import com.pulumi.azure.lb.inputs.NatRuleState;
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.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Manages a Load Balancer NAT Rule.
*
* > **NOTE:** This resource cannot be used with with virtual machine scale sets, instead use the `azure.lb.NatPool` resource.
*
* > **NOTE** When using this resource, the Load Balancer needs to have a FrontEnd IP Configuration Attached
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* Load Balancer NAT Rules can be imported using the `resource id`, e.g.
*
* ```sh
* $ pulumi import azure:lb/natRule:NatRule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/loadBalancers/lb1/inboundNatRules/rule1
* ```
*
*/
@ResourceType(type="azure:lb/natRule:NatRule")
public class NatRule extends com.pulumi.resources.CustomResource {
/**
* Specifies a reference to backendAddressPool resource.
*
*/
@Export(name="backendAddressPoolId", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> backendAddressPoolId;
/**
* @return Specifies a reference to backendAddressPool resource.
*
*/
public Output> backendAddressPoolId() {
return Codegen.optional(this.backendAddressPoolId);
}
@Export(name="backendIpConfigurationId", refs={String.class}, tree="[0]")
private Output backendIpConfigurationId;
public Output backendIpConfigurationId() {
return this.backendIpConfigurationId;
}
/**
* The port used for internal connections on the endpoint. Possible values range between 1 and 65535, inclusive.
*
*/
@Export(name="backendPort", refs={Integer.class}, tree="[0]")
private Output backendPort;
/**
* @return The port used for internal connections on the endpoint. Possible values range between 1 and 65535, inclusive.
*
*/
public Output backendPort() {
return this.backendPort;
}
/**
* Are the Floating IPs enabled for this Load Balancer Rule? A "floating” IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. Defaults to `false`.
*
*/
@Export(name="enableFloatingIp", refs={Boolean.class}, tree="[0]")
private Output enableFloatingIp;
/**
* @return Are the Floating IPs enabled for this Load Balancer Rule? A "floating” IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. Defaults to `false`.
*
*/
public Output enableFloatingIp() {
return this.enableFloatingIp;
}
/**
* Is TCP Reset enabled for this Load Balancer Rule?
*
*/
@Export(name="enableTcpReset", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> enableTcpReset;
/**
* @return Is TCP Reset enabled for this Load Balancer Rule?
*
*/
public Output> enableTcpReset() {
return Codegen.optional(this.enableTcpReset);
}
@Export(name="frontendIpConfigurationId", refs={String.class}, tree="[0]")
private Output frontendIpConfigurationId;
public Output frontendIpConfigurationId() {
return this.frontendIpConfigurationId;
}
/**
* The name of the frontend IP configuration exposing this rule.
*
*/
@Export(name="frontendIpConfigurationName", refs={String.class}, tree="[0]")
private Output frontendIpConfigurationName;
/**
* @return The name of the frontend IP configuration exposing this rule.
*
*/
public Output frontendIpConfigurationName() {
return this.frontendIpConfigurationName;
}
/**
* The port for the external endpoint. Port numbers for each Rule must be unique within the Load Balancer. Possible values range between 1 and 65534, inclusive.
*
*/
@Export(name="frontendPort", refs={Integer.class}, tree="[0]")
private Output* @Nullable */ Integer> frontendPort;
/**
* @return The port for the external endpoint. Port numbers for each Rule must be unique within the Load Balancer. Possible values range between 1 and 65534, inclusive.
*
*/
public Output> frontendPort() {
return Codegen.optional(this.frontendPort);
}
/**
* The port range end for the external endpoint. This property is used together with BackendAddressPool and FrontendPortRangeStart. Individual inbound NAT rule port mappings will be created for each backend address from BackendAddressPool. Acceptable values range from 1 to 65534, inclusive.
*
*/
@Export(name="frontendPortEnd", refs={Integer.class}, tree="[0]")
private Output* @Nullable */ Integer> frontendPortEnd;
/**
* @return The port range end for the external endpoint. This property is used together with BackendAddressPool and FrontendPortRangeStart. Individual inbound NAT rule port mappings will be created for each backend address from BackendAddressPool. Acceptable values range from 1 to 65534, inclusive.
*
*/
public Output> frontendPortEnd() {
return Codegen.optional(this.frontendPortEnd);
}
/**
* The port range start for the external endpoint. This property is used together with BackendAddressPool and FrontendPortRangeEnd. Individual inbound NAT rule port mappings will be created for each backend address from BackendAddressPool. Acceptable values range from 1 to 65534, inclusive.
*
*/
@Export(name="frontendPortStart", refs={Integer.class}, tree="[0]")
private Output* @Nullable */ Integer> frontendPortStart;
/**
* @return The port range start for the external endpoint. This property is used together with BackendAddressPool and FrontendPortRangeEnd. Individual inbound NAT rule port mappings will be created for each backend address from BackendAddressPool. Acceptable values range from 1 to 65534, inclusive.
*
*/
public Output> frontendPortStart() {
return Codegen.optional(this.frontendPortStart);
}
/**
* Specifies the idle timeout in minutes for TCP connections. Valid values are between `4` and `30` minutes. Defaults to `4` minutes.
*
*/
@Export(name="idleTimeoutInMinutes", refs={Integer.class}, tree="[0]")
private Output* @Nullable */ Integer> idleTimeoutInMinutes;
/**
* @return Specifies the idle timeout in minutes for TCP connections. Valid values are between `4` and `30` minutes. Defaults to `4` minutes.
*
*/
public Output> idleTimeoutInMinutes() {
return Codegen.optional(this.idleTimeoutInMinutes);
}
/**
* The ID of the Load Balancer in which to create the NAT Rule. Changing this forces a new resource to be created.
*
*/
@Export(name="loadbalancerId", refs={String.class}, tree="[0]")
private Output loadbalancerId;
/**
* @return The ID of the Load Balancer in which to create the NAT Rule. Changing this forces a new resource to be created.
*
*/
public Output loadbalancerId() {
return this.loadbalancerId;
}
/**
* Specifies the name of the NAT Rule. Changing this forces a new resource to be created.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return Specifies the name of the NAT Rule. Changing this forces a new resource to be created.
*
*/
public Output name() {
return this.name;
}
/**
* The transport protocol for the external endpoint. Possible values are `Udp`, `Tcp` or `All`.
*
*/
@Export(name="protocol", refs={String.class}, tree="[0]")
private Output protocol;
/**
* @return The transport protocol for the external endpoint. Possible values are `Udp`, `Tcp` or `All`.
*
*/
public Output protocol() {
return this.protocol;
}
/**
* The name of the resource group in which to create the resource. Changing this forces a new resource to be created.
*
*/
@Export(name="resourceGroupName", refs={String.class}, tree="[0]")
private Output resourceGroupName;
/**
* @return The name of the resource group in which to create the resource. Changing this forces a new resource to be created.
*
*/
public Output resourceGroupName() {
return this.resourceGroupName;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public NatRule(java.lang.String name) {
this(name, NatRuleArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public NatRule(java.lang.String name, NatRuleArgs 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 NatRule(java.lang.String name, NatRuleArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:lb/natRule:NatRule", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private NatRule(java.lang.String name, Output id, @Nullable NatRuleState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:lb/natRule:NatRule", name, state, makeResourceOptions(options, id), false);
}
private static NatRuleArgs makeArgs(NatRuleArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? NatRuleArgs.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())
.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 state
* @param options Optional settings to control the behavior of the CustomResource.
*/
public static NatRule get(java.lang.String name, Output id, @Nullable NatRuleState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new NatRule(name, id, state, options);
}
}