global_connection_bandwidth

package
v0.9.9 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

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

Types

type AssociatedInstance

type AssociatedInstance struct {
	// Instance ID.
	ID string `json:"id"`
	// Instance type.
	Type string `json:"type"`
	// Region ID.
	RegionId string `json:"region_id"`
	// Project ID.
	ProjectId string `json:"project_id"`
}

AssociatedInstance is an instance associated with a global connection bandwidth.

type ConfigQuota

type ConfigQuota struct {
	// Quotas.
	Quota int `json:"quota"`
	// Used quotas.
	Used int `json:"used"`
	// Quota type. Value options: gcb.size, gcb.count.
	Type string `json:"type"`
}

ConfigQuota describes a quota in the tenant configuration.

type Configs

type Configs struct {
	// Capacity of global connection bandwidths by billing option.
	SizeRange []SizeRange `json:"size_range"`
	// List of supported billing options.
	ChargeMode []string `json:"charge_mode"`
	// Instance type.
	Services []string `json:"services"`
	// Bandwidth type.
	GcbType []string `json:"gcb_type"`
	// Percentage of minimum bandwidth in enhanced 95th percentile billing.
	Ratio95PeakPlus int `json:"ratio_95peak_plus"`
	// Percentage of minimum bandwidth in standard 95th percentile billing.
	Ratio95PeakGuar int `json:"ratio_95peak_guar"`
	// Whether a cross-border permit is approved.
	Crossborder bool `json:"crossborder"`
	// Quota information.
	Quotas []ConfigQuota `json:"quotas"`
	// Line grade.
	SlaLevel []string `json:"sla_level"`
	// Maximum number of instances that are allowed to use a shared bandwidth.
	BindLimit int `json:"bind_limit"`
	// Whether to enable the geographic region bandwidth.
	EnableAreaBandwidth bool `json:"enable_area_bandwidth"`
	// Whether standard 95th percentile bandwidth billing can be changed to billing by bandwidth.
	EnableChange95 bool `json:"enable_change_95"`
	// Whether multiple line specifications are supported.
	EnableSpecCode bool `json:"enable_spec_code"`
	// Whether to enable Cloud Eye monitoring.
	CesEnabled bool `json:"ces_enabled"`
}

Configs describes the tenant configuration of global connection bandwidth.

type ConfigsResp

type ConfigsResp struct {
	// Request ID.
	RequestId string `json:"request_id"`
	// Dynamic configuration items for purchasing global connection bandwidth.
	Configs Configs `json:"configs"`
}

func GetConfigs

func GetConfigs(client *golangsdk.ServiceClient) (*ConfigsResp, error)

GetConfigs queries the tenant configuration of a global connection bandwidth.

type CreateOpts

type CreateOpts struct {
	// Instance name.
	Name string `json:"name" required:"true"`
	// Resource description. Angle brackets (<>) are not allowed.
	Description string `json:"description,omitempty"`
	// Cross-border attribute.
	Bordercross *bool `json:"bordercross" required:"true"`
	// Bandwidth type. Value options: Area, TrsArea, SubArea, Region.
	Type string `json:"type" required:"true"`
	// ID of the enterprise project that the resource belongs to.
	EnterpriseProjectId string `json:"enterprise_project_id,omitempty"`
	// Billing option. Value options: bwd, 95, 95avr.
	ChargeMode string `json:"charge_mode" required:"true"`
	// Capacity of a global connection bandwidth, in Mbit/s. Value range: 2 to 300.
	Size int `json:"size" required:"true"`
	// Service tier. Value options: Pt (Platinum), Au (Gold), Ag (Silver).
	SlaLevel string `json:"sla_level,omitempty"`
	// Local access point.
	LocalArea string `json:"local_area,omitempty"`
	// Remote access point.
	RemoteArea string `json:"remote_area,omitempty"`
	// UUID of the line specification code.
	SpecCodeId string `json:"spec_code_id,omitempty"`
}

type DirectionalConnection

type DirectionalConnection struct {
	// Connection name.
	Name string `json:"name"`
	// Connection ID.
	ID string `json:"id"`
	// Local access point code.
	LocalSiteCode string `json:"local_site_code"`
	// Remote access point code.
	RemoteSiteCode string `json:"remote_site_code"`
}

DirectionalConnection is a directional connection of a global connection bandwidth.

type GlobalConnectionBandwidth

type GlobalConnectionBandwidth struct {
	// Instance ID.
	ID string `json:"id"`
	// Instance name.
	Name string `json:"name"`
	// Resource description.
	Description string `json:"description"`
	// Account ID.
	DomainId string `json:"domain_id"`
	// Cross-border attribute.
	Bordercross bool `json:"bordercross"`
	// Bandwidth type.
	Type string `json:"type"`
	// Service binding type. Value options: CC, GEIP, GCN, GSN, ALL.
	BindingService string `json:"binding_service"`
	// ID of the enterprise project that the resource belongs to.
	EnterpriseProjectId string `json:"enterprise_project_id"`
	// Billing option.
	ChargeMode string `json:"charge_mode"`
	// Capacity in Mbit/s.
	Size int `json:"size"`
	// Service tier.
	SlaLevel string `json:"sla_level"`
	// Local access point.
	LocalArea string `json:"local_area"`
	// Remote access point.
	RemoteArea string `json:"remote_area"`
	// Local access point code.
	LocalSiteCode string `json:"local_site_code"`
	// Remote access point code.
	RemoteSiteCode string `json:"remote_site_code"`
	// Status. Value options: NORMAL, FREEZED.
	AdminState string `json:"admin_state"`
	// Freeze status.
	Frozen bool `json:"frozen"`
	// UUID of the line specification code.
	SpecCodeId string `json:"spec_code_id"`
	// Time when the resource was created.
	CreatedAt string `json:"created_at"`
	// Time when the resource was updated.
	UpdatedAt string `json:"updated_at"`
	// Whether the bandwidth can be used by multiple instances.
	EnableShare bool `json:"enable_share"`
	// ID of the enterprise project that the resource belongs to.
	EpsId string `json:"eps_id"`
	// Associated instances.
	Instances []AssociatedInstance `json:"instances"`
	// Directional connections.
	DirectionalConnections []DirectionalConnection `json:"directional_connections"`
}

GlobalConnectionBandwidth is a global connection bandwidth instance.

type ListGlobalConnectionBandwidthResp

type ListGlobalConnectionBandwidthResp struct {
	// Request ID.
	RequestId string `json:"request_id"`
	// Pagination query information.
	PageInfo PageInfo `json:"page_info"`
	// Global connection bandwidth list.
	GlobalConnectionBandwidths []GlobalConnectionBandwidth `json:"globalconnection_bandwidths"`
}

func ListSupportBindings

ListSupportBindings queries the list of global connection bandwidths that meet the binding conditions.

type ListOpts

type ListOpts struct {
	// Number of records returned on each page. Value range: 1 to 2000.
	Limit int `q:"limit"`
	// ID of the last record on the previous page.
	Marker string `q:"marker"`
	// Filter by resource IDs.
	ID []string `q:"id"`
	// Filter by resource names.
	Name []string `q:"name"`
	// Filter by enterprise project IDs.
	EnterpriseProjectId []string `q:"enterprise_project_id"`
	// Filter by instance IDs.
	InstanceId []string `q:"instance_id"`
	// Filter by instance types.
	InstanceType []string `q:"instance_type"`
	// Filter by service binding types.
	BindingService []string `q:"binding_service"`
	// Filter by bandwidth types.
	Type []string `q:"type"`
	// Filter by status.
	AdminState []string `q:"admin_state"`
	// Filter by billing options.
	ChargeMode []string `q:"charge_mode"`
}

type ListSitesOpts

type ListSitesOpts struct {
	// Number of records returned on each page. Value range: 1 to 2000.
	Limit int `q:"limit"`
	// ID of the last record on the previous page.
	Marker string `q:"marker"`
	// Filter by resource IDs.
	ID []string `q:"id"`
	// Site name in English.
	NameEn string `q:"name_en"`
	// Site name in Chinese.
	NameCn string `q:"name_cn"`
	// Site code.
	SiteCode string `q:"site_code"`
	// Site type. Value options: Area, SubArea, Region.
	SiteType string `q:"site_type"`
}

type ListSitesResp

type ListSitesResp struct {
	// Request ID.
	RequestId string `json:"request_id"`
	// Total number of records.
	TotalCount int `json:"total_count"`
	// Pagination query information.
	PageInfo PageInfo `json:"page_info"`
	// Site list.
	SiteInfos []Site `json:"site_infos"`
}

func ListSites

func ListSites(client *golangsdk.ServiceClient, opts ListSitesOpts) (*ListSitesResp, error)

ListSites queries the site list.

type ListSupportBindingsOpts

type ListSupportBindingsOpts struct {
	// Number of records returned on each page. Value range: 1 to 2000.
	Limit int `q:"limit"`
	// ID of the last record on the previous page.
	Marker string `q:"marker"`
	// Filter by enterprise project IDs.
	EnterpriseProjectId []string `q:"enterprise_project_id"`
	// Local access point.
	LocalArea string `q:"local_area"`
	// Remote access point.
	RemoteArea string `q:"remote_area"`
	// Bound instance type. Value options: CC, GEIP, GCN, GSN.
	BindingService string `q:"binding_service" required:"true"`
}

type PageInfo

type PageInfo struct {
	// Marker of the next page.
	NextMarker string `json:"next_marker"`
	// Marker of the previous page.
	PreviousMarker string `json:"previous_marker"`
	// Number of records in the current page.
	CurrentCount int `json:"current_count"`
}

PageInfo is the pagination information returned by list operations.

type Site

type Site struct {
	// Instance ID.
	ID string `json:"id"`
	// Resource description.
	Description string `json:"description"`
	// Time when the resource was created.
	CreatedAt string `json:"created_at"`
	// Time when the resource was updated.
	UpdatedAt string `json:"updated_at"`
	// Region ID.
	RegionId string `json:"region_id"`
	// English site name.
	NameEn string `json:"name_en"`
	// Chinese site name.
	NameCn string `json:"name_cn"`
	// Site code.
	SiteCode string `json:"site_code"`
	// Site type. Value options: Area, SubArea, Region.
	SiteType string `json:"site_type"`
	// Comma-separated supported services.
	ServiceList string `json:"service_list"`
	// Center or edge site designation.
	PublicBorderGroup string `json:"public_border_group"`
	// Groups the site belongs to.
	GroupList []SiteGroupReference `json:"group_list"`
}

Site describes a global connection bandwidth site.

type SiteGroupReference

type SiteGroupReference struct {
	// Group instance ID.
	ID string `json:"id"`
	// Group description.
	Description string `json:"description"`
	// English group name.
	NameEn string `json:"name_en"`
	// Chinese group name.
	NameCn string `json:"name_cn"`
}

SiteGroupReference describes a site group reference.

type SizeRange

type SizeRange struct {
	// Billing option. Value options: bwd, 95, 95avr.
	Type string `json:"type"`
	// Minimum bandwidth in Mbit/s.
	Min int `json:"min"`
	// Maximum bandwidth in Mbit/s.
	Max int `json:"max"`
}

SizeRange describes the bandwidth capacity range for a billing option.

type UpdateOpts

type UpdateOpts struct {
	// Instance ID.
	ID string `json:"-" required:"true"`
	// Instance name.
	Name string `json:"name,omitempty"`
	// Resource description. Angle brackets (<>) are not allowed.
	Description *string `json:"description,omitempty"`
	// Capacity in Mbit/s. Value range: 2 to 300.
	Size int `json:"size,omitempty"`
	// Billing option. Value options: bwd, 95, 95avr.
	ChargeMode string `json:"charge_mode,omitempty"`
	// Service tier. Value options: Pt, Au, Ag.
	SlaLevel string `json:"sla_level,omitempty"`
	// Instance type. Value options: CC, GEIP, GCN, GSN, ALL.
	BindingService string `json:"binding_service,omitempty"`
	// UUID of the line specification code.
	SpecCodeId string `json:"spec_code_id,omitempty"`
}

Jump to

Keyboard shortcuts

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