1. Packages
  2. Azure Native
  3. API Docs
  4. sql
  5. OutboundFirewallRule
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.47.1 published on Monday, Jun 24, 2024 by Pulumi

azure-native.sql.OutboundFirewallRule

Explore with Pulumi AI

azure-native logo
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.47.1 published on Monday, Jun 24, 2024 by Pulumi

    An Azure SQL DB Server Outbound Firewall Rule. Azure REST API version: 2021-11-01. Prior API version in Azure Native 1.x: 2021-02-01-preview.

    Other available API versions: 2022-11-01-preview, 2023-02-01-preview, 2023-05-01-preview, 2023-08-01-preview.

    Example Usage

    Approve or reject a outbound firewall rule with a given name.

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var outboundFirewallRule = new AzureNative.Sql.OutboundFirewallRule("outboundFirewallRule", new()
        {
            OutboundRuleFqdn = "server.database.windows.net",
            ResourceGroupName = "sqlcrudtest-7398",
            ServerName = "sqlcrudtest-4645",
        });
    
    });
    
    package main
    
    import (
    	sql "github.com/pulumi/pulumi-azure-native-sdk/sql/v2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := sql.NewOutboundFirewallRule(ctx, "outboundFirewallRule", &sql.OutboundFirewallRuleArgs{
    			OutboundRuleFqdn:  pulumi.String("server.database.windows.net"),
    			ResourceGroupName: pulumi.String("sqlcrudtest-7398"),
    			ServerName:        pulumi.String("sqlcrudtest-4645"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azurenative.sql.OutboundFirewallRule;
    import com.pulumi.azurenative.sql.OutboundFirewallRuleArgs;
    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 outboundFirewallRule = new OutboundFirewallRule("outboundFirewallRule", OutboundFirewallRuleArgs.builder()
                .outboundRuleFqdn("server.database.windows.net")
                .resourceGroupName("sqlcrudtest-7398")
                .serverName("sqlcrudtest-4645")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    outbound_firewall_rule = azure_native.sql.OutboundFirewallRule("outboundFirewallRule",
        outbound_rule_fqdn="server.database.windows.net",
        resource_group_name="sqlcrudtest-7398",
        server_name="sqlcrudtest-4645")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const outboundFirewallRule = new azure_native.sql.OutboundFirewallRule("outboundFirewallRule", {
        outboundRuleFqdn: "server.database.windows.net",
        resourceGroupName: "sqlcrudtest-7398",
        serverName: "sqlcrudtest-4645",
    });
    
    resources:
      outboundFirewallRule:
        type: azure-native:sql:OutboundFirewallRule
        properties:
          outboundRuleFqdn: server.database.windows.net
          resourceGroupName: sqlcrudtest-7398
          serverName: sqlcrudtest-4645
    

    Create OutboundFirewallRule Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new OutboundFirewallRule(name: string, args: OutboundFirewallRuleArgs, opts?: CustomResourceOptions);
    @overload
    def OutboundFirewallRule(resource_name: str,
                             args: OutboundFirewallRuleArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def OutboundFirewallRule(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             resource_group_name: Optional[str] = None,
                             server_name: Optional[str] = None,
                             outbound_rule_fqdn: Optional[str] = None)
    func NewOutboundFirewallRule(ctx *Context, name string, args OutboundFirewallRuleArgs, opts ...ResourceOption) (*OutboundFirewallRule, error)
    public OutboundFirewallRule(string name, OutboundFirewallRuleArgs args, CustomResourceOptions? opts = null)
    public OutboundFirewallRule(String name, OutboundFirewallRuleArgs args)
    public OutboundFirewallRule(String name, OutboundFirewallRuleArgs args, CustomResourceOptions options)
    
    type: azure-native:sql:OutboundFirewallRule
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args OutboundFirewallRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args OutboundFirewallRuleArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args OutboundFirewallRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args OutboundFirewallRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args OutboundFirewallRuleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var outboundFirewallRuleResource = new AzureNative.Sql.OutboundFirewallRule("outboundFirewallRuleResource", new()
    {
        ResourceGroupName = "string",
        ServerName = "string",
        OutboundRuleFqdn = "string",
    });
    
    example, err := sql.NewOutboundFirewallRule(ctx, "outboundFirewallRuleResource", &sql.OutboundFirewallRuleArgs{
    ResourceGroupName: pulumi.String("string"),
    ServerName: pulumi.String("string"),
    OutboundRuleFqdn: pulumi.String("string"),
    })
    
    var outboundFirewallRuleResource = new OutboundFirewallRule("outboundFirewallRuleResource", OutboundFirewallRuleArgs.builder()
        .resourceGroupName("string")
        .serverName("string")
        .outboundRuleFqdn("string")
        .build());
    
    outbound_firewall_rule_resource = azure_native.sql.OutboundFirewallRule("outboundFirewallRuleResource",
        resource_group_name="string",
        server_name="string",
        outbound_rule_fqdn="string")
    
    const outboundFirewallRuleResource = new azure_native.sql.OutboundFirewallRule("outboundFirewallRuleResource", {
        resourceGroupName: "string",
        serverName: "string",
        outboundRuleFqdn: "string",
    });
    
    type: azure-native:sql:OutboundFirewallRule
    properties:
        outboundRuleFqdn: string
        resourceGroupName: string
        serverName: string
    

    OutboundFirewallRule Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The OutboundFirewallRule resource accepts the following input properties:

    ResourceGroupName string
    The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
    ServerName string
    The name of the server.
    OutboundRuleFqdn string
    ResourceGroupName string
    The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
    ServerName string
    The name of the server.
    OutboundRuleFqdn string
    resourceGroupName String
    The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
    serverName String
    The name of the server.
    outboundRuleFqdn String
    resourceGroupName string
    The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
    serverName string
    The name of the server.
    outboundRuleFqdn string
    resource_group_name str
    The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
    server_name str
    The name of the server.
    outbound_rule_fqdn str
    resourceGroupName String
    The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
    serverName String
    The name of the server.
    outboundRuleFqdn String

    Outputs

    All input properties are implicitly available as output properties. Additionally, the OutboundFirewallRule resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Resource name.
    ProvisioningState string
    The state of the outbound rule.
    Type string
    Resource type.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Resource name.
    ProvisioningState string
    The state of the outbound rule.
    Type string
    Resource type.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Resource name.
    provisioningState String
    The state of the outbound rule.
    type String
    Resource type.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    Resource name.
    provisioningState string
    The state of the outbound rule.
    type string
    Resource type.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    Resource name.
    provisioning_state str
    The state of the outbound rule.
    type str
    Resource type.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Resource name.
    provisioningState String
    The state of the outbound rule.
    type String
    Resource type.

    Import

    An existing resource can be imported using its type token, name, and identifier, e.g.

    $ pulumi import azure-native:sql:OutboundFirewallRule server.database.windows.net /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/outboundFirewallRules/{outboundRuleFqdn} 
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Native pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native logo
    This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
    Azure Native v2.47.1 published on Monday, Jun 24, 2024 by Pulumi