1. Registry
  2. Packages
  3. Alibaba Cloud Provider
  4. API Docs
  5. polardb
  6. Gateway
Viewing docs for Alibaba Cloud v3.108.0
published on Thursday, Sep 17, 2026 by Pulumi
alicloud logo alicloud logo
Viewing docs for Alibaba Cloud v3.108.0
published on Thursday, Sep 17, 2026 by Pulumi

    Provides a PolarDB Gateway resource.

    NOTE: Available since v1.290.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const _default = new alicloud.polardb.Gateway("default", {
        zoneId: "cn-beijing-l",
        dbClusterClass: "polar.app.g2.small",
        payType: "Postpaid",
        vpcId: "vpc-xxx",
        vswitchId: "vsw-xxx",
        securityGroupId: "sg-xxx",
        dbType: "PostgreSQL",
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default = alicloud.polardb.Gateway("default",
        zone_id="cn-beijing-l",
        db_cluster_class="polar.app.g2.small",
        pay_type="Postpaid",
        vpc_id="vpc-xxx",
        vswitch_id="vsw-xxx",
        security_group_id="sg-xxx",
        db_type="PostgreSQL")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/polardb"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := polardb.NewGateway(ctx, "default", &polardb.GatewayArgs{
    			ZoneId:          pulumi.String("cn-beijing-l"),
    			DbClusterClass:  pulumi.String("polar.app.g2.small"),
    			PayType:         pulumi.String("Postpaid"),
    			VpcId:           pulumi.String("vpc-xxx"),
    			VswitchId:       pulumi.String("vsw-xxx"),
    			SecurityGroupId: pulumi.String("sg-xxx"),
    			DbType:          pulumi.String("PostgreSQL"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = new AliCloud.PolarDB.Gateway("default", new()
        {
            ZoneId = "cn-beijing-l",
            DbClusterClass = "polar.app.g2.small",
            PayType = "Postpaid",
            VpcId = "vpc-xxx",
            VswitchId = "vsw-xxx",
            SecurityGroupId = "sg-xxx",
            DbType = "PostgreSQL",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.polardb.Gateway;
    import com.pulumi.alicloud.polardb.GatewayArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 default_ = new Gateway("default", GatewayArgs.builder()
                .zoneId("cn-beijing-l")
                .dbClusterClass("polar.app.g2.small")
                .payType("Postpaid")
                .vpcId("vpc-xxx")
                .vswitchId("vsw-xxx")
                .securityGroupId("sg-xxx")
                .dbType("PostgreSQL")
                .build());
    
        }
    }
    
    resources:
      default:
        type: alicloud:polardb:Gateway
        properties:
          zoneId: cn-beijing-l
          dbClusterClass: polar.app.g2.small
          payType: Postpaid
          vpcId: vpc-xxx
          vswitchId: vsw-xxx
          securityGroupId: sg-xxx
          dbType: PostgreSQL
    
    pulumi {
      required_providers {
        alicloud = {
          source = "pulumi/alicloud"
        }
      }
    }
    
    resource "alicloud_polardb_gateway" "default" {
      zone_id           = "cn-beijing-l"
      db_cluster_class  = "polar.app.g2.small"
      pay_type          = "Postpaid"
      vpc_id            = "vpc-xxx"
      vswitch_id        = "vsw-xxx"
      security_group_id = "sg-xxx"
      db_type           = "PostgreSQL"
    }
    

    📚 Need more examples? VIEW MORE EXAMPLES

    Create Gateway Resource

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

    Constructor syntax

    new Gateway(name: string, args: GatewayArgs, opts?: CustomResourceOptions);
    @overload
    def Gateway(resource_name: str,
                args: GatewayArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Gateway(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                pay_type: Optional[str] = None,
                vpc_id: Optional[str] = None,
                vswitch_id: Optional[str] = None,
                auto_renew: Optional[bool] = None,
                db_cluster_class: Optional[str] = None,
                db_type: Optional[str] = None,
                period: Optional[str] = None,
                security_group_id: Optional[str] = None,
                used_time: Optional[int] = None,
                zone_id: Optional[str] = None)
    func NewGateway(ctx *Context, name string, args GatewayArgs, opts ...ResourceOption) (*Gateway, error)
    public Gateway(string name, GatewayArgs args, CustomResourceOptions? opts = null)
    public Gateway(String name, GatewayArgs args)
    public Gateway(String name, GatewayArgs args, CustomResourceOptions options)
    
    type: alicloud:polardb:Gateway
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "alicloud_polardb_gateway" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args GatewayArgs
    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 GatewayArgs
    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 GatewayArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args GatewayArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args GatewayArgs
    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 examplegatewayResourceResourceFromPolardbgateway = new AliCloud.PolarDB.Gateway("examplegatewayResourceResourceFromPolardbgateway", new()
    {
        PayType = "string",
        VpcId = "string",
        VswitchId = "string",
        AutoRenew = false,
        DbClusterClass = "string",
        DbType = "string",
        Period = "string",
        SecurityGroupId = "string",
        UsedTime = 0,
        ZoneId = "string",
    });
    
    example, err := polardb.NewGateway(ctx, "examplegatewayResourceResourceFromPolardbgateway", &polardb.GatewayArgs{
    	PayType:         pulumi.String("string"),
    	VpcId:           pulumi.String("string"),
    	VswitchId:       pulumi.String("string"),
    	AutoRenew:       pulumi.Bool(false),
    	DbClusterClass:  pulumi.String("string"),
    	DbType:          pulumi.String("string"),
    	Period:          pulumi.String("string"),
    	SecurityGroupId: pulumi.String("string"),
    	UsedTime:        pulumi.Int(0),
    	ZoneId:          pulumi.String("string"),
    })
    
    resource "alicloud_polardb_gateway" "examplegatewayResourceResourceFromPolardbgateway" {
      lifecycle {
        create_before_destroy = true
      }
      pay_type          = "string"
      vpc_id            = "string"
      vswitch_id        = "string"
      auto_renew        = false
      db_cluster_class  = "string"
      db_type           = "string"
      period            = "string"
      security_group_id = "string"
      used_time         = 0
      zone_id           = "string"
    }
    
    var examplegatewayResourceResourceFromPolardbgateway = new com.pulumi.alicloud.polardb.Gateway("examplegatewayResourceResourceFromPolardbgateway", com.pulumi.alicloud.polardb.GatewayArgs.builder()
        .payType("string")
        .vpcId("string")
        .vswitchId("string")
        .autoRenew(false)
        .dbClusterClass("string")
        .dbType("string")
        .period("string")
        .securityGroupId("string")
        .usedTime(0)
        .zoneId("string")
        .build());
    
    examplegateway_resource_resource_from_polardbgateway = alicloud.polardb.Gateway("examplegatewayResourceResourceFromPolardbgateway",
        pay_type="string",
        vpc_id="string",
        vswitch_id="string",
        auto_renew=False,
        db_cluster_class="string",
        db_type="string",
        period="string",
        security_group_id="string",
        used_time=0,
        zone_id="string")
    
    const examplegatewayResourceResourceFromPolardbgateway = new alicloud.polardb.Gateway("examplegatewayResourceResourceFromPolardbgateway", {
        payType: "string",
        vpcId: "string",
        vswitchId: "string",
        autoRenew: false,
        dbClusterClass: "string",
        dbType: "string",
        period: "string",
        securityGroupId: "string",
        usedTime: 0,
        zoneId: "string",
    });
    
    type: alicloud:polardb:Gateway
    properties:
        autoRenew: false
        dbClusterClass: string
        dbType: string
        payType: string
        period: string
        securityGroupId: string
        usedTime: 0
        vpcId: string
        vswitchId: string
        zoneId: string
    

    Gateway Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Gateway resource accepts the following input properties:

    PayType string
    The billing method. Valid values: Postpaid, Prepaid.
    VpcId string
    The ID of the VPC.
    VswitchId string
    The ID of the vSwitch.
    AutoRenew bool
    Whether to enable automatic renewal for a subscription gateway. Default value: false.
    DbClusterClass string
    The specifications of the PolarDB gateway.
    DbType string
    The database engine. Valid values: MySQL, PostgreSQL.
    Period string
    The unit of the subscription duration. Valid values: Month, Year. This argument is required when payType is Prepaid.
    SecurityGroupId string
    The ID of the security group.
    UsedTime int
    The subscription duration. Valid values are 1 to 9 when period is Month, and 1 to 3 when period is Year. This argument is required when payType is Prepaid.
    ZoneId string
    The zone ID of the PolarDB gateway.
    PayType string
    The billing method. Valid values: Postpaid, Prepaid.
    VpcId string
    The ID of the VPC.
    VswitchId string
    The ID of the vSwitch.
    AutoRenew bool
    Whether to enable automatic renewal for a subscription gateway. Default value: false.
    DbClusterClass string
    The specifications of the PolarDB gateway.
    DbType string
    The database engine. Valid values: MySQL, PostgreSQL.
    Period string
    The unit of the subscription duration. Valid values: Month, Year. This argument is required when payType is Prepaid.
    SecurityGroupId string
    The ID of the security group.
    UsedTime int
    The subscription duration. Valid values are 1 to 9 when period is Month, and 1 to 3 when period is Year. This argument is required when payType is Prepaid.
    ZoneId string
    The zone ID of the PolarDB gateway.
    pay_type string
    The billing method. Valid values: Postpaid, Prepaid.
    vpc_id string
    The ID of the VPC.
    vswitch_id string
    The ID of the vSwitch.
    auto_renew bool
    Whether to enable automatic renewal for a subscription gateway. Default value: false.
    db_cluster_class string
    The specifications of the PolarDB gateway.
    db_type string
    The database engine. Valid values: MySQL, PostgreSQL.
    period string
    The unit of the subscription duration. Valid values: Month, Year. This argument is required when payType is Prepaid.
    security_group_id string
    The ID of the security group.
    used_time number
    The subscription duration. Valid values are 1 to 9 when period is Month, and 1 to 3 when period is Year. This argument is required when payType is Prepaid.
    zone_id string
    The zone ID of the PolarDB gateway.
    payType String
    The billing method. Valid values: Postpaid, Prepaid.
    vpcId String
    The ID of the VPC.
    vswitchId String
    The ID of the vSwitch.
    autoRenew Boolean
    Whether to enable automatic renewal for a subscription gateway. Default value: false.
    dbClusterClass String
    The specifications of the PolarDB gateway.
    dbType String
    The database engine. Valid values: MySQL, PostgreSQL.
    period String
    The unit of the subscription duration. Valid values: Month, Year. This argument is required when payType is Prepaid.
    securityGroupId String
    The ID of the security group.
    usedTime Integer
    The subscription duration. Valid values are 1 to 9 when period is Month, and 1 to 3 when period is Year. This argument is required when payType is Prepaid.
    zoneId String
    The zone ID of the PolarDB gateway.
    payType string
    The billing method. Valid values: Postpaid, Prepaid.
    vpcId string
    The ID of the VPC.
    vswitchId string
    The ID of the vSwitch.
    autoRenew boolean
    Whether to enable automatic renewal for a subscription gateway. Default value: false.
    dbClusterClass string
    The specifications of the PolarDB gateway.
    dbType string
    The database engine. Valid values: MySQL, PostgreSQL.
    period string
    The unit of the subscription duration. Valid values: Month, Year. This argument is required when payType is Prepaid.
    securityGroupId string
    The ID of the security group.
    usedTime number
    The subscription duration. Valid values are 1 to 9 when period is Month, and 1 to 3 when period is Year. This argument is required when payType is Prepaid.
    zoneId string
    The zone ID of the PolarDB gateway.
    pay_type str
    The billing method. Valid values: Postpaid, Prepaid.
    vpc_id str
    The ID of the VPC.
    vswitch_id str
    The ID of the vSwitch.
    auto_renew bool
    Whether to enable automatic renewal for a subscription gateway. Default value: false.
    db_cluster_class str
    The specifications of the PolarDB gateway.
    db_type str
    The database engine. Valid values: MySQL, PostgreSQL.
    period str
    The unit of the subscription duration. Valid values: Month, Year. This argument is required when payType is Prepaid.
    security_group_id str
    The ID of the security group.
    used_time int
    The subscription duration. Valid values are 1 to 9 when period is Month, and 1 to 3 when period is Year. This argument is required when payType is Prepaid.
    zone_id str
    The zone ID of the PolarDB gateway.
    payType String
    The billing method. Valid values: Postpaid, Prepaid.
    vpcId String
    The ID of the VPC.
    vswitchId String
    The ID of the vSwitch.
    autoRenew Boolean
    Whether to enable automatic renewal for a subscription gateway. Default value: false.
    dbClusterClass String
    The specifications of the PolarDB gateway.
    dbType String
    The database engine. Valid values: MySQL, PostgreSQL.
    period String
    The unit of the subscription duration. Valid values: Month, Year. This argument is required when payType is Prepaid.
    securityGroupId String
    The ID of the security group.
    usedTime Number
    The subscription duration. Valid values are 1 to 9 when period is Month, and 1 to 3 when period is Year. This argument is required when payType is Prepaid.
    zoneId String
    The zone ID of the PolarDB gateway.

    Outputs

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

    CreateTime string
    (Available since v1.290.0) The time when the PolarDB gateway was created.
    CurrentVersion string
    (Available since v1.290.0) The current gateway version.
    Description string
    (Available since v1.290.0) The description of the PolarDB gateway.
    Endpoints List<Pulumi.AliCloud.PolarDB.Outputs.GatewayEndpoint>
    (Available since v1.290.0) The endpoints of the PolarDB gateway. Each item contains the following attributes:
    ExpireTime string
    (Available since v1.290.0) The expiration time of the PolarDB gateway.
    Expired bool
    (Available since v1.290.0) Indicates whether the PolarDB gateway has expired.
    Id string
    The provider-assigned unique ID for this managed resource.
    LatestVersion string
    (Available since v1.290.0) The latest available gateway version.
    ModifyTime string
    (Available since v1.290.0) The time when the PolarDB gateway was last modified.
    RegionId string
    (Available since v1.290.0) The region ID of the PolarDB gateway.
    RunningVersion string
    (Available since v1.290.0) The running gateway version.
    SecurityIpArrays List<Pulumi.AliCloud.PolarDB.Outputs.GatewaySecurityIpArray>
    (Available since v1.290.0) The IP whitelist groups of the PolarDB gateway. Each item contains the following attributes:
    Status string
    (Available since v1.290.0) The status of the PolarDB gateway.
    CreateTime string
    (Available since v1.290.0) The time when the PolarDB gateway was created.
    CurrentVersion string
    (Available since v1.290.0) The current gateway version.
    Description string
    (Available since v1.290.0) The description of the PolarDB gateway.
    Endpoints []GatewayEndpoint
    (Available since v1.290.0) The endpoints of the PolarDB gateway. Each item contains the following attributes:
    ExpireTime string
    (Available since v1.290.0) The expiration time of the PolarDB gateway.
    Expired bool
    (Available since v1.290.0) Indicates whether the PolarDB gateway has expired.
    Id string
    The provider-assigned unique ID for this managed resource.
    LatestVersion string
    (Available since v1.290.0) The latest available gateway version.
    ModifyTime string
    (Available since v1.290.0) The time when the PolarDB gateway was last modified.
    RegionId string
    (Available since v1.290.0) The region ID of the PolarDB gateway.
    RunningVersion string
    (Available since v1.290.0) The running gateway version.
    SecurityIpArrays []GatewaySecurityIpArray
    (Available since v1.290.0) The IP whitelist groups of the PolarDB gateway. Each item contains the following attributes:
    Status string
    (Available since v1.290.0) The status of the PolarDB gateway.
    create_time string
    (Available since v1.290.0) The time when the PolarDB gateway was created.
    current_version string
    (Available since v1.290.0) The current gateway version.
    description string
    (Available since v1.290.0) The description of the PolarDB gateway.
    endpoints list(object)
    (Available since v1.290.0) The endpoints of the PolarDB gateway. Each item contains the following attributes:
    expire_time string
    (Available since v1.290.0) The expiration time of the PolarDB gateway.
    expired bool
    (Available since v1.290.0) Indicates whether the PolarDB gateway has expired.
    id string
    The provider-assigned unique ID for this managed resource.
    latest_version string
    (Available since v1.290.0) The latest available gateway version.
    modify_time string
    (Available since v1.290.0) The time when the PolarDB gateway was last modified.
    region_id string
    (Available since v1.290.0) The region ID of the PolarDB gateway.
    running_version string
    (Available since v1.290.0) The running gateway version.
    security_ip_arrays list(object)
    (Available since v1.290.0) The IP whitelist groups of the PolarDB gateway. Each item contains the following attributes:
    status string
    (Available since v1.290.0) The status of the PolarDB gateway.
    createTime String
    (Available since v1.290.0) The time when the PolarDB gateway was created.
    currentVersion String
    (Available since v1.290.0) The current gateway version.
    description String
    (Available since v1.290.0) The description of the PolarDB gateway.
    endpoints List<GatewayEndpoint>
    (Available since v1.290.0) The endpoints of the PolarDB gateway. Each item contains the following attributes:
    expireTime String
    (Available since v1.290.0) The expiration time of the PolarDB gateway.
    expired Boolean
    (Available since v1.290.0) Indicates whether the PolarDB gateway has expired.
    id String
    The provider-assigned unique ID for this managed resource.
    latestVersion String
    (Available since v1.290.0) The latest available gateway version.
    modifyTime String
    (Available since v1.290.0) The time when the PolarDB gateway was last modified.
    regionId String
    (Available since v1.290.0) The region ID of the PolarDB gateway.
    runningVersion String
    (Available since v1.290.0) The running gateway version.
    securityIpArrays List<GatewaySecurityIpArray>
    (Available since v1.290.0) The IP whitelist groups of the PolarDB gateway. Each item contains the following attributes:
    status String
    (Available since v1.290.0) The status of the PolarDB gateway.
    createTime string
    (Available since v1.290.0) The time when the PolarDB gateway was created.
    currentVersion string
    (Available since v1.290.0) The current gateway version.
    description string
    (Available since v1.290.0) The description of the PolarDB gateway.
    endpoints GatewayEndpoint[]
    (Available since v1.290.0) The endpoints of the PolarDB gateway. Each item contains the following attributes:
    expireTime string
    (Available since v1.290.0) The expiration time of the PolarDB gateway.
    expired boolean
    (Available since v1.290.0) Indicates whether the PolarDB gateway has expired.
    id string
    The provider-assigned unique ID for this managed resource.
    latestVersion string
    (Available since v1.290.0) The latest available gateway version.
    modifyTime string
    (Available since v1.290.0) The time when the PolarDB gateway was last modified.
    regionId string
    (Available since v1.290.0) The region ID of the PolarDB gateway.
    runningVersion string
    (Available since v1.290.0) The running gateway version.
    securityIpArrays GatewaySecurityIpArray[]
    (Available since v1.290.0) The IP whitelist groups of the PolarDB gateway. Each item contains the following attributes:
    status string
    (Available since v1.290.0) The status of the PolarDB gateway.
    create_time str
    (Available since v1.290.0) The time when the PolarDB gateway was created.
    current_version str
    (Available since v1.290.0) The current gateway version.
    description str
    (Available since v1.290.0) The description of the PolarDB gateway.
    endpoints Sequence[GatewayEndpoint]
    (Available since v1.290.0) The endpoints of the PolarDB gateway. Each item contains the following attributes:
    expire_time str
    (Available since v1.290.0) The expiration time of the PolarDB gateway.
    expired bool
    (Available since v1.290.0) Indicates whether the PolarDB gateway has expired.
    id str
    The provider-assigned unique ID for this managed resource.
    latest_version str
    (Available since v1.290.0) The latest available gateway version.
    modify_time str
    (Available since v1.290.0) The time when the PolarDB gateway was last modified.
    region_id str
    (Available since v1.290.0) The region ID of the PolarDB gateway.
    running_version str
    (Available since v1.290.0) The running gateway version.
    security_ip_arrays Sequence[GatewaySecurityIpArray]
    (Available since v1.290.0) The IP whitelist groups of the PolarDB gateway. Each item contains the following attributes:
    status str
    (Available since v1.290.0) The status of the PolarDB gateway.
    createTime String
    (Available since v1.290.0) The time when the PolarDB gateway was created.
    currentVersion String
    (Available since v1.290.0) The current gateway version.
    description String
    (Available since v1.290.0) The description of the PolarDB gateway.
    endpoints List<Property Map>
    (Available since v1.290.0) The endpoints of the PolarDB gateway. Each item contains the following attributes:
    expireTime String
    (Available since v1.290.0) The expiration time of the PolarDB gateway.
    expired Boolean
    (Available since v1.290.0) Indicates whether the PolarDB gateway has expired.
    id String
    The provider-assigned unique ID for this managed resource.
    latestVersion String
    (Available since v1.290.0) The latest available gateway version.
    modifyTime String
    (Available since v1.290.0) The time when the PolarDB gateway was last modified.
    regionId String
    (Available since v1.290.0) The region ID of the PolarDB gateway.
    runningVersion String
    (Available since v1.290.0) The running gateway version.
    securityIpArrays List<Property Map>
    (Available since v1.290.0) The IP whitelist groups of the PolarDB gateway. Each item contains the following attributes:
    status String
    (Available since v1.290.0) The status of the PolarDB gateway.

    Look up Existing Gateway Resource

    Get an existing Gateway resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: GatewayState, opts?: CustomResourceOptions): Gateway
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            auto_renew: Optional[bool] = None,
            create_time: Optional[str] = None,
            current_version: Optional[str] = None,
            db_cluster_class: Optional[str] = None,
            db_type: Optional[str] = None,
            description: Optional[str] = None,
            endpoints: Optional[Sequence[GatewayEndpointArgs]] = None,
            expire_time: Optional[str] = None,
            expired: Optional[bool] = None,
            latest_version: Optional[str] = None,
            modify_time: Optional[str] = None,
            pay_type: Optional[str] = None,
            period: Optional[str] = None,
            region_id: Optional[str] = None,
            running_version: Optional[str] = None,
            security_group_id: Optional[str] = None,
            security_ip_arrays: Optional[Sequence[GatewaySecurityIpArrayArgs]] = None,
            status: Optional[str] = None,
            used_time: Optional[int] = None,
            vpc_id: Optional[str] = None,
            vswitch_id: Optional[str] = None,
            zone_id: Optional[str] = None) -> Gateway
    func GetGateway(ctx *Context, name string, id IDInput, state *GatewayState, opts ...ResourceOption) (*Gateway, error)
    public static Gateway Get(string name, Input<string> id, GatewayState? state, CustomResourceOptions? opts = null)
    public static Gateway get(String name, Output<String> id, GatewayState state, CustomResourceOptions options)
    resources:  _:    type: alicloud:polardb:Gateway    get:      id: ${id}
    import {
      to = alicloud_polardb_gateway.example
      id = "${id}"
    }
    
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AutoRenew bool
    Whether to enable automatic renewal for a subscription gateway. Default value: false.
    CreateTime string
    (Available since v1.290.0) The time when the PolarDB gateway was created.
    CurrentVersion string
    (Available since v1.290.0) The current gateway version.
    DbClusterClass string
    The specifications of the PolarDB gateway.
    DbType string
    The database engine. Valid values: MySQL, PostgreSQL.
    Description string
    (Available since v1.290.0) The description of the PolarDB gateway.
    Endpoints List<Pulumi.AliCloud.PolarDB.Inputs.GatewayEndpoint>
    (Available since v1.290.0) The endpoints of the PolarDB gateway. Each item contains the following attributes:
    ExpireTime string
    (Available since v1.290.0) The expiration time of the PolarDB gateway.
    Expired bool
    (Available since v1.290.0) Indicates whether the PolarDB gateway has expired.
    LatestVersion string
    (Available since v1.290.0) The latest available gateway version.
    ModifyTime string
    (Available since v1.290.0) The time when the PolarDB gateway was last modified.
    PayType string
    The billing method. Valid values: Postpaid, Prepaid.
    Period string
    The unit of the subscription duration. Valid values: Month, Year. This argument is required when payType is Prepaid.
    RegionId string
    (Available since v1.290.0) The region ID of the PolarDB gateway.
    RunningVersion string
    (Available since v1.290.0) The running gateway version.
    SecurityGroupId string
    The ID of the security group.
    SecurityIpArrays List<Pulumi.AliCloud.PolarDB.Inputs.GatewaySecurityIpArray>
    (Available since v1.290.0) The IP whitelist groups of the PolarDB gateway. Each item contains the following attributes:
    Status string
    (Available since v1.290.0) The status of the PolarDB gateway.
    UsedTime int
    The subscription duration. Valid values are 1 to 9 when period is Month, and 1 to 3 when period is Year. This argument is required when payType is Prepaid.
    VpcId string
    The ID of the VPC.
    VswitchId string
    The ID of the vSwitch.
    ZoneId string
    The zone ID of the PolarDB gateway.
    AutoRenew bool
    Whether to enable automatic renewal for a subscription gateway. Default value: false.
    CreateTime string
    (Available since v1.290.0) The time when the PolarDB gateway was created.
    CurrentVersion string
    (Available since v1.290.0) The current gateway version.
    DbClusterClass string
    The specifications of the PolarDB gateway.
    DbType string
    The database engine. Valid values: MySQL, PostgreSQL.
    Description string
    (Available since v1.290.0) The description of the PolarDB gateway.
    Endpoints []GatewayEndpointArgs
    (Available since v1.290.0) The endpoints of the PolarDB gateway. Each item contains the following attributes:
    ExpireTime string
    (Available since v1.290.0) The expiration time of the PolarDB gateway.
    Expired bool
    (Available since v1.290.0) Indicates whether the PolarDB gateway has expired.
    LatestVersion string
    (Available since v1.290.0) The latest available gateway version.
    ModifyTime string
    (Available since v1.290.0) The time when the PolarDB gateway was last modified.
    PayType string
    The billing method. Valid values: Postpaid, Prepaid.
    Period string
    The unit of the subscription duration. Valid values: Month, Year. This argument is required when payType is Prepaid.
    RegionId string
    (Available since v1.290.0) The region ID of the PolarDB gateway.
    RunningVersion string
    (Available since v1.290.0) The running gateway version.
    SecurityGroupId string
    The ID of the security group.
    SecurityIpArrays []GatewaySecurityIpArrayArgs
    (Available since v1.290.0) The IP whitelist groups of the PolarDB gateway. Each item contains the following attributes:
    Status string
    (Available since v1.290.0) The status of the PolarDB gateway.
    UsedTime int
    The subscription duration. Valid values are 1 to 9 when period is Month, and 1 to 3 when period is Year. This argument is required when payType is Prepaid.
    VpcId string
    The ID of the VPC.
    VswitchId string
    The ID of the vSwitch.
    ZoneId string
    The zone ID of the PolarDB gateway.
    auto_renew bool
    Whether to enable automatic renewal for a subscription gateway. Default value: false.
    create_time string
    (Available since v1.290.0) The time when the PolarDB gateway was created.
    current_version string
    (Available since v1.290.0) The current gateway version.
    db_cluster_class string
    The specifications of the PolarDB gateway.
    db_type string
    The database engine. Valid values: MySQL, PostgreSQL.
    description string
    (Available since v1.290.0) The description of the PolarDB gateway.
    endpoints list(object)
    (Available since v1.290.0) The endpoints of the PolarDB gateway. Each item contains the following attributes:
    expire_time string
    (Available since v1.290.0) The expiration time of the PolarDB gateway.
    expired bool
    (Available since v1.290.0) Indicates whether the PolarDB gateway has expired.
    latest_version string
    (Available since v1.290.0) The latest available gateway version.
    modify_time string
    (Available since v1.290.0) The time when the PolarDB gateway was last modified.
    pay_type string
    The billing method. Valid values: Postpaid, Prepaid.
    period string
    The unit of the subscription duration. Valid values: Month, Year. This argument is required when payType is Prepaid.
    region_id string
    (Available since v1.290.0) The region ID of the PolarDB gateway.
    running_version string
    (Available since v1.290.0) The running gateway version.
    security_group_id string
    The ID of the security group.
    security_ip_arrays list(object)
    (Available since v1.290.0) The IP whitelist groups of the PolarDB gateway. Each item contains the following attributes:
    status string
    (Available since v1.290.0) The status of the PolarDB gateway.
    used_time number
    The subscription duration. Valid values are 1 to 9 when period is Month, and 1 to 3 when period is Year. This argument is required when payType is Prepaid.
    vpc_id string
    The ID of the VPC.
    vswitch_id string
    The ID of the vSwitch.
    zone_id string
    The zone ID of the PolarDB gateway.
    autoRenew Boolean
    Whether to enable automatic renewal for a subscription gateway. Default value: false.
    createTime String
    (Available since v1.290.0) The time when the PolarDB gateway was created.
    currentVersion String
    (Available since v1.290.0) The current gateway version.
    dbClusterClass String
    The specifications of the PolarDB gateway.
    dbType String
    The database engine. Valid values: MySQL, PostgreSQL.
    description String
    (Available since v1.290.0) The description of the PolarDB gateway.
    endpoints List<GatewayEndpoint>
    (Available since v1.290.0) The endpoints of the PolarDB gateway. Each item contains the following attributes:
    expireTime String
    (Available since v1.290.0) The expiration time of the PolarDB gateway.
    expired Boolean
    (Available since v1.290.0) Indicates whether the PolarDB gateway has expired.
    latestVersion String
    (Available since v1.290.0) The latest available gateway version.
    modifyTime String
    (Available since v1.290.0) The time when the PolarDB gateway was last modified.
    payType String
    The billing method. Valid values: Postpaid, Prepaid.
    period String
    The unit of the subscription duration. Valid values: Month, Year. This argument is required when payType is Prepaid.
    regionId String
    (Available since v1.290.0) The region ID of the PolarDB gateway.
    runningVersion String
    (Available since v1.290.0) The running gateway version.
    securityGroupId String
    The ID of the security group.
    securityIpArrays List<GatewaySecurityIpArray>
    (Available since v1.290.0) The IP whitelist groups of the PolarDB gateway. Each item contains the following attributes:
    status String
    (Available since v1.290.0) The status of the PolarDB gateway.
    usedTime Integer
    The subscription duration. Valid values are 1 to 9 when period is Month, and 1 to 3 when period is Year. This argument is required when payType is Prepaid.
    vpcId String
    The ID of the VPC.
    vswitchId String
    The ID of the vSwitch.
    zoneId String
    The zone ID of the PolarDB gateway.
    autoRenew boolean
    Whether to enable automatic renewal for a subscription gateway. Default value: false.
    createTime string
    (Available since v1.290.0) The time when the PolarDB gateway was created.
    currentVersion string
    (Available since v1.290.0) The current gateway version.
    dbClusterClass string
    The specifications of the PolarDB gateway.
    dbType string
    The database engine. Valid values: MySQL, PostgreSQL.
    description string
    (Available since v1.290.0) The description of the PolarDB gateway.
    endpoints GatewayEndpoint[]
    (Available since v1.290.0) The endpoints of the PolarDB gateway. Each item contains the following attributes:
    expireTime string
    (Available since v1.290.0) The expiration time of the PolarDB gateway.
    expired boolean
    (Available since v1.290.0) Indicates whether the PolarDB gateway has expired.
    latestVersion string
    (Available since v1.290.0) The latest available gateway version.
    modifyTime string
    (Available since v1.290.0) The time when the PolarDB gateway was last modified.
    payType string
    The billing method. Valid values: Postpaid, Prepaid.
    period string
    The unit of the subscription duration. Valid values: Month, Year. This argument is required when payType is Prepaid.
    regionId string
    (Available since v1.290.0) The region ID of the PolarDB gateway.
    runningVersion string
    (Available since v1.290.0) The running gateway version.
    securityGroupId string
    The ID of the security group.
    securityIpArrays GatewaySecurityIpArray[]
    (Available since v1.290.0) The IP whitelist groups of the PolarDB gateway. Each item contains the following attributes:
    status string
    (Available since v1.290.0) The status of the PolarDB gateway.
    usedTime number
    The subscription duration. Valid values are 1 to 9 when period is Month, and 1 to 3 when period is Year. This argument is required when payType is Prepaid.
    vpcId string
    The ID of the VPC.
    vswitchId string
    The ID of the vSwitch.
    zoneId string
    The zone ID of the PolarDB gateway.
    auto_renew bool
    Whether to enable automatic renewal for a subscription gateway. Default value: false.
    create_time str
    (Available since v1.290.0) The time when the PolarDB gateway was created.
    current_version str
    (Available since v1.290.0) The current gateway version.
    db_cluster_class str
    The specifications of the PolarDB gateway.
    db_type str
    The database engine. Valid values: MySQL, PostgreSQL.
    description str
    (Available since v1.290.0) The description of the PolarDB gateway.
    endpoints Sequence[GatewayEndpointArgs]
    (Available since v1.290.0) The endpoints of the PolarDB gateway. Each item contains the following attributes:
    expire_time str
    (Available since v1.290.0) The expiration time of the PolarDB gateway.
    expired bool
    (Available since v1.290.0) Indicates whether the PolarDB gateway has expired.
    latest_version str
    (Available since v1.290.0) The latest available gateway version.
    modify_time str
    (Available since v1.290.0) The time when the PolarDB gateway was last modified.
    pay_type str
    The billing method. Valid values: Postpaid, Prepaid.
    period str
    The unit of the subscription duration. Valid values: Month, Year. This argument is required when payType is Prepaid.
    region_id str
    (Available since v1.290.0) The region ID of the PolarDB gateway.
    running_version str
    (Available since v1.290.0) The running gateway version.
    security_group_id str
    The ID of the security group.
    security_ip_arrays Sequence[GatewaySecurityIpArrayArgs]
    (Available since v1.290.0) The IP whitelist groups of the PolarDB gateway. Each item contains the following attributes:
    status str
    (Available since v1.290.0) The status of the PolarDB gateway.
    used_time int
    The subscription duration. Valid values are 1 to 9 when period is Month, and 1 to 3 when period is Year. This argument is required when payType is Prepaid.
    vpc_id str
    The ID of the VPC.
    vswitch_id str
    The ID of the vSwitch.
    zone_id str
    The zone ID of the PolarDB gateway.
    autoRenew Boolean
    Whether to enable automatic renewal for a subscription gateway. Default value: false.
    createTime String
    (Available since v1.290.0) The time when the PolarDB gateway was created.
    currentVersion String
    (Available since v1.290.0) The current gateway version.
    dbClusterClass String
    The specifications of the PolarDB gateway.
    dbType String
    The database engine. Valid values: MySQL, PostgreSQL.
    description String
    (Available since v1.290.0) The description of the PolarDB gateway.
    endpoints List<Property Map>
    (Available since v1.290.0) The endpoints of the PolarDB gateway. Each item contains the following attributes:
    expireTime String
    (Available since v1.290.0) The expiration time of the PolarDB gateway.
    expired Boolean
    (Available since v1.290.0) Indicates whether the PolarDB gateway has expired.
    latestVersion String
    (Available since v1.290.0) The latest available gateway version.
    modifyTime String
    (Available since v1.290.0) The time when the PolarDB gateway was last modified.
    payType String
    The billing method. Valid values: Postpaid, Prepaid.
    period String
    The unit of the subscription duration. Valid values: Month, Year. This argument is required when payType is Prepaid.
    regionId String
    (Available since v1.290.0) The region ID of the PolarDB gateway.
    runningVersion String
    (Available since v1.290.0) The running gateway version.
    securityGroupId String
    The ID of the security group.
    securityIpArrays List<Property Map>
    (Available since v1.290.0) The IP whitelist groups of the PolarDB gateway. Each item contains the following attributes:
    status String
    (Available since v1.290.0) The status of the PolarDB gateway.
    usedTime Number
    The subscription duration. Valid values are 1 to 9 when period is Month, and 1 to 3 when period is Year. This argument is required when payType is Prepaid.
    vpcId String
    The ID of the VPC.
    vswitchId String
    The ID of the vSwitch.
    zoneId String
    The zone ID of the PolarDB gateway.

    Supporting Types

    GatewayEndpoint, GatewayEndpointArgs

    Address string
    The endpoint address.
    EndpointId string
    The endpoint ID.
    GatewayId string
    The gateway ID.
    NetworkType string
    The network type. Valid values: Private, Public.
    Port int
    The endpoint port.
    TunnelId string
    The tunnel ID.
    VpcId string
    The ID of the VPC.
    Address string
    The endpoint address.
    EndpointId string
    The endpoint ID.
    GatewayId string
    The gateway ID.
    NetworkType string
    The network type. Valid values: Private, Public.
    Port int
    The endpoint port.
    TunnelId string
    The tunnel ID.
    VpcId string
    The ID of the VPC.
    address string
    The endpoint address.
    endpoint_id string
    The endpoint ID.
    gateway_id string
    The gateway ID.
    network_type string
    The network type. Valid values: Private, Public.
    port number
    The endpoint port.
    tunnel_id string
    The tunnel ID.
    vpc_id string
    The ID of the VPC.
    address String
    The endpoint address.
    endpointId String
    The endpoint ID.
    gatewayId String
    The gateway ID.
    networkType String
    The network type. Valid values: Private, Public.
    port Integer
    The endpoint port.
    tunnelId String
    The tunnel ID.
    vpcId String
    The ID of the VPC.
    address string
    The endpoint address.
    endpointId string
    The endpoint ID.
    gatewayId string
    The gateway ID.
    networkType string
    The network type. Valid values: Private, Public.
    port number
    The endpoint port.
    tunnelId string
    The tunnel ID.
    vpcId string
    The ID of the VPC.
    address str
    The endpoint address.
    endpoint_id str
    The endpoint ID.
    gateway_id str
    The gateway ID.
    network_type str
    The network type. Valid values: Private, Public.
    port int
    The endpoint port.
    tunnel_id str
    The tunnel ID.
    vpc_id str
    The ID of the VPC.
    address String
    The endpoint address.
    endpointId String
    The endpoint ID.
    gatewayId String
    The gateway ID.
    networkType String
    The network type. Valid values: Private, Public.
    port Number
    The endpoint port.
    tunnelId String
    The tunnel ID.
    vpcId String
    The ID of the VPC.

    GatewaySecurityIpArray, GatewaySecurityIpArrayArgs

    IpList string
    The IP addresses in the whitelist group.
    Name string
    The whitelist group name.
    IpList string
    The IP addresses in the whitelist group.
    Name string
    The whitelist group name.
    ip_list string
    The IP addresses in the whitelist group.
    name string
    The whitelist group name.
    ipList String
    The IP addresses in the whitelist group.
    name String
    The whitelist group name.
    ipList string
    The IP addresses in the whitelist group.
    name string
    The whitelist group name.
    ip_list str
    The IP addresses in the whitelist group.
    name str
    The whitelist group name.
    ipList String
    The IP addresses in the whitelist group.
    name String
    The whitelist group name.

    Import

    PolarDB Gateway can be imported using the ID, e.g.

    $ pulumi import alicloud:polardb/gateway:Gateway example gw-abc12345678
    

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

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo alicloud logo
    Viewing docs for Alibaba Cloud v3.108.0
    published on Thursday, Sep 17, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial