endpoints

package
v0.0.0-...-57791d6 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: Apache-2.0 Imports: 2 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateOpts

type CreateOpts struct {
	// 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
	VpcID string `json:"vpc_id" required:"true"`

	// Specifies the network ID of the subnet created in the VPC specified by vpc_id
	// The parameter is mandatory to create an interface VPC endpoint
	SubnetID string `json:"subnet_id,omitempty"`
	// Specifies whether to create a private domain name
	EnableDNS *bool `json:"enable_dns,omitempty"`
	// Specifies the resource tags in key/value format
	Tags []tags.ResourceTag `json:"tags,omitempty"`
	// Specifies the IDs of route tables
	// The parameter is mandatory to create a gateway type VPC endpoint
	// If the parameter is not set, will be associated with the default route table
	RouteTables []string `json:"routetables,omitempty"`
	// Specifies the IP address for accessing the associated VPC endpoint service
	PortIP string `json:"port_ip,omitempty"`
	// Specifies the whitelist for controlling access to the VPC endpoint
	Whitelist []string `json:"whitelist,omitempty"`
	// Specifies whether to enable access control
	EnableWhitelist *bool `json:"enable_whitelist,omitempty"`
	// Specifies the description of the VPC endpoint service
	Description string `json:"description,omitempty"`
	// Specifies the endpoint policy information for the gateway type
	PolicyStatement []PolicyStatement `json:"policy_statement,omitempty"`
	// Specifies the IP version
	IPVersion string `json:"ip_version,omitempty"`
	// Specifies the IPv6 address
	IPv6Address string `json:"ipv6_address,omitempty"`
}

CreateOpts contains the options for create a VPC endpoint This object is passed to Create().

func (CreateOpts) ToEndpointCreateMap

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

ToEndpointCreateMap assembles a request body based on the contents of a CreateOpts.

type CreateOptsBuilder

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

CreateOptsBuilder allows extensions to add parameters to the Create request.

type CreateResult

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

CreateResult represents the result of a create operation. Call its Extract method to interpret it as a Endpoint.

func Create

Create accepts a CreateOpts struct and uses the values to create a new VPC endpoint

func (CreateResult) Extract

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

Extract is a function that accepts a result and extracts a Endpoint

type DeleteResult

type DeleteResult struct {
	golangsdk.ErrResult
}

DeleteResult represents the result of a delete operation. Call its ExtractErr method to determine if the request succeeded or failed.

func Delete

func Delete(c *golangsdk.ServiceClient, endpointID string) (r DeleteResult)

Delete will permanently delete a particular VPC endpoint based on its unique ID

type Endpoint

type Endpoint struct {
	// the ID of the VPC endpoint
	ID string `json:"id"`
	// the type of the VPC endpoint service that is associated with the VPC endpoint
	ServiceType string `json:"service_type"`
	// the connection status of the VPC endpoint
	Status string `json:"status"`
	// the account status: frozen or active
	ActiveStatus []string `json:"active_status"`
	// the endpoint status is enabled: enable or disable
	EnableStatus string `json:"enable_status"`
	// the specification name of VPC endpoint
	SpecificationName string `json:"specification_name"`
	// the name of the VPC endpoint service
	ServiceName string `json:"endpoint_service_name"`
	// the packet ID of the VPC endpoint
	MarkerID int `json:"marker_id"`
	// the ID of the VPC endpoint service
	ServiceID string `json:"endpoint_service_id"`
	// whether to create a private domain name
	EnableDNS bool `json:"enable_dns"`
	// the domain name for accessing the associated VPC endpoint service
	DNSNames []string `json:"dns_names"`
	// the IP address for accessing the associated VPC endpoint service
	IPAddr string `json:"ip"`
	// the ID of the VPC where the VPC endpoint is to be created
	VpcID string `json:"vpc_id"`
	// the network ID of the subnet in the VPC specified by vpc_id
	SubnetID string `json:"subnet_id"`
	// the creation time of the VPC endpoint
	Created string `json:"created_at"`
	// the update time of the VPC endpoint
	Updated string `json:"updated_at"`
	// the project ID
	ProjectID string `json:"project_id"`
	// the resource tags
	Tags []tags.ResourceTag `json:"tags"`
	// Exception information returned by query resources
	Error QueryError `json:"error"`
	// the whitelist for controlling access to the VPC endpoint
	Whitelist []string `json:"whitelist"`
	// whether to enable access control
	EnableWhitelist bool `json:"enable_whitelist"`
	// the IDs of route tables
	RouteTables []string `json:"routetables"`
	// the description of the VPC endpoint
	Description string `json:"description"`
	// The gateway type endpoint policy information
	PolicyStatement []PolicyStatementResult `json:"policy_statement"`
	// The cluster ID associated with the instance
	EndpointPoolID string `json:"endpoint_pool_id"`
	// The public border group information of the terminal node corresponding to the pool
	PublicBorderGroup string `json:"public_border_group"`
	// The IPv6 address to access the connected endpoint service
	Ipv6Address string `json:"ipv6_address"`
	// The IP version of the VPC endpoint.
	IpVersion string `json:"ip_version"`
}

Endpoint contains the response of the VPC endpoint

func List

func List(client *golangsdk.ServiceClient, opts ListOptsBuilder) ([]Endpoint, error)

List makes a request against the API to list VPC endpoints.

type GetResult

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

GetResult represents the result of a get operation. Call its Extract method to interpret it as a Endpoint.

func Get

func Get(c *golangsdk.ServiceClient, endpointID string) (r GetResult)

Get retrieves a particular VPC endpoint based on its unique ID

func (GetResult) Extract

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

Extract is a function that accepts a result and extracts a Endpoint

type ListOpts

type ListOpts struct {
	ServiceName string `q:"endpoint_service_name"`
	VPCID       string `q:"vpc_id"`
	ID          string `q:"id"`
}

ListOpts allows the filtering of list data using given parameters.

func (ListOpts) ToEndpointListQuery

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

ToEndpointListQuery formats a ListOpts into a query string.

type ListOptsBuilder

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

ListOptsBuilder allows extensions to add parameters to the List request.

type ListResult

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

ListResult represents the result of a list operation. Call its ExtractEndpoints method to interpret it as Endpoints.

func (ListResult) Extract

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

Extract is a function that accepts a result and extracts a Endpoint

func (ListResult) ExtractEndpoints

func (r ListResult) ExtractEndpoints() ([]Endpoint, error)

ExtractEndpoints is a function that accepts a result and extracts the given Endpoints

type PolicyStatement

type PolicyStatement struct {
	Effect   string   `json:"Effect" required:"true"`
	Action   []string `json:"Action" required:"true"`
	Resource []string `json:"Resource" required:"true"`
}

PolicyStatement represents the Statement of the gateway

type PolicyStatementResult

type PolicyStatementResult struct {
	Effect   string   `json:"Effect"`
	Action   []string `json:"Action"`
	Resource []string `json:"Resource"`
}

type QueryError

type QueryError struct {
	// The error code
	ErrorCode string `json:"error_code"`
	// The error message
	ErrorMessage string `json:"error_message"`
}

type UpdateOpts

type UpdateOpts struct {
	// Specifies whether to enable access control
	EnableWhitelist *bool `json:"enable_whitelist,omitempty"`
	// Specifies the whitelist for controlling access to the VPC endpoint.
	// If the value is [], means delete all white list
	Whitelist []string `json:"whitelist"`
}

UpdateOpts contains the options for update a VPC endpoint This object is passed to Update().

func (UpdateOpts) ToEndpointUpdateMap

func (opts UpdateOpts) ToEndpointUpdateMap() (map[string]interface{}, error)

ToEndpointUpdateMap assembles a request body based on the contents of a UpdateOpts.

type UpdateOptsBuilder

type UpdateOptsBuilder interface {
	ToEndpointUpdateMap() (map[string]interface{}, error)
}

UpdateOptsBuilder allows extensions to add parameters to the Update request.

type UpdatePolicyOpts

type UpdatePolicyOpts struct {
	// Specifies the endpoint policy information for the gateway type
	PolicyStatement []PolicyStatement `json:"policy_statement,omitempty"`
}

UpdatePolicyOpts using to pass to UpdatePolicy()

func (UpdatePolicyOpts) UpdatePolicyOptsMap

func (opts UpdatePolicyOpts) UpdatePolicyOptsMap() (map[string]interface{}, error)

UpdatePolicyOptsMap assembles a request body based on the contents of a UpdatePolicyOpts.

type UpdatePolicyOptsBuilder

type UpdatePolicyOptsBuilder interface {
	UpdatePolicyOptsMap() (map[string]interface{}, error)
}

UpdatePolicyOptsBuilder using to update endpoint policy

type UpdateResult

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

UpdateResult represents the result of a update operation. Call its Extract method to interpret it as an Endpoint.

func Update

func Update(c *golangsdk.ServiceClient, opts UpdateOptsBuilder, endpointID string) (r UpdateResult)

Update accepts a UpdateOpts struct and uses the values to update a VPC endpoint

func UpdatePolicy

func UpdatePolicy(c *golangsdk.ServiceClient, opts UpdatePolicyOptsBuilder, endpointID string) (r UpdateResult)

UpdatePolicy accepts a UpdatePolicyOpts struct and uses the values to update endpoint policy

func (UpdateResult) Extract

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

Extract is a function that accepts a result and extracts a Endpoint

Jump to

Keyboard shortcuts

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