cloudapiflowlog

package
v6.6.7 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FlowlogSchemaDatasource = &schema.Resource{
	Schema: map[string]*schema.Schema{
		"id": {
			Type:        schema.TypeString,
			Computed:    true,
			Description: "The resource's unique identifier.",
		},
		"action": {
			Type:        schema.TypeString,
			Description: "Specifies the traffic direction pattern. Valid values: ACCEPTED, REJECTED, ALL.",
			Computed:    true,
		},
		"bucket": {
			Type:        schema.TypeString,
			Description: "The bucket name of an existing IONOS Object Storage bucket.",
			Computed:    true,
		},
		"direction": {
			Type:        schema.TypeString,
			Description: "Specifies the traffic direction pattern. Valid values: INGRESS, EGRESS, BIDIRECTIONAL.",
			Computed:    true,
		},
		"name": {
			Type:        schema.TypeString,
			Description: "The resource name.",
			Computed:    true,
		},
	},
}
View Source
var FlowlogSchemaResource = &schema.Resource{
	Schema: map[string]*schema.Schema{
		"id": {
			Type:        schema.TypeString,
			Computed:    true,
			Description: "The resource's unique identifier.",
		},
		"action": {
			Type:             schema.TypeString,
			Description:      "Specifies the traffic direction pattern. Valid values: ACCEPTED, REJECTED, ALL. Immutable, forces re-recreation of the nic resource.",
			ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"ACCEPTED", "REJECTED", "ALL"}, true)),
			DiffSuppressFunc: utils.DiffToLower,
			Required:         true,
		},
		"bucket": {
			Type:        schema.TypeString,
			Description: "The bucket name of an existing IONOS Object Storage bucket. Immutable, forces re-recreation of the nic resource.",
			Required:    true,
		},
		"direction": {
			Type:             schema.TypeString,
			Description:      "Specifies the traffic direction pattern. Valid values: INGRESS, EGRESS, BIDIRECTIONAL. Immutable, forces re-recreation of the nic resource.",
			ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"INGRESS", "EGRESS", "BIDIRECTIONAL"}, true)),
			DiffSuppressFunc: utils.DiffToLower,
			Required:         true,
		},
		"name": {
			Type:             schema.TypeString,
			Description:      "The resource name.",
			Required:         true,
			ValidateDiagFunc: validation.ToDiagFunc(validation.StringIsNotWhiteSpace),
		},
	},
}

Functions

func GetFlowlogFromMap

func GetFlowlogFromMap(flowLogMap map[string]any) ionoscloud.FlowLog

Types

type Service

type Service struct {
	Client *ionoscloud.APIClient
	Meta   interface{}
	D      *schema.ResourceData
}

func (*Service) CreateOrPatchForALB

func (fw *Service) CreateOrPatchForALB(ctx context.Context, dcId, albID, ID string, flowLog ionoscloud.FlowLog) error

func (*Service) CreateOrPatchForNLB

func (fw *Service) CreateOrPatchForNLB(ctx context.Context, dcId, nlbID, ID string, flowLog ionoscloud.FlowLog) error

func (*Service) CreateOrPatchForServer

func (fw *Service) CreateOrPatchForServer(ctx context.Context, dcId, srvID, nicID, ID string, flowLog ionoscloud.FlowLog) error

func (*Service) Delete

func (fw *Service) Delete(ctx context.Context, dcId string, srvID string, nicID, ID string) error

Delete - this method actually does not work for now

func (*Service) GetFlowLogForALB

func (fw *Service) GetFlowLogForALB(ctx context.Context, dcId, albID string, depth int32) (*ionoscloud.FlowLog, *ionoscloud.APIResponse, error)

GetFlowLogForALB - there can be only one flowlog per alb

Jump to

Keyboard shortcuts

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