diff --git a/api/applesilicon/v1alpha1/applesilicon_sdk.go b/api/applesilicon/v1alpha1/applesilicon_sdk.go index ec4ee5d0e..70eeb3aa1 100644 --- a/api/applesilicon/v1alpha1/applesilicon_sdk.go +++ b/api/applesilicon/v1alpha1/applesilicon_sdk.go @@ -286,38 +286,10 @@ type ServerTypeMemory struct { // Service API -type GetServiceInfoRequest struct { - Zone scw.Zone `json:"-"` -} - -func (s *API) GetServiceInfo(req *GetServiceInfoRequest, opts ...scw.RequestOption) (*scw.ServiceInfo, error) { - var err error - - if req.Zone == "" { - defaultZone, _ := s.client.GetDefaultZone() - req.Zone = defaultZone - } - - if fmt.Sprint(req.Zone) == "" { - return nil, errors.New("field Zone cannot be empty in request") - } - - scwReq := &scw.ScalewayRequest{ - Method: "GET", - Path: "/apple-silicon/v1alpha1/zones/" + fmt.Sprint(req.Zone) + "", - Headers: http.Header{}, - } - - var resp scw.ServiceInfo - - err = s.client.Do(scwReq, &resp, opts...) - if err != nil { - return nil, err - } - return &resp, nil -} - type ListServerTypesRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` } @@ -352,6 +324,9 @@ func (s *API) ListServerTypes(req *ListServerTypesRequest, opts ...scw.RequestOp } type GetServerTypeRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // ServerType: server type identifier ServerType string `json:"-"` @@ -392,6 +367,9 @@ func (s *API) GetServerType(req *GetServerTypeRequest, opts ...scw.RequestOption } type CreateServerRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // Name: create a server with this given name Name string `json:"name"` @@ -446,6 +424,9 @@ func (s *API) CreateServer(req *CreateServerRequest, opts ...scw.RequestOption) } type ListServersRequest 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 servers // @@ -507,6 +488,9 @@ func (s *API) ListServers(req *ListServersRequest, opts ...scw.RequestOption) (* } type ListOSRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // Page: a positive integer to choose the page to return Page *int32 `json:"-"` @@ -563,6 +547,9 @@ func (s *API) ListOS(req *ListOSRequest, opts ...scw.RequestOption) (*ListOSResp } type GetOSRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // OsID: UUID of the OS you want to get OsID string `json:"-"` @@ -603,6 +590,9 @@ func (s *API) GetOS(req *GetOSRequest, opts ...scw.RequestOption) (*OS, error) { } type GetServerRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // ServerID: UUID of the server you want to get ServerID string `json:"-"` @@ -643,6 +633,9 @@ func (s *API) GetServer(req *GetServerRequest, opts ...scw.RequestOption) (*Serv } type UpdateServerRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // ServerID: UUID of the server you want to update ServerID string `json:"-"` @@ -690,6 +683,9 @@ func (s *API) UpdateServer(req *UpdateServerRequest, opts ...scw.RequestOption) } type DeleteServerRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // ServerID: UUID of the server you want to delete ServerID string `json:"-"` @@ -728,6 +724,9 @@ func (s *API) DeleteServer(req *DeleteServerRequest, opts ...scw.RequestOption) } type RebootServerRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // ServerID: UUID of the server you want to reboot ServerID string `json:"-"` @@ -773,6 +772,9 @@ func (s *API) RebootServer(req *RebootServerRequest, opts ...scw.RequestOption) } type ReinstallServerRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // ServerID: UUID of the server you want to reinstall ServerID string `json:"-"` diff --git a/api/baremetal/v1/baremetal_sdk.go b/api/baremetal/v1/baremetal_sdk.go index dbca8c422..5687a6834 100644 --- a/api/baremetal/v1/baremetal_sdk.go +++ b/api/baremetal/v1/baremetal_sdk.go @@ -875,6 +875,9 @@ type Setting struct { // Service API type ListServersRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // Page: page number Page *int32 `json:"-"` @@ -946,6 +949,9 @@ func (s *API) ListServers(req *ListServersRequest, opts ...scw.RequestOption) (* } type GetServerRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // ServerID: ID of the server ServerID string `json:"-"` @@ -986,6 +992,9 @@ func (s *API) GetServer(req *GetServerRequest, opts ...scw.RequestOption) (*Serv } type CreateServerRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // OfferID: offer ID of the new server OfferID string `json:"offer_id"` @@ -1053,6 +1062,9 @@ func (s *API) CreateServer(req *CreateServerRequest, opts ...scw.RequestOption) } type UpdateServerRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // ServerID: ID of the server to update ServerID string `json:"-"` @@ -1104,6 +1116,9 @@ func (s *API) UpdateServer(req *UpdateServerRequest, opts ...scw.RequestOption) } type InstallServerRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // ServerID: server ID to install ServerID string `json:"-"` @@ -1163,6 +1178,9 @@ func (s *API) InstallServer(req *InstallServerRequest, opts ...scw.RequestOption } type GetServerMetricsRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // ServerID: server ID to get the metrics ServerID string `json:"-"` @@ -1203,6 +1221,9 @@ func (s *API) GetServerMetrics(req *GetServerMetricsRequest, opts ...scw.Request } type DeleteServerRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // ServerID: ID of the server to delete ServerID string `json:"-"` @@ -1243,6 +1264,9 @@ func (s *API) DeleteServer(req *DeleteServerRequest, opts ...scw.RequestOption) } type RebootServerRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // ServerID: ID of the server to reboot ServerID string `json:"-"` @@ -1292,6 +1316,9 @@ func (s *API) RebootServer(req *RebootServerRequest, opts ...scw.RequestOption) } type StartServerRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // ServerID: ID of the server to start ServerID string `json:"-"` @@ -1341,6 +1368,9 @@ func (s *API) StartServer(req *StartServerRequest, opts ...scw.RequestOption) (* } type StopServerRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // ServerID: ID of the server to stop ServerID string `json:"-"` @@ -1386,6 +1416,9 @@ func (s *API) StopServer(req *StopServerRequest, opts ...scw.RequestOption) (*Se } type ListServerEventsRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // ServerID: ID of the server events searched ServerID string `json:"-"` @@ -1445,6 +1478,9 @@ func (s *API) ListServerEvents(req *ListServerEventsRequest, opts ...scw.Request } type StartBMCAccessRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // ServerID: ID of the server ServerID string `json:"-"` @@ -1496,6 +1532,9 @@ func (s *API) StartBMCAccess(req *StartBMCAccessRequest, opts ...scw.RequestOpti } type GetBMCAccessRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // ServerID: ID of the server ServerID string `json:"-"` @@ -1536,6 +1575,9 @@ func (s *API) GetBMCAccess(req *GetBMCAccessRequest, opts ...scw.RequestOption) } type StopBMCAccessRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // ServerID: ID of the server ServerID string `json:"-"` @@ -1574,6 +1616,9 @@ func (s *API) StopBMCAccess(req *StopBMCAccessRequest, opts ...scw.RequestOption } type UpdateIPRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // ServerID: ID of the server ServerID string `json:"-"` @@ -1627,6 +1672,9 @@ func (s *API) UpdateIP(req *UpdateIPRequest, opts ...scw.RequestOption) (*IP, er } type AddOptionServerRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // ServerID: ID of the server ServerID string `json:"-"` @@ -1678,6 +1726,9 @@ func (s *API) AddOptionServer(req *AddOptionServerRequest, opts ...scw.RequestOp } type DeleteOptionServerRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // ServerID: ID of the server ServerID string `json:"-"` @@ -1724,6 +1775,9 @@ func (s *API) DeleteOptionServer(req *DeleteOptionServerRequest, opts ...scw.Req } type ListOffersRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // Page: page number Page *int32 `json:"-"` @@ -1777,6 +1831,9 @@ func (s *API) ListOffers(req *ListOffersRequest, opts ...scw.RequestOption) (*Li } type GetOfferRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // OfferID: ID of the researched Offer OfferID string `json:"-"` @@ -1817,6 +1874,9 @@ func (s *API) GetOffer(req *GetOfferRequest, opts ...scw.RequestOption) (*Offer, } type GetOptionRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // OptionID: ID of the option OptionID string `json:"-"` @@ -1857,6 +1917,9 @@ func (s *API) GetOption(req *GetOptionRequest, opts ...scw.RequestOption) (*Opti } type ListOptionsRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // Page: page number Page *int32 `json:"-"` @@ -1911,6 +1974,9 @@ func (s *API) ListOptions(req *ListOptionsRequest, opts ...scw.RequestOption) (* } type ListSettingsRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // Page: page number Page *int32 `json:"-"` @@ -1967,6 +2033,9 @@ func (s *API) ListSettings(req *ListSettingsRequest, opts ...scw.RequestOption) } type UpdateSettingRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // SettingID: ID of the setting SettingID string `json:"-"` @@ -2014,6 +2083,9 @@ func (s *API) UpdateSetting(req *UpdateSettingRequest, opts ...scw.RequestOption } type ListOSRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // Page: page number Page *int32 `json:"-"` @@ -2065,6 +2137,9 @@ func (s *API) ListOS(req *ListOSRequest, opts ...scw.RequestOption) (*ListOSResp } type GetOSRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // OsID: ID of the OS OsID string `json:"-"` diff --git a/api/container/v1beta1/container_sdk.go b/api/container/v1beta1/container_sdk.go index 2d44cc593..6a2f3492f 100644 --- a/api/container/v1beta1/container_sdk.go +++ b/api/container/v1beta1/container_sdk.go @@ -671,6 +671,9 @@ type Token struct { // Service API type ListNamespacesRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` Page *int32 `json:"-"` @@ -731,6 +734,9 @@ func (s *API) ListNamespaces(req *ListNamespacesRequest, opts ...scw.RequestOpti } type GetNamespaceRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` NamespaceID string `json:"-"` @@ -771,6 +777,9 @@ func (s *API) GetNamespace(req *GetNamespaceRequest, opts ...scw.RequestOption) } type CreateNamespaceRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` Name string `json:"name"` @@ -827,6 +836,9 @@ func (s *API) CreateNamespace(req *CreateNamespaceRequest, opts ...scw.RequestOp } type UpdateNamespaceRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` NamespaceID string `json:"-"` @@ -878,6 +890,9 @@ func (s *API) UpdateNamespace(req *UpdateNamespaceRequest, opts ...scw.RequestOp } type DeleteNamespaceRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` NamespaceID string `json:"-"` @@ -918,6 +933,9 @@ func (s *API) DeleteNamespace(req *DeleteNamespaceRequest, opts ...scw.RequestOp } type ListContainersRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` Page *int32 `json:"-"` @@ -981,6 +999,9 @@ func (s *API) ListContainers(req *ListContainersRequest, opts ...scw.RequestOpti } type GetContainerRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` ContainerID string `json:"-"` @@ -1021,6 +1042,9 @@ func (s *API) GetContainer(req *GetContainerRequest, opts ...scw.RequestOption) } type CreateContainerRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` NamespaceID string `json:"namespace_id"` @@ -1103,6 +1127,9 @@ func (s *API) CreateContainer(req *CreateContainerRequest, opts ...scw.RequestOp } type UpdateContainerRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` ContainerID string `json:"-"` @@ -1187,6 +1214,9 @@ func (s *API) UpdateContainer(req *UpdateContainerRequest, opts ...scw.RequestOp } type DeleteContainerRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` ContainerID string `json:"-"` @@ -1227,6 +1257,9 @@ func (s *API) DeleteContainer(req *DeleteContainerRequest, opts ...scw.RequestOp } type DeployContainerRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` ContainerID string `json:"-"` @@ -1272,6 +1305,9 @@ func (s *API) DeployContainer(req *DeployContainerRequest, opts ...scw.RequestOp } type ListCronsRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` Page *int32 `json:"-"` @@ -1326,6 +1362,9 @@ func (s *API) ListCrons(req *ListCronsRequest, opts ...scw.RequestOption) (*List } type GetCronRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` CronID string `json:"-"` @@ -1366,6 +1405,9 @@ func (s *API) GetCron(req *GetCronRequest, opts ...scw.RequestOption) (*Cron, er } type CreateCronRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` ContainerID string `json:"container_id"` @@ -1409,6 +1451,9 @@ func (s *API) CreateCron(req *CreateCronRequest, opts ...scw.RequestOption) (*Cr } type UpdateCronRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` CronID string `json:"-"` @@ -1460,6 +1505,9 @@ func (s *API) UpdateCron(req *UpdateCronRequest, opts ...scw.RequestOption) (*Cr } type DeleteCronRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` CronID string `json:"-"` @@ -1500,6 +1548,9 @@ func (s *API) DeleteCron(req *DeleteCronRequest, opts ...scw.RequestOption) (*Cr } type ListLogsRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` ContainerID string `json:"-"` @@ -1557,6 +1608,9 @@ func (s *API) ListLogs(req *ListLogsRequest, opts ...scw.RequestOption) (*ListLo } type ListDomainsRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` Page *int32 `json:"-"` @@ -1610,6 +1664,9 @@ func (s *API) ListDomains(req *ListDomainsRequest, opts ...scw.RequestOption) (* } type GetDomainRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` DomainID string `json:"-"` @@ -1647,6 +1704,9 @@ func (s *API) GetDomain(req *GetDomainRequest, opts ...scw.RequestOption) (*Doma } type CreateDomainRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` Hostname string `json:"hostname"` @@ -1687,6 +1747,9 @@ func (s *API) CreateDomain(req *CreateDomainRequest, opts ...scw.RequestOption) } type DeleteDomainRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` DomainID string `json:"-"` @@ -1724,6 +1787,9 @@ func (s *API) DeleteDomain(req *DeleteDomainRequest, opts ...scw.RequestOption) } type IssueJWTRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` ContainerID *string `json:"-"` diff --git a/api/flexibleip/v1alpha1/flexibleip_sdk.go b/api/flexibleip/v1alpha1/flexibleip_sdk.go index 70f5587a8..29cf03b3c 100644 --- a/api/flexibleip/v1alpha1/flexibleip_sdk.go +++ b/api/flexibleip/v1alpha1/flexibleip_sdk.go @@ -289,6 +289,9 @@ type MACAddress struct { // Service API type CreateFlexibleIPRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // ProjectID: ID of the project to associate with the Flexible IP ProjectID string `json:"project_id"` @@ -341,6 +344,9 @@ func (s *API) CreateFlexibleIP(req *CreateFlexibleIPRequest, opts ...scw.Request } type GetFlexibleIPRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // FipID: flexible IP ID FipID string `json:"-"` @@ -379,6 +385,9 @@ func (s *API) GetFlexibleIP(req *GetFlexibleIPRequest, opts ...scw.RequestOption } type ListFlexibleIPsRequest 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 Flexible IPs // @@ -445,6 +454,9 @@ func (s *API) ListFlexibleIPs(req *ListFlexibleIPsRequest, opts ...scw.RequestOp } type UpdateFlexibleIPRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // FipID: ID of the Flexible IP to update FipID string `json:"-"` @@ -494,6 +506,9 @@ func (s *API) UpdateFlexibleIP(req *UpdateFlexibleIPRequest, opts ...scw.Request } type DeleteFlexibleIPRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // FipID: ID of the Flexible IP to delete FipID string `json:"-"` @@ -530,6 +545,9 @@ func (s *API) DeleteFlexibleIP(req *DeleteFlexibleIPRequest, opts ...scw.Request } type AttachFlexibleIPRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // FipsIDs: a list of Flexible IP IDs to attach // @@ -573,6 +591,9 @@ func (s *API) AttachFlexibleIP(req *AttachFlexibleIPRequest, opts ...scw.Request } type DetachFlexibleIPRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // FipsIDs: a list of Flexible IP IDs to detach // @@ -614,6 +635,9 @@ func (s *API) DetachFlexibleIP(req *DetachFlexibleIPRequest, opts ...scw.Request } type GenerateMACAddrRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // FipID: flexible IP ID on which to generate a Virtual MAC FipID string `json:"-"` @@ -661,6 +685,9 @@ func (s *API) GenerateMACAddr(req *GenerateMACAddrRequest, opts ...scw.RequestOp } type DuplicateMACAddrRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // FipID: flexible IP ID on which to duplicate the Virtual MAC // @@ -712,6 +739,9 @@ func (s *API) DuplicateMACAddr(req *DuplicateMACAddrRequest, opts ...scw.Request } type MoveMACAddrRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` FipID string `json:"-"` @@ -756,6 +786,9 @@ func (s *API) MoveMACAddr(req *MoveMACAddrRequest, opts ...scw.RequestOption) (* } type DeleteMACAddrRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // FipID: flexible IP ID from which to delete the Virtual MAC // diff --git a/api/function/v1beta1/function_sdk.go b/api/function/v1beta1/function_sdk.go index d8a92b83a..6d20386ae 100644 --- a/api/function/v1beta1/function_sdk.go +++ b/api/function/v1beta1/function_sdk.go @@ -751,6 +751,9 @@ type UploadURL struct { // Service API type ListNamespacesRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` Page *int32 `json:"-"` @@ -811,6 +814,9 @@ func (s *API) ListNamespaces(req *ListNamespacesRequest, opts ...scw.RequestOpti } type GetNamespaceRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` NamespaceID string `json:"-"` @@ -851,6 +857,9 @@ func (s *API) GetNamespace(req *GetNamespaceRequest, opts ...scw.RequestOption) } type CreateNamespaceRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` Name string `json:"name"` @@ -907,6 +916,9 @@ func (s *API) CreateNamespace(req *CreateNamespaceRequest, opts ...scw.RequestOp } type UpdateNamespaceRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` NamespaceID string `json:"-"` @@ -958,6 +970,9 @@ func (s *API) UpdateNamespace(req *UpdateNamespaceRequest, opts ...scw.RequestOp } type DeleteNamespaceRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` NamespaceID string `json:"-"` @@ -998,6 +1013,9 @@ func (s *API) DeleteNamespace(req *DeleteNamespaceRequest, opts ...scw.RequestOp } type ListFunctionsRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` Page *int32 `json:"-"` @@ -1061,6 +1079,9 @@ func (s *API) ListFunctions(req *ListFunctionsRequest, opts ...scw.RequestOption } type GetFunctionRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` FunctionID string `json:"-"` @@ -1101,6 +1122,9 @@ func (s *API) GetFunction(req *GetFunctionRequest, opts ...scw.RequestOption) (* } type CreateFunctionRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` Name string `json:"name"` @@ -1177,6 +1201,9 @@ func (s *API) CreateFunction(req *CreateFunctionRequest, opts ...scw.RequestOpti } type UpdateFunctionRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` FunctionID string `json:"-"` @@ -1251,6 +1278,9 @@ func (s *API) UpdateFunction(req *UpdateFunctionRequest, opts ...scw.RequestOpti } type DeleteFunctionRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` FunctionID string `json:"-"` @@ -1291,6 +1321,9 @@ func (s *API) DeleteFunction(req *DeleteFunctionRequest, opts ...scw.RequestOpti } type DeployFunctionRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` FunctionID string `json:"-"` @@ -1336,6 +1369,9 @@ func (s *API) DeployFunction(req *DeployFunctionRequest, opts ...scw.RequestOpti } type ListFunctionRuntimesRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` } @@ -1370,6 +1406,9 @@ func (s *API) ListFunctionRuntimes(req *ListFunctionRuntimesRequest, opts ...scw } type GetFunctionUploadURLRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` FunctionID string `json:"-"` @@ -1416,6 +1455,9 @@ func (s *API) GetFunctionUploadURL(req *GetFunctionUploadURLRequest, opts ...scw } type GetFunctionDownloadURLRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` FunctionID string `json:"-"` @@ -1456,6 +1498,9 @@ func (s *API) GetFunctionDownloadURL(req *GetFunctionDownloadURLRequest, opts .. } type ListCronsRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` Page *int32 `json:"-"` @@ -1510,6 +1555,9 @@ func (s *API) ListCrons(req *ListCronsRequest, opts ...scw.RequestOption) (*List } type GetCronRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` CronID string `json:"-"` @@ -1550,6 +1598,9 @@ func (s *API) GetCron(req *GetCronRequest, opts ...scw.RequestOption) (*Cron, er } type CreateCronRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` FunctionID string `json:"function_id"` @@ -1593,6 +1644,9 @@ func (s *API) CreateCron(req *CreateCronRequest, opts ...scw.RequestOption) (*Cr } type UpdateCronRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` CronID string `json:"-"` @@ -1644,6 +1698,9 @@ func (s *API) UpdateCron(req *UpdateCronRequest, opts ...scw.RequestOption) (*Cr } type DeleteCronRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` CronID string `json:"-"` @@ -1684,6 +1741,9 @@ func (s *API) DeleteCron(req *DeleteCronRequest, opts ...scw.RequestOption) (*Cr } type ListLogsRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` FunctionID string `json:"-"` @@ -1741,6 +1801,9 @@ func (s *API) ListLogs(req *ListLogsRequest, opts ...scw.RequestOption) (*ListLo } type ListDomainsRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` Page *int32 `json:"-"` @@ -1794,6 +1857,9 @@ func (s *API) ListDomains(req *ListDomainsRequest, opts ...scw.RequestOption) (* } type GetDomainRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` DomainID string `json:"-"` @@ -1831,6 +1897,9 @@ func (s *API) GetDomain(req *GetDomainRequest, opts ...scw.RequestOption) (*Doma } type CreateDomainRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` Hostname string `json:"hostname"` @@ -1871,6 +1940,9 @@ func (s *API) CreateDomain(req *CreateDomainRequest, opts ...scw.RequestOption) } type DeleteDomainRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` DomainID string `json:"-"` @@ -1908,6 +1980,9 @@ func (s *API) DeleteDomain(req *DeleteDomainRequest, opts ...scw.RequestOption) } type IssueJWTRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` FunctionID *string `json:"-"` diff --git a/api/instance/v1/instance_sdk.go b/api/instance/v1/instance_sdk.go index f645ed86b..41cdc712a 100644 --- a/api/instance/v1/instance_sdk.go +++ b/api/instance/v1/instance_sdk.go @@ -1657,6 +1657,9 @@ type setSnapshotResponse struct { // Service API type GetServerTypesAvailabilityRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` PerPage *uint32 `json:"-"` @@ -1705,6 +1708,9 @@ func (s *API) GetServerTypesAvailability(req *GetServerTypesAvailabilityRequest, } type ListServersTypesRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` PerPage *uint32 `json:"-"` @@ -1753,6 +1759,9 @@ func (s *API) ListServersTypes(req *ListServersTypesRequest, opts ...scw.Request } type ListVolumesTypesRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` PerPage *uint32 `json:"-"` @@ -1801,6 +1810,9 @@ func (s *API) ListVolumesTypes(req *ListVolumesTypesRequest, opts ...scw.Request } type ListServersRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // PerPage: a positive integer lower or equal to 100 to select the number of items to return // @@ -1885,6 +1897,9 @@ func (s *API) ListServers(req *ListServersRequest, opts ...scw.RequestOption) (* } type CreateServerRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // Name: the server name Name string `json:"name,omitempty"` @@ -1968,6 +1983,9 @@ func (s *API) createServer(req *CreateServerRequest, opts ...scw.RequestOption) } type DeleteServerRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` ServerID string `json:"-"` @@ -2006,6 +2024,9 @@ func (s *API) DeleteServer(req *DeleteServerRequest, opts ...scw.RequestOption) } type GetServerRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // ServerID: UUID of the server you want to get ServerID string `json:"-"` @@ -2046,6 +2067,9 @@ func (s *API) GetServer(req *GetServerRequest, opts ...scw.RequestOption) (*GetS } type setServerRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // ID: the server unique ID ID string `json:"-"` @@ -2158,6 +2182,9 @@ func (s *API) setServer(req *setServerRequest, opts ...scw.RequestOption) (*setS } type UpdateServerRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // ServerID: UUID of the server ServerID string `json:"-"` @@ -2225,6 +2252,9 @@ func (s *API) updateServer(req *UpdateServerRequest, opts ...scw.RequestOption) } type ListServerActionsRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` ServerID string `json:"-"` @@ -2265,6 +2295,9 @@ func (s *API) ListServerActions(req *ListServerActionsRequest, opts ...scw.Reque } type ServerActionRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // ServerID: UUID of the server ServerID string `json:"-"` @@ -2320,6 +2353,9 @@ func (s *API) ServerAction(req *ServerActionRequest, opts ...scw.RequestOption) } type ListServerUserDataRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // ServerID: UUID of the server ServerID string `json:"-"` @@ -2360,6 +2396,9 @@ func (s *API) ListServerUserData(req *ListServerUserDataRequest, opts ...scw.Req } type DeleteServerUserDataRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // ServerID: UUID of the server ServerID string `json:"-"` @@ -2404,6 +2443,9 @@ func (s *API) DeleteServerUserData(req *DeleteServerUserDataRequest, opts ...scw } type ListImagesRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` Organization *string `json:"-"` @@ -2470,6 +2512,9 @@ func (s *API) ListImages(req *ListImagesRequest, opts ...scw.RequestOption) (*Li } type GetImageRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // ImageID: UUID of the image you want to get ImageID string `json:"-"` @@ -2510,6 +2555,9 @@ func (s *API) GetImage(req *GetImageRequest, opts ...scw.RequestOption) (*GetIma } type CreateImageRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // Name: name of the image Name string `json:"name,omitempty"` @@ -2583,6 +2631,9 @@ func (s *API) CreateImage(req *CreateImageRequest, opts ...scw.RequestOption) (* } type SetImageRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` ID string `json:"-"` @@ -2668,6 +2719,9 @@ func (s *API) setImage(req *SetImageRequest, opts ...scw.RequestOption) (*setIma } type DeleteImageRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // ImageID: UUID of the image you want to delete ImageID string `json:"-"` @@ -2706,6 +2760,9 @@ func (s *API) DeleteImage(req *DeleteImageRequest, opts ...scw.RequestOption) er } type ListSnapshotsRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` Organization *string `json:"-"` @@ -2764,6 +2821,9 @@ func (s *API) ListSnapshots(req *ListSnapshotsRequest, opts ...scw.RequestOption } type CreateSnapshotRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // Name: name of the snapshot Name string `json:"name,omitempty"` @@ -2827,6 +2887,9 @@ func (s *API) CreateSnapshot(req *CreateSnapshotRequest, opts ...scw.RequestOpti } type GetSnapshotRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // SnapshotID: UUID of the snapshot you want to get SnapshotID string `json:"-"` @@ -2867,6 +2930,9 @@ func (s *API) GetSnapshot(req *GetSnapshotRequest, opts ...scw.RequestOption) (* } type setSnapshotRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` SnapshotID string `json:"-"` @@ -2948,6 +3014,9 @@ func (s *API) setSnapshot(req *setSnapshotRequest, opts ...scw.RequestOption) (* } type DeleteSnapshotRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // SnapshotID: UUID of the snapshot you want to delete SnapshotID string `json:"-"` @@ -2986,6 +3055,9 @@ func (s *API) DeleteSnapshot(req *DeleteSnapshotRequest, opts ...scw.RequestOpti } type ListVolumesRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // VolumeType: filter by volume type // @@ -3053,6 +3125,9 @@ func (s *API) ListVolumes(req *ListVolumesRequest, opts ...scw.RequestOption) (* } type CreateVolumeRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // Name: the volume name Name string `json:"name,omitempty"` @@ -3127,6 +3202,9 @@ func (s *API) CreateVolume(req *CreateVolumeRequest, opts ...scw.RequestOption) } type GetVolumeRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // VolumeID: UUID of the volume you want to get VolumeID string `json:"-"` @@ -3167,6 +3245,9 @@ func (s *API) GetVolume(req *GetVolumeRequest, opts ...scw.RequestOption) (*GetV } type UpdateVolumeRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // VolumeID: UUID of the volume VolumeID string `json:"-"` @@ -3218,6 +3299,9 @@ func (s *API) UpdateVolume(req *UpdateVolumeRequest, opts ...scw.RequestOption) } type DeleteVolumeRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // VolumeID: UUID of the volume you want to delete VolumeID string `json:"-"` @@ -3256,6 +3340,9 @@ func (s *API) DeleteVolume(req *DeleteVolumeRequest, opts ...scw.RequestOption) } type ListSecurityGroupsRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // Name: name of the security group Name *string `json:"-"` @@ -3320,6 +3407,9 @@ func (s *API) ListSecurityGroups(req *ListSecurityGroupsRequest, opts ...scw.Req } type CreateSecurityGroupRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // Name: name of the security group Name string `json:"name,omitempty"` @@ -3407,6 +3497,9 @@ func (s *API) CreateSecurityGroup(req *CreateSecurityGroupRequest, opts ...scw.R } type GetSecurityGroupRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // SecurityGroupID: UUID of the security group you want to get SecurityGroupID string `json:"-"` @@ -3447,6 +3540,9 @@ func (s *API) GetSecurityGroup(req *GetSecurityGroupRequest, opts ...scw.Request } type DeleteSecurityGroupRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // SecurityGroupID: UUID of the security group you want to delete SecurityGroupID string `json:"-"` @@ -3483,6 +3579,9 @@ func (s *API) DeleteSecurityGroup(req *DeleteSecurityGroupRequest, opts ...scw.R } type setSecurityGroupRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // ID: the ID of the security group (will be ignored) ID string `json:"-"` @@ -3570,6 +3669,9 @@ func (s *API) setSecurityGroup(req *setSecurityGroupRequest, opts ...scw.Request } type ListSecurityGroupRulesRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // SecurityGroupID: UUID of the security group SecurityGroupID string `json:"-"` @@ -3624,6 +3726,9 @@ func (s *API) ListSecurityGroupRules(req *ListSecurityGroupRulesRequest, opts .. } type CreateSecurityGroupRuleRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // SecurityGroupID: UUID of the security group SecurityGroupID string `json:"-"` @@ -3689,6 +3794,9 @@ func (s *API) CreateSecurityGroupRule(req *CreateSecurityGroupRuleRequest, opts } type DeleteSecurityGroupRuleRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` SecurityGroupID string `json:"-"` @@ -3733,6 +3841,9 @@ func (s *API) DeleteSecurityGroupRule(req *DeleteSecurityGroupRuleRequest, opts } type GetSecurityGroupRuleRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` SecurityGroupID string `json:"-"` @@ -3779,6 +3890,9 @@ func (s *API) GetSecurityGroupRule(req *GetSecurityGroupRuleRequest, opts ...scw } type setSecurityGroupRuleRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` SecurityGroupID string `json:"-"` @@ -3852,6 +3966,9 @@ func (s *API) setSecurityGroupRule(req *setSecurityGroupRuleRequest, opts ...scw } type ListPlacementGroupsRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // PerPage: a positive integer lower or equal to 100 to select the number of items to return // @@ -3916,6 +4033,9 @@ func (s *API) ListPlacementGroups(req *ListPlacementGroupsRequest, opts ...scw.R } type CreatePlacementGroupRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // Name: name of the placement group Name string `json:"name,omitempty"` @@ -3987,6 +4107,9 @@ func (s *API) CreatePlacementGroup(req *CreatePlacementGroupRequest, opts ...scw } type GetPlacementGroupRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // PlacementGroupID: UUID of the placement group you want to get PlacementGroupID string `json:"-"` @@ -4027,6 +4150,9 @@ func (s *API) GetPlacementGroup(req *GetPlacementGroupRequest, opts ...scw.Reque } type SetPlacementGroupRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` PlacementGroupID string `json:"-"` @@ -4098,6 +4224,9 @@ func (s *API) SetPlacementGroup(req *SetPlacementGroupRequest, opts ...scw.Reque } type UpdatePlacementGroupRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // PlacementGroupID: UUID of the placement group PlacementGroupID string `json:"-"` @@ -4155,6 +4284,9 @@ func (s *API) UpdatePlacementGroup(req *UpdatePlacementGroupRequest, opts ...scw } type DeletePlacementGroupRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // PlacementGroupID: UUID of the placement group you want to delete PlacementGroupID string `json:"-"` @@ -4193,6 +4325,9 @@ func (s *API) DeletePlacementGroup(req *DeletePlacementGroupRequest, opts ...scw } type GetPlacementGroupServersRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` PlacementGroupID string `json:"-"` @@ -4233,6 +4368,9 @@ func (s *API) GetPlacementGroupServers(req *GetPlacementGroupServersRequest, opt } type SetPlacementGroupServersRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` PlacementGroupID string `json:"-"` @@ -4280,6 +4418,9 @@ func (s *API) SetPlacementGroupServers(req *SetPlacementGroupServersRequest, opt } type UpdatePlacementGroupServersRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // PlacementGroupID: UUID of the placement group PlacementGroupID string `json:"-"` @@ -4327,6 +4468,9 @@ func (s *API) UpdatePlacementGroupServers(req *UpdatePlacementGroupServersReques } type ListIPsRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // Organization: the organization ID the IPs are reserved in Organization *string `json:"-"` @@ -4389,6 +4533,9 @@ func (s *API) ListIPs(req *ListIPsRequest, opts ...scw.RequestOption) (*ListIPsR } type CreateIPRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // Deprecated: Organization: the organization ID the IP is reserved in // Precisely one of Organization, Project must be set. @@ -4446,6 +4593,9 @@ func (s *API) CreateIP(req *CreateIPRequest, opts ...scw.RequestOption) (*Create } type GetIPRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // IP: the IP ID or address to get IP string `json:"-"` @@ -4486,6 +4636,9 @@ func (s *API) GetIP(req *GetIPRequest, opts ...scw.RequestOption) (*GetIPRespons } type UpdateIPRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // IP: IP ID or IP address IP string `json:"-"` @@ -4535,6 +4688,9 @@ func (s *API) UpdateIP(req *UpdateIPRequest, opts ...scw.RequestOption) (*Update } type DeleteIPRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // IP: the ID or the address of the IP to delete IP string `json:"-"` @@ -4573,6 +4729,9 @@ func (s *API) DeleteIP(req *DeleteIPRequest, opts ...scw.RequestOption) error { } type ListPrivateNICsRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` ServerID string `json:"-"` @@ -4613,6 +4772,9 @@ func (s *API) ListPrivateNICs(req *ListPrivateNICsRequest, opts ...scw.RequestOp } type CreatePrivateNICRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` ServerID string `json:"-"` @@ -4660,6 +4822,9 @@ func (s *API) CreatePrivateNIC(req *CreatePrivateNICRequest, opts ...scw.Request } type GetPrivateNICRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` ServerID string `json:"-"` @@ -4706,6 +4871,9 @@ func (s *API) GetPrivateNIC(req *GetPrivateNICRequest, opts ...scw.RequestOption } type DeletePrivateNICRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` ServerID string `json:"-"` @@ -4750,6 +4918,9 @@ func (s *API) DeletePrivateNIC(req *DeletePrivateNICRequest, opts ...scw.Request } type ListBootscriptsRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` Arch *string `json:"-"` @@ -4808,6 +4979,9 @@ func (s *API) ListBootscripts(req *ListBootscriptsRequest, opts ...scw.RequestOp } type GetBootscriptRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` BootscriptID string `json:"-"` @@ -4848,6 +5022,9 @@ func (s *API) GetBootscript(req *GetBootscriptRequest, opts ...scw.RequestOption } type GetDashboardRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` Organization *string `json:"-"` diff --git a/api/iot/v1/iot_sdk.go b/api/iot/v1/iot_sdk.go index 0a8bec77a..4d81880ab 100644 --- a/api/iot/v1/iot_sdk.go +++ b/api/iot/v1/iot_sdk.go @@ -1012,38 +1012,10 @@ type UpdateRouteRequestS3Config struct { // Service API -type GetServiceInfoRequest struct { - Region scw.Region `json:"-"` -} - -func (s *API) GetServiceInfo(req *GetServiceInfoRequest, opts ...scw.RequestOption) (*scw.ServiceInfo, error) { - var err error - - if req.Region == "" { - defaultRegion, _ := s.client.GetDefaultRegion() - req.Region = defaultRegion - } - - if fmt.Sprint(req.Region) == "" { - return nil, errors.New("field Region cannot be empty in request") - } - - scwReq := &scw.ScalewayRequest{ - Method: "GET", - Path: "/iot/v1/regions/" + fmt.Sprint(req.Region) + "", - Headers: http.Header{}, - } - - var resp scw.ServiceInfo - - err = s.client.Do(scwReq, &resp, opts...) - if err != nil { - return nil, err - } - return &resp, nil -} - type ListHubsRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // Page: page number Page *int32 `json:"-"` @@ -1104,6 +1076,9 @@ func (s *API) ListHubs(req *ListHubsRequest, opts ...scw.RequestOption) (*ListHu } type CreateHubRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // Name: hub name (up to 255 characters) Name string `json:"name"` @@ -1165,6 +1140,9 @@ func (s *API) CreateHub(req *CreateHubRequest, opts ...scw.RequestOption) (*Hub, } type GetHubRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // HubID: hub ID HubID string `json:"-"` @@ -1203,6 +1181,9 @@ func (s *API) GetHub(req *GetHubRequest, opts ...scw.RequestOption) (*Hub, error } type UpdateHubRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // HubID: hub ID HubID string `json:"-"` @@ -1261,6 +1242,9 @@ func (s *API) UpdateHub(req *UpdateHubRequest, opts ...scw.RequestOption) (*Hub, } type EnableHubRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // HubID: hub ID HubID string `json:"-"` @@ -1304,6 +1288,9 @@ func (s *API) EnableHub(req *EnableHubRequest, opts ...scw.RequestOption) (*Hub, } type DisableHubRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // HubID: hub ID HubID string `json:"-"` @@ -1347,6 +1334,9 @@ func (s *API) DisableHub(req *DisableHubRequest, opts ...scw.RequestOption) (*Hu } type DeleteHubRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // HubID: hub ID HubID string `json:"-"` @@ -1389,6 +1379,9 @@ func (s *API) DeleteHub(req *DeleteHubRequest, opts ...scw.RequestOption) error } type GetHubMetricsRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // HubID: hub ID HubID string `json:"-"` @@ -1433,6 +1426,9 @@ func (s *API) GetHubMetrics(req *GetHubMetricsRequest, opts ...scw.RequestOption } type SetHubCARequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // HubID: hub ID HubID string `json:"-"` @@ -1482,6 +1478,9 @@ func (s *API) SetHubCA(req *SetHubCARequest, opts ...scw.RequestOption) (*Hub, e } type GetHubCARequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` HubID string `json:"-"` @@ -1520,6 +1519,9 @@ func (s *API) GetHubCA(req *GetHubCARequest, opts ...scw.RequestOption) (*GetHub } type ListDevicesRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // Page: page number Page *int32 `json:"-"` @@ -1585,6 +1587,9 @@ func (s *API) ListDevices(req *ListDevicesRequest, opts ...scw.RequestOption) (* } type CreateDeviceRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // Name: device name Name string `json:"name"` @@ -1638,6 +1643,9 @@ func (s *API) CreateDevice(req *CreateDeviceRequest, opts ...scw.RequestOption) } type GetDeviceRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // DeviceID: device ID DeviceID string `json:"-"` @@ -1676,6 +1684,9 @@ func (s *API) GetDevice(req *GetDeviceRequest, opts ...scw.RequestOption) (*Devi } type UpdateDeviceRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // DeviceID: device ID DeviceID string `json:"-"` @@ -1729,6 +1740,9 @@ func (s *API) UpdateDevice(req *UpdateDeviceRequest, opts ...scw.RequestOption) } type EnableDeviceRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // DeviceID: device ID DeviceID string `json:"-"` @@ -1772,6 +1786,9 @@ func (s *API) EnableDevice(req *EnableDeviceRequest, opts ...scw.RequestOption) } type DisableDeviceRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // DeviceID: device ID DeviceID string `json:"-"` @@ -1815,6 +1832,9 @@ func (s *API) DisableDevice(req *DisableDeviceRequest, opts ...scw.RequestOption } type RenewDeviceCertificateRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // DeviceID: device ID DeviceID string `json:"-"` @@ -1858,6 +1878,9 @@ func (s *API) RenewDeviceCertificate(req *RenewDeviceCertificateRequest, opts .. } type SetDeviceCertificateRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // DeviceID: device ID DeviceID string `json:"-"` @@ -1903,6 +1926,9 @@ func (s *API) SetDeviceCertificate(req *SetDeviceCertificateRequest, opts ...scw } type GetDeviceCertificateRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // DeviceID: device ID DeviceID string `json:"-"` @@ -1941,6 +1967,9 @@ func (s *API) GetDeviceCertificate(req *GetDeviceCertificateRequest, opts ...scw } type DeleteDeviceRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // DeviceID: device ID DeviceID string `json:"-"` @@ -1977,6 +2006,9 @@ func (s *API) DeleteDevice(req *DeleteDeviceRequest, opts ...scw.RequestOption) } type GetDeviceMetricsRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // DeviceID: device ID DeviceID string `json:"-"` @@ -2021,6 +2053,9 @@ func (s *API) GetDeviceMetrics(req *GetDeviceMetricsRequest, opts ...scw.Request } type ListRoutesRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // Page: page number Page *int32 `json:"-"` @@ -2078,6 +2113,9 @@ func (s *API) ListRoutes(req *ListRoutesRequest, opts ...scw.RequestOption) (*Li } type CreateRouteRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // Name: route name Name string `json:"name"` @@ -2146,6 +2184,9 @@ func (s *API) CreateRoute(req *CreateRouteRequest, opts ...scw.RequestOption) (* } type UpdateRouteRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // RouteID: route id RouteID string `json:"-"` @@ -2202,6 +2243,9 @@ func (s *API) UpdateRoute(req *UpdateRouteRequest, opts ...scw.RequestOption) (* } type GetRouteRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // RouteID: route ID RouteID string `json:"-"` @@ -2240,6 +2284,9 @@ func (s *API) GetRoute(req *GetRouteRequest, opts ...scw.RequestOption) (*Route, } type DeleteRouteRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // RouteID: route ID RouteID string `json:"-"` @@ -2276,6 +2323,9 @@ func (s *API) DeleteRoute(req *DeleteRouteRequest, opts ...scw.RequestOption) er } type ListNetworksRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // Page: page number Page *int32 `json:"-"` @@ -2336,6 +2386,9 @@ func (s *API) ListNetworks(req *ListNetworksRequest, opts ...scw.RequestOption) } type CreateNetworkRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // Name: network name Name string `json:"name"` @@ -2387,6 +2440,9 @@ func (s *API) CreateNetwork(req *CreateNetworkRequest, opts ...scw.RequestOption } type GetNetworkRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // NetworkID: network ID NetworkID string `json:"-"` @@ -2425,6 +2481,9 @@ func (s *API) GetNetwork(req *GetNetworkRequest, opts ...scw.RequestOption) (*Ne } type DeleteNetworkRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // NetworkID: network ID NetworkID string `json:"-"` @@ -2461,6 +2520,9 @@ func (s *API) DeleteNetwork(req *DeleteNetworkRequest, opts ...scw.RequestOption } type GetTwinDocumentRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // TwinID: twin ID TwinID string `json:"-"` @@ -2505,6 +2567,9 @@ func (s *API) GetTwinDocument(req *GetTwinDocumentRequest, opts ...scw.RequestOp } type PutTwinDocumentRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // TwinID: twin ID TwinID string `json:"-"` @@ -2562,6 +2627,9 @@ func (s *API) PutTwinDocument(req *PutTwinDocumentRequest, opts ...scw.RequestOp } type PatchTwinDocumentRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // TwinID: twin ID TwinID string `json:"-"` @@ -2625,6 +2693,9 @@ func (s *API) PatchTwinDocument(req *PatchTwinDocumentRequest, opts ...scw.Reque } type DeleteTwinDocumentRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // TwinID: twin ID TwinID string `json:"-"` @@ -2667,6 +2738,9 @@ func (s *API) DeleteTwinDocument(req *DeleteTwinDocumentRequest, opts ...scw.Req } type ListTwinDocumentsRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // TwinID: twin ID TwinID string `json:"-"` @@ -2705,6 +2779,9 @@ func (s *API) ListTwinDocuments(req *ListTwinDocumentsRequest, opts ...scw.Reque } type DeleteTwinDocumentsRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // TwinID: twin ID TwinID string `json:"-"` diff --git a/api/k8s/v1/k8s_sdk.go b/api/k8s/v1/k8s_sdk.go index 75717bd90..25a9b6046 100644 --- a/api/k8s/v1/k8s_sdk.go +++ b/api/k8s/v1/k8s_sdk.go @@ -1037,6 +1037,9 @@ type Version struct { // Service API type ListClustersRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // OrganizationID: the organization ID on which to filter the returned clusters OrganizationID *string `json:"-"` @@ -1107,6 +1110,9 @@ func (s *API) ListClusters(req *ListClustersRequest, opts ...scw.RequestOption) } type CreateClusterRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // Deprecated: OrganizationID: the organization ID where the cluster will be created // Precisely one of OrganizationID, ProjectID must be set. @@ -1206,6 +1212,9 @@ func (s *API) CreateCluster(req *CreateClusterRequest, opts ...scw.RequestOption } type GetClusterRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // ClusterID: the ID of the requested cluster ClusterID string `json:"-"` @@ -1246,6 +1255,9 @@ func (s *API) GetCluster(req *GetClusterRequest, opts ...scw.RequestOption) (*Cl } type UpdateClusterRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // ClusterID: the ID of the cluster to update ClusterID string `json:"-"` @@ -1323,6 +1335,9 @@ func (s *API) UpdateCluster(req *UpdateClusterRequest, opts ...scw.RequestOption } type DeleteClusterRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // ClusterID: the ID of the cluster to delete ClusterID string `json:"-"` @@ -1369,6 +1384,9 @@ func (s *API) DeleteCluster(req *DeleteClusterRequest, opts ...scw.RequestOption } type UpgradeClusterRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // ClusterID: the ID of the cluster to upgrade ClusterID string `json:"-"` @@ -1422,6 +1440,9 @@ func (s *API) UpgradeCluster(req *UpgradeClusterRequest, opts ...scw.RequestOpti } type ListClusterAvailableVersionsRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // ClusterID: the ID of the cluster which the available Kuberentes versions will be listed from ClusterID string `json:"-"` @@ -1462,6 +1483,9 @@ func (s *API) ListClusterAvailableVersions(req *ListClusterAvailableVersionsRequ } type GetClusterKubeConfigRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // ClusterID: the ID of the cluster to download the kubeconfig from ClusterID string `json:"-"` @@ -1503,6 +1527,9 @@ func (s *API) getClusterKubeConfig(req *GetClusterKubeConfigRequest, opts ...scw } type ResetClusterAdminTokenRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // ClusterID: the ID of the cluster of which the admin token will be renewed ClusterID string `json:"-"` @@ -1546,6 +1573,9 @@ func (s *API) ResetClusterAdminToken(req *ResetClusterAdminTokenRequest, opts .. } type ListPoolsRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // ClusterID: the ID of the cluster from which the pools will be listed from ClusterID string `json:"-"` @@ -1613,6 +1643,9 @@ func (s *API) ListPools(req *ListPoolsRequest, opts ...scw.RequestOption) (*List } type CreatePoolRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // ClusterID: the ID of the cluster in which the pool will be created ClusterID string `json:"-"` @@ -1701,6 +1734,9 @@ func (s *API) CreatePool(req *CreatePoolRequest, opts ...scw.RequestOption) (*Po } type GetPoolRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // PoolID: the ID of the requested pool PoolID string `json:"-"` @@ -1741,6 +1777,9 @@ func (s *API) GetPool(req *GetPoolRequest, opts ...scw.RequestOption) (*Pool, er } type UpgradePoolRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // PoolID: the ID of the pool to upgrade PoolID string `json:"-"` @@ -1788,6 +1827,9 @@ func (s *API) UpgradePool(req *UpgradePoolRequest, opts ...scw.RequestOption) (* } type UpdatePoolRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // PoolID: the ID of the pool to update PoolID string `json:"-"` @@ -1849,6 +1891,9 @@ func (s *API) UpdatePool(req *UpdatePoolRequest, opts ...scw.RequestOption) (*Po } type DeletePoolRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // PoolID: the ID of the pool to delete PoolID string `json:"-"` @@ -1889,6 +1934,9 @@ func (s *API) DeletePool(req *DeletePoolRequest, opts ...scw.RequestOption) (*Po } type ListNodesRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // ClusterID: the cluster ID from which the nodes will be listed from ClusterID string `json:"-"` @@ -1959,6 +2007,9 @@ func (s *API) ListNodes(req *ListNodesRequest, opts ...scw.RequestOption) (*List } type GetNodeRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // NodeID: the ID of the requested node NodeID string `json:"-"` @@ -1999,6 +2050,9 @@ func (s *API) GetNode(req *GetNodeRequest, opts ...scw.RequestOption) (*Node, er } type ReplaceNodeRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // NodeID: the ID of the node to replace NodeID string `json:"-"` @@ -2044,6 +2098,9 @@ func (s *API) ReplaceNode(req *ReplaceNodeRequest, opts ...scw.RequestOption) (* } type RebootNodeRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // NodeID: the ID of the node to reboot NodeID string `json:"-"` @@ -2089,6 +2146,9 @@ func (s *API) RebootNode(req *RebootNodeRequest, opts ...scw.RequestOption) (*No } type ListVersionsRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` } @@ -2123,6 +2183,9 @@ func (s *API) ListVersions(req *ListVersionsRequest, opts ...scw.RequestOption) } type GetVersionRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // VersionName: the requested version name VersionName string `json:"-"` diff --git a/api/lb/v1/lb_sdk.go b/api/lb/v1/lb_sdk.go index 39440810b..c83bb0ca0 100644 --- a/api/lb/v1/lb_sdk.go +++ b/api/lb/v1/lb_sdk.go @@ -1584,38 +1584,10 @@ type SubscriberWebhookConfig struct { // Service API -type GetServiceInfoRequest struct { - Region scw.Region `json:"-"` -} - -func (s *API) GetServiceInfo(req *GetServiceInfoRequest, opts ...scw.RequestOption) (*scw.ServiceInfo, error) { - var err error - - if req.Region == "" { - defaultRegion, _ := s.client.GetDefaultRegion() - req.Region = defaultRegion - } - - if fmt.Sprint(req.Region) == "" { - return nil, errors.New("field Region cannot be empty in request") - } - - scwReq := &scw.ScalewayRequest{ - Method: "GET", - Path: "/lb/v1/regions/" + fmt.Sprint(req.Region) + "", - Headers: http.Header{}, - } - - var resp scw.ServiceInfo - - err = s.client.Do(scwReq, &resp, opts...) - if err != nil { - return nil, err - } - return &resp, nil -} - type ListLBsRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // Name: use this to search by name Name *string `json:"-"` @@ -1676,6 +1648,9 @@ func (s *API) ListLBs(req *ListLBsRequest, opts ...scw.RequestOption) (*ListLBsR } type CreateLBRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // Deprecated: OrganizationID: owner of resources // Precisely one of OrganizationID, ProjectID must be set. @@ -1752,6 +1727,9 @@ func (s *API) CreateLB(req *CreateLBRequest, opts ...scw.RequestOption) (*LB, er } type GetLBRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // LBID: load balancer ID LBID string `json:"-"` @@ -1790,6 +1768,9 @@ func (s *API) GetLB(req *GetLBRequest, opts ...scw.RequestOption) (*LB, error) { } type UpdateLBRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // LBID: load balancer ID LBID string `json:"-"` @@ -1848,6 +1829,9 @@ func (s *API) UpdateLB(req *UpdateLBRequest, opts ...scw.RequestOption) (*LB, er } type DeleteLBRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // LBID: load balancer ID LBID string `json:"-"` @@ -1890,6 +1874,9 @@ func (s *API) DeleteLB(req *DeleteLBRequest, opts ...scw.RequestOption) error { } type MigrateLBRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // LBID: load balancer ID LBID string `json:"-"` @@ -1935,6 +1922,9 @@ func (s *API) MigrateLB(req *MigrateLBRequest, opts ...scw.RequestOption) (*LB, } type ListIPsRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // Page: page number Page *int32 `json:"-"` @@ -1990,6 +1980,9 @@ func (s *API) ListIPs(req *ListIPsRequest, opts ...scw.RequestOption) (*ListIPsR } type CreateIPRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // Deprecated: OrganizationID: owner of resources // Precisely one of OrganizationID, ProjectID must be set. @@ -2045,6 +2038,9 @@ func (s *API) CreateIP(req *CreateIPRequest, opts ...scw.RequestOption) (*IP, er } type GetIPRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // IPID: IP address ID IPID string `json:"-"` @@ -2083,6 +2079,9 @@ func (s *API) GetIP(req *GetIPRequest, opts ...scw.RequestOption) (*IP, error) { } type ReleaseIPRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // IPID: IP address ID IPID string `json:"-"` @@ -2119,6 +2118,9 @@ func (s *API) ReleaseIP(req *ReleaseIPRequest, opts ...scw.RequestOption) error } type UpdateIPRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // IPID: IP address ID IPID string `json:"-"` @@ -2164,6 +2166,9 @@ func (s *API) UpdateIP(req *UpdateIPRequest, opts ...scw.RequestOption) (*IP, er } type ListBackendsRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // LBID: load balancer ID LBID string `json:"-"` @@ -2224,6 +2229,9 @@ func (s *API) ListBackends(req *ListBackendsRequest, opts ...scw.RequestOption) } type CreateBackendRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // LBID: load balancer ID LBID string `json:"-"` @@ -2362,6 +2370,9 @@ func (s *API) CreateBackend(req *CreateBackendRequest, opts ...scw.RequestOption } type GetBackendRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // BackendID: backend ID BackendID string `json:"-"` @@ -2400,6 +2411,9 @@ func (s *API) GetBackend(req *GetBackendRequest, opts ...scw.RequestOption) (*Ba } type UpdateBackendRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` BackendID string `json:"-"` @@ -2519,6 +2533,9 @@ func (s *API) UpdateBackend(req *UpdateBackendRequest, opts ...scw.RequestOption } type DeleteBackendRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // BackendID: ID of the backend to delete BackendID string `json:"-"` @@ -2555,6 +2572,9 @@ func (s *API) DeleteBackend(req *DeleteBackendRequest, opts ...scw.RequestOption } type AddBackendServersRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // BackendID: backend ID BackendID string `json:"-"` @@ -2600,6 +2620,9 @@ func (s *API) AddBackendServers(req *AddBackendServersRequest, opts ...scw.Reque } type RemoveBackendServersRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // BackendID: backend ID BackendID string `json:"-"` @@ -2645,6 +2668,9 @@ func (s *API) RemoveBackendServers(req *RemoveBackendServersRequest, opts ...scw } type SetBackendServersRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // BackendID: backend ID BackendID string `json:"-"` @@ -2690,6 +2716,9 @@ func (s *API) SetBackendServers(req *SetBackendServersRequest, opts ...scw.Reque } type UpdateHealthCheckRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // BackendID: backend ID BackendID string `json:"-"` @@ -2800,6 +2829,9 @@ func (s *API) UpdateHealthCheck(req *UpdateHealthCheckRequest, opts ...scw.Reque } type ListFrontendsRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // LBID: load balancer ID LBID string `json:"-"` @@ -2860,6 +2892,9 @@ func (s *API) ListFrontends(req *ListFrontendsRequest, opts ...scw.RequestOption } type CreateFrontendRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // LBID: load balancer ID LBID string `json:"-"` @@ -2951,6 +2986,9 @@ func (s *API) CreateFrontend(req *CreateFrontendRequest, opts ...scw.RequestOpti } type GetFrontendRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // FrontendID: frontend ID FrontendID string `json:"-"` @@ -2989,6 +3027,9 @@ func (s *API) GetFrontend(req *GetFrontendRequest, opts ...scw.RequestOption) (* } type UpdateFrontendRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // FrontendID: frontend ID FrontendID string `json:"-"` @@ -3076,6 +3117,9 @@ func (s *API) UpdateFrontend(req *UpdateFrontendRequest, opts ...scw.RequestOpti } type DeleteFrontendRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // FrontendID: frontend ID to delete FrontendID string `json:"-"` @@ -3112,6 +3156,9 @@ func (s *API) DeleteFrontend(req *DeleteFrontendRequest, opts ...scw.RequestOpti } type ListRoutesRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // OrderBy: // @@ -3166,6 +3213,9 @@ func (s *API) ListRoutes(req *ListRoutesRequest, opts ...scw.RequestOption) (*Li } type CreateRouteRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // FrontendID: origin of redirection FrontendID string `json:"frontend_id"` @@ -3209,6 +3259,9 @@ func (s *API) CreateRoute(req *CreateRouteRequest, opts ...scw.RequestOption) (* } type GetRouteRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // RouteID: id of route to get RouteID string `json:"-"` @@ -3247,6 +3300,9 @@ func (s *API) GetRoute(req *GetRouteRequest, opts ...scw.RequestOption) (*Route, } type UpdateRouteRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // RouteID: route id to update RouteID string `json:"-"` @@ -3294,6 +3350,9 @@ func (s *API) UpdateRoute(req *UpdateRouteRequest, opts ...scw.RequestOption) (* } type DeleteRouteRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // RouteID: route id to delete RouteID string `json:"-"` @@ -3330,6 +3389,9 @@ func (s *API) DeleteRoute(req *DeleteRouteRequest, opts ...scw.RequestOption) er } type GetLBStatsRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // LBID: load balancer ID LBID string `json:"-"` @@ -3368,6 +3430,9 @@ func (s *API) GetLBStats(req *GetLBStatsRequest, opts ...scw.RequestOption) (*LB } type ListBackendStatsRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // LBID: load balancer ID LBID string `json:"-"` @@ -3419,6 +3484,9 @@ func (s *API) ListBackendStats(req *ListBackendStatsRequest, opts ...scw.Request } type ListACLsRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // FrontendID: ID of your frontend FrontendID string `json:"-"` @@ -3479,6 +3547,9 @@ func (s *API) ListACLs(req *ListACLsRequest, opts ...scw.RequestOption) (*ListAC } type CreateACLRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // FrontendID: ID of your frontend FrontendID string `json:"-"` @@ -3541,6 +3612,9 @@ func (s *API) CreateACL(req *CreateACLRequest, opts ...scw.RequestOption) (*ACL, } type GetACLRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // ACLID: ID of your ACL ressource ACLID string `json:"-"` @@ -3579,6 +3653,9 @@ func (s *API) GetACL(req *GetACLRequest, opts ...scw.RequestOption) (*ACL, error } type UpdateACLRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // ACLID: ID of your ACL ressource ACLID string `json:"-"` @@ -3630,6 +3707,9 @@ func (s *API) UpdateACL(req *UpdateACLRequest, opts ...scw.RequestOption) (*ACL, } type DeleteACLRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // ACLID: ID of your ACL ressource ACLID string `json:"-"` @@ -3666,6 +3746,9 @@ func (s *API) DeleteACL(req *DeleteACLRequest, opts ...scw.RequestOption) error } type CreateCertificateRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // LBID: load balancer ID LBID string `json:"-"` @@ -3723,6 +3806,9 @@ func (s *API) CreateCertificate(req *CreateCertificateRequest, opts ...scw.Reque } type ListCertificatesRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // LBID: load balancer ID LBID string `json:"-"` @@ -3783,6 +3869,9 @@ func (s *API) ListCertificates(req *ListCertificatesRequest, opts ...scw.Request } type GetCertificateRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // CertificateID: certificate ID CertificateID string `json:"-"` @@ -3821,6 +3910,9 @@ func (s *API) GetCertificate(req *GetCertificateRequest, opts ...scw.RequestOpti } type UpdateCertificateRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // CertificateID: certificate ID CertificateID string `json:"-"` @@ -3866,6 +3958,9 @@ func (s *API) UpdateCertificate(req *UpdateCertificateRequest, opts ...scw.Reque } type DeleteCertificateRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // CertificateID: certificate ID CertificateID string `json:"-"` @@ -3902,6 +3997,9 @@ func (s *API) DeleteCertificate(req *DeleteCertificateRequest, opts ...scw.Reque } type ListLBTypesRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // Page: page number Page *int32 `json:"-"` @@ -3948,6 +4046,9 @@ func (s *API) ListLBTypes(req *ListLBTypesRequest, opts ...scw.RequestOption) (* } type CreateSubscriberRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // Name: subscriber name Name string `json:"name"` @@ -4009,6 +4110,9 @@ func (s *API) CreateSubscriber(req *CreateSubscriberRequest, opts ...scw.Request } type GetSubscriberRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // SubscriberID: subscriber ID SubscriberID string `json:"-"` @@ -4047,6 +4151,9 @@ func (s *API) GetSubscriber(req *GetSubscriberRequest, opts ...scw.RequestOption } type ListSubscriberRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // OrderBy: you can order the response by created_at asc/desc or name asc/desc // @@ -4107,6 +4214,9 @@ func (s *API) ListSubscriber(req *ListSubscriberRequest, opts ...scw.RequestOpti } type UpdateSubscriberRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // SubscriberID: assign the resource to a project IDs SubscriberID string `json:"-"` @@ -4158,6 +4268,9 @@ func (s *API) UpdateSubscriber(req *UpdateSubscriberRequest, opts ...scw.Request } type DeleteSubscriberRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // SubscriberID: subscriber ID SubscriberID string `json:"-"` @@ -4194,6 +4307,9 @@ func (s *API) DeleteSubscriber(req *DeleteSubscriberRequest, opts ...scw.Request } type SubscribeToLBRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // LBID: load balancer ID LBID string `json:"-"` @@ -4239,6 +4355,9 @@ func (s *API) SubscribeToLB(req *SubscribeToLBRequest, opts ...scw.RequestOption } type UnsubscribeFromLBRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // LBID: load balancer ID LBID string `json:"-"` @@ -4277,6 +4396,9 @@ func (s *API) UnsubscribeFromLB(req *UnsubscribeFromLBRequest, opts ...scw.Reque } type ListLBPrivateNetworksRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` LBID string `json:"-"` @@ -4334,6 +4456,9 @@ func (s *API) ListLBPrivateNetworks(req *ListLBPrivateNetworksRequest, opts ...s } type AttachPrivateNetworkRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // LBID: load balancer ID LBID string `json:"-"` @@ -4389,6 +4514,9 @@ func (s *API) AttachPrivateNetwork(req *AttachPrivateNetworkRequest, opts ...scw } type DetachPrivateNetworkRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // LBID: load balancer ID LBID string `json:"-"` @@ -4438,6 +4566,9 @@ func (s *API) DetachPrivateNetwork(req *DetachPrivateNetworkRequest, opts ...scw // Service ZonedAPI type ZonedAPIGetServiceInfoRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` } @@ -4469,6 +4600,9 @@ func (s *ZonedAPI) GetServiceInfo(req *ZonedAPIGetServiceInfoRequest, opts ...sc } type ZonedAPIListLBsRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // Name: use this to search by name Name *string `json:"-"` @@ -4529,6 +4663,9 @@ func (s *ZonedAPI) ListLBs(req *ZonedAPIListLBsRequest, opts ...scw.RequestOptio } type ZonedAPICreateLBRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // Deprecated: OrganizationID: owner of resources // Precisely one of OrganizationID, ProjectID must be set. @@ -4605,6 +4742,9 @@ func (s *ZonedAPI) CreateLB(req *ZonedAPICreateLBRequest, opts ...scw.RequestOpt } type ZonedAPIGetLBRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // LBID: load balancer ID LBID string `json:"-"` @@ -4643,6 +4783,9 @@ func (s *ZonedAPI) GetLB(req *ZonedAPIGetLBRequest, opts ...scw.RequestOption) ( } type ZonedAPIUpdateLBRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // LBID: load balancer ID LBID string `json:"-"` @@ -4701,6 +4844,9 @@ func (s *ZonedAPI) UpdateLB(req *ZonedAPIUpdateLBRequest, opts ...scw.RequestOpt } type ZonedAPIDeleteLBRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // LBID: load balancer ID LBID string `json:"-"` @@ -4743,6 +4889,9 @@ func (s *ZonedAPI) DeleteLB(req *ZonedAPIDeleteLBRequest, opts ...scw.RequestOpt } type ZonedAPIMigrateLBRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // LBID: load balancer ID LBID string `json:"-"` @@ -4788,6 +4937,9 @@ func (s *ZonedAPI) MigrateLB(req *ZonedAPIMigrateLBRequest, opts ...scw.RequestO } type ZonedAPIListIPsRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // Page: page number Page *int32 `json:"-"` @@ -4843,6 +4995,9 @@ func (s *ZonedAPI) ListIPs(req *ZonedAPIListIPsRequest, opts ...scw.RequestOptio } type ZonedAPICreateIPRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // Deprecated: OrganizationID: owner of resources // Precisely one of OrganizationID, ProjectID must be set. @@ -4898,6 +5053,9 @@ func (s *ZonedAPI) CreateIP(req *ZonedAPICreateIPRequest, opts ...scw.RequestOpt } type ZonedAPIGetIPRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // IPID: IP address ID IPID string `json:"-"` @@ -4936,6 +5094,9 @@ func (s *ZonedAPI) GetIP(req *ZonedAPIGetIPRequest, opts ...scw.RequestOption) ( } type ZonedAPIReleaseIPRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // IPID: IP address ID IPID string `json:"-"` @@ -4972,6 +5133,9 @@ func (s *ZonedAPI) ReleaseIP(req *ZonedAPIReleaseIPRequest, opts ...scw.RequestO } type ZonedAPIUpdateIPRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // IPID: IP address ID IPID string `json:"-"` @@ -5017,6 +5181,9 @@ func (s *ZonedAPI) UpdateIP(req *ZonedAPIUpdateIPRequest, opts ...scw.RequestOpt } type ZonedAPIListBackendsRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // LBID: load balancer ID LBID string `json:"-"` @@ -5077,6 +5244,9 @@ func (s *ZonedAPI) ListBackends(req *ZonedAPIListBackendsRequest, opts ...scw.Re } type ZonedAPICreateBackendRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // LBID: load balancer ID LBID string `json:"-"` @@ -5215,6 +5385,9 @@ func (s *ZonedAPI) CreateBackend(req *ZonedAPICreateBackendRequest, opts ...scw. } type ZonedAPIGetBackendRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // BackendID: backend ID BackendID string `json:"-"` @@ -5253,6 +5426,9 @@ func (s *ZonedAPI) GetBackend(req *ZonedAPIGetBackendRequest, opts ...scw.Reques } type ZonedAPIUpdateBackendRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` BackendID string `json:"-"` @@ -5372,6 +5548,9 @@ func (s *ZonedAPI) UpdateBackend(req *ZonedAPIUpdateBackendRequest, opts ...scw. } type ZonedAPIDeleteBackendRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // BackendID: ID of the backend to delete BackendID string `json:"-"` @@ -5408,6 +5587,9 @@ func (s *ZonedAPI) DeleteBackend(req *ZonedAPIDeleteBackendRequest, opts ...scw. } type ZonedAPIAddBackendServersRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // BackendID: backend ID BackendID string `json:"-"` @@ -5453,6 +5635,9 @@ func (s *ZonedAPI) AddBackendServers(req *ZonedAPIAddBackendServersRequest, opts } type ZonedAPIRemoveBackendServersRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // BackendID: backend ID BackendID string `json:"-"` @@ -5498,6 +5683,9 @@ func (s *ZonedAPI) RemoveBackendServers(req *ZonedAPIRemoveBackendServersRequest } type ZonedAPISetBackendServersRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // BackendID: backend ID BackendID string `json:"-"` @@ -5543,6 +5731,9 @@ func (s *ZonedAPI) SetBackendServers(req *ZonedAPISetBackendServersRequest, opts } type ZonedAPIUpdateHealthCheckRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // BackendID: backend ID BackendID string `json:"-"` @@ -5653,6 +5844,9 @@ func (s *ZonedAPI) UpdateHealthCheck(req *ZonedAPIUpdateHealthCheckRequest, opts } type ZonedAPIListFrontendsRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // LBID: load balancer ID LBID string `json:"-"` @@ -5713,6 +5907,9 @@ func (s *ZonedAPI) ListFrontends(req *ZonedAPIListFrontendsRequest, opts ...scw. } type ZonedAPICreateFrontendRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // LBID: load balancer ID LBID string `json:"-"` @@ -5804,6 +6001,9 @@ func (s *ZonedAPI) CreateFrontend(req *ZonedAPICreateFrontendRequest, opts ...sc } type ZonedAPIGetFrontendRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // FrontendID: frontend ID FrontendID string `json:"-"` @@ -5842,6 +6042,9 @@ func (s *ZonedAPI) GetFrontend(req *ZonedAPIGetFrontendRequest, opts ...scw.Requ } type ZonedAPIUpdateFrontendRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // FrontendID: frontend ID FrontendID string `json:"-"` @@ -5929,6 +6132,9 @@ func (s *ZonedAPI) UpdateFrontend(req *ZonedAPIUpdateFrontendRequest, opts ...sc } type ZonedAPIDeleteFrontendRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // FrontendID: frontend ID to delete FrontendID string `json:"-"` @@ -5965,6 +6171,9 @@ func (s *ZonedAPI) DeleteFrontend(req *ZonedAPIDeleteFrontendRequest, opts ...sc } type ZonedAPIListRoutesRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // OrderBy: // @@ -6019,6 +6228,9 @@ func (s *ZonedAPI) ListRoutes(req *ZonedAPIListRoutesRequest, opts ...scw.Reques } type ZonedAPICreateRouteRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // FrontendID: origin of redirection FrontendID string `json:"frontend_id"` @@ -6062,6 +6274,9 @@ func (s *ZonedAPI) CreateRoute(req *ZonedAPICreateRouteRequest, opts ...scw.Requ } type ZonedAPIGetRouteRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // RouteID: id of route to get RouteID string `json:"-"` @@ -6100,6 +6315,9 @@ func (s *ZonedAPI) GetRoute(req *ZonedAPIGetRouteRequest, opts ...scw.RequestOpt } type ZonedAPIUpdateRouteRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // RouteID: route id to update RouteID string `json:"-"` @@ -6147,6 +6365,9 @@ func (s *ZonedAPI) UpdateRoute(req *ZonedAPIUpdateRouteRequest, opts ...scw.Requ } type ZonedAPIDeleteRouteRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // RouteID: route id to delete RouteID string `json:"-"` @@ -6183,6 +6404,9 @@ func (s *ZonedAPI) DeleteRoute(req *ZonedAPIDeleteRouteRequest, opts ...scw.Requ } type ZonedAPIGetLBStatsRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // LBID: load balancer ID LBID string `json:"-"` @@ -6221,6 +6445,9 @@ func (s *ZonedAPI) GetLBStats(req *ZonedAPIGetLBStatsRequest, opts ...scw.Reques } type ZonedAPIListBackendStatsRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // LBID: load balancer ID LBID string `json:"-"` @@ -6272,6 +6499,9 @@ func (s *ZonedAPI) ListBackendStats(req *ZonedAPIListBackendStatsRequest, opts . } type ZonedAPIListACLsRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // FrontendID: ID of your frontend FrontendID string `json:"-"` @@ -6332,6 +6562,9 @@ func (s *ZonedAPI) ListACLs(req *ZonedAPIListACLsRequest, opts ...scw.RequestOpt } type ZonedAPICreateACLRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // FrontendID: ID of your frontend FrontendID string `json:"-"` @@ -6394,6 +6627,9 @@ func (s *ZonedAPI) CreateACL(req *ZonedAPICreateACLRequest, opts ...scw.RequestO } type ZonedAPIGetACLRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // ACLID: ID of your ACL ressource ACLID string `json:"-"` @@ -6432,6 +6668,9 @@ func (s *ZonedAPI) GetACL(req *ZonedAPIGetACLRequest, opts ...scw.RequestOption) } type ZonedAPIUpdateACLRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // ACLID: ID of your ACL ressource ACLID string `json:"-"` @@ -6483,6 +6722,9 @@ func (s *ZonedAPI) UpdateACL(req *ZonedAPIUpdateACLRequest, opts ...scw.RequestO } type ZonedAPIDeleteACLRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // ACLID: ID of your ACL ressource ACLID string `json:"-"` @@ -6519,6 +6761,9 @@ func (s *ZonedAPI) DeleteACL(req *ZonedAPIDeleteACLRequest, opts ...scw.RequestO } type ZonedAPISetACLsRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // FrontendID: the Frontend to change ACL to FrontendID string `json:"-"` @@ -6564,6 +6809,9 @@ func (s *ZonedAPI) SetACLs(req *ZonedAPISetACLsRequest, opts ...scw.RequestOptio } type ZonedAPICreateCertificateRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // LBID: load balancer ID LBID string `json:"-"` @@ -6621,6 +6869,9 @@ func (s *ZonedAPI) CreateCertificate(req *ZonedAPICreateCertificateRequest, opts } type ZonedAPIListCertificatesRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // LBID: load balancer ID LBID string `json:"-"` @@ -6681,6 +6932,9 @@ func (s *ZonedAPI) ListCertificates(req *ZonedAPIListCertificatesRequest, opts . } type ZonedAPIGetCertificateRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // CertificateID: certificate ID CertificateID string `json:"-"` @@ -6719,6 +6973,9 @@ func (s *ZonedAPI) GetCertificate(req *ZonedAPIGetCertificateRequest, opts ...sc } type ZonedAPIUpdateCertificateRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // CertificateID: certificate ID CertificateID string `json:"-"` @@ -6764,6 +7021,9 @@ func (s *ZonedAPI) UpdateCertificate(req *ZonedAPIUpdateCertificateRequest, opts } type ZonedAPIDeleteCertificateRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // CertificateID: certificate ID CertificateID string `json:"-"` @@ -6800,6 +7060,9 @@ func (s *ZonedAPI) DeleteCertificate(req *ZonedAPIDeleteCertificateRequest, opts } type ZonedAPIListLBTypesRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // Page: page number Page *int32 `json:"-"` @@ -6846,6 +7109,9 @@ func (s *ZonedAPI) ListLBTypes(req *ZonedAPIListLBTypesRequest, opts ...scw.Requ } type ZonedAPICreateSubscriberRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // Name: subscriber name Name string `json:"name"` @@ -6907,6 +7173,9 @@ func (s *ZonedAPI) CreateSubscriber(req *ZonedAPICreateSubscriberRequest, opts . } type ZonedAPIGetSubscriberRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // SubscriberID: subscriber ID SubscriberID string `json:"-"` @@ -6945,6 +7214,9 @@ func (s *ZonedAPI) GetSubscriber(req *ZonedAPIGetSubscriberRequest, opts ...scw. } type ZonedAPIListSubscriberRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // OrderBy: you can order the response by created_at asc/desc or name asc/desc // @@ -7005,6 +7277,9 @@ func (s *ZonedAPI) ListSubscriber(req *ZonedAPIListSubscriberRequest, opts ...sc } type ZonedAPIUpdateSubscriberRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // SubscriberID: assign the resource to a project IDs SubscriberID string `json:"-"` @@ -7056,6 +7331,9 @@ func (s *ZonedAPI) UpdateSubscriber(req *ZonedAPIUpdateSubscriberRequest, opts . } type ZonedAPIDeleteSubscriberRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // SubscriberID: subscriber ID SubscriberID string `json:"-"` @@ -7092,6 +7370,9 @@ func (s *ZonedAPI) DeleteSubscriber(req *ZonedAPIDeleteSubscriberRequest, opts . } type ZonedAPISubscribeToLBRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // LBID: load balancer ID LBID string `json:"-"` @@ -7137,6 +7418,9 @@ func (s *ZonedAPI) SubscribeToLB(req *ZonedAPISubscribeToLBRequest, opts ...scw. } type ZonedAPIUnsubscribeFromLBRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // LBID: load balancer ID LBID string `json:"-"` @@ -7175,6 +7459,9 @@ func (s *ZonedAPI) UnsubscribeFromLB(req *ZonedAPIUnsubscribeFromLBRequest, opts } type ZonedAPIListLBPrivateNetworksRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` LBID string `json:"-"` @@ -7232,6 +7519,9 @@ func (s *ZonedAPI) ListLBPrivateNetworks(req *ZonedAPIListLBPrivateNetworksReque } type ZonedAPIAttachPrivateNetworkRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // LBID: load balancer ID LBID string `json:"-"` @@ -7287,6 +7577,9 @@ func (s *ZonedAPI) AttachPrivateNetwork(req *ZonedAPIAttachPrivateNetworkRequest } type ZonedAPIDetachPrivateNetworkRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // LBID: load balancer ID LBID string `json:"-"` diff --git a/api/marketplace/v1/marketplace_sdk.go b/api/marketplace/v1/marketplace_sdk.go index 38de05422..7d559ec85 100644 --- a/api/marketplace/v1/marketplace_sdk.go +++ b/api/marketplace/v1/marketplace_sdk.go @@ -55,14 +55,6 @@ type GetImageResponse struct { Image *Image `json:"image"` } -type GetServiceInfoResponse struct { - API string `json:"api"` - - Description string `json:"description"` - - Version string `json:"version"` -} - type GetVersionResponse struct { Version *Version `json:"version"` } @@ -141,27 +133,6 @@ type Version struct { // Service API -type GetServiceInfoRequest struct { -} - -func (s *API) GetServiceInfo(req *GetServiceInfoRequest, opts ...scw.RequestOption) (*GetServiceInfoResponse, error) { - var err error - - scwReq := &scw.ScalewayRequest{ - Method: "GET", - Path: "/marketplace/v1", - Headers: http.Header{}, - } - - var resp GetServiceInfoResponse - - err = s.client.Do(scwReq, &resp, opts...) - if err != nil { - return nil, err - } - return &resp, nil -} - type ListImagesRequest struct { // PerPage: a positive integer lower or equal to 100 to select the number of items to display PerPage *uint32 `json:"-"` diff --git a/api/rdb/v1/rdb_sdk.go b/api/rdb/v1/rdb_sdk.go index 1565a3aa4..bbbb23877 100644 --- a/api/rdb/v1/rdb_sdk.go +++ b/api/rdb/v1/rdb_sdk.go @@ -893,10 +893,10 @@ type Endpoint struct { // Name: name of the endpoint Name *string `json:"name"` // PrivateNetwork: private network details - // Precisely one of LoadBalancer, PrivateNetwork must be set. + // Precisely one of DirectAccess, LoadBalancer, PrivateNetwork must be set. PrivateNetwork *EndpointPrivateNetworkDetails `json:"private_network,omitempty"` // LoadBalancer: load balancer details - // Precisely one of LoadBalancer, PrivateNetwork must be set. + // Precisely one of DirectAccess, LoadBalancer, PrivateNetwork must be set. LoadBalancer *EndpointLoadBalancerDetails `json:"load_balancer,omitempty"` // Hostname: hostname of the endpoint // Precisely one of Hostname, IP must be set. @@ -1306,38 +1306,10 @@ type Volume struct { // Service API -type GetServiceInfoRequest struct { - Region scw.Region `json:"-"` -} - -func (s *API) GetServiceInfo(req *GetServiceInfoRequest, opts ...scw.RequestOption) (*scw.ServiceInfo, error) { - var err error - - if req.Region == "" { - defaultRegion, _ := s.client.GetDefaultRegion() - req.Region = defaultRegion - } - - if fmt.Sprint(req.Region) == "" { - return nil, errors.New("field Region cannot be empty in request") - } - - scwReq := &scw.ScalewayRequest{ - Method: "GET", - Path: "/rdb/v1/regions/" + fmt.Sprint(req.Region) + "", - Headers: http.Header{}, - } - - var resp scw.ServiceInfo - - err = s.client.Do(scwReq, &resp, opts...) - if err != nil { - return nil, err - } - return &resp, nil -} - type ListDatabaseEnginesRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` Page *int32 `json:"-"` @@ -1384,6 +1356,9 @@ func (s *API) ListDatabaseEngines(req *ListDatabaseEnginesRequest, opts ...scw.R } type ListNodeTypesRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // IncludeDisabledTypes: whether or not to include disabled types IncludeDisabledTypes bool `json:"-"` @@ -1433,6 +1408,9 @@ func (s *API) ListNodeTypes(req *ListNodeTypesRequest, opts ...scw.RequestOption } type ListDatabaseBackupsRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // Name: name of the database backups Name *string `json:"-"` @@ -1496,6 +1474,9 @@ func (s *API) ListDatabaseBackups(req *ListDatabaseBackupsRequest, opts ...scw.R } type CreateDatabaseBackupRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // InstanceID: UUID of the instance InstanceID string `json:"instance_id"` @@ -1545,6 +1526,9 @@ func (s *API) CreateDatabaseBackup(req *CreateDatabaseBackupRequest, opts ...scw } type GetDatabaseBackupRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // DatabaseBackupID: UUID of the database backup DatabaseBackupID string `json:"-"` @@ -1583,6 +1567,9 @@ func (s *API) GetDatabaseBackup(req *GetDatabaseBackupRequest, opts ...scw.Reque } type UpdateDatabaseBackupRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // DatabaseBackupID: UUID of the database backup to update DatabaseBackupID string `json:"-"` @@ -1630,6 +1617,9 @@ func (s *API) UpdateDatabaseBackup(req *UpdateDatabaseBackupRequest, opts ...scw } type DeleteDatabaseBackupRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // DatabaseBackupID: UUID of the database backup to delete DatabaseBackupID string `json:"-"` @@ -1668,6 +1658,9 @@ func (s *API) DeleteDatabaseBackup(req *DeleteDatabaseBackupRequest, opts ...scw } type RestoreDatabaseBackupRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // DatabaseBackupID: backup of a logical database DatabaseBackupID string `json:"-"` @@ -1715,6 +1708,9 @@ func (s *API) RestoreDatabaseBackup(req *RestoreDatabaseBackupRequest, opts ...s } type ExportDatabaseBackupRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // DatabaseBackupID: UUID of the database backup you want to export DatabaseBackupID string `json:"-"` @@ -1758,6 +1754,9 @@ func (s *API) ExportDatabaseBackup(req *ExportDatabaseBackupRequest, opts ...scw } type UpgradeInstanceRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // InstanceID: UUID of the instance you want to upgrade InstanceID string `json:"-"` @@ -1817,6 +1816,9 @@ func (s *API) UpgradeInstance(req *UpgradeInstanceRequest, opts ...scw.RequestOp } type ListInstancesRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // Tags: list instance that have a given tags Tags []string `json:"-"` @@ -1880,6 +1882,9 @@ func (s *API) ListInstances(req *ListInstancesRequest, opts ...scw.RequestOption } type GetInstanceRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // InstanceID: UUID of the instance InstanceID string `json:"-"` @@ -1918,6 +1923,9 @@ func (s *API) GetInstance(req *GetInstanceRequest, opts ...scw.RequestOption) (* } type CreateInstanceRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // Deprecated: OrganizationID: please use `project_id` instead // Precisely one of OrganizationID, ProjectID must be set. @@ -2003,6 +2011,9 @@ func (s *API) CreateInstance(req *CreateInstanceRequest, opts ...scw.RequestOpti } type UpdateInstanceRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // InstanceID: UUID of the instance to update InstanceID string `json:"-"` @@ -2060,6 +2071,9 @@ func (s *API) UpdateInstance(req *UpdateInstanceRequest, opts ...scw.RequestOpti } type DeleteInstanceRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // InstanceID: UUID of the instance to delete InstanceID string `json:"-"` @@ -2098,6 +2112,9 @@ func (s *API) DeleteInstance(req *DeleteInstanceRequest, opts ...scw.RequestOpti } type CloneInstanceRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // InstanceID: UUID of the instance you want to clone InstanceID string `json:"-"` @@ -2145,6 +2162,9 @@ func (s *API) CloneInstance(req *CloneInstanceRequest, opts ...scw.RequestOption } type RestartInstanceRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // InstanceID: UUID of the instance you want to restart InstanceID string `json:"-"` @@ -2188,6 +2208,9 @@ func (s *API) RestartInstance(req *RestartInstanceRequest, opts ...scw.RequestOp } type GetInstanceCertificateRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // InstanceID: UUID of the instance InstanceID string `json:"-"` @@ -2226,6 +2249,9 @@ func (s *API) GetInstanceCertificate(req *GetInstanceCertificateRequest, opts .. } type RenewInstanceCertificateRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // InstanceID: UUID of the instance you want logs of InstanceID string `json:"-"` @@ -2267,6 +2293,9 @@ func (s *API) RenewInstanceCertificate(req *RenewInstanceCertificateRequest, opt } type GetInstanceMetricsRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // InstanceID: UUID of the instance InstanceID string `json:"-"` @@ -2319,6 +2348,9 @@ func (s *API) GetInstanceMetrics(req *GetInstanceMetricsRequest, opts ...scw.Req } type PrepareInstanceLogsRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // InstanceID: UUID of the instance you want logs of InstanceID string `json:"-"` @@ -2368,6 +2400,9 @@ func (s *API) PrepareInstanceLogs(req *PrepareInstanceLogsRequest, opts ...scw.R } type ListInstanceLogsRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // InstanceID: UUID of the instance you want logs of InstanceID string `json:"-"` @@ -2414,6 +2449,9 @@ func (s *API) ListInstanceLogs(req *ListInstanceLogsRequest, opts ...scw.Request } type GetInstanceLogRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // InstanceLogID: UUID of the instance_log you want InstanceLogID string `json:"-"` @@ -2452,6 +2490,9 @@ func (s *API) GetInstanceLog(req *GetInstanceLogRequest, opts ...scw.RequestOpti } type PurgeInstanceLogsRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // InstanceID: UUID of the instance you want logs of InstanceID string `json:"-"` @@ -2495,6 +2536,9 @@ func (s *API) PurgeInstanceLogs(req *PurgeInstanceLogsRequest, opts ...scw.Reque } type ListInstanceLogsDetailsRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // InstanceID: UUID of the instance you want logs of InstanceID string `json:"-"` @@ -2533,6 +2577,9 @@ func (s *API) ListInstanceLogsDetails(req *ListInstanceLogsDetailsRequest, opts } type AddInstanceSettingsRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // InstanceID: UUID of the instance you want to add settings to InstanceID string `json:"-"` @@ -2578,6 +2625,9 @@ func (s *API) AddInstanceSettings(req *AddInstanceSettingsRequest, opts ...scw.R } type DeleteInstanceSettingsRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // InstanceID: UUID of the instance to delete settings from InstanceID string `json:"-"` @@ -2623,6 +2673,9 @@ func (s *API) DeleteInstanceSettings(req *DeleteInstanceSettingsRequest, opts .. } type SetInstanceSettingsRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // InstanceID: UUID of the instance where the settings has to be set InstanceID string `json:"-"` @@ -2668,6 +2721,9 @@ func (s *API) SetInstanceSettings(req *SetInstanceSettingsRequest, opts ...scw.R } type ListInstanceACLRulesRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // InstanceID: UUID of the instance InstanceID string `json:"-"` @@ -2720,6 +2776,9 @@ func (s *API) ListInstanceACLRules(req *ListInstanceACLRulesRequest, opts ...scw } type AddInstanceACLRulesRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // InstanceID: UUID of the instance you want to add acl rules to InstanceID string `json:"-"` @@ -2767,6 +2826,9 @@ func (s *API) AddInstanceACLRules(req *AddInstanceACLRulesRequest, opts ...scw.R } type SetInstanceACLRulesRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // InstanceID: UUID of the instance where the ACL rules has to be set InstanceID string `json:"-"` @@ -2814,6 +2876,9 @@ func (s *API) SetInstanceACLRules(req *SetInstanceACLRulesRequest, opts ...scw.R } type DeleteInstanceACLRulesRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // InstanceID: UUID of the instance you want to delete an ACL rules from InstanceID string `json:"-"` @@ -2859,6 +2924,9 @@ func (s *API) DeleteInstanceACLRules(req *DeleteInstanceACLRulesRequest, opts .. } type ListUsersRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // InstanceID: UUID of the instance InstanceID string `json:"-"` @@ -2919,6 +2987,9 @@ func (s *API) ListUsers(req *ListUsersRequest, opts ...scw.RequestOption) (*List } type CreateUserRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // InstanceID: UUID of the instance you want to create a user in InstanceID string `json:"-"` @@ -2968,6 +3039,9 @@ func (s *API) CreateUser(req *CreateUserRequest, opts ...scw.RequestOption) (*Us } type UpdateUserRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // InstanceID: UUID of the instance the user belongs to InstanceID string `json:"-"` @@ -3021,6 +3095,9 @@ func (s *API) UpdateUser(req *UpdateUserRequest, opts ...scw.RequestOption) (*Us } type DeleteUserRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // InstanceID: UUID of the instance to delete a user from InstanceID string `json:"-"` @@ -3063,6 +3140,9 @@ func (s *API) DeleteUser(req *DeleteUserRequest, opts ...scw.RequestOption) erro } type ListDatabasesRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // InstanceID: UUID of the instance to list database of InstanceID string `json:"-"` @@ -3129,6 +3209,9 @@ func (s *API) ListDatabases(req *ListDatabasesRequest, opts ...scw.RequestOption } type CreateDatabaseRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // InstanceID: UUID of the instance where to create the database InstanceID string `json:"-"` @@ -3174,6 +3257,9 @@ func (s *API) CreateDatabase(req *CreateDatabaseRequest, opts ...scw.RequestOpti } type DeleteDatabaseRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // InstanceID: UUID of the instance where to delete the database InstanceID string `json:"-"` @@ -3216,6 +3302,9 @@ func (s *API) DeleteDatabase(req *DeleteDatabaseRequest, opts ...scw.RequestOpti } type ListPrivilegesRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // InstanceID: UUID of the instance InstanceID string `json:"-"` @@ -3279,6 +3368,9 @@ func (s *API) ListPrivileges(req *ListPrivilegesRequest, opts ...scw.RequestOpti } type SetPrivilegeRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // InstanceID: UUID of the instance InstanceID string `json:"-"` @@ -3330,6 +3422,9 @@ func (s *API) SetPrivilege(req *SetPrivilegeRequest, opts ...scw.RequestOption) } type ListSnapshotsRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // Name: name of the snapshot Name *string `json:"-"` @@ -3393,6 +3488,9 @@ func (s *API) ListSnapshots(req *ListSnapshotsRequest, opts ...scw.RequestOption } type GetSnapshotRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // SnapshotID: UUID of the snapshot SnapshotID string `json:"-"` @@ -3431,6 +3529,9 @@ func (s *API) GetSnapshot(req *GetSnapshotRequest, opts ...scw.RequestOption) (* } type CreateSnapshotRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // InstanceID: UUID of the instance InstanceID string `json:"-"` @@ -3482,6 +3583,9 @@ func (s *API) CreateSnapshot(req *CreateSnapshotRequest, opts ...scw.RequestOpti } type UpdateSnapshotRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // SnapshotID: UUID of the snapshot to update SnapshotID string `json:"-"` @@ -3529,6 +3633,9 @@ func (s *API) UpdateSnapshot(req *UpdateSnapshotRequest, opts ...scw.RequestOpti } type DeleteSnapshotRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // SnapshotID: UUID of the snapshot to delete SnapshotID string `json:"-"` @@ -3567,6 +3674,9 @@ func (s *API) DeleteSnapshot(req *DeleteSnapshotRequest, opts ...scw.RequestOpti } type CreateInstanceFromSnapshotRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // SnapshotID: block snapshot of the instance SnapshotID string `json:"-"` @@ -3616,6 +3726,9 @@ func (s *API) CreateInstanceFromSnapshot(req *CreateInstanceFromSnapshotRequest, } type CreateEndpointRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // InstanceID: UUID of the instance you want to add endpoint to InstanceID string `json:"-"` @@ -3661,6 +3774,9 @@ func (s *API) CreateEndpoint(req *CreateEndpointRequest, opts ...scw.RequestOpti } type DeleteEndpointRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // EndpointID: UUID of the endpoint you want to delete EndpointID string `json:"-"` @@ -3697,6 +3813,9 @@ func (s *API) DeleteEndpoint(req *DeleteEndpointRequest, opts ...scw.RequestOpti } type GetEndpointRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // EndpointID: UUID of the endpoint you want to get EndpointID string `json:"-"` diff --git a/api/redis/v1alpha1/redis_sdk.go b/api/redis/v1alpha1/redis_sdk.go index 57101a32d..f5e342066 100644 --- a/api/redis/v1alpha1/redis_sdk.go +++ b/api/redis/v1alpha1/redis_sdk.go @@ -205,153 +205,162 @@ func (enum *NodeTypeStock) UnmarshalJSON(data []byte) error { // ACLRule: acl rule type ACLRule struct { + // ID: ID of the rule ID string `json:"id"` - + // IP: iPv4 network address of the rule IP *scw.IPNet `json:"ip"` - + // Description: description of the rule Description *string `json:"description"` } // ACLRuleSpec: acl rule spec type ACLRuleSpec struct { + // IP: iPv4 network address of the rule IP scw.IPNet `json:"ip"` - + // Description: description of the rule Description string `json:"description"` } // ACLRulesResponse: acl rules response type ACLRulesResponse struct { + // ACLRules: ACL Rules enabled on the cluster ACLRules []*ACLRule `json:"acl_rules"` } // AddEndpointsResponse: add endpoints response type AddEndpointsResponse struct { + // Endpoints: endpoints defined on the cluster Endpoints []*Endpoint `json:"endpoints"` - + // TotalCount: total count of endpoints of the cluster TotalCount uint32 `json:"total_count"` } // AvailableClusterSetting: available cluster setting type AvailableClusterSetting struct { + // Name: name of the setting Name string `json:"name"` - + // DefaultValue: default value of the setting DefaultValue *string `json:"default_value"` - // Type: + // Type: type of the setting // // Default value: BOOLEAN Type AvailableClusterSettingPropertyType `json:"type"` - + // Description: description of the setting Description string `json:"description"` - + // MaxValue: optional maximum value of the setting MaxValue *int64 `json:"max_value"` - + // MinValue: optional minimum value of the setting MinValue *int64 `json:"min_value"` - + // Regex: optional validation rule of the setting Regex *string `json:"regex"` - + // Deprecated: whether the setting is deprecated Deprecated bool `json:"deprecated"` } // Cluster: cluster type Cluster struct { + // ID: UUID of the cluster ID string `json:"id"` - + // Name: name of the cluster Name string `json:"name"` - + // ProjectID: project ID the cluster belongs to ProjectID string `json:"project_id"` - // Status: + // Status: status of the cluster // // Default value: unknown Status ClusterStatus `json:"status"` - + // Version: redis version of the cluster Version string `json:"version"` - + // Endpoints: list of cluster endpoints Endpoints []*Endpoint `json:"endpoints"` - + // Tags: list of tags applied to the cluster Tags []string `json:"tags"` - + // NodeType: node type of the cluster NodeType string `json:"node_type"` - + // CreatedAt: creation date (Format ISO 8601) CreatedAt *time.Time `json:"created_at"` - + // UpdatedAt: update date (Format ISO 8601) UpdatedAt *time.Time `json:"updated_at"` - + // TLSEnabled: whether or not TLS is enabled TLSEnabled bool `json:"tls_enabled"` - + // ClusterSettings: list of cluster settings ClusterSettings []*ClusterSetting `json:"cluster_settings"` - + // ACLRules: list of acl rules ACLRules []*ACLRule `json:"acl_rules"` - + // ClusterSize: number of nodes of the cluster ClusterSize int32 `json:"cluster_size"` - + // Zone: zone of the cluster Zone scw.Zone `json:"zone"` } // ClusterMetricsResponse: cluster metrics response type ClusterMetricsResponse struct { + // Timeseries: time series of metrics of a given cluster Timeseries []*scw.TimeSeries `json:"timeseries"` } // ClusterSetting: cluster setting type ClusterSetting struct { + // Value: value of the setting Value string `json:"value"` - + // Name: name of the setting Name string `json:"name"` } // ClusterSettingsResponse: cluster settings response type ClusterSettingsResponse struct { + // Settings: settings configured for a given cluster Settings []*ClusterSetting `json:"settings"` } // ClusterVersion: cluster version type ClusterVersion struct { + // Version: redis version Version string `json:"version"` - + // EolDate: end of life date EolDate *time.Time `json:"eol_date"` - + // AvailableSettings: cluster settings available to be set AvailableSettings []*AvailableClusterSetting `json:"available_settings"` - + // LogoURL: redis logo url LogoURL string `json:"logo_url"` - + // Zone: zone of the Redis version Zone scw.Zone `json:"zone"` } // Endpoint: endpoint type Endpoint struct { - // Port: port to connect to redis server + // Port: TCP port of the endpoint Port uint32 `json:"port"` - // PrivateNetwork: private network details for endpoint + // PrivateNetwork: private network details // Precisely one of PrivateNetwork, PublicNetwork must be set. PrivateNetwork *PrivateNetwork `json:"private_network,omitempty"` - // ID: UUID of current endpoint (Used for delete PN endpoint) - ID string `json:"id"` - // PublicNetwork: public network details for endpoint + // PublicNetwork: public network details // Precisely one of PrivateNetwork, PublicNetwork must be set. PublicNetwork *EndpointPublicNetwork `json:"public_network,omitempty"` - // IPs: list of ip in current endpoint + // IPs: lis of IPv4 address of the endpoint IPs []net.IP `json:"ips"` + // ID: UUID of the endpoint + ID string `json:"id"` } -// EndpointPublicNetwork: endpoint. public network type EndpointPublicNetwork struct { } // EndpointSpec: endpoint spec type EndpointSpec struct { - // PrivateNetwork: private network details for endpoint + // PrivateNetwork: private network spec details // Precisely one of PrivateNetwork, PublicNetwork must be set. PrivateNetwork *EndpointSpecPrivateNetworkSpec `json:"private_network,omitempty"` - // PublicNetwork: public network details for endpoint + // PublicNetwork: public network spec details // Precisely one of PrivateNetwork, PublicNetwork must be set. PublicNetwork *EndpointSpecPublicNetworkSpec `json:"public_network,omitempty"` } // EndpointSpecPrivateNetworkSpec: endpoint spec. private network spec type EndpointSpecPrivateNetworkSpec struct { - // ID: put UUID of the endpoint you want to connect cluster + // ID: UUID of the private network to be connected to the cluster ID string `json:"id"` - // ServiceIPs: put a list of IPv4 in CIDR format to expose the cluster in the private network. You must provide one IPv4 per node + // ServiceIPs: endpoint IPv4 adress with a CIDR notation. You must provide at least one IPv4 per node. Check documentation about IP and subnet limitation. ServiceIPs []scw.IPNet `json:"service_ips"` } @@ -361,123 +370,104 @@ type EndpointSpecPublicNetworkSpec struct { // ListClustersResponse: list clusters response type ListClustersResponse struct { + // Clusters: list all clusters Clusters []*Cluster `json:"clusters"` - + // TotalCount: total count of clusters TotalCount uint32 `json:"total_count"` } // ListNodeTypesResponse: list node types response type ListNodeTypesResponse struct { + // NodeTypes: types of the node NodeTypes []*NodeType `json:"node_types"` - + // TotalCount: total count of node-types available TotalCount uint32 `json:"total_count"` } // ListVersionsResponse: list versions response type ListVersionsResponse struct { - TotalCount uint32 `json:"total_count"` - + // Versions: list of the available Redis versions Versions []*ClusterVersion `json:"versions"` + // TotalCount: total count of Redis versions available + TotalCount uint32 `json:"total_count"` } // NodeType: node type type NodeType struct { + // Name: node Type name identifier Name string `json:"name"` - // StockStatus: + // StockStatus: current stock status for the Node Type // // Default value: unknown StockStatus NodeTypeStock `json:"stock_status"` - + // Description: current specs of the offer Description string `json:"description"` - + // Vcpus: number of virtual CPUs Vcpus uint32 `json:"vcpus"` - + // Memory: quantity of RAM Memory scw.Size `json:"memory"` - + // Disabled: the Node Type is currently disabled Disabled bool `json:"disabled"` - + // Beta: the Node Type is currently in beta Beta bool `json:"beta"` - + // Zone: zone the Node Type is in Zone scw.Zone `json:"zone"` } // PrivateNetwork: private network type PrivateNetwork struct { + // ID: UUID of the private network ID string `json:"id"` - + // ServiceIPs: list of IPv4 CIDR notation addresses of the endpoint ServiceIPs []scw.IPNet `json:"service_ips"` - + // Zone: private network zone Zone scw.Zone `json:"zone"` } // SetEndpointsResponse: set endpoints response type SetEndpointsResponse struct { + // Endpoints: endpoints defined on the cluster Endpoints []*Endpoint `json:"endpoints"` - + // TotalCount: total count of endpoints of the cluster TotalCount uint32 `json:"total_count"` } // Service API -type GetServiceInfoRequest struct { - Zone scw.Zone `json:"-"` -} - -func (s *API) GetServiceInfo(req *GetServiceInfoRequest, opts ...scw.RequestOption) (*scw.ServiceInfo, error) { - var err error - - if req.Zone == "" { - defaultZone, _ := s.client.GetDefaultZone() - req.Zone = defaultZone - } - - if fmt.Sprint(req.Zone) == "" { - return nil, errors.New("field Zone cannot be empty in request") - } - - scwReq := &scw.ScalewayRequest{ - Method: "GET", - Path: "/redis/v1alpha1/zones/" + fmt.Sprint(req.Zone) + "", - Headers: http.Header{}, - } - - var resp scw.ServiceInfo - - err = s.client.Do(scwReq, &resp, opts...) - if err != nil { - return nil, err - } - return &resp, nil -} - type CreateClusterRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` - + // ProjectID: the project ID on which to create the cluster ProjectID string `json:"project_id"` - + // Name: name of the cluster Name string `json:"name"` - + // Version: redis version of the cluster Version string `json:"version"` - + // Tags: tags to apply to the cluster Tags []string `json:"tags"` - + // NodeType: type of node to use for the cluster NodeType string `json:"node_type"` - + // UserName: name of the user created when the cluster is created UserName string `json:"user_name"` - + // Password: password of the user Password string `json:"password"` - + // ClusterSize: number of nodes for the cluster ClusterSize *int32 `json:"cluster_size"` - + // ACLRules: list of ACLRuleSpec used to secure your publicly exposed cluster ACLRules []*ACLRuleSpec `json:"acl_rules"` - + // Endpoints: zero or multiple EndpointSpec used to expose your cluster publicly and inside private networks + // + // Zero or multiple EndpointSpec used to expose your cluster publicly and inside private networks. If no EndpoindSpec is given the cluster will be publicly exposed by default. Endpoints []*EndpointSpec `json:"endpoints"` - + // TLSEnabled: whether or not TLS is enabled TLSEnabled bool `json:"tls_enabled"` - + // ClusterSettings: list of cluster settings to be set at cluster initialisation ClusterSettings []*ClusterSetting `json:"cluster_settings"` } +// CreateCluster: create a cluster func (s *API) CreateCluster(req *CreateClusterRequest, opts ...scw.RequestOption) (*Cluster, error) { var err error @@ -491,6 +481,10 @@ func (s *API) CreateCluster(req *CreateClusterRequest, opts ...scw.RequestOption req.Zone = defaultZone } + if req.Name == "" { + req.Name = namegenerator.GetRandomName("ins") + } + if fmt.Sprint(req.Zone) == "" { return nil, errors.New("field Zone cannot be empty in request") } @@ -516,19 +510,23 @@ func (s *API) CreateCluster(req *CreateClusterRequest, opts ...scw.RequestOption } type UpdateClusterRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` - + // ClusterID: UUID of the cluster to update ClusterID string `json:"-"` - + // Name: name of the cluster Name *string `json:"name"` - + // Tags: tags of a given cluster Tags []string `json:"tags"` - + // UserName: name of the cluster user UserName *string `json:"user_name"` - + // Password: password of the cluster user Password *string `json:"password"` } +// UpdateCluster: update a cluster func (s *API) UpdateCluster(req *UpdateClusterRequest, opts ...scw.RequestOption) (*Cluster, error) { var err error @@ -566,11 +564,15 @@ func (s *API) UpdateCluster(req *UpdateClusterRequest, opts ...scw.RequestOption } type GetClusterRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` - + // ClusterID: UUID of the cluster ClusterID string `json:"-"` } +// GetCluster: get a cluster func (s *API) GetCluster(req *GetClusterRequest, opts ...scw.RequestOption) (*Cluster, error) { var err error @@ -603,16 +605,19 @@ func (s *API) GetCluster(req *GetClusterRequest, opts ...scw.RequestOption) (*Cl } type ListClustersRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` - + // Tags: tags of the clusters to filter upon Tags []string `json:"-"` - + // Name: name of the clusters to filter upon Name *string `json:"-"` - // OrderBy: + // OrderBy: criteria to use when ordering cluster listing // // Default value: created_at_asc OrderBy ListClustersRequestOrderBy `json:"-"` - + // ProjectID: project ID to list the cluster of ProjectID *string `json:"-"` Page *int32 `json:"-"` @@ -620,6 +625,7 @@ type ListClustersRequest struct { PageSize *uint32 `json:"-"` } +// ListClusters: list clusters func (s *API) ListClusters(req *ListClustersRequest, opts ...scw.RequestOption) (*ListClustersResponse, error) { var err error @@ -662,20 +668,24 @@ func (s *API) ListClusters(req *ListClustersRequest, opts ...scw.RequestOption) } type MigrateClusterRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` - + // ClusterID: UUID of the cluster to update ClusterID string `json:"-"` - + // Version: redis version of the cluster // Precisely one of ClusterSize, NodeType, Version must be set. Version *string `json:"version,omitempty"` - + // NodeType: type of node to use for the cluster // Precisely one of ClusterSize, NodeType, Version must be set. NodeType *string `json:"node_type,omitempty"` - + // ClusterSize: number of nodes for the cluster // Precisely one of ClusterSize, NodeType, Version must be set. ClusterSize *uint32 `json:"cluster_size,omitempty"` } +// MigrateCluster: migrate a cluster func (s *API) MigrateCluster(req *MigrateClusterRequest, opts ...scw.RequestOption) (*Cluster, error) { var err error @@ -713,11 +723,15 @@ func (s *API) MigrateCluster(req *MigrateClusterRequest, opts ...scw.RequestOpti } type DeleteClusterRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` - + // ClusterID: UUID of the cluster to delete ClusterID string `json:"-"` } +// DeleteCluster: delete a cluster func (s *API) DeleteCluster(req *DeleteClusterRequest, opts ...scw.RequestOption) (*Cluster, error) { var err error @@ -749,9 +763,65 @@ func (s *API) DeleteCluster(req *DeleteClusterRequest, opts ...scw.RequestOption return &resp, nil } -type ListNodeTypesRequest struct { +type GetClusterMetricsRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` + // ClusterID: UUID of the cluster + ClusterID string `json:"-"` + // StartDate: start date to gather metrics from + StartDate *time.Time `json:"-"` + // EndDate: end date to gather metrics from + EndDate *time.Time `json:"-"` + // MetricName: name of the metric to gather + MetricName *string `json:"-"` +} + +// GetClusterMetrics: get metrics of a cluster +func (s *API) GetClusterMetrics(req *GetClusterMetricsRequest, opts ...scw.RequestOption) (*ClusterMetricsResponse, error) { + var err error + if req.Zone == "" { + defaultZone, _ := s.client.GetDefaultZone() + req.Zone = defaultZone + } + + query := url.Values{} + parameter.AddToQuery(query, "start_date", req.StartDate) + parameter.AddToQuery(query, "end_date", req.EndDate) + parameter.AddToQuery(query, "metric_name", req.MetricName) + + if fmt.Sprint(req.Zone) == "" { + return nil, errors.New("field Zone cannot be empty in request") + } + + if fmt.Sprint(req.ClusterID) == "" { + return nil, errors.New("field ClusterID cannot be empty in request") + } + + scwReq := &scw.ScalewayRequest{ + Method: "GET", + Path: "/redis/v1alpha1/zones/" + fmt.Sprint(req.Zone) + "/clusters/" + fmt.Sprint(req.ClusterID) + "/metrics", + Query: query, + Headers: http.Header{}, + } + + var resp ClusterMetricsResponse + + err = s.client.Do(scwReq, &resp, opts...) + if err != nil { + return nil, err + } + return &resp, nil +} + +type ListNodeTypesRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config + Zone scw.Zone `json:"-"` + // IncludeDisabledTypes: whether or not to include disabled types IncludeDisabledTypes bool `json:"-"` Page *int32 `json:"-"` @@ -759,6 +829,7 @@ type ListNodeTypesRequest struct { PageSize *uint32 `json:"-"` } +// ListNodeTypes: list available node types func (s *API) ListNodeTypes(req *ListNodeTypesRequest, opts ...scw.RequestOption) (*ListNodeTypesResponse, error) { var err error @@ -798,21 +869,25 @@ func (s *API) ListNodeTypes(req *ListNodeTypesRequest, opts ...scw.RequestOption } type ListVersionsRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` - - Page *int32 `json:"-"` - - PageSize *uint32 `json:"-"` - + // IncludeDisabled: whether or not to include disabled Redis versions IncludeDisabled bool `json:"-"` - + // IncludeBeta: whether or not to include beta Redis versions IncludeBeta bool `json:"-"` - + // IncludeDeprecated: whether or not to include deprecated Redis versions IncludeDeprecated bool `json:"-"` - + // VersionName: list Redis versions that match a given name pattern VersionName *string `json:"-"` + + Page *int32 `json:"-"` + + PageSize *uint32 `json:"-"` } +// ListVersions: list available Redis versions func (s *API) ListVersions(req *ListVersionsRequest, opts ...scw.RequestOption) (*ListVersionsResponse, error) { var err error @@ -827,12 +902,12 @@ func (s *API) ListVersions(req *ListVersionsRequest, opts ...scw.RequestOption) } query := url.Values{} - parameter.AddToQuery(query, "page", req.Page) - parameter.AddToQuery(query, "page_size", req.PageSize) parameter.AddToQuery(query, "include_disabled", req.IncludeDisabled) parameter.AddToQuery(query, "include_beta", req.IncludeBeta) parameter.AddToQuery(query, "include_deprecated", req.IncludeDeprecated) parameter.AddToQuery(query, "version_name", req.VersionName) + parameter.AddToQuery(query, "page", req.Page) + parameter.AddToQuery(query, "page_size", req.PageSize) if fmt.Sprint(req.Zone) == "" { return nil, errors.New("field Zone cannot be empty in request") @@ -855,11 +930,15 @@ func (s *API) ListVersions(req *ListVersionsRequest, opts ...scw.RequestOption) } type GetClusterCertificateRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` - + // ClusterID: UUID of the cluster ClusterID string `json:"-"` } +// GetClusterCertificate: get the TLS certificate of a cluster func (s *API) GetClusterCertificate(req *GetClusterCertificateRequest, opts ...scw.RequestOption) (*scw.File, error) { var err error @@ -892,11 +971,15 @@ func (s *API) GetClusterCertificate(req *GetClusterCertificateRequest, opts ...s } type RenewClusterCertificateRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` - + // ClusterID: UUID of the cluster ClusterID string `json:"-"` } +// RenewClusterCertificate: renew the TLS certificate of a cluster func (s *API) RenewClusterCertificate(req *RenewClusterCertificateRequest, opts ...scw.RequestOption) error { var err error @@ -931,63 +1014,18 @@ func (s *API) RenewClusterCertificate(req *RenewClusterCertificateRequest, opts return nil } -type GetClusterMetricsRequest struct { - Zone scw.Zone `json:"-"` - - ClusterID string `json:"-"` - - StartDate *time.Time `json:"-"` - - EndDate *time.Time `json:"-"` - - MetricName *string `json:"-"` -} - -func (s *API) GetClusterMetrics(req *GetClusterMetricsRequest, opts ...scw.RequestOption) (*ClusterMetricsResponse, error) { - var err error - - if req.Zone == "" { - defaultZone, _ := s.client.GetDefaultZone() - req.Zone = defaultZone - } - - query := url.Values{} - parameter.AddToQuery(query, "start_date", req.StartDate) - parameter.AddToQuery(query, "end_date", req.EndDate) - parameter.AddToQuery(query, "metric_name", req.MetricName) - - if fmt.Sprint(req.Zone) == "" { - return nil, errors.New("field Zone cannot be empty in request") - } - - if fmt.Sprint(req.ClusterID) == "" { - return nil, errors.New("field ClusterID cannot be empty in request") - } - - scwReq := &scw.ScalewayRequest{ - Method: "GET", - Path: "/redis/v1alpha1/zones/" + fmt.Sprint(req.Zone) + "/clusters/" + fmt.Sprint(req.ClusterID) + "/metrics", - Query: query, - Headers: http.Header{}, - } - - var resp ClusterMetricsResponse - - err = s.client.Do(scwReq, &resp, opts...) - if err != nil { - return nil, err - } - return &resp, nil -} - type AddClusterSettingsRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` - + // ClusterID: UUID of the cluster you want to add settings to ClusterID string `json:"-"` - + // Settings: settings to add on the cluster Settings []*ClusterSetting `json:"settings"` } +// AddClusterSettings: add cluster settings func (s *API) AddClusterSettings(req *AddClusterSettingsRequest, opts ...scw.RequestOption) (*ClusterSettingsResponse, error) { var err error @@ -1025,13 +1063,17 @@ func (s *API) AddClusterSettings(req *AddClusterSettingsRequest, opts ...scw.Req } type DeleteClusterSettingRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` - + // ClusterID: UUID of the cluster where the settings has to be set ClusterID string `json:"-"` - + // SettingsName: setting name to delete SettingsName string `json:"settings_name"` } +// DeleteClusterSetting: delete a cluster setting func (s *API) DeleteClusterSetting(req *DeleteClusterSettingRequest, opts ...scw.RequestOption) error { var err error @@ -1067,13 +1109,17 @@ func (s *API) DeleteClusterSetting(req *DeleteClusterSettingRequest, opts ...scw } type SetClusterSettingsRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` - + // ClusterID: UUID of the cluster where the settings has to be set ClusterID string `json:"-"` - + // Settings: settings to define for the cluster Settings []*ClusterSetting `json:"settings"` } +// SetClusterSettings: set cluster settings func (s *API) SetClusterSettings(req *SetClusterSettingsRequest, opts ...scw.RequestOption) (*ClusterSettingsResponse, error) { var err error @@ -1111,13 +1157,17 @@ func (s *API) SetClusterSettings(req *SetClusterSettingsRequest, opts ...scw.Req } type SetACLRulesRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` - + // ClusterID: UUID of the cluster where the ACL rules has to be set ClusterID string `json:"-"` - + // ACLRules: aCLs rules to define for the cluster ACLRules []*ACLRuleSpec `json:"acl_rules"` } +// SetACLRules: set ACL rules for a given cluster func (s *API) SetACLRules(req *SetACLRulesRequest, opts ...scw.RequestOption) (*ACLRulesResponse, error) { var err error @@ -1155,13 +1205,17 @@ func (s *API) SetACLRules(req *SetACLRulesRequest, opts ...scw.RequestOption) (* } type AddACLRulesRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` - + // ClusterID: UUID of the cluster you want to add acl rules to ClusterID string `json:"-"` - + // ACLRules: aCLs rules to add to the cluster ACLRules []*ACLRuleSpec `json:"acl_rules"` } +// AddACLRules: add ACL rules for a given cluster func (s *API) AddACLRules(req *AddACLRulesRequest, opts ...scw.RequestOption) (*ACLRulesResponse, error) { var err error @@ -1199,11 +1253,15 @@ func (s *API) AddACLRules(req *AddACLRulesRequest, opts ...scw.RequestOption) (* } type DeleteACLRuleRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` - + // ACLID: UUID of the acl rule you want to delete ACLID string `json:"-"` } +// DeleteACLRule: delete an ACL rule for a given cluster func (s *API) DeleteACLRule(req *DeleteACLRuleRequest, opts ...scw.RequestOption) error { var err error @@ -1234,11 +1292,15 @@ func (s *API) DeleteACLRule(req *DeleteACLRuleRequest, opts ...scw.RequestOption } type GetACLRuleRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` - + // ACLID: UUID of the acl rule you want to get ACLID string `json:"-"` } +// GetACLRule: get an ACL rule func (s *API) GetACLRule(req *GetACLRuleRequest, opts ...scw.RequestOption) (*ACLRule, error) { var err error @@ -1271,13 +1333,17 @@ func (s *API) GetACLRule(req *GetACLRuleRequest, opts ...scw.RequestOption) (*AC } type SetEndpointsRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` - + // ClusterID: UUID of the cluster where the endpoints has to be set ClusterID string `json:"-"` - + // Endpoints: endpoints to define for the cluster Endpoints []*EndpointSpec `json:"endpoints"` } +// SetEndpoints: set endpoints for a given cluster func (s *API) SetEndpoints(req *SetEndpointsRequest, opts ...scw.RequestOption) (*SetEndpointsResponse, error) { var err error @@ -1315,13 +1381,17 @@ func (s *API) SetEndpoints(req *SetEndpointsRequest, opts ...scw.RequestOption) } type AddEndpointsRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` - + // ClusterID: UUID of the cluster you want to add endpoints to ClusterID string `json:"-"` - + // Endpoints: endpoints to add to the cluster Endpoints []*EndpointSpec `json:"endpoints"` } +// AddEndpoints: add endpoints for a given cluster func (s *API) AddEndpoints(req *AddEndpointsRequest, opts ...scw.RequestOption) (*AddEndpointsResponse, error) { var err error @@ -1359,11 +1429,15 @@ func (s *API) AddEndpoints(req *AddEndpointsRequest, opts ...scw.RequestOption) } type DeleteEndpointRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` EndpointID string `json:"-"` } +// DeleteEndpoint: delete an endpoint for a given cluster func (s *API) DeleteEndpoint(req *DeleteEndpointRequest, opts ...scw.RequestOption) error { var err error @@ -1394,11 +1468,15 @@ func (s *API) DeleteEndpoint(req *DeleteEndpointRequest, opts ...scw.RequestOpti } type GetEndpointRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` EndpointID string `json:"-"` } +// GetEndpoint: get an endpoint func (s *API) GetEndpoint(req *GetEndpointRequest, opts ...scw.RequestOption) (*Endpoint, error) { var err error diff --git a/api/registry/v1/registry_sdk.go b/api/registry/v1/registry_sdk.go index ae5a10221..6481607ad 100644 --- a/api/registry/v1/registry_sdk.go +++ b/api/registry/v1/registry_sdk.go @@ -424,6 +424,9 @@ type Tag struct { // Service API type ListNamespacesRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // Page: a positive integer to choose the page to display Page *int32 `json:"-"` @@ -484,6 +487,9 @@ func (s *API) ListNamespaces(req *ListNamespacesRequest, opts ...scw.RequestOpti } type GetNamespaceRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // NamespaceID: the unique ID of the Namespace NamespaceID string `json:"-"` @@ -524,6 +530,9 @@ func (s *API) GetNamespace(req *GetNamespaceRequest, opts ...scw.RequestOption) } type CreateNamespaceRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // Name: define a namespace name Name string `json:"name"` @@ -587,6 +596,9 @@ func (s *API) CreateNamespace(req *CreateNamespaceRequest, opts ...scw.RequestOp } type UpdateNamespaceRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // NamespaceID: namespace ID to update NamespaceID string `json:"-"` @@ -636,6 +648,9 @@ func (s *API) UpdateNamespace(req *UpdateNamespaceRequest, opts ...scw.RequestOp } type DeleteNamespaceRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // NamespaceID: the unique ID of the Namespace NamespaceID string `json:"-"` @@ -676,6 +691,9 @@ func (s *API) DeleteNamespace(req *DeleteNamespaceRequest, opts ...scw.RequestOp } type ListImagesRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // Page: a positive integer to choose the page to display Page *int32 `json:"-"` @@ -739,6 +757,9 @@ func (s *API) ListImages(req *ListImagesRequest, opts ...scw.RequestOption) (*Li } type GetImageRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // ImageID: the unique ID of the Image ImageID string `json:"-"` @@ -779,6 +800,9 @@ func (s *API) GetImage(req *GetImageRequest, opts ...scw.RequestOption) (*Image, } type UpdateImageRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // ImageID: image ID to update ImageID string `json:"-"` @@ -828,6 +852,9 @@ func (s *API) UpdateImage(req *UpdateImageRequest, opts ...scw.RequestOption) (* } type DeleteImageRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // ImageID: the unique ID of the Image ImageID string `json:"-"` @@ -868,6 +895,9 @@ func (s *API) DeleteImage(req *DeleteImageRequest, opts ...scw.RequestOption) (* } type ListTagsRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // ImageID: the unique ID of the image ImageID string `json:"-"` @@ -928,6 +958,9 @@ func (s *API) ListTags(req *ListTagsRequest, opts ...scw.RequestOption) (*ListTa } type GetTagRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // TagID: the unique ID of the Tag TagID string `json:"-"` @@ -968,6 +1001,9 @@ func (s *API) GetTag(req *GetTagRequest, opts ...scw.RequestOption) (*Tag, error } type DeleteTagRequest struct { + // Region: + // + // Region to target. If none is passed will use default region from the config Region scw.Region `json:"-"` // TagID: the unique ID of the tag TagID string `json:"-"` diff --git a/api/vpc/v1/vpc_sdk.go b/api/vpc/v1/vpc_sdk.go index c516fc736..05910e213 100644 --- a/api/vpc/v1/vpc_sdk.go +++ b/api/vpc/v1/vpc_sdk.go @@ -116,6 +116,9 @@ type PrivateNetwork struct { // Service API 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 // @@ -179,6 +182,9 @@ func (s *API) ListPrivateNetworks(req *ListPrivateNetworksRequest, opts ...scw.R } 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"` @@ -231,6 +237,9 @@ func (s *API) CreatePrivateNetwork(req *CreatePrivateNetworkRequest, opts ...scw } 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:"-"` @@ -269,6 +278,9 @@ func (s *API) GetPrivateNetwork(req *GetPrivateNetworkRequest, opts ...scw.Reque } 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:"-"` @@ -316,6 +328,9 @@ func (s *API) UpdatePrivateNetwork(req *UpdatePrivateNetworkRequest, opts ...scw } 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:"-"` diff --git a/api/vpcgw/v1/vpcgw_sdk.go b/api/vpcgw/v1/vpcgw_sdk.go index 7a1d4c099..0661c1688 100644 --- a/api/vpcgw/v1/vpcgw_sdk.go +++ b/api/vpcgw/v1/vpcgw_sdk.go @@ -755,6 +755,9 @@ type SetPATRulesResponse struct { // Service API type ListGatewaysRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // OrderBy: order in which to return results // @@ -829,6 +832,9 @@ func (s *API) ListGateways(req *ListGatewaysRequest, opts ...scw.RequestOption) } type GetGatewayRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // GatewayID: ID of the gateway to fetch GatewayID string `json:"-"` @@ -867,6 +873,9 @@ func (s *API) GetGateway(req *GetGatewayRequest, opts ...scw.RequestOption) (*Ga } type CreateGatewayRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // ProjectID: project to create the gateway into ProjectID string `json:"project_id"` @@ -925,6 +934,9 @@ func (s *API) CreateGateway(req *CreateGatewayRequest, opts ...scw.RequestOption } type UpdateGatewayRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // GatewayID: ID of the gateway to update GatewayID string `json:"-"` @@ -978,6 +990,9 @@ func (s *API) UpdateGateway(req *UpdateGatewayRequest, opts ...scw.RequestOption } type DeleteGatewayRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // GatewayID: ID of the gateway to delete GatewayID string `json:"-"` @@ -1023,6 +1038,9 @@ func (s *API) DeleteGateway(req *DeleteGatewayRequest, opts ...scw.RequestOption } type UpgradeGatewayRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // GatewayID: ID of the gateway to upgrade GatewayID string `json:"-"` @@ -1066,6 +1084,9 @@ func (s *API) UpgradeGateway(req *UpgradeGatewayRequest, opts ...scw.RequestOpti } type ListGatewayNetworksRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // OrderBy: order in which to return results // @@ -1134,6 +1155,9 @@ func (s *API) ListGatewayNetworks(req *ListGatewayNetworksRequest, opts ...scw.R } type GetGatewayNetworkRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // GatewayNetworkID: ID of the GatewayNetwork to fetch GatewayNetworkID string `json:"-"` @@ -1172,6 +1196,9 @@ func (s *API) GetGatewayNetwork(req *GetGatewayNetworkRequest, opts ...scw.Reque } type CreateGatewayNetworkRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // GatewayID: gateway to connect GatewayID string `json:"gateway_id"` @@ -1226,6 +1253,9 @@ func (s *API) CreateGatewayNetwork(req *CreateGatewayNetworkRequest, opts ...scw } type UpdateGatewayNetworkRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // GatewayNetworkID: ID of the GatewayNetwork to update GatewayNetworkID string `json:"-"` @@ -1279,6 +1309,9 @@ func (s *API) UpdateGatewayNetwork(req *UpdateGatewayNetworkRequest, opts ...scw } type DeleteGatewayNetworkRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // GatewayNetworkID: gatewayNetwork to delete GatewayNetworkID string `json:"-"` @@ -1324,6 +1357,9 @@ func (s *API) DeleteGatewayNetwork(req *DeleteGatewayNetworkRequest, opts ...scw } type ListDHCPsRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // OrderBy: order in which to return results // @@ -1387,6 +1423,9 @@ func (s *API) ListDHCPs(req *ListDHCPsRequest, opts ...scw.RequestOption) (*List } type GetDHCPRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // DHCPID: ID of the DHCP config to fetch DHCPID string `json:"-"` @@ -1425,6 +1464,9 @@ func (s *API) GetDHCP(req *GetDHCPRequest, opts ...scw.RequestOption) (*DHCP, er } type CreateDHCPRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // ProjectID: project to create the DHCP configuration in ProjectID string `json:"project_id"` @@ -1516,6 +1558,9 @@ func (s *API) CreateDHCP(req *CreateDHCPRequest, opts ...scw.RequestOption) (*DH } type UpdateDHCPRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // DHCPID: DHCP config to update DHCPID string `json:"-"` @@ -1598,6 +1643,9 @@ func (s *API) UpdateDHCP(req *UpdateDHCPRequest, opts ...scw.RequestOption) (*DH } type DeleteDHCPRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // DHCPID: DHCP config id to delete DHCPID string `json:"-"` @@ -1634,6 +1682,9 @@ func (s *API) DeleteDHCP(req *DeleteDHCPRequest, opts ...scw.RequestOption) erro } type ListDHCPEntriesRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // OrderBy: order in which to return results // @@ -1702,6 +1753,9 @@ func (s *API) ListDHCPEntries(req *ListDHCPEntriesRequest, opts ...scw.RequestOp } type GetDHCPEntryRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // DHCPEntryID: ID of the DHCP entry to fetch DHCPEntryID string `json:"-"` @@ -1740,6 +1794,9 @@ func (s *API) GetDHCPEntry(req *GetDHCPEntryRequest, opts ...scw.RequestOption) } type CreateDHCPEntryRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // GatewayNetworkID: gatewayNetwork on which to create a DHCP reservation GatewayNetworkID string `json:"gateway_network_id"` @@ -1783,6 +1840,9 @@ func (s *API) CreateDHCPEntry(req *CreateDHCPEntryRequest, opts ...scw.RequestOp } type UpdateDHCPEntryRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // DHCPEntryID: DHCP entry ID to update DHCPEntryID string `json:"-"` @@ -1828,6 +1888,9 @@ func (s *API) UpdateDHCPEntry(req *UpdateDHCPEntryRequest, opts ...scw.RequestOp } type SetDHCPEntriesRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // GatewayNetworkID: gateway Network on which to set DHCP reservation list GatewayNetworkID string `json:"gateway_network_id"` @@ -1872,6 +1935,9 @@ func (s *API) SetDHCPEntries(req *SetDHCPEntriesRequest, opts ...scw.RequestOpti } type DeleteDHCPEntryRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // DHCPEntryID: DHCP entry ID to delete DHCPEntryID string `json:"-"` @@ -1908,6 +1974,9 @@ func (s *API) DeleteDHCPEntry(req *DeleteDHCPEntryRequest, opts ...scw.RequestOp } type ListPATRulesRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // OrderBy: order in which to return results // @@ -1970,6 +2039,9 @@ func (s *API) ListPATRules(req *ListPATRulesRequest, opts ...scw.RequestOption) } type GetPATRuleRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // PatRuleID: pAT rule to get PatRuleID string `json:"-"` @@ -2008,6 +2080,9 @@ func (s *API) GetPATRule(req *GetPATRuleRequest, opts ...scw.RequestOption) (*PA } type CreatePATRuleRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // GatewayID: gateway on which to attach the rule to GatewayID string `json:"gateway_id"` @@ -2057,6 +2132,9 @@ func (s *API) CreatePATRule(req *CreatePATRuleRequest, opts ...scw.RequestOption } type UpdatePATRuleRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // PatRuleID: pAT rule to update PatRuleID string `json:"-"` @@ -2110,6 +2188,9 @@ func (s *API) UpdatePATRule(req *UpdatePATRuleRequest, opts ...scw.RequestOption } type SetPATRulesRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // GatewayID: gateway on which to set the PAT rules GatewayID string `json:"gateway_id"` @@ -2154,6 +2235,9 @@ func (s *API) SetPATRules(req *SetPATRulesRequest, opts ...scw.RequestOption) (* } type DeletePATRuleRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // PatRuleID: pAT rule to delete PatRuleID string `json:"-"` @@ -2190,6 +2274,9 @@ func (s *API) DeletePATRule(req *DeletePATRuleRequest, opts ...scw.RequestOption } type ListGatewayTypesRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` } @@ -2222,6 +2309,9 @@ func (s *API) ListGatewayTypes(req *ListGatewayTypesRequest, opts ...scw.Request } type ListIPsRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // OrderBy: order in which to return results // @@ -2288,6 +2378,9 @@ func (s *API) ListIPs(req *ListIPsRequest, opts ...scw.RequestOption) (*ListIPsR } type GetIPRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // IPID: ID of the IP to get IPID string `json:"-"` @@ -2326,6 +2419,9 @@ func (s *API) GetIP(req *GetIPRequest, opts ...scw.RequestOption) (*IP, error) { } type CreateIPRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // ProjectID: project to create the IP into ProjectID string `json:"project_id"` @@ -2372,6 +2468,9 @@ func (s *API) CreateIP(req *CreateIPRequest, opts ...scw.RequestOption) (*IP, er } type UpdateIPRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // IPID: ID of the IP to update IPID string `json:"-"` @@ -2421,6 +2520,9 @@ func (s *API) UpdateIP(req *UpdateIPRequest, opts ...scw.RequestOption) (*IP, er } type DeleteIPRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // IPID: ID of the IP to delete IPID string `json:"-"` @@ -2457,6 +2559,9 @@ func (s *API) DeleteIP(req *DeleteIPRequest, opts ...scw.RequestOption) error { } type RefreshSSHKeysRequest struct { + // Zone: + // + // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` GatewayID string `json:"-"`