Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions account_events.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,14 +207,6 @@ const (
ActionVPCSubnetCreate EventAction = "subnet_create"
ActionVPCSubnetDelete EventAction = "subnet_delete"
ActionVPCSubnetUpdate EventAction = "subnet_update"

// Deprecated: incorrect spelling,
// to be removed in the next major version release.
ActionVolumeDelte EventAction = "volume_delete"

// Deprecated: incorrect spelling,
// to be removed in the next major version
ActionCreateCardUpdated = ActionCreditCardUpdated
)

// EntityType constants start with Entity and include Linode API Event Entity Types
Expand Down
4 changes: 0 additions & 4 deletions account_settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ type AccountSettingsUpdateOptions struct {
// The default backups enrollment status for all new Linodes for all users on the account. When enabled, backups are mandatory per instance.
BackupsEnabled *bool `json:"backups_enabled,omitempty"`

// A plan name like "longview-3"..."longview-100", or a nil value for to cancel any existing subscription plan.
// Deprecated: Use PUT /longview/plan instead to update the LongviewSubscription
LongviewSubscription *string `json:"longview_subscription,omitempty"`

// The default network helper setting for all new Linodes and Linode Configs for all users on the account.
NetworkHelper *bool `json:"network_helper,omitempty"`
}
Expand Down
10 changes: 0 additions & 10 deletions databases.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,6 @@ type Database struct {
// Members has dynamic keys so it is a map
Members map[string]DatabaseMemberType `json:"members"`

// Deprecated: ReplicationType is a deprecated property, as it is no longer supported in DBaaS V2.
ReplicationType string `json:"replication_type"`
// Deprecated: SSLConnection is a deprecated property, as it is no longer supported in DBaaS V2.
SSLConnection bool `json:"ssl_connection"`
// Deprecated: Encrypted is a deprecated property, as it is no longer supported in DBaaS V2.
Encrypted bool `json:"encrypted"`

AllowList []string `json:"allow_list"`
InstanceURI string `json:"instance_uri"`
Created *time.Time `json:"-"`
Expand Down Expand Up @@ -118,9 +111,6 @@ type DatabaseMaintenanceWindow struct {
HourOfDay int `json:"hour_of_day"`

Pending []DatabaseMaintenanceWindowPending `json:"pending,omitempty"`

// Deprecated: WeekOfMonth is a deprecated property, as it is no longer supported in DBaaS V2.
WeekOfMonth *int `json:"week_of_month,omitempty"`
}

type DatabaseMaintenanceWindowPending struct {
Expand Down
10 changes: 0 additions & 10 deletions domains.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ type Domain struct {
// If this Domain represents the authoritative source of information for the domain it describes, or if it is a read-only copy of a master (also called a slave).
Type DomainType `json:"type"` // Enum:"master" "slave"

// Deprecated: The group this Domain belongs to. This is for display purposes only.
Group string `json:"group"`

// Used to control whether this Domain is currently being rendered.
Status DomainStatus `json:"status"` // Enum:"disabled" "active" "edit_mode" "has_errors"

Expand Down Expand Up @@ -64,9 +61,6 @@ type DomainCreateOptions struct {
// Enum:"master" "slave"
Type DomainType `json:"type"`

// Deprecated: The group this Domain belongs to. This is for display purposes only.
Group *string `json:"group,omitempty"`

// Used to control whether this Domain is currently being rendered.
// Enum:"disabled" "active" "edit_mode" "has_errors"
Status *DomainStatus `json:"status,omitempty"`
Expand Down Expand Up @@ -109,9 +103,6 @@ type DomainUpdateOptions struct {
// Enum:"master" "slave"
Type *DomainType `json:"type,omitempty"`

// Deprecated: The group this Domain belongs to. This is for display purposes only.
Group *string `json:"group,omitempty"`

// Used to control whether this Domain is currently being rendered.
// Enum:"disabled" "active" "edit_mode" "has_errors"
Status *DomainStatus `json:"status,omitempty"`
Expand Down Expand Up @@ -178,7 +169,6 @@ type DomainImportOptions struct {
func (d Domain) GetUpdateOptions() (du DomainUpdateOptions) {
du.Domain = &d.Domain
du.Type = &d.Type
du.Group = &d.Group
du.Status = &d.Status
du.Description = &d.Description
du.SOAEmail = &d.SOAEmail
Expand Down
2 changes: 1 addition & 1 deletion instance_ips.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func (c *Client) AddInstanceIPAddress(ctx context.Context, linodeID int, public
}

// UpdateInstanceIPAddress updates the IPAddress with the specified instance id and IP address
func (c *Client) UpdateInstanceIPAddress(ctx context.Context, linodeID int, ipAddress string, opts IPAddressUpdateOptions) (*InstanceIP, error) {
func (c *Client) UpdateInstanceIPAddress(ctx context.Context, linodeID int, ipAddress string, opts IPAddressUpdateOptionsV2) (*InstanceIP, error) {
e := formatAPIPath("linode/instances/%d/ips/%s", linodeID, ipAddress)
return doPUTRequest[InstanceIP](ctx, c, e, opts)
}
Expand Down
23 changes: 3 additions & 20 deletions instances.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,9 @@ type InstanceCreateOptions struct {
PlacementGroup *InstanceCreatePlacementGroupOptions `json:"placement_group,omitempty"`

// Creation fields that need to be set explicitly false, "", or 0 use pointers
SwapSize *int `json:"swap_size,omitempty"`
Booted *bool `json:"booted,omitempty"`

// Deprecated: group is a deprecated property denoting a group label for the Linode.
Group *string `json:"group,omitempty"`

IPv4 []string `json:"ipv4,omitempty"`
SwapSize *int `json:"swap_size,omitempty"`
Booted *bool `json:"booted,omitempty"`
IPv4 []string `json:"ipv4,omitempty"`
}

// InstanceCreatePlacementGroupOptions represents the placement group
Expand All @@ -201,9 +197,6 @@ type InstanceUpdateOptions struct {
Alerts *InstanceAlert `json:"alerts,omitempty"`
WatchdogEnabled *bool `json:"watchdog_enabled,omitempty"`
Tags []string `json:"tags,omitempty"`

// Deprecated: group is a deprecated property denoting a group label for the Linode.
Group *string `json:"group,omitempty"`
}

// UnmarshalJSON implements the json.Unmarshaler interface
Expand Down Expand Up @@ -252,7 +245,6 @@ func (backup *InstanceBackup) UnmarshalJSON(b []byte) error {
func (i *Instance) GetUpdateOptions() InstanceUpdateOptions {
return InstanceUpdateOptions{
Label: &i.Label,
Group: &i.Group,
Backups: i.Backups,
Alerts: i.Alerts,
WatchdogEnabled: &i.WatchdogEnabled,
Expand All @@ -274,9 +266,6 @@ type InstanceCloneOptions struct {
PrivateIP *bool `json:"private_ip,omitempty"`
Metadata *InstanceMetadataOptions `json:"metadata,omitempty"`
PlacementGroup *InstanceCreatePlacementGroupOptions `json:"placement_group,omitempty"`

// Deprecated: group is a deprecated property denoting a group label for the Linode.
Group *string `json:"group,omitempty"`
}

// InstanceResizeOptions is an options struct used when resizing an instance
Expand Down Expand Up @@ -428,12 +417,6 @@ func (c *Client) ShutdownInstance(ctx context.Context, id int) error {
return c.simpleInstanceAction(ctx, "shutdown", id)
}

// Deprecated: Please use UpgradeInstance instead.
// MutateInstance Upgrades a Linode to its next generation.
func (c *Client) MutateInstance(ctx context.Context, id int) error {
return c.simpleInstanceAction(ctx, "mutate", id)
}

// InstanceUpgradeOptions is a struct representing the options for upgrading a Linode
type InstanceUpgradeOptions struct {
// Automatically resize disks when resizing a Linode.
Expand Down
53 changes: 0 additions & 53 deletions lke_cluster_pools.go

This file was deleted.

81 changes: 0 additions & 81 deletions mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,6 @@ type MySQLDatabase struct {
// Members has dynamic keys so it is a map
Members map[string]DatabaseMemberType `json:"members"`

// Deprecated: ReplicationType is a deprecated property, as it is no longer supported in DBaaS V2.
ReplicationType string `json:"replication_type"`
// Deprecated: SSLConnection is a deprecated property, as it is no longer supported in DBaaS V2.
SSLConnection bool `json:"ssl_connection"`
// Deprecated: Encrypted is a deprecated property, as it is no longer supported in DBaaS V2.
Encrypted bool `json:"encrypted"`

AllowList []string `json:"allow_list"`
InstanceURI string `json:"instance_uri"`
Created *time.Time `json:"-"`
Expand Down Expand Up @@ -83,13 +76,6 @@ type MySQLCreateOptions struct {
AllowList []string `json:"allow_list,omitempty"`
ClusterSize *int `json:"cluster_size,omitempty"`

// Deprecated: ReplicationType is a deprecated property, as it is no longer supported in DBaaS V2.
ReplicationType *string `json:"replication_type,omitempty"`
// Deprecated: Encrypted is a deprecated property, as it is no longer supported in DBaaS V2.
Encrypted *bool `json:"encrypted,omitempty"`
// Deprecated: SSLConnection is a deprecated property, as it is no longer supported in DBaaS V2.
SSLConnection *bool `json:"ssl_connection,omitempty"`

Fork *DatabaseFork `json:"fork,omitempty"`
}

Expand All @@ -103,42 +89,6 @@ type MySQLUpdateOptions struct {
Version *string `json:"version,omitempty"`
}

// MySQLDatabaseBackup is information for interacting with a backup for the existing MySQL Database
// Deprecated: MySQLDatabaseBackup is a deprecated struct, as the backup endpoints are no longer supported in DBaaS V2.
// In DBaaS V2, databases can be backed up via database forking.
type MySQLDatabaseBackup struct {
ID int `json:"id"`
Label string `json:"label"`
Type string `json:"type"`
Created *time.Time `json:"-"`
}

// MySQLBackupCreateOptions are options used for CreateMySQLDatabaseBackup(...)
// Deprecated: MySQLBackupCreateOptions is a deprecated struct, as the backup endpoints are no longer supported in DBaaS V2.
// In DBaaS V2, databases can be backed up via database forking.
type MySQLBackupCreateOptions struct {
Label string `json:"label"`
Target MySQLDatabaseTarget `json:"target"`
}

func (d *MySQLDatabaseBackup) UnmarshalJSON(b []byte) error {
type Mask MySQLDatabaseBackup

p := struct {
*Mask
Created *parseabletime.ParseableTime `json:"created"`
}{
Mask: (*Mask)(d),
}

if err := json.Unmarshal(b, &p); err != nil {
return err
}

d.Created = (*time.Time)(p.Created)
return nil
}

// MySQLDatabaseCredential is the Root Credentials to access the Linode Managed Database
type MySQLDatabaseCredential struct {
Username string `json:"username"`
Expand All @@ -155,13 +105,6 @@ func (c *Client) ListMySQLDatabases(ctx context.Context, opts *ListOptions) ([]M
return getPaginatedResults[MySQLDatabase](ctx, c, "databases/mysql/instances", opts)
}

// ListMySQLDatabaseBackups lists all MySQL Database Backups associated with the given MySQL Database
// Deprecated: ListMySQLDatabaseBackups is a deprecated method, as the backup endpoints are no longer supported in DBaaS V2.
// In DBaaS V2, databases can be backed up via database forking.
func (c *Client) ListMySQLDatabaseBackups(ctx context.Context, databaseID int, opts *ListOptions) ([]MySQLDatabaseBackup, error) {
return getPaginatedResults[MySQLDatabaseBackup](ctx, c, formatAPIPath("databases/mysql/instances/%d/backups", databaseID), opts)
}

// GetMySQLDatabase returns a single MySQL Database matching the id
func (c *Client) GetMySQLDatabase(ctx context.Context, databaseID int) (*MySQLDatabase, error) {
e := formatAPIPath("databases/mysql/instances/%d", databaseID)
Expand Down Expand Up @@ -203,30 +146,6 @@ func (c *Client) ResetMySQLDatabaseCredentials(ctx context.Context, databaseID i
return doPOSTRequestNoRequestResponseBody(ctx, c, e)
}

// GetMySQLDatabaseBackup returns a specific MySQL Database Backup with the given ids
// Deprecated: GetMySQLDatabaseBackup is a deprecated method, as the backup endpoints are no longer supported in DBaaS V2.
// In DBaaS V2, databases can be backed up via database forking.
func (c *Client) GetMySQLDatabaseBackup(ctx context.Context, databaseID int, backupID int) (*MySQLDatabaseBackup, error) {
e := formatAPIPath("databases/mysql/instances/%d/backups/%d", databaseID, backupID)
return doGETRequest[MySQLDatabaseBackup](ctx, c, e)
}

// RestoreMySQLDatabaseBackup returns the given MySQL Database with the given Backup
// Deprecated: RestoreMySQLDatabaseBackup is a deprecated method, as the backup endpoints are no longer supported in DBaaS V2.
// In DBaaS V2, databases can be backed up via database forking.
func (c *Client) RestoreMySQLDatabaseBackup(ctx context.Context, databaseID int, backupID int) error {
e := formatAPIPath("databases/mysql/instances/%d/backups/%d/restore", databaseID, backupID)
return doPOSTRequestNoRequestResponseBody(ctx, c, e)
}

// CreateMySQLDatabaseBackup creates a snapshot for the given MySQL database
// Deprecated: CreateMySQLDatabaseBackup is a deprecated method, as the backup endpoints are no longer supported in DBaaS V2.
// In DBaaS V2, databases can be backed up via database forking.
func (c *Client) CreateMySQLDatabaseBackup(ctx context.Context, databaseID int, opts MySQLBackupCreateOptions) error {
e := formatAPIPath("databases/mysql/instances/%d/backups", databaseID)
return doPOSTRequestNoResponseBody(ctx, c, e, opts)
}

// PatchMySQLDatabase applies security patches and updates to the underlying operating system of the Managed MySQL Database
func (c *Client) PatchMySQLDatabase(ctx context.Context, databaseID int) error {
e := formatAPIPath("databases/mysql/instances/%d/patch", databaseID)
Expand Down
20 changes: 0 additions & 20 deletions network_ips.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@ type IPAddressUpdateOptionsV2 struct {
RDNS **string `json:"rdns,omitempty"`
}

// IPAddressUpdateOptions fields are those accepted by UpdateIPAddress.
// Deprecated: Please use IPAddressUpdateOptionsV2 for all new implementations.
type IPAddressUpdateOptions struct {
RDNS *string `json:"rdns"`
}

// LinodeIPAssignment stores an assignment between an IP address and a Linode instance.
type LinodeIPAssignment struct {
Address string `json:"address"`
Expand Down Expand Up @@ -65,13 +59,6 @@ func (i InstanceIP) GetUpdateOptionsV2() IPAddressUpdateOptionsV2 {
}
}

// GetUpdateOptions converts a IPAddress to IPAddressUpdateOptions for use in UpdateIPAddress.
// Deprecated: Please use GetUpdateOptionsV2 for all new implementations.
func (i InstanceIP) GetUpdateOptions() (o IPAddressUpdateOptions) {
o.RDNS = copyString(&i.RDNS)
return
}

// ListIPAddresses lists IPAddresses.
func (c *Client) ListIPAddresses(ctx context.Context, opts *ListOptions) ([]InstanceIP, error) {
return getPaginatedResults[InstanceIP](ctx, c, "networking/ips", opts)
Expand All @@ -89,13 +76,6 @@ func (c *Client) UpdateIPAddressV2(ctx context.Context, address string, opts IPA
return doPUTRequest[InstanceIP](ctx, c, e, opts)
}

// UpdateIPAddress updates the IP address with the specified id.
// Deprecated: Please use UpdateIPAddressV2 for all new implementation.
func (c *Client) UpdateIPAddress(ctx context.Context, id string, opts IPAddressUpdateOptions) (*InstanceIP, error) {
e := formatAPIPath("networking/ips/%s", id)
return doPUTRequest[InstanceIP](ctx, c, e, opts)
}

// InstancesAssignIPs assigns multiple IPv4 addresses and/or IPv6 ranges to multiple Linodes in one Region.
// This allows swapping, shuffling, or otherwise reorganizing IPs to your Linodes.
func (c *Client) InstancesAssignIPs(ctx context.Context, opts LinodesAssignIPsOptions) error {
Expand Down
19 changes: 0 additions & 19 deletions object_storage_bucket_certs.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ import (
"context"
)

// Deprecated: Please use ObjectStorageBucketCertV2 for all new implementations.
type ObjectStorageBucketCert struct {
SSL bool `json:"ssl"`
}

type ObjectStorageBucketCertV2 struct {
SSL *bool `json:"ssl"`
}
Expand All @@ -18,20 +13,6 @@ type ObjectStorageBucketCertUploadOptions struct {
PrivateKey string `json:"private_key"`
}

// UploadObjectStorageBucketCert uploads a TLS/SSL Cert to be used with an Object Storage Bucket.
// Deprecated: Please use UploadObjectStorageBucketCertV2 for all new implementations.
func (c *Client) UploadObjectStorageBucketCert(ctx context.Context, clusterOrRegionID, bucket string, opts ObjectStorageBucketCertUploadOptions) (*ObjectStorageBucketCert, error) {
e := formatAPIPath("object-storage/buckets/%s/%s/ssl", clusterOrRegionID, bucket)
return doPOSTRequest[ObjectStorageBucketCert](ctx, c, e, opts)
}

// GetObjectStorageBucketCert gets an ObjectStorageBucketCert
// Deprecated: Please use GetObjectStorageBucketCertV2 for all new implementations.
func (c *Client) GetObjectStorageBucketCert(ctx context.Context, clusterOrRegionID, bucket string) (*ObjectStorageBucketCert, error) {
e := formatAPIPath("object-storage/buckets/%s/%s/ssl", clusterOrRegionID, bucket)
return doGETRequest[ObjectStorageBucketCert](ctx, c, e)
}

// UploadObjectStorageBucketCert uploads a TLS/SSL Cert to be used with an Object Storage Bucket.
func (c *Client) UploadObjectStorageBucketCertV2(ctx context.Context, clusterOrRegionID, bucket string, opts ObjectStorageBucketCertUploadOptions) (*ObjectStorageBucketCertV2, error) {
e := formatAPIPath("object-storage/buckets/%s/%s/ssl", clusterOrRegionID, bucket)
Expand Down
Loading