antiddos

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 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.2

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 Basic

type Basic struct {
	pulumi.CustomResourceState

	// Specifies the ID of an EIP. Changing this creates a new resource.
	EipId pulumi.StringOutput `pulumi:"eipId"`
	// The public address of the EIP.
	PublicIp pulumi.StringOutput `pulumi:"publicIp"`
	// Specifies the region in which to manage the Cloud Native Anti-DDos Basic resource.
	// If omitted, the provider-level region will be used. Changing this creates a new resource.
	Region pulumi.StringOutput `pulumi:"region"`
	// The Anti-DDos status.
	Status pulumi.StringOutput `pulumi:"status"`
	// Specifies the traffic cleaning threshold in Mbps.
	// The value can be 10, 30, 50, 70, 100, 120, 150, 200, 250, 300, 1000 Mbps.
	TrafficThreshold pulumi.IntOutput `pulumi:"trafficThreshold"`
}

Manages Cloud Native Anti-DDos Basic resource within HuaweiCloud.

> The Cloud Native Anti-DDos Basic resource will be set to the default traffic cleaning threshold when destroyed,

instead of deleting it.

## Example Usage

```go package main

import (

"github.com/huaweicloud/pulumi-huaweicloud/sdk/go/huaweicloud/AntiDDos"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		eipId := cfg.RequireObject("eipId")
		_, err := AntiDDos.NewBasic(ctx, "antiddos1", &AntiDDos.BasicArgs{
			EipId:            pulumi.Any(eipId),
			TrafficThreshold: pulumi.Int(150),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

Cloud Native Anti-DDos Basic resources can be imported using `eip_id`. e.g.

```sh

$ pulumi import huaweicloud:AntiDDos/basic:Basic antiddos_1 c5256d47-8f9e-4ae7-9943-6e77e3d8bd2d

```

func GetBasic

func GetBasic(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *BasicState, opts ...pulumi.ResourceOption) (*Basic, error)

GetBasic gets an existing Basic 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 NewBasic

func NewBasic(ctx *pulumi.Context,
	name string, args *BasicArgs, opts ...pulumi.ResourceOption) (*Basic, error)

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

func (*Basic) ElementType

func (*Basic) ElementType() reflect.Type

func (*Basic) ToBasicOutput

func (i *Basic) ToBasicOutput() BasicOutput

func (*Basic) ToBasicOutputWithContext

func (i *Basic) ToBasicOutputWithContext(ctx context.Context) BasicOutput

type BasicArgs

type BasicArgs struct {
	// Specifies the ID of an EIP. Changing this creates a new resource.
	EipId pulumi.StringInput
	// Specifies the region in which to manage the Cloud Native Anti-DDos Basic resource.
	// If omitted, the provider-level region will be used. Changing this creates a new resource.
	Region pulumi.StringPtrInput
	// Specifies the traffic cleaning threshold in Mbps.
	// The value can be 10, 30, 50, 70, 100, 120, 150, 200, 250, 300, 1000 Mbps.
	TrafficThreshold pulumi.IntInput
}

The set of arguments for constructing a Basic resource.

func (BasicArgs) ElementType

func (BasicArgs) ElementType() reflect.Type

type BasicArray

type BasicArray []BasicInput

func (BasicArray) ElementType

func (BasicArray) ElementType() reflect.Type

func (BasicArray) ToBasicArrayOutput

func (i BasicArray) ToBasicArrayOutput() BasicArrayOutput

func (BasicArray) ToBasicArrayOutputWithContext

func (i BasicArray) ToBasicArrayOutputWithContext(ctx context.Context) BasicArrayOutput

type BasicArrayInput

type BasicArrayInput interface {
	pulumi.Input

	ToBasicArrayOutput() BasicArrayOutput
	ToBasicArrayOutputWithContext(context.Context) BasicArrayOutput
}

BasicArrayInput is an input type that accepts BasicArray and BasicArrayOutput values. You can construct a concrete instance of `BasicArrayInput` via:

BasicArray{ BasicArgs{...} }

type BasicArrayOutput

type BasicArrayOutput struct{ *pulumi.OutputState }

func (BasicArrayOutput) ElementType

func (BasicArrayOutput) ElementType() reflect.Type

func (BasicArrayOutput) Index

func (BasicArrayOutput) ToBasicArrayOutput

func (o BasicArrayOutput) ToBasicArrayOutput() BasicArrayOutput

func (BasicArrayOutput) ToBasicArrayOutputWithContext

func (o BasicArrayOutput) ToBasicArrayOutputWithContext(ctx context.Context) BasicArrayOutput

type BasicInput

type BasicInput interface {
	pulumi.Input

	ToBasicOutput() BasicOutput
	ToBasicOutputWithContext(ctx context.Context) BasicOutput
}

type BasicMap

type BasicMap map[string]BasicInput

func (BasicMap) ElementType

func (BasicMap) ElementType() reflect.Type

func (BasicMap) ToBasicMapOutput

func (i BasicMap) ToBasicMapOutput() BasicMapOutput

func (BasicMap) ToBasicMapOutputWithContext

func (i BasicMap) ToBasicMapOutputWithContext(ctx context.Context) BasicMapOutput

type BasicMapInput

type BasicMapInput interface {
	pulumi.Input

	ToBasicMapOutput() BasicMapOutput
	ToBasicMapOutputWithContext(context.Context) BasicMapOutput
}

BasicMapInput is an input type that accepts BasicMap and BasicMapOutput values. You can construct a concrete instance of `BasicMapInput` via:

BasicMap{ "key": BasicArgs{...} }

type BasicMapOutput

type BasicMapOutput struct{ *pulumi.OutputState }

func (BasicMapOutput) ElementType

func (BasicMapOutput) ElementType() reflect.Type

func (BasicMapOutput) MapIndex

func (BasicMapOutput) ToBasicMapOutput

func (o BasicMapOutput) ToBasicMapOutput() BasicMapOutput

func (BasicMapOutput) ToBasicMapOutputWithContext

func (o BasicMapOutput) ToBasicMapOutputWithContext(ctx context.Context) BasicMapOutput

type BasicOutput

type BasicOutput struct{ *pulumi.OutputState }

func (BasicOutput) EipId

func (o BasicOutput) EipId() pulumi.StringOutput

Specifies the ID of an EIP. Changing this creates a new resource.

func (BasicOutput) ElementType

func (BasicOutput) ElementType() reflect.Type

func (BasicOutput) PublicIp

func (o BasicOutput) PublicIp() pulumi.StringOutput

The public address of the EIP.

func (BasicOutput) Region

func (o BasicOutput) Region() pulumi.StringOutput

Specifies the region in which to manage the Cloud Native Anti-DDos Basic resource. If omitted, the provider-level region will be used. Changing this creates a new resource.

func (BasicOutput) Status

func (o BasicOutput) Status() pulumi.StringOutput

The Anti-DDos status.

func (BasicOutput) ToBasicOutput

func (o BasicOutput) ToBasicOutput() BasicOutput

func (BasicOutput) ToBasicOutputWithContext

func (o BasicOutput) ToBasicOutputWithContext(ctx context.Context) BasicOutput

func (BasicOutput) TrafficThreshold

func (o BasicOutput) TrafficThreshold() pulumi.IntOutput

Specifies the traffic cleaning threshold in Mbps. The value can be 10, 30, 50, 70, 100, 120, 150, 200, 250, 300, 1000 Mbps.

type BasicState

type BasicState struct {
	// Specifies the ID of an EIP. Changing this creates a new resource.
	EipId pulumi.StringPtrInput
	// The public address of the EIP.
	PublicIp pulumi.StringPtrInput
	// Specifies the region in which to manage the Cloud Native Anti-DDos Basic resource.
	// If omitted, the provider-level region will be used. Changing this creates a new resource.
	Region pulumi.StringPtrInput
	// The Anti-DDos status.
	Status pulumi.StringPtrInput
	// Specifies the traffic cleaning threshold in Mbps.
	// The value can be 10, 30, 50, 70, 100, 120, 150, 200, 250, 300, 1000 Mbps.
	TrafficThreshold pulumi.IntPtrInput
}

func (BasicState) ElementType

func (BasicState) ElementType() reflect.Type

type GetAntiddosArgs

type GetAntiddosArgs struct {
	// The Elastic IP address.
	FloatingIpAddress *string `pulumi:"floatingIpAddress"`
	// The Elastic IP ID.
	FloatingIpId *string `pulumi:"floatingIpId"`
	// The region in which to obtain the Antiddos client. If omitted, the provider-level region
	// will be used.
	Region *string `pulumi:"region"`
	// The defense status.
	Status *string `pulumi:"status"`
}

A collection of arguments for invoking getAntiddos.

type GetAntiddosOutputArgs

type GetAntiddosOutputArgs struct {
	// The Elastic IP address.
	FloatingIpAddress pulumi.StringPtrInput `pulumi:"floatingIpAddress"`
	// The Elastic IP ID.
	FloatingIpId pulumi.StringPtrInput `pulumi:"floatingIpId"`
	// The region in which to obtain the Antiddos client. If omitted, the provider-level region
	// will be used.
	Region pulumi.StringPtrInput `pulumi:"region"`
	// The defense status.
	Status pulumi.StringPtrInput `pulumi:"status"`
}

A collection of arguments for invoking getAntiddos.

func (GetAntiddosOutputArgs) ElementType

func (GetAntiddosOutputArgs) ElementType() reflect.Type

type GetAntiddosResult

type GetAntiddosResult struct {
	// The Attack traffic in (bit/s).
	BpsAttacks []int `pulumi:"bpsAttacks"`
	// The inbound traffic in (bit/s).
	BpsIns []int `pulumi:"bpsIns"`
	// The end time of cleaning and blackhole event.
	EndTimes          []int  `pulumi:"endTimes"`
	FloatingIpAddress string `pulumi:"floatingIpAddress"`
	FloatingIpId      string `pulumi:"floatingIpId"`
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// The EIP type.
	NetworkType string `pulumi:"networkType"`
	// The Start time.
	PeriodStarts []int `pulumi:"periodStarts"`
	// The attack packet rate (number of packets per second).
	PpsAttacks []int `pulumi:"ppsAttacks"`
	// The inbound packet rate (number of packets per second).
	PpsIns []int  `pulumi:"ppsIns"`
	Region string `pulumi:"region"`
	// The start time of cleaning and blackhole event.
	StartTimes []int  `pulumi:"startTimes"`
	Status     string `pulumi:"status"`
	// The total traffic.
	TotalBps []int `pulumi:"totalBps"`
	// The total packet rate.
	TotalPps []int `pulumi:"totalPps"`
	// The traffic cleaning status.
	TrafficCleaningStatuses []int `pulumi:"trafficCleaningStatuses"`
	// The traffic at the triggering point.
	TriggerBps []int `pulumi:"triggerBps"`
	// The HTTP request rate at the triggering point.
	TriggerHttpPps []int `pulumi:"triggerHttpPps"`
	// The packet rate at the triggering point.
	TriggerPps []int `pulumi:"triggerPps"`
}

A collection of values returned by getAntiddos.

func GetAntiddos

func GetAntiddos(ctx *pulumi.Context, args *GetAntiddosArgs, opts ...pulumi.InvokeOption) (*GetAntiddosResult, error)

!> **WARNING:** It has been deprecated.

Query the Anti-DDos resource.

## Example Usage

```go package main

import (

"github.com/huaweicloud/pulumi-huaweicloud/sdk/go/huaweicloud/AntiDDos"
"github.com/pulumi/pulumi-huaweicloud/sdk/go/huaweicloud/AntiDDos"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		eipId := cfg.RequireObject("eipId")
		_, err := AntiDDos.GetAntiddos(ctx, &antiddos.GetAntiddosArgs{
			FloatingIpId: pulumi.StringRef(eipId),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

```

type GetAntiddosResultOutput

type GetAntiddosResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getAntiddos.

func (GetAntiddosResultOutput) BpsAttacks

The Attack traffic in (bit/s).

func (GetAntiddosResultOutput) BpsIns

The inbound traffic in (bit/s).

func (GetAntiddosResultOutput) ElementType

func (GetAntiddosResultOutput) ElementType() reflect.Type

func (GetAntiddosResultOutput) EndTimes

The end time of cleaning and blackhole event.

func (GetAntiddosResultOutput) FloatingIpAddress

func (o GetAntiddosResultOutput) FloatingIpAddress() pulumi.StringOutput

func (GetAntiddosResultOutput) FloatingIpId

func (o GetAntiddosResultOutput) FloatingIpId() pulumi.StringOutput

func (GetAntiddosResultOutput) Id

The provider-assigned unique ID for this managed resource.

func (GetAntiddosResultOutput) NetworkType

The EIP type.

func (GetAntiddosResultOutput) PeriodStarts

The Start time.

func (GetAntiddosResultOutput) PpsAttacks

The attack packet rate (number of packets per second).

func (GetAntiddosResultOutput) PpsIns

The inbound packet rate (number of packets per second).

func (GetAntiddosResultOutput) Region

func (GetAntiddosResultOutput) StartTimes

The start time of cleaning and blackhole event.

func (GetAntiddosResultOutput) Status

func (GetAntiddosResultOutput) ToGetAntiddosResultOutput

func (o GetAntiddosResultOutput) ToGetAntiddosResultOutput() GetAntiddosResultOutput

func (GetAntiddosResultOutput) ToGetAntiddosResultOutputWithContext

func (o GetAntiddosResultOutput) ToGetAntiddosResultOutputWithContext(ctx context.Context) GetAntiddosResultOutput

func (GetAntiddosResultOutput) TotalBps

The total traffic.

func (GetAntiddosResultOutput) TotalPps

The total packet rate.

func (GetAntiddosResultOutput) TrafficCleaningStatuses

func (o GetAntiddosResultOutput) TrafficCleaningStatuses() pulumi.IntArrayOutput

The traffic cleaning status.

func (GetAntiddosResultOutput) TriggerBps

The traffic at the triggering point.

func (GetAntiddosResultOutput) TriggerHttpPps

func (o GetAntiddosResultOutput) TriggerHttpPps() pulumi.IntArrayOutput

The HTTP request rate at the triggering point.

func (GetAntiddosResultOutput) TriggerPps

The packet rate at the triggering point.

Jump to

Keyboard shortcuts

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