Documentation ¶
Index ¶
- func Delete(client *golangsdk.ServiceClient, instanceId, routeTableId string) error
- type BgpOptions
- type CreateOpts
- type ListOpts
- type RouteTable
- func Create(client *golangsdk.ServiceClient, instanceId string, opts CreateOpts) (*RouteTable, error)
- func Get(client *golangsdk.ServiceClient, instanceId, routeTableId string) (*RouteTable, error)
- func List(client *golangsdk.ServiceClient, instanceId string, opts ListOpts) ([]RouteTable, error)
- func Update(client *golangsdk.ServiceClient, instanceId, routeTableId string, ...) (*RouteTable, error)
- type RouteTablePage
- type UpdateOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BgpOptions ¶
type BgpOptions struct { // Whether the AS path attributes of the routes are not compared during load balancing. LoadBalancingAsPathIgnore *bool `json:"load_balancing_as_path_ignore,omitempty"` // Whether the AS path attributes of the same length are not compared during load balancing. LoadBalancingAsPathRelax *bool `json:"load_balancing_as_path_relax,omitempty"` }
BgpOptions is an object that represents the BGP configuration for routing.
type CreateOpts ¶
type CreateOpts struct { // The name of the route table. // The value can contain 1 to 64 characters, only english and chinese letters, digits, underscore (_), hyphens (-) // and dots (.) are allowed. Name string `json:"name" required:"true"` // The description of the route table. // The value contain a maximum of 255 characters, and the angle brackets (< and >) are not allowed. Description string `json:"description,omitempty"` // The configuration of the BGP route selection. BgpOptions BgpOptions `json:"bgp_options,omitempty"` // The key/value pairs to associate with the route table. Tags []tags.ResourceTag `json:"tags,omitempty"` }
CreateOpts is the structure required by the 'Create' method to create a route table under a specified ER instance.
type ListOpts ¶
type ListOpts struct { // Number of records to be queried. // The valid value is range from 0 to 2000. Limit int `q:"limit"` // The ID of the route table of the last record on the previous page. // If it is empty, it is the first page of the query. // This parameter must be used together with limit. // The valid value is range from 1 to 128. Marker string `q:"marker"` // The list of current status of the route tables, support for querying multiple route tables. Status []string `q:"state"` // Whether this route table is the default association route table. IsDefaultAssociation bool `q:"is_default_association"` // Whether this route table is the default propagation route table. IsDefaultPropagation bool `q:"is_default_propagation"` // The list of keyword to sort the route tables result, sort by ID by default. // The optional values are as follow: // + id // + name // + state SortKey []string `q:"sort_key"` // The returned results are arranged in ascending or descending order, the default is asc. SortDir []string `q:"sort_dir"` }
ListOpts allows to filter list data using given parameters.
type RouteTable ¶
type RouteTable struct { // The ID of the route table. ID string `json:"id"` // The name of the route table. // The value can contain 1 to 64 characters, only english and chinese letters, digits, underscore (_), hyphens (-) // and dots (.) are allowed. Name string `json:"name"` // The description of the route table. // The value contain a maximum of 255 characters, and the angle brackets (< and >) are not allowed. Description string `json:"description"` // The configuration of the BGP route selection. BgpOptions BgpOptions `json:"bgp_options"` // The key/value pairs to associate with the route table. Tags []tags.ResourceTag `json:"tags"` // Whether this route table is the default association route table. IsDefaultAssociation bool `json:"is_default_association"` // Whether this route table is the default propagation route table. IsDefaultPropagation bool `json:"is_default_propagation"` // The current status of the route table. Status string `json:"state"` // The creation time of the route table. CreatedAt string `json:"created_at"` // The last update time of the route table. UpdatedAt string `json:"updated_at"` }
RouteTable is the structure that represents the details of the route table for ER service.
func Create ¶
func Create(client *golangsdk.ServiceClient, instanceId string, opts CreateOpts) (*RouteTable, error)
Create is a method to create a new route table under a specified ER instance using given parameters.
func Get ¶
func Get(client *golangsdk.ServiceClient, instanceId, routeTableId string) (*RouteTable, error)
Get is a method to obtain the route table details under a specified ER instance.
func List ¶
func List(client *golangsdk.ServiceClient, instanceId string, opts ListOpts) ([]RouteTable, error)
List is a method to query the list of the route tables under a specified ER instance using given parameters.
func Update ¶
func Update(client *golangsdk.ServiceClient, instanceId, routeTableId string, opts UpdateOpts) (*RouteTable, error)
Update is a method to update the route table under a specified ER instance using parameters.
type RouteTablePage ¶
type RouteTablePage struct {
pagination.MarkerPageBase
}
RouteTablePage represents the response pages of the List method.
func (RouteTablePage) IsEmpty ¶
func (r RouteTablePage) IsEmpty() (bool, error)
IsEmpty returns true if a ListResult no route table.
func (RouteTablePage) LastMarker ¶
func (r RouteTablePage) LastMarker() (string, error)
LastMarker returns the last marker index in a ListResult.
type UpdateOpts ¶
type UpdateOpts struct { // The name of the route table. // The value can contain 1 to 64 characters, only english and chinese letters, digits, underscore (_), hyphens (-) // and dots (.) are allowed. Name string `json:"name,omitempty"` // The description of the route table. // The value contain a maximum of 255 characters, and the angle brackets (< and >) are not allowed. Description *string `json:"description,omitempty"` }
UpdateOpts is the structure required by the 'Update' method to update the route table configuration.