hosted_connect

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2025 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(c *golangsdk.ServiceClient, id string) (err error)

Types

type CreateOpts

type CreateOpts struct {
	// Specifies the hosted connection name.
	Name string `json:"name,omitempty"`
	// Provides supplementary information about the hosted connection.
	Description string `json:"description,omitempty"`
	// Specifies the bandwidth of the hosted connection, in Mbit/s.
	Bandwidth int `json:"bandwidth" required:"true"`
	// Specifies the ID of the operations connection on which the hosted connection is created.
	HostingID string `json:"hosting_id" required:"true"`
	// Specifies the VLAN allocated to the hosted connection.
	Vlan int `json:"vlan" required:"true"`
	// Specifies the project ID of the specified tenant for whom a hosted connection is to be created.
	ResourceTenantId string `json:"resource_tenant_id" required:"true"`
	// Specifies the location of the on-premises facility at the other end of the connection,
	// specific to the street or data center name.
	PeerLocation string `json:"peer_location,omitempty"`
}

type HcPage

type HcPage struct {
	pagination.NewSinglePageBase
}

type HostedConnect

type HostedConnect struct {
	// Specifies the hosted connection ID.
	ID string `json:"id"`
	// Specifies the project ID.
	TenantID string `json:"tenant_id"`
	// Specifies the connection name.
	Name string `json:"name"`
	// Provides supplementary information about the connection.
	Description string `json:"description"`
	// Specifies the connection bandwidth, in Mbit/s.
	Bandwidth int `json:"bandwidth"`
	// Specifies information about the Direct Connect location.
	Location string `json:"location"`
	// Specifies the location of the on-premises facility at the other end of the connection,
	// specific to the street or data center name.
	PeerLocation string `json:"peer_location"`
	// Specifies the ID of the operations connection on which the hosted connection is created.
	HostingId string `json:"hosting_id"`
	// Specifies the provider of the leased line.
	Provider string `json:"provider"`
	// Specifies the provider of the leased line.
	AdminStateUp bool `json:"admin_state_up"`
	// Specifies the VLAN allocated to the hosted connection.
	Vlan int `json:"vlan"`
	// Specifies the operating status.
	Status string `json:"status"`
	// Specifies when the connection was requested.
	// The UTC time format is yyyy-MM-ddTHH:mm:ss.SSSZ.
	ApplyTime string `json:"apply_time"`
	// Specifies when the connection was created.
	// The UTC time format is yyyy-MM-ddTHH:mm:ss.SSSZ.
	CreatedAt string `json:"create_time"`
	// Specifies the carrier status. The status can be ACTIVE or DOWN.
	ProviderStatus string `json:"provider_status"`
	// Specifies the type of the port used by the connection.
	// The value can be 1G, 10G, 40G, or 100G.
	PortType string `json:"port_type"`
	// Specifies the type of the connection. The value is hosted.
	Type string `json:"type"`
}

func Create

func ExtractHCs

func ExtractHCs(r pagination.NewPage) ([]HostedConnect, error)

func Get

Get retrieves a particular hosted connect based on its unique ID.

func List

func List(client *golangsdk.ServiceClient, opts ListOpts) ([]HostedConnect, error)

List is used to obtain the virtual gateway list

func Update

Update is an operation which modifies the attributes of the specified hosted connect

type ListOpts

type ListOpts struct {
	// virtual gateway by ID
	ID []string `q:"id,omitempty"`
	// Specifies the number of records returned on each page. Value range: 1-2000
	Limit int `q:"limit,omitempty"`
	// Specifies the ID of the last resource record on the previous page. If this parameter is left blank, the first page is queried.
	// This parameter must be used together with limit.
	Marker string `q:"marker,omitempty"`
	// Specifies the list of fields to be displayed.
	Fields []interface{} `q:"fields,omitempty"`
	// Specifies the sorting order of returned results. The value can be asc (default) or desc.
	SortDir string `q:"sort_dir,omitempty"`
	// Specifies the field for sorting.
	SortKey string `q:"sort_key,omitempty"`
	// Specifies operations connection ID by which hosted connections are queried.
	HostingId []string `q:"hosting_id,omitempty"`
	// Specifies the resource name by which instances are queried. You can specify multiple names.
	Name []string `q:"name,omitempty"`
}

type UpdateOpts

type UpdateOpts struct {
	// Provides supplementary information about the connection.
	Description string `json:"description,omitempty"`
	// Specifies the connection name.
	Name string `json:"name,omitempty"`
	// Specifies the bandwidth of the hosted connection, in Mbit/s.
	Bandwidth int `json:"bandwidth,omitempty"`
	// Specifies the location of the on-premises facility
	// at the other end of the connection, specific to the street or data center name.
	PeerLocation string `json:"peer_location,omitempty"`
}

Jump to

Keyboard shortcuts

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