alicloud logo
Alibaba Cloud v3.34.0, Mar 17 23

alicloud.apigateway.VpcAccess

Import

Api gateway app can be imported using the id, e.g.

 $ pulumi import alicloud:apigateway/vpcAccess:VpcAccess example "APiGatewayVpc:vpc-aswcj19ajsz:i-ajdjfsdlf:8080"

Example Usage

Basic Usage

using System.Collections.Generic;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var foo = new AliCloud.ApiGateway.VpcAccess("foo", new()
    {
        InstanceId = "i-kai2ks92kzkw92ka",
        Port = 8080,
        VpcId = "vpc-awkcj192ka9zalz",
    });

});
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := apigateway.NewVpcAccess(ctx, "foo", &apigateway.VpcAccessArgs{
			InstanceId: pulumi.String("i-kai2ks92kzkw92ka"),
			Port:       pulumi.Int(8080),
			VpcId:      pulumi.String("vpc-awkcj192ka9zalz"),
		})
		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.apigateway.VpcAccess;
import com.pulumi.alicloud.apigateway.VpcAccessArgs;
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 VpcAccess("foo", VpcAccessArgs.builder()        
            .instanceId("i-kai2ks92kzkw92ka")
            .port(8080)
            .vpcId("vpc-awkcj192ka9zalz")
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

foo = alicloud.apigateway.VpcAccess("foo",
    instance_id="i-kai2ks92kzkw92ka",
    port=8080,
    vpc_id="vpc-awkcj192ka9zalz")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const foo = new alicloud.apigateway.VpcAccess("foo", {
    instanceId: "i-kai2ks92kzkw92ka",
    port: 8080,
    vpcId: "vpc-awkcj192ka9zalz",
});
resources:
  foo:
    type: alicloud:apigateway:VpcAccess
    properties:
      instanceId: i-kai2ks92kzkw92ka
      port: 8080
      vpcId: vpc-awkcj192ka9zalz

Create VpcAccess Resource

new VpcAccess(name: string, args: VpcAccessArgs, opts?: CustomResourceOptions);
@overload
def VpcAccess(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              instance_id: Optional[str] = None,
              name: Optional[str] = None,
              port: Optional[int] = None,
              vpc_id: Optional[str] = None)
@overload
def VpcAccess(resource_name: str,
              args: VpcAccessArgs,
              opts: Optional[ResourceOptions] = None)
func NewVpcAccess(ctx *Context, name string, args VpcAccessArgs, opts ...ResourceOption) (*VpcAccess, error)
public VpcAccess(string name, VpcAccessArgs args, CustomResourceOptions? opts = null)
public VpcAccess(String name, VpcAccessArgs args)
public VpcAccess(String name, VpcAccessArgs args, CustomResourceOptions options)
type: alicloud:apigateway:VpcAccess
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

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

VpcAccess 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 VpcAccess resource accepts the following input properties:

InstanceId string

ID of the instance in VPC (ECS/Server Load Balance).

Port int

ID of the port corresponding to the instance.

VpcId string

The vpc id of the vpc authorization.

Name string

The name of the vpc authorization.

InstanceId string

ID of the instance in VPC (ECS/Server Load Balance).

Port int

ID of the port corresponding to the instance.

VpcId string

The vpc id of the vpc authorization.

Name string

The name of the vpc authorization.

instanceId String

ID of the instance in VPC (ECS/Server Load Balance).

port Integer

ID of the port corresponding to the instance.

vpcId String

The vpc id of the vpc authorization.

name String

The name of the vpc authorization.

instanceId string

ID of the instance in VPC (ECS/Server Load Balance).

port number

ID of the port corresponding to the instance.

vpcId string

The vpc id of the vpc authorization.

name string

The name of the vpc authorization.

instance_id str

ID of the instance in VPC (ECS/Server Load Balance).

port int

ID of the port corresponding to the instance.

vpc_id str

The vpc id of the vpc authorization.

name str

The name of the vpc authorization.

instanceId String

ID of the instance in VPC (ECS/Server Load Balance).

port Number

ID of the port corresponding to the instance.

vpcId String

The vpc id of the vpc authorization.

name String

The name of the vpc authorization.

Outputs

All input properties are implicitly available as output properties. Additionally, the VpcAccess 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 VpcAccess Resource

Get an existing VpcAccess 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?: VpcAccessState, opts?: CustomResourceOptions): VpcAccess
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        instance_id: Optional[str] = None,
        name: Optional[str] = None,
        port: Optional[int] = None,
        vpc_id: Optional[str] = None) -> VpcAccess
func GetVpcAccess(ctx *Context, name string, id IDInput, state *VpcAccessState, opts ...ResourceOption) (*VpcAccess, error)
public static VpcAccess Get(string name, Input<string> id, VpcAccessState? state, CustomResourceOptions? opts = null)
public static VpcAccess get(String name, Output<String> id, VpcAccessState 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:
InstanceId string

ID of the instance in VPC (ECS/Server Load Balance).

Name string

The name of the vpc authorization.

Port int

ID of the port corresponding to the instance.

VpcId string

The vpc id of the vpc authorization.

InstanceId string

ID of the instance in VPC (ECS/Server Load Balance).

Name string

The name of the vpc authorization.

Port int

ID of the port corresponding to the instance.

VpcId string

The vpc id of the vpc authorization.

instanceId String

ID of the instance in VPC (ECS/Server Load Balance).

name String

The name of the vpc authorization.

port Integer

ID of the port corresponding to the instance.

vpcId String

The vpc id of the vpc authorization.

instanceId string

ID of the instance in VPC (ECS/Server Load Balance).

name string

The name of the vpc authorization.

port number

ID of the port corresponding to the instance.

vpcId string

The vpc id of the vpc authorization.

instance_id str

ID of the instance in VPC (ECS/Server Load Balance).

name str

The name of the vpc authorization.

port int

ID of the port corresponding to the instance.

vpc_id str

The vpc id of the vpc authorization.

instanceId String

ID of the instance in VPC (ECS/Server Load Balance).

name String

The name of the vpc authorization.

port Number

ID of the port corresponding to the instance.

vpcId String

The vpc id of the vpc authorization.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.