ipam

package
v1.0.0-beta.26 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 13 Imported by: 2

Documentation

Overview

Package ipam provides methods and message types of the ipam v1alpha1 API.

Index

Constants

View Source
const (
	ListIPsRequestOrderByCreatedAtDesc  = ListIPsRequestOrderBy("created_at_desc")
	ListIPsRequestOrderByCreatedAtAsc   = ListIPsRequestOrderBy("created_at_asc")
	ListIPsRequestOrderByUpdatedAtDesc  = ListIPsRequestOrderBy("updated_at_desc")
	ListIPsRequestOrderByUpdatedAtAsc   = ListIPsRequestOrderBy("updated_at_asc")
	ListIPsRequestOrderByAttachedAtDesc = ListIPsRequestOrderBy("attached_at_desc")
	ListIPsRequestOrderByAttachedAtAsc  = ListIPsRequestOrderBy("attached_at_asc")
)
View Source
const (
	ResourceTypeUnknownType         = ResourceType("unknown_type")
	ResourceTypeInstanceServer      = ResourceType("instance_server")
	ResourceTypeInstanceIP          = ResourceType("instance_ip")
	ResourceTypeInstancePrivateNic  = ResourceType("instance_private_nic")
	ResourceTypeLBServer            = ResourceType("lb_server")
	ResourceTypeFipIP               = ResourceType("fip_ip")
	ResourceTypeVpcGateway          = ResourceType("vpc_gateway")
	ResourceTypeVpcGatewayNetwork   = ResourceType("vpc_gateway_network")
	ResourceTypeK8sNode             = ResourceType("k8s_node")
	ResourceTypeK8sCluster          = ResourceType("k8s_cluster")
	ResourceTypeRdbInstance         = ResourceType("rdb_instance")
	ResourceTypeRedisCluster        = ResourceType("redis_cluster")
	ResourceTypeBaremetalServer     = ResourceType("baremetal_server")
	ResourceTypeBaremetalPrivateNic = ResourceType("baremetal_private_nic")
	ResourceTypeLlmDeployment       = ResourceType("llm_deployment")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

IPAM API.

func NewAPI

func NewAPI(client *scw.Client) *API

NewAPI returns a API object from a Scaleway client.

func (*API) ListIPs

func (s *API) ListIPs(req *ListIPsRequest, opts ...scw.RequestOption) (*ListIPsResponse, error)

ListIPs: Find IP addresses.

func (*API) Regions

func (s *API) Regions() []scw.Region

type IP

type IP struct {
	ID string `json:"id"`

	Address scw.IPNet `json:"address"`

	ProjectID string `json:"project_id"`

	IsIPv6 bool `json:"is_ipv6"`

	CreatedAt *time.Time `json:"created_at"`

	UpdatedAt *time.Time `json:"updated_at"`

	// Precisely one of Regional, Zonal, ZonalNat, SubnetID must be set.
	Regional *bool `json:"regional,omitempty"`

	// Precisely one of Regional, Zonal, ZonalNat, SubnetID must be set.
	Zonal *string `json:"zonal,omitempty"`

	// Precisely one of Regional, Zonal, ZonalNat, SubnetID must be set.
	ZonalNat *string `json:"zonal_nat,omitempty"`

	// Precisely one of Regional, Zonal, ZonalNat, SubnetID must be set.
	SubnetID *string `json:"subnet_id,omitempty"`

	Resource *Resource `json:"resource"`

	Tags []string `json:"tags"`

	Reverses []*Reverse `json:"reverses"`

	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"region"`

	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone *scw.Zone `json:"zone"`
}

IP: ip.

type ListIPsRequest

type ListIPsRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	Page *int32 `json:"-"`

	PageSize *uint32 `json:"-"`

	// OrderBy: default value: created_at_desc
	OrderBy ListIPsRequestOrderBy `json:"-"`

	ProjectID *string `json:"-"`

	OrganizationID *string `json:"-"`

	// Precisely one of Zonal, ZonalNat, Regional, PrivateNetworkID, SubnetID must be set.
	Zonal *string `json:"zonal,omitempty"`

	// Precisely one of Zonal, ZonalNat, Regional, PrivateNetworkID, SubnetID must be set.
	ZonalNat *string `json:"zonal_nat,omitempty"`

	// Precisely one of Zonal, ZonalNat, Regional, PrivateNetworkID, SubnetID must be set.
	Regional *bool `json:"regional,omitempty"`

	// Precisely one of Zonal, ZonalNat, Regional, PrivateNetworkID, SubnetID must be set.
	PrivateNetworkID *string `json:"private_network_id,omitempty"`

	// Precisely one of Zonal, ZonalNat, Regional, PrivateNetworkID, SubnetID must be set.
	SubnetID *string `json:"subnet_id,omitempty"`

	Attached *bool `json:"-"`

	ResourceID *string `json:"-"`

	// ResourceType: default value: unknown_type
	ResourceType ResourceType `json:"-"`

	MacAddress *string `json:"-"`

	Tags *[]string `json:"-"`

	IsIPv6 *bool `json:"-"`

	ResourceName *string `json:"-"`

	ResourceIDs []string `json:"-"`
}

ListIPsRequest: list i ps request.

type ListIPsRequestOrderBy

type ListIPsRequestOrderBy string

func (ListIPsRequestOrderBy) MarshalJSON

func (enum ListIPsRequestOrderBy) MarshalJSON() ([]byte, error)

func (ListIPsRequestOrderBy) String

func (enum ListIPsRequestOrderBy) String() string

func (*ListIPsRequestOrderBy) UnmarshalJSON

func (enum *ListIPsRequestOrderBy) UnmarshalJSON(data []byte) error

type ListIPsResponse

type ListIPsResponse struct {
	TotalCount uint64 `json:"total_count"`

	IPs []*IP `json:"ips"`
}

ListIPsResponse: list i ps response.

func (*ListIPsResponse) UnsafeAppend

func (r *ListIPsResponse) UnsafeAppend(res interface{}) (uint64, error)

UnsafeAppend should not be used Internal usage only

func (*ListIPsResponse) UnsafeGetTotalCount

func (r *ListIPsResponse) UnsafeGetTotalCount() uint64

UnsafeGetTotalCount should not be used Internal usage only

type Resource

type Resource struct {
	// Type: default value: unknown_type
	Type ResourceType `json:"type"`

	ID string `json:"id"`

	MacAddress *string `json:"mac_address"`

	Name *string `json:"name"`
}

Resource: resource.

type ResourceType

type ResourceType string

func (ResourceType) MarshalJSON

func (enum ResourceType) MarshalJSON() ([]byte, error)

func (ResourceType) String

func (enum ResourceType) String() string

func (*ResourceType) UnmarshalJSON

func (enum *ResourceType) UnmarshalJSON(data []byte) error

type Reverse

type Reverse struct {
	Hostname string `json:"hostname"`

	Address *net.IP `json:"address"`
}

Reverse: reverse.

Jump to

Keyboard shortcuts

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