Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CreateOpts ¶
type CreateOpts struct {
RouterID string `json:"-" required:"true"`
VpcId string `json:"vpc_id" required:"true"`
Name string `json:"name" required:"true"`
SubnetId string `json:"virsubnet_id" required:"true"`
Description string `json:"description,omitempty"`
AutoCreateVpcRoutes bool `json:"auto_create_vpc_routes,omitempty"`
// Feature not available
// Ipv6Enable bool `json:"ipv6_enable,omitempty"`
Tags []tags.ResourceTag `json:"tags,omitempty"`
}
type ListOpts ¶
type ListOpts struct {
RouterId string `json:"-"`
// 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"`
// Attachment status
State []string `q:"state"`
// Query by resource ID. Multiple resources can be queried at a time.
ID []string `q:"id"`
// Keyword for sorting. The keyword can be id, name, or state. By default, id is used.
SortKey []string `q:"sort_key"`
// Sorting order
SortDir []string `q:"sort_dir"`
// Vpc ID
VpcId string `q:"vpc_id"`
}
type ListVpcAttachmentDetails ¶
type ListVpcAttachmentDetails struct {
VpcAttachments []VpcAttachmentDetails `json:"vpc_attachments"`
PageInfo *PageInfo `json:"page_info"`
RequestId string `json:"request_id"`
}
func List ¶
func List(client *golangsdk.ServiceClient, opts ListOpts) (*ListVpcAttachmentDetails, error)
type UpdateOpts ¶
type VpcAttachmentDetails ¶
type VpcAttachmentDetails struct {
ID string `json:"id"`
Name string `json:"name"`
VpcId string `json:"vpc_id"`
SubnetId string `json:"virsubnet_id"`
AutoCreateVpcRoutes bool `json:"auto_create_vpc_routes"`
State string `json:"state"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
Tags []tags.ResourceTag `json:"tags"`
Description string `json:"description"`
ProjectId string `json:"project_id"`
VpcProjectId string `json:"vpc_project_id"`
Ipv6Enable bool `json:"ipv6_enable"`
}
func Create ¶
func Create(client *golangsdk.ServiceClient, opts CreateOpts) (*VpcAttachmentDetails, error)
func Update ¶
func Update(client *golangsdk.ServiceClient, opts UpdateOpts) (*VpcAttachmentDetails, error)
type VpcAttachmentsResp ¶
type VpcAttachmentsResp struct {
// VPC attachment
VpcAttachment *VpcAttachmentDetails `json:"vpc_attachment"`
// Request ID
RequestID string `json:"request_id"`
}
func Get ¶
func Get(client *golangsdk.ServiceClient, erID, vpcID string) (*VpcAttachmentsResp, error)
Click to show internal directories.
Click to hide internal directories.