vpcrouter

package
v2.32.2 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2022 License: Apache-2.0 Imports: 13 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdditionalNICSettingHolder

type AdditionalNICSettingHolder interface {
	// contains filtered or unexported methods
}

AdditionalNICSettingHolder VPCルータのeth1-eth7の設定

type AdditionalPremiumNICSetting

type AdditionalPremiumNICSetting struct {
	SwitchID         types.ID
	IPAddresses      []string
	VirtualIPAddress string
	NetworkMaskLen   int
	Index            int
}

AdditionalPremiumNICSetting VPCルータのeth1-eth7の設定(プレミアム/ハイスペックプラン向け)

type AdditionalPremiumNICSettingUpdate added in v2.9.0

type AdditionalPremiumNICSettingUpdate struct {
	SwitchID         *types.ID `request:",omitempty"`
	IPAddresses      *[]string `request:",omitempty"`
	VirtualIPAddress *string   `request:",omitempty"`
	NetworkMaskLen   *int      `request:",omitempty"`
	Index            int
}

type AdditionalStandardNICSetting

type AdditionalStandardNICSetting struct {
	SwitchID       types.ID
	IPAddress      string
	NetworkMaskLen int
	Index          int
}

AdditionalStandardNICSetting VPCルータのeth1-eth7の設定(スタンダードプラン向け)

type AdditionalStandardNICSettingUpdate added in v2.9.0

type AdditionalStandardNICSettingUpdate struct {
	SwitchID       *types.ID `request:",omitempty"`
	IPAddress      *string   `request:",omitempty"`
	NetworkMaskLen *int      `request:",omitempty"`
	Index          int       `request:",omitempty"`
}

type ApplyRequest

type ApplyRequest struct {
	Zone string   `request:"-" validate:"required"`
	ID   types.ID `request:"-"`

	Name        string `validate:"required"`
	Description string `validate:"min=0,max=512"`
	Tags        types.Tags
	IconID      types.ID

	PlanID                types.ID `validate:"required"`
	Version               int
	NICSetting            NICSettingHolder             // StandardNICSetting または PremiumNICSetting を指定する
	AdditionalNICSettings []AdditionalNICSettingHolder // AdditionalStandardNICSetting または AdditionalPremiumNICSetting を指定する
	RouterSetting         *RouterSetting
	NoWait                bool
	BootAfterCreate       bool
}

ApplyRequest Applyサービスへのパラメータ

NOTE: helper/builderを統合するまでの経過措置として、実際の処理をここで実装せずにhelper/builder/vpcrouter#Builderへ移譲する 利用者がbuilderに依存することをへの対応としてNICSettingHolderなどの型はここで実装する

func (*ApplyRequest) Builder

func (req *ApplyRequest) Builder(caller sacloud.APICaller) *vpcRouterBuilder.Builder

func (*ApplyRequest) Validate

func (req *ApplyRequest) Validate() error

type BootRequest

type BootRequest struct {
	Zone string   `request:"-" validate:"required"`
	ID   types.ID `request:"-" validate:"required"`

	NoWait bool `request:"-"`
}

func (*BootRequest) Validate

func (req *BootRequest) Validate() error

type CreateRequest

type CreateRequest struct {
	Zone string `request:"-" validate:"required"`

	Name        string `validate:"required"`
	Description string `validate:"min=0,max=512"`
	Tags        types.Tags
	IconID      types.ID

	PlanID                types.ID `validate:"required"`
	Version               int
	NICSetting            *PremiumNICSetting
	AdditionalNICSettings []*AdditionalPremiumNICSetting
	RouterSetting         *RouterSetting
	NoWait                bool
	BootAfterCreate       bool
}

func (*CreateRequest) ApplyRequest added in v2.9.0

func (req *CreateRequest) ApplyRequest() *ApplyRequest

func (*CreateRequest) Validate

func (req *CreateRequest) Validate() error

type CreateStandardRequest added in v2.9.0

type CreateStandardRequest struct {
	Zone string `request:"-" validate:"required"`

	Name        string `validate:"required"`
	Description string `validate:"min=0,max=512"`
	Tags        types.Tags
	IconID      types.ID

	Version int

	AdditionalNICSettings []*AdditionalStandardNICSetting
	RouterSetting         *RouterSetting
	NoWait                bool
	BootAfterCreate       bool
}

func (*CreateStandardRequest) ApplyRequest added in v2.9.0

func (req *CreateStandardRequest) ApplyRequest() *ApplyRequest

func (*CreateStandardRequest) Validate added in v2.9.0

func (req *CreateStandardRequest) Validate() error

type DeleteRequest

type DeleteRequest struct {
	Zone string   `request:"-" validate:"required"`
	ID   types.ID `request:"-" validate:"required"`

	FailIfNotFound bool `request:"-"`
	Force          bool `request:"-"` // trueの場合は電源OFF(強制終了)してから削除
}

func (*DeleteRequest) Validate

func (req *DeleteRequest) Validate() error

type FindRequest

type FindRequest struct {
	Zone string `request:"-" validate:"required"`

	Names []string `request:"-"`
	Tags  []string `request:"-"`

	Sort  search.SortKeys
	Count int
	From  int
}

func (*FindRequest) ToRequestParameter

func (req *FindRequest) ToRequestParameter() (*sacloud.FindCondition, error)

func (*FindRequest) Validate

func (req *FindRequest) Validate() error

type MonitorCPURequest added in v2.30.0

type MonitorCPURequest struct {
	Zone string   `request:"-" validate:"required"`
	ID   types.ID `request:"-" validate:"required"`

	Start time.Time
	End   time.Time
}

func (*MonitorCPURequest) Validate added in v2.30.0

func (req *MonitorCPURequest) Validate() error

type MonitorInterfaceRequest added in v2.9.0

type MonitorInterfaceRequest struct {
	Zone string   `request:"-" validate:"required"`
	ID   types.ID `request:"-" validate:"required"`

	Start time.Time
	End   time.Time
	Index int
}

func (*MonitorInterfaceRequest) Validate added in v2.9.0

func (req *MonitorInterfaceRequest) Validate() error

type NICSettingHolder

type NICSettingHolder interface {
	// contains filtered or unexported methods
}

NICSettingHolder VPCルータのeth0の設定 SharedNICSettingまたはRouterNICSettingを指定する

type PremiumNICSetting

type PremiumNICSetting struct {
	SwitchID         types.ID
	IPAddresses      []string
	VirtualIPAddress string
	IPAliases        []string
}

PremiumNICSetting VPCルータのeth0をスイッチ+ルータに接続するためのSetting(プレミアム/ハイスペックプラン)

type PremiumNICSettingUpdate added in v2.9.0

type PremiumNICSettingUpdate struct {
	IPAddresses      *[]string `request:",omitempty"`
	VirtualIPAddress *string   `request:",omitempty"`
	IPAliases        *[]string `request:",omitempty"`
}

type ReadRequest

type ReadRequest struct {
	Zone string   `request:"-" validate:"required"`
	ID   types.ID `request:"-" validate:"required"`
}

func (*ReadRequest) Validate

func (req *ReadRequest) Validate() error

type ResetRequest

type ResetRequest struct {
	Zone string   `request:"-" validate:"required"`
	ID   types.ID `request:"-" validate:"required"`
}

func (*ResetRequest) Validate

func (req *ResetRequest) Validate() error

type RouterSetting

type RouterSetting struct {
	VRID                      int
	InternetConnectionEnabled types.StringFlag
	StaticNAT                 []*sacloud.VPCRouterStaticNAT
	PortForwarding            []*sacloud.VPCRouterPortForwarding
	Firewall                  []*sacloud.VPCRouterFirewall
	DHCPServer                []*sacloud.VPCRouterDHCPServer
	DHCPStaticMapping         []*sacloud.VPCRouterDHCPStaticMapping
	DNSForwarding             *sacloud.VPCRouterDNSForwarding
	PPTPServer                *sacloud.VPCRouterPPTPServer
	L2TPIPsecServer           *sacloud.VPCRouterL2TPIPsecServer
	WireGuard                 *sacloud.VPCRouterWireGuard
	RemoteAccessUsers         []*sacloud.VPCRouterRemoteAccessUser
	SiteToSiteIPsecVPN        []*sacloud.VPCRouterSiteToSiteIPsecVPN
	StaticRoute               []*sacloud.VPCRouterStaticRoute
	SyslogHost                string
}

RouterSetting VPCルータの設定

type RouterSettingUpdate added in v2.9.0

type RouterSettingUpdate struct {
	InternetConnectionEnabled *bool                                   `request:",omitempty"`
	StaticNAT                 *[]*sacloud.VPCRouterStaticNAT          `request:",omitempty,recursive"`
	PortForwarding            *[]*sacloud.VPCRouterPortForwarding     `request:",omitempty,recursive"`
	Firewall                  *[]*sacloud.VPCRouterFirewall           `request:",omitempty,recursive"`
	DHCPServer                *[]*sacloud.VPCRouterDHCPServer         `request:",omitempty,recursive"`
	DHCPStaticMapping         *[]*sacloud.VPCRouterDHCPStaticMapping  `request:",omitempty,recursive"`
	PPTPServer                *sacloud.VPCRouterPPTPServer            `request:",omitempty,recursive"`
	L2TPIPsecServer           *sacloud.VPCRouterL2TPIPsecServer       `request:",omitempty,recursive"`
	WireGuard                 *sacloud.VPCRouterWireGuard             `request:",omitempty,recursive"`
	RemoteAccessUsers         *[]*sacloud.VPCRouterRemoteAccessUser   `request:",omitempty,recursive"`
	SiteToSiteIPsecVPN        *[]*sacloud.VPCRouterSiteToSiteIPsecVPN `request:",omitempty,recursive"`
	StaticRoute               *[]*sacloud.VPCRouterStaticRoute        `request:",omitempty,recursive"`
	SyslogHost                *string                                 `request:",omitempty"`
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service provides a high-level API of for VPCRouter

func New

func New(caller sacloud.APICaller) *Service

New returns new service instance of VPCRouter

func (*Service) Apply

func (s *Service) Apply(req *ApplyRequest) (*sacloud.VPCRouter, error)

func (*Service) ApplyWithContext

func (s *Service) ApplyWithContext(ctx context.Context, req *ApplyRequest) (*sacloud.VPCRouter, error)

func (*Service) Boot

func (s *Service) Boot(req *BootRequest) error

func (*Service) BootWithContext

func (s *Service) BootWithContext(ctx context.Context, req *BootRequest) error

func (*Service) Create

func (s *Service) Create(req *CreateRequest) (*sacloud.VPCRouter, error)

func (*Service) CreateStandard added in v2.9.0

func (s *Service) CreateStandard(req *CreateStandardRequest) (*sacloud.VPCRouter, error)

func (*Service) CreateStandardWithContext added in v2.9.0

func (s *Service) CreateStandardWithContext(ctx context.Context, req *CreateStandardRequest) (*sacloud.VPCRouter, error)

func (*Service) CreateWithContext

func (s *Service) CreateWithContext(ctx context.Context, req *CreateRequest) (*sacloud.VPCRouter, error)

func (*Service) Delete

func (s *Service) Delete(req *DeleteRequest) error

func (*Service) DeleteWithContext

func (s *Service) DeleteWithContext(ctx context.Context, req *DeleteRequest) error

func (*Service) Find

func (s *Service) Find(req *FindRequest) ([]*sacloud.VPCRouter, error)

func (*Service) FindWithContext

func (s *Service) FindWithContext(ctx context.Context, req *FindRequest) ([]*sacloud.VPCRouter, error)

func (*Service) MonitorCPU added in v2.30.0

func (s *Service) MonitorCPU(req *MonitorCPURequest) ([]*sacloud.MonitorCPUTimeValue, error)

func (*Service) MonitorCPUWithContext added in v2.30.0

func (s *Service) MonitorCPUWithContext(ctx context.Context, req *MonitorCPURequest) ([]*sacloud.MonitorCPUTimeValue, error)

func (*Service) MonitorInterface added in v2.9.0

func (s *Service) MonitorInterface(req *MonitorInterfaceRequest) ([]*sacloud.MonitorInterfaceValue, error)

func (*Service) MonitorInterfaceWithContext added in v2.9.0

func (s *Service) MonitorInterfaceWithContext(ctx context.Context, req *MonitorInterfaceRequest) ([]*sacloud.MonitorInterfaceValue, error)

func (*Service) Read

func (s *Service) Read(req *ReadRequest) (*sacloud.VPCRouter, error)

func (*Service) ReadWithContext

func (s *Service) ReadWithContext(ctx context.Context, req *ReadRequest) (*sacloud.VPCRouter, error)

func (*Service) Reset

func (s *Service) Reset(req *ResetRequest) error

func (*Service) ResetWithContext

func (s *Service) ResetWithContext(ctx context.Context, req *ResetRequest) error

func (*Service) Shutdown

func (s *Service) Shutdown(req *ShutdownRequest) error

func (*Service) ShutdownWithContext

func (s *Service) ShutdownWithContext(ctx context.Context, req *ShutdownRequest) error

func (*Service) Update

func (s *Service) Update(req *UpdateRequest) (*sacloud.VPCRouter, error)

func (*Service) UpdateStandard added in v2.9.0

func (s *Service) UpdateStandard(req *UpdateStandardRequest) (*sacloud.VPCRouter, error)

func (*Service) UpdateStandardWithContext added in v2.9.0

func (s *Service) UpdateStandardWithContext(ctx context.Context, req *UpdateStandardRequest) (*sacloud.VPCRouter, error)

func (*Service) UpdateWithContext

func (s *Service) UpdateWithContext(ctx context.Context, req *UpdateRequest) (*sacloud.VPCRouter, error)

func (*Service) WaitBoot

func (s *Service) WaitBoot(req *WaitBootRequest) error

func (*Service) WaitBootWithContext

func (s *Service) WaitBootWithContext(ctx context.Context, req *WaitBootRequest) error

func (*Service) WaitShutdown

func (s *Service) WaitShutdown(req *WaitShutdownRequest) error

func (*Service) WaitShutdownWithContext

func (s *Service) WaitShutdownWithContext(ctx context.Context, req *WaitShutdownRequest) error

type ShutdownRequest

type ShutdownRequest struct {
	Zone string   `request:"-" validate:"required"`
	ID   types.ID `request:"-" validate:"required"`

	NoWait        bool `request:"-"`
	ForceShutdown bool `request:"-"`
}

func (*ShutdownRequest) Validate

func (req *ShutdownRequest) Validate() error

type StandardNICSetting

type StandardNICSetting struct{}

StandardNICSetting VPCルータのeth0を共有セグメントに接続するためのSetting(スタンダードプラン)

type UpdateRequest

type UpdateRequest struct {
	Zone string   `request:"-" validate:"required"`
	ID   types.ID `request:"-" validate:"required"`

	Name        *string     `request:",omitempty" validate:"omitempty,min=1"`
	Description *string     `request:",omitempty" validate:"omitempty,min=1,max=512"`
	Tags        *types.Tags `request:",omitempty"`
	IconID      *types.ID   `request:",omitempty"`

	NICSetting            *PremiumNICSettingUpdate              `request:",omitempty,recursive"`
	AdditionalNICSettings *[]*AdditionalPremiumNICSettingUpdate `request:"-"` // Indexが同じものを手動でマージする
	RouterSetting         *RouterSettingUpdate                  `request:",omitempty,recursive"`
	NoWait                bool

	SettingsHash string
}

func (*UpdateRequest) ApplyRequest added in v2.9.0

func (req *UpdateRequest) ApplyRequest(ctx context.Context, caller sacloud.APICaller) (*ApplyRequest, error)

func (*UpdateRequest) Validate

func (req *UpdateRequest) Validate() error

type UpdateStandardRequest added in v2.9.0

type UpdateStandardRequest struct {
	Zone string   `request:"-" validate:"required"`
	ID   types.ID `request:"-" validate:"required"`

	Name        *string     `request:",omitempty" validate:"omitempty,min=1"`
	Description *string     `request:",omitempty" validate:"omitempty,min=1,max=512"`
	Tags        *types.Tags `request:",omitempty"`
	IconID      *types.ID   `request:",omitempty"`

	AdditionalNICSettings *[]*AdditionalStandardNICSettingUpdate `request:"-"` // Indexが同じものを手動でマージする
	RouterSetting         *RouterSettingUpdate                   `request:",omitempty,recursive"`
	NoWait                bool

	SettingsHash string
}

func (*UpdateStandardRequest) ApplyRequest added in v2.9.0

func (req *UpdateStandardRequest) ApplyRequest(ctx context.Context, caller sacloud.APICaller) (*ApplyRequest, error)

func (*UpdateStandardRequest) Validate added in v2.9.0

func (req *UpdateStandardRequest) Validate() error

type WaitBootRequest

type WaitBootRequest struct {
	Zone string   `request:"-" validate:"required"`
	ID   types.ID `request:"-" validate:"required"`
}

func (*WaitBootRequest) Validate

func (req *WaitBootRequest) Validate() error

type WaitShutdownRequest

type WaitShutdownRequest struct {
	Zone string   `request:"-" validate:"required"`
	ID   types.ID `request:"-" validate:"required"`
}

func (*WaitShutdownRequest) Validate

func (req *WaitShutdownRequest) Validate() error

Jump to

Keyboard shortcuts

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