vpc

package
v1.0.0-beta.14 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: Apache-2.0 Imports: 13 Imported by: 2

Documentation

Overview

Package vpc provides methods and message types of the vpc v1 API.

Index

Constants

View Source
const (
	ListPrivateNetworksRequestOrderByCreatedAtAsc  = ListPrivateNetworksRequestOrderBy("created_at_asc")
	ListPrivateNetworksRequestOrderByCreatedAtDesc = ListPrivateNetworksRequestOrderBy("created_at_desc")
	ListPrivateNetworksRequestOrderByNameAsc       = ListPrivateNetworksRequestOrderBy("name_asc")
	ListPrivateNetworksRequestOrderByNameDesc      = ListPrivateNetworksRequestOrderBy("name_desc")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

API: vPC API.

func NewAPI

func NewAPI(client *scw.Client) *API

NewAPI returns a API object from a Scaleway client.

func (*API) CreatePrivateNetwork

func (s *API) CreatePrivateNetwork(req *CreatePrivateNetworkRequest, opts ...scw.RequestOption) (*PrivateNetwork, error)

CreatePrivateNetwork: create a private network.

func (*API) DeletePrivateNetwork

func (s *API) DeletePrivateNetwork(req *DeletePrivateNetworkRequest, opts ...scw.RequestOption) error

DeletePrivateNetwork: delete a private network.

func (*API) GetPrivateNetwork

func (s *API) GetPrivateNetwork(req *GetPrivateNetworkRequest, opts ...scw.RequestOption) (*PrivateNetwork, error)

GetPrivateNetwork: get a private network.

func (*API) ListPrivateNetworks

func (s *API) ListPrivateNetworks(req *ListPrivateNetworksRequest, opts ...scw.RequestOption) (*ListPrivateNetworksResponse, error)

ListPrivateNetworks: list private networks.

func (*API) UpdatePrivateNetwork

func (s *API) UpdatePrivateNetwork(req *UpdatePrivateNetworkRequest, opts ...scw.RequestOption) (*PrivateNetwork, error)

UpdatePrivateNetwork: update private network.

func (*API) Zones

func (s *API) Zones() []scw.Zone

Zones list localities the api is available in

type CreatePrivateNetworkRequest

type CreatePrivateNetworkRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// Name: the name of the private network.
	Name string `json:"name"`
	// ProjectID: the project ID of the private network.
	ProjectID string `json:"project_id"`
	// Tags: the private networks tags.
	Tags []string `json:"tags"`
	// Subnets: private network subnets CIDR.
	Subnets []scw.IPNet `json:"subnets"`
}

type DeletePrivateNetworkRequest

type DeletePrivateNetworkRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// PrivateNetworkID: the private network ID.
	PrivateNetworkID string `json:"-"`
}

type GetPrivateNetworkRequest

type GetPrivateNetworkRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// PrivateNetworkID: the private network id.
	PrivateNetworkID string `json:"-"`
}

type ListPrivateNetworksRequest

type ListPrivateNetworksRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// OrderBy: the sort order of the returned private networks.
	// Default value: created_at_asc
	OrderBy ListPrivateNetworksRequestOrderBy `json:"-"`
	// Page: the page number for the returned private networks.
	Page *int32 `json:"-"`
	// PageSize: the maximum number of private networks per page.
	PageSize *uint32 `json:"-"`
	// Name: filter private networks with names containing this string.
	Name *string `json:"-"`
	// Tags: filter private networks with one or more matching tags.
	Tags []string `json:"-"`
	// OrganizationID: the organization ID on which to filter the returned private networks.
	OrganizationID *string `json:"-"`
	// ProjectID: the project ID on which to filter the returned private networks.
	ProjectID *string `json:"-"`
	// PrivateNetworkIDs: the PrivateNetwork IDs on which to filter the returned private networks.
	PrivateNetworkIDs []string `json:"-"`
}

type ListPrivateNetworksRequestOrderBy

type ListPrivateNetworksRequestOrderBy string

func (ListPrivateNetworksRequestOrderBy) MarshalJSON

func (enum ListPrivateNetworksRequestOrderBy) MarshalJSON() ([]byte, error)

func (ListPrivateNetworksRequestOrderBy) String

func (*ListPrivateNetworksRequestOrderBy) UnmarshalJSON

func (enum *ListPrivateNetworksRequestOrderBy) UnmarshalJSON(data []byte) error

type ListPrivateNetworksResponse

type ListPrivateNetworksResponse struct {
	PrivateNetworks []*PrivateNetwork `json:"private_networks"`

	TotalCount uint32 `json:"total_count"`
}

func (*ListPrivateNetworksResponse) UnsafeAppend

func (r *ListPrivateNetworksResponse) UnsafeAppend(res interface{}) (uint32, error)

UnsafeAppend should not be used Internal usage only

func (*ListPrivateNetworksResponse) UnsafeGetTotalCount

func (r *ListPrivateNetworksResponse) UnsafeGetTotalCount() uint32

UnsafeGetTotalCount should not be used Internal usage only

type PrivateNetwork

type PrivateNetwork struct {
	// ID: the private network ID.
	ID string `json:"id"`
	// Name: the private network name.
	Name string `json:"name"`
	// OrganizationID: the private network organization.
	OrganizationID string `json:"organization_id"`
	// ProjectID: the private network project ID.
	ProjectID string `json:"project_id"`
	// Zone: the zone in which the private network is available.
	Zone scw.Zone `json:"zone"`
	// Tags: the private network tags.
	Tags []string `json:"tags"`
	// CreatedAt: the private network creation date.
	CreatedAt *time.Time `json:"created_at"`
	// UpdatedAt: the last private network modification date.
	UpdatedAt *time.Time `json:"updated_at"`
	// Subnets: private network subnets CIDR.
	Subnets []scw.IPNet `json:"subnets"`
}

PrivateNetwork: private network.

type UpdatePrivateNetworkRequest

type UpdatePrivateNetworkRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// PrivateNetworkID: the private network ID.
	PrivateNetworkID string `json:"-"`
	// Name: the name of the private network.
	Name *string `json:"name"`
	// Tags: the private networks tags.
	Tags *[]string `json:"tags"`
	// Deprecated: Subnets: private network subnets CIDR (deprecated).
	Subnets *[]string `json:"subnets,omitempty"`
}

Jump to

Keyboard shortcuts

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