Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.mariadb.kotlin
import com.pulumi.azure.mariadb.FirewallRuleArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* Manages a Firewall Rule for a MariaDB Server
* ## Example Usage
* ### Single IP Address)
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = new azure.mariadb.FirewallRule("example", {
* name: "test-rule",
* resourceGroupName: "test-rg",
* serverName: "test-server",
* startIpAddress: "40.112.8.12",
* endIpAddress: "40.112.8.12",
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.mariadb.FirewallRule("example",
* name="test-rule",
* resource_group_name="test-rg",
* server_name="test-server",
* start_ip_address="40.112.8.12",
* end_ip_address="40.112.8.12")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = new Azure.MariaDB.FirewallRule("example", new()
* {
* Name = "test-rule",
* ResourceGroupName = "test-rg",
* ServerName = "test-server",
* StartIpAddress = "40.112.8.12",
* EndIpAddress = "40.112.8.12",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/mariadb"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := mariadb.NewFirewallRule(ctx, "example", &mariadb.FirewallRuleArgs{
* Name: pulumi.String("test-rule"),
* ResourceGroupName: pulumi.String("test-rg"),
* ServerName: pulumi.String("test-server"),
* StartIpAddress: pulumi.String("40.112.8.12"),
* EndIpAddress: pulumi.String("40.112.8.12"),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azure.mariadb.FirewallRule;
* import com.pulumi.azure.mariadb.FirewallRuleArgs;
* 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 example = new FirewallRule("example", FirewallRuleArgs.builder()
* .name("test-rule")
* .resourceGroupName("test-rg")
* .serverName("test-server")
* .startIpAddress("40.112.8.12")
* .endIpAddress("40.112.8.12")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:mariadb:FirewallRule
* properties:
* name: test-rule
* resourceGroupName: test-rg
* serverName: test-server
* startIpAddress: 40.112.8.12
* endIpAddress: 40.112.8.12
* ```
*
* ### IP Range)
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = new azure.mariadb.FirewallRule("example", {
* name: "test-rule",
* resourceGroupName: "test-rg",
* serverName: "test-server",
* startIpAddress: "40.112.0.0",
* endIpAddress: "40.112.255.255",
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.mariadb.FirewallRule("example",
* name="test-rule",
* resource_group_name="test-rg",
* server_name="test-server",
* start_ip_address="40.112.0.0",
* end_ip_address="40.112.255.255")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = new Azure.MariaDB.FirewallRule("example", new()
* {
* Name = "test-rule",
* ResourceGroupName = "test-rg",
* ServerName = "test-server",
* StartIpAddress = "40.112.0.0",
* EndIpAddress = "40.112.255.255",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/mariadb"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := mariadb.NewFirewallRule(ctx, "example", &mariadb.FirewallRuleArgs{
* Name: pulumi.String("test-rule"),
* ResourceGroupName: pulumi.String("test-rg"),
* ServerName: pulumi.String("test-server"),
* StartIpAddress: pulumi.String("40.112.0.0"),
* EndIpAddress: pulumi.String("40.112.255.255"),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azure.mariadb.FirewallRule;
* import com.pulumi.azure.mariadb.FirewallRuleArgs;
* 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 example = new FirewallRule("example", FirewallRuleArgs.builder()
* .name("test-rule")
* .resourceGroupName("test-rg")
* .serverName("test-server")
* .startIpAddress("40.112.0.0")
* .endIpAddress("40.112.255.255")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:mariadb:FirewallRule
* properties:
* name: test-rule
* resourceGroupName: test-rg
* serverName: test-server
* startIpAddress: 40.112.0.0
* endIpAddress: 40.112.255.255
* ```
*
* ## Import
* MariaDB Firewall rules can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:mariadb/firewallRule:FirewallRule rule1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.DBforMariaDB/servers/server1/firewallRules/rule1
* ```
* @property endIpAddress Specifies the End IP Address associated with this Firewall Rule.
* > **NOTE:** The Azure feature `Allow access to Azure services` can be enabled by setting `start_ip_address` and `end_ip_address` to `0.0.0.0` which ([is documented in the Azure API Docs](https://docs.microsoft.com/rest/api/sql/firewallrules/createorupdate)).
* @property name Specifies the name of the MariaDB Firewall Rule. Changing this forces a new resource to be created.
* @property resourceGroupName The name of the resource group in which the MariaDB Server exists. Changing this forces a new resource to be created.
* @property serverName Specifies the name of the MariaDB Server. Changing this forces a new resource to be created.
* @property startIpAddress Specifies the Start IP Address associated with this Firewall Rule.
*/
public data class FirewallRuleArgs(
public val endIpAddress: Output? = null,
public val name: Output? = null,
public val resourceGroupName: Output? = null,
public val serverName: Output? = null,
public val startIpAddress: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.mariadb.FirewallRuleArgs =
com.pulumi.azure.mariadb.FirewallRuleArgs.builder()
.endIpAddress(endIpAddress?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.serverName(serverName?.applyValue({ args0 -> args0 }))
.startIpAddress(startIpAddress?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [FirewallRuleArgs].
*/
@PulumiTagMarker
public class FirewallRuleArgsBuilder internal constructor() {
private var endIpAddress: Output? = null
private var name: Output? = null
private var resourceGroupName: Output? = null
private var serverName: Output? = null
private var startIpAddress: Output? = null
/**
* @param value Specifies the End IP Address associated with this Firewall Rule.
* > **NOTE:** The Azure feature `Allow access to Azure services` can be enabled by setting `start_ip_address` and `end_ip_address` to `0.0.0.0` which ([is documented in the Azure API Docs](https://docs.microsoft.com/rest/api/sql/firewallrules/createorupdate)).
*/
@JvmName("gvktsyayeeropqhp")
public suspend fun endIpAddress(`value`: Output) {
this.endIpAddress = value
}
/**
* @param value Specifies the name of the MariaDB Firewall Rule. Changing this forces a new resource to be created.
*/
@JvmName("jxwaxyjfnaeprgjf")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The name of the resource group in which the MariaDB Server exists. Changing this forces a new resource to be created.
*/
@JvmName("qqbmoiyxaptxrsin")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value Specifies the name of the MariaDB Server. Changing this forces a new resource to be created.
*/
@JvmName("albokbekkthbueci")
public suspend fun serverName(`value`: Output) {
this.serverName = value
}
/**
* @param value Specifies the Start IP Address associated with this Firewall Rule.
*/
@JvmName("fdtgnupbgfjacgvj")
public suspend fun startIpAddress(`value`: Output) {
this.startIpAddress = value
}
/**
* @param value Specifies the End IP Address associated with this Firewall Rule.
* > **NOTE:** The Azure feature `Allow access to Azure services` can be enabled by setting `start_ip_address` and `end_ip_address` to `0.0.0.0` which ([is documented in the Azure API Docs](https://docs.microsoft.com/rest/api/sql/firewallrules/createorupdate)).
*/
@JvmName("nmvsjqclyediwbwp")
public suspend fun endIpAddress(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.endIpAddress = mapped
}
/**
* @param value Specifies the name of the MariaDB Firewall Rule. Changing this forces a new resource to be created.
*/
@JvmName("eqelapmcteopgaii")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value The name of the resource group in which the MariaDB Server exists. Changing this forces a new resource to be created.
*/
@JvmName("fkvnxhlcdcukxxpn")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value Specifies the name of the MariaDB Server. Changing this forces a new resource to be created.
*/
@JvmName("mpubxebcfptarcbd")
public suspend fun serverName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.serverName = mapped
}
/**
* @param value Specifies the Start IP Address associated with this Firewall Rule.
*/
@JvmName("mnkvwathtoadfpjq")
public suspend fun startIpAddress(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.startIpAddress = mapped
}
internal fun build(): FirewallRuleArgs = FirewallRuleArgs(
endIpAddress = endIpAddress,
name = name,
resourceGroupName = resourceGroupName,
serverName = serverName,
startIpAddress = startIpAddress,
)
}