mirror of https://github.com/kubernetes/kops.git
Merge pull request #15658 from hakman/update_scaleway-sdk-go
Update scaleway-sdk-go to v1.0.0-beta.19
This commit is contained in:
commit
4fd8a66d70
2
go.mod
2
go.mod
|
|
@ -33,7 +33,7 @@ require (
|
|||
github.com/pelletier/go-toml v1.9.5
|
||||
github.com/pkg/sftp v1.13.5
|
||||
github.com/prometheus/client_golang v1.16.0
|
||||
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17
|
||||
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.19
|
||||
github.com/sergi/go-diff v1.3.1
|
||||
github.com/spf13/cobra v1.7.0
|
||||
github.com/spf13/pflag v1.0.5
|
||||
|
|
|
|||
4
go.sum
4
go.sum
|
|
@ -611,8 +611,8 @@ github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQD
|
|||
github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
|
||||
github.com/sahilm/fuzzy v0.1.0 h1:FzWGaw2Opqyu+794ZQ9SYifWv2EIXpwP4q8dY1kDAwI=
|
||||
github.com/sahilm/fuzzy v0.1.0/go.mod h1:VFvziUEIMCrT6A6tw2RFIXPXXmzXbOsSHF0DOI8ZK9Y=
|
||||
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17 h1:1WuWJu7/e8SqK+uQl7lfk/N/oMZTL2NE/TJsNKRNMc4=
|
||||
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
|
||||
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.19 h1:+1H+N9QFl2Sfvia0FBYfMrHYHYhmpZxhSE0wpPL2lYs=
|
||||
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.19/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
|
||||
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I=
|
||||
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
|
||||
github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8=
|
||||
|
|
|
|||
|
|
@ -173,8 +173,8 @@ func (_ *Instance) RenderScw(t *scaleway.ScwAPITarget, actual, expected, changes
|
|||
}
|
||||
createServerRequest.Volumes = map[string]*instance.VolumeServerTemplate{
|
||||
"0": {
|
||||
Boot: true,
|
||||
Size: scw.GB * 50,
|
||||
Boot: fi.PtrTo(true),
|
||||
Size: fi.PtrTo(scw.GB * 50),
|
||||
VolumeType: instance.VolumeVolumeTypeBSSD,
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,10 +68,14 @@ func NewRegistrarAPI(client *scw.Client) *RegistrarAPI {
|
|||
type ContactEmailStatus string
|
||||
|
||||
const (
|
||||
// If unspecified, the status is unknown by default.
|
||||
ContactEmailStatusEmailStatusUnknown = ContactEmailStatus("email_status_unknown")
|
||||
ContactEmailStatusValidated = ContactEmailStatus("validated")
|
||||
ContactEmailStatusNotValidated = ContactEmailStatus("not_validated")
|
||||
ContactEmailStatusInvalidEmail = ContactEmailStatus("invalid_email")
|
||||
// The contact email has been validated.
|
||||
ContactEmailStatusValidated = ContactEmailStatus("validated")
|
||||
// The contact email has not been validated.
|
||||
ContactEmailStatusNotValidated = ContactEmailStatus("not_validated")
|
||||
// The contact email is invalid.
|
||||
ContactEmailStatusInvalidEmail = ContactEmailStatus("invalid_email")
|
||||
)
|
||||
|
||||
func (enum ContactEmailStatus) String() string {
|
||||
|
|
@ -100,14 +104,22 @@ func (enum *ContactEmailStatus) UnmarshalJSON(data []byte) error {
|
|||
type ContactExtensionFRMode string
|
||||
|
||||
const (
|
||||
ContactExtensionFRModeModeUnknown = ContactExtensionFRMode("mode_unknown")
|
||||
ContactExtensionFRModeIndividual = ContactExtensionFRMode("individual")
|
||||
// If unspecified, the status is unknown by default.
|
||||
ContactExtensionFRModeModeUnknown = ContactExtensionFRMode("mode_unknown")
|
||||
// The contact is a physical person (only for .fr domains).
|
||||
ContactExtensionFRModeIndividual = ContactExtensionFRMode("individual")
|
||||
// The contact is a company with a SIRET/SIREN code (only for .fr domains).
|
||||
ContactExtensionFRModeCompanyIdentificationCode = ContactExtensionFRMode("company_identification_code")
|
||||
ContactExtensionFRModeDuns = ContactExtensionFRMode("duns")
|
||||
ContactExtensionFRModeLocal = ContactExtensionFRMode("local")
|
||||
ContactExtensionFRModeAssociation = ContactExtensionFRMode("association")
|
||||
ContactExtensionFRModeTrademark = ContactExtensionFRMode("trademark")
|
||||
ContactExtensionFRModeCodeAuthAfnic = ContactExtensionFRMode("code_auth_afnic")
|
||||
// The contact has a Data Universal Numbering System code (only for .fr domains).
|
||||
ContactExtensionFRModeDuns = ContactExtensionFRMode("duns")
|
||||
// The contact has a local or a country ID (only for .fr domains).
|
||||
ContactExtensionFRModeLocal = ContactExtensionFRMode("local")
|
||||
// The contact is an association (only for .fr domains).
|
||||
ContactExtensionFRModeAssociation = ContactExtensionFRMode("association")
|
||||
// The contact is a brand (only for .fr domains).
|
||||
ContactExtensionFRModeTrademark = ContactExtensionFRMode("trademark")
|
||||
// The contact has an intervention code (DSIA) from AFNIC (only for .fr domains).
|
||||
ContactExtensionFRModeCodeAuthAfnic = ContactExtensionFRMode("code_auth_afnic")
|
||||
)
|
||||
|
||||
func (enum ContactExtensionFRMode) String() string {
|
||||
|
|
@ -136,26 +148,46 @@ func (enum *ContactExtensionFRMode) UnmarshalJSON(data []byte) error {
|
|||
type ContactExtensionNLLegalForm string
|
||||
|
||||
const (
|
||||
ContactExtensionNLLegalFormLegalFormUnknown = ContactExtensionNLLegalForm("legal_form_unknown")
|
||||
ContactExtensionNLLegalFormOther = ContactExtensionNLLegalForm("other")
|
||||
ContactExtensionNLLegalFormNonDutchEuCompany = ContactExtensionNLLegalForm("non_dutch_eu_company")
|
||||
// If unspecified, the status is unknown by default.
|
||||
ContactExtensionNLLegalFormLegalFormUnknown = ContactExtensionNLLegalForm("legal_form_unknown")
|
||||
// The contact's legal form is not listed below (only for .nl domains).
|
||||
ContactExtensionNLLegalFormOther = ContactExtensionNLLegalForm("other")
|
||||
// The contact is a non-Dutch EC company (only for .nl domains).
|
||||
ContactExtensionNLLegalFormNonDutchEuCompany = ContactExtensionNLLegalForm("non_dutch_eu_company")
|
||||
// The contact is a non-Dutch legal form/enterprise/subsidiary (only for .nl domains).
|
||||
ContactExtensionNLLegalFormNonDutchLegalFormEnterpriseSubsidiary = ContactExtensionNLLegalForm("non_dutch_legal_form_enterprise_subsidiary")
|
||||
ContactExtensionNLLegalFormLimitedCompany = ContactExtensionNLLegalForm("limited_company")
|
||||
ContactExtensionNLLegalFormLimitedCompanyInFormation = ContactExtensionNLLegalForm("limited_company_in_formation")
|
||||
ContactExtensionNLLegalFormCooperative = ContactExtensionNLLegalForm("cooperative")
|
||||
ContactExtensionNLLegalFormLimitedPartnership = ContactExtensionNLLegalForm("limited_partnership")
|
||||
ContactExtensionNLLegalFormSoleCompany = ContactExtensionNLLegalForm("sole_company")
|
||||
ContactExtensionNLLegalFormEuropeanEconomicInterestGroup = ContactExtensionNLLegalForm("european_economic_interest_group")
|
||||
ContactExtensionNLLegalFormReligiousEntity = ContactExtensionNLLegalForm("religious_entity")
|
||||
ContactExtensionNLLegalFormPartnership = ContactExtensionNLLegalForm("partnership")
|
||||
ContactExtensionNLLegalFormPublicCompany = ContactExtensionNLLegalForm("public_company")
|
||||
ContactExtensionNLLegalFormMutualBenefitCompany = ContactExtensionNLLegalForm("mutual_benefit_company")
|
||||
ContactExtensionNLLegalFormResidential = ContactExtensionNLLegalForm("residential")
|
||||
ContactExtensionNLLegalFormShippingCompany = ContactExtensionNLLegalForm("shipping_company")
|
||||
ContactExtensionNLLegalFormFoundation = ContactExtensionNLLegalForm("foundation")
|
||||
ContactExtensionNLLegalFormAssociation = ContactExtensionNLLegalForm("association")
|
||||
ContactExtensionNLLegalFormTradingPartnership = ContactExtensionNLLegalForm("trading_partnership")
|
||||
ContactExtensionNLLegalFormNaturalPerson = ContactExtensionNLLegalForm("natural_person")
|
||||
// The contact is a limited company (only for .nl domains).
|
||||
ContactExtensionNLLegalFormLimitedCompany = ContactExtensionNLLegalForm("limited_company")
|
||||
// The contact is a limited company in formation (only for .nl domains).
|
||||
ContactExtensionNLLegalFormLimitedCompanyInFormation = ContactExtensionNLLegalForm("limited_company_in_formation")
|
||||
// The contact is a cooperative (only for .nl domains).
|
||||
ContactExtensionNLLegalFormCooperative = ContactExtensionNLLegalForm("cooperative")
|
||||
// The contact is a limited Partnership (only for .nl domains).
|
||||
ContactExtensionNLLegalFormLimitedPartnership = ContactExtensionNLLegalForm("limited_partnership")
|
||||
// The contact is a sole trader (only for .nl domains).
|
||||
ContactExtensionNLLegalFormSoleCompany = ContactExtensionNLLegalForm("sole_company")
|
||||
// The contact is a European Economic Interest Group (only for .nl domains).
|
||||
ContactExtensionNLLegalFormEuropeanEconomicInterestGroup = ContactExtensionNLLegalForm("european_economic_interest_group")
|
||||
// The contact is a religious society (only for .nl domains).
|
||||
ContactExtensionNLLegalFormReligiousEntity = ContactExtensionNLLegalForm("religious_entity")
|
||||
// The contact is a partnership (only for .nl domains).
|
||||
ContactExtensionNLLegalFormPartnership = ContactExtensionNLLegalForm("partnership")
|
||||
// The contact is a public Company (only for .nl domains).
|
||||
ContactExtensionNLLegalFormPublicCompany = ContactExtensionNLLegalForm("public_company")
|
||||
// The contact is a mutual benefit company (only for .nl domains).
|
||||
ContactExtensionNLLegalFormMutualBenefitCompany = ContactExtensionNLLegalForm("mutual_benefit_company")
|
||||
// The contact is a natural person (only for .nl domains).
|
||||
ContactExtensionNLLegalFormResidential = ContactExtensionNLLegalForm("residential")
|
||||
// The contact is a shipping company (only for .nl domains).
|
||||
ContactExtensionNLLegalFormShippingCompany = ContactExtensionNLLegalForm("shipping_company")
|
||||
// The contact is a foundation (only for .nl domains).
|
||||
ContactExtensionNLLegalFormFoundation = ContactExtensionNLLegalForm("foundation")
|
||||
// The contact is a association (only for .nl domains).
|
||||
ContactExtensionNLLegalFormAssociation = ContactExtensionNLLegalForm("association")
|
||||
// The contact is a trading partnership (only for .nl domains).
|
||||
ContactExtensionNLLegalFormTradingPartnership = ContactExtensionNLLegalForm("trading_partnership")
|
||||
// The contact is a physical person (only for .nl domains).
|
||||
ContactExtensionNLLegalFormNaturalPerson = ContactExtensionNLLegalForm("natural_person")
|
||||
)
|
||||
|
||||
func (enum ContactExtensionNLLegalForm) String() string {
|
||||
|
|
@ -184,11 +216,16 @@ func (enum *ContactExtensionNLLegalForm) UnmarshalJSON(data []byte) error {
|
|||
type ContactLegalForm string
|
||||
|
||||
const (
|
||||
// If unspecified, the status is unknown by default.
|
||||
ContactLegalFormLegalFormUnknown = ContactLegalForm("legal_form_unknown")
|
||||
ContactLegalFormIndividual = ContactLegalForm("individual")
|
||||
ContactLegalFormCorporate = ContactLegalForm("corporate")
|
||||
ContactLegalFormAssociation = ContactLegalForm("association")
|
||||
ContactLegalFormOther = ContactLegalForm("other")
|
||||
// The contact is a physical person.
|
||||
ContactLegalFormIndividual = ContactLegalForm("individual")
|
||||
// The contact is a corporate or a society.
|
||||
ContactLegalFormCorporate = ContactLegalForm("corporate")
|
||||
// The contact is an association.
|
||||
ContactLegalFormAssociation = ContactLegalForm("association")
|
||||
// The contact is not represented by a physical person, a corporate or an association.
|
||||
ContactLegalFormOther = ContactLegalForm("other")
|
||||
)
|
||||
|
||||
func (enum ContactLegalForm) String() string {
|
||||
|
|
@ -217,11 +254,16 @@ func (enum *ContactLegalForm) UnmarshalJSON(data []byte) error {
|
|||
type DNSZoneStatus string
|
||||
|
||||
const (
|
||||
// If unspecified, the DNS zone's status is unknown by default
|
||||
DNSZoneStatusUnknown = DNSZoneStatus("unknown")
|
||||
DNSZoneStatusActive = DNSZoneStatus("active")
|
||||
// The DNS zone is active and healthy.
|
||||
DNSZoneStatusActive = DNSZoneStatus("active")
|
||||
// The DNS zone is updating.
|
||||
DNSZoneStatusPending = DNSZoneStatus("pending")
|
||||
DNSZoneStatusError = DNSZoneStatus("error")
|
||||
DNSZoneStatusLocked = DNSZoneStatus("locked")
|
||||
// An error occurred after updating the DNS zone.
|
||||
DNSZoneStatusError = DNSZoneStatus("error")
|
||||
// The DNS zone is locked and cannot be updated anymore.
|
||||
DNSZoneStatusLocked = DNSZoneStatus("locked")
|
||||
)
|
||||
|
||||
func (enum DNSZoneStatus) String() string {
|
||||
|
|
@ -250,19 +292,32 @@ func (enum *DNSZoneStatus) UnmarshalJSON(data []byte) error {
|
|||
type DSRecordAlgorithm string
|
||||
|
||||
const (
|
||||
DSRecordAlgorithmRsamd5 = DSRecordAlgorithm("rsamd5")
|
||||
DSRecordAlgorithmDh = DSRecordAlgorithm("dh")
|
||||
DSRecordAlgorithmDsa = DSRecordAlgorithm("dsa")
|
||||
DSRecordAlgorithmRsasha1 = DSRecordAlgorithm("rsasha1")
|
||||
DSRecordAlgorithmDsaNsec3Sha1 = DSRecordAlgorithm("dsa_nsec3_sha1")
|
||||
// Code 1, algorithm: 'RSAMD5'.
|
||||
DSRecordAlgorithmRsamd5 = DSRecordAlgorithm("rsamd5")
|
||||
// Code 2, algorithm: 'DIFFIE_HELLMAN'.
|
||||
DSRecordAlgorithmDh = DSRecordAlgorithm("dh")
|
||||
// Code 3, algorithm: 'DSA_SHA1'.
|
||||
DSRecordAlgorithmDsa = DSRecordAlgorithm("dsa")
|
||||
// Code 5, algorithm: 'RSA_SHA1'.
|
||||
DSRecordAlgorithmRsasha1 = DSRecordAlgorithm("rsasha1")
|
||||
// Code 6, algorithm: 'DSA_NSEC3_SHA1'.
|
||||
DSRecordAlgorithmDsaNsec3Sha1 = DSRecordAlgorithm("dsa_nsec3_sha1")
|
||||
// Code 7, algorithm: 'RSASHA1_NSEC3_SHA1'.
|
||||
DSRecordAlgorithmRsasha1Nsec3Sha1 = DSRecordAlgorithm("rsasha1_nsec3_sha1")
|
||||
DSRecordAlgorithmRsasha256 = DSRecordAlgorithm("rsasha256")
|
||||
DSRecordAlgorithmRsasha512 = DSRecordAlgorithm("rsasha512")
|
||||
DSRecordAlgorithmEccGost = DSRecordAlgorithm("ecc_gost")
|
||||
DSRecordAlgorithmEcdsap256sha256 = DSRecordAlgorithm("ecdsap256sha256")
|
||||
DSRecordAlgorithmEcdsap384sha384 = DSRecordAlgorithm("ecdsap384sha384")
|
||||
DSRecordAlgorithmEd25519 = DSRecordAlgorithm("ed25519")
|
||||
DSRecordAlgorithmEd448 = DSRecordAlgorithm("ed448")
|
||||
// Code 8, algorithm: 'RSASHA256'.
|
||||
DSRecordAlgorithmRsasha256 = DSRecordAlgorithm("rsasha256")
|
||||
// Code 10, algorithm: 'RSASHA512'.
|
||||
DSRecordAlgorithmRsasha512 = DSRecordAlgorithm("rsasha512")
|
||||
// Code 12, algorithm: 'ECC_GOST'.
|
||||
DSRecordAlgorithmEccGost = DSRecordAlgorithm("ecc_gost")
|
||||
// Code 13, algorithm: 'ECDSAP256SHA256'.
|
||||
DSRecordAlgorithmEcdsap256sha256 = DSRecordAlgorithm("ecdsap256sha256")
|
||||
// Code 14, algorithm: 'ECDSAP384SHA384'.
|
||||
DSRecordAlgorithmEcdsap384sha384 = DSRecordAlgorithm("ecdsap384sha384")
|
||||
// Code 15, algorithm: 'ED25519'.
|
||||
DSRecordAlgorithmEd25519 = DSRecordAlgorithm("ed25519")
|
||||
// Code 16, algorithm: 'ED448'.
|
||||
DSRecordAlgorithmEd448 = DSRecordAlgorithm("ed448")
|
||||
)
|
||||
|
||||
func (enum DSRecordAlgorithm) String() string {
|
||||
|
|
@ -291,10 +346,14 @@ func (enum *DSRecordAlgorithm) UnmarshalJSON(data []byte) error {
|
|||
type DSRecordDigestType string
|
||||
|
||||
const (
|
||||
DSRecordDigestTypeSha1 = DSRecordDigestType("sha_1")
|
||||
DSRecordDigestTypeSha256 = DSRecordDigestType("sha_256")
|
||||
// Code 1, digest type: 'SHA_1'.
|
||||
DSRecordDigestTypeSha1 = DSRecordDigestType("sha_1")
|
||||
// Code 2, digest type: 'SHA_256'.
|
||||
DSRecordDigestTypeSha256 = DSRecordDigestType("sha_256")
|
||||
// Code 3, digest type: 'GOST_R_34_11_94'.
|
||||
DSRecordDigestTypeGostR34_11_94 = DSRecordDigestType("gost_r_34_11_94")
|
||||
DSRecordDigestTypeSha384 = DSRecordDigestType("sha_384")
|
||||
// Code 4, digest type: 'SHA_384'.
|
||||
DSRecordDigestTypeSha384 = DSRecordDigestType("sha_384")
|
||||
)
|
||||
|
||||
func (enum DSRecordDigestType) String() string {
|
||||
|
|
@ -323,11 +382,16 @@ func (enum *DSRecordDigestType) UnmarshalJSON(data []byte) error {
|
|||
type DomainFeatureStatus string
|
||||
|
||||
const (
|
||||
// Default unknown status.
|
||||
DomainFeatureStatusFeatureStatusUnknown = DomainFeatureStatus("feature_status_unknown")
|
||||
DomainFeatureStatusEnabling = DomainFeatureStatus("enabling")
|
||||
DomainFeatureStatusEnabled = DomainFeatureStatus("enabled")
|
||||
DomainFeatureStatusDisabling = DomainFeatureStatus("disabling")
|
||||
DomainFeatureStatusDisabled = DomainFeatureStatus("disabled")
|
||||
// A feature (auto renew, DNSSEC) is being enabled.
|
||||
DomainFeatureStatusEnabling = DomainFeatureStatus("enabling")
|
||||
// A feature (auto renew, DNSSEC) has been enabled.
|
||||
DomainFeatureStatusEnabled = DomainFeatureStatus("enabled")
|
||||
// A feature (auto renew, DNSSEC) is being disabled.
|
||||
DomainFeatureStatusDisabling = DomainFeatureStatus("disabling")
|
||||
// A feature (auto renew, DNSSEC) has been disabled.
|
||||
DomainFeatureStatusDisabled = DomainFeatureStatus("disabled")
|
||||
)
|
||||
|
||||
func (enum DomainFeatureStatus) String() string {
|
||||
|
|
@ -356,12 +420,18 @@ func (enum *DomainFeatureStatus) UnmarshalJSON(data []byte) error {
|
|||
type DomainRegistrationStatusTransferStatus string
|
||||
|
||||
const (
|
||||
// If unspecified, the status is unknown by default.
|
||||
DomainRegistrationStatusTransferStatusStatusUnknown = DomainRegistrationStatusTransferStatus("status_unknown")
|
||||
DomainRegistrationStatusTransferStatusPending = DomainRegistrationStatusTransferStatus("pending")
|
||||
DomainRegistrationStatusTransferStatusWaitingVote = DomainRegistrationStatusTransferStatus("waiting_vote")
|
||||
DomainRegistrationStatusTransferStatusRejected = DomainRegistrationStatusTransferStatus("rejected")
|
||||
DomainRegistrationStatusTransferStatusProcessing = DomainRegistrationStatusTransferStatus("processing")
|
||||
DomainRegistrationStatusTransferStatusDone = DomainRegistrationStatusTransferStatus("done")
|
||||
// The domain transfer is being initialized.
|
||||
DomainRegistrationStatusTransferStatusPending = DomainRegistrationStatusTransferStatus("pending")
|
||||
// The domain transfer has started. The process can be accelerated if you accept the vote.
|
||||
DomainRegistrationStatusTransferStatusWaitingVote = DomainRegistrationStatusTransferStatus("waiting_vote")
|
||||
// The domain transfer has been rejected.
|
||||
DomainRegistrationStatusTransferStatusRejected = DomainRegistrationStatusTransferStatus("rejected")
|
||||
// The domain transfer has been accepted. Your resources are being created.
|
||||
DomainRegistrationStatusTransferStatusProcessing = DomainRegistrationStatusTransferStatus("processing")
|
||||
// The domain transfer is complete.
|
||||
DomainRegistrationStatusTransferStatusDone = DomainRegistrationStatusTransferStatus("done")
|
||||
)
|
||||
|
||||
func (enum DomainRegistrationStatusTransferStatus) String() string {
|
||||
|
|
@ -390,20 +460,34 @@ func (enum *DomainRegistrationStatusTransferStatus) UnmarshalJSON(data []byte) e
|
|||
type DomainStatus string
|
||||
|
||||
const (
|
||||
// If unspecified, the status is unknown by default.
|
||||
DomainStatusStatusUnknown = DomainStatus("status_unknown")
|
||||
DomainStatusActive = DomainStatus("active")
|
||||
DomainStatusCreating = DomainStatus("creating")
|
||||
DomainStatusCreateError = DomainStatus("create_error")
|
||||
DomainStatusRenewing = DomainStatus("renewing")
|
||||
DomainStatusRenewError = DomainStatus("renew_error")
|
||||
DomainStatusXfering = DomainStatus("xfering")
|
||||
DomainStatusXferError = DomainStatus("xfer_error")
|
||||
DomainStatusExpired = DomainStatus("expired")
|
||||
DomainStatusExpiring = DomainStatus("expiring")
|
||||
DomainStatusUpdating = DomainStatus("updating")
|
||||
DomainStatusChecking = DomainStatus("checking")
|
||||
DomainStatusLocked = DomainStatus("locked")
|
||||
DomainStatusDeleting = DomainStatus("deleting")
|
||||
// The domain is active.
|
||||
DomainStatusActive = DomainStatus("active")
|
||||
// The domain is in the process of being created.
|
||||
DomainStatusCreating = DomainStatus("creating")
|
||||
// An error occurred during the domain's creation process.
|
||||
DomainStatusCreateError = DomainStatus("create_error")
|
||||
// The domain is being renewed.
|
||||
DomainStatusRenewing = DomainStatus("renewing")
|
||||
// An error occurred during the domain's renewal process.
|
||||
DomainStatusRenewError = DomainStatus("renew_error")
|
||||
// The domain is being transferred to Scaleway Domains and DNS.
|
||||
DomainStatusXfering = DomainStatus("xfering")
|
||||
// An error occurred during the domain's transfer process.
|
||||
DomainStatusXferError = DomainStatus("xfer_error")
|
||||
// The domain is expired but it can be renewed.
|
||||
DomainStatusExpired = DomainStatus("expired")
|
||||
// The domain is expiring but it is still renewable.
|
||||
DomainStatusExpiring = DomainStatus("expiring")
|
||||
// The domain's information is updating.
|
||||
DomainStatusUpdating = DomainStatus("updating")
|
||||
// The external domain has not yet been validated. It will be automatically removed after 48 hours if it still has not been validated by then.
|
||||
DomainStatusChecking = DomainStatus("checking")
|
||||
// The domain is locked. Contact Scaleway's support team for more information.
|
||||
DomainStatusLocked = DomainStatus("locked")
|
||||
// The domain will be deleted soon. This process cannot be canceled.
|
||||
DomainStatusDeleting = DomainStatus("deleting")
|
||||
)
|
||||
|
||||
func (enum DomainStatus) String() string {
|
||||
|
|
@ -432,10 +516,14 @@ func (enum *DomainStatus) UnmarshalJSON(data []byte) error {
|
|||
type HostStatus string
|
||||
|
||||
const (
|
||||
// If unspecified, the status is unknown by default.
|
||||
HostStatusUnknownStatus = HostStatus("unknown_status")
|
||||
HostStatusActive = HostStatus("active")
|
||||
HostStatusUpdating = HostStatus("updating")
|
||||
HostStatusDeleting = HostStatus("deleting")
|
||||
// The host is active.
|
||||
HostStatusActive = HostStatus("active")
|
||||
// The host is being updated.
|
||||
HostStatusUpdating = HostStatus("updating")
|
||||
// The host is being deleted.
|
||||
HostStatusDeleting = HostStatus("deleting")
|
||||
)
|
||||
|
||||
func (enum HostStatus) String() string {
|
||||
|
|
@ -496,7 +584,9 @@ func (enum *LanguageCode) UnmarshalJSON(data []byte) error {
|
|||
type ListDNSZoneRecordsRequestOrderBy string
|
||||
|
||||
const (
|
||||
ListDNSZoneRecordsRequestOrderByNameAsc = ListDNSZoneRecordsRequestOrderBy("name_asc")
|
||||
// Order by record name (ascending).
|
||||
ListDNSZoneRecordsRequestOrderByNameAsc = ListDNSZoneRecordsRequestOrderBy("name_asc")
|
||||
// Order by record name (descending).
|
||||
ListDNSZoneRecordsRequestOrderByNameDesc = ListDNSZoneRecordsRequestOrderBy("name_desc")
|
||||
)
|
||||
|
||||
|
|
@ -526,9 +616,13 @@ func (enum *ListDNSZoneRecordsRequestOrderBy) UnmarshalJSON(data []byte) error {
|
|||
type ListDNSZonesRequestOrderBy string
|
||||
|
||||
const (
|
||||
ListDNSZonesRequestOrderByDomainAsc = ListDNSZonesRequestOrderBy("domain_asc")
|
||||
ListDNSZonesRequestOrderByDomainDesc = ListDNSZonesRequestOrderBy("domain_desc")
|
||||
ListDNSZonesRequestOrderBySubdomainAsc = ListDNSZonesRequestOrderBy("subdomain_asc")
|
||||
// Order by domain name (ascending).
|
||||
ListDNSZonesRequestOrderByDomainAsc = ListDNSZonesRequestOrderBy("domain_asc")
|
||||
// Order by domain name (descending).
|
||||
ListDNSZonesRequestOrderByDomainDesc = ListDNSZonesRequestOrderBy("domain_desc")
|
||||
// Order by subdomain name (ascending).
|
||||
ListDNSZonesRequestOrderBySubdomainAsc = ListDNSZonesRequestOrderBy("subdomain_asc")
|
||||
// Order by subdomain name (descending).
|
||||
ListDNSZonesRequestOrderBySubdomainDesc = ListDNSZonesRequestOrderBy("subdomain_desc")
|
||||
)
|
||||
|
||||
|
|
@ -558,7 +652,9 @@ func (enum *ListDNSZonesRequestOrderBy) UnmarshalJSON(data []byte) error {
|
|||
type ListDomainsRequestOrderBy string
|
||||
|
||||
const (
|
||||
ListDomainsRequestOrderByDomainAsc = ListDomainsRequestOrderBy("domain_asc")
|
||||
// Order by domain name (ascending)
|
||||
ListDomainsRequestOrderByDomainAsc = ListDomainsRequestOrderBy("domain_asc")
|
||||
// Order by domain name (descending)
|
||||
ListDomainsRequestOrderByDomainDesc = ListDomainsRequestOrderBy("domain_desc")
|
||||
)
|
||||
|
||||
|
|
@ -588,7 +684,9 @@ func (enum *ListDomainsRequestOrderBy) UnmarshalJSON(data []byte) error {
|
|||
type ListRenewableDomainsRequestOrderBy string
|
||||
|
||||
const (
|
||||
ListRenewableDomainsRequestOrderByDomainAsc = ListRenewableDomainsRequestOrderBy("domain_asc")
|
||||
// Order by domain name (ascending)
|
||||
ListRenewableDomainsRequestOrderByDomainAsc = ListRenewableDomainsRequestOrderBy("domain_asc")
|
||||
// Order by domain name (descending)
|
||||
ListRenewableDomainsRequestOrderByDomainDesc = ListRenewableDomainsRequestOrderBy("domain_desc")
|
||||
)
|
||||
|
||||
|
|
@ -618,13 +716,21 @@ func (enum *ListRenewableDomainsRequestOrderBy) UnmarshalJSON(data []byte) error
|
|||
type ListTasksRequestOrderBy string
|
||||
|
||||
const (
|
||||
ListTasksRequestOrderByDomainDesc = ListTasksRequestOrderBy("domain_desc")
|
||||
ListTasksRequestOrderByDomainAsc = ListTasksRequestOrderBy("domain_asc")
|
||||
ListTasksRequestOrderByTypeAsc = ListTasksRequestOrderBy("type_asc")
|
||||
ListTasksRequestOrderByTypeDesc = ListTasksRequestOrderBy("type_desc")
|
||||
ListTasksRequestOrderByStatusAsc = ListTasksRequestOrderBy("status_asc")
|
||||
ListTasksRequestOrderByStatusDesc = ListTasksRequestOrderBy("status_desc")
|
||||
ListTasksRequestOrderByUpdatedAtAsc = ListTasksRequestOrderBy("updated_at_asc")
|
||||
// Order by domain name (descending)
|
||||
ListTasksRequestOrderByDomainDesc = ListTasksRequestOrderBy("domain_desc")
|
||||
// Order by domain name (ascending)
|
||||
ListTasksRequestOrderByDomainAsc = ListTasksRequestOrderBy("domain_asc")
|
||||
// Order by type (ascending)
|
||||
ListTasksRequestOrderByTypeAsc = ListTasksRequestOrderBy("type_asc")
|
||||
// Order by type (descending)
|
||||
ListTasksRequestOrderByTypeDesc = ListTasksRequestOrderBy("type_desc")
|
||||
// Order by status (ascending)
|
||||
ListTasksRequestOrderByStatusAsc = ListTasksRequestOrderBy("status_asc")
|
||||
// Order by status (descending)
|
||||
ListTasksRequestOrderByStatusDesc = ListTasksRequestOrderBy("status_desc")
|
||||
// Order by updated date (ascending)
|
||||
ListTasksRequestOrderByUpdatedAtAsc = ListTasksRequestOrderBy("updated_at_asc")
|
||||
// Order by updated date (descending)
|
||||
ListTasksRequestOrderByUpdatedAtDesc = ListTasksRequestOrderBy("updated_at_desc")
|
||||
)
|
||||
|
||||
|
|
@ -654,8 +760,10 @@ func (enum *ListTasksRequestOrderBy) UnmarshalJSON(data []byte) error {
|
|||
type RawFormat string
|
||||
|
||||
const (
|
||||
// If unspecified, the format is unknown by default.
|
||||
RawFormatUnknownRawFormat = RawFormat("unknown_raw_format")
|
||||
RawFormatBind = RawFormat("bind")
|
||||
// Export the DNS zone in text bind format
|
||||
RawFormatBind = RawFormat("bind")
|
||||
)
|
||||
|
||||
func (enum RawFormat) String() string {
|
||||
|
|
@ -684,9 +792,12 @@ func (enum *RawFormat) UnmarshalJSON(data []byte) error {
|
|||
type RecordHTTPServiceConfigStrategy string
|
||||
|
||||
const (
|
||||
// Returns a random IP based of the list of IPs available.
|
||||
RecordHTTPServiceConfigStrategyRandom = RecordHTTPServiceConfigStrategy("random")
|
||||
// Based on the hash of bestwho, returns a random functioning IP out of the best IPs available.
|
||||
RecordHTTPServiceConfigStrategyHashed = RecordHTTPServiceConfigStrategy("hashed")
|
||||
RecordHTTPServiceConfigStrategyAll = RecordHTTPServiceConfigStrategy("all")
|
||||
// Return all functioning IPs available.
|
||||
RecordHTTPServiceConfigStrategyAll = RecordHTTPServiceConfigStrategy("all")
|
||||
)
|
||||
|
||||
func (enum RecordHTTPServiceConfigStrategy) String() string {
|
||||
|
|
@ -715,26 +826,46 @@ func (enum *RecordHTTPServiceConfigStrategy) UnmarshalJSON(data []byte) error {
|
|||
type RecordType string
|
||||
|
||||
const (
|
||||
// If unspecified, the record's type is unknown by default.
|
||||
RecordTypeUnknown = RecordType("unknown")
|
||||
RecordTypeA = RecordType("A")
|
||||
RecordTypeAAAA = RecordType("AAAA")
|
||||
RecordTypeCNAME = RecordType("CNAME")
|
||||
RecordTypeTXT = RecordType("TXT")
|
||||
RecordTypeSRV = RecordType("SRV")
|
||||
RecordTypeTLSA = RecordType("TLSA")
|
||||
RecordTypeMX = RecordType("MX")
|
||||
RecordTypeNS = RecordType("NS")
|
||||
RecordTypePTR = RecordType("PTR")
|
||||
RecordTypeCAA = RecordType("CAA")
|
||||
RecordTypeALIAS = RecordType("ALIAS")
|
||||
RecordTypeLOC = RecordType("LOC")
|
||||
RecordTypeSSHFP = RecordType("SSHFP")
|
||||
RecordTypeHINFO = RecordType("HINFO")
|
||||
RecordTypeRP = RecordType("RP")
|
||||
RecordTypeURI = RecordType("URI")
|
||||
RecordTypeDS = RecordType("DS")
|
||||
RecordTypeNAPTR = RecordType("NAPTR")
|
||||
RecordTypeDNAME = RecordType("DNAME")
|
||||
// An A record contains an IP address. Example: '203.0.113.210'.
|
||||
RecordTypeA = RecordType("A")
|
||||
// An AAAA record contains an IPv6 address. Example: '2001:DB8:2000:bf0::1'.
|
||||
RecordTypeAAAA = RecordType("AAAA")
|
||||
// A CNAME record specifies the canonical name of a record. Example 'webserver-01.yourcompany.com'.
|
||||
RecordTypeCNAME = RecordType("CNAME")
|
||||
// A TXT record can be used to attach textual data to a domain. Example 'v=spf1 include:_spf.tem.scw.cloud -all'.
|
||||
RecordTypeTXT = RecordType("TXT")
|
||||
// SRV records can be used to encode the location and port of services on a domain name. Example : '20 443 sipdir.scaleway.example.com'.
|
||||
RecordTypeSRV = RecordType("SRV")
|
||||
// TLSA records are used to bind SSL/TLS certificates to named hosts and ports.
|
||||
RecordTypeTLSA = RecordType("TLSA")
|
||||
// An MX record specifies a mail exchanger host for a domain. Example '10 mx.example.net.'.
|
||||
RecordTypeMX = RecordType("MX")
|
||||
// Specifies nameservers for a domain. Example: 'ns1.yourcompany.com'.
|
||||
RecordTypeNS = RecordType("NS")
|
||||
// A reverse pointer is used to specify the hostname that belongs to an IP or an IPv6 address. Example: 'www.yourcompany.com.'.
|
||||
RecordTypePTR = RecordType("PTR")
|
||||
// A 'Certification Authority Authorization' record is used to specify certificate authorities that may issue certificates for a domain. Example: '0 issue ca.yourcompany.com'.
|
||||
RecordTypeCAA = RecordType("CAA")
|
||||
// The ALIAS pseudo-record type is supported to provide CNAME-like mechanisms on a zone's apex.
|
||||
RecordTypeALIAS = RecordType("ALIAS")
|
||||
// A LOC record is a way of expressing geographic location information for a domain name. It contains WGS84 latitude, longitude and altitude. Example: '51 56 0.123 N 5 54 0.000 E 4.00m 1.00m 10000.00m 10.00m'.
|
||||
RecordTypeLOC = RecordType("LOC")
|
||||
// An SSHFP record type is used for storing Secure Shell (SSH) fingerprints. Example: '2 1 123456789abcdef67890123456789abcdef67890'.
|
||||
RecordTypeSSHFP = RecordType("SSHFP")
|
||||
// A Hardware Info record is used to specify the CPU and operating system you are using. Example: 'i386 Linux'.
|
||||
RecordTypeHINFO = RecordType("HINFO")
|
||||
// A Responsible Person record stores the mailbox name and the more-information pointer. Example: 'michel.yourcompany.com michel.people.yourcompany.com', to indicate that michel@yourcompany.com is responsible and that more information about Michel is available by querying the `TXT` record of 'michel.people.yourcompany.com'.
|
||||
RecordTypeRP = RecordType("RP")
|
||||
// A URI record, is used to publish mappings from hostnames to URIs. Example: '10 1 'ftp://ftp.yourcompany.com/public'.
|
||||
RecordTypeURI = RecordType("URI")
|
||||
// DS records (Delegation Signer) are used to secure delegations (DNSSEC). Example: '2371 13 2 1F987CC6583E92DF0890718C42'.
|
||||
RecordTypeDS = RecordType("DS")
|
||||
// A Naming Authority Pointer record is used to set rules for how websites process requests. Example: '100 50 "s" "z3950+I2L+I2C" "" _z3950._tcp.yourcompany.com'.
|
||||
RecordTypeNAPTR = RecordType("NAPTR")
|
||||
// A DNAME record provides redirection from one part of the DNS name tree to another part of the DNS name tree. DNAME and CNAME records both cause a lookup to (potentially) return data corresponding to a different domain name from the queried domain name. Example: 'yourcompany.com'.
|
||||
RecordTypeDNAME = RecordType("DNAME")
|
||||
)
|
||||
|
||||
func (enum RecordType) String() string {
|
||||
|
|
@ -763,10 +894,14 @@ func (enum *RecordType) UnmarshalJSON(data []byte) error {
|
|||
type RenewableDomainStatus string
|
||||
|
||||
const (
|
||||
RenewableDomainStatusUnknown = RenewableDomainStatus("unknown")
|
||||
RenewableDomainStatusRenewable = RenewableDomainStatus("renewable")
|
||||
// If unspecified, the status is unknown by default.
|
||||
RenewableDomainStatusUnknown = RenewableDomainStatus("unknown")
|
||||
// The domain can be renewed.
|
||||
RenewableDomainStatusRenewable = RenewableDomainStatus("renewable")
|
||||
// The domain is expired, but it still can be late renewed.
|
||||
RenewableDomainStatusLateReneweable = RenewableDomainStatus("late_reneweable")
|
||||
RenewableDomainStatusNotRenewable = RenewableDomainStatus("not_renewable")
|
||||
// The domain cannot be renewed.
|
||||
RenewableDomainStatusNotRenewable = RenewableDomainStatus("not_renewable")
|
||||
)
|
||||
|
||||
func (enum RenewableDomainStatus) String() string {
|
||||
|
|
@ -795,11 +930,16 @@ func (enum *RenewableDomainStatus) UnmarshalJSON(data []byte) error {
|
|||
type SSLCertificateStatus string
|
||||
|
||||
const (
|
||||
// If unspecified, the SSL certificate's status is unknown by default.
|
||||
SSLCertificateStatusUnknown = SSLCertificateStatus("unknown")
|
||||
SSLCertificateStatusNew = SSLCertificateStatus("new")
|
||||
// The SSL certificate has been created but it has not been processed yet.
|
||||
SSLCertificateStatusNew = SSLCertificateStatus("new")
|
||||
// The SSL certificate's status is pending.
|
||||
SSLCertificateStatusPending = SSLCertificateStatus("pending")
|
||||
// The SSL certificate has been created and processed.
|
||||
SSLCertificateStatusSuccess = SSLCertificateStatus("success")
|
||||
SSLCertificateStatusError = SSLCertificateStatus("error")
|
||||
// An error occurred during the SSL certificate's creation.
|
||||
SSLCertificateStatusError = SSLCertificateStatus("error")
|
||||
)
|
||||
|
||||
func (enum SSLCertificateStatus) String() string {
|
||||
|
|
@ -828,12 +968,18 @@ func (enum *SSLCertificateStatus) UnmarshalJSON(data []byte) error {
|
|||
type TaskStatus string
|
||||
|
||||
const (
|
||||
TaskStatusUnavailable = TaskStatus("unavailable")
|
||||
TaskStatusNew = TaskStatus("new")
|
||||
// If unspecified, the status is unavailable by default.
|
||||
TaskStatusUnavailable = TaskStatus("unavailable")
|
||||
// The task has been created but it has not yet started.
|
||||
TaskStatusNew = TaskStatus("new")
|
||||
// The task is waiting for a payment to be validated.
|
||||
TaskStatusWaitingPayment = TaskStatus("waiting_payment")
|
||||
TaskStatusPending = TaskStatus("pending")
|
||||
TaskStatusSuccess = TaskStatus("success")
|
||||
TaskStatusError = TaskStatus("error")
|
||||
// The task is pending.
|
||||
TaskStatusPending = TaskStatus("pending")
|
||||
// The task has been completed.
|
||||
TaskStatusSuccess = TaskStatus("success")
|
||||
// The task is in an error state.
|
||||
TaskStatusError = TaskStatus("error")
|
||||
)
|
||||
|
||||
func (enum TaskStatus) String() string {
|
||||
|
|
@ -862,28 +1008,50 @@ func (enum *TaskStatus) UnmarshalJSON(data []byte) error {
|
|||
type TaskType string
|
||||
|
||||
const (
|
||||
TaskTypeUnknown = TaskType("unknown")
|
||||
TaskTypeCreateDomain = TaskType("create_domain")
|
||||
TaskTypeCreateExternalDomain = TaskType("create_external_domain")
|
||||
TaskTypeRenewDomain = TaskType("renew_domain")
|
||||
TaskTypeTransferDomain = TaskType("transfer_domain")
|
||||
TaskTypeTradeDomain = TaskType("trade_domain")
|
||||
TaskTypeLockDomainTransfer = TaskType("lock_domain_transfer")
|
||||
TaskTypeUnlockDomainTransfer = TaskType("unlock_domain_transfer")
|
||||
TaskTypeEnableDnssec = TaskType("enable_dnssec")
|
||||
TaskTypeDisableDnssec = TaskType("disable_dnssec")
|
||||
TaskTypeUpdateDomain = TaskType("update_domain")
|
||||
TaskTypeUpdateContact = TaskType("update_contact")
|
||||
TaskTypeDeleteDomain = TaskType("delete_domain")
|
||||
TaskTypeCancelTask = TaskType("cancel_task")
|
||||
// If unspecified, the status is unknown by default.
|
||||
TaskTypeUnknown = TaskType("unknown")
|
||||
// Create a new internal domain.
|
||||
TaskTypeCreateDomain = TaskType("create_domain")
|
||||
// Create a new external domain.
|
||||
TaskTypeCreateExternalDomain = TaskType("create_external_domain")
|
||||
// Renew a domain.
|
||||
TaskTypeRenewDomain = TaskType("renew_domain")
|
||||
// Transfer a domain to Scaleway Domains and DNS.
|
||||
TaskTypeTransferDomain = TaskType("transfer_domain")
|
||||
// Trade a domain to a new owner.
|
||||
TaskTypeTradeDomain = TaskType("trade_domain")
|
||||
// Lock the transfer of a domain for protection.
|
||||
TaskTypeLockDomainTransfer = TaskType("lock_domain_transfer")
|
||||
// Unlock the transfer of a domain.
|
||||
TaskTypeUnlockDomainTransfer = TaskType("unlock_domain_transfer")
|
||||
// Enable DNSSEC for a domain.
|
||||
TaskTypeEnableDnssec = TaskType("enable_dnssec")
|
||||
// Disable DNSSEC for a domain.
|
||||
TaskTypeDisableDnssec = TaskType("disable_dnssec")
|
||||
// Update the domain's information.
|
||||
TaskTypeUpdateDomain = TaskType("update_domain")
|
||||
// Change the technical or administrative contact.
|
||||
TaskTypeUpdateContact = TaskType("update_contact")
|
||||
// Delete a domain and destroy its zone versions, zones, and SSL certificates.
|
||||
TaskTypeDeleteDomain = TaskType("delete_domain")
|
||||
// Cancel a task that has not yet started.
|
||||
TaskTypeCancelTask = TaskType("cancel_task")
|
||||
// Generate a new SSL certificate.
|
||||
TaskTypeGenerateSslCertificate = TaskType("generate_ssl_certificate")
|
||||
TaskTypeRenewSslCertificate = TaskType("renew_ssl_certificate")
|
||||
TaskTypeSendMessage = TaskType("send_message")
|
||||
TaskTypeDeleteDomainExpired = TaskType("delete_domain_expired")
|
||||
TaskTypeDeleteExternalDomain = TaskType("delete_external_domain")
|
||||
TaskTypeCreateHost = TaskType("create_host")
|
||||
TaskTypeUpdateHost = TaskType("update_host")
|
||||
TaskTypeDeleteHost = TaskType("delete_host")
|
||||
// Renew an SSL certificate.
|
||||
TaskTypeRenewSslCertificate = TaskType("renew_ssl_certificate")
|
||||
// Send a message. For most cases, it will be followed by an email.
|
||||
TaskTypeSendMessage = TaskType("send_message")
|
||||
// Delete a domain that has expired and not been restored for at least 3 months.
|
||||
TaskTypeDeleteDomainExpired = TaskType("delete_domain_expired")
|
||||
// Delete a newly registered external domain that has not been validated after 48 hours or when the external domain fails to point to our name servers for more than 14 days.
|
||||
TaskTypeDeleteExternalDomain = TaskType("delete_external_domain")
|
||||
// Create domain's hostname with glue IPs.
|
||||
TaskTypeCreateHost = TaskType("create_host")
|
||||
// Update domain's hostname with glue IPs.
|
||||
TaskTypeUpdateHost = TaskType("update_host")
|
||||
// Delete domain's hostname.
|
||||
TaskTypeDeleteHost = TaskType("delete_host")
|
||||
)
|
||||
|
||||
func (enum TaskType) String() string {
|
||||
|
|
@ -1983,10 +2151,10 @@ type UpdateDNSZoneRecordsRequest struct {
|
|||
// Update records within a DNS zone that has default name servers and perform several actions on your records.
|
||||
//
|
||||
// Actions include:
|
||||
// - add: allows you to add a new record or add a new IP to an existing A record, for example
|
||||
// - set: allows you to edit a record or edit an IP from an existing A record, for example
|
||||
// - delete: allows you to delete a record or delete an IP from an existing A record, for example
|
||||
// - clear: allows you to delete all records from a DNS zone
|
||||
// - add: allows you to add a new record or add a new IP to an existing A record, for example
|
||||
// - set: allows you to edit a record or edit an IP from an existing A record, for example
|
||||
// - delete: allows you to delete a record or delete an IP from an existing A record, for example
|
||||
// - clear: allows you to delete all records from a DNS zone
|
||||
//
|
||||
// All edits will be versioned.
|
||||
func (s *API) UpdateDNSZoneRecords(req *UpdateDNSZoneRecordsRequest, opts ...scw.RequestOption) (*UpdateDNSZoneRecordsResponse, error) {
|
||||
|
|
@ -2629,8 +2797,8 @@ type RegistrarAPIListTasksRequest struct {
|
|||
}
|
||||
|
||||
// ListTasks: list tasks.
|
||||
// List all account tasks.
|
||||
// You can filter the list by domain name.
|
||||
// List all operations performed on the account.
|
||||
// You can filter the list of tasks by domain name.
|
||||
func (s *RegistrarAPI) ListTasks(req *RegistrarAPIListTasksRequest, opts ...scw.RequestOption) (*ListTasksResponse, error) {
|
||||
var err error
|
||||
|
||||
|
|
@ -2691,9 +2859,9 @@ type RegistrarAPIBuyDomainsRequest struct {
|
|||
TechnicalContact *NewContact `json:"technical_contact,omitempty"`
|
||||
}
|
||||
|
||||
// BuyDomains: buy one or more domains.
|
||||
// BuyDomains: purchase domains.
|
||||
// Request the registration of domain names.
|
||||
// You can provide an already existing domain's contact or a new contact.
|
||||
// You can provide a domain's already existing contact or a new contact.
|
||||
func (s *RegistrarAPI) BuyDomains(req *RegistrarAPIBuyDomainsRequest, opts ...scw.RequestOption) (*OrderResponse, error) {
|
||||
var err error
|
||||
|
||||
|
|
@ -2730,8 +2898,8 @@ type RegistrarAPIRenewDomainsRequest struct {
|
|||
ForceLateRenewal *bool `json:"force_late_renewal"`
|
||||
}
|
||||
|
||||
// RenewDomains: renew one or more domains.
|
||||
// Request the renewal of domain names.
|
||||
// RenewDomains: renew domains.
|
||||
// Request the renewal of one or more domain names.
|
||||
func (s *RegistrarAPI) RenewDomains(req *RegistrarAPIRenewDomainsRequest, opts ...scw.RequestOption) (*OrderResponse, error) {
|
||||
var err error
|
||||
|
||||
|
|
@ -2780,7 +2948,7 @@ type RegistrarAPITransferInDomainRequest struct {
|
|||
}
|
||||
|
||||
// TransferInDomain: transfer a domain.
|
||||
// Request the transfer from another registrar domain to Scaleway.
|
||||
// Request the transfer of a domain from another registrar to Scaleway Domains and DNS.
|
||||
func (s *RegistrarAPI) TransferInDomain(req *RegistrarAPITransferInDomainRequest, opts ...scw.RequestOption) (*OrderResponse, error) {
|
||||
var err error
|
||||
|
||||
|
|
@ -2821,11 +2989,11 @@ type RegistrarAPITradeDomainRequest struct {
|
|||
NewOwnerContact *NewContact `json:"new_owner_contact,omitempty"`
|
||||
}
|
||||
|
||||
// TradeDomain: trade a domain contact.
|
||||
// Request a trade for the contact owner.<br/>
|
||||
// If an `organization_id` is given, the change is from the current Scaleway account to another Scaleway account.<br/>
|
||||
// If no contact is given, the first contact of the other Scaleway account is taken.<br/>
|
||||
// If the other Scaleway account has no contact. An error occurs.
|
||||
// TradeDomain: trade a domain's contact.
|
||||
// Request to change a domain's contact owner.<br/>
|
||||
// If you specify the `organization_id` of the domain's new owner, the contact will change from the current owner's Scaleway account to the new owner's Scaleway account.<br/>
|
||||
// If the new owner's current contact information is not available, the first ever contact they have created for previous domains is taken into account to operate the change.<br/>
|
||||
// If the new owner has never created a contact to register domains before, an error message displays.
|
||||
func (s *RegistrarAPI) TradeDomain(req *RegistrarAPITradeDomainRequest, opts ...scw.RequestOption) (*OrderResponse, error) {
|
||||
var err error
|
||||
|
||||
|
|
@ -2941,9 +3109,9 @@ type RegistrarAPICheckContactsCompatibilityRequest struct {
|
|||
TechnicalContact *NewContact `json:"technical_contact,omitempty"`
|
||||
}
|
||||
|
||||
// CheckContactsCompatibility: check if contacts are compatible against a domain or a tld.
|
||||
// Check if contacts are compatible against a domain or a tld.
|
||||
// If not, it will return the information requiring a correction.
|
||||
// CheckContactsCompatibility: check if contacts are compatible with a domain or a TLD.
|
||||
// Check whether contacts are compatible with a domain or a TLD.
|
||||
// If contacts are not compatible with either the domain or the TLD, the information that needs to be corrected is returned.
|
||||
func (s *RegistrarAPI) CheckContactsCompatibility(req *RegistrarAPICheckContactsCompatibilityRequest, opts ...scw.RequestOption) (*CheckContactsCompatibilityResponse, error) {
|
||||
var err error
|
||||
|
||||
|
|
@ -2980,7 +3148,7 @@ type RegistrarAPIListContactsRequest struct {
|
|||
}
|
||||
|
||||
// ListContacts: list contacts.
|
||||
// Return a list of contacts with their domains and roles.
|
||||
// Retrieve the list of contacts and their associated domains and roles.
|
||||
// You can filter the list by domain name.
|
||||
func (s *RegistrarAPI) ListContacts(req *RegistrarAPIListContactsRequest, opts ...scw.RequestOption) (*ListContactsResponse, error) {
|
||||
var err error
|
||||
|
|
@ -3018,7 +3186,7 @@ type RegistrarAPIGetContactRequest struct {
|
|||
}
|
||||
|
||||
// GetContact: get a contact.
|
||||
// Return a contact details retrieved from the registrar using a given contact ID.
|
||||
// Retrieve a contact's details from the registrar using the given contact's ID.
|
||||
func (s *RegistrarAPI) GetContact(req *RegistrarAPIGetContactRequest, opts ...scw.RequestOption) (*Contact, error) {
|
||||
var err error
|
||||
|
||||
|
|
@ -3084,7 +3252,7 @@ type RegistrarAPIUpdateContactRequest struct {
|
|||
}
|
||||
|
||||
// UpdateContact: update contact.
|
||||
// You can edit the contact coordinates.
|
||||
// Edit the contact's information.
|
||||
func (s *RegistrarAPI) UpdateContact(req *RegistrarAPIUpdateContactRequest, opts ...scw.RequestOption) (*Contact, error) {
|
||||
var err error
|
||||
|
||||
|
|
@ -3133,7 +3301,7 @@ type RegistrarAPIListDomainsRequest struct {
|
|||
}
|
||||
|
||||
// ListDomains: list domains.
|
||||
// Returns a list of domains owned by the user.
|
||||
// Retrieve the list of domains you own.
|
||||
func (s *RegistrarAPI) ListDomains(req *RegistrarAPIListDomainsRequest, opts ...scw.RequestOption) (*ListDomainsResponse, error) {
|
||||
var err error
|
||||
|
||||
|
|
@ -3181,8 +3349,8 @@ type RegistrarAPIListRenewableDomainsRequest struct {
|
|||
OrganizationID *string `json:"-"`
|
||||
}
|
||||
|
||||
// ListRenewableDomains: list scaleway domains that can or not be renewed.
|
||||
// Returns a list of domains owned by the user with a renew status and if renewable, the maximum renew duration in years.
|
||||
// ListRenewableDomains: list domains that can be renewed.
|
||||
// Retrieve the list of domains you own that can be renewed. You can also see the maximum renewal duration in years for your domains that are renewable.
|
||||
func (s *RegistrarAPI) ListRenewableDomains(req *RegistrarAPIListRenewableDomainsRequest, opts ...scw.RequestOption) (*ListRenewableDomainsResponse, error) {
|
||||
var err error
|
||||
|
||||
|
|
@ -3219,7 +3387,7 @@ type RegistrarAPIGetDomainRequest struct {
|
|||
}
|
||||
|
||||
// GetDomain: get domain.
|
||||
// Returns a the domain with more informations.
|
||||
// Retrieve a specific domain and display the domain's information.
|
||||
func (s *RegistrarAPI) GetDomain(req *RegistrarAPIGetDomainRequest, opts ...scw.RequestOption) (*Domain, error) {
|
||||
var err error
|
||||
|
||||
|
|
@ -3264,9 +3432,9 @@ type RegistrarAPIUpdateDomainRequest struct {
|
|||
AdministrativeContact *NewContact `json:"administrative_contact,omitempty"`
|
||||
}
|
||||
|
||||
// UpdateDomain: update a domain.
|
||||
// Update the domain contacts or create a new one.<br/>
|
||||
// If you add the same contact for multiple roles. Only one ID will be created and used for all of them.
|
||||
// UpdateDomain: update a domain's contacts.
|
||||
// Update contacts for a specific domain or create a new contact.<br/>
|
||||
// If you add the same contact for multiple roles (owner, administrative, technical), only one ID will be created and used for all of the roles.
|
||||
func (s *RegistrarAPI) UpdateDomain(req *RegistrarAPIUpdateDomainRequest, opts ...scw.RequestOption) (*Domain, error) {
|
||||
var err error
|
||||
|
||||
|
|
@ -3298,8 +3466,8 @@ type RegistrarAPILockDomainTransferRequest struct {
|
|||
Domain string `json:"-"`
|
||||
}
|
||||
|
||||
// LockDomainTransfer: lock domain transfer.
|
||||
// Lock domain transfer. A locked domain transfer can't be transferred and the auth code can't be requested.
|
||||
// LockDomainTransfer: lock the transfer of a domain.
|
||||
// Lock the transfer of a domain. This means that the domain cannot be transferred and the authorization code cannot be requested to your current registrar.
|
||||
func (s *RegistrarAPI) LockDomainTransfer(req *RegistrarAPILockDomainTransferRequest, opts ...scw.RequestOption) (*Domain, error) {
|
||||
var err error
|
||||
|
||||
|
|
@ -3331,8 +3499,8 @@ type RegistrarAPIUnlockDomainTransferRequest struct {
|
|||
Domain string `json:"-"`
|
||||
}
|
||||
|
||||
// UnlockDomainTransfer: unlock domain transfer.
|
||||
// Unlock domain transfer. An unlocked domain can be transferred and the auth code can be requested for this.
|
||||
// UnlockDomainTransfer: unlock the transfer of a domain.
|
||||
// Unlock the transfer of a domain. This means that the domain can be transferred and the authorization code can be requested to your current registrar.
|
||||
func (s *RegistrarAPI) UnlockDomainTransfer(req *RegistrarAPIUnlockDomainTransferRequest, opts ...scw.RequestOption) (*Domain, error) {
|
||||
var err error
|
||||
|
||||
|
|
@ -3364,7 +3532,8 @@ type RegistrarAPIEnableDomainAutoRenewRequest struct {
|
|||
Domain string `json:"-"`
|
||||
}
|
||||
|
||||
// EnableDomainAutoRenew: enable domain auto renew.
|
||||
// EnableDomainAutoRenew: enable auto renew.
|
||||
// Enable the `auto renew` feature for a domain. This means the domain will be automatically renewed before its expiry date.
|
||||
func (s *RegistrarAPI) EnableDomainAutoRenew(req *RegistrarAPIEnableDomainAutoRenewRequest, opts ...scw.RequestOption) (*Domain, error) {
|
||||
var err error
|
||||
|
||||
|
|
@ -3396,7 +3565,8 @@ type RegistrarAPIDisableDomainAutoRenewRequest struct {
|
|||
Domain string `json:"-"`
|
||||
}
|
||||
|
||||
// DisableDomainAutoRenew: disable domain auto renew.
|
||||
// DisableDomainAutoRenew: disable auto renew.
|
||||
// Disable the `auto renew` feature for a domain. This means the domain will not be renewed before its expiry date.
|
||||
func (s *RegistrarAPI) DisableDomainAutoRenew(req *RegistrarAPIDisableDomainAutoRenewRequest, opts ...scw.RequestOption) (*Domain, error) {
|
||||
var err error
|
||||
|
||||
|
|
@ -3428,9 +3598,9 @@ type RegistrarAPIGetDomainAuthCodeRequest struct {
|
|||
Domain string `json:"-"`
|
||||
}
|
||||
|
||||
// GetDomainAuthCode: return domain auth code.
|
||||
// If possible, return the auth code for an unlocked domain transfer, or an error if the domain is locked.
|
||||
// Some TLD may have a different procedure to retrieve the auth code, in that case, the information is given in the message field.
|
||||
// GetDomainAuthCode: get a domain's authorization code.
|
||||
// Retrieve the authorization code to tranfer an unlocked domain. The output returns an error if the domain is locked.
|
||||
// Some TLDs may have a different procedure to retrieve the authorization code. In that case, the information displays in the message field.
|
||||
func (s *RegistrarAPI) GetDomainAuthCode(req *RegistrarAPIGetDomainAuthCodeRequest, opts ...scw.RequestOption) (*GetDomainAuthCodeResponse, error) {
|
||||
var err error
|
||||
|
||||
|
|
@ -3461,24 +3631,6 @@ type RegistrarAPIEnableDomainDNSSECRequest struct {
|
|||
|
||||
// EnableDomainDNSSEC: update domain DNSSEC.
|
||||
// If your domain has the default Scaleway NS and uses another registrar, you have to update the DS record manually.
|
||||
// For the algorithm, here are the code numbers for each type:
|
||||
// - 1: RSAMD5
|
||||
// - 2: DIFFIE_HELLMAN
|
||||
// - 3: DSA_SHA1
|
||||
// - 5: RSA_SHA1
|
||||
// - 6: DSA_NSEC3_SHA1
|
||||
// - 7: RSASHA1_NSEC3_SHA1
|
||||
// - 8: RSASHA256
|
||||
// - 10: RSASHA512
|
||||
// - 12: ECC_GOST
|
||||
// - 13: ECDSAP256SHA256
|
||||
// - 14: ECDSAP384SHA384
|
||||
//
|
||||
// And for the digest type:
|
||||
// - 1: SHA_1
|
||||
// - 2: SHA_256
|
||||
// - 3: GOST_R_34_11_94
|
||||
// - 4: SHA_384.
|
||||
func (s *RegistrarAPI) EnableDomainDNSSEC(req *RegistrarAPIEnableDomainDNSSECRequest, opts ...scw.RequestOption) (*Domain, error) {
|
||||
var err error
|
||||
|
||||
|
|
@ -3510,7 +3662,8 @@ type RegistrarAPIDisableDomainDNSSECRequest struct {
|
|||
Domain string `json:"-"`
|
||||
}
|
||||
|
||||
// DisableDomainDNSSEC: disable domain DNSSEC.
|
||||
// DisableDomainDNSSEC: disable a domain's DNSSEC.
|
||||
// Disable DNSSEC for a domain.
|
||||
func (s *RegistrarAPI) DisableDomainDNSSEC(req *RegistrarAPIDisableDomainDNSSECRequest, opts ...scw.RequestOption) (*Domain, error) {
|
||||
var err error
|
||||
|
||||
|
|
@ -3548,9 +3701,9 @@ type RegistrarAPISearchAvailableDomainsRequest struct {
|
|||
}
|
||||
|
||||
// SearchAvailableDomains: search available domains.
|
||||
// Search a domain (or at maximum, 10 domains).
|
||||
// Search a domain or a maximum of 10 domains that are available.
|
||||
//
|
||||
// If the TLD list is empty or not set the search returns the results from the most popular TLDs.
|
||||
// If the TLD list is empty or not set, the search returns the results from the most popular TLDs.
|
||||
func (s *RegistrarAPI) SearchAvailableDomains(req *RegistrarAPISearchAvailableDomainsRequest, opts ...scw.RequestOption) (*SearchAvailableDomainsResponse, error) {
|
||||
var err error
|
||||
|
||||
|
|
@ -3583,7 +3736,8 @@ type RegistrarAPICreateDomainHostRequest struct {
|
|||
IPs []net.IP `json:"ips"`
|
||||
}
|
||||
|
||||
// CreateDomainHost: create domain hostname with glue IPs.
|
||||
// CreateDomainHost: create a hostname for a domain.
|
||||
// Create a hostname for a domain with glue IPs.
|
||||
func (s *RegistrarAPI) CreateDomainHost(req *RegistrarAPICreateDomainHostRequest, opts ...scw.RequestOption) (*Host, error) {
|
||||
var err error
|
||||
|
||||
|
|
@ -3619,7 +3773,8 @@ type RegistrarAPIListDomainHostsRequest struct {
|
|||
PageSize *uint32 `json:"-"`
|
||||
}
|
||||
|
||||
// ListDomainHosts: list domain hostnames with they glue IPs.
|
||||
// ListDomainHosts: list a domain's hostnames.
|
||||
// List a domain's hostnames using their glue IPs.
|
||||
func (s *RegistrarAPI) ListDomainHosts(req *RegistrarAPIListDomainHostsRequest, opts ...scw.RequestOption) (*ListDomainHostsResponse, error) {
|
||||
var err error
|
||||
|
||||
|
|
@ -3660,7 +3815,8 @@ type RegistrarAPIUpdateDomainHostRequest struct {
|
|||
IPs *[]string `json:"ips"`
|
||||
}
|
||||
|
||||
// UpdateDomainHost: update domain hostname with glue IPs.
|
||||
// UpdateDomainHost: update a domain's hostname.
|
||||
// Update a domain's hostname with glue IPs.
|
||||
func (s *RegistrarAPI) UpdateDomainHost(req *RegistrarAPIUpdateDomainHostRequest, opts ...scw.RequestOption) (*Host, error) {
|
||||
var err error
|
||||
|
||||
|
|
@ -3698,7 +3854,7 @@ type RegistrarAPIDeleteDomainHostRequest struct {
|
|||
Name string `json:"-"`
|
||||
}
|
||||
|
||||
// DeleteDomainHost: delete domain hostname.
|
||||
// DeleteDomainHost: delete a domain's hostname.
|
||||
func (s *RegistrarAPI) DeleteDomainHost(req *RegistrarAPIDeleteDomainHostRequest, opts ...scw.RequestOption) (*Host, error) {
|
||||
var err error
|
||||
|
||||
|
|
|
|||
|
|
@ -54,9 +54,12 @@ func NewAPI(client *scw.Client) *API {
|
|||
type BearerType string
|
||||
|
||||
const (
|
||||
// Unknown bearer type
|
||||
BearerTypeUnknownBearerType = BearerType("unknown_bearer_type")
|
||||
BearerTypeUser = BearerType("user")
|
||||
BearerTypeApplication = BearerType("application")
|
||||
// User
|
||||
BearerTypeUser = BearerType("user")
|
||||
// Application
|
||||
BearerTypeApplication = BearerType("application")
|
||||
)
|
||||
|
||||
func (enum BearerType) String() string {
|
||||
|
|
@ -85,13 +88,21 @@ func (enum *BearerType) UnmarshalJSON(data []byte) error {
|
|||
type ListAPIKeysRequestOrderBy string
|
||||
|
||||
const (
|
||||
ListAPIKeysRequestOrderByCreatedAtAsc = ListAPIKeysRequestOrderBy("created_at_asc")
|
||||
// Creation date ascending
|
||||
ListAPIKeysRequestOrderByCreatedAtAsc = ListAPIKeysRequestOrderBy("created_at_asc")
|
||||
// Creation date descending
|
||||
ListAPIKeysRequestOrderByCreatedAtDesc = ListAPIKeysRequestOrderBy("created_at_desc")
|
||||
ListAPIKeysRequestOrderByUpdatedAtAsc = ListAPIKeysRequestOrderBy("updated_at_asc")
|
||||
// Update date ascending
|
||||
ListAPIKeysRequestOrderByUpdatedAtAsc = ListAPIKeysRequestOrderBy("updated_at_asc")
|
||||
// Update date descending
|
||||
ListAPIKeysRequestOrderByUpdatedAtDesc = ListAPIKeysRequestOrderBy("updated_at_desc")
|
||||
ListAPIKeysRequestOrderByExpiresAtAsc = ListAPIKeysRequestOrderBy("expires_at_asc")
|
||||
// Expiration date ascending
|
||||
ListAPIKeysRequestOrderByExpiresAtAsc = ListAPIKeysRequestOrderBy("expires_at_asc")
|
||||
// Expiration date descending
|
||||
ListAPIKeysRequestOrderByExpiresAtDesc = ListAPIKeysRequestOrderBy("expires_at_desc")
|
||||
ListAPIKeysRequestOrderByAccessKeyAsc = ListAPIKeysRequestOrderBy("access_key_asc")
|
||||
// Access key ascending
|
||||
ListAPIKeysRequestOrderByAccessKeyAsc = ListAPIKeysRequestOrderBy("access_key_asc")
|
||||
// Access key descending
|
||||
ListAPIKeysRequestOrderByAccessKeyDesc = ListAPIKeysRequestOrderBy("access_key_desc")
|
||||
)
|
||||
|
||||
|
|
@ -121,12 +132,18 @@ func (enum *ListAPIKeysRequestOrderBy) UnmarshalJSON(data []byte) error {
|
|||
type ListApplicationsRequestOrderBy string
|
||||
|
||||
const (
|
||||
ListApplicationsRequestOrderByCreatedAtAsc = ListApplicationsRequestOrderBy("created_at_asc")
|
||||
// Creation date ascending
|
||||
ListApplicationsRequestOrderByCreatedAtAsc = ListApplicationsRequestOrderBy("created_at_asc")
|
||||
// Creation date descending
|
||||
ListApplicationsRequestOrderByCreatedAtDesc = ListApplicationsRequestOrderBy("created_at_desc")
|
||||
ListApplicationsRequestOrderByUpdatedAtAsc = ListApplicationsRequestOrderBy("updated_at_asc")
|
||||
// Update date ascending
|
||||
ListApplicationsRequestOrderByUpdatedAtAsc = ListApplicationsRequestOrderBy("updated_at_asc")
|
||||
// Update date descending
|
||||
ListApplicationsRequestOrderByUpdatedAtDesc = ListApplicationsRequestOrderBy("updated_at_desc")
|
||||
ListApplicationsRequestOrderByNameAsc = ListApplicationsRequestOrderBy("name_asc")
|
||||
ListApplicationsRequestOrderByNameDesc = ListApplicationsRequestOrderBy("name_desc")
|
||||
// Name ascending
|
||||
ListApplicationsRequestOrderByNameAsc = ListApplicationsRequestOrderBy("name_asc")
|
||||
// Name descending
|
||||
ListApplicationsRequestOrderByNameDesc = ListApplicationsRequestOrderBy("name_desc")
|
||||
)
|
||||
|
||||
func (enum ListApplicationsRequestOrderBy) String() string {
|
||||
|
|
@ -155,12 +172,18 @@ func (enum *ListApplicationsRequestOrderBy) UnmarshalJSON(data []byte) error {
|
|||
type ListGroupsRequestOrderBy string
|
||||
|
||||
const (
|
||||
ListGroupsRequestOrderByCreatedAtAsc = ListGroupsRequestOrderBy("created_at_asc")
|
||||
// Creation date ascending
|
||||
ListGroupsRequestOrderByCreatedAtAsc = ListGroupsRequestOrderBy("created_at_asc")
|
||||
// Creation date descending
|
||||
ListGroupsRequestOrderByCreatedAtDesc = ListGroupsRequestOrderBy("created_at_desc")
|
||||
ListGroupsRequestOrderByUpdatedAtAsc = ListGroupsRequestOrderBy("updated_at_asc")
|
||||
// Update date ascending
|
||||
ListGroupsRequestOrderByUpdatedAtAsc = ListGroupsRequestOrderBy("updated_at_asc")
|
||||
// Update date descending
|
||||
ListGroupsRequestOrderByUpdatedAtDesc = ListGroupsRequestOrderBy("updated_at_desc")
|
||||
ListGroupsRequestOrderByNameAsc = ListGroupsRequestOrderBy("name_asc")
|
||||
ListGroupsRequestOrderByNameDesc = ListGroupsRequestOrderBy("name_desc")
|
||||
// Name ascending
|
||||
ListGroupsRequestOrderByNameAsc = ListGroupsRequestOrderBy("name_asc")
|
||||
// Name descending
|
||||
ListGroupsRequestOrderByNameDesc = ListGroupsRequestOrderBy("name_desc")
|
||||
)
|
||||
|
||||
func (enum ListGroupsRequestOrderBy) String() string {
|
||||
|
|
@ -189,9 +212,13 @@ func (enum *ListGroupsRequestOrderBy) UnmarshalJSON(data []byte) error {
|
|||
type ListJWTsRequestOrderBy string
|
||||
|
||||
const (
|
||||
ListJWTsRequestOrderByCreatedAtAsc = ListJWTsRequestOrderBy("created_at_asc")
|
||||
// Creation date ascending
|
||||
ListJWTsRequestOrderByCreatedAtAsc = ListJWTsRequestOrderBy("created_at_asc")
|
||||
// Creation date descending
|
||||
ListJWTsRequestOrderByCreatedAtDesc = ListJWTsRequestOrderBy("created_at_desc")
|
||||
ListJWTsRequestOrderByUpdatedAtAsc = ListJWTsRequestOrderBy("updated_at_asc")
|
||||
// Update date ascending
|
||||
ListJWTsRequestOrderByUpdatedAtAsc = ListJWTsRequestOrderBy("updated_at_asc")
|
||||
// Update date descending
|
||||
ListJWTsRequestOrderByUpdatedAtDesc = ListJWTsRequestOrderBy("updated_at_desc")
|
||||
)
|
||||
|
||||
|
|
@ -221,9 +248,13 @@ func (enum *ListJWTsRequestOrderBy) UnmarshalJSON(data []byte) error {
|
|||
type ListPermissionSetsRequestOrderBy string
|
||||
|
||||
const (
|
||||
ListPermissionSetsRequestOrderByNameAsc = ListPermissionSetsRequestOrderBy("name_asc")
|
||||
ListPermissionSetsRequestOrderByNameDesc = ListPermissionSetsRequestOrderBy("name_desc")
|
||||
ListPermissionSetsRequestOrderByCreatedAtAsc = ListPermissionSetsRequestOrderBy("created_at_asc")
|
||||
// Name ascending
|
||||
ListPermissionSetsRequestOrderByNameAsc = ListPermissionSetsRequestOrderBy("name_asc")
|
||||
// Name descending
|
||||
ListPermissionSetsRequestOrderByNameDesc = ListPermissionSetsRequestOrderBy("name_desc")
|
||||
// Creation date ascending
|
||||
ListPermissionSetsRequestOrderByCreatedAtAsc = ListPermissionSetsRequestOrderBy("created_at_asc")
|
||||
// Creation date descending
|
||||
ListPermissionSetsRequestOrderByCreatedAtDesc = ListPermissionSetsRequestOrderBy("created_at_desc")
|
||||
)
|
||||
|
||||
|
|
@ -253,10 +284,14 @@ func (enum *ListPermissionSetsRequestOrderBy) UnmarshalJSON(data []byte) error {
|
|||
type ListPoliciesRequestOrderBy string
|
||||
|
||||
const (
|
||||
ListPoliciesRequestOrderByPolicyNameAsc = ListPoliciesRequestOrderBy("policy_name_asc")
|
||||
// Policy name ascending
|
||||
ListPoliciesRequestOrderByPolicyNameAsc = ListPoliciesRequestOrderBy("policy_name_asc")
|
||||
// Policy name descending
|
||||
ListPoliciesRequestOrderByPolicyNameDesc = ListPoliciesRequestOrderBy("policy_name_desc")
|
||||
ListPoliciesRequestOrderByCreatedAtAsc = ListPoliciesRequestOrderBy("created_at_asc")
|
||||
ListPoliciesRequestOrderByCreatedAtDesc = ListPoliciesRequestOrderBy("created_at_desc")
|
||||
// Creation date ascending
|
||||
ListPoliciesRequestOrderByCreatedAtAsc = ListPoliciesRequestOrderBy("created_at_asc")
|
||||
// Creation date descending
|
||||
ListPoliciesRequestOrderByCreatedAtDesc = ListPoliciesRequestOrderBy("created_at_desc")
|
||||
)
|
||||
|
||||
func (enum ListPoliciesRequestOrderBy) String() string {
|
||||
|
|
@ -285,7 +320,9 @@ func (enum *ListPoliciesRequestOrderBy) UnmarshalJSON(data []byte) error {
|
|||
type ListQuotaRequestOrderBy string
|
||||
|
||||
const (
|
||||
ListQuotaRequestOrderByNameAsc = ListQuotaRequestOrderBy("name_asc")
|
||||
// Name ascending
|
||||
ListQuotaRequestOrderByNameAsc = ListQuotaRequestOrderBy("name_asc")
|
||||
// Name descending
|
||||
ListQuotaRequestOrderByNameDesc = ListQuotaRequestOrderBy("name_desc")
|
||||
)
|
||||
|
||||
|
|
@ -315,12 +352,18 @@ func (enum *ListQuotaRequestOrderBy) UnmarshalJSON(data []byte) error {
|
|||
type ListSSHKeysRequestOrderBy string
|
||||
|
||||
const (
|
||||
ListSSHKeysRequestOrderByCreatedAtAsc = ListSSHKeysRequestOrderBy("created_at_asc")
|
||||
// Creation date ascending
|
||||
ListSSHKeysRequestOrderByCreatedAtAsc = ListSSHKeysRequestOrderBy("created_at_asc")
|
||||
// Creation date descending
|
||||
ListSSHKeysRequestOrderByCreatedAtDesc = ListSSHKeysRequestOrderBy("created_at_desc")
|
||||
ListSSHKeysRequestOrderByUpdatedAtAsc = ListSSHKeysRequestOrderBy("updated_at_asc")
|
||||
// Update date ascending
|
||||
ListSSHKeysRequestOrderByUpdatedAtAsc = ListSSHKeysRequestOrderBy("updated_at_asc")
|
||||
// Update date descending
|
||||
ListSSHKeysRequestOrderByUpdatedAtDesc = ListSSHKeysRequestOrderBy("updated_at_desc")
|
||||
ListSSHKeysRequestOrderByNameAsc = ListSSHKeysRequestOrderBy("name_asc")
|
||||
ListSSHKeysRequestOrderByNameDesc = ListSSHKeysRequestOrderBy("name_desc")
|
||||
// Name ascending
|
||||
ListSSHKeysRequestOrderByNameAsc = ListSSHKeysRequestOrderBy("name_asc")
|
||||
// Name descending
|
||||
ListSSHKeysRequestOrderByNameDesc = ListSSHKeysRequestOrderBy("name_desc")
|
||||
)
|
||||
|
||||
func (enum ListSSHKeysRequestOrderBy) String() string {
|
||||
|
|
@ -349,13 +392,21 @@ func (enum *ListSSHKeysRequestOrderBy) UnmarshalJSON(data []byte) error {
|
|||
type ListUsersRequestOrderBy string
|
||||
|
||||
const (
|
||||
ListUsersRequestOrderByCreatedAtAsc = ListUsersRequestOrderBy("created_at_asc")
|
||||
// Creation date ascending
|
||||
ListUsersRequestOrderByCreatedAtAsc = ListUsersRequestOrderBy("created_at_asc")
|
||||
// Creation date descending
|
||||
ListUsersRequestOrderByCreatedAtDesc = ListUsersRequestOrderBy("created_at_desc")
|
||||
ListUsersRequestOrderByUpdatedAtAsc = ListUsersRequestOrderBy("updated_at_asc")
|
||||
// Update date ascending
|
||||
ListUsersRequestOrderByUpdatedAtAsc = ListUsersRequestOrderBy("updated_at_asc")
|
||||
// Update date descending
|
||||
ListUsersRequestOrderByUpdatedAtDesc = ListUsersRequestOrderBy("updated_at_desc")
|
||||
ListUsersRequestOrderByEmailAsc = ListUsersRequestOrderBy("email_asc")
|
||||
ListUsersRequestOrderByEmailDesc = ListUsersRequestOrderBy("email_desc")
|
||||
ListUsersRequestOrderByLastLoginAsc = ListUsersRequestOrderBy("last_login_asc")
|
||||
// Email ascending
|
||||
ListUsersRequestOrderByEmailAsc = ListUsersRequestOrderBy("email_asc")
|
||||
// Email descending
|
||||
ListUsersRequestOrderByEmailDesc = ListUsersRequestOrderBy("email_desc")
|
||||
// Last login ascending
|
||||
ListUsersRequestOrderByLastLoginAsc = ListUsersRequestOrderBy("last_login_asc")
|
||||
// Last login descending
|
||||
ListUsersRequestOrderByLastLoginDesc = ListUsersRequestOrderBy("last_login_desc")
|
||||
)
|
||||
|
||||
|
|
@ -385,10 +436,14 @@ func (enum *ListUsersRequestOrderBy) UnmarshalJSON(data []byte) error {
|
|||
type PermissionSetScopeType string
|
||||
|
||||
const (
|
||||
// Unknown scope type
|
||||
PermissionSetScopeTypeUnknownScopeType = PermissionSetScopeType("unknown_scope_type")
|
||||
PermissionSetScopeTypeProjects = PermissionSetScopeType("projects")
|
||||
PermissionSetScopeTypeOrganization = PermissionSetScopeType("organization")
|
||||
PermissionSetScopeTypeAccountRootUser = PermissionSetScopeType("account_root_user")
|
||||
// Projects
|
||||
PermissionSetScopeTypeProjects = PermissionSetScopeType("projects")
|
||||
// Organization
|
||||
PermissionSetScopeTypeOrganization = PermissionSetScopeType("organization")
|
||||
// Account root user
|
||||
PermissionSetScopeTypeAccountRootUser = PermissionSetScopeType("account_root_user")
|
||||
)
|
||||
|
||||
func (enum PermissionSetScopeType) String() string {
|
||||
|
|
@ -417,9 +472,12 @@ func (enum *PermissionSetScopeType) UnmarshalJSON(data []byte) error {
|
|||
type UserStatus string
|
||||
|
||||
const (
|
||||
UserStatusUnknownStatus = UserStatus("unknown_status")
|
||||
// Unknown status
|
||||
UserStatusUnknownStatus = UserStatus("unknown_status")
|
||||
// Invitation pending
|
||||
UserStatusInvitationPending = UserStatus("invitation_pending")
|
||||
UserStatusActivated = UserStatus("activated")
|
||||
// Activated
|
||||
UserStatusActivated = UserStatus("activated")
|
||||
)
|
||||
|
||||
func (enum UserStatus) String() string {
|
||||
|
|
@ -448,9 +506,12 @@ func (enum *UserStatus) UnmarshalJSON(data []byte) error {
|
|||
type UserType string
|
||||
|
||||
const (
|
||||
// Unknown type
|
||||
UserTypeUnknownType = UserType("unknown_type")
|
||||
UserTypeGuest = UserType("guest")
|
||||
UserTypeOwner = UserType("owner")
|
||||
// Guest
|
||||
UserTypeGuest = UserType("guest")
|
||||
// Owner
|
||||
UserTypeOwner = UserType("owner")
|
||||
)
|
||||
|
||||
func (enum UserType) String() string {
|
||||
|
|
|
|||
|
|
@ -112,6 +112,71 @@ func (enum *BootType) UnmarshalJSON(data []byte) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
type IPState string
|
||||
|
||||
const (
|
||||
IPStateUnknownState = IPState("unknown_state")
|
||||
IPStateDetached = IPState("detached")
|
||||
IPStateAttached = IPState("attached")
|
||||
IPStatePending = IPState("pending")
|
||||
IPStateError = IPState("error")
|
||||
)
|
||||
|
||||
func (enum IPState) String() string {
|
||||
if enum == "" {
|
||||
// return default value if empty
|
||||
return "unknown_state"
|
||||
}
|
||||
return string(enum)
|
||||
}
|
||||
|
||||
func (enum IPState) MarshalJSON() ([]byte, error) {
|
||||
return []byte(fmt.Sprintf(`"%s"`, enum)), nil
|
||||
}
|
||||
|
||||
func (enum *IPState) UnmarshalJSON(data []byte) error {
|
||||
tmp := ""
|
||||
|
||||
if err := json.Unmarshal(data, &tmp); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*enum = IPState(IPState(tmp).String())
|
||||
return nil
|
||||
}
|
||||
|
||||
type IPType string
|
||||
|
||||
const (
|
||||
IPTypeUnknownIptype = IPType("unknown_iptype")
|
||||
IPTypeNat = IPType("nat")
|
||||
IPTypeRoutedIPv4 = IPType("routed_ipv4")
|
||||
IPTypeRoutedIPv6 = IPType("routed_ipv6")
|
||||
)
|
||||
|
||||
func (enum IPType) String() string {
|
||||
if enum == "" {
|
||||
// return default value if empty
|
||||
return "unknown_iptype"
|
||||
}
|
||||
return string(enum)
|
||||
}
|
||||
|
||||
func (enum IPType) MarshalJSON() ([]byte, error) {
|
||||
return []byte(fmt.Sprintf(`"%s"`, enum)), nil
|
||||
}
|
||||
|
||||
func (enum *IPType) UnmarshalJSON(data []byte) error {
|
||||
tmp := ""
|
||||
|
||||
if err := json.Unmarshal(data, &tmp); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*enum = IPType(IPType(tmp).String())
|
||||
return nil
|
||||
}
|
||||
|
||||
type ImageState string
|
||||
|
||||
const (
|
||||
|
|
@ -453,6 +518,67 @@ func (enum *ServerAction) UnmarshalJSON(data []byte) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
type ServerIPIPFamily string
|
||||
|
||||
const (
|
||||
ServerIPIPFamilyInet = ServerIPIPFamily("inet")
|
||||
ServerIPIPFamilyInet6 = ServerIPIPFamily("inet6")
|
||||
)
|
||||
|
||||
func (enum ServerIPIPFamily) String() string {
|
||||
if enum == "" {
|
||||
// return default value if empty
|
||||
return "inet"
|
||||
}
|
||||
return string(enum)
|
||||
}
|
||||
|
||||
func (enum ServerIPIPFamily) MarshalJSON() ([]byte, error) {
|
||||
return []byte(fmt.Sprintf(`"%s"`, enum)), nil
|
||||
}
|
||||
|
||||
func (enum *ServerIPIPFamily) UnmarshalJSON(data []byte) error {
|
||||
tmp := ""
|
||||
|
||||
if err := json.Unmarshal(data, &tmp); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*enum = ServerIPIPFamily(ServerIPIPFamily(tmp).String())
|
||||
return nil
|
||||
}
|
||||
|
||||
type ServerIPProvisioningMode string
|
||||
|
||||
const (
|
||||
ServerIPProvisioningModeManual = ServerIPProvisioningMode("manual")
|
||||
ServerIPProvisioningModeDHCP = ServerIPProvisioningMode("dhcp")
|
||||
ServerIPProvisioningModeSlaac = ServerIPProvisioningMode("slaac")
|
||||
)
|
||||
|
||||
func (enum ServerIPProvisioningMode) String() string {
|
||||
if enum == "" {
|
||||
// return default value if empty
|
||||
return "manual"
|
||||
}
|
||||
return string(enum)
|
||||
}
|
||||
|
||||
func (enum ServerIPProvisioningMode) MarshalJSON() ([]byte, error) {
|
||||
return []byte(fmt.Sprintf(`"%s"`, enum)), nil
|
||||
}
|
||||
|
||||
func (enum *ServerIPProvisioningMode) UnmarshalJSON(data []byte) error {
|
||||
tmp := ""
|
||||
|
||||
if err := json.Unmarshal(data, &tmp); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*enum = ServerIPProvisioningMode(ServerIPProvisioningMode(tmp).String())
|
||||
return nil
|
||||
}
|
||||
|
||||
type ServerState string
|
||||
|
||||
const (
|
||||
|
|
@ -893,8 +1019,12 @@ type GetServerResponse struct {
|
|||
Server *Server `json:"server"`
|
||||
}
|
||||
|
||||
// GetServerTypesAvailabilityResponse: get server types availability response.
|
||||
type GetServerTypesAvailabilityResponse struct {
|
||||
// Servers: map of server types.
|
||||
Servers map[string]*GetServerTypesAvailabilityResponseAvailability `json:"servers"`
|
||||
|
||||
TotalCount uint32 `json:"total_count"`
|
||||
}
|
||||
|
||||
type GetServerTypesAvailabilityResponseAvailability struct {
|
||||
|
|
@ -924,6 +1054,12 @@ type IP struct {
|
|||
Tags []string `json:"tags"`
|
||||
|
||||
Project string `json:"project"`
|
||||
// Type: default value: unknown_iptype
|
||||
Type IPType `json:"type"`
|
||||
// State: default value: unknown_state
|
||||
State IPState `json:"state"`
|
||||
|
||||
Prefix scw.IPNet `json:"prefix"`
|
||||
|
||||
Zone scw.Zone `json:"zone"`
|
||||
}
|
||||
|
|
@ -1212,8 +1348,10 @@ type Server struct {
|
|||
CommercialType string `json:"commercial_type"`
|
||||
// CreationDate: instance creation date.
|
||||
CreationDate *time.Time `json:"creation_date"`
|
||||
// DynamicIPRequired: true if a dynamic IP is required.
|
||||
// DynamicIPRequired: true if a dynamic IPv4 is required.
|
||||
DynamicIPRequired bool `json:"dynamic_ip_required"`
|
||||
// RoutedIPEnabled: true to configure the instance so it uses the new routed IP mode.
|
||||
RoutedIPEnabled bool `json:"routed_ip_enabled"`
|
||||
// EnableIPv6: true if IPv6 is enabled.
|
||||
EnableIPv6 bool `json:"enable_ipv6"`
|
||||
// Hostname: instance host name.
|
||||
|
|
@ -1226,6 +1364,10 @@ type Server struct {
|
|||
PrivateIP *string `json:"private_ip"`
|
||||
// PublicIP: information about the public IP.
|
||||
PublicIP *ServerIP `json:"public_ip"`
|
||||
// PublicIPs: information about all the public IPs attached to the server.
|
||||
PublicIPs []*ServerIP `json:"public_ips"`
|
||||
// MacAddress: the server's MAC address.
|
||||
MacAddress string `json:"mac_address"`
|
||||
// ModificationDate: instance modification date.
|
||||
ModificationDate *time.Time `json:"modification_date"`
|
||||
// State: instance state.
|
||||
|
|
@ -1275,11 +1417,21 @@ type ServerActionResponse struct {
|
|||
// ServerIP: server. ip.
|
||||
type ServerIP struct {
|
||||
// ID: unique ID of the IP address.
|
||||
ID string `json:"id"`
|
||||
// Address: instance public IPv4 IP-Address.
|
||||
Address net.IP `json:"address"`
|
||||
ID string `json:"id,omitempty"`
|
||||
// Address: instance's public IP-Address.
|
||||
Address net.IP `json:"address,omitempty"`
|
||||
// Gateway: gateway's IP address.
|
||||
Gateway net.IP `json:"gateway,omitempty"`
|
||||
// Netmask: cIDR netmask.
|
||||
Netmask string `json:"netmask,omitempty"`
|
||||
// Family: IP address family (inet or inet6).
|
||||
// Default value: inet
|
||||
Family ServerIPIPFamily `json:"family,omitempty"`
|
||||
// Dynamic: true if the IP address is dynamic.
|
||||
Dynamic bool `json:"dynamic"`
|
||||
Dynamic bool `json:"dynamic,omitempty"`
|
||||
// ProvisioningMode: information about this address provisioning mode.
|
||||
// Default value: manual
|
||||
ProvisioningMode ServerIPProvisioningMode `json:"provisioning_mode,omitempty"`
|
||||
}
|
||||
|
||||
// ServerIPv6: server. ipv6.
|
||||
|
|
@ -1574,23 +1726,23 @@ type VolumeServer struct {
|
|||
// VolumeServerTemplate: volume server template.
|
||||
type VolumeServerTemplate struct {
|
||||
// ID: UUID of the volume.
|
||||
ID string `json:"id,omitempty"`
|
||||
ID *string `json:"id,omitempty"`
|
||||
// Boot: force the Instance to boot on this volume.
|
||||
// Default value: false
|
||||
Boot bool `json:"boot,omitempty"`
|
||||
Boot *bool `json:"boot,omitempty"`
|
||||
// Name: name of the volume.
|
||||
Name string `json:"name,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
// Size: disk size of the volume, must be a multiple of 512.
|
||||
Size scw.Size `json:"size,omitempty"`
|
||||
Size *scw.Size `json:"size,omitempty"`
|
||||
// VolumeType: type of the volume.
|
||||
// Default value: l_ssd
|
||||
VolumeType VolumeVolumeType `json:"volume_type,omitempty"`
|
||||
// BaseSnapshot: ID of the snapshot on which this volume will be based.
|
||||
BaseSnapshot string `json:"base_snapshot,omitempty"`
|
||||
BaseSnapshot *string `json:"base_snapshot,omitempty"`
|
||||
// Organization: organization ID of the volume.
|
||||
Organization string `json:"organization,omitempty"`
|
||||
Organization *string `json:"organization,omitempty"`
|
||||
// Project: project ID of the volume.
|
||||
Project string `json:"project,omitempty"`
|
||||
Project *string `json:"project,omitempty"`
|
||||
}
|
||||
|
||||
type VolumeSummary struct {
|
||||
|
|
@ -1669,15 +1821,16 @@ type setSnapshotResponse struct {
|
|||
|
||||
// Zones list localities the api is available in
|
||||
func (s *API) Zones() []scw.Zone {
|
||||
return []scw.Zone{scw.ZoneFrPar1, scw.ZoneFrPar2, scw.ZoneFrPar3, scw.ZoneNlAms1, scw.ZoneNlAms2, scw.ZonePlWaw1, scw.ZonePlWaw2}
|
||||
return []scw.Zone{scw.ZoneFrPar1, scw.ZoneFrPar2, scw.ZoneFrPar3, scw.ZoneNlAms1, scw.ZoneNlAms2, scw.ZoneNlAms3, scw.ZonePlWaw1, scw.ZonePlWaw2}
|
||||
}
|
||||
|
||||
type GetServerTypesAvailabilityRequest 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.
|
||||
// Default value: 50
|
||||
PerPage *uint32 `json:"-"`
|
||||
|
||||
// Page: a positive integer to choose the page to return.
|
||||
Page *int32 `json:"-"`
|
||||
}
|
||||
|
||||
|
|
@ -1904,8 +2057,10 @@ type CreateServerRequest struct {
|
|||
Zone scw.Zone `json:"-"`
|
||||
// Name: instance name.
|
||||
Name string `json:"name,omitempty"`
|
||||
// DynamicIPRequired: define if a dynamic IP is required for the Instance.
|
||||
// DynamicIPRequired: define if a dynamic IPv4 is required for the Instance.
|
||||
DynamicIPRequired *bool `json:"dynamic_ip_required,omitempty"`
|
||||
// RoutedIPEnabled: if true, configure the Instance so it uses the new routed IP mode.
|
||||
RoutedIPEnabled *bool `json:"routed_ip_enabled,omitempty"`
|
||||
// CommercialType: define the Instance commercial type (i.e. GP1-S).
|
||||
CommercialType string `json:"commercial_type,omitempty"`
|
||||
// Image: instance image ID or label.
|
||||
|
|
@ -1914,8 +2069,10 @@ type CreateServerRequest struct {
|
|||
Volumes map[string]*VolumeServerTemplate `json:"volumes,omitempty"`
|
||||
// EnableIPv6: true if IPv6 is enabled on the server.
|
||||
EnableIPv6 bool `json:"enable_ipv6,omitempty"`
|
||||
// PublicIP: ID of the reserved IP to attach to the server.
|
||||
// PublicIP: ID of the reserved IP to attach to the Instance.
|
||||
PublicIP *string `json:"public_ip,omitempty"`
|
||||
// PublicIPs: a list of reserved IP IDs to attach to the Instance.
|
||||
PublicIPs []*string `json:"public_ips,omitempty"`
|
||||
// BootType: boot type to use.
|
||||
// Default value: local
|
||||
BootType *BootType `json:"boot_type,omitempty"`
|
||||
|
|
@ -2081,8 +2238,10 @@ type setServerRequest struct {
|
|||
CommercialType string `json:"commercial_type"`
|
||||
// CreationDate: instance creation date.
|
||||
CreationDate *time.Time `json:"creation_date"`
|
||||
// DynamicIPRequired: true if a dynamic IP is required.
|
||||
// DynamicIPRequired: true if a dynamic IPv4 is required.
|
||||
DynamicIPRequired bool `json:"dynamic_ip_required"`
|
||||
// RoutedIPEnabled: true to configure the instance so it uses the new routed IP mode (once this is set to True you cannot set it back to False).
|
||||
RoutedIPEnabled *bool `json:"routed_ip_enabled"`
|
||||
// EnableIPv6: true if IPv6 is enabled.
|
||||
EnableIPv6 bool `json:"enable_ipv6"`
|
||||
// Hostname: instance host name.
|
||||
|
|
@ -2095,6 +2254,8 @@ type setServerRequest struct {
|
|||
PrivateIP *string `json:"private_ip"`
|
||||
// PublicIP: information about the public IP.
|
||||
PublicIP *ServerIP `json:"public_ip"`
|
||||
// PublicIPs: information about all the public IPs attached to the server.
|
||||
PublicIPs []*ServerIP `json:"public_ips"`
|
||||
// ModificationDate: instance modification date.
|
||||
ModificationDate *time.Time `json:"modification_date"`
|
||||
// State: instance state.
|
||||
|
|
@ -2189,6 +2350,10 @@ type UpdateServerRequest struct {
|
|||
Bootscript *string `json:"bootscript,omitempty"`
|
||||
|
||||
DynamicIPRequired *bool `json:"dynamic_ip_required,omitempty"`
|
||||
// RoutedIPEnabled: true to configure the instance so it uses the new routed IP mode (once this is set to True you cannot set it back to False).
|
||||
RoutedIPEnabled *bool `json:"routed_ip_enabled,omitempty"`
|
||||
|
||||
PublicIPs []*ServerIP `json:"public_ips,omitempty"`
|
||||
|
||||
EnableIPv6 *bool `json:"enable_ipv6,omitempty"`
|
||||
|
||||
|
|
@ -2199,6 +2364,12 @@ type UpdateServerRequest struct {
|
|||
PlacementGroup *NullableStringValue `json:"placement_group,omitempty"`
|
||||
// PrivateNics: instance private NICs.
|
||||
PrivateNics []*PrivateNIC `json:"private_nics,omitempty"`
|
||||
// CommercialType: set the commercial_type for this Instance.
|
||||
// Warning: This field has some restrictions:
|
||||
// - Cannot be changed if the Instance is not in `stopped` state.
|
||||
// - Cannot be changed if the Instance is in a placement group.
|
||||
// - Local storage requirements of the target commercial_types must be fulfilled (i.e. if an Instance has 80GB of local storage, it can be changed into a GP1-XS, which has a maximum of 150GB, but it cannot be changed into a DEV1-S, which has only 20GB).
|
||||
CommercialType *string `json:"commercial_type,omitempty"`
|
||||
}
|
||||
|
||||
// updateServer: update an Instance.
|
||||
|
|
@ -2306,6 +2477,7 @@ type ServerActionRequest struct {
|
|||
// * `reboot`: Stop the instance and restart it.
|
||||
// * `backup`: Create an image with all the volumes of an Instance.
|
||||
// * `terminate`: Delete the Instance along with all attached volumes.
|
||||
// * `enable_routed_ip`: Migrate the Instance to the new network stack.
|
||||
//
|
||||
// Keep in mind that terminating an Instance will result in the deletion of all attached volumes, including local and block storage.
|
||||
// If you want to preserve your local volumes, you should use the `archive` action instead of `terminate`. Similarly, if you want to keep your block storage volumes, you must first detach them before issuing the `terminate` command.
|
||||
|
|
@ -4550,6 +4722,9 @@ type CreateIPRequest struct {
|
|||
Tags []string `json:"tags,omitempty"`
|
||||
// Server: UUID of the Instance you want to attach the IP to.
|
||||
Server *string `json:"server,omitempty"`
|
||||
// Type: IP type to reserve (either 'nat', 'routed_ipv4' or 'routed_ipv6').
|
||||
// Default value: unknown_iptype
|
||||
Type IPType `json:"type"`
|
||||
}
|
||||
|
||||
// CreateIP: reserve a flexible IP.
|
||||
|
|
@ -4643,6 +4818,9 @@ type UpdateIPRequest struct {
|
|||
IP string `json:"-"`
|
||||
// Reverse: reverse domain name.
|
||||
Reverse *NullableStringValue `json:"reverse,omitempty"`
|
||||
// Type: convert a 'nat' IP to a 'routed_ipv4'.
|
||||
// Default value: unknown_iptype
|
||||
Type IPType `json:"type"`
|
||||
// Tags: an array of keywords you want to tag this IP with.
|
||||
Tags *[]string `json:"tags,omitempty"`
|
||||
|
||||
|
|
@ -4794,6 +4972,8 @@ type CreatePrivateNICRequest struct {
|
|||
PrivateNetworkID string `json:"private_network_id,omitempty"`
|
||||
// Tags: private NIC tags.
|
||||
Tags []string `json:"tags,omitempty"`
|
||||
// IPIDs: ip_ids defined from IPAM.
|
||||
IPIDs []string `json:"ip_ids,omitempty"`
|
||||
}
|
||||
|
||||
// CreatePrivateNIC: create a private NIC connecting an Instance to a Private Network.
|
||||
|
|
|
|||
|
|
@ -3,10 +3,11 @@ package instance
|
|||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/scaleway/scaleway-sdk-go/internal/async"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/scaleway/scaleway-sdk-go/internal/async"
|
||||
|
||||
"github.com/scaleway/scaleway-sdk-go/internal/errors"
|
||||
"github.com/scaleway/scaleway-sdk-go/scw"
|
||||
)
|
||||
|
|
@ -109,8 +110,8 @@ func volumesToVolumeTemplates(volumes map[string]*VolumeServer) map[string]*Volu
|
|||
volumeTemplates := map[string]*VolumeServerTemplate{}
|
||||
for key, volume := range volumes {
|
||||
volumeTemplates[key] = &VolumeServerTemplate{
|
||||
ID: volume.ID,
|
||||
Name: volume.Name,
|
||||
ID: &volume.ID,
|
||||
Name: &volume.Name,
|
||||
}
|
||||
}
|
||||
return volumeTemplates
|
||||
|
|
@ -142,9 +143,9 @@ func (s *API) AttachVolume(req *AttachVolumeRequest, opts ...scw.RequestOption)
|
|||
key := fmt.Sprintf("%d", i)
|
||||
if _, ok := newVolumes[key]; !ok {
|
||||
newVolumes[key] = &VolumeServerTemplate{
|
||||
ID: req.VolumeID,
|
||||
ID: &req.VolumeID,
|
||||
// name is ignored on this PATCH
|
||||
Name: req.VolumeID,
|
||||
Name: &req.VolumeID,
|
||||
}
|
||||
found = true
|
||||
break
|
||||
|
|
@ -429,3 +430,35 @@ func (s *API) WaitForMACAddress(req *WaitForMACAddressRequest, opts ...scw.Reque
|
|||
}
|
||||
return pn.(*PrivateNIC), nil
|
||||
}
|
||||
|
||||
// UnsafeSetTotalCount should not be used
|
||||
// Internal usage only
|
||||
func (r *GetServerTypesAvailabilityResponse) UnsafeSetTotalCount(totalCount int) {
|
||||
r.TotalCount = uint32(totalCount)
|
||||
}
|
||||
|
||||
// UnsafeGetTotalCount should not be used
|
||||
// Internal usage only
|
||||
func (r *GetServerTypesAvailabilityResponse) UnsafeGetTotalCount() uint32 {
|
||||
return r.TotalCount
|
||||
}
|
||||
|
||||
// UnsafeAppend should not be used
|
||||
// Internal usage only
|
||||
func (r *GetServerTypesAvailabilityResponse) UnsafeAppend(res interface{}) (uint32, error) {
|
||||
results, ok := res.(*GetServerTypesAvailabilityResponse)
|
||||
if !ok {
|
||||
return 0, errors.New("%T type cannot be appended to type %T", res, r)
|
||||
}
|
||||
|
||||
if r.Servers == nil {
|
||||
r.Servers = make(map[string]*GetServerTypesAvailabilityResponseAvailability, len(results.Servers))
|
||||
}
|
||||
|
||||
for name, serverTypeAvailability := range results.Servers {
|
||||
r.Servers[name] = serverTypeAvailability
|
||||
}
|
||||
|
||||
r.TotalCount += uint32(len(results.Servers))
|
||||
return uint32(len(results.Servers)), nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -900,7 +900,7 @@ type ACLActionRedirect struct {
|
|||
// Type: redirect type.
|
||||
// Default value: location
|
||||
Type ACLActionRedirectRedirectType `json:"type"`
|
||||
// Target: redirect target. For a location redirect, you can use a URL e.g. `https://scaleway.com`. Using a scheme name (e.g. `https`, `http`, `ftp`, `git`) will replace the request's original scheme. This can be useful to implement HTTP to HTTPS redirects. Valid placeholders that can be used in a `location` redirect to preserve parts of the original request in the redirection URL are {{ host }}, {{ query }}, {{ path }} and {{ scheme }}.
|
||||
// Target: redirect target. For a location redirect, you can use a URL e.g. `https://scaleway.com`. Using a scheme name (e.g. `https`, `http`, `ftp`, `git`) will replace the request's original scheme. This can be useful to implement HTTP to HTTPS redirects. Valid placeholders that can be used in a `location` redirect to preserve parts of the original request in the redirection URL are \{\{host\}\}, \{\{query\}\}, \{\{path\}\} and \{\{scheme\}\}.
|
||||
Target string `json:"target"`
|
||||
// Code: HTTP redirect code to use. Valid values are 301, 302, 303, 307 and 308. Default value is 302.
|
||||
Code *int32 `json:"code"`
|
||||
|
|
@ -1589,7 +1589,7 @@ type SubscriberWebhookConfig struct {
|
|||
|
||||
// Zones list localities the api is available in
|
||||
func (s *ZonedAPI) Zones() []scw.Zone {
|
||||
return []scw.Zone{scw.ZoneFrPar1, scw.ZoneFrPar2, scw.ZoneNlAms1, scw.ZoneNlAms2, scw.ZonePlWaw1, scw.ZonePlWaw2}
|
||||
return []scw.Zone{scw.ZoneFrPar1, scw.ZoneFrPar2, scw.ZoneNlAms1, scw.ZoneNlAms2, scw.ZoneNlAms3, scw.ZonePlWaw1, scw.ZonePlWaw2}
|
||||
}
|
||||
|
||||
type ZonedAPIListLBsRequest struct {
|
||||
|
|
@ -1666,8 +1666,10 @@ type ZonedAPICreateLBRequest struct {
|
|||
Name string `json:"name"`
|
||||
// Description: description for the Load Balancer.
|
||||
Description string `json:"description"`
|
||||
// IPID: ID of an existing flexible IP address to attach to the Load Balancer.
|
||||
IPID *string `json:"ip_id"`
|
||||
// Deprecated: IPID: ID of an existing flexible IP address to attach to the Load Balancer.
|
||||
IPID *string `json:"ip_id,omitempty"`
|
||||
// AssignFlexibleIP: defines whether to automatically assign a flexible public IP to lb. Default value is `false` (do not assign).
|
||||
AssignFlexibleIP *bool `json:"assign_flexible_ip"`
|
||||
// Tags: list of tags for the Load Balancer.
|
||||
Tags []string `json:"tags"`
|
||||
// Type: load Balancer commercial offer type. Use the Load Balancer types endpoint to retrieve a list of available offer types.
|
||||
|
|
@ -3373,6 +3375,8 @@ type ZonedAPIGetLBStatsRequest struct {
|
|||
Zone scw.Zone `json:"-"`
|
||||
// LBID: load Balancer ID.
|
||||
LBID string `json:"-"`
|
||||
// BackendID: ID of the backend.
|
||||
BackendID *string `json:"-"`
|
||||
}
|
||||
|
||||
// Deprecated: GetLBStats: get usage statistics of a given Load Balancer.
|
||||
|
|
@ -3384,6 +3388,9 @@ func (s *ZonedAPI) GetLBStats(req *ZonedAPIGetLBStatsRequest, opts ...scw.Reques
|
|||
req.Zone = defaultZone
|
||||
}
|
||||
|
||||
query := url.Values{}
|
||||
parameter.AddToQuery(query, "backend_id", req.BackendID)
|
||||
|
||||
if fmt.Sprint(req.Zone) == "" {
|
||||
return nil, errors.New("field Zone cannot be empty in request")
|
||||
}
|
||||
|
|
@ -3395,6 +3402,7 @@ func (s *ZonedAPI) GetLBStats(req *ZonedAPIGetLBStatsRequest, opts ...scw.Reques
|
|||
scwReq := &scw.ScalewayRequest{
|
||||
Method: "GET",
|
||||
Path: "/lb/v1/zones/" + fmt.Sprint(req.Zone) + "/lbs/" + fmt.Sprint(req.LBID) + "/stats",
|
||||
Query: query,
|
||||
Headers: http.Header{},
|
||||
}
|
||||
|
||||
|
|
@ -3416,6 +3424,8 @@ type ZonedAPIListBackendStatsRequest struct {
|
|||
Page *int32 `json:"-"`
|
||||
// PageSize: number of items to return.
|
||||
PageSize *uint32 `json:"-"`
|
||||
// BackendID: ID of the backend.
|
||||
BackendID *string `json:"-"`
|
||||
}
|
||||
|
||||
// ListBackendStats: list backend server statistics.
|
||||
|
|
@ -3436,6 +3446,7 @@ func (s *ZonedAPI) ListBackendStats(req *ZonedAPIListBackendStatsRequest, opts .
|
|||
query := url.Values{}
|
||||
parameter.AddToQuery(query, "page", req.Page)
|
||||
parameter.AddToQuery(query, "page_size", req.PageSize)
|
||||
parameter.AddToQuery(query, "backend_id", req.BackendID)
|
||||
|
||||
if fmt.Sprint(req.Zone) == "" {
|
||||
return nil, errors.New("field Zone cannot be empty in request")
|
||||
|
|
@ -4641,8 +4652,10 @@ type CreateLBRequest struct {
|
|||
Name string `json:"name"`
|
||||
// Description: description for the Load Balancer.
|
||||
Description string `json:"description"`
|
||||
// IPID: ID of an existing flexible IP address to attach to the Load Balancer.
|
||||
IPID *string `json:"ip_id"`
|
||||
// Deprecated: IPID: ID of an existing flexible IP address to attach to the Load Balancer.
|
||||
IPID *string `json:"ip_id,omitempty"`
|
||||
// AssignFlexibleIP: defines whether to automatically assign a flexible public IP to lb. Default value is `false` (do not assign).
|
||||
AssignFlexibleIP *bool `json:"assign_flexible_ip"`
|
||||
// Tags: list of tags for the Load Balancer.
|
||||
Tags []string `json:"tags"`
|
||||
// Type: load Balancer commercial offer type. Use the Load Balancer types endpoint to retrieve a list of available offer types.
|
||||
|
|
@ -6319,6 +6332,8 @@ type GetLBStatsRequest struct {
|
|||
Region scw.Region `json:"-"`
|
||||
// LBID: load Balancer ID.
|
||||
LBID string `json:"-"`
|
||||
// BackendID: ID of the backend.
|
||||
BackendID *string `json:"-"`
|
||||
}
|
||||
|
||||
// Deprecated: GetLBStats: get usage statistics of a given load balancer.
|
||||
|
|
@ -6330,6 +6345,9 @@ func (s *API) GetLBStats(req *GetLBStatsRequest, opts ...scw.RequestOption) (*LB
|
|||
req.Region = defaultRegion
|
||||
}
|
||||
|
||||
query := url.Values{}
|
||||
parameter.AddToQuery(query, "backend_id", req.BackendID)
|
||||
|
||||
if fmt.Sprint(req.Region) == "" {
|
||||
return nil, errors.New("field Region cannot be empty in request")
|
||||
}
|
||||
|
|
@ -6341,6 +6359,7 @@ func (s *API) GetLBStats(req *GetLBStatsRequest, opts ...scw.RequestOption) (*LB
|
|||
scwReq := &scw.ScalewayRequest{
|
||||
Method: "GET",
|
||||
Path: "/lb/v1/regions/" + fmt.Sprint(req.Region) + "/lbs/" + fmt.Sprint(req.LBID) + "/stats",
|
||||
Query: query,
|
||||
Headers: http.Header{},
|
||||
}
|
||||
|
||||
|
|
@ -6362,8 +6381,11 @@ type ListBackendStatsRequest struct {
|
|||
Page *int32 `json:"-"`
|
||||
// PageSize: number of items to return.
|
||||
PageSize *uint32 `json:"-"`
|
||||
// BackendID: ID of the backend.
|
||||
BackendID *string `json:"-"`
|
||||
}
|
||||
|
||||
// ListBackendStats: list backend server statistics.
|
||||
func (s *API) ListBackendStats(req *ListBackendStatsRequest, opts ...scw.RequestOption) (*ListBackendStatsResponse, error) {
|
||||
var err error
|
||||
|
||||
|
|
@ -6380,6 +6402,7 @@ func (s *API) ListBackendStats(req *ListBackendStatsRequest, opts ...scw.Request
|
|||
query := url.Values{}
|
||||
parameter.AddToQuery(query, "page", req.Page)
|
||||
parameter.AddToQuery(query, "page_size", req.PageSize)
|
||||
parameter.AddToQuery(query, "backend_id", req.BackendID)
|
||||
|
||||
if fmt.Sprint(req.Region) == "" {
|
||||
return nil, errors.New("field Region cannot be empty in request")
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ const configFileTemplate = `# Scaleway configuration file
|
|||
# - Scaleway Terraform Provider (https://www.terraform.io/docs/providers/scaleway/index.html)
|
||||
|
||||
# You need an access key and a secret key to connect to Scaleway API.
|
||||
# Generate your token at the following address: https://console.scaleway.com/project/credentials
|
||||
# Generate your token at the following address: https://console.scaleway.com/iam/api-keys
|
||||
|
||||
# An access key is a secret key identifier.
|
||||
{{ if .AccessKey }}access_key: {{.AccessKey}}{{ else }}# access_key: SCW11111111111111111{{ end }}
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@ func (d *Duration) ToTimeDuration() *time.Duration {
|
|||
if d == nil {
|
||||
return nil
|
||||
}
|
||||
timeDuration := time.Duration(d.Nanos) + time.Duration(d.Seconds/1e9)
|
||||
timeDuration := time.Duration(d.Nanos) + time.Duration(d.Seconds)*time.Second
|
||||
return &timeDuration
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -767,7 +767,7 @@ github.com/russross/blackfriday/v2
|
|||
# github.com/sahilm/fuzzy v0.1.0
|
||||
## explicit
|
||||
github.com/sahilm/fuzzy
|
||||
# github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17
|
||||
# github.com/scaleway/scaleway-sdk-go v1.0.0-beta.19
|
||||
## explicit; go 1.17
|
||||
github.com/scaleway/scaleway-sdk-go/api/domain/v2beta1
|
||||
github.com/scaleway/scaleway-sdk-go/api/iam/v1alpha1
|
||||
|
|
|
|||
Loading…
Reference in New Issue