securitygroup

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: Apache-2.0 Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(restClient *client.RestClient, securitygroupId string, requestOpts *client.RequestOpts) error

func DeleteRule added in v0.3.15

func DeleteRule(restClient *client.RestClient, securitygroupId string, requestOpts *client.RequestOpts, ruleID string) error

func List

func List(restClient *client.RestClient, requestOpts *client.RequestOpts) (*[]SecurityGroupInfo, error)

func ListRule

func ListRule(restClient *client.RestClient, securitygroupId string, requestOpts *client.RequestOpts) (*[]SecurityGroupRules, error)

func ListRulesinSG added in v0.3.15

func ListRulesinSG(restClient *client.RestClient, securitygroupId string, requestOpts *client.RequestOpts) (*[]SecurityGroupRules, error)

Types

type SecurityGroupInfo

type SecurityGroupInfo struct {
	ID          string
	Name        string
	TenantID    string
	Creator     string
	State       string
	CreatedAt   string
	Protection  int
	Rules       []SecurityGroupRules
	RulesCount  int
	Description string
	AsID        string
}

func Create

func Create(restClient *client.RestClient, requestOpts *client.RequestOpts) (*SecurityGroupInfo, error)

func Get

func Get(restClient *client.RestClient, securitygroupId string, requestOpts *client.RequestOpts) (*SecurityGroupInfo, error)

type SecurityGroupRules

type SecurityGroupRules struct {
	ID         string `json:"id"`
	SecGroupID string `json:"secgroupId"`
	Name       string `json:"name"`
	Type       string `json:"type"`
	Port       string `json:"port"`
	Target     string `json:"target"`
	Protocol   string `json:"protocol"`
	Creator    string `json:"creator"`
	CreatedAt  string `json:"createdAt"`
}

func AddRule added in v0.3.15

func AddRule(restClient *client.RestClient, securitygroupId string, requestOpts *client.RequestOpts, rule string) (*SecurityGroupRules, error)

type SecurityReqInfo

type SecurityReqInfo struct {
	Name       string               `json:"name" required:"true"`
	Rules      []SecurityGroupRules `json:"rules" required:"false"`
	Protection int                  `json:"protection" required:"false"`
}

Jump to

Keyboard shortcuts

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