interlink

package
v1.0.0-beta.35 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 15, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package interlink provides methods and message types of the interlink v1beta1 API.

Index

Constants

View Source
const (
	BgpStatusUnknownBgpStatus = BgpStatus("unknown_bgp_status")
	BgpStatusUp               = BgpStatus("up")
	BgpStatusDown             = BgpStatus("down")
	BgpStatusDisabled         = BgpStatus("disabled")
)
View Source
const (
	DedicatedConnectionStatusUnknownStatus = DedicatedConnectionStatus("unknown_status")
	DedicatedConnectionStatusCreated       = DedicatedConnectionStatus("created")
	DedicatedConnectionStatusConfiguring   = DedicatedConnectionStatus("configuring")
	DedicatedConnectionStatusFailed        = DedicatedConnectionStatus("failed")
	DedicatedConnectionStatusActive        = DedicatedConnectionStatus("active")
	DedicatedConnectionStatusDisabled      = DedicatedConnectionStatus("disabled")
	DedicatedConnectionStatusDeleted       = DedicatedConnectionStatus("deleted")
	DedicatedConnectionStatusLocked        = DedicatedConnectionStatus("locked")
)
View Source
const (
	LinkKindHosted     = LinkKind("hosted")
	LinkKindSelfHosted = LinkKind("self_hosted")
)
View Source
const (
	LinkStatusUnknownLinkStatus   = LinkStatus("unknown_link_status")
	LinkStatusConfiguring         = LinkStatus("configuring")
	LinkStatusFailed              = LinkStatus("failed")
	LinkStatusRequested           = LinkStatus("requested")
	LinkStatusRefused             = LinkStatus("refused")
	LinkStatusExpired             = LinkStatus("expired")
	LinkStatusProvisioning        = LinkStatus("provisioning")
	LinkStatusActive              = LinkStatus("active")
	LinkStatusLimitedConnectivity = LinkStatus("limited_connectivity")
	LinkStatusAllDown             = LinkStatus("all_down")
	LinkStatusDeprovisioning      = LinkStatus("deprovisioning")
	LinkStatusDeleted             = LinkStatus("deleted")
	LinkStatusLocked              = LinkStatus("locked")
	LinkStatusReady               = LinkStatus("ready")
)
View Source
const (
	ListDedicatedConnectionsRequestOrderByCreatedAtAsc  = ListDedicatedConnectionsRequestOrderBy("created_at_asc")
	ListDedicatedConnectionsRequestOrderByCreatedAtDesc = ListDedicatedConnectionsRequestOrderBy("created_at_desc")
	ListDedicatedConnectionsRequestOrderByUpdatedAtAsc  = ListDedicatedConnectionsRequestOrderBy("updated_at_asc")
	ListDedicatedConnectionsRequestOrderByUpdatedAtDesc = ListDedicatedConnectionsRequestOrderBy("updated_at_desc")
	ListDedicatedConnectionsRequestOrderByNameAsc       = ListDedicatedConnectionsRequestOrderBy("name_asc")
	ListDedicatedConnectionsRequestOrderByNameDesc      = ListDedicatedConnectionsRequestOrderBy("name_desc")
	ListDedicatedConnectionsRequestOrderByStatusAsc     = ListDedicatedConnectionsRequestOrderBy("status_asc")
	ListDedicatedConnectionsRequestOrderByStatusDesc    = ListDedicatedConnectionsRequestOrderBy("status_desc")
)
View Source
const (
	ListLinksRequestOrderByCreatedAtAsc  = ListLinksRequestOrderBy("created_at_asc")
	ListLinksRequestOrderByCreatedAtDesc = ListLinksRequestOrderBy("created_at_desc")
	ListLinksRequestOrderByNameAsc       = ListLinksRequestOrderBy("name_asc")
	ListLinksRequestOrderByNameDesc      = ListLinksRequestOrderBy("name_desc")
	ListLinksRequestOrderByStatusAsc     = ListLinksRequestOrderBy("status_asc")
	ListLinksRequestOrderByStatusDesc    = ListLinksRequestOrderBy("status_desc")
)
View Source
const (
	ListPartnersRequestOrderByNameAsc  = ListPartnersRequestOrderBy("name_asc")
	ListPartnersRequestOrderByNameDesc = ListPartnersRequestOrderBy("name_desc")
)
View Source
const (
	ListPopsRequestOrderByNameAsc  = ListPopsRequestOrderBy("name_asc")
	ListPopsRequestOrderByNameDesc = ListPopsRequestOrderBy("name_desc")
)
View Source
const (
	ListRoutingPoliciesRequestOrderByCreatedAtAsc  = ListRoutingPoliciesRequestOrderBy("created_at_asc")
	ListRoutingPoliciesRequestOrderByCreatedAtDesc = ListRoutingPoliciesRequestOrderBy("created_at_desc")
	ListRoutingPoliciesRequestOrderByNameAsc       = ListRoutingPoliciesRequestOrderBy("name_asc")
	ListRoutingPoliciesRequestOrderByNameDesc      = ListRoutingPoliciesRequestOrderBy("name_desc")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	// contains filtered or unexported fields
}

This API allows you to manage your Scaleway InterLink, to connect your on-premises infrastructure with your Scaleway VPC.

func NewAPI

func NewAPI(client *scw.Client) *API

NewAPI returns a API object from a Scaleway client.

func (*API) AttachRoutingPolicy

func (s *API) AttachRoutingPolicy(req *AttachRoutingPolicyRequest, opts ...scw.RequestOption) (*Link, error)

AttachRoutingPolicy: Attach a routing policy to an existing link. As all routes across the link are blocked by default, you must attach a routing policy to set IP prefix filters for allowed routes, facilitating traffic flow.

func (*API) AttachVpc

func (s *API) AttachVpc(req *AttachVpcRequest, opts ...scw.RequestOption) (*Link, error)

AttachVpc: Attach a VPC to an existing link. This facilitates communication between the resources in your Scaleway VPC, and your on-premises infrastructure.

func (s *API) CreateLink(req *CreateLinkRequest, opts ...scw.RequestOption) (*Link, error)

CreateLink: Create a link (InterLink session / logical InterLink resource) in a given PoP, specifying its various configuration details. Links can either be hosted (facilitated by partners' shared physical connections) or self-hosted (for users who have purchased a dedicated physical connection).

func (*API) CreateRoutingPolicy

func (s *API) CreateRoutingPolicy(req *CreateRoutingPolicyRequest, opts ...scw.RequestOption) (*RoutingPolicy, error)

CreateRoutingPolicy: Create a routing policy. Routing policies allow you to set IP prefix filters to define the incoming route announcements to accept from the peer, and the outgoing routes to announce to the peer.

func (s *API) DeleteLink(req *DeleteLinkRequest, opts ...scw.RequestOption) (*Link, error)

DeleteLink: Delete an existing link, specified by its link ID. Note that as well as deleting the link here on the Scaleway side, it is also necessary to request deletion from the partner on their side. Only when this action has been carried out on both sides will the resource be completely deleted.

func (*API) DeleteRoutingPolicy

func (s *API) DeleteRoutingPolicy(req *DeleteRoutingPolicyRequest, opts ...scw.RequestOption) error

DeleteRoutingPolicy: Delete an existing routing policy, specified by its routing policy ID.

func (*API) DetachRoutingPolicy

func (s *API) DetachRoutingPolicy(req *DetachRoutingPolicyRequest, opts ...scw.RequestOption) (*Link, error)

DetachRoutingPolicy: Detach a routing policy from an existing link. Without a routing policy, all routes across the link are blocked by default.

func (*API) DetachVpc

func (s *API) DetachVpc(req *DetachVpcRequest, opts ...scw.RequestOption) (*Link, error)

DetachVpc: Detach a VPC from an existing link.

func (*API) DisableRoutePropagation

func (s *API) DisableRoutePropagation(req *DisableRoutePropagationRequest, opts ...scw.RequestOption) (*Link, error)

DisableRoutePropagation: Prevent any prefixes from being announced in the BGP session. Traffic will not be able to flow over the InterLink until route propagation is re-enabled.

func (*API) EnableRoutePropagation

func (s *API) EnableRoutePropagation(req *EnableRoutePropagationRequest, opts ...scw.RequestOption) (*Link, error)

EnableRoutePropagation: Enable all allowed prefixes (defined in a routing policy) to be announced in the BGP session. This allows traffic to flow between the attached VPC and the on-premises infrastructure along the announced routes. Note that by default, even when route propagation is enabled, all routes are blocked. It is essential to attach a routing policy to define the ranges of routes to announce.

func (*API) GetDedicatedConnection

func (s *API) GetDedicatedConnection(req *GetDedicatedConnectionRequest, opts ...scw.RequestOption) (*DedicatedConnection, error)

GetDedicatedConnection: For self-hosted users, get a dedicated physical connection corresponding to the given ID. The response object includes information such as the connection's name, status and total bandwidth.

func (s *API) GetLink(req *GetLinkRequest, opts ...scw.RequestOption) (*Link, error)

GetLink: Get a link (InterLink session / logical InterLink resource) for the given link ID. The response object includes information about the link's various configuration details.

func (*API) GetPartner

func (s *API) GetPartner(req *GetPartnerRequest, opts ...scw.RequestOption) (*Partner, error)

GetPartner: Get a partner for the given partner IP. The response object includes information such as the partner's name, email address and portal URL.

func (*API) GetPop

func (s *API) GetPop(req *GetPopRequest, opts ...scw.RequestOption) (*Pop, error)

GetPop: Get a PoP for the given PoP ID. The response object includes the PoP's name and information about its physical location.

func (*API) GetRoutingPolicy

func (s *API) GetRoutingPolicy(req *GetRoutingPolicyRequest, opts ...scw.RequestOption) (*RoutingPolicy, error)

GetRoutingPolicy: Get a routing policy for the given routing policy ID. The response object gives information including the policy's name, tags and prefix filters.

func (*API) ListDedicatedConnections

func (s *API) ListDedicatedConnections(req *ListDedicatedConnectionsRequest, opts ...scw.RequestOption) (*ListDedicatedConnectionsResponse, error)

ListDedicatedConnections: For self-hosted users, list their dedicated physical connections in a given region. By default, the connections returned in the list are ordered by name in ascending order, though this can be modified via the `order_by` field.

func (s *API) ListLinks(req *ListLinksRequest, opts ...scw.RequestOption) (*ListLinksResponse, error)

ListLinks: List all your links (InterLink connections). A number of filters are available, including Project ID, name, tags and status.

func (*API) ListPartners

func (s *API) ListPartners(req *ListPartnersRequest, opts ...scw.RequestOption) (*ListPartnersResponse, error)

ListPartners: List all available partners. By default, the partners returned in the list are ordered by name in ascending order, though this can be modified via the `order_by` field.

func (*API) ListPops

func (s *API) ListPops(req *ListPopsRequest, opts ...scw.RequestOption) (*ListPopsResponse, error)

ListPops: List all available PoPs (locations) for a given region. By default, the results are returned in ascending alphabetical order by name.

func (*API) ListRoutingPolicies

func (s *API) ListRoutingPolicies(req *ListRoutingPoliciesRequest, opts ...scw.RequestOption) (*ListRoutingPoliciesResponse, error)

ListRoutingPolicies: List all routing policies in a given region. A routing policy can be attached to one or multiple links (InterLink connections).

func (*API) Regions

func (s *API) Regions() []scw.Region

func (*API) SetRoutingPolicy

func (s *API) SetRoutingPolicy(req *SetRoutingPolicyRequest, opts ...scw.RequestOption) (*Link, error)

SetRoutingPolicy: Replace a routing policy from an existing link. This is useful when route propagation is enabled because it changes the routing policy "in place", without blocking all routes like a attach / detach would do.

func (s *API) UpdateLink(req *UpdateLinkRequest, opts ...scw.RequestOption) (*Link, error)

UpdateLink: Update an existing link, specified by its link ID. Only its name and tags can be updated.

func (*API) UpdateRoutingPolicy

func (s *API) UpdateRoutingPolicy(req *UpdateRoutingPolicyRequest, opts ...scw.RequestOption) (*RoutingPolicy, error)

UpdateRoutingPolicy: Update an existing routing policy, specified by its routing policy ID. Its name, tags and incoming/outgoing prefix filters can be updated.

type AttachRoutingPolicyRequest

type AttachRoutingPolicyRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// LinkID: ID of the link to attach a routing policy to.
	LinkID string `json:"-"`

	// RoutingPolicyID: ID of the routing policy to be attached.
	RoutingPolicyID string `json:"routing_policy_id"`
}

AttachRoutingPolicyRequest: attach routing policy request.

type AttachVpcRequest

type AttachVpcRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// LinkID: ID of the link to attach VPC to.
	LinkID string `json:"-"`

	// VpcID: ID of the VPC to attach.
	VpcID string `json:"vpc_id"`
}

AttachVpcRequest: attach vpc request.

type BgpConfig

type BgpConfig struct {
	// Asn: aS Number of the BGP peer.
	Asn uint32 `json:"asn"`

	// IPv4: iPv4 address of the BGP peer.
	IPv4 scw.IPNet `json:"ipv4"`

	// IPv6: iPv6 address of the BGP peer.
	IPv6 scw.IPNet `json:"ipv6"`
}

BgpConfig: bgp config.

type BgpStatus

type BgpStatus string

func (BgpStatus) MarshalJSON

func (enum BgpStatus) MarshalJSON() ([]byte, error)

func (BgpStatus) String

func (enum BgpStatus) String() string

func (*BgpStatus) UnmarshalJSON

func (enum *BgpStatus) UnmarshalJSON(data []byte) error

func (BgpStatus) Values

func (enum BgpStatus) Values() []BgpStatus

type CreateLinkRequest

type CreateLinkRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// ProjectID: ID of the Project to create the link in.
	ProjectID string `json:"project_id"`

	// Name: name of the link.
	Name string `json:"name"`

	// Tags: list of tags to apply to the link.
	Tags []string `json:"tags"`

	// PopID: poP (location) where the link will be created.
	PopID string `json:"pop_id"`

	// BandwidthMbps: desired bandwidth for the link. Must be compatible with available link bandwidths and remaining bandwidth capacity of the connection.
	BandwidthMbps uint64 `json:"bandwidth_mbps"`

	// ConnectionID: if set, creates a self-hosted link using this dedicated physical connection. As the customer, specify the ID of the physical connection you already have for this link.
	// Precisely one of ConnectionID, PartnerID must be set.
	ConnectionID *string `json:"connection_id,omitempty"`

	// PartnerID: if set, creates a hosted link on a partner's connection. Specify the ID of the chosen partner, who already has a shared connection with available bandwidth.
	// Precisely one of ConnectionID, PartnerID must be set.
	PartnerID *string `json:"partner_id,omitempty"`

	// PeerAsn: for self-hosted links we need the peer AS Number to establish BGP session. If not given, a default one will be assigned.
	PeerAsn *uint32 `json:"peer_asn,omitempty"`

	// Vlan: for self-hosted links only, it is possible to choose the VLAN ID. If the VLAN is not available (ie already taken or out of range), an error is returned.
	Vlan *uint32 `json:"vlan,omitempty"`

	// RoutingPolicyV4ID: if set, attaches this routing policy containing IPv4 prefixes to the Link. Hence, a BGP IPv4 session will be created.
	RoutingPolicyV4ID *string `json:"routing_policy_v4_id,omitempty"`

	// RoutingPolicyV6ID: if set, attaches this routing policy containing IPv6 prefixes to the Link. Hence, a BGP IPv6 session will be created.
	RoutingPolicyV6ID *string `json:"routing_policy_v6_id,omitempty"`
}

CreateLinkRequest: create link request.

type CreateRoutingPolicyRequest

type CreateRoutingPolicyRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// ProjectID: ID of the Project to create the routing policy in.
	ProjectID string `json:"project_id"`

	// Name: name of the routing policy.
	Name string `json:"name"`

	// Tags: list of tags to apply to the routing policy.
	Tags []string `json:"tags"`

	// PrefixFilterIn: IP prefixes to accept from the peer (ranges of route announcements to accept).
	PrefixFilterIn []scw.IPNet `json:"prefix_filter_in"`

	// PrefixFilterOut: IP prefix filters to advertise to the peer (ranges of routes to advertise).
	PrefixFilterOut []scw.IPNet `json:"prefix_filter_out"`

	// IsIPv6: IP prefixes version of the routing policy.
	IsIPv6 bool `json:"is_ipv6"`
}

CreateRoutingPolicyRequest: create routing policy request.

type DedicatedConnection

type DedicatedConnection struct {
	// ID: unique identifier of the dedicated connection.
	ID string `json:"id"`

	// ProjectID: project ID.
	ProjectID string `json:"project_id"`

	// OrganizationID: organization ID.
	OrganizationID string `json:"organization_id"`

	// Status: status of the dedicated connection.
	// Default value: unknown_status
	Status DedicatedConnectionStatus `json:"status"`

	// Name: name of the dedicated connection.
	Name string `json:"name"`

	// Tags: list of tags associated with the dedicated connection.
	Tags []string `json:"tags"`

	// PopID: ID of the PoP where the dedicated connection is located.
	PopID string `json:"pop_id"`

	// BandwidthMbps: bandwidth size of the dedicated connection.
	BandwidthMbps uint64 `json:"bandwidth_mbps"`

	// AvailableLinkBandwidths: size of the links supported on this dedicated connection.
	AvailableLinkBandwidths []uint64 `json:"available_link_bandwidths"`

	// CreatedAt: creation date of the dedicated connection.
	CreatedAt *time.Time `json:"created_at"`

	// UpdatedAt: last modification date of the dedicated connection.
	UpdatedAt *time.Time `json:"updated_at"`

	// DemarcationInfo: demarcation details required by the data center to set up the supporting Cross Connect. This generally includes the physical space in the facility, the cabinet or rack the connection should land in, the patch panel to go in, the port designation, and the media type.
	DemarcationInfo *string `json:"demarcation_info"`

	// Region: region of the dedicated connection.
	Region scw.Region `json:"region"`
}

DedicatedConnection: dedicated connection.

type DedicatedConnectionStatus

type DedicatedConnectionStatus string

func (DedicatedConnectionStatus) MarshalJSON

func (enum DedicatedConnectionStatus) MarshalJSON() ([]byte, error)

func (DedicatedConnectionStatus) String

func (enum DedicatedConnectionStatus) String() string

func (*DedicatedConnectionStatus) UnmarshalJSON

func (enum *DedicatedConnectionStatus) UnmarshalJSON(data []byte) error

func (DedicatedConnectionStatus) Values

type DeleteLinkRequest

type DeleteLinkRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// LinkID: ID of the link to delete.
	LinkID string `json:"-"`
}

DeleteLinkRequest: delete link request.

type DeleteRoutingPolicyRequest

type DeleteRoutingPolicyRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// RoutingPolicyID: ID of the routing policy to delete.
	RoutingPolicyID string `json:"-"`
}

DeleteRoutingPolicyRequest: delete routing policy request.

type DetachRoutingPolicyRequest

type DetachRoutingPolicyRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// LinkID: ID of the link to detach a routing policy from.
	LinkID string `json:"-"`

	// RoutingPolicyID: ID of the routing policy to be detached.
	RoutingPolicyID string `json:"routing_policy_id"`
}

DetachRoutingPolicyRequest: detach routing policy request.

type DetachVpcRequest

type DetachVpcRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// LinkID: ID of the link to detach the VPC from.
	LinkID string `json:"-"`
}

DetachVpcRequest: detach vpc request.

type DisableRoutePropagationRequest

type DisableRoutePropagationRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// LinkID: ID of the link on which to disable route propagation.
	LinkID string `json:"-"`
}

DisableRoutePropagationRequest: disable route propagation request.

type EnableRoutePropagationRequest

type EnableRoutePropagationRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// LinkID: ID of the link on which to enable route propagation.
	LinkID string `json:"-"`
}

EnableRoutePropagationRequest: enable route propagation request.

type GetDedicatedConnectionRequest

type GetDedicatedConnectionRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// ConnectionID: ID of connection to get.
	ConnectionID string `json:"-"`
}

GetDedicatedConnectionRequest: get dedicated connection request.

type GetLinkRequest

type GetLinkRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// LinkID: ID of the link to get.
	LinkID string `json:"-"`
}

GetLinkRequest: get link request.

type GetPartnerRequest

type GetPartnerRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// PartnerID: ID of partner to get.
	PartnerID string `json:"-"`
}

GetPartnerRequest: get partner request.

type GetPopRequest

type GetPopRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// PopID: ID of PoP to get.
	PopID string `json:"-"`
}

GetPopRequest: get pop request.

type GetRoutingPolicyRequest

type GetRoutingPolicyRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// RoutingPolicyID: ID of the routing policy to get.
	RoutingPolicyID string `json:"-"`
}

GetRoutingPolicyRequest: get routing policy request.

type Link struct {
	// ID: unique identifier of the link.
	ID string `json:"id"`

	// ProjectID: project ID.
	ProjectID string `json:"project_id"`

	// OrganizationID: organization ID.
	OrganizationID string `json:"organization_id"`

	// Name: name of the link.
	Name string `json:"name"`

	// Tags: list of tags associated with the link.
	Tags []string `json:"tags"`

	// PopID: ID of the PoP where the link's corresponding connection is located.
	PopID string `json:"pop_id"`

	// BandwidthMbps: rate limited bandwidth of the link.
	BandwidthMbps uint64 `json:"bandwidth_mbps"`

	// Status: status of the link.
	// Default value: unknown_link_status
	Status LinkStatus `json:"status"`

	// BgpV4Status: status of the link's BGP IPv4 session.
	// Default value: unknown_bgp_status
	BgpV4Status BgpStatus `json:"bgp_v4_status"`

	// BgpV6Status: status of the link's BGP IPv6 session.
	// Default value: unknown_bgp_status
	BgpV6Status BgpStatus `json:"bgp_v6_status"`

	// VpcID: ID of the Scaleway VPC attached to the link.
	VpcID *string `json:"vpc_id"`

	// Deprecated: RoutingPolicyID: deprecated. Use routing_policy_v4_id or routing_policy_v6_id instead.
	RoutingPolicyID *string `json:"routing_policy_id,omitempty"`

	// EnableRoutePropagation: defines whether route propagation is enabled or not. To enable or disable route propagation, use the dedicated endpoint.
	EnableRoutePropagation bool `json:"enable_route_propagation"`

	// CreatedAt: creation date of the link.
	CreatedAt *time.Time `json:"created_at"`

	// UpdatedAt: last modification date of the link.
	UpdatedAt *time.Time `json:"updated_at"`

	// Partner: partner host information.
	// Precisely one of Partner, Self must be set.
	Partner *PartnerHost `json:"partner,omitempty"`

	// Self: self-host information.
	// Precisely one of Partner, Self must be set.
	Self *SelfHost `json:"self,omitempty"`

	// Vlan: vLAN of the link.
	Vlan uint32 `json:"vlan"`

	// ScwBgpConfig: bGP configuration on Scaleway's side.
	ScwBgpConfig *BgpConfig `json:"scw_bgp_config"`

	// PeerBgpConfig: bGP configuration on peer's side (on-premises or other hosting provider).
	PeerBgpConfig *BgpConfig `json:"peer_bgp_config"`

	// RoutingPolicyV4ID: ID of the routing policy IPv4 attached to the link.
	RoutingPolicyV4ID *string `json:"routing_policy_v4_id"`

	// RoutingPolicyV6ID: ID of the routing policy IPv6 attached to the link.
	RoutingPolicyV6ID *string `json:"routing_policy_v6_id"`

	// Region: region of the link.
	Region scw.Region `json:"region"`
}

Link: link.

type LinkKind

type LinkKind string

func (LinkKind) MarshalJSON

func (enum LinkKind) MarshalJSON() ([]byte, error)

func (LinkKind) String

func (enum LinkKind) String() string

func (*LinkKind) UnmarshalJSON

func (enum *LinkKind) UnmarshalJSON(data []byte) error

func (LinkKind) Values

func (enum LinkKind) Values() []LinkKind

type LinkStatus

type LinkStatus string

func (LinkStatus) MarshalJSON

func (enum LinkStatus) MarshalJSON() ([]byte, error)

func (LinkStatus) String

func (enum LinkStatus) String() string

func (*LinkStatus) UnmarshalJSON

func (enum *LinkStatus) UnmarshalJSON(data []byte) error

func (LinkStatus) Values

func (enum LinkStatus) Values() []LinkStatus

type ListDedicatedConnectionsRequest

type ListDedicatedConnectionsRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// OrderBy: order in which to return results.
	// Default value: created_at_asc
	OrderBy ListDedicatedConnectionsRequestOrderBy `json:"-"`

	// Page: page number to return.
	Page *int32 `json:"-"`

	// PageSize: maximum number of connections to return per page.
	PageSize *uint32 `json:"-"`

	// ProjectID: project ID to filter for.
	ProjectID *string `json:"-"`

	// OrganizationID: organization ID to filter for.
	OrganizationID *string `json:"-"`

	// Name: link name to filter for.
	Name *string `json:"-"`

	// Tags: tags to filter for.
	Tags []string `json:"-"`

	// Status: connection status to filter for.
	// Default value: unknown_status
	Status DedicatedConnectionStatus `json:"-"`

	// BandwidthMbps: filter for dedicated connections with this bandwidth size.
	BandwidthMbps *uint64 `json:"-"`

	// PopID: filter for dedicated connections present in this PoP.
	PopID *string `json:"-"`
}

ListDedicatedConnectionsRequest: list dedicated connections request.

type ListDedicatedConnectionsRequestOrderBy

type ListDedicatedConnectionsRequestOrderBy string

func (ListDedicatedConnectionsRequestOrderBy) MarshalJSON

func (enum ListDedicatedConnectionsRequestOrderBy) MarshalJSON() ([]byte, error)

func (ListDedicatedConnectionsRequestOrderBy) String

func (*ListDedicatedConnectionsRequestOrderBy) UnmarshalJSON

func (enum *ListDedicatedConnectionsRequestOrderBy) UnmarshalJSON(data []byte) error

func (ListDedicatedConnectionsRequestOrderBy) Values

type ListDedicatedConnectionsResponse

type ListDedicatedConnectionsResponse struct {
	// Connections: list of connections on current page.
	Connections []*DedicatedConnection `json:"connections"`

	// TotalCount: total number of connections returned.
	TotalCount uint64 `json:"total_count"`
}

ListDedicatedConnectionsResponse: list dedicated connections response.

func (*ListDedicatedConnectionsResponse) UnsafeAppend

func (r *ListDedicatedConnectionsResponse) UnsafeAppend(res any) (uint64, error)

UnsafeAppend should not be used Internal usage only

func (*ListDedicatedConnectionsResponse) UnsafeGetTotalCount

func (r *ListDedicatedConnectionsResponse) UnsafeGetTotalCount() uint64

UnsafeGetTotalCount should not be used Internal usage only

type ListLinksRequest

type ListLinksRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// OrderBy: order in which to return results.
	// Default value: created_at_asc
	OrderBy ListLinksRequestOrderBy `json:"-"`

	// Page: page number to return.
	Page *int32 `json:"-"`

	// PageSize: maximum number of links to return per page.
	PageSize *uint32 `json:"-"`

	// ProjectID: project ID to filter for.
	ProjectID *string `json:"-"`

	// OrganizationID: organization ID to filter for.
	OrganizationID *string `json:"-"`

	// Name: link name to filter for.
	Name *string `json:"-"`

	// Tags: tags to filter for.
	Tags []string `json:"-"`

	// Status: link status to filter for.
	// Default value: unknown_link_status
	Status LinkStatus `json:"-"`

	// BgpV4Status: bGP IPv4 status to filter for.
	// Default value: unknown_bgp_status
	BgpV4Status BgpStatus `json:"-"`

	// BgpV6Status: bGP IPv6 status to filter for.
	// Default value: unknown_bgp_status
	BgpV6Status BgpStatus `json:"-"`

	// PopID: filter for links attached to this PoP (via connections).
	PopID *string `json:"-"`

	// BandwidthMbps: filter for link bandwidth (in Mbps).
	BandwidthMbps *uint64 `json:"-"`

	// PartnerID: filter for links hosted by this partner.
	PartnerID *string `json:"-"`

	// VpcID: filter for links attached to this VPC.
	VpcID *string `json:"-"`

	// RoutingPolicyID: filter for links using this routing policy.
	RoutingPolicyID *string `json:"-"`

	// PairingKey: filter for the link with this pairing_key.
	PairingKey *string `json:"-"`

	// Kind: filter for hosted or self-hosted links.
	// Default value: hosted
	Kind *LinkKind `json:"-"`

	// ConnectionID: filter for links self-hosted on this connection.
	ConnectionID *string `json:"-"`
}

ListLinksRequest: list links request.

type ListLinksRequestOrderBy

type ListLinksRequestOrderBy string

func (ListLinksRequestOrderBy) MarshalJSON

func (enum ListLinksRequestOrderBy) MarshalJSON() ([]byte, error)

func (ListLinksRequestOrderBy) String

func (enum ListLinksRequestOrderBy) String() string

func (*ListLinksRequestOrderBy) UnmarshalJSON

func (enum *ListLinksRequestOrderBy) UnmarshalJSON(data []byte) error

func (ListLinksRequestOrderBy) Values

type ListLinksResponse

type ListLinksResponse struct {
	// Links: list of links on the current page.
	Links []*Link `json:"links"`

	// TotalCount: total number of links.
	TotalCount uint64 `json:"total_count"`
}

ListLinksResponse: list links response.

func (*ListLinksResponse) UnsafeAppend

func (r *ListLinksResponse) UnsafeAppend(res any) (uint64, error)

UnsafeAppend should not be used Internal usage only

func (*ListLinksResponse) UnsafeGetTotalCount

func (r *ListLinksResponse) UnsafeGetTotalCount() uint64

UnsafeGetTotalCount should not be used Internal usage only

type ListPartnersRequest

type ListPartnersRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// OrderBy: order in which to return results.
	// Default value: name_asc
	OrderBy ListPartnersRequestOrderBy `json:"-"`

	// Page: page number to return.
	Page *int32 `json:"-"`

	// PageSize: maximum number of partners to return per page.
	PageSize *uint32 `json:"-"`

	// PopIDs: filter for partners present (offering a connection) in one of these PoPs.
	PopIDs []string `json:"-"`
}

ListPartnersRequest: list partners request.

type ListPartnersRequestOrderBy

type ListPartnersRequestOrderBy string

func (ListPartnersRequestOrderBy) MarshalJSON

func (enum ListPartnersRequestOrderBy) MarshalJSON() ([]byte, error)

func (ListPartnersRequestOrderBy) String

func (enum ListPartnersRequestOrderBy) String() string

func (*ListPartnersRequestOrderBy) UnmarshalJSON

func (enum *ListPartnersRequestOrderBy) UnmarshalJSON(data []byte) error

func (ListPartnersRequestOrderBy) Values

type ListPartnersResponse

type ListPartnersResponse struct {
	// Partners: list of partners on current page.
	Partners []*Partner `json:"partners"`

	// TotalCount: total number of partners returned.
	TotalCount uint64 `json:"total_count"`
}

ListPartnersResponse: list partners response.

func (*ListPartnersResponse) UnsafeAppend

func (r *ListPartnersResponse) UnsafeAppend(res any) (uint64, error)

UnsafeAppend should not be used Internal usage only

func (*ListPartnersResponse) UnsafeGetTotalCount

func (r *ListPartnersResponse) UnsafeGetTotalCount() uint64

UnsafeGetTotalCount should not be used Internal usage only

type ListPopsRequest

type ListPopsRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// OrderBy: order in which to return results.
	// Default value: name_asc
	OrderBy ListPopsRequestOrderBy `json:"-"`

	// Page: page number to return.
	Page *int32 `json:"-"`

	// PageSize: maximum number of PoPs to return per page.
	PageSize *uint32 `json:"-"`

	// Name: poP name to filter for.
	Name *string `json:"-"`

	// HostingProviderName: hosting provider name to filter for.
	HostingProviderName *string `json:"-"`

	// PartnerID: filter for PoPs hosting an available shared connection from this partner.
	PartnerID *string `json:"-"`

	// LinkBandwidthMbps: filter for PoPs with a shared connection allowing this bandwidth size. Note that we cannot guarantee that PoPs returned will have available capacity.
	LinkBandwidthMbps *uint64 `json:"-"`

	// DedicatedAvailable: filter for PoPs with a dedicated connection available for self-hosted links.
	DedicatedAvailable *bool `json:"-"`
}

ListPopsRequest: list pops request.

type ListPopsRequestOrderBy

type ListPopsRequestOrderBy string

func (ListPopsRequestOrderBy) MarshalJSON

func (enum ListPopsRequestOrderBy) MarshalJSON() ([]byte, error)

func (ListPopsRequestOrderBy) String

func (enum ListPopsRequestOrderBy) String() string

func (*ListPopsRequestOrderBy) UnmarshalJSON

func (enum *ListPopsRequestOrderBy) UnmarshalJSON(data []byte) error

func (ListPopsRequestOrderBy) Values

type ListPopsResponse

type ListPopsResponse struct {
	// Pops: list of PoPs on the current page.
	Pops []*Pop `json:"pops"`

	// TotalCount: total number of PoPs.
	TotalCount uint64 `json:"total_count"`
}

ListPopsResponse: list pops response.

func (*ListPopsResponse) UnsafeAppend

func (r *ListPopsResponse) UnsafeAppend(res any) (uint64, error)

UnsafeAppend should not be used Internal usage only

func (*ListPopsResponse) UnsafeGetTotalCount

func (r *ListPopsResponse) UnsafeGetTotalCount() uint64

UnsafeGetTotalCount should not be used Internal usage only

type ListRoutingPoliciesRequest

type ListRoutingPoliciesRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// OrderBy: order in which to return results.
	// Default value: created_at_asc
	OrderBy ListRoutingPoliciesRequestOrderBy `json:"-"`

	// Page: page number to return.
	Page *int32 `json:"-"`

	// PageSize: maximum number of routing policies to return per page.
	PageSize *uint32 `json:"-"`

	// ProjectID: project ID to filter for.
	ProjectID *string `json:"-"`

	// OrganizationID: organization ID to filter for.
	OrganizationID *string `json:"-"`

	// Name: routing policy name to filter for.
	Name *string `json:"-"`

	// Tags: tags to filter for.
	Tags []string `json:"-"`

	// IPv6: filter for the routing policies based on IP prefixes version.
	IPv6 *bool `json:"-"`
}

ListRoutingPoliciesRequest: list routing policies request.

type ListRoutingPoliciesRequestOrderBy

type ListRoutingPoliciesRequestOrderBy string

func (ListRoutingPoliciesRequestOrderBy) MarshalJSON

func (enum ListRoutingPoliciesRequestOrderBy) MarshalJSON() ([]byte, error)

func (ListRoutingPoliciesRequestOrderBy) String

func (*ListRoutingPoliciesRequestOrderBy) UnmarshalJSON

func (enum *ListRoutingPoliciesRequestOrderBy) UnmarshalJSON(data []byte) error

func (ListRoutingPoliciesRequestOrderBy) Values

type ListRoutingPoliciesResponse

type ListRoutingPoliciesResponse struct {
	RoutingPolicies []*RoutingPolicy `json:"routing_policies"`

	TotalCount uint64 `json:"total_count"`
}

ListRoutingPoliciesResponse: list routing policies response.

func (*ListRoutingPoliciesResponse) UnsafeAppend

func (r *ListRoutingPoliciesResponse) UnsafeAppend(res any) (uint64, error)

UnsafeAppend should not be used Internal usage only

func (*ListRoutingPoliciesResponse) UnsafeGetTotalCount

func (r *ListRoutingPoliciesResponse) UnsafeGetTotalCount() uint64

UnsafeGetTotalCount should not be used Internal usage only

type Partner

type Partner struct {
	// ID: unique identifier of the partner.
	ID string `json:"id"`

	// Name: name of the partner.
	Name string `json:"name"`

	// ContactEmail: contact email address of partner.
	ContactEmail string `json:"contact_email"`

	// LogoURL: image URL of the partner's logo.
	LogoURL string `json:"logo_url"`

	// PortalURL: URL of the partner's portal.
	PortalURL string `json:"portal_url"`

	// CreatedAt: creation date of the partner.
	CreatedAt *time.Time `json:"created_at"`

	// UpdatedAt: last modification date of the partner.
	UpdatedAt *time.Time `json:"updated_at"`
}

Partner: partner.

type PartnerHost

type PartnerHost struct {
	// PartnerID: ID of the partner facilitating the link.
	PartnerID string `json:"partner_id"`

	// PairingKey: used to identify a link from a user or partner's point of view.
	PairingKey string `json:"pairing_key"`

	// DisapprovedReason: reason given by partner to explain why they did not approve the request for a hosted link.
	DisapprovedReason *string `json:"disapproved_reason"`
}

PartnerHost: partner host.

type Pop

type Pop struct {
	// ID: unique identifier of the PoP.
	ID string `json:"id"`

	// Name: name of the PoP. It is the common reference of Hosting DC (ex: TH2).
	Name string `json:"name"`

	// HostingProviderName: name of the PoP's hosting provider, e.g. Telehouse for TH2 or OpCore for DC3.
	HostingProviderName string `json:"hosting_provider_name"`

	// Address: physical address of the PoP.
	Address string `json:"address"`

	// City: city where PoP is located.
	City string `json:"city"`

	// LogoURL: image URL of the PoP's logo.
	LogoURL string `json:"logo_url"`

	// AvailableLinkBandwidthsMbps: available bandwidth in Mbits/s for future hosted links from available connections in this PoP.
	AvailableLinkBandwidthsMbps []uint64 `json:"available_link_bandwidths_mbps"`

	// Region: region of the PoP.
	Region scw.Region `json:"region"`
}

Pop: pop.

type RoutingPolicy

type RoutingPolicy struct {
	// ID: unique identifier of the routing policy.
	ID string `json:"id"`

	// ProjectID: project ID.
	ProjectID string `json:"project_id"`

	// OrganizationID: organization ID.
	OrganizationID string `json:"organization_id"`

	// Name: name of the routing policy.
	Name string `json:"name"`

	// Tags: list of tags associated with the routing policy.
	Tags []string `json:"tags"`

	// PrefixFilterIn: IP prefixes to accept from the peer (ranges of route announcements to accept).
	PrefixFilterIn []scw.IPNet `json:"prefix_filter_in"`

	// PrefixFilterOut: IP prefix filters to advertise to the peer (ranges of routes to advertise).
	PrefixFilterOut []scw.IPNet `json:"prefix_filter_out"`

	// CreatedAt: creation date of the routing policy.
	CreatedAt *time.Time `json:"created_at"`

	// UpdatedAt: last modification date of the routing policy.
	UpdatedAt *time.Time `json:"updated_at"`

	// IsIPv6: IP prefixes version of the routing policy.
	IsIPv6 bool `json:"is_ipv6"`

	// Region: region of the routing policy.
	Region scw.Region `json:"region"`
}

RoutingPolicy: routing policy.

type SelfHost

type SelfHost struct {
	// ConnectionID: dedicated physical connection supporting the link.
	ConnectionID string `json:"connection_id"`
}

SelfHost: self host.

type SetRoutingPolicyRequest

type SetRoutingPolicyRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// LinkID: ID of the link to set a routing policy from.
	LinkID string `json:"-"`

	// RoutingPolicyID: ID of the routing policy to be set.
	RoutingPolicyID string `json:"routing_policy_id"`
}

SetRoutingPolicyRequest: set routing policy request.

type UpdateLinkRequest

type UpdateLinkRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// LinkID: ID of the link to update.
	LinkID string `json:"-"`

	// Name: name of the link.
	Name *string `json:"name,omitempty"`

	// Tags: list of tags to apply to the link.
	Tags *[]string `json:"tags,omitempty"`

	// PeerAsn: for self-hosted links, AS Number to establish BGP session.
	PeerAsn *uint32 `json:"peer_asn,omitempty"`
}

UpdateLinkRequest: update link request.

type UpdateRoutingPolicyRequest

type UpdateRoutingPolicyRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// RoutingPolicyID: ID of the routing policy to update.
	RoutingPolicyID string `json:"-"`

	// Name: name of the routing policy.
	Name *string `json:"name,omitempty"`

	// Tags: list of tags to apply to the routing policy.
	Tags *[]string `json:"tags,omitempty"`

	// PrefixFilterIn: IP prefixes to accept from the peer (ranges of route announcements to accept).
	PrefixFilterIn *[]string `json:"prefix_filter_in,omitempty"`

	// PrefixFilterOut: IP prefix filters for routes to advertise to the peer (ranges of routes to advertise).
	PrefixFilterOut *[]string `json:"prefix_filter_out,omitempty"`
}

UpdateRoutingPolicyRequest: update routing policy request.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL