Skip to content

Commit 1eb7a2f

Browse files
authored
docs(vpc): reworked vpc v1 and v2 doc (#1642)
1 parent 2c8602e commit 1eb7a2f

File tree

1 file changed

+38
-33
lines changed

1 file changed

+38
-33
lines changed

api/vpc/v1/vpc_sdk.go

Lines changed: 38 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -91,23 +91,23 @@ type ListPrivateNetworksResponse struct {
9191

9292
// PrivateNetwork: private network.
9393
type PrivateNetwork struct {
94-
// ID: the private network ID.
94+
// ID: private Network ID.
9595
ID string `json:"id"`
96-
// Name: the private network name.
96+
// Name: private Network name.
9797
Name string `json:"name"`
98-
// OrganizationID: the private network organization.
98+
// OrganizationID: scaleway Organization the Private Network belongs to.
9999
OrganizationID string `json:"organization_id"`
100-
// ProjectID: the private network project ID.
100+
// ProjectID: scaleway Project the Private Network belongs to.
101101
ProjectID string `json:"project_id"`
102-
// Zone: the zone in which the private network is available.
102+
// Zone: availability Zone in which the Private Network is available.
103103
Zone scw.Zone `json:"zone"`
104-
// Tags: the private network tags.
104+
// Tags: tags of the Private Network.
105105
Tags []string `json:"tags"`
106-
// CreatedAt: the private network creation date.
106+
// CreatedAt: date the Private Network was created.
107107
CreatedAt *time.Time `json:"created_at"`
108-
// UpdatedAt: the last private network modification date.
108+
// UpdatedAt: date the Private Network was last modified.
109109
UpdatedAt *time.Time `json:"updated_at"`
110-
// Subnets: private network subnets CIDR.
110+
// Subnets: private Network subnets CIDR.
111111
Subnets []scw.IPNet `json:"subnets"`
112112
}
113113

@@ -121,28 +121,29 @@ func (s *API) Zones() []scw.Zone {
121121
type ListPrivateNetworksRequest struct {
122122
// Zone: zone to target. If none is passed will use default zone from the config.
123123
Zone scw.Zone `json:"-"`
124-
// OrderBy: the sort order of the returned private networks.
124+
// OrderBy: sort order of the returned Private Networks.
125125
// Default value: created_at_asc
126126
OrderBy ListPrivateNetworksRequestOrderBy `json:"-"`
127-
// Page: the page number for the returned private networks.
127+
// Page: page number to return, from the paginated results.
128128
Page *int32 `json:"-"`
129-
// PageSize: the maximum number of private networks per page.
129+
// PageSize: maximum number of Private Networks to return per page.
130130
PageSize *uint32 `json:"-"`
131-
// Name: filter private networks with names containing this string.
131+
// Name: name to filter for. Only Private Networks with names containing this string will be returned.
132132
Name *string `json:"-"`
133-
// Tags: filter private networks with one or more matching tags.
133+
// Tags: tags to filter for. Only Private Networks with one or more matching tags will be returned.
134134
Tags []string `json:"-"`
135-
// OrganizationID: the organization ID on which to filter the returned private networks.
135+
// OrganizationID: organization ID to filter for. Only Private Networks belonging to this Organization will be returned.
136136
OrganizationID *string `json:"-"`
137-
// ProjectID: the project ID on which to filter the returned private networks.
137+
// ProjectID: project ID to filter for. Only Private Networks belonging to this Project will be returned.
138138
ProjectID *string `json:"-"`
139-
// PrivateNetworkIDs: the PrivateNetwork IDs on which to filter the returned private networks.
139+
// PrivateNetworkIDs: private Network IDs to filter for. Only Private Networks with one of these IDs will be returned.
140140
PrivateNetworkIDs []string `json:"-"`
141-
// IncludeRegional: include regional Private Networks.
141+
// IncludeRegional: defines whether to include regional Private Networks in the response.
142142
IncludeRegional *bool `json:"-"`
143143
}
144144

145-
// ListPrivateNetworks: list private networks.
145+
// ListPrivateNetworks: list Private Networks.
146+
// 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.
146147
func (s *API) ListPrivateNetworks(req *ListPrivateNetworksRequest, opts ...scw.RequestOption) (*ListPrivateNetworksResponse, error) {
147148
var err error
148149

@@ -190,17 +191,18 @@ func (s *API) ListPrivateNetworks(req *ListPrivateNetworksRequest, opts ...scw.R
190191
type CreatePrivateNetworkRequest struct {
191192
// Zone: zone to target. If none is passed will use default zone from the config.
192193
Zone scw.Zone `json:"-"`
193-
// Name: the name of the private network.
194+
// Name: name for the Private Network.
194195
Name string `json:"name"`
195-
// ProjectID: the project ID of the private network.
196+
// ProjectID: scaleway Project in which to create the Private Network.
196197
ProjectID string `json:"project_id"`
197-
// Tags: the private networks tags.
198+
// Tags: tags for the Private Network.
198199
Tags []string `json:"tags"`
199-
// Subnets: private network subnets CIDR.
200+
// Subnets: private Network subnets CIDR.
200201
Subnets []scw.IPNet `json:"subnets"`
201202
}
202203

203-
// CreatePrivateNetwork: create a private network.
204+
// CreatePrivateNetwork: create a Private Network.
205+
// Create a new Private Network. Once created, you can attach Scaleway resources in the same Availability Zone.
204206
func (s *API) CreatePrivateNetwork(req *CreatePrivateNetworkRequest, opts ...scw.RequestOption) (*PrivateNetwork, error) {
205207
var err error
206208

@@ -245,11 +247,12 @@ func (s *API) CreatePrivateNetwork(req *CreatePrivateNetworkRequest, opts ...scw
245247
type GetPrivateNetworkRequest struct {
246248
// Zone: zone to target. If none is passed will use default zone from the config.
247249
Zone scw.Zone `json:"-"`
248-
// PrivateNetworkID: the private network id.
250+
// PrivateNetworkID: private Network ID.
249251
PrivateNetworkID string `json:"-"`
250252
}
251253

252-
// GetPrivateNetwork: get a private network.
254+
// GetPrivateNetwork: get a Private Network.
255+
// Retrieve information about an existing Private Network, specified by its Private Network ID. Its full details are returned in the response object.
253256
func (s *API) GetPrivateNetwork(req *GetPrivateNetworkRequest, opts ...scw.RequestOption) (*PrivateNetwork, error) {
254257
var err error
255258

@@ -284,17 +287,18 @@ func (s *API) GetPrivateNetwork(req *GetPrivateNetworkRequest, opts ...scw.Reque
284287
type UpdatePrivateNetworkRequest struct {
285288
// Zone: zone to target. If none is passed will use default zone from the config.
286289
Zone scw.Zone `json:"-"`
287-
// PrivateNetworkID: the private network ID.
290+
// PrivateNetworkID: private Network ID.
288291
PrivateNetworkID string `json:"-"`
289-
// Name: the name of the private network.
292+
// Name: name of the private network.
290293
Name *string `json:"name"`
291-
// Tags: the private networks tags.
294+
// Tags: tags for the Private Network.
292295
Tags *[]string `json:"tags"`
293-
// Deprecated: Subnets: private network subnets CIDR (deprecated).
296+
// Deprecated: Subnets: private Network subnets CIDR (deprecated).
294297
Subnets *[]string `json:"subnets,omitempty"`
295298
}
296299

297-
// UpdatePrivateNetwork: update private network.
300+
// UpdatePrivateNetwork: update Private Network.
301+
// Update parameters (such as name or tags) of an existing Private Network, specified by its Private Network ID.
298302
func (s *API) UpdatePrivateNetwork(req *UpdatePrivateNetworkRequest, opts ...scw.RequestOption) (*PrivateNetwork, error) {
299303
var err error
300304

@@ -334,11 +338,12 @@ func (s *API) UpdatePrivateNetwork(req *UpdatePrivateNetworkRequest, opts ...scw
334338
type DeletePrivateNetworkRequest struct {
335339
// Zone: zone to target. If none is passed will use default zone from the config.
336340
Zone scw.Zone `json:"-"`
337-
// PrivateNetworkID: the private network ID.
341+
// PrivateNetworkID: private Network ID.
338342
PrivateNetworkID string `json:"-"`
339343
}
340344

341-
// DeletePrivateNetwork: delete a private network.
345+
// DeletePrivateNetwork: delete a Private Network.
346+
// Delete an existing Private Network. Note that you must first detach all resources from the network, in order to delete it.
342347
func (s *API) DeletePrivateNetwork(req *DeletePrivateNetworkRequest, opts ...scw.RequestOption) error {
343348
var err error
344349

0 commit comments

Comments
 (0)