endpoints

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WaitForEndpointStatus

func WaitForEndpointStatus(client *golangsdk.ServiceClient, id string, status Status, timeout int) error

Types

type BatchUpdateReq added in v0.8.0

type BatchUpdateReq struct {
	Permissions []string `json:"permissions" required:"true"`
	Action      string   `json:"action" required:"true"`
}

type BatchUpdateResponse added in v0.8.0

type BatchUpdateResponse struct {
	Permissions []string `json:"permissions"`
}

func BatchUpdateWhitelist added in v0.8.0

func BatchUpdateWhitelist(client *golangsdk.ServiceClient, id string, opts BatchUpdateReq) (*BatchUpdateResponse, error)

type CreateOpts

type CreateOpts struct {
	// The value must be the ID of the subnet created in the VPC specified by vpc_id and in the format of the UUID.
	// This parameter is mandatory only if you create a VPC endpoint for connecting to an interface VPC endpoint service.
	NetworkID string `json:"subnet_id,omitempty"`

	// Specifies the ID of the VPC endpoint service.
	ServiceID string `json:"endpoint_service_id" required:"true"`

	// Specifies the ID of the VPC where the VPC endpoint is to be created.
	RouterID string `json:"vpc_id" required:"true"`

	// Specifies whether to create a private domain name.
	EnableDNS bool `json:"enable_dns"`

	// Lists the resource tags.
	Tags []tags.ResourceTag `json:"tags,omitempty"`

	// Lists the IDs of route tables.
	// This parameter is mandatory only if you create a VPC endpoint for connecting to a `gateway` VPC endpoint service.
	RouteTables []string `json:"routetables,omitempty"`

	// Specifies the IP address for accessing the associated VPC endpoint service.
	// This parameter is mandatory only if you create a VPC endpoint for connecting to an `interface` VPC endpoint service.
	PortIP string `json:"port_ip,omitempty"`

	// Specifies the whitelist for controlling access to the VPC endpoint.
	//
	// IPv4 addresses or CIDR blocks can be specified to control access when you create a VPC endpoint.
	//
	// This parameter is mandatory only when you create a VPC endpoint for connecting to an interface VPC endpoint service.
	Whitelist []string `json:"whitelist,omitempty"`

	// Specifies whether to enable access control.
	EnableWhitelist *bool `json:"enable_whitelist,omitempty"`
}

func (CreateOpts) ToEndpointCreateMap

func (opts CreateOpts) ToEndpointCreateMap() (map[string]interface{}, error)

type CreateOptsBuilder

type CreateOptsBuilder interface {
	ToEndpointCreateMap() (map[string]interface{}, error)
}

type CreateResult

type CreateResult struct {
	// contains filtered or unexported fields
}

func Create

func Create(client *golangsdk.ServiceClient, opts CreateOptsBuilder) (r CreateResult)

func (CreateResult) Extract

func (r CreateResult) Extract() (*Endpoint, error)

type DeleteResult

type DeleteResult struct {
	golangsdk.ErrResult
}

func Delete

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

type Endpoint

type Endpoint struct {
	// Specifies the unique ID of the VPC endpoint.
	ID string `json:"id"`

	// Specifies the type of the VPC endpoint service that is associated with the VPC endpoint.
	ServiceType services.ServiceType `json:"service_type"`

	// Specifies the packet ID of the VPC endpoint.
	MarkerID int `json:"marker_id"`

	// Specifies the connection status of the VPC endpoint.
	//
	//    pendingAcceptance: indicates that the VPC endpoint is pending acceptance.
	//    creating: indicates the VPC endpoint is being created.
	//    accepted: indicates the VPC endpoint has been accepted.
	//    failed: indicates the creation of the VPC endpoint failed.
	Status Status `json:"status"`

	// Specifies the domain status.
	//    frozen: indicates that the domain is frozen.
	//    active: indicates that the domain is normal.
	ActiveStatus []string `json:"active_status"`

	// Specifies the ID of the VPC where the VPC endpoint is to be created.
	RouterID string `json:"vpc_id"`

	// Specifies the ID of the subnet (OS network) in the VPC specified by `vpc_id`. The value is in the UUID format.
	NetworkID string `json:"subnet_id"`

	// Specifies whether to create a private domain name.
	EnableDNS bool `json:"enable_dns"`

	// Specifies the domain name for accessing the associated VPC endpoint service.
	DNSNames []string `json:"dns_names"`

	// Specifies the IP address for accessing the associated VPC endpoint service.
	IP string `json:"ip"`

	// Specifies the name of the VPC endpoint service.
	ServiceName string `json:"endpoint_service_name"`

	// Specifies the ID of the VPC endpoint service.
	ServiceID string `json:"endpoint_service_id"`

	// Specifies the project ID.
	ProjectID string `json:"project_id"`

	// Specifies the whitelist for controlling access to the VPC endpoint.
	Whitelist []string `json:"whitelist"`

	// Specifies whether to enable access control.
	EnableWhitelist bool `json:"enable_whitelist"`

	// Lists the IDs of route tables.
	RouteTables []string `json:"routetables"`

	// Specifies the creation time of the VPC endpoint.
	CreatedAt string `json:"created_at"`

	// Specifies the update time of the VPC endpoint.
	UpdatedAt string `json:"updated_at"`

	// Lists the resource tags.
	Tags []tags.ResourceTag `json:"tags"`
}

func ExtractEndpoints

func ExtractEndpoints(p pagination.Page) ([]Endpoint, error)

type EndpointPage

type EndpointPage struct {
	pagination.OffsetPageBase
}

func (EndpointPage) IsEmpty

func (p EndpointPage) IsEmpty() (bool, error)

type GetResult

type GetResult struct {
	// contains filtered or unexported fields
}

func Get

func Get(client *golangsdk.ServiceClient, id string) (r GetResult)

func (GetResult) Extract

func (r GetResult) Extract() (*Endpoint, error)

type GetWhitelistResponse added in v0.8.0

type GetWhitelistResponse struct {
	Permissions []Permission `json:"permissions"`
	TotalCount  int          `json:"total_count"`
}

func GetWhitelist added in v0.8.0

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

type ListOpts

type ListOpts struct {
	ServiceName string `q:"endpoint_service_name"`
	RouterID    string `q:"vpc_id"`
	ID          string `q:"id"`
	SortKey     string `q:"sort_key"`
	SortDir     string `q:"sort_dir"`
}

func (ListOpts) ToEndpointListQuery

func (opts ListOpts) ToEndpointListQuery() (string, error)

type ListOptsBuilder

type ListOptsBuilder interface {
	ToEndpointListQuery() (string, error)
}

type Permission added in v0.8.0

type Permission struct {
	Id         string `json:"id"`
	Permission string `json:"permission"`
	CreatedAt  string `json:"created_at"`
}

type Status

type Status string
const (
	StatusPendingAcceptance Status = "pendingAcceptance"
	StatusCreating          Status = "creating"
	StatusAccepted          Status = "accepted"
	StatusFailed            Status = "failed"
)

type UpdateResult

type UpdateResult struct {
	// contains filtered or unexported fields
}

func (UpdateResult) Extract

func (r UpdateResult) Extract() (*Endpoint, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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