volcengine.direct_connect.Gateway
Explore with Pulumi AI
Provides a resource to manage direct connect gateway
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var foo = new Volcengine.Direct_connect.Gateway("foo", new()
{
Description = "tf-test",
DirectConnectGatewayName = "tf-test-gateway",
Tags = new[]
{
new Volcengine.Direct_connect.Inputs.GatewayTagArgs
{
Key = "k1",
Value = "v1",
},
},
});
});
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/direct_connect"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := direct_connect.NewGateway(ctx, "foo", &direct_connect.GatewayArgs{
Description: pulumi.String("tf-test"),
DirectConnectGatewayName: pulumi.String("tf-test-gateway"),
Tags: direct_connect.GatewayTagArray{
&direct_connect.GatewayTagArgs{
Key: pulumi.String("k1"),
Value: pulumi.String("v1"),
},
},
})
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.volcengine.direct_connect.Gateway;
import com.pulumi.volcengine.direct_connect.GatewayArgs;
import com.pulumi.volcengine.direct_connect.inputs.GatewayTagArgs;
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 Gateway("foo", GatewayArgs.builder()
.description("tf-test")
.directConnectGatewayName("tf-test-gateway")
.tags(GatewayTagArgs.builder()
.key("k1")
.value("v1")
.build())
.build());
}
}
import pulumi
import pulumi_volcengine as volcengine
foo = volcengine.direct_connect.Gateway("foo",
description="tf-test",
direct_connect_gateway_name="tf-test-gateway",
tags=[volcengine.direct_connect.GatewayTagArgs(
key="k1",
value="v1",
)])
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";
const foo = new volcengine.direct_connect.Gateway("foo", {
description: "tf-test",
directConnectGatewayName: "tf-test-gateway",
tags: [{
key: "k1",
value: "v1",
}],
});
resources:
foo:
type: volcengine:direct_connect:Gateway
properties:
description: tf-test
directConnectGatewayName: tf-test-gateway
tags:
- key: k1
value: v1
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: Optional[GatewayArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Gateway(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
direct_connect_gateway_name: Optional[str] = None,
tags: Optional[Sequence[GatewayTagArgs]] = None)
func NewGateway(ctx *Context, name string, args *GatewayArgs, opts ...ResourceOption) (*Gateway, error)
public Gateway(string name, GatewayArgs? args = null, CustomResourceOptions? opts = null)
public Gateway(String name, GatewayArgs args)
public Gateway(String name, GatewayArgs args, CustomResourceOptions options)
type: volcengine:direct_connect:Gateway
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
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 gatewayResource = new Volcengine.Direct_connect.Gateway("gatewayResource", new()
{
Description = "string",
DirectConnectGatewayName = "string",
Tags = new[]
{
new Volcengine.Direct_connect.Inputs.GatewayTagArgs
{
Key = "string",
Value = "string",
},
},
});
example, err := direct_connect.NewGateway(ctx, "gatewayResource", &direct_connect.GatewayArgs{
Description: pulumi.String("string"),
DirectConnectGatewayName: pulumi.String("string"),
Tags: direct_connect.GatewayTagArray{
&direct_connect.GatewayTagArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
})
var gatewayResource = new Gateway("gatewayResource", GatewayArgs.builder()
.description("string")
.directConnectGatewayName("string")
.tags(GatewayTagArgs.builder()
.key("string")
.value("string")
.build())
.build());
gateway_resource = volcengine.direct_connect.Gateway("gatewayResource",
description="string",
direct_connect_gateway_name="string",
tags=[{
"key": "string",
"value": "string",
}])
const gatewayResource = new volcengine.direct_connect.Gateway("gatewayResource", {
description: "string",
directConnectGatewayName: "string",
tags: [{
key: "string",
value: "string",
}],
});
type: volcengine:direct_connect:Gateway
properties:
description: string
directConnectGatewayName: string
tags:
- key: string
value: 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:
- Description string
- The description of direct connect gateway.
- Direct
Connect stringGateway Name - The name of direct connect gateway.
- List<Gateway
Tag> - The direct connect gateway tags.
- Description string
- The description of direct connect gateway.
- Direct
Connect stringGateway Name - The name of direct connect gateway.
- []Gateway
Tag Args - The direct connect gateway tags.
- description String
- The description of direct connect gateway.
- direct
Connect StringGateway Name - The name of direct connect gateway.
- List<Gateway
Tag> - The direct connect gateway tags.
- description string
- The description of direct connect gateway.
- direct
Connect stringGateway Name - The name of direct connect gateway.
- Gateway
Tag[] - The direct connect gateway tags.
- description str
- The description of direct connect gateway.
- direct_
connect_ strgateway_ name - The name of direct connect gateway.
- Sequence[Gateway
Tag Args] - The direct connect gateway tags.
- description String
- The description of direct connect gateway.
- direct
Connect StringGateway Name - The name of direct connect gateway.
- List<Property Map>
- The direct connect gateway tags.
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.
- 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 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,
description: Optional[str] = None,
direct_connect_gateway_name: Optional[str] = None,
tags: Optional[Sequence[GatewayTagArgs]] = 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)
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.
- Description string
- The description of direct connect gateway.
- Direct
Connect stringGateway Name - The name of direct connect gateway.
- List<Gateway
Tag> - The direct connect gateway tags.
- Description string
- The description of direct connect gateway.
- Direct
Connect stringGateway Name - The name of direct connect gateway.
- []Gateway
Tag Args - The direct connect gateway tags.
- description String
- The description of direct connect gateway.
- direct
Connect StringGateway Name - The name of direct connect gateway.
- List<Gateway
Tag> - The direct connect gateway tags.
- description string
- The description of direct connect gateway.
- direct
Connect stringGateway Name - The name of direct connect gateway.
- Gateway
Tag[] - The direct connect gateway tags.
- description str
- The description of direct connect gateway.
- direct_
connect_ strgateway_ name - The name of direct connect gateway.
- Sequence[Gateway
Tag Args] - The direct connect gateway tags.
- description String
- The description of direct connect gateway.
- direct
Connect StringGateway Name - The name of direct connect gateway.
- List<Property Map>
- The direct connect gateway tags.
Supporting Types
GatewayTag, GatewayTagArgs
Import
DirectConnectGateway can be imported using the id, e.g.
$ pulumi import volcengine:direct_connect/gateway:Gateway default resource_id
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengine
Terraform Provider.