vpc

package
v1.0.0-beta.23 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 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
}

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 new Private Network. Once created, you can attach Scaleway resources in the same Availability Zone.

func (*API) DeletePrivateNetwork

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

DeletePrivateNetwork: Delete an existing Private Network. Note that you must first detach all resources from the network, in order to delete it.

func (*API) GetPrivateNetwork

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

GetPrivateNetwork: Retrieve information about an existing Private Network, specified by its Private Network ID. Its full details are returned in the response object.

func (*API) ListPrivateNetworks

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

ListPrivateNetworks: List existing Private Networks in a specified Availability Zone. By default, the Private Networks returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field.

func (*API) UpdatePrivateNetwork

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

UpdatePrivateNetwork: Update parameters (such as name or tags) of an existing Private Network, specified by its Private Network ID.

func (*API) Zones

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

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: name for the Private Network.
	Name string `json:"name"`

	// ProjectID: scaleway Project in which to create the Private Network.
	ProjectID string `json:"project_id"`

	// Tags: tags for the Private Network.
	Tags []string `json:"tags"`

	// Subnets: private Network subnets CIDR.
	Subnets []scw.IPNet `json:"subnets"`
}

CreatePrivateNetworkRequest: create private network request.

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: private Network ID.
	PrivateNetworkID string `json:"-"`
}

DeletePrivateNetworkRequest: delete private network request.

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: private Network ID.
	PrivateNetworkID string `json:"-"`
}

GetPrivateNetworkRequest: get private network request.

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: sort order of the returned Private Networks.
	// Default value: created_at_asc
	OrderBy ListPrivateNetworksRequestOrderBy `json:"-"`

	// Page: page number to return, from the paginated results.
	Page *int32 `json:"-"`

	// PageSize: maximum number of Private Networks to return per page.
	PageSize *uint32 `json:"-"`

	// Name: name to filter for. Only Private Networks with names containing this string will be returned.
	Name *string `json:"-"`

	// Tags: tags to filter for. Only Private Networks with one or more matching tags will be returned.
	Tags []string `json:"-"`

	// OrganizationID: organization ID to filter for. Only Private Networks belonging to this Organization will be returned.
	OrganizationID *string `json:"-"`

	// ProjectID: project ID to filter for. Only Private Networks belonging to this Project will be returned.
	ProjectID *string `json:"-"`

	// PrivateNetworkIDs: private Network IDs to filter for. Only Private Networks with one of these IDs will be returned.
	PrivateNetworkIDs []string `json:"-"`

	// IncludeRegional: defines whether to include regional Private Networks in the response.
	IncludeRegional *bool `json:"-"`
}

ListPrivateNetworksRequest: list private networks request.

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"`
}

ListPrivateNetworksResponse: list private networks response.

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: private Network ID.
	ID string `json:"id"`

	// Name: private Network name.
	Name string `json:"name"`

	// OrganizationID: scaleway Organization the Private Network belongs to.
	OrganizationID string `json:"organization_id"`

	// ProjectID: scaleway Project the Private Network belongs to.
	ProjectID string `json:"project_id"`

	// Zone: availability Zone in which the Private Network is available.
	Zone scw.Zone `json:"zone"`

	// Tags: tags of the Private Network.
	Tags []string `json:"tags"`

	// CreatedAt: date the Private Network was created.
	CreatedAt *time.Time `json:"created_at"`

	// UpdatedAt: date the Private Network was last modified.
	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: private Network ID.
	PrivateNetworkID string `json:"-"`

	// Name: name of the private network.
	Name *string `json:"name,omitempty"`

	// Tags: tags for the Private Network.
	Tags *[]string `json:"tags,omitempty"`

	// Deprecated: Subnets: private Network subnets CIDR (deprecated).
	Subnets *[]string `json:"subnets,omitempty"`
}

UpdatePrivateNetworkRequest: update private network request.

Jump to

Keyboard shortcuts

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