propagations

package
v0.0.0-...-63319d1 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MPL-2.0, Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(client *golangsdk.ServiceClient, instanceId, routeTableId string, opts DeleteOpts) error

Delete is a method to remove an existing propagation from a specified route table.

Types

type CreateOpts

type CreateOpts struct {
	// The ID of the VPC attachment.
	AttachmentId string `json:"attachment_id,omitempty"`
	// The export routing policy.
	RoutePolicy ImportRoutePolicy `json:"route_policy,omitempty"`
}

CreateOpts is the structure used to create a propagation to a specified route table.

type DeleteOpts

type DeleteOpts struct {
	// The ID of the VPC attachment.
	AttachmentId string `json:"attachment_id,omitempty"`
	// The export routing policy.
	RoutePolicy ImportRoutePolicy `json:"route_policy,omitempty"`
}

DeleteOpts is the structure used to remove a propagation from a specified route table.

type ImportRoutePolicy

type ImportRoutePolicy struct {
	// The import routing policy ID.
	ImportPoilicyId string `json:"import_policy_id,omitempty"`
}

ImportRoutePolicy is an object that represents the configuration of the import routing policy.

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 propagation 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 attachment IDs, support for querying multiple propagations.
	AttachmentIds []string `q:"attachment_id"`
	// The list of attachment resource types, support for querying multiple propagations.
	ResourceTypes []string `q:"resource_type"`
	// The list of current status of the propagations, support for querying multiple propagations.
	Statuses []string `q:"state"`
	// The list of keyword to sort the propagations 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 Propagation

type Propagation struct {
	// The ID of the propagation.
	ID string `json:"id"`
	// The ID of the project where the propagation is located.
	ProjectId string `json:"project_id"`
	// The ID of the ER instance to which the propagation belongs.
	InstanceId string `json:"er_id"`
	// The ID of the route table to which the association belongs.
	RouteTableId string `json:"route_table_id"`
	// The ID of the corresponding attachment.
	AttachmentId string `json:"attachment_id"`
	// The resource type for the corresponding attachment.
	ResourceType string `json:"resource_type"`
	// The resource ID for the corresponding attachment.
	ResourceId string `json:"resource_id"`
	// The configuration of the import routing policy.
	RoutePolicy ImportRoutePolicy `json:"route_policy"`
	// The current status of the propagation.
	Status string `json:"state"`
	// The creation time of the propagation.
	CreatedAt string `json:"created_at"`
	// The last update time of the propagation.
	UpdatedAt string `json:"updated_at"`
}

Propagation is the structure that represents the details of the propagation under route table.

func Create

func Create(client *golangsdk.ServiceClient, instanceId, routeTableId string, opts CreateOpts) (*Propagation, error)

Create is a method to create a new propagation under the route table.

func List

func List(client *golangsdk.ServiceClient, instanceId, routeTableId string, opts ListOpts) ([]Propagation, error)

List is a method to query the list of the propagations under specified route table using given opts.

type PropagationPage

type PropagationPage struct {
	pagination.MarkerPageBase
}

PropagationPage represents the response pages of the List method.

func (PropagationPage) IsEmpty

func (r PropagationPage) IsEmpty() (bool, error)

IsEmpty returns true if a ListResult no propagation.

func (PropagationPage) LastMarker

func (r PropagationPage) LastMarker() (string, error)

LastMarker returns the last marker index in a ListResult.

Jump to

Keyboard shortcuts

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