Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CreateOpts ¶
type CreateOpts struct {
// Enterprise router name. The value can contain 1 to 64 characters, including letters, digits,
// underscores (_), hyphens (-), and periods (.).
Name string `json:"name" required:"true"`
// Supplementary information about an enterprise router
Description string `json:"description,omitempty"`
// Enterprise router BGP ASN. Specify a dedicated ASN in the range of 64512-65534 or 4200000000-4294967294.
// ASN can only be set during enterprise router creation.
Asn float64 `json:"asn" required:"true"`
// Default: postPaid
ChargeMode string `json:"charge_mode,omitempty"`
// Tag information
Tags []tag.ResourceTag `json:"tags,omitempty"`
//
// Whether to enable the Default Route Table Propagation function.
// The default value is false, indicating that the function is disabled.
EnableDefaultPropagation *bool `json:"enable_default_propagation,omitempty"`
// Whether to enable the Default Route Table Association function.
EnableDefaultAssociation *bool `json:"enable_default_association,omitempty"`
// AZs where the enterprise router is located
AvailabilityZoneIDs []string `json:"availability_zone_ids" required:"true"`
AutoAcceptSharedAttachments *bool `json:"auto_accept_shared_attachments,omitempty"`
// Enterprise router CIDR block. This parameter is not supported for now.
CidrBlocks []string `json:"cidr_blocks,omitempty"`
}
type ListOpts ¶
type ListOpts struct {
// ID of the last enterprise router 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"`
// Number of records on each page. Value range: 0 to 2000
Limit int `q:"limit"`
// Enterprise router status. Value options: pending, available, modifying, deleting, deleted, failed and freezed
State []string `q:"state"`
// Query by resource ID. Multiple resources can be queried at a time.
ID []string `q:"id"`
// Attachment resource IDs
ResourceID []string `q:"resource_id"`
// Keyword for sorting. The keyword can be id, name, or state. By default, id is used.
SortKey []string `q:"sort_key"`
//
// Sorting order. There are two value options: asc (ascending order) and desc (descending order).
SortDir []string `q:"sort_dir"`
}
type ListRouterInstanceResp ¶
type ListRouterInstanceResp struct {
// Enterprise routers
Instances []RouterInstance `json:"instances"`
// Request ID
RequestID string `json:"request_id"`
// Pagination query information
PageInfo PageInfo `json:"page_info"`
}
func List ¶
func List(client *golangsdk.ServiceClient, opts ListOpts) (*ListRouterInstanceResp, error)
type RouterInstance ¶
type RouterInstance struct {
// Enterprise router ID
ID string `json:"id"`
// Enterprise router name
Name string `json:"name"`
// Supplementary information about an enterprise router
Description string `json:"description"`
// Enterprise router status.
State string `json:"state"`
// Tag information
Tags []tag.ResourceTag `json:"tags"`
// Default: postPaid
ChargeMode string `json:"charge_mode"`
// Creation time in the format YYYY-MM-DDTHH:mm:ss.sssZ
CreatedAt string `json:"created_at"`
// Update time in the format YYYY-MM-DDTHH:mm:ss.sssZ
UpdatedAt string `json:"updated_at"`
// Project ID
ProjectID string `json:"project_id"`
// Enterprise router BGP ASN
Asn float64 `json:"asn"`
// Whether to enable the Default Route Table Propagation function.
EnableDefaultPropagation bool `json:"enable_default_propagation"`
// Whether to enable the Default Route Table Association function.
EnableDefaultAssociation bool `json:"enable_default_association"`
// Default propagation route table ID
DefaultPropagationRouteTableID string `json:"default_propagation_route_table_id"`
// Default association route table ID
DefaultAssociationRouteTableID string `json:"default_association_route_table_id"`
// AZs where the enterprise router is located
AvailabilityZoneIDs []string `json:"availability_zone_ids"`
AutoAcceptSharedAttachments bool `json:"auto_accept_shared_attachments"`
// Enterprise router CIDR block. This parameter is not supported for now.
CidrBlocks []string `json:"cidr_blocks"`
}
type RouterInstanceResp ¶
type RouterInstanceResp struct {
// Enterprise router
Instance *RouterInstance `json:"instance"`
// Request ID
RequestID string `json:"request_id"`
}
func Create ¶
func Create(client *golangsdk.ServiceClient, opts CreateOpts) (*RouterInstanceResp, error)
func Get ¶
func Get(client *golangsdk.ServiceClient, instanceID string) (*RouterInstanceResp, error)
func Update ¶
func Update(client *golangsdk.ServiceClient, opts UpdateOpts) (*RouterInstanceResp, error)
type UpdateOpts ¶
type UpdateOpts struct {
// Enterprise router ID
InstanceID string `json:"-"`
// Enterprise router name. The value can contain 1 to 64 characters, including letters,
// digits, underscores (_), hyphens (-), and periods (.).
Name string `json:"name,omitempty"`
// Supplementary information about an enterprise router
Description string `json:"description,omitempty"`
// Whether to enable Default Route Table Propagation.
EnableDefaultPropagation *bool `json:"enable_default_propagation,omitempty"`
// Whether to enable Default Route Table Association.
EnableDefaultAssociation *bool `json:"enable_default_association,omitempty"`
// Default propagation route table ID
DefaultPropagationRouteTableID string `json:"default_propagation_route_table_id,omitempty"`
// Default association route table ID
DefaultAssociationRouteTableID string `json:"default_association_route_table_id,omitempty"`
AutoAcceptSharedAttachments *bool `json:"auto_accept_shared_attachments,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.