Documentation ¶
Overview ¶
Package vpc provides methods and message types of the vpc v1 API.
Index ¶
- Constants
- type API
- func (s *API) CreatePrivateNetwork(req *CreatePrivateNetworkRequest, opts ...scw.RequestOption) (*PrivateNetwork, error)
- func (s *API) DeletePrivateNetwork(req *DeletePrivateNetworkRequest, opts ...scw.RequestOption) error
- func (s *API) GetPrivateNetwork(req *GetPrivateNetworkRequest, opts ...scw.RequestOption) (*PrivateNetwork, error)
- func (s *API) ListPrivateNetworks(req *ListPrivateNetworksRequest, opts ...scw.RequestOption) (*ListPrivateNetworksResponse, error)
- func (s *API) UpdatePrivateNetwork(req *UpdatePrivateNetworkRequest, opts ...scw.RequestOption) (*PrivateNetwork, error)
- func (s *API) Zones() []scw.Zone
- type CreatePrivateNetworkRequest
- type DeletePrivateNetworkRequest
- type GetPrivateNetworkRequest
- type ListPrivateNetworksRequest
- type ListPrivateNetworksRequestOrderBy
- type ListPrivateNetworksResponse
- type PrivateNetwork
- type UpdatePrivateNetworkRequest
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 (*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.
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 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 (enum ListPrivateNetworksRequestOrderBy) String() 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"` }
Click to show internal directories.
Click to hide internal directories.