Skip to content

Commit 9ba9ae1

Browse files
authored
Merge branch 'master' into v1.4920.0
2 parents d16beba + 17accdc commit 9ba9ae1

File tree

34 files changed

+96
-31
lines changed

34 files changed

+96
-31
lines changed

api/account/v2/account_sdk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ type UpdateProjectRequest struct {
182182
Description *string `json:"description,omitempty"`
183183
}
184184

185-
// This API allows you to manage projects.
185+
// This API allows you to manage your Scaleway Projects.
186186
type API struct {
187187
client *scw.Client
188188
}

api/account/v3/account_sdk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ type ProjectAPIUpdateProjectRequest struct {
182182
Description *string `json:"description,omitempty"`
183183
}
184184

185-
// This API allows you to manage projects.
185+
// This API allows you to manage your Scaleway Projects.
186186
type ProjectAPI struct {
187187
client *scw.Client
188188
}

api/applesilicon/v1alpha1/applesilicon_sdk.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,7 @@ type UpdateServerRequest struct {
453453
Name *string `json:"name,omitempty"`
454454
}
455455

456+
// This API allows you to manage your Apple silicon machines.
456457
type API struct {
457458
client *scw.Client
458459
}

api/baremetal/v1/baremetal_sdk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1615,7 +1615,7 @@ type UpdateSettingRequest struct {
16151615
Enabled *bool `json:"enabled,omitempty"`
16161616
}
16171617

1618-
// This API allows to manage your Elastic Metal server.
1618+
// This API allows you to manage your Elastic Metal servers.
16191619
type API struct {
16201620
client *scw.Client
16211621
}

api/billing/v2alpha1/billing_sdk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ func (r *ListInvoicesResponse) UnsafeAppend(res interface{}) (uint32, error) {
476476
return uint32(len(results.Invoices)), nil
477477
}
478478

479-
// This API allows you to query your consumption.
479+
// This API allows you to manage and query your Scaleway billing and consumption.
480480
type API struct {
481481
client *scw.Client
482482
}

api/billing/v2beta1/billing_sdk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,7 @@ func (r *ListTaxesResponse) UnsafeAppend(res interface{}) (uint64, error) {
799799
return uint64(len(results.Taxes)), nil
800800
}
801801

802-
// This API allows you to query your consumption.
802+
// This API allows you to manage and query your Scaleway billing and consumption.
803803
type API struct {
804804
client *scw.Client
805805
}

api/block/v1alpha1/block_sdk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ type UpdateVolumeRequest struct {
775775
PerfIops *uint32 `json:"perf_iops,omitempty"`
776776
}
777777

778-
// This API allows you to use and manage your Block Storage volumes.
778+
// This API allows you to manage your Block Storage volumes.
779779
type API struct {
780780
client *scw.Client
781781
}

api/cockpit/v1beta1/cockpit_sdk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -931,7 +931,7 @@ type TriggerTestAlertRequest struct {
931931
ProjectID string `json:"project_id"`
932932
}
933933

934-
// The Cockpit API allows you to activate your Cockpit to store metrics and logs. It also provides you with a dedicated Grafana for dashboarding to visualize your metrics and logs.
934+
// This API allows you to manage your Scaleway Cockpit, for storing and visualizing metrics and logs.
935935
type API struct {
936936
client *scw.Client
937937
}

api/container/v1beta1/container_sdk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1605,7 +1605,7 @@ type UpdateTriggerRequest struct {
16051605
SqsConfig *UpdateTriggerRequestSqsClientConfig `json:"sqs_config,omitempty"`
16061606
}
16071607

1608-
// Serverless Containers API.
1608+
// This API allows you to manage your Serverless Containers.
16091609
type API struct {
16101610
client *scw.Client
16111611
}

api/documentdb/v1beta1/documentdb_sdk.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2311,6 +2311,7 @@ type UpgradeInstanceRequest struct {
23112311
MajorUpgradeWorkflow *UpgradeInstanceRequestMajorUpgradeWorkflow `json:"major_upgrade_workflow,omitempty"`
23122312
}
23132313

2314+
// This API allows you to manage your Document Databases.
23142315
type API struct {
23152316
client *scw.Client
23162317
}

api/domain/v2beta1/domain_sdk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2922,7 +2922,7 @@ type UpdateDNSZoneRequest struct {
29222922
ProjectID string `json:"project_id"`
29232923
}
29242924

2925-
// Manage your domains, DNS zones and records with the Domains and DNS API.
2925+
// This API allows you to manage your domains, DNS zones and records.
29262926
type API struct {
29272927
client *scw.Client
29282928
}

api/flexibleip/v1alpha1/flexibleip_sdk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ type UpdateFlexibleIPRequest struct {
484484
Reverse *string `json:"reverse,omitempty"`
485485
}
486486

487-
// Elastic Metal - Flexible IP API.
487+
// This API allows you to manage your Elastic Metal servers' flexible public IP addresses.
488488
type API struct {
489489
client *scw.Client
490490
}

api/function/v1beta1/function_sdk.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1737,6 +1737,7 @@ type UploadURL struct {
17371737
Headers map[string]*[]string `json:"headers"`
17381738
}
17391739

1740+
// This API allows you to manage your Serverless Functions.
17401741
type API struct {
17411742
client *scw.Client
17421743
}

api/iam/v1alpha1/iam_sdk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1986,7 +1986,7 @@ type UpdateUserRequest struct {
19861986
Tags *[]string `json:"tags,omitempty"`
19871987
}
19881988

1989-
// IAM API.
1989+
// This API allows you to manage Identity and Access Management (IAM) across your Scaleway Organizations, Projects and resources.
19901990
type API struct {
19911991
client *scw.Client
19921992
}

api/instance/v1/instance_sdk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3907,7 +3907,7 @@ type setSnapshotResponse struct {
39073907
Snapshot *Snapshot `json:"snapshot"`
39083908
}
39093909

3910-
// Instance API.
3910+
// This API allows you to manage your Instances.
39113911
type API struct {
39123912
client *scw.Client
39133913
}

api/iot/v1/iot_sdk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1578,7 +1578,7 @@ type UpdateRouteRequest struct {
15781578
RestConfig *UpdateRouteRequestRestConfig `json:"rest_config,omitempty"`
15791579
}
15801580

1581-
// This API allows you to manage IoT hubs and devices.
1581+
// This API allows you to manage your IoT hubs and devices.
15821582
type API struct {
15831583
client *scw.Client
15841584
}

api/ipam/v1/ipam_sdk.go

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,13 +244,20 @@ type ListIPsRequest struct {
244244
ProjectID *string `json:"-"`
245245

246246
// Zonal: zone to filter for. Only IPs that are zonal, and in this zone, will be returned.
247-
// Precisely one of Zonal, PrivateNetworkID must be set.
247+
// Precisely one of Zonal, PrivateNetworkID, SubnetID must be set.
248248
Zonal *string `json:"zonal,omitempty"`
249249

250250
// PrivateNetworkID: only IPs that are private, and in this Private Network, will be returned.
251-
// Precisely one of Zonal, PrivateNetworkID must be set.
251+
// Precisely one of Zonal, PrivateNetworkID, SubnetID must be set.
252252
PrivateNetworkID *string `json:"private_network_id,omitempty"`
253253

254+
// SubnetID: only IPs inside this exact subnet will be returned.
255+
// Precisely one of Zonal, PrivateNetworkID, SubnetID must be set.
256+
SubnetID *string `json:"subnet_id,omitempty"`
257+
258+
// VpcID: only IPs owned by resources in this VPC will be returned.
259+
VpcID *string `json:"-"`
260+
254261
// Attached: defines whether to filter only for IPs which are attached to a resource.
255262
Attached *bool `json:"-"`
256263

@@ -312,6 +319,14 @@ type ReleaseIPRequest struct {
312319
IPID string `json:"-"`
313320
}
314321

322+
// ReleaseIPSetRequest: release ip set request.
323+
type ReleaseIPSetRequest struct {
324+
// Region: region to target. If none is passed will use default region from the config.
325+
Region scw.Region `json:"-"`
326+
327+
IPIDs []string `json:"ip_ids"`
328+
}
329+
315330
// UpdateIPRequest: update ip request.
316331
type UpdateIPRequest struct {
317332
// Region: region to target. If none is passed will use default region from the config.
@@ -327,7 +342,7 @@ type UpdateIPRequest struct {
327342
Reverses []*Reverse `json:"reverses"`
328343
}
329344

330-
// This API allows you to manage IP addresses with Scaleway's IP Address Management tool.
345+
// This API allows you to manage your Scaleway IP addresses with our IP Address Management tool.
331346
type API struct {
332347
client *scw.Client
333348
}
@@ -413,6 +428,36 @@ func (s *API) ReleaseIP(req *ReleaseIPRequest, opts ...scw.RequestOption) error
413428
return nil
414429
}
415430

431+
// ReleaseIPSet:
432+
func (s *API) ReleaseIPSet(req *ReleaseIPSetRequest, opts ...scw.RequestOption) error {
433+
var err error
434+
435+
if req.Region == "" {
436+
defaultRegion, _ := s.client.GetDefaultRegion()
437+
req.Region = defaultRegion
438+
}
439+
440+
if fmt.Sprint(req.Region) == "" {
441+
return errors.New("field Region cannot be empty in request")
442+
}
443+
444+
scwReq := &scw.ScalewayRequest{
445+
Method: "POST",
446+
Path: "/ipam/v1/regions/" + fmt.Sprint(req.Region) + "/ip-sets/release",
447+
}
448+
449+
err = scwReq.SetBody(req)
450+
if err != nil {
451+
return err
452+
}
453+
454+
err = s.client.Do(scwReq, nil, opts...)
455+
if err != nil {
456+
return err
457+
}
458+
return nil
459+
}
460+
416461
// GetIP: Retrieve details of an existing IP, specified by its IP ID.
417462
func (s *API) GetIP(req *GetIPRequest, opts ...scw.RequestOption) (*IP, error) {
418463
var err error
@@ -499,6 +544,7 @@ func (s *API) ListIPs(req *ListIPsRequest, opts ...scw.RequestOption) (*ListIPsR
499544
parameter.AddToQuery(query, "page", req.Page)
500545
parameter.AddToQuery(query, "page_size", req.PageSize)
501546
parameter.AddToQuery(query, "project_id", req.ProjectID)
547+
parameter.AddToQuery(query, "vpc_id", req.VpcID)
502548
parameter.AddToQuery(query, "attached", req.Attached)
503549
parameter.AddToQuery(query, "resource_id", req.ResourceID)
504550
parameter.AddToQuery(query, "resource_type", req.ResourceType)
@@ -509,6 +555,7 @@ func (s *API) ListIPs(req *ListIPsRequest, opts ...scw.RequestOption) (*ListIPsR
509555
parameter.AddToQuery(query, "resource_name", req.ResourceName)
510556
parameter.AddToQuery(query, "zonal", req.Zonal)
511557
parameter.AddToQuery(query, "private_network_id", req.PrivateNetworkID)
558+
parameter.AddToQuery(query, "subnet_id", req.SubnetID)
512559

513560
if fmt.Sprint(req.Region) == "" {
514561
return nil, errors.New("field Region cannot be empty in request")

api/ipam/v1alpha1/ipam_sdk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ func (r *ListIPsResponse) UnsafeAppend(res interface{}) (uint64, error) {
249249
return uint64(len(results.IPs)), nil
250250
}
251251

252-
// IPAM API.
252+
// This API allows you to manage your Scaleway IP addresses with our IP Address Management tool.
253253
type API struct {
254254
client *scw.Client
255255
}

api/jobs/v1alpha1/jobs_sdk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ type UpdateJobDefinitionRequest struct {
452452
CronSchedule *UpdateJobDefinitionRequestCronScheduleConfig `json:"cron_schedule,omitempty"`
453453
}
454454

455-
// Serverless Jobs API.
455+
// This API allows you to manage your Serverless Jobs.
456456
type API struct {
457457
client *scw.Client
458458
}

api/k8s/v1/k8s_sdk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1780,7 +1780,7 @@ type UpgradePoolRequest struct {
17801780
Version string `json:"version"`
17811781
}
17821782

1783-
// Kubernetes API.
1783+
// This API allows you to manage Kubernetes Kapsule and Kosmos clusters.
17841784
type API struct {
17851785
client *scw.Client
17861786
}

api/lb/v1/lb_sdk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6295,7 +6295,7 @@ func (s *ZonedAPI) DetachPrivateNetwork(req *ZonedAPIDetachPrivateNetworkRequest
62956295
return nil
62966296
}
62976297

6298-
// This API allows you to manage your load balancer service.
6298+
// This API allows you to manage your Load Balancers.
62996299
type API struct {
63006300
client *scw.Client
63016301
}

api/marketplace/v2/marketplace_sdk.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,7 @@ func (r *ListVersionsResponse) UnsafeAppend(res interface{}) (uint32, error) {
437437
return uint32(len(results.Versions)), nil
438438
}
439439

440+
// This API allows you to find available images for use when launching a Scaleway Instance.
440441
type API struct {
441442
client *scw.Client
442443
}

api/mnq/v1beta1/mnq_sdk.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,7 @@ type SqsInfo struct {
868868
SqsEndpointURL string `json:"sqs_endpoint_url"`
869869
}
870870

871-
// This API allows you to manage Scaleway Messaging and Queueing NATS accounts.
871+
// This API allows you to manage Scaleway Messaging and Queuing NATS accounts.
872872
type NatsAPI struct {
873873
client *scw.Client
874874
}
@@ -1194,7 +1194,7 @@ func (s *NatsAPI) ListNatsCredentials(req *NatsAPIListNatsCredentialsRequest, op
11941194
return &resp, nil
11951195
}
11961196

1197-
// This API allows you to manage Scaleway Messaging and Queueing SNS brokers.
1197+
// This API allows you to manage your Scaleway Messaging and Queuing SNS brokers.
11981198
type SnsAPI struct {
11991199
client *scw.Client
12001200
}
@@ -1495,7 +1495,7 @@ func (s *SnsAPI) ListSnsCredentials(req *SnsAPIListSnsCredentialsRequest, opts .
14951495
return &resp, nil
14961496
}
14971497

1498-
// This API allows you to manage Scaleway Messaging and Queueing SQS brokers.
1498+
// This API allows you to manage your Scaleway Messaging and Queuing SQS brokers.
14991499
type SqsAPI struct {
15001500
client *scw.Client
15011501
}

api/rdb/v1/rdb_sdk.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -971,6 +971,11 @@ type BackupSchedule struct {
971971
NextRunAt *time.Time `json:"next_run_at"`
972972
}
973973

974+
// EncryptionAtRest: encryption at rest.
975+
type EncryptionAtRest struct {
976+
Enabled bool `json:"enabled"`
977+
}
978+
974979
// InstanceSetting: instance setting.
975980
type InstanceSetting struct {
976981
Name string `json:"name"`
@@ -1318,6 +1323,9 @@ type Instance struct {
13181323

13191324
// Maintenances: list of Database Instance maintenance events.
13201325
Maintenances []*Maintenance `json:"maintenances"`
1326+
1327+
// Encryption: encryption at rest settings for your Database Instance.
1328+
Encryption *EncryptionAtRest `json:"encryption"`
13211329
}
13221330

13231331
// NodeType: node type.
@@ -1610,6 +1618,9 @@ type CreateInstanceRequest struct {
16101618

16111619
// BackupSameRegion: defines whether to or not to store logical backups in the same region as the Database Instance.
16121620
BackupSameRegion bool `json:"backup_same_region"`
1621+
1622+
// Encryption: encryption at rest settings for your Database Instance.
1623+
Encryption *EncryptionAtRest `json:"encryption,omitempty"`
16131624
}
16141625

16151626
// CreateReadReplicaEndpointRequest: create read replica endpoint request.
@@ -2614,6 +2625,7 @@ type UpgradeInstanceRequest struct {
26142625
MajorUpgradeWorkflow *UpgradeInstanceRequestMajorUpgradeWorkflow `json:"major_upgrade_workflow,omitempty"`
26152626
}
26162627

2628+
// This API allows you to manage your Managed Databases for PostgreSQL and MySQL.
26172629
type API struct {
26182630
client *scw.Client
26192631
}

api/redis/v1/redis_sdk.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -936,6 +936,7 @@ type UpdateEndpointRequest struct {
936936
PublicNetwork *EndpointSpecPublicNetworkSpec `json:"public_network,omitempty"`
937937
}
938938

939+
// This API allows you to manage your Managed Databases for Redis™.
939940
type API struct {
940941
client *scw.Client
941942
}

api/registry/v1/registry_sdk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ type UpdateNamespaceRequest struct {
641641
IsPublic *bool `json:"is_public,omitempty"`
642642
}
643643

644-
// Container Registry API.
644+
// This API allows you to manage your Container Registry resources.
645645
type API struct {
646646
client *scw.Client
647647
}

api/secret/v1alpha1/secret_sdk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -969,7 +969,7 @@ type UpdateSecretVersionRequest struct {
969969
EphemeralProperties *EphemeralProperties `json:"ephemeral_properties,omitempty"`
970970
}
971971

972-
// This API allows you to conveniently store, access and share sensitive data.
972+
// This API allows you to manage your Secret Manager services, for storing, accessing and sharing sensitive data such as passwords, API keys and certificates.
973973
type API struct {
974974
client *scw.Client
975975
}

api/secret/v1beta1/secret_sdk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -912,7 +912,7 @@ type UpdateSecretVersionRequest struct {
912912
EphemeralProperties *EphemeralProperties `json:"ephemeral_properties,omitempty"`
913913
}
914914

915-
// This API allows you to conveniently store, access and share sensitive data such as passwords, API keys and certificates.
915+
// This API allows you to manage your Secret Manager services, for storing, accessing and sharing sensitive data such as passwords, API keys and certificates.
916916
type API struct {
917917
client *scw.Client
918918
}

api/serverless_sqldb/v1alpha1/serverless_sqldb_sdk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ type UpdateDatabaseRequest struct {
438438
CPUMax *uint32 `json:"cpu_max,omitempty"`
439439
}
440440

441-
// This API allows you to manage your Serverless SQL DB databases.
441+
// This API allows you to manage your Serverless SQL Databases.
442442
type API struct {
443443
client *scw.Client
444444
}

0 commit comments

Comments
 (0)