eip

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2022 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 Association

type Association struct {
	pulumi.CustomResourceState

	// The ID of EIP.
	EipId pulumi.StringOutput `pulumi:"eipId"`
	// The CVM or CLB instance id going to bind with the EIP. This field is conflict with `networkInterfaceId` and `privateIp fields`.
	InstanceId pulumi.StringOutput `pulumi:"instanceId"`
	// Indicates the network interface id like `eni-xxxxxx`. This field is conflict with `instanceId`.
	NetworkInterfaceId pulumi.StringOutput `pulumi:"networkInterfaceId"`
	// Indicates an IP belongs to the `networkInterfaceId`. This field is conflict with `instanceId`.
	PrivateIp pulumi.StringOutput `pulumi:"privateIp"`
}

Provides an eip resource associated with other resource like CVM, ENI and CLB.

> **NOTE:** Please DO NOT define `allocatePublicIp` in `Instance.Instance` resource when using `Eip.Association`.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/tencentcloudstack/pulumi-tencentcloud/sdk/go/tencentcloud/Eip"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := Eip.NewAssociation(ctx, "foo", &Eip.AssociationArgs{
			EipId:      pulumi.String("eip-xxxxxx"),
			InstanceId: pulumi.String("ins-xxxxxx"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

or

```go package main

import (

"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/tencentcloudstack/pulumi-tencentcloud/sdk/go/tencentcloud/Eip"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := Eip.NewAssociation(ctx, "bar", &Eip.AssociationArgs{
			EipId:              pulumi.String("eip-xxxxxx"),
			NetworkInterfaceId: pulumi.String("eni-xxxxxx"),
			PrivateIp:          pulumi.String("10.0.1.22"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

Eip association can be imported using the id, e.g.

```sh

$ pulumi import tencentcloud:Eip/association:Association bar eip-41s6jwy4::ins-34jwj3

```

func GetAssociation

func GetAssociation(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *AssociationState, opts ...pulumi.ResourceOption) (*Association, error)

GetAssociation gets an existing Association 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 NewAssociation

func NewAssociation(ctx *pulumi.Context,
	name string, args *AssociationArgs, opts ...pulumi.ResourceOption) (*Association, error)

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

func (*Association) ElementType

func (*Association) ElementType() reflect.Type

func (*Association) ToAssociationOutput

func (i *Association) ToAssociationOutput() AssociationOutput

func (*Association) ToAssociationOutputWithContext

func (i *Association) ToAssociationOutputWithContext(ctx context.Context) AssociationOutput

type AssociationArgs

type AssociationArgs struct {
	// The ID of EIP.
	EipId pulumi.StringInput
	// The CVM or CLB instance id going to bind with the EIP. This field is conflict with `networkInterfaceId` and `privateIp fields`.
	InstanceId pulumi.StringPtrInput
	// Indicates the network interface id like `eni-xxxxxx`. This field is conflict with `instanceId`.
	NetworkInterfaceId pulumi.StringPtrInput
	// Indicates an IP belongs to the `networkInterfaceId`. This field is conflict with `instanceId`.
	PrivateIp pulumi.StringPtrInput
}

The set of arguments for constructing a Association resource.

func (AssociationArgs) ElementType

func (AssociationArgs) ElementType() reflect.Type

type AssociationArray

type AssociationArray []AssociationInput

func (AssociationArray) ElementType

func (AssociationArray) ElementType() reflect.Type

func (AssociationArray) ToAssociationArrayOutput

func (i AssociationArray) ToAssociationArrayOutput() AssociationArrayOutput

func (AssociationArray) ToAssociationArrayOutputWithContext

func (i AssociationArray) ToAssociationArrayOutputWithContext(ctx context.Context) AssociationArrayOutput

type AssociationArrayInput

type AssociationArrayInput interface {
	pulumi.Input

	ToAssociationArrayOutput() AssociationArrayOutput
	ToAssociationArrayOutputWithContext(context.Context) AssociationArrayOutput
}

AssociationArrayInput is an input type that accepts AssociationArray and AssociationArrayOutput values. You can construct a concrete instance of `AssociationArrayInput` via:

AssociationArray{ AssociationArgs{...} }

type AssociationArrayOutput

type AssociationArrayOutput struct{ *pulumi.OutputState }

func (AssociationArrayOutput) ElementType

func (AssociationArrayOutput) ElementType() reflect.Type

func (AssociationArrayOutput) Index

func (AssociationArrayOutput) ToAssociationArrayOutput

func (o AssociationArrayOutput) ToAssociationArrayOutput() AssociationArrayOutput

func (AssociationArrayOutput) ToAssociationArrayOutputWithContext

func (o AssociationArrayOutput) ToAssociationArrayOutputWithContext(ctx context.Context) AssociationArrayOutput

type AssociationInput

type AssociationInput interface {
	pulumi.Input

	ToAssociationOutput() AssociationOutput
	ToAssociationOutputWithContext(ctx context.Context) AssociationOutput
}

type AssociationMap

type AssociationMap map[string]AssociationInput

func (AssociationMap) ElementType

func (AssociationMap) ElementType() reflect.Type

func (AssociationMap) ToAssociationMapOutput

func (i AssociationMap) ToAssociationMapOutput() AssociationMapOutput

func (AssociationMap) ToAssociationMapOutputWithContext

func (i AssociationMap) ToAssociationMapOutputWithContext(ctx context.Context) AssociationMapOutput

type AssociationMapInput

type AssociationMapInput interface {
	pulumi.Input

	ToAssociationMapOutput() AssociationMapOutput
	ToAssociationMapOutputWithContext(context.Context) AssociationMapOutput
}

AssociationMapInput is an input type that accepts AssociationMap and AssociationMapOutput values. You can construct a concrete instance of `AssociationMapInput` via:

AssociationMap{ "key": AssociationArgs{...} }

type AssociationMapOutput

type AssociationMapOutput struct{ *pulumi.OutputState }

func (AssociationMapOutput) ElementType

func (AssociationMapOutput) ElementType() reflect.Type

func (AssociationMapOutput) MapIndex

func (AssociationMapOutput) ToAssociationMapOutput

func (o AssociationMapOutput) ToAssociationMapOutput() AssociationMapOutput

func (AssociationMapOutput) ToAssociationMapOutputWithContext

func (o AssociationMapOutput) ToAssociationMapOutputWithContext(ctx context.Context) AssociationMapOutput

type AssociationOutput

type AssociationOutput struct{ *pulumi.OutputState }

func (AssociationOutput) EipId

The ID of EIP.

func (AssociationOutput) ElementType

func (AssociationOutput) ElementType() reflect.Type

func (AssociationOutput) InstanceId

func (o AssociationOutput) InstanceId() pulumi.StringOutput

The CVM or CLB instance id going to bind with the EIP. This field is conflict with `networkInterfaceId` and `privateIp fields`.

func (AssociationOutput) NetworkInterfaceId

func (o AssociationOutput) NetworkInterfaceId() pulumi.StringOutput

Indicates the network interface id like `eni-xxxxxx`. This field is conflict with `instanceId`.

func (AssociationOutput) PrivateIp

func (o AssociationOutput) PrivateIp() pulumi.StringOutput

Indicates an IP belongs to the `networkInterfaceId`. This field is conflict with `instanceId`.

func (AssociationOutput) ToAssociationOutput

func (o AssociationOutput) ToAssociationOutput() AssociationOutput

func (AssociationOutput) ToAssociationOutputWithContext

func (o AssociationOutput) ToAssociationOutputWithContext(ctx context.Context) AssociationOutput

type AssociationState

type AssociationState struct {
	// The ID of EIP.
	EipId pulumi.StringPtrInput
	// The CVM or CLB instance id going to bind with the EIP. This field is conflict with `networkInterfaceId` and `privateIp fields`.
	InstanceId pulumi.StringPtrInput
	// Indicates the network interface id like `eni-xxxxxx`. This field is conflict with `instanceId`.
	NetworkInterfaceId pulumi.StringPtrInput
	// Indicates an IP belongs to the `networkInterfaceId`. This field is conflict with `instanceId`.
	PrivateIp pulumi.StringPtrInput
}

func (AssociationState) ElementType

func (AssociationState) ElementType() reflect.Type

type Instance

type Instance struct {
	pulumi.CustomResourceState

	// The zone of anycast. Valid value: `ANYCAST_ZONE_GLOBAL` and `ANYCAST_ZONE_OVERSEAS`.
	AnycastZone pulumi.StringPtrOutput `pulumi:"anycastZone"`
	// It has been deprecated from version 1.27.0. Indicates whether the anycast eip can be associated to a CLB.
	//
	// Deprecated: It has been deprecated from version 1.27.0.
	ApplicableForClb pulumi.BoolPtrOutput `pulumi:"applicableForClb"`
	// The charge type of eip. Valid value: `BANDWIDTH_PACKAGE`, `BANDWIDTH_POSTPAID_BY_HOUR` and `TRAFFIC_POSTPAID_BY_HOUR`.
	InternetChargeType pulumi.StringPtrOutput `pulumi:"internetChargeType"`
	// The bandwidth limit of EIP, unit is Mbps.
	InternetMaxBandwidthOut pulumi.IntPtrOutput `pulumi:"internetMaxBandwidthOut"`
	// Internet service provider of eip. Valid value: `BGP`, `CMCC`, `CTCC` and `CUCC`.
	InternetServiceProvider pulumi.StringPtrOutput `pulumi:"internetServiceProvider"`
	// The name of eip.
	Name pulumi.StringOutput `pulumi:"name"`
	// The elastic IP address.
	PublicIp pulumi.StringOutput `pulumi:"publicIp"`
	// The EIP current status.
	Status pulumi.StringOutput `pulumi:"status"`
	// The tags of eip.
	Tags pulumi.MapOutput `pulumi:"tags"`
	// The type of eip. Valid value:  `EIP` and `AnycastEIP` and `HighQualityEIP`. Default is `EIP`.
	Type pulumi.StringPtrOutput `pulumi:"type"`
}

Provides an EIP resource.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/tencentcloudstack/pulumi-tencentcloud/sdk/go/tencentcloud/Eip"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := Eip.NewInstance(ctx, "foo", nil)
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

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

```sh

$ pulumi import tencentcloud:Eip/instance:Instance foo eip-nyvf60va

```

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 {
	// The zone of anycast. Valid value: `ANYCAST_ZONE_GLOBAL` and `ANYCAST_ZONE_OVERSEAS`.
	AnycastZone pulumi.StringPtrInput
	// It has been deprecated from version 1.27.0. Indicates whether the anycast eip can be associated to a CLB.
	//
	// Deprecated: It has been deprecated from version 1.27.0.
	ApplicableForClb pulumi.BoolPtrInput
	// The charge type of eip. Valid value: `BANDWIDTH_PACKAGE`, `BANDWIDTH_POSTPAID_BY_HOUR` and `TRAFFIC_POSTPAID_BY_HOUR`.
	InternetChargeType pulumi.StringPtrInput
	// The bandwidth limit of EIP, unit is Mbps.
	InternetMaxBandwidthOut pulumi.IntPtrInput
	// Internet service provider of eip. Valid value: `BGP`, `CMCC`, `CTCC` and `CUCC`.
	InternetServiceProvider pulumi.StringPtrInput
	// The name of eip.
	Name pulumi.StringPtrInput
	// The tags of eip.
	Tags pulumi.MapInput
	// The type of eip. Valid value:  `EIP` and `AnycastEIP` and `HighQualityEIP`. Default is `EIP`.
	Type pulumi.StringPtrInput
}

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 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) AnycastZone

func (o InstanceOutput) AnycastZone() pulumi.StringPtrOutput

The zone of anycast. Valid value: `ANYCAST_ZONE_GLOBAL` and `ANYCAST_ZONE_OVERSEAS`.

func (InstanceOutput) ApplicableForClb deprecated

func (o InstanceOutput) ApplicableForClb() pulumi.BoolPtrOutput

It has been deprecated from version 1.27.0. Indicates whether the anycast eip can be associated to a CLB.

Deprecated: It has been deprecated from version 1.27.0.

func (InstanceOutput) ElementType

func (InstanceOutput) ElementType() reflect.Type

func (InstanceOutput) InternetChargeType

func (o InstanceOutput) InternetChargeType() pulumi.StringPtrOutput

The charge type of eip. Valid value: `BANDWIDTH_PACKAGE`, `BANDWIDTH_POSTPAID_BY_HOUR` and `TRAFFIC_POSTPAID_BY_HOUR`.

func (InstanceOutput) InternetMaxBandwidthOut

func (o InstanceOutput) InternetMaxBandwidthOut() pulumi.IntPtrOutput

The bandwidth limit of EIP, unit is Mbps.

func (InstanceOutput) InternetServiceProvider

func (o InstanceOutput) InternetServiceProvider() pulumi.StringPtrOutput

Internet service provider of eip. Valid value: `BGP`, `CMCC`, `CTCC` and `CUCC`.

func (InstanceOutput) Name

The name of eip.

func (InstanceOutput) PublicIp

func (o InstanceOutput) PublicIp() pulumi.StringOutput

The elastic IP address.

func (InstanceOutput) Status

func (o InstanceOutput) Status() pulumi.StringOutput

The EIP current status.

func (InstanceOutput) Tags

func (o InstanceOutput) Tags() pulumi.MapOutput

The tags of eip.

func (InstanceOutput) ToInstanceOutput

func (o InstanceOutput) ToInstanceOutput() InstanceOutput

func (InstanceOutput) ToInstanceOutputWithContext

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

func (InstanceOutput) Type

The type of eip. Valid value: `EIP` and `AnycastEIP` and `HighQualityEIP`. Default is `EIP`.

type InstanceState

type InstanceState struct {
	// The zone of anycast. Valid value: `ANYCAST_ZONE_GLOBAL` and `ANYCAST_ZONE_OVERSEAS`.
	AnycastZone pulumi.StringPtrInput
	// It has been deprecated from version 1.27.0. Indicates whether the anycast eip can be associated to a CLB.
	//
	// Deprecated: It has been deprecated from version 1.27.0.
	ApplicableForClb pulumi.BoolPtrInput
	// The charge type of eip. Valid value: `BANDWIDTH_PACKAGE`, `BANDWIDTH_POSTPAID_BY_HOUR` and `TRAFFIC_POSTPAID_BY_HOUR`.
	InternetChargeType pulumi.StringPtrInput
	// The bandwidth limit of EIP, unit is Mbps.
	InternetMaxBandwidthOut pulumi.IntPtrInput
	// Internet service provider of eip. Valid value: `BGP`, `CMCC`, `CTCC` and `CUCC`.
	InternetServiceProvider pulumi.StringPtrInput
	// The name of eip.
	Name pulumi.StringPtrInput
	// The elastic IP address.
	PublicIp pulumi.StringPtrInput
	// The EIP current status.
	Status pulumi.StringPtrInput
	// The tags of eip.
	Tags pulumi.MapInput
	// The type of eip. Valid value:  `EIP` and `AnycastEIP` and `HighQualityEIP`. Default is `EIP`.
	Type pulumi.StringPtrInput
}

func (InstanceState) ElementType

func (InstanceState) ElementType() reflect.Type

Jump to

Keyboard shortcuts

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