eni

package
v0.1.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PkgVersion added in v0.0.5

func PkgVersion() (semver.Version, error)

PkgVersion uses reflection to determine the version of the current package. If a version cannot be determined, v1 will be assumed. The second return value is always nil.

Types

type Attachment

type Attachment struct {
	pulumi.CustomResourceState

	// ID of the ENI.
	EniId pulumi.StringOutput `pulumi:"eniId"`
	// ID of the instance which bind the ENI.
	InstanceId pulumi.StringOutput `pulumi:"instanceId"`
}

Provides a resource to detailed information of attached backend server to an ENI.

## Import

ENI attachment can be imported using the id, e.g.

```sh

$ pulumi import tencentcloud:Eni/attachment:Attachment tencentcloud_eni_attachment.foo eni-gtlvkjvz+ins-0h3a5new

```

func GetAttachment

func GetAttachment(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *AttachmentState, opts ...pulumi.ResourceOption) (*Attachment, error)

GetAttachment gets an existing Attachment resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewAttachment

func NewAttachment(ctx *pulumi.Context,
	name string, args *AttachmentArgs, opts ...pulumi.ResourceOption) (*Attachment, error)

NewAttachment registers a new resource with the given unique name, arguments, and options.

func (*Attachment) ElementType

func (*Attachment) ElementType() reflect.Type

func (*Attachment) ToAttachmentOutput

func (i *Attachment) ToAttachmentOutput() AttachmentOutput

func (*Attachment) ToAttachmentOutputWithContext

func (i *Attachment) ToAttachmentOutputWithContext(ctx context.Context) AttachmentOutput

type AttachmentArgs

type AttachmentArgs struct {
	// ID of the ENI.
	EniId pulumi.StringInput
	// ID of the instance which bind the ENI.
	InstanceId pulumi.StringInput
}

The set of arguments for constructing a Attachment resource.

func (AttachmentArgs) ElementType

func (AttachmentArgs) ElementType() reflect.Type

type AttachmentArray

type AttachmentArray []AttachmentInput

func (AttachmentArray) ElementType

func (AttachmentArray) ElementType() reflect.Type

func (AttachmentArray) ToAttachmentArrayOutput

func (i AttachmentArray) ToAttachmentArrayOutput() AttachmentArrayOutput

func (AttachmentArray) ToAttachmentArrayOutputWithContext

func (i AttachmentArray) ToAttachmentArrayOutputWithContext(ctx context.Context) AttachmentArrayOutput

type AttachmentArrayInput

type AttachmentArrayInput interface {
	pulumi.Input

	ToAttachmentArrayOutput() AttachmentArrayOutput
	ToAttachmentArrayOutputWithContext(context.Context) AttachmentArrayOutput
}

AttachmentArrayInput is an input type that accepts AttachmentArray and AttachmentArrayOutput values. You can construct a concrete instance of `AttachmentArrayInput` via:

AttachmentArray{ AttachmentArgs{...} }

type AttachmentArrayOutput

type AttachmentArrayOutput struct{ *pulumi.OutputState }

func (AttachmentArrayOutput) ElementType

func (AttachmentArrayOutput) ElementType() reflect.Type

func (AttachmentArrayOutput) Index

func (AttachmentArrayOutput) ToAttachmentArrayOutput

func (o AttachmentArrayOutput) ToAttachmentArrayOutput() AttachmentArrayOutput

func (AttachmentArrayOutput) ToAttachmentArrayOutputWithContext

func (o AttachmentArrayOutput) ToAttachmentArrayOutputWithContext(ctx context.Context) AttachmentArrayOutput

type AttachmentInput

type AttachmentInput interface {
	pulumi.Input

	ToAttachmentOutput() AttachmentOutput
	ToAttachmentOutputWithContext(ctx context.Context) AttachmentOutput
}

type AttachmentMap

type AttachmentMap map[string]AttachmentInput

func (AttachmentMap) ElementType

func (AttachmentMap) ElementType() reflect.Type

func (AttachmentMap) ToAttachmentMapOutput

func (i AttachmentMap) ToAttachmentMapOutput() AttachmentMapOutput

func (AttachmentMap) ToAttachmentMapOutputWithContext

func (i AttachmentMap) ToAttachmentMapOutputWithContext(ctx context.Context) AttachmentMapOutput

type AttachmentMapInput

type AttachmentMapInput interface {
	pulumi.Input

	ToAttachmentMapOutput() AttachmentMapOutput
	ToAttachmentMapOutputWithContext(context.Context) AttachmentMapOutput
}

AttachmentMapInput is an input type that accepts AttachmentMap and AttachmentMapOutput values. You can construct a concrete instance of `AttachmentMapInput` via:

AttachmentMap{ "key": AttachmentArgs{...} }

type AttachmentMapOutput

type AttachmentMapOutput struct{ *pulumi.OutputState }

func (AttachmentMapOutput) ElementType

func (AttachmentMapOutput) ElementType() reflect.Type

func (AttachmentMapOutput) MapIndex

func (AttachmentMapOutput) ToAttachmentMapOutput

func (o AttachmentMapOutput) ToAttachmentMapOutput() AttachmentMapOutput

func (AttachmentMapOutput) ToAttachmentMapOutputWithContext

func (o AttachmentMapOutput) ToAttachmentMapOutputWithContext(ctx context.Context) AttachmentMapOutput

type AttachmentOutput

type AttachmentOutput struct{ *pulumi.OutputState }

func (AttachmentOutput) ElementType

func (AttachmentOutput) ElementType() reflect.Type

func (AttachmentOutput) EniId

ID of the ENI.

func (AttachmentOutput) InstanceId

func (o AttachmentOutput) InstanceId() pulumi.StringOutput

ID of the instance which bind the ENI.

func (AttachmentOutput) ToAttachmentOutput

func (o AttachmentOutput) ToAttachmentOutput() AttachmentOutput

func (AttachmentOutput) ToAttachmentOutputWithContext

func (o AttachmentOutput) ToAttachmentOutputWithContext(ctx context.Context) AttachmentOutput

type AttachmentState

type AttachmentState struct {
	// ID of the ENI.
	EniId pulumi.StringPtrInput
	// ID of the instance which bind the ENI.
	InstanceId pulumi.StringPtrInput
}

func (AttachmentState) ElementType

func (AttachmentState) ElementType() reflect.Type

type Instance

type Instance struct {
	pulumi.CustomResourceState

	// Creation time of the ENI.
	CreateTime pulumi.StringOutput `pulumi:"createTime"`
	// Description of the IP, maximum length 25.
	Description pulumi.StringPtrOutput `pulumi:"description"`
	// The number of intranet IPv4s. When it is greater than 1, there is only one primary intranet IP. The others are auxiliary intranet IPs, which conflict with `ipv4s`.
	Ipv4Count pulumi.IntPtrOutput `pulumi:"ipv4Count"`
	// An information list of IPv4s. Each element contains the following attributes:
	Ipv4Infos InstanceIpv4InfoArrayOutput `pulumi:"ipv4Infos"`
	// Applying for intranet IPv4s collection, conflict with `ipv4Count`. When there are multiple ipv4s, can only be one primary IP, and the maximum length of the array is 30. Each element contains the following attributes:
	Ipv4s InstanceIpv4ArrayOutput `pulumi:"ipv4s"`
	// MAC address.
	Mac pulumi.StringOutput `pulumi:"mac"`
	// Name of the ENI, maximum length 60.
	Name pulumi.StringOutput `pulumi:"name"`
	// Indicates whether the IP is primary.
	Primary pulumi.BoolOutput `pulumi:"primary"`
	// A set of security group IDs.
	SecurityGroups pulumi.StringArrayOutput `pulumi:"securityGroups"`
	// State of the ENI.
	State pulumi.StringOutput `pulumi:"state"`
	// ID of the subnet within this vpc.
	SubnetId pulumi.StringOutput `pulumi:"subnetId"`
	// Tags of the ENI.
	Tags pulumi.MapOutput `pulumi:"tags"`
	// ID of the vpc.
	VpcId pulumi.StringOutput `pulumi:"vpcId"`
}

Provides a resource to create an ENI.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-tencentcloud/sdk/go/tencentcloud/Availability"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/tencentcloudstack/pulumi-tencentcloud/sdk/go/tencentcloud/Availability"
"github.com/tencentcloudstack/pulumi-tencentcloud/sdk/go/tencentcloud/Eni"
"github.com/tencentcloudstack/pulumi-tencentcloud/sdk/go/tencentcloud/Security"
"github.com/tencentcloudstack/pulumi-tencentcloud/sdk/go/tencentcloud/Subnet"
"github.com/tencentcloudstack/pulumi-tencentcloud/sdk/go/tencentcloud/Vpc"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		zones, err := Availability.GetZonesByProduct(ctx, &availability.GetZonesByProductArgs{
			Product: "vpc",
		}, nil)
		if err != nil {
			return err
		}
		vpc, err := Vpc.NewInstance(ctx, "vpc", &Vpc.InstanceArgs{
			CidrBlock: pulumi.String("10.0.0.0/16"),
		})
		if err != nil {
			return err
		}
		subnet, err := Subnet.NewInstance(ctx, "subnet", &Subnet.InstanceArgs{
			AvailabilityZone: pulumi.String(zones.Zones[0].Name),
			VpcId:            vpc.ID(),
			CidrBlock:        pulumi.String("10.0.0.0/16"),
			IsMulticast:      pulumi.Bool(false),
		})
		if err != nil {
			return err
		}
		example1, err := Security.NewGroup(ctx, "example1", &Security.GroupArgs{
			Description: pulumi.String("sg desc."),
			ProjectId:   pulumi.Int(0),
			Tags: pulumi.AnyMap{
				"example": pulumi.Any("test"),
			},
		})
		if err != nil {
			return err
		}
		example2, err := Security.NewGroup(ctx, "example2", &Security.GroupArgs{
			Description: pulumi.String("sg desc."),
			ProjectId:   pulumi.Int(0),
			Tags: pulumi.AnyMap{
				"example": pulumi.Any("test"),
			},
		})
		if err != nil {
			return err
		}
		_, err = Eni.NewInstance(ctx, "example", &Eni.InstanceArgs{
			VpcId:       vpc.ID(),
			SubnetId:    subnet.ID(),
			Description: pulumi.String("eni desc."),
			Ipv4Count:   pulumi.Int(1),
			SecurityGroups: pulumi.StringArray{
				example1.ID(),
				example2.ID(),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

ENI can be imported using the id, e.g.

```sh

$ pulumi import tencentcloud:Eni/instance:Instance tencentcloud_eni.foo eni-qka182br

```

func GetInstance

func GetInstance(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *InstanceState, opts ...pulumi.ResourceOption) (*Instance, error)

GetInstance gets an existing Instance resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewInstance

func NewInstance(ctx *pulumi.Context,
	name string, args *InstanceArgs, opts ...pulumi.ResourceOption) (*Instance, error)

NewInstance registers a new resource with the given unique name, arguments, and options.

func (*Instance) ElementType

func (*Instance) ElementType() reflect.Type

func (*Instance) ToInstanceOutput

func (i *Instance) ToInstanceOutput() InstanceOutput

func (*Instance) ToInstanceOutputWithContext

func (i *Instance) ToInstanceOutputWithContext(ctx context.Context) InstanceOutput

type InstanceArgs

type InstanceArgs struct {
	// Description of the IP, maximum length 25.
	Description pulumi.StringPtrInput
	// The number of intranet IPv4s. When it is greater than 1, there is only one primary intranet IP. The others are auxiliary intranet IPs, which conflict with `ipv4s`.
	Ipv4Count pulumi.IntPtrInput
	// Applying for intranet IPv4s collection, conflict with `ipv4Count`. When there are multiple ipv4s, can only be one primary IP, and the maximum length of the array is 30. Each element contains the following attributes:
	Ipv4s InstanceIpv4ArrayInput
	// Name of the ENI, maximum length 60.
	Name pulumi.StringPtrInput
	// A set of security group IDs.
	SecurityGroups pulumi.StringArrayInput
	// ID of the subnet within this vpc.
	SubnetId pulumi.StringInput
	// Tags of the ENI.
	Tags pulumi.MapInput
	// ID of the vpc.
	VpcId pulumi.StringInput
}

The set of arguments for constructing a Instance resource.

func (InstanceArgs) ElementType

func (InstanceArgs) ElementType() reflect.Type

type InstanceArray

type InstanceArray []InstanceInput

func (InstanceArray) ElementType

func (InstanceArray) ElementType() reflect.Type

func (InstanceArray) ToInstanceArrayOutput

func (i InstanceArray) ToInstanceArrayOutput() InstanceArrayOutput

func (InstanceArray) ToInstanceArrayOutputWithContext

func (i InstanceArray) ToInstanceArrayOutputWithContext(ctx context.Context) InstanceArrayOutput

type InstanceArrayInput

type InstanceArrayInput interface {
	pulumi.Input

	ToInstanceArrayOutput() InstanceArrayOutput
	ToInstanceArrayOutputWithContext(context.Context) InstanceArrayOutput
}

InstanceArrayInput is an input type that accepts InstanceArray and InstanceArrayOutput values. You can construct a concrete instance of `InstanceArrayInput` via:

InstanceArray{ InstanceArgs{...} }

type InstanceArrayOutput

type InstanceArrayOutput struct{ *pulumi.OutputState }

func (InstanceArrayOutput) ElementType

func (InstanceArrayOutput) ElementType() reflect.Type

func (InstanceArrayOutput) Index

func (InstanceArrayOutput) ToInstanceArrayOutput

func (o InstanceArrayOutput) ToInstanceArrayOutput() InstanceArrayOutput

func (InstanceArrayOutput) ToInstanceArrayOutputWithContext

func (o InstanceArrayOutput) ToInstanceArrayOutputWithContext(ctx context.Context) InstanceArrayOutput

type InstanceInput

type InstanceInput interface {
	pulumi.Input

	ToInstanceOutput() InstanceOutput
	ToInstanceOutputWithContext(ctx context.Context) InstanceOutput
}

type InstanceIpv4

type InstanceIpv4 struct {
	// Description of the IP, maximum length 25.
	Description *string `pulumi:"description"`
	// Intranet IP.
	Ip string `pulumi:"ip"`
	// Indicates whether the IP is primary.
	Primary bool `pulumi:"primary"`
}

type InstanceIpv4Args

type InstanceIpv4Args struct {
	// Description of the IP, maximum length 25.
	Description pulumi.StringPtrInput `pulumi:"description"`
	// Intranet IP.
	Ip pulumi.StringInput `pulumi:"ip"`
	// Indicates whether the IP is primary.
	Primary pulumi.BoolInput `pulumi:"primary"`
}

func (InstanceIpv4Args) ElementType

func (InstanceIpv4Args) ElementType() reflect.Type

func (InstanceIpv4Args) ToInstanceIpv4Output

func (i InstanceIpv4Args) ToInstanceIpv4Output() InstanceIpv4Output

func (InstanceIpv4Args) ToInstanceIpv4OutputWithContext

func (i InstanceIpv4Args) ToInstanceIpv4OutputWithContext(ctx context.Context) InstanceIpv4Output

type InstanceIpv4Array

type InstanceIpv4Array []InstanceIpv4Input

func (InstanceIpv4Array) ElementType

func (InstanceIpv4Array) ElementType() reflect.Type

func (InstanceIpv4Array) ToInstanceIpv4ArrayOutput

func (i InstanceIpv4Array) ToInstanceIpv4ArrayOutput() InstanceIpv4ArrayOutput

func (InstanceIpv4Array) ToInstanceIpv4ArrayOutputWithContext

func (i InstanceIpv4Array) ToInstanceIpv4ArrayOutputWithContext(ctx context.Context) InstanceIpv4ArrayOutput

type InstanceIpv4ArrayInput

type InstanceIpv4ArrayInput interface {
	pulumi.Input

	ToInstanceIpv4ArrayOutput() InstanceIpv4ArrayOutput
	ToInstanceIpv4ArrayOutputWithContext(context.Context) InstanceIpv4ArrayOutput
}

InstanceIpv4ArrayInput is an input type that accepts InstanceIpv4Array and InstanceIpv4ArrayOutput values. You can construct a concrete instance of `InstanceIpv4ArrayInput` via:

InstanceIpv4Array{ InstanceIpv4Args{...} }

type InstanceIpv4ArrayOutput

type InstanceIpv4ArrayOutput struct{ *pulumi.OutputState }

func (InstanceIpv4ArrayOutput) ElementType

func (InstanceIpv4ArrayOutput) ElementType() reflect.Type

func (InstanceIpv4ArrayOutput) Index

func (InstanceIpv4ArrayOutput) ToInstanceIpv4ArrayOutput

func (o InstanceIpv4ArrayOutput) ToInstanceIpv4ArrayOutput() InstanceIpv4ArrayOutput

func (InstanceIpv4ArrayOutput) ToInstanceIpv4ArrayOutputWithContext

func (o InstanceIpv4ArrayOutput) ToInstanceIpv4ArrayOutputWithContext(ctx context.Context) InstanceIpv4ArrayOutput

type InstanceIpv4Info

type InstanceIpv4Info struct {
	// Description of the IP, maximum length 25.
	Description *string `pulumi:"description"`
	// Intranet IP.
	Ip *string `pulumi:"ip"`
	// Indicates whether the IP is primary.
	Primary *bool `pulumi:"primary"`
}

type InstanceIpv4InfoArgs

type InstanceIpv4InfoArgs struct {
	// Description of the IP, maximum length 25.
	Description pulumi.StringPtrInput `pulumi:"description"`
	// Intranet IP.
	Ip pulumi.StringPtrInput `pulumi:"ip"`
	// Indicates whether the IP is primary.
	Primary pulumi.BoolPtrInput `pulumi:"primary"`
}

func (InstanceIpv4InfoArgs) ElementType

func (InstanceIpv4InfoArgs) ElementType() reflect.Type

func (InstanceIpv4InfoArgs) ToInstanceIpv4InfoOutput

func (i InstanceIpv4InfoArgs) ToInstanceIpv4InfoOutput() InstanceIpv4InfoOutput

func (InstanceIpv4InfoArgs) ToInstanceIpv4InfoOutputWithContext

func (i InstanceIpv4InfoArgs) ToInstanceIpv4InfoOutputWithContext(ctx context.Context) InstanceIpv4InfoOutput

type InstanceIpv4InfoArray

type InstanceIpv4InfoArray []InstanceIpv4InfoInput

func (InstanceIpv4InfoArray) ElementType

func (InstanceIpv4InfoArray) ElementType() reflect.Type

func (InstanceIpv4InfoArray) ToInstanceIpv4InfoArrayOutput

func (i InstanceIpv4InfoArray) ToInstanceIpv4InfoArrayOutput() InstanceIpv4InfoArrayOutput

func (InstanceIpv4InfoArray) ToInstanceIpv4InfoArrayOutputWithContext

func (i InstanceIpv4InfoArray) ToInstanceIpv4InfoArrayOutputWithContext(ctx context.Context) InstanceIpv4InfoArrayOutput

type InstanceIpv4InfoArrayInput

type InstanceIpv4InfoArrayInput interface {
	pulumi.Input

	ToInstanceIpv4InfoArrayOutput() InstanceIpv4InfoArrayOutput
	ToInstanceIpv4InfoArrayOutputWithContext(context.Context) InstanceIpv4InfoArrayOutput
}

InstanceIpv4InfoArrayInput is an input type that accepts InstanceIpv4InfoArray and InstanceIpv4InfoArrayOutput values. You can construct a concrete instance of `InstanceIpv4InfoArrayInput` via:

InstanceIpv4InfoArray{ InstanceIpv4InfoArgs{...} }

type InstanceIpv4InfoArrayOutput

type InstanceIpv4InfoArrayOutput struct{ *pulumi.OutputState }

func (InstanceIpv4InfoArrayOutput) ElementType

func (InstanceIpv4InfoArrayOutput) Index

func (InstanceIpv4InfoArrayOutput) ToInstanceIpv4InfoArrayOutput

func (o InstanceIpv4InfoArrayOutput) ToInstanceIpv4InfoArrayOutput() InstanceIpv4InfoArrayOutput

func (InstanceIpv4InfoArrayOutput) ToInstanceIpv4InfoArrayOutputWithContext

func (o InstanceIpv4InfoArrayOutput) ToInstanceIpv4InfoArrayOutputWithContext(ctx context.Context) InstanceIpv4InfoArrayOutput

type InstanceIpv4InfoInput

type InstanceIpv4InfoInput interface {
	pulumi.Input

	ToInstanceIpv4InfoOutput() InstanceIpv4InfoOutput
	ToInstanceIpv4InfoOutputWithContext(context.Context) InstanceIpv4InfoOutput
}

InstanceIpv4InfoInput is an input type that accepts InstanceIpv4InfoArgs and InstanceIpv4InfoOutput values. You can construct a concrete instance of `InstanceIpv4InfoInput` via:

InstanceIpv4InfoArgs{...}

type InstanceIpv4InfoOutput

type InstanceIpv4InfoOutput struct{ *pulumi.OutputState }

func (InstanceIpv4InfoOutput) Description

Description of the IP, maximum length 25.

func (InstanceIpv4InfoOutput) ElementType

func (InstanceIpv4InfoOutput) ElementType() reflect.Type

func (InstanceIpv4InfoOutput) Ip

Intranet IP.

func (InstanceIpv4InfoOutput) Primary

Indicates whether the IP is primary.

func (InstanceIpv4InfoOutput) ToInstanceIpv4InfoOutput

func (o InstanceIpv4InfoOutput) ToInstanceIpv4InfoOutput() InstanceIpv4InfoOutput

func (InstanceIpv4InfoOutput) ToInstanceIpv4InfoOutputWithContext

func (o InstanceIpv4InfoOutput) ToInstanceIpv4InfoOutputWithContext(ctx context.Context) InstanceIpv4InfoOutput

type InstanceIpv4Input

type InstanceIpv4Input interface {
	pulumi.Input

	ToInstanceIpv4Output() InstanceIpv4Output
	ToInstanceIpv4OutputWithContext(context.Context) InstanceIpv4Output
}

InstanceIpv4Input is an input type that accepts InstanceIpv4Args and InstanceIpv4Output values. You can construct a concrete instance of `InstanceIpv4Input` via:

InstanceIpv4Args{...}

type InstanceIpv4Output

type InstanceIpv4Output struct{ *pulumi.OutputState }

func (InstanceIpv4Output) Description

func (o InstanceIpv4Output) Description() pulumi.StringPtrOutput

Description of the IP, maximum length 25.

func (InstanceIpv4Output) ElementType

func (InstanceIpv4Output) ElementType() reflect.Type

func (InstanceIpv4Output) Ip

Intranet IP.

func (InstanceIpv4Output) Primary

func (o InstanceIpv4Output) Primary() pulumi.BoolOutput

Indicates whether the IP is primary.

func (InstanceIpv4Output) ToInstanceIpv4Output

func (o InstanceIpv4Output) ToInstanceIpv4Output() InstanceIpv4Output

func (InstanceIpv4Output) ToInstanceIpv4OutputWithContext

func (o InstanceIpv4Output) ToInstanceIpv4OutputWithContext(ctx context.Context) InstanceIpv4Output

type InstanceMap

type InstanceMap map[string]InstanceInput

func (InstanceMap) ElementType

func (InstanceMap) ElementType() reflect.Type

func (InstanceMap) ToInstanceMapOutput

func (i InstanceMap) ToInstanceMapOutput() InstanceMapOutput

func (InstanceMap) ToInstanceMapOutputWithContext

func (i InstanceMap) ToInstanceMapOutputWithContext(ctx context.Context) InstanceMapOutput

type InstanceMapInput

type InstanceMapInput interface {
	pulumi.Input

	ToInstanceMapOutput() InstanceMapOutput
	ToInstanceMapOutputWithContext(context.Context) InstanceMapOutput
}

InstanceMapInput is an input type that accepts InstanceMap and InstanceMapOutput values. You can construct a concrete instance of `InstanceMapInput` via:

InstanceMap{ "key": InstanceArgs{...} }

type InstanceMapOutput

type InstanceMapOutput struct{ *pulumi.OutputState }

func (InstanceMapOutput) ElementType

func (InstanceMapOutput) ElementType() reflect.Type

func (InstanceMapOutput) MapIndex

func (InstanceMapOutput) ToInstanceMapOutput

func (o InstanceMapOutput) ToInstanceMapOutput() InstanceMapOutput

func (InstanceMapOutput) ToInstanceMapOutputWithContext

func (o InstanceMapOutput) ToInstanceMapOutputWithContext(ctx context.Context) InstanceMapOutput

type InstanceOutput

type InstanceOutput struct{ *pulumi.OutputState }

func (InstanceOutput) CreateTime

func (o InstanceOutput) CreateTime() pulumi.StringOutput

Creation time of the ENI.

func (InstanceOutput) Description

func (o InstanceOutput) Description() pulumi.StringPtrOutput

Description of the IP, maximum length 25.

func (InstanceOutput) ElementType

func (InstanceOutput) ElementType() reflect.Type

func (InstanceOutput) Ipv4Count

func (o InstanceOutput) Ipv4Count() pulumi.IntPtrOutput

The number of intranet IPv4s. When it is greater than 1, there is only one primary intranet IP. The others are auxiliary intranet IPs, which conflict with `ipv4s`.

func (InstanceOutput) Ipv4Infos

An information list of IPv4s. Each element contains the following attributes:

func (InstanceOutput) Ipv4s

Applying for intranet IPv4s collection, conflict with `ipv4Count`. When there are multiple ipv4s, can only be one primary IP, and the maximum length of the array is 30. Each element contains the following attributes:

func (InstanceOutput) Mac

MAC address.

func (InstanceOutput) Name

Name of the ENI, maximum length 60.

func (InstanceOutput) Primary

func (o InstanceOutput) Primary() pulumi.BoolOutput

Indicates whether the IP is primary.

func (InstanceOutput) SecurityGroups

func (o InstanceOutput) SecurityGroups() pulumi.StringArrayOutput

A set of security group IDs.

func (InstanceOutput) State

State of the ENI.

func (InstanceOutput) SubnetId

func (o InstanceOutput) SubnetId() pulumi.StringOutput

ID of the subnet within this vpc.

func (InstanceOutput) Tags

func (o InstanceOutput) Tags() pulumi.MapOutput

Tags of the ENI.

func (InstanceOutput) ToInstanceOutput

func (o InstanceOutput) ToInstanceOutput() InstanceOutput

func (InstanceOutput) ToInstanceOutputWithContext

func (o InstanceOutput) ToInstanceOutputWithContext(ctx context.Context) InstanceOutput

func (InstanceOutput) VpcId

ID of the vpc.

type InstanceState

type InstanceState struct {
	// Creation time of the ENI.
	CreateTime pulumi.StringPtrInput
	// Description of the IP, maximum length 25.
	Description pulumi.StringPtrInput
	// The number of intranet IPv4s. When it is greater than 1, there is only one primary intranet IP. The others are auxiliary intranet IPs, which conflict with `ipv4s`.
	Ipv4Count pulumi.IntPtrInput
	// An information list of IPv4s. Each element contains the following attributes:
	Ipv4Infos InstanceIpv4InfoArrayInput
	// Applying for intranet IPv4s collection, conflict with `ipv4Count`. When there are multiple ipv4s, can only be one primary IP, and the maximum length of the array is 30. Each element contains the following attributes:
	Ipv4s InstanceIpv4ArrayInput
	// MAC address.
	Mac pulumi.StringPtrInput
	// Name of the ENI, maximum length 60.
	Name pulumi.StringPtrInput
	// Indicates whether the IP is primary.
	Primary pulumi.BoolPtrInput
	// A set of security group IDs.
	SecurityGroups pulumi.StringArrayInput
	// State of the ENI.
	State pulumi.StringPtrInput
	// ID of the subnet within this vpc.
	SubnetId pulumi.StringPtrInput
	// Tags of the ENI.
	Tags pulumi.MapInput
	// ID of the vpc.
	VpcId pulumi.StringPtrInput
}

func (InstanceState) ElementType

func (InstanceState) ElementType() reflect.Type

type SgAttachment added in v0.1.5

type SgAttachment struct {
	pulumi.CustomResourceState

	// ENI instance ID. Such as:eni-pxir56ns. It Only support set one eni instance now.
	NetworkInterfaceIds pulumi.StringOutput `pulumi:"networkInterfaceIds"`
	// Security group instance ID, for example:sg-33ocnj9n, can be obtained through DescribeSecurityGroups. There is a limit of 100 instances per request.
	SecurityGroupIds pulumi.StringArrayOutput `pulumi:"securityGroupIds"`
}

Provides a resource to create a eniSgAttachment

> **Note:** If this resource is used to bind security groups to eni, it cannot be linked to `tentcloudEni` binding security group for simultaneous use.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-tencentcloud/sdk/go/tencentcloud/Availability"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/tencentcloudstack/pulumi-tencentcloud/sdk/go/tencentcloud/Availability"
"github.com/tencentcloudstack/pulumi-tencentcloud/sdk/go/tencentcloud/Eni"
"github.com/tencentcloudstack/pulumi-tencentcloud/sdk/go/tencentcloud/Security"
"github.com/tencentcloudstack/pulumi-tencentcloud/sdk/go/tencentcloud/Subnet"
"github.com/tencentcloudstack/pulumi-tencentcloud/sdk/go/tencentcloud/Vpc"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		zones, err := Availability.GetZonesByProduct(ctx, &availability.GetZonesByProductArgs{
			Product: "vpc",
		}, nil)
		if err != nil {
			return err
		}
		vpc, err := Vpc.NewInstance(ctx, "vpc", &Vpc.InstanceArgs{
			CidrBlock: pulumi.String("10.0.0.0/16"),
		})
		if err != nil {
			return err
		}
		subnet, err := Subnet.NewInstance(ctx, "subnet", &Subnet.InstanceArgs{
			AvailabilityZone: pulumi.String(zones.Zones[0].Name),
			VpcId:            vpc.ID(),
			CidrBlock:        pulumi.String("10.0.0.0/16"),
			IsMulticast:      pulumi.Bool(false),
		})
		if err != nil {
			return err
		}
		example1, err := Security.NewGroup(ctx, "example1", &Security.GroupArgs{
			Description: pulumi.String("sg desc."),
			ProjectId:   pulumi.Int(0),
			Tags: pulumi.AnyMap{
				"example": pulumi.Any("test"),
			},
		})
		if err != nil {
			return err
		}
		example2, err := Security.NewGroup(ctx, "example2", &Security.GroupArgs{
			Description: pulumi.String("sg desc."),
			ProjectId:   pulumi.Int(0),
			Tags: pulumi.AnyMap{
				"example": pulumi.Any("test"),
			},
		})
		if err != nil {
			return err
		}
		example, err := Eni.NewInstance(ctx, "example", &Eni.InstanceArgs{
			VpcId:       vpc.ID(),
			SubnetId:    subnet.ID(),
			Description: pulumi.String("eni desc."),
			Ipv4Count:   pulumi.Int(1),
		})
		if err != nil {
			return err
		}
		_, err = Eni.NewSgAttachment(ctx, "eniSgAttachment", &Eni.SgAttachmentArgs{
			NetworkInterfaceIds: pulumi.String{
				example.ID(),
			},
			SecurityGroupIds: pulumi.StringArray{
				example1.ID(),
				example2.ID(),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

vpc eni_sg_attachment can be imported using the id, e.g.

```sh

$ pulumi import tencentcloud:Eni/sgAttachment:SgAttachment eni_sg_attachment eni_sg_attachment_id

```

func GetSgAttachment added in v0.1.5

func GetSgAttachment(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *SgAttachmentState, opts ...pulumi.ResourceOption) (*SgAttachment, error)

GetSgAttachment gets an existing SgAttachment resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewSgAttachment added in v0.1.5

func NewSgAttachment(ctx *pulumi.Context,
	name string, args *SgAttachmentArgs, opts ...pulumi.ResourceOption) (*SgAttachment, error)

NewSgAttachment registers a new resource with the given unique name, arguments, and options.

func (*SgAttachment) ElementType added in v0.1.5

func (*SgAttachment) ElementType() reflect.Type

func (*SgAttachment) ToSgAttachmentOutput added in v0.1.5

func (i *SgAttachment) ToSgAttachmentOutput() SgAttachmentOutput

func (*SgAttachment) ToSgAttachmentOutputWithContext added in v0.1.5

func (i *SgAttachment) ToSgAttachmentOutputWithContext(ctx context.Context) SgAttachmentOutput

type SgAttachmentArgs added in v0.1.5

type SgAttachmentArgs struct {
	// ENI instance ID. Such as:eni-pxir56ns. It Only support set one eni instance now.
	NetworkInterfaceIds pulumi.StringInput
	// Security group instance ID, for example:sg-33ocnj9n, can be obtained through DescribeSecurityGroups. There is a limit of 100 instances per request.
	SecurityGroupIds pulumi.StringArrayInput
}

The set of arguments for constructing a SgAttachment resource.

func (SgAttachmentArgs) ElementType added in v0.1.5

func (SgAttachmentArgs) ElementType() reflect.Type

type SgAttachmentArray added in v0.1.5

type SgAttachmentArray []SgAttachmentInput

func (SgAttachmentArray) ElementType added in v0.1.5

func (SgAttachmentArray) ElementType() reflect.Type

func (SgAttachmentArray) ToSgAttachmentArrayOutput added in v0.1.5

func (i SgAttachmentArray) ToSgAttachmentArrayOutput() SgAttachmentArrayOutput

func (SgAttachmentArray) ToSgAttachmentArrayOutputWithContext added in v0.1.5

func (i SgAttachmentArray) ToSgAttachmentArrayOutputWithContext(ctx context.Context) SgAttachmentArrayOutput

type SgAttachmentArrayInput added in v0.1.5

type SgAttachmentArrayInput interface {
	pulumi.Input

	ToSgAttachmentArrayOutput() SgAttachmentArrayOutput
	ToSgAttachmentArrayOutputWithContext(context.Context) SgAttachmentArrayOutput
}

SgAttachmentArrayInput is an input type that accepts SgAttachmentArray and SgAttachmentArrayOutput values. You can construct a concrete instance of `SgAttachmentArrayInput` via:

SgAttachmentArray{ SgAttachmentArgs{...} }

type SgAttachmentArrayOutput added in v0.1.5

type SgAttachmentArrayOutput struct{ *pulumi.OutputState }

func (SgAttachmentArrayOutput) ElementType added in v0.1.5

func (SgAttachmentArrayOutput) ElementType() reflect.Type

func (SgAttachmentArrayOutput) Index added in v0.1.5

func (SgAttachmentArrayOutput) ToSgAttachmentArrayOutput added in v0.1.5

func (o SgAttachmentArrayOutput) ToSgAttachmentArrayOutput() SgAttachmentArrayOutput

func (SgAttachmentArrayOutput) ToSgAttachmentArrayOutputWithContext added in v0.1.5

func (o SgAttachmentArrayOutput) ToSgAttachmentArrayOutputWithContext(ctx context.Context) SgAttachmentArrayOutput

type SgAttachmentInput added in v0.1.5

type SgAttachmentInput interface {
	pulumi.Input

	ToSgAttachmentOutput() SgAttachmentOutput
	ToSgAttachmentOutputWithContext(ctx context.Context) SgAttachmentOutput
}

type SgAttachmentMap added in v0.1.5

type SgAttachmentMap map[string]SgAttachmentInput

func (SgAttachmentMap) ElementType added in v0.1.5

func (SgAttachmentMap) ElementType() reflect.Type

func (SgAttachmentMap) ToSgAttachmentMapOutput added in v0.1.5

func (i SgAttachmentMap) ToSgAttachmentMapOutput() SgAttachmentMapOutput

func (SgAttachmentMap) ToSgAttachmentMapOutputWithContext added in v0.1.5

func (i SgAttachmentMap) ToSgAttachmentMapOutputWithContext(ctx context.Context) SgAttachmentMapOutput

type SgAttachmentMapInput added in v0.1.5

type SgAttachmentMapInput interface {
	pulumi.Input

	ToSgAttachmentMapOutput() SgAttachmentMapOutput
	ToSgAttachmentMapOutputWithContext(context.Context) SgAttachmentMapOutput
}

SgAttachmentMapInput is an input type that accepts SgAttachmentMap and SgAttachmentMapOutput values. You can construct a concrete instance of `SgAttachmentMapInput` via:

SgAttachmentMap{ "key": SgAttachmentArgs{...} }

type SgAttachmentMapOutput added in v0.1.5

type SgAttachmentMapOutput struct{ *pulumi.OutputState }

func (SgAttachmentMapOutput) ElementType added in v0.1.5

func (SgAttachmentMapOutput) ElementType() reflect.Type

func (SgAttachmentMapOutput) MapIndex added in v0.1.5

func (SgAttachmentMapOutput) ToSgAttachmentMapOutput added in v0.1.5

func (o SgAttachmentMapOutput) ToSgAttachmentMapOutput() SgAttachmentMapOutput

func (SgAttachmentMapOutput) ToSgAttachmentMapOutputWithContext added in v0.1.5

func (o SgAttachmentMapOutput) ToSgAttachmentMapOutputWithContext(ctx context.Context) SgAttachmentMapOutput

type SgAttachmentOutput added in v0.1.5

type SgAttachmentOutput struct{ *pulumi.OutputState }

func (SgAttachmentOutput) ElementType added in v0.1.5

func (SgAttachmentOutput) ElementType() reflect.Type

func (SgAttachmentOutput) NetworkInterfaceIds added in v0.1.5

func (o SgAttachmentOutput) NetworkInterfaceIds() pulumi.StringOutput

ENI instance ID. Such as:eni-pxir56ns. It Only support set one eni instance now.

func (SgAttachmentOutput) SecurityGroupIds added in v0.1.5

func (o SgAttachmentOutput) SecurityGroupIds() pulumi.StringArrayOutput

Security group instance ID, for example:sg-33ocnj9n, can be obtained through DescribeSecurityGroups. There is a limit of 100 instances per request.

func (SgAttachmentOutput) ToSgAttachmentOutput added in v0.1.5

func (o SgAttachmentOutput) ToSgAttachmentOutput() SgAttachmentOutput

func (SgAttachmentOutput) ToSgAttachmentOutputWithContext added in v0.1.5

func (o SgAttachmentOutput) ToSgAttachmentOutputWithContext(ctx context.Context) SgAttachmentOutput

type SgAttachmentState added in v0.1.5

type SgAttachmentState struct {
	// ENI instance ID. Such as:eni-pxir56ns. It Only support set one eni instance now.
	NetworkInterfaceIds pulumi.StringPtrInput
	// Security group instance ID, for example:sg-33ocnj9n, can be obtained through DescribeSecurityGroups. There is a limit of 100 instances per request.
	SecurityGroupIds pulumi.StringArrayInput
}

func (SgAttachmentState) ElementType added in v0.1.5

func (SgAttachmentState) ElementType() reflect.Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL