com.pulumi.alicloud.vpc.kotlin.PublicIpAddressPoolArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-alicloud-kotlin Show documentation
Show all versions of pulumi-alicloud-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.alicloud.vpc.kotlin
import com.pulumi.alicloud.vpc.PublicIpAddressPoolArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Provides a VPC Public Ip Address Pool resource.
* For information about VPC Public Ip Address Pool and how to use it, see [What is Public Ip Address Pool](https://www.alibabacloud.com/help/en/virtual-private-cloud/latest/createpublicipaddresspool).
* > **NOTE:** Available since v1.186.0.
* ## Example Usage
* Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as alicloud from "@pulumi/alicloud";
* const config = new pulumi.Config();
* const name = config.get("name") || "tf-example";
* const default = alicloud.resourcemanager.getResourceGroups({
* status: "OK",
* });
* const defaultPublicIpAddressPool = new alicloud.vpc.PublicIpAddressPool("default", {
* description: name,
* publicIpAddressPoolName: name,
* isp: "BGP",
* resourceGroupId: _default.then(_default => _default.ids?.[0]),
* });
* ```
* ```python
* import pulumi
* import pulumi_alicloud as alicloud
* config = pulumi.Config()
* name = config.get("name")
* if name is None:
* name = "tf-example"
* default = alicloud.resourcemanager.get_resource_groups(status="OK")
* default_public_ip_address_pool = alicloud.vpc.PublicIpAddressPool("default",
* description=name,
* public_ip_address_pool_name=name,
* isp="BGP",
* resource_group_id=default.ids[0])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AliCloud = Pulumi.AliCloud;
* return await Deployment.RunAsync(() =>
* {
* var config = new Config();
* var name = config.Get("name") ?? "tf-example";
* var @default = AliCloud.ResourceManager.GetResourceGroups.Invoke(new()
* {
* Status = "OK",
* });
* var defaultPublicIpAddressPool = new AliCloud.Vpc.PublicIpAddressPool("default", new()
* {
* Description = name,
* PublicIpAddressPoolName = name,
* Isp = "BGP",
* ResourceGroupId = @default.Apply(@default => @default.Apply(getResourceGroupsResult => getResourceGroupsResult.Ids[0])),
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/resourcemanager"
* "github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* cfg := config.New(ctx, "")
* name := "tf-example"
* if param := cfg.Get("name"); param != "" {
* name = param
* }
* _default, err := resourcemanager.GetResourceGroups(ctx, &resourcemanager.GetResourceGroupsArgs{
* Status: pulumi.StringRef("OK"),
* }, nil)
* if err != nil {
* return err
* }
* _, err = vpc.NewPublicIpAddressPool(ctx, "default", &vpc.PublicIpAddressPoolArgs{
* Description: pulumi.String(name),
* PublicIpAddressPoolName: pulumi.String(name),
* Isp: pulumi.String("BGP"),
* ResourceGroupId: pulumi.String(_default.Ids[0]),
* })
* 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.alicloud.resourcemanager.ResourcemanagerFunctions;
* import com.pulumi.alicloud.resourcemanager.inputs.GetResourceGroupsArgs;
* import com.pulumi.alicloud.vpc.PublicIpAddressPool;
* import com.pulumi.alicloud.vpc.PublicIpAddressPoolArgs;
* 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) {
* final var config = ctx.config();
* final var name = config.get("name").orElse("tf-example");
* final var default = ResourcemanagerFunctions.getResourceGroups(GetResourceGroupsArgs.builder()
* .status("OK")
* .build());
* var defaultPublicIpAddressPool = new PublicIpAddressPool("defaultPublicIpAddressPool", PublicIpAddressPoolArgs.builder()
* .description(name)
* .publicIpAddressPoolName(name)
* .isp("BGP")
* .resourceGroupId(default_.ids()[0])
* .build());
* }
* }
* ```
* ```yaml
* configuration:
* name:
* type: string
* default: tf-example
* resources:
* defaultPublicIpAddressPool:
* type: alicloud:vpc:PublicIpAddressPool
* name: default
* properties:
* description: ${name}
* publicIpAddressPoolName: ${name}
* isp: BGP
* resourceGroupId: ${default.ids[0]}
* variables:
* default:
* fn::invoke:
* Function: alicloud:resourcemanager:getResourceGroups
* Arguments:
* status: OK
* ```
*
* ## Import
* VPC Public Ip Address Pool can be imported using the id, e.g.
* ```sh
* $ pulumi import alicloud:vpc/publicIpAddressPool:PublicIpAddressPool example
* ```
* @property bizType The name of the VPC Public IP address pool.
* @property description Description.
* @property isp The Internet service provider. Valid values: `BGP`, `BGP_PRO`, `ChinaTelecom`, `ChinaUnicom`, `ChinaMobile`, `ChinaTelecom_L2`, `ChinaUnicom_L2`, `ChinaMobile_L2`, `BGP_FinanceCloud`. Default Value: `BGP`.
* @property publicIpAddressPoolName The name of the VPC Public IP address pool.
* @property resourceGroupId The resource group ID of the VPC Public IP address pool.
* @property securityProtectionTypes Security protection level.
* - If the configuration is empty, the default value is DDoS protection (Basic edition).
* - `AntiDDoS_Enhanced` indicates DDoS protection (enhanced version).
* @property tags The tags of PrefixList.
*/
public data class PublicIpAddressPoolArgs(
public val bizType: Output? = null,
public val description: Output? = null,
public val isp: Output? = null,
public val publicIpAddressPoolName: Output? = null,
public val resourceGroupId: Output? = null,
public val securityProtectionTypes: Output>? = null,
public val tags: Output