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

com.pulumi.azure.cosmosdb.kotlin.PostgresqlFirewallRuleArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.15.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.cosmosdb.kotlin

import com.pulumi.azure.cosmosdb.PostgresqlFirewallRuleArgs.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 an Azure Cosmos DB for PostgreSQL Firewall Rule.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "West Europe",
 * });
 * const examplePostgresqlCluster = new azure.cosmosdb.PostgresqlCluster("example", {
 *     name: "examplecluster",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     administratorLoginPassword: "H@Sh1CoR3!",
 *     coordinatorStorageQuotaInMb: 131072,
 *     coordinatorVcoreCount: 2,
 *     nodeCount: 0,
 * });
 * const examplePostgresqlFirewallRule = new azure.cosmosdb.PostgresqlFirewallRule("example", {
 *     name: "example-firewallrule",
 *     clusterId: examplePostgresqlCluster.id,
 *     startIpAddress: "10.0.17.62",
 *     endIpAddress: "10.0.17.64",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-resources",
 *     location="West Europe")
 * example_postgresql_cluster = azure.cosmosdb.PostgresqlCluster("example",
 *     name="examplecluster",
 *     resource_group_name=example.name,
 *     location=example.location,
 *     administrator_login_password="H@Sh1CoR3!",
 *     coordinator_storage_quota_in_mb=131072,
 *     coordinator_vcore_count=2,
 *     node_count=0)
 * example_postgresql_firewall_rule = azure.cosmosdb.PostgresqlFirewallRule("example",
 *     name="example-firewallrule",
 *     cluster_id=example_postgresql_cluster.id,
 *     start_ip_address="10.0.17.62",
 *     end_ip_address="10.0.17.64")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Azure.Core.ResourceGroup("example", new()
 *     {
 *         Name = "example-resources",
 *         Location = "West Europe",
 *     });
 *     var examplePostgresqlCluster = new Azure.CosmosDB.PostgresqlCluster("example", new()
 *     {
 *         Name = "examplecluster",
 *         ResourceGroupName = example.Name,
 *         Location = example.Location,
 *         AdministratorLoginPassword = "H@Sh1CoR3!",
 *         CoordinatorStorageQuotaInMb = 131072,
 *         CoordinatorVcoreCount = 2,
 *         NodeCount = 0,
 *     });
 *     var examplePostgresqlFirewallRule = new Azure.CosmosDB.PostgresqlFirewallRule("example", new()
 *     {
 *         Name = "example-firewallrule",
 *         ClusterId = examplePostgresqlCluster.Id,
 *         StartIpAddress = "10.0.17.62",
 *         EndIpAddress = "10.0.17.64",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/cosmosdb"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
 * 			Name:     pulumi.String("example-resources"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		examplePostgresqlCluster, err := cosmosdb.NewPostgresqlCluster(ctx, "example", &cosmosdb.PostgresqlClusterArgs{
 * 			Name:                        pulumi.String("examplecluster"),
 * 			ResourceGroupName:           example.Name,
 * 			Location:                    example.Location,
 * 			AdministratorLoginPassword:  pulumi.String("H@Sh1CoR3!"),
 * 			CoordinatorStorageQuotaInMb: pulumi.Int(131072),
 * 			CoordinatorVcoreCount:       pulumi.Int(2),
 * 			NodeCount:                   pulumi.Int(0),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = cosmosdb.NewPostgresqlFirewallRule(ctx, "example", &cosmosdb.PostgresqlFirewallRuleArgs{
 * 			Name:           pulumi.String("example-firewallrule"),
 * 			ClusterId:      examplePostgresqlCluster.ID(),
 * 			StartIpAddress: pulumi.String("10.0.17.62"),
 * 			EndIpAddress:   pulumi.String("10.0.17.64"),
 * 		})
 * 		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.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.cosmosdb.PostgresqlCluster;
 * import com.pulumi.azure.cosmosdb.PostgresqlClusterArgs;
 * import com.pulumi.azure.cosmosdb.PostgresqlFirewallRule;
 * import com.pulumi.azure.cosmosdb.PostgresqlFirewallRuleArgs;
 * 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 ResourceGroup("example", ResourceGroupArgs.builder()
 *             .name("example-resources")
 *             .location("West Europe")
 *             .build());
 *         var examplePostgresqlCluster = new PostgresqlCluster("examplePostgresqlCluster", PostgresqlClusterArgs.builder()
 *             .name("examplecluster")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .administratorLoginPassword("H@Sh1CoR3!")
 *             .coordinatorStorageQuotaInMb(131072)
 *             .coordinatorVcoreCount(2)
 *             .nodeCount(0)
 *             .build());
 *         var examplePostgresqlFirewallRule = new PostgresqlFirewallRule("examplePostgresqlFirewallRule", PostgresqlFirewallRuleArgs.builder()
 *             .name("example-firewallrule")
 *             .clusterId(examplePostgresqlCluster.id())
 *             .startIpAddress("10.0.17.62")
 *             .endIpAddress("10.0.17.64")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-resources
 *       location: West Europe
 *   examplePostgresqlCluster:
 *     type: azure:cosmosdb:PostgresqlCluster
 *     name: example
 *     properties:
 *       name: examplecluster
 *       resourceGroupName: ${example.name}
 *       location: ${example.location}
 *       administratorLoginPassword: H@Sh1CoR3!
 *       coordinatorStorageQuotaInMb: 131072
 *       coordinatorVcoreCount: 2
 *       nodeCount: 0
 *   examplePostgresqlFirewallRule:
 *     type: azure:cosmosdb:PostgresqlFirewallRule
 *     name: example
 *     properties:
 *       name: example-firewallrule
 *       clusterId: ${examplePostgresqlCluster.id}
 *       startIpAddress: 10.0.17.62
 *       endIpAddress: 10.0.17.64
 * ```
 * 
 * ## Import
 * Azure Cosmos DB for PostgreSQL Firewall Rules can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:cosmosdb/postgresqlFirewallRule:PostgresqlFirewallRule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/cluster1/firewallRules/firewallRule1
 * ```
 * @property clusterId The resource ID of the Azure Cosmos DB for PostgreSQL Cluster. Changing this forces a new resource to be created.
 * @property endIpAddress The end IP address of the Azure Cosmos DB for PostgreSQL Firewall Rule.
 * @property name The name which should be used for the Azure Cosmos DB for PostgreSQL Firewall Rule. Changing this forces a new resource to be created.
 * @property startIpAddress The start IP address of the Azure Cosmos DB for PostgreSQL Firewall Rule.
 */
public data class PostgresqlFirewallRuleArgs(
    public val clusterId: Output? = null,
    public val endIpAddress: Output? = null,
    public val name: Output? = null,
    public val startIpAddress: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.cosmosdb.PostgresqlFirewallRuleArgs =
        com.pulumi.azure.cosmosdb.PostgresqlFirewallRuleArgs.builder()
            .clusterId(clusterId?.applyValue({ args0 -> args0 }))
            .endIpAddress(endIpAddress?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .startIpAddress(startIpAddress?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [PostgresqlFirewallRuleArgs].
 */
@PulumiTagMarker
public class PostgresqlFirewallRuleArgsBuilder internal constructor() {
    private var clusterId: Output? = null

    private var endIpAddress: Output? = null

    private var name: Output? = null

    private var startIpAddress: Output? = null

    /**
     * @param value The resource ID of the Azure Cosmos DB for PostgreSQL Cluster. Changing this forces a new resource to be created.
     */
    @JvmName("gikdfchmnsentgms")
    public suspend fun clusterId(`value`: Output) {
        this.clusterId = value
    }

    /**
     * @param value The end IP address of the Azure Cosmos DB for PostgreSQL Firewall Rule.
     */
    @JvmName("nvosqpghwknkptqp")
    public suspend fun endIpAddress(`value`: Output) {
        this.endIpAddress = value
    }

    /**
     * @param value The name which should be used for the Azure Cosmos DB for PostgreSQL Firewall Rule. Changing this forces a new resource to be created.
     */
    @JvmName("klqcffulhmsixiil")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The start IP address of the Azure Cosmos DB for PostgreSQL Firewall Rule.
     */
    @JvmName("gsrlkkpcbeohkkgw")
    public suspend fun startIpAddress(`value`: Output) {
        this.startIpAddress = value
    }

    /**
     * @param value The resource ID of the Azure Cosmos DB for PostgreSQL Cluster. Changing this forces a new resource to be created.
     */
    @JvmName("iuqdumheirggefkm")
    public suspend fun clusterId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.clusterId = mapped
    }

    /**
     * @param value The end IP address of the Azure Cosmos DB for PostgreSQL Firewall Rule.
     */
    @JvmName("uotrtscpicoanxmw")
    public suspend fun endIpAddress(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.endIpAddress = mapped
    }

    /**
     * @param value The name which should be used for the Azure Cosmos DB for PostgreSQL Firewall Rule. Changing this forces a new resource to be created.
     */
    @JvmName("xvhygmrlkvtqoaxs")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The start IP address of the Azure Cosmos DB for PostgreSQL Firewall Rule.
     */
    @JvmName("atethjidfdykdhsf")
    public suspend fun startIpAddress(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.startIpAddress = mapped
    }

    internal fun build(): PostgresqlFirewallRuleArgs = PostgresqlFirewallRuleArgs(
        clusterId = clusterId,
        endIpAddress = endIpAddress,
        name = name,
        startIpAddress = startIpAddress,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy