Documentation ¶
Overview ¶
Package flexibleip provides methods and message types of the flexibleip v1alpha1 API.
Index ¶
- Constants
- type API
- func (s *API) AttachFlexibleIP(req *AttachFlexibleIPRequest, opts ...scw.RequestOption) (*AttachFlexibleIPsResponse, error)
- func (s *API) CreateFlexibleIP(req *CreateFlexibleIPRequest, opts ...scw.RequestOption) (*FlexibleIP, error)
- func (s *API) DeleteFlexibleIP(req *DeleteFlexibleIPRequest, opts ...scw.RequestOption) error
- func (s *API) DeleteMACAddr(req *DeleteMACAddrRequest, opts ...scw.RequestOption) error
- func (s *API) DetachFlexibleIP(req *DetachFlexibleIPRequest, opts ...scw.RequestOption) (*DetachFlexibleIPsResponse, error)
- func (s *API) DuplicateMACAddr(req *DuplicateMACAddrRequest, opts ...scw.RequestOption) (*FlexibleIP, error)
- func (s *API) GenerateMACAddr(req *GenerateMACAddrRequest, opts ...scw.RequestOption) (*FlexibleIP, error)
- func (s *API) GetFlexibleIP(req *GetFlexibleIPRequest, opts ...scw.RequestOption) (*FlexibleIP, error)
- func (s *API) ListFlexibleIPs(req *ListFlexibleIPsRequest, opts ...scw.RequestOption) (*ListFlexibleIPsResponse, error)
- func (s *API) MoveMACAddr(req *MoveMACAddrRequest, opts ...scw.RequestOption) (*FlexibleIP, error)
- func (s *API) UpdateFlexibleIP(req *UpdateFlexibleIPRequest, opts ...scw.RequestOption) (*FlexibleIP, error)
- func (s *API) WaitForFlexibleIP(req *WaitForFlexibleIPRequest, opts ...scw.RequestOption) (*FlexibleIP, error)
- func (s *API) Zones() []scw.Zone
- type AttachFlexibleIPRequest
- type AttachFlexibleIPsResponse
- type CreateFlexibleIPRequest
- type DeleteFlexibleIPRequest
- type DeleteMACAddrRequest
- type DetachFlexibleIPRequest
- type DetachFlexibleIPsResponse
- type DuplicateMACAddrRequest
- type FlexibleIP
- type FlexibleIPStatus
- type GenerateMACAddrRequest
- type GetFlexibleIPRequest
- type ListFlexibleIPsRequest
- type ListFlexibleIPsRequestOrderBy
- type ListFlexibleIPsResponse
- type MACAddress
- type MACAddressStatus
- type MACAddressType
- type MoveMACAddrRequest
- type UpdateFlexibleIPRequest
- type WaitForFlexibleIPRequest
Constants ¶
const ( FlexibleIPStatusUnknown = FlexibleIPStatus("unknown") FlexibleIPStatusReady = FlexibleIPStatus("ready") FlexibleIPStatusUpdating = FlexibleIPStatus("updating") FlexibleIPStatusAttached = FlexibleIPStatus("attached") FlexibleIPStatusError = FlexibleIPStatus("error") FlexibleIPStatusDetaching = FlexibleIPStatus("detaching") FlexibleIPStatusLocked = FlexibleIPStatus("locked") )
const ( ListFlexibleIPsRequestOrderByCreatedAtAsc = ListFlexibleIPsRequestOrderBy("created_at_asc") ListFlexibleIPsRequestOrderByCreatedAtDesc = ListFlexibleIPsRequestOrderBy("created_at_desc") )
const ( MACAddressStatusUnknown = MACAddressStatus("unknown") MACAddressStatusReady = MACAddressStatus("ready") MACAddressStatusUpdating = MACAddressStatus("updating") MACAddressStatusUsed = MACAddressStatus("used") MACAddressStatusError = MACAddressStatus("error") MACAddressStatusDeleting = MACAddressStatus("deleting") )
const ( MACAddressTypeUnknownType = MACAddressType("unknown_type") MACAddressTypeVmware = MACAddressType("vmware") MACAddressTypeXen = MACAddressType("xen") MACAddressTypeKvm = MACAddressType("kvm") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API: elastic Metal - Flexible IP API.
func (*API) AttachFlexibleIP ¶
func (s *API) AttachFlexibleIP(req *AttachFlexibleIPRequest, opts ...scw.RequestOption) (*AttachFlexibleIPsResponse, error)
AttachFlexibleIP: attach an existing flexible IP to a server. Attach an existing flexible IP to a specified Elastic Metal server.
func (*API) CreateFlexibleIP ¶
func (s *API) CreateFlexibleIP(req *CreateFlexibleIPRequest, opts ...scw.RequestOption) (*FlexibleIP, error)
CreateFlexibleIP: create a new flexible IP. Generate a new flexible IP within a given zone, specifying its configuration including Project ID and description.
func (*API) DeleteFlexibleIP ¶
func (s *API) DeleteFlexibleIP(req *DeleteFlexibleIPRequest, opts ...scw.RequestOption) error
DeleteFlexibleIP: delete an existing flexible IP. Delete an existing flexible IP, specified by its ID and zone. Note that deleting a flexible IP is permanent and cannot be undone.
func (*API) DeleteMACAddr ¶
func (s *API) DeleteMACAddr(req *DeleteMACAddrRequest, opts ...scw.RequestOption) error
DeleteMACAddr: detach a given virtual MAC address from an existing flexible IP. Detach a given MAC (Media Access Control) address from an existing flexible IP.
func (*API) DetachFlexibleIP ¶
func (s *API) DetachFlexibleIP(req *DetachFlexibleIPRequest, opts ...scw.RequestOption) (*DetachFlexibleIPsResponse, error)
DetachFlexibleIP: detach an existing flexible IP from a server. Detach an existing flexible IP from a specified Elastic Metal server.
func (*API) DuplicateMACAddr ¶
func (s *API) DuplicateMACAddr(req *DuplicateMACAddrRequest, opts ...scw.RequestOption) (*FlexibleIP, error)
DuplicateMACAddr: duplicate a virtual MAC address to another flexible IP. Duplicate a virtual MAC address from a given flexible IP to another flexible IP attached to the same server.
func (*API) GenerateMACAddr ¶
func (s *API) GenerateMACAddr(req *GenerateMACAddrRequest, opts ...scw.RequestOption) (*FlexibleIP, error)
GenerateMACAddr: generate a virtual MAC address on an existing flexible IP. Generate a virtual MAC (Media Access Control) address on an existing flexible IP.
func (*API) GetFlexibleIP ¶
func (s *API) GetFlexibleIP(req *GetFlexibleIPRequest, opts ...scw.RequestOption) (*FlexibleIP, error)
GetFlexibleIP: get an existing flexible IP. Retrieve information about an existing flexible IP, specified by its ID and zone. Its full details, including Project ID, description and status, are returned in the response object.
func (*API) ListFlexibleIPs ¶
func (s *API) ListFlexibleIPs(req *ListFlexibleIPsRequest, opts ...scw.RequestOption) (*ListFlexibleIPsResponse, error)
ListFlexibleIPs: list flexible IPs. List all flexible IPs within a given zone.
func (*API) MoveMACAddr ¶
func (s *API) MoveMACAddr(req *MoveMACAddrRequest, opts ...scw.RequestOption) (*FlexibleIP, error)
MoveMACAddr: relocate an existing virtual MAC address to a different flexible IP. Relocate a virtual MAC (Media Access Control) address from an existing flexible IP to a different flexible IP.
func (*API) UpdateFlexibleIP ¶
func (s *API) UpdateFlexibleIP(req *UpdateFlexibleIPRequest, opts ...scw.RequestOption) (*FlexibleIP, error)
UpdateFlexibleIP: update an existing flexible IP. Update the parameters of an existing flexible IP, specified by its ID and zone. These parameters include tags and description.
func (*API) WaitForFlexibleIP ¶
func (s *API) WaitForFlexibleIP(req *WaitForFlexibleIPRequest, opts ...scw.RequestOption) (*FlexibleIP, error)
WaitForFlexibleIP waits for the FlexibleIP to be in a ready state before returning.
type AttachFlexibleIPRequest ¶
type AttachFlexibleIPRequest struct { // Zone: zone to target. If none is passed will use default zone from the config. Zone scw.Zone `json:"-"` // FipsIDs: list of flexible IP IDs to attach to a server. // Multiple IDs can be provided, but note that flexible IPs must belong to the same MAC group (see details about MAC groups). FipsIDs []string `json:"fips_ids"` // ServerID: ID of the server on which to attach the flexible IPs. ServerID string `json:"server_id"` }
type AttachFlexibleIPsResponse ¶
type AttachFlexibleIPsResponse struct { // TotalCount: total count of flexible IPs that are being updated. TotalCount uint32 `json:"total_count"` // FlexibleIPs: list of flexible IPs in an updating state. FlexibleIPs []*FlexibleIP `json:"flexible_ips"` }
AttachFlexibleIPsResponse: attach flexible i ps response.
type CreateFlexibleIPRequest ¶
type CreateFlexibleIPRequest struct { // Zone: zone to target. If none is passed will use default zone from the config. Zone scw.Zone `json:"-"` // ProjectID: ID of the project to associate with the Flexible IP. ProjectID string `json:"project_id"` // Description: flexible IP description (max. of 255 characters). Description string `json:"description"` // Tags: tags to associate to the flexible IP. Tags []string `json:"tags"` // ServerID: ID of the server to which the newly created flexible IP will be attached. ServerID *string `json:"server_id"` // Reverse: value of the reverse DNS. Reverse *string `json:"reverse"` // IsIPv6: defines whether the flexible IP has an IPv6 address. IsIPv6 bool `json:"is_ipv6"` }
type DeleteFlexibleIPRequest ¶
type DeleteMACAddrRequest ¶
type DeleteMACAddrRequest struct { // Zone: zone to target. If none is passed will use default zone from the config. Zone scw.Zone `json:"-"` // FipID: ID of the flexible IP from which to delete the virtual MAC. // If the flexible IP belongs to a MAC group, the MAC will be removed from both the MAC group and flexible IP. FipID string `json:"-"` }
type DetachFlexibleIPRequest ¶
type DetachFlexibleIPRequest struct { // Zone: zone to target. If none is passed will use default zone from the config. Zone scw.Zone `json:"-"` // FipsIDs: list of flexible IP IDs to detach from a server. Multiple IDs can be provided. Note that flexible IPs must belong to the same MAC group. FipsIDs []string `json:"fips_ids"` }
type DetachFlexibleIPsResponse ¶
type DetachFlexibleIPsResponse struct { // TotalCount: total count of flexible IPs that are being detached. TotalCount uint32 `json:"total_count"` // FlexibleIPs: list of flexible IPs in a detaching state. FlexibleIPs []*FlexibleIP `json:"flexible_ips"` }
DetachFlexibleIPsResponse: detach flexible i ps response.
type DuplicateMACAddrRequest ¶
type DuplicateMACAddrRequest struct { // Zone: zone to target. If none is passed will use default zone from the config. Zone scw.Zone `json:"-"` // FipID: ID of the flexible IP on which to duplicate the virtual MAC. // Note that the flexible IPs need to be attached to the same server. FipID string `json:"-"` // DuplicateFromFipID: ID of the flexible IP to duplicate the Virtual MAC from. // Note that flexible IPs need to be attached to the same server. DuplicateFromFipID string `json:"duplicate_from_fip_id"` }
type FlexibleIP ¶
type FlexibleIP struct { // ID: ID of the flexible IP. ID string `json:"id"` // OrganizationID: ID of the Organization the flexible IP is attached to. OrganizationID string `json:"organization_id"` // ProjectID: ID of the Project the flexible IP is attached to. ProjectID string `json:"project_id"` // Description: flexible IP description. Description string `json:"description"` // Tags: flexible IP tags. Tags []string `json:"tags"` // UpdatedAt: date on which the flexible IP was last updated. UpdatedAt *time.Time `json:"updated_at"` // CreatedAt: date on which the flexible IP was created. CreatedAt *time.Time `json:"created_at"` // Status: flexible IP status. // - ready : flexible IP is created and ready to be attached to a server or to be associated with a virtual MAC. // - updating: flexible IP is being attached to a server or a virtual MAC operation is ongoing // - attached: flexible IP is attached to a server // - error: a flexible IP operation resulted in an error // - detaching: flexible IP is being detached from a server // - locked: the resource of the flexible IP is locked. // Default value: unknown Status FlexibleIPStatus `json:"status"` // IPAddress: IP of the flexible IP. IPAddress scw.IPNet `json:"ip_address"` // MacAddress: mAC address of the flexible IP. MacAddress *MACAddress `json:"mac_address"` // ServerID: ID of the server linked to the flexible IP. ServerID *string `json:"server_id"` // Reverse: reverse DNS value. Reverse string `json:"reverse"` // Zone: availability Zone of the flexible IP. Zone scw.Zone `json:"zone"` }
FlexibleIP: flexible ip.
type FlexibleIPStatus ¶
type FlexibleIPStatus string
func (FlexibleIPStatus) MarshalJSON ¶
func (enum FlexibleIPStatus) MarshalJSON() ([]byte, error)
func (FlexibleIPStatus) String ¶
func (enum FlexibleIPStatus) String() string
func (*FlexibleIPStatus) UnmarshalJSON ¶
func (enum *FlexibleIPStatus) UnmarshalJSON(data []byte) error
type GenerateMACAddrRequest ¶
type GenerateMACAddrRequest struct { // Zone: zone to target. If none is passed will use default zone from the config. Zone scw.Zone `json:"-"` // FipID: ID of the flexible IP for which to generate a virtual MAC. FipID string `json:"-"` // MacType: tODO. // Default value: unknown_type MacType MACAddressType `json:"mac_type"` }
type GetFlexibleIPRequest ¶
type ListFlexibleIPsRequest ¶
type ListFlexibleIPsRequest struct { // Zone: zone to target. If none is passed will use default zone from the config. Zone scw.Zone `json:"-"` // OrderBy: sort order of the returned flexible IPs. // Default value: created_at_asc OrderBy ListFlexibleIPsRequestOrderBy `json:"-"` // Page: page number. Page *int32 `json:"-"` // PageSize: maximum number of flexible IPs per page. PageSize *uint32 `json:"-"` // Tags: filter by tag, only flexible IPs with one or more matching tags will be returned. Tags []string `json:"-"` // Status: filter by status, only flexible IPs with this status will be returned. Status []FlexibleIPStatus `json:"-"` // ServerIDs: filter by server IDs, only flexible IPs with these server IDs will be returned. ServerIDs []string `json:"-"` // OrganizationID: filter by Organization ID, only flexible IPs from this Organization will be returned. OrganizationID *string `json:"-"` // ProjectID: filter by Project ID, only flexible IPs from this Project will be returned. ProjectID *string `json:"-"` }
type ListFlexibleIPsRequestOrderBy ¶
type ListFlexibleIPsRequestOrderBy string
func (ListFlexibleIPsRequestOrderBy) MarshalJSON ¶
func (enum ListFlexibleIPsRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListFlexibleIPsRequestOrderBy) String ¶
func (enum ListFlexibleIPsRequestOrderBy) String() string
func (*ListFlexibleIPsRequestOrderBy) UnmarshalJSON ¶
func (enum *ListFlexibleIPsRequestOrderBy) UnmarshalJSON(data []byte) error
type ListFlexibleIPsResponse ¶
type ListFlexibleIPsResponse struct { // TotalCount: total count of matching flexible IPs. TotalCount uint32 `json:"total_count"` // FlexibleIPs: list of all flexible IPs. FlexibleIPs []*FlexibleIP `json:"flexible_ips"` }
ListFlexibleIPsResponse: list flexible i ps response.
func (*ListFlexibleIPsResponse) UnsafeAppend ¶
func (r *ListFlexibleIPsResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListFlexibleIPsResponse) UnsafeGetTotalCount ¶
func (r *ListFlexibleIPsResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
type MACAddress ¶
type MACAddress struct { // ID: ID of the flexible IP. ID string `json:"id"` // MacAddress: mAC address of the Virtual MAC. MacAddress string `json:"mac_address"` // MacType: type of virtual MAC. // Default value: unknown_type MacType MACAddressType `json:"mac_type"` // Status: status of virtual MAC. // Default value: unknown Status MACAddressStatus `json:"status"` // UpdatedAt: date on which the virtual MAC was last updated. UpdatedAt *time.Time `json:"updated_at"` // CreatedAt: date on which the virtual MAC was created. CreatedAt *time.Time `json:"created_at"` // Zone: mAC address IP Availability Zone. Zone scw.Zone `json:"zone"` }
MACAddress: mac address.
type MACAddressStatus ¶
type MACAddressStatus string
func (MACAddressStatus) MarshalJSON ¶
func (enum MACAddressStatus) MarshalJSON() ([]byte, error)
func (MACAddressStatus) String ¶
func (enum MACAddressStatus) String() string
func (*MACAddressStatus) UnmarshalJSON ¶
func (enum *MACAddressStatus) UnmarshalJSON(data []byte) error
type MACAddressType ¶
type MACAddressType string
func (MACAddressType) MarshalJSON ¶
func (enum MACAddressType) MarshalJSON() ([]byte, error)
func (MACAddressType) String ¶
func (enum MACAddressType) String() string
func (*MACAddressType) UnmarshalJSON ¶
func (enum *MACAddressType) UnmarshalJSON(data []byte) error
type MoveMACAddrRequest ¶
type UpdateFlexibleIPRequest ¶
type UpdateFlexibleIPRequest struct { // Zone: zone to target. If none is passed will use default zone from the config. Zone scw.Zone `json:"-"` // FipID: ID of the flexible IP to update. FipID string `json:"-"` // Description: flexible IP description (max. 255 characters). Description *string `json:"description"` // Tags: tags associated with the flexible IP. Tags *[]string `json:"tags"` // Reverse: value of the reverse DNS. Reverse *string `json:"reverse"` }