1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. databasegateway
  5. Gateway
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.databasegateway.Gateway

Explore with Pulumi AI

Provides a Database Gateway Gateway resource.

For information about Database Gateway Gateway and how to use it, see What is Gateway.

NOTE: Available in v1.135.0+.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const example = new alicloud.databasegateway.Gateway("example", {gatewayName: "example_value"});
Copy
import pulumi
import pulumi_alicloud as alicloud

example = alicloud.databasegateway.Gateway("example", gateway_name="example_value")
Copy
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/databasegateway"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := databasegateway.NewGateway(ctx, "example", &databasegateway.GatewayArgs{
			GatewayName: pulumi.String("example_value"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var example = new AliCloud.DatabaseGateway.Gateway("example", new()
    {
        GatewayName = "example_value",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.databasegateway.Gateway;
import com.pulumi.alicloud.databasegateway.GatewayArgs;
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 Gateway("example", GatewayArgs.builder()
            .gatewayName("example_value")
            .build());

    }
}
Copy
resources:
  example:
    type: alicloud:databasegateway:Gateway
    properties:
      gatewayName: example_value
Copy

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,
            gateway_name: Optional[str] = None,
            gateway_desc: 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:databasegateway:Gateway
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. GatewayArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. GatewayArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. GatewayArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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 examplegatewayResourceResourceFromDatabasegatewaygateway = new AliCloud.DatabaseGateway.Gateway("examplegatewayResourceResourceFromDatabasegatewaygateway", new()
{
    GatewayName = "string",
    GatewayDesc = "string",
});
Copy
example, err := databasegateway.NewGateway(ctx, "examplegatewayResourceResourceFromDatabasegatewaygateway", &databasegateway.GatewayArgs{
	GatewayName: pulumi.String("string"),
	GatewayDesc: pulumi.String("string"),
})
Copy
var examplegatewayResourceResourceFromDatabasegatewaygateway = new Gateway("examplegatewayResourceResourceFromDatabasegatewaygateway", GatewayArgs.builder()
    .gatewayName("string")
    .gatewayDesc("string")
    .build());
Copy
examplegateway_resource_resource_from_databasegatewaygateway = alicloud.databasegateway.Gateway("examplegatewayResourceResourceFromDatabasegatewaygateway",
    gateway_name="string",
    gateway_desc="string")
Copy
const examplegatewayResourceResourceFromDatabasegatewaygateway = new alicloud.databasegateway.Gateway("examplegatewayResourceResourceFromDatabasegatewaygateway", {
    gatewayName: "string",
    gatewayDesc: "string",
});
Copy
type: alicloud:databasegateway:Gateway
properties:
    gatewayDesc: string
    gatewayName: string
Copy

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:

GatewayName This property is required. string
The name of the Gateway.
GatewayDesc string
The description of Gateway.
GatewayName This property is required. string
The name of the Gateway.
GatewayDesc string
The description of Gateway.
gatewayName This property is required. String
The name of the Gateway.
gatewayDesc String
The description of Gateway.
gatewayName This property is required. string
The name of the Gateway.
gatewayDesc string
The description of Gateway.
gateway_name This property is required. str
The name of the Gateway.
gateway_desc str
The description of Gateway.
gatewayName This property is required. String
The name of the Gateway.
gatewayDesc String
The description of Gateway.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Status string
The status of gateway. Valid values: EXCEPTION, NEW, RUNNING, STOPPED.
Id string
The provider-assigned unique ID for this managed resource.
Status string
The status of gateway. Valid values: EXCEPTION, NEW, RUNNING, STOPPED.
id String
The provider-assigned unique ID for this managed resource.
status String
The status of gateway. Valid values: EXCEPTION, NEW, RUNNING, STOPPED.
id string
The provider-assigned unique ID for this managed resource.
status string
The status of gateway. Valid values: EXCEPTION, NEW, RUNNING, STOPPED.
id str
The provider-assigned unique ID for this managed resource.
status str
The status of gateway. Valid values: EXCEPTION, NEW, RUNNING, STOPPED.
id String
The provider-assigned unique ID for this managed resource.
status String
The status of gateway. Valid values: EXCEPTION, NEW, RUNNING, STOPPED.

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,
        gateway_desc: Optional[str] = None,
        gateway_name: Optional[str] = None,
        status: 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:databasegateway:Gateway    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
GatewayDesc string
The description of Gateway.
GatewayName string
The name of the Gateway.
Status string
The status of gateway. Valid values: EXCEPTION, NEW, RUNNING, STOPPED.
GatewayDesc string
The description of Gateway.
GatewayName string
The name of the Gateway.
Status string
The status of gateway. Valid values: EXCEPTION, NEW, RUNNING, STOPPED.
gatewayDesc String
The description of Gateway.
gatewayName String
The name of the Gateway.
status String
The status of gateway. Valid values: EXCEPTION, NEW, RUNNING, STOPPED.
gatewayDesc string
The description of Gateway.
gatewayName string
The name of the Gateway.
status string
The status of gateway. Valid values: EXCEPTION, NEW, RUNNING, STOPPED.
gateway_desc str
The description of Gateway.
gateway_name str
The name of the Gateway.
status str
The status of gateway. Valid values: EXCEPTION, NEW, RUNNING, STOPPED.
gatewayDesc String
The description of Gateway.
gatewayName String
The name of the Gateway.
status String
The status of gateway. Valid values: EXCEPTION, NEW, RUNNING, STOPPED.

Import

Database Gateway Gateway can be imported using the id, e.g.

$ pulumi import alicloud:databasegateway/gateway:Gateway example <id>
Copy

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.