Alibaba Cloud

v3.28.0 published on Tuesday, Aug 16, 2022 by Pulumi

CustomerGateway

Import

VPN customer gateway can be imported using the id, e.g.

 $ pulumi import alicloud:vpn/customerGateway:CustomerGateway example cgw-abc123456

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var foo = new AliCloud.Vpn.CustomerGateway("foo", new AliCloud.Vpn.CustomerGatewayArgs
        {
            Description = "vpnCgwDescriptionExample",
            IpAddress = "43.104.22.228",
        });
    }

}
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := vpn.NewCustomerGateway(ctx, "foo", &vpn.CustomerGatewayArgs{
			Description: pulumi.String("vpnCgwDescriptionExample"),
			IpAddress:   pulumi.String("43.104.22.228"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.vpn.CustomerGateway;
import com.pulumi.alicloud.vpn.CustomerGatewayArgs;
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 foo = new CustomerGateway("foo", CustomerGatewayArgs.builder()        
            .description("vpnCgwDescriptionExample")
            .ipAddress("43.104.22.228")
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

foo = alicloud.vpn.CustomerGateway("foo",
    description="vpnCgwDescriptionExample",
    ip_address="43.104.22.228")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const foo = new alicloud.vpn.CustomerGateway("foo", {
    description: "vpnCgwDescriptionExample",
    ipAddress: "43.104.22.228",
});
resources:
  foo:
    type: alicloud:vpn:CustomerGateway
    properties:
      description: vpnCgwDescriptionExample
      ipAddress: 43.104.22.228

Create a CustomerGateway Resource

new CustomerGateway(name: string, args: CustomerGatewayArgs, opts?: CustomResourceOptions);
@overload
def CustomerGateway(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    asn: Optional[str] = None,
                    description: Optional[str] = None,
                    ip_address: Optional[str] = None,
                    name: Optional[str] = None)
@overload
def CustomerGateway(resource_name: str,
                    args: CustomerGatewayArgs,
                    opts: Optional[ResourceOptions] = None)
func NewCustomerGateway(ctx *Context, name string, args CustomerGatewayArgs, opts ...ResourceOption) (*CustomerGateway, error)
public CustomerGateway(string name, CustomerGatewayArgs args, CustomResourceOptions? opts = null)
public CustomerGateway(String name, CustomerGatewayArgs args)
public CustomerGateway(String name, CustomerGatewayArgs args, CustomResourceOptions options)
type: alicloud:vpn:CustomerGateway
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args CustomerGatewayArgs
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 CustomerGatewayArgs
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 CustomerGatewayArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args CustomerGatewayArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args CustomerGatewayArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

CustomerGateway Resource Properties

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

Inputs

The CustomerGateway resource accepts the following input properties:

IpAddress string

The IP address of the customer gateway.

Asn string

The autonomous system number of the gateway device in the data center. The asn is a 4-byte number. You can enter the number in two segments and separate the first 16 bits from the following 16 bits with a period (.). Enter the number in each segment in the decimal format.

Description string

The description of the VPN customer gateway instance.

Name string

The name of the VPN customer gateway. Defaults to null.

IpAddress string

The IP address of the customer gateway.

Asn string

The autonomous system number of the gateway device in the data center. The asn is a 4-byte number. You can enter the number in two segments and separate the first 16 bits from the following 16 bits with a period (.). Enter the number in each segment in the decimal format.

Description string

The description of the VPN customer gateway instance.

Name string

The name of the VPN customer gateway. Defaults to null.

ipAddress String

The IP address of the customer gateway.

asn String

The autonomous system number of the gateway device in the data center. The asn is a 4-byte number. You can enter the number in two segments and separate the first 16 bits from the following 16 bits with a period (.). Enter the number in each segment in the decimal format.

description String

The description of the VPN customer gateway instance.

name String

The name of the VPN customer gateway. Defaults to null.

ipAddress string

The IP address of the customer gateway.

asn string

The autonomous system number of the gateway device in the data center. The asn is a 4-byte number. You can enter the number in two segments and separate the first 16 bits from the following 16 bits with a period (.). Enter the number in each segment in the decimal format.

description string

The description of the VPN customer gateway instance.

name string

The name of the VPN customer gateway. Defaults to null.

ip_address str

The IP address of the customer gateway.

asn str

The autonomous system number of the gateway device in the data center. The asn is a 4-byte number. You can enter the number in two segments and separate the first 16 bits from the following 16 bits with a period (.). Enter the number in each segment in the decimal format.

description str

The description of the VPN customer gateway instance.

name str

The name of the VPN customer gateway. Defaults to null.

ipAddress String

The IP address of the customer gateway.

asn String

The autonomous system number of the gateway device in the data center. The asn is a 4-byte number. You can enter the number in two segments and separate the first 16 bits from the following 16 bits with a period (.). Enter the number in each segment in the decimal format.

description String

The description of the VPN customer gateway instance.

name String

The name of the VPN customer gateway. Defaults to null.

Outputs

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

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up an Existing CustomerGateway Resource

Get an existing CustomerGateway 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?: CustomerGatewayState, opts?: CustomResourceOptions): CustomerGateway
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        asn: Optional[str] = None,
        description: Optional[str] = None,
        ip_address: Optional[str] = None,
        name: Optional[str] = None) -> CustomerGateway
func GetCustomerGateway(ctx *Context, name string, id IDInput, state *CustomerGatewayState, opts ...ResourceOption) (*CustomerGateway, error)
public static CustomerGateway Get(string name, Input<string> id, CustomerGatewayState? state, CustomResourceOptions? opts = null)
public static CustomerGateway get(String name, Output<String> id, CustomerGatewayState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
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:
Asn string

The autonomous system number of the gateway device in the data center. The asn is a 4-byte number. You can enter the number in two segments and separate the first 16 bits from the following 16 bits with a period (.). Enter the number in each segment in the decimal format.

Description string

The description of the VPN customer gateway instance.

IpAddress string

The IP address of the customer gateway.

Name string

The name of the VPN customer gateway. Defaults to null.

Asn string

The autonomous system number of the gateway device in the data center. The asn is a 4-byte number. You can enter the number in two segments and separate the first 16 bits from the following 16 bits with a period (.). Enter the number in each segment in the decimal format.

Description string

The description of the VPN customer gateway instance.

IpAddress string

The IP address of the customer gateway.

Name string

The name of the VPN customer gateway. Defaults to null.

asn String

The autonomous system number of the gateway device in the data center. The asn is a 4-byte number. You can enter the number in two segments and separate the first 16 bits from the following 16 bits with a period (.). Enter the number in each segment in the decimal format.

description String

The description of the VPN customer gateway instance.

ipAddress String

The IP address of the customer gateway.

name String

The name of the VPN customer gateway. Defaults to null.

asn string

The autonomous system number of the gateway device in the data center. The asn is a 4-byte number. You can enter the number in two segments and separate the first 16 bits from the following 16 bits with a period (.). Enter the number in each segment in the decimal format.

description string

The description of the VPN customer gateway instance.

ipAddress string

The IP address of the customer gateway.

name string

The name of the VPN customer gateway. Defaults to null.

asn str

The autonomous system number of the gateway device in the data center. The asn is a 4-byte number. You can enter the number in two segments and separate the first 16 bits from the following 16 bits with a period (.). Enter the number in each segment in the decimal format.

description str

The description of the VPN customer gateway instance.

ip_address str

The IP address of the customer gateway.

name str

The name of the VPN customer gateway. Defaults to null.

asn String

The autonomous system number of the gateway device in the data center. The asn is a 4-byte number. You can enter the number in two segments and separate the first 16 bits from the following 16 bits with a period (.). Enter the number in each segment in the decimal format.

description String

The description of the VPN customer gateway instance.

ipAddress String

The IP address of the customer gateway.

name String

The name of the VPN customer gateway. Defaults to null.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.