oxide

package module
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: MIT Imports: 12 Imported by: 0

README

oxide.go

The Golang API client for Oxide.

Generating

You can trigger a build with the GitHub action to generate the client. This will automatically update the client to the latest version based on the spec at spec.json.

Alternatively, if you wish to generate the client locally, run:

$ make generate

Contributing

Please do not change the code directly since it is generated. PRs that change the code directly will be automatically closed by a bot.

Documentation

Index

Constants

View Source
const HostEnvVar = "OXIDE_HOST"

HostEnvVar is the environment variable that contains the host.

View Source
const TokenEnvVar = "OXIDE_TOKEN"

TokenEnvVar is the environment variable that contains the token.

Variables

DatumTypes is the collection of all DatumType values.

DiskStateStates is the collection of all DiskStateState values.

FieldSources is the collection of all FieldSource values.

FieldTypes is the collection of all FieldType values.

View Source
var IDSortModes = []IDSortMode{
	IDSortModeIdAscending,
}

IDSortModes is the collection of all IDSortMode values.

InstanceStates is the collection of all InstanceState values.

NameOrIdSortModes is the collection of all NameOrIdSortMode values.

NameSortModes is the collection of all NameSortMode values.

RouteDestinationTypes is the collection of all RouteDestinationType values.

RouteTargetTypes is the collection of all RouteTargetType values.

RouterRouteKinds is the collection of all RouterRouteKind values.

SagaErrorInfoErrors is the collection of all SagaErrorInfoError values.

SagaStateStates is the collection of all SagaStateState values.

VPCFirewallRuleActions is the collection of all VPCFirewallRuleAction values.

VPCFirewallRuleDirections is the collection of all VPCFirewallRuleDirection values.

VPCFirewallRuleHostFilterTypes is the collection of all VPCFirewallRuleHostFilterType values.

VPCFirewallRuleProtocols is the collection of all VPCFirewallRuleProtocol values.

VPCFirewallRuleStatuses is the collection of all VPCFirewallRuleStatus values.

VPCFirewallRuleTargetTypes is the collection of all VPCFirewallRuleTargetType values.

VPCRouterKinds is the collection of all VPCRouterKind values.

Functions

This section is empty.

Types

type ByteCount

type ByteCount int

ByteCount is a count of bytes, typically used either for memory or storage capacity

The maximum supported byte count is [`i64::MAX`]. This makes it somewhat inconvenient to define constructors: a u32 constructor can be infallible, but an i64 constructor can fail (if the value is negative) and a u64 constructor can fail (if the value is larger than i64::MAX). We provide all of these for consumers' convenience.

type Client

type Client struct {
	Hardware      *HardwareService
	Organizations *OrganizationsService
	Projects      *ProjectsService
	Users         *UsersService
	Roles         *RolesService
	Instances     *InstancesService
	Sagas         *SagasService
	Metrics       *MetricsService
	Networking    *NetworkingService
	// contains filtered or unexported fields
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(token, userAgent, host string) (*Client, error)

NewClient creates a new client for the Oxide API. You need to pass in your API token to create the client.

func NewClientFromEnv

func NewClientFromEnv(userAgent string) (*Client, error)

NewClientFromEnv creates a new client for the Oxide API, using the token stored in the environment variable `OXIDE_TOKEN` and the host stored in the environment variable `OXIDE_HOST`.

func (*Client) WithToken

func (c *Client) WithToken(token string)

WithToken overrides the token used for authentication.

type DatumType

type DatumType string

DatumType is the type of an individual datum of a metric.

const (
	// DatumTypeBool represents the DatumType `"Bool"`.
	DatumTypeBool DatumType = "Bool"
	// DatumTypeI64 represents the DatumType `"I64"`.
	DatumTypeI64 DatumType = "I64"
	// DatumTypeF64 represents the DatumType `"F64"`.
	DatumTypeF64 DatumType = "F64"
	// DatumTypeString represents the DatumType `"String"`.
	DatumTypeString DatumType = "String"
	// DatumTypeBytes represents the DatumType `"Bytes"`.
	DatumTypeBytes DatumType = "Bytes"
	// DatumTypeCumulativeI64 represents the DatumType `"CumulativeI64"`.
	DatumTypeCumulativeI64 DatumType = "CumulativeI64"
	// DatumTypeCumulativeF64 represents the DatumType `"CumulativeF64"`.
	DatumTypeCumulativeF64 DatumType = "CumulativeF64"
	// DatumTypeHistogramI64 represents the DatumType `"HistogramI64"`.
	DatumTypeHistogramI64 DatumType = "HistogramI64"
	// DatumTypeHistogramF64 represents the DatumType `"HistogramF64"`.
	DatumTypeHistogramF64 DatumType = "HistogramF64"
)

type Disk

type Disk struct {
	// Description is human-readable free-form text about a resource
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	DevicePath  string `json:"devicePath,omitempty" yaml:"devicePath,omitempty"`
	// ID is unique, immutable, system-controlled identifier for each resource
	ID string `json:"id,omitempty" yaml:"id,omitempty"`
	// Name is unique, mutable, user-controlled identifier for each resource
	Name      Name   `json:"name,omitempty" yaml:"name,omitempty"`
	ProjectID string `json:"projectId,omitempty" yaml:"projectId,omitempty"`
	// Size is a count of bytes, typically used either for memory or storage capacity
	//
	// The maximum supported byte count is [`i64::MAX`].  This makes it somewhat inconvenient to define constructors: a u32 constructor can be infallible, but an i64 constructor can fail (if the value is negative) and a u64 constructor can fail (if the value is larger than i64::MAX).  We provide all of these for consumers' convenience.
	Size       ByteCount `json:"size,omitempty" yaml:"size,omitempty"`
	SnapshotID string    `json:"snapshotId,omitempty" yaml:"snapshotId,omitempty"`
	// State is state of a Disk (primarily: attached or not)
	State DiskState `json:"state,omitempty" yaml:"state,omitempty"`
	// TimeCreated is timestamp when this resource was created
	TimeCreated *time.Time `json:"timeCreated,omitempty" yaml:"timeCreated,omitempty"`
	// TimeModified is timestamp when this resource was last modified
	TimeModified *time.Time `json:"timeModified,omitempty" yaml:"timeModified,omitempty"`
}

Disk is client view of an [`Disk`]

type DiskCreate

type DiskCreate struct {
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// Name is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	Name Name `json:"name,omitempty" yaml:"name,omitempty"`
	// Size is size of the Disk
	Size ByteCount `json:"size,omitempty" yaml:"size,omitempty"`
	// SnapshotID is id for snapshot from which the Disk should be created, if any
	SnapshotID string `json:"snapshotId,omitempty" yaml:"snapshotId,omitempty"`
}

DiskCreate is create-time parameters for a [`Disk`]

type DiskIdentifier

type DiskIdentifier struct {
	// Disk is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	Disk Name `json:"disk,omitempty" yaml:"disk,omitempty"`
}

DiskIdentifier is parameters for the [`Disk`] to be attached or detached to an instance

type DiskResultsPage

type DiskResultsPage struct {
	// Items is list of items on this page of results
	Items []Disk `json:"items,omitempty" yaml:"items,omitempty"`
	// NextPage is token used to fetch the next page of results (if any)
	NextPage string `json:"next_page,omitempty" yaml:"next_page,omitempty"`
}

DiskResultsPage is a single page of results

type DiskState

type DiskState struct {
	State    string `json:"state,omitempty" yaml:"state,omitempty"`
	Instance string `json:"instance,omitempty" yaml:"instance,omitempty"`
}

DiskState is state of a Disk (primarily: attached or not)

type DiskStateAttached

type DiskStateAttached struct {
	Instance string         `json:"instance,omitempty" yaml:"instance,omitempty"`
	State    DiskStateState `json:"state,omitempty" yaml:"state,omitempty"`
}

DiskStateAttached is disk is attached to the given Instance

type DiskStateAttaching

type DiskStateAttaching struct {
	Instance string         `json:"instance,omitempty" yaml:"instance,omitempty"`
	State    DiskStateState `json:"state,omitempty" yaml:"state,omitempty"`
}

DiskStateAttaching is disk is being attached to the given Instance

type DiskStateCreating

type DiskStateCreating struct {
	State DiskStateState `json:"state,omitempty" yaml:"state,omitempty"`
}

DiskStateCreating is disk is being initialized

type DiskStateDestroyed

type DiskStateDestroyed struct {
	State DiskStateState `json:"state,omitempty" yaml:"state,omitempty"`
}

DiskStateDestroyed is disk has been destroyed

type DiskStateDetached

type DiskStateDetached struct {
	State DiskStateState `json:"state,omitempty" yaml:"state,omitempty"`
}

DiskStateDetached is disk is ready but detached from any Instance

type DiskStateDetaching

type DiskStateDetaching struct {
	Instance string         `json:"instance,omitempty" yaml:"instance,omitempty"`
	State    DiskStateState `json:"state,omitempty" yaml:"state,omitempty"`
}

DiskStateDetaching is disk is being detached from the given Instance

type DiskStateFaulted

type DiskStateFaulted struct {
	State DiskStateState `json:"state,omitempty" yaml:"state,omitempty"`
}

DiskStateFaulted is disk is unavailable

type DiskStateState

type DiskStateState string

DiskStateState is the type definition for a DiskStateState.

const (
	// DiskStateStateAttached represents the DiskStateState `"attached"`.
	DiskStateStateAttached DiskStateState = "attached"
)
const (
	// DiskStateStateAttaching represents the DiskStateState `"attaching"`.
	DiskStateStateAttaching DiskStateState = "attaching"
)
const (
	// DiskStateStateCreating represents the DiskStateState `"creating"`.
	DiskStateStateCreating DiskStateState = "creating"
)
const (
	// DiskStateStateDestroyed represents the DiskStateState `"destroyed"`.
	DiskStateStateDestroyed DiskStateState = "destroyed"
)
const (
	// DiskStateStateDetached represents the DiskStateState `"detached"`.
	DiskStateStateDetached DiskStateState = "detached"
)
const (
	// DiskStateStateDetaching represents the DiskStateState `"detaching"`.
	DiskStateStateDetaching DiskStateState = "detaching"
)
const (
	// DiskStateStateFaulted represents the DiskStateState `"faulted"`.
	DiskStateStateFaulted DiskStateState = "faulted"
)

type FieldSchema

type FieldSchema struct {
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
	// Source is the source from which a field is derived, the target or metric.
	Source FieldSource `json:"source,omitempty" yaml:"source,omitempty"`
	// Ty is the `FieldType` identifies the data type of a target or metric field.
	Ty FieldType `json:"ty,omitempty" yaml:"ty,omitempty"`
}

FieldSchema is the name and type information for a field of a timeseries schema.

type FieldSource

type FieldSource string

FieldSource is the source from which a field is derived, the target or metric.

const (
	// FieldSourceTarget represents the FieldSource `"Target"`.
	FieldSourceTarget FieldSource = "Target"
	// FieldSourceMetric represents the FieldSource `"Metric"`.
	FieldSourceMetric FieldSource = "Metric"
)

type FieldType

type FieldType string

FieldType is the `FieldType` identifies the data type of a target or metric field.

const (
	// FieldTypeString represents the FieldType `"String"`.
	FieldTypeString FieldType = "String"
	// FieldTypeI64 represents the FieldType `"I64"`.
	FieldTypeI64 FieldType = "I64"
	// FieldTypeIpAddr represents the FieldType `"IpAddr"`.
	FieldTypeIpAddr FieldType = "IpAddr"
	// FieldTypeUuid represents the FieldType `"Uuid"`.
	FieldTypeUuid FieldType = "Uuid"
	// FieldTypeBool represents the FieldType `"Bool"`.
	FieldTypeBool FieldType = "Bool"
)

type HTTPError

type HTTPError struct {
	// URL is the URL that was being accessed when the error occurred.
	// It will always be populated.
	URL *url.URL
	// StatusCode is the HTTP response status code and will always be populated.
	StatusCode int
	// Message is the server response message and is only populated when
	// explicitly referenced by the JSON server response.
	Message string
	// Body is the raw response returned by the server.
	// It is often but not always JSON, depending on how the request fails.
	Body string
	// Header contains the response header fields from the server.
	Header http.Header
}

HTTPError is an error returned by a failed API call.

func (HTTPError) Error

func (err HTTPError) Error() string

Error converts the Error type to a readable string.

type HardwareService added in v0.0.3

type HardwareService service

func (*HardwareService) RacksGetRack added in v0.0.3

func (s *HardwareService) RacksGetRack(rackId string) (*Rack, error)

Fetch information about a particular rack.

Parameters:

  • `rackId`

func (*HardwareService) RacksList added in v0.0.3

func (s *HardwareService) RacksList(limit int, pageToken string, sortBy IDSortMode) (*RackResultsPage, error)

RacksList

List racks in the system.

To iterate over all pages, use the `RacksListAllPages` method, instead.

Parameters:

  • `limit`
  • `pageToken`
  • `sortBy`

func (*HardwareService) RacksListAllPages added in v0.0.3

func (s *HardwareService) RacksListAllPages(sortBy IDSortMode) (*[]Rack, error)

RacksListAllPages

List racks in the system.

This method is a wrapper around the `RacksList` method. This method returns all the pages at once.

Parameters:

  • `sortBy`

func (*HardwareService) SledsGetSled added in v0.0.3

func (s *HardwareService) SledsGetSled(sledId string) (*Sled, error)

Fetch information about a sled in the system.

Parameters:

  • `sledId`

func (*HardwareService) SledsList added in v0.0.3

func (s *HardwareService) SledsList(limit int, pageToken string, sortBy IDSortMode) (*SledResultsPage, error)

SledsList

List sleds in the system.

To iterate over all pages, use the `SledsListAllPages` method, instead.

Parameters:

  • `limit`
  • `pageToken`
  • `sortBy`

func (*HardwareService) SledsListAllPages added in v0.0.3

func (s *HardwareService) SledsListAllPages(sortBy IDSortMode) (*[]Sled, error)

SledsListAllPages

List sleds in the system.

This method is a wrapper around the `SledsList` method. This method returns all the pages at once.

Parameters:

  • `sortBy`

type IDSortMode

type IDSortMode string

IDSortMode is supported set of sort modes for scanning by id only.

Currently, we only support scanning in ascending order.

const (
	// IDSortModeIdAscending represents the IDSortMode `"id-ascending"`.
	IDSortModeIdAscending IDSortMode = "id-ascending"
)

type IPv4Net

type IPv4Net string

IPv4Net is an IPv4 subnet, including prefix and subnet mask

type IPv6Net

type IPv6Net string

IPv6Net is an IPv6 subnet, including prefix and subnet mask

type IdentityMetadata

type IdentityMetadata struct {
	// Description is human-readable free-form text about a resource
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// ID is unique, immutable, system-controlled identifier for each resource
	ID string `json:"id,omitempty" yaml:"id,omitempty"`
	// Name is unique, mutable, user-controlled identifier for each resource
	Name Name `json:"name,omitempty" yaml:"name,omitempty"`
	// TimeCreated is timestamp when this resource was created
	TimeCreated *time.Time `json:"timeCreated,omitempty" yaml:"timeCreated,omitempty"`
	// TimeModified is timestamp when this resource was last modified
	TimeModified *time.Time `json:"timeModified,omitempty" yaml:"timeModified,omitempty"`
}

IdentityMetadata is identity-related metadata that's included in nearly all public API objects

type Instance

type Instance struct {
	// Description is human-readable free-form text about a resource
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// Hostname is rFC1035-compliant hostname for the Instance.
	Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"`
	// ID is unique, immutable, system-controlled identifier for each resource
	ID string `json:"id,omitempty" yaml:"id,omitempty"`
	// Memory is memory allocated for this Instance
	Memory ByteCount `json:"memory,omitempty" yaml:"memory,omitempty"`
	// Name is unique, mutable, user-controlled identifier for each resource
	Name Name `json:"name,omitempty" yaml:"name,omitempty"`
	// NCPUs is number of CPUs allocated for this Instance
	NCPUs InstanceCPUCount `json:"ncpus,omitempty" yaml:"ncpus,omitempty"`
	// ProjectID is id for the project containing this Instance
	ProjectID string `json:"projectId,omitempty" yaml:"projectId,omitempty"`
	// RunState is running state of an Instance (primarily: booted or stopped)
	//
	// This typically reflects whether it's starting, running, stopping, or stopped, but also includes states related to the Instance's lifecycle
	RunState InstanceState `json:"runState,omitempty" yaml:"runState,omitempty"`
	// TimeCreated is timestamp when this resource was created
	TimeCreated *time.Time `json:"timeCreated,omitempty" yaml:"timeCreated,omitempty"`
	// TimeModified is timestamp when this resource was last modified
	TimeModified        *time.Time `json:"timeModified,omitempty" yaml:"timeModified,omitempty"`
	TimeRunStateUpdated *time.Time `json:"timeRunStateUpdated,omitempty" yaml:"timeRunStateUpdated,omitempty"`
}

Instance is client view of an [`Instance`]

type InstanceCPUCount added in v0.0.4

type InstanceCPUCount int

InstanceCPUCount is the number of CPUs in an Instance

type InstanceCreate

type InstanceCreate struct {
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	Hostname    string `json:"hostname,omitempty" yaml:"hostname,omitempty"`
	// Memory is a count of bytes, typically used either for memory or storage capacity
	//
	// The maximum supported byte count is [`i64::MAX`].  This makes it somewhat inconvenient to define constructors: a u32 constructor can be infallible, but an i64 constructor can fail (if the value is negative) and a u64 constructor can fail (if the value is larger than i64::MAX).  We provide all of these for consumers' convenience.
	Memory ByteCount `json:"memory,omitempty" yaml:"memory,omitempty"`
	// Name is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	Name Name `json:"name,omitempty" yaml:"name,omitempty"`
	// NCPUs is the number of CPUs in an Instance
	NCPUs InstanceCPUCount `json:"ncpus,omitempty" yaml:"ncpus,omitempty"`
}

InstanceCreate is create-time parameters for an [`Instance`]

type InstanceResultsPage

type InstanceResultsPage struct {
	// Items is list of items on this page of results
	Items []Instance `json:"items,omitempty" yaml:"items,omitempty"`
	// NextPage is token used to fetch the next page of results (if any)
	NextPage string `json:"next_page,omitempty" yaml:"next_page,omitempty"`
}

InstanceResultsPage is a single page of results

type InstanceState

type InstanceState string

InstanceState is running state of an Instance (primarily: booted or stopped)

This typically reflects whether it's starting, running, stopping, or stopped, but also includes states related to the Instance's lifecycle

const (
	// InstanceStateCreating represents the InstanceState `"creating"`.
	InstanceStateCreating InstanceState = "creating"
	// InstanceStateStarting represents the InstanceState `"starting"`.
	InstanceStateStarting InstanceState = "starting"
	// InstanceStateRunning represents the InstanceState `"running"`.
	InstanceStateRunning InstanceState = "running"
	// InstanceStateStopping represents the InstanceState `"stopping"`.
	InstanceStateStopping InstanceState = "stopping"
	// InstanceStateStopped represents the InstanceState `"stopped"`.
	InstanceStateStopped InstanceState = "stopped"
	// InstanceStateRebooting represents the InstanceState `"rebooting"`.
	InstanceStateRebooting InstanceState = "rebooting"
	// InstanceStateRepairing represents the InstanceState `"repairing"`.
	InstanceStateRepairing InstanceState = "repairing"
	// InstanceStateFailed represents the InstanceState `"failed"`.
	InstanceStateFailed InstanceState = "failed"
	// InstanceStateDestroyed represents the InstanceState `"destroyed"`.
	InstanceStateDestroyed InstanceState = "destroyed"
)

type InstancesService added in v0.0.3

type InstancesService service

func (*InstancesService) Create added in v0.0.3

func (s *InstancesService) Create(organizationName Name, projectName Name, j *InstanceCreate) (*Instance, error)

Create an instance in a project.

  • TODO-correctness This is supposed to be async. Is that right? We can create the instance immediately -- it's just not booted yet. Maybe the boot operation is what's a separate operation_id. What about the response code (201 Created vs 202 Accepted)? Is that orthogonal? Things can return a useful response, including an operation id, with either response code. Maybe a "reboot" operation would return a 202 Accepted because there's no actual resource created?

Parameters:

  • `organizationName`
  • `projectName`

func (*InstancesService) Delete added in v0.0.3

func (s *InstancesService) Delete(instanceName Name, organizationName Name, projectName Name) error

Delete

Delete an instance from a project.

Parameters:

  • `instanceName`
  • `organizationName`
  • `projectName`

func (*InstancesService) DisksAttach added in v0.0.3

func (s *InstancesService) DisksAttach(instanceName Name, organizationName Name, projectName Name, j *DiskIdentifier) (*Disk, error)

Parameters:

  • `instanceName`
  • `organizationName`
  • `projectName`

func (*InstancesService) DisksDetach added in v0.0.3

func (s *InstancesService) DisksDetach(instanceName Name, organizationName Name, projectName Name, j *DiskIdentifier) (*Disk, error)

DisksDetach

Parameters:

  • `instanceName`
  • `organizationName`
  • `projectName`

func (*InstancesService) DisksList added in v0.0.3

func (s *InstancesService) DisksList(limit int, pageToken string, sortBy NameSortMode, instanceName Name, organizationName Name, projectName Name) (*DiskResultsPage, error)

DisksList

List disks attached to this instance.

To iterate over all pages, use the `DisksListAllPages` method, instead.

Parameters:

  • `instanceName`
  • `limit`
  • `organizationName`
  • `pageToken`
  • `projectName`
  • `sortBy`

func (*InstancesService) DisksListAllPages added in v0.0.3

func (s *InstancesService) DisksListAllPages(sortBy NameSortMode, instanceName Name, organizationName Name, projectName Name) (*[]Disk, error)

DisksListAllPages

List disks attached to this instance.

This method is a wrapper around the `DisksList` method. This method returns all the pages at once.

Parameters:

  • `instanceName`
  • `organizationName`
  • `projectName`
  • `sortBy`

func (*InstancesService) Get added in v0.0.3

func (s *InstancesService) Get(instanceName Name, organizationName Name, projectName Name) (*Instance, error)

Get

Get an instance in a project.

Parameters:

  • `instanceName`
  • `organizationName`
  • `projectName`

func (*InstancesService) List added in v0.0.3

func (s *InstancesService) List(limit int, pageToken string, sortBy NameSortMode, organizationName Name, projectName Name) (*InstanceResultsPage, error)

List

List instances in a project.

To iterate over all pages, use the `ListAllPages` method, instead.

Parameters:

  • `limit`
  • `organizationName`
  • `pageToken`
  • `projectName`
  • `sortBy`

func (*InstancesService) ListAllPages added in v0.0.3

func (s *InstancesService) ListAllPages(sortBy NameSortMode, organizationName Name, projectName Name) (*[]Instance, error)

ListAllPages

List instances in a project.

This method is a wrapper around the `List` method. This method returns all the pages at once.

Parameters:

  • `organizationName`
  • `projectName`
  • `sortBy`

func (*InstancesService) Reboot added in v0.0.3

func (s *InstancesService) Reboot(instanceName Name, organizationName Name, projectName Name) (*Instance, error)

Reboot

Reboot an instance.

Parameters:

  • `instanceName`
  • `organizationName`
  • `projectName`

func (*InstancesService) Start added in v0.0.3

func (s *InstancesService) Start(instanceName Name, organizationName Name, projectName Name) (*Instance, error)

Start

Boot an instance.

Parameters:

  • `instanceName`
  • `organizationName`
  • `projectName`

func (*InstancesService) Stop added in v0.0.3

func (s *InstancesService) Stop(instanceName Name, organizationName Name, projectName Name) (*Instance, error)

Stop

Halt an instance.

Parameters:

  • `instanceName`
  • `organizationName`
  • `projectName`

type L4PortRange

type L4PortRange string

L4PortRange is an inclusive-inclusive range of IP ports. The second port may be omitted to represent a single port

type LoginParams

type LoginParams struct {
	Username string `json:"username,omitempty" yaml:"username,omitempty"`
}

LoginParams is the type definition for a LoginParams.

type MacAddr

type MacAddr string

MacAddr is a Media Access Control address, in EUI-48 format

type MetricsService added in v0.0.3

type MetricsService service

func (*MetricsService) TimeseriesSchemaList added in v0.0.3

func (s *MetricsService) TimeseriesSchemaList(limit int, pageToken string) (*TimeseriesSchemaResultsPage, error)

TimeseriesSchemaList

List all timeseries schema

To iterate over all pages, use the `TimeseriesSchemaListAllPages` method, instead.

Parameters:

  • `limit`
  • `pageToken`

func (*MetricsService) TimeseriesSchemaListAllPages added in v0.0.3

func (s *MetricsService) TimeseriesSchemaListAllPages() (*[]TimeseriesSchema, error)

TimeseriesSchemaListAllPages

List all timeseries schema

This method is a wrapper around the `TimeseriesSchemaList` method. This method returns all the pages at once.

type Name

type Name string

Name is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.

type NameOrIdSortMode

type NameOrIdSortMode string

NameOrIdSortMode is supported set of sort modes for scanning by name or id

const (
	// NameOrIdSortModeNameAscending represents the NameOrIdSortMode `"name-ascending"`.
	NameOrIdSortModeNameAscending NameOrIdSortMode = "name-ascending"
	// NameOrIdSortModeNameDescending represents the NameOrIdSortMode `"name-descending"`.
	NameOrIdSortModeNameDescending NameOrIdSortMode = "name-descending"
	// NameOrIdSortModeIdAscending represents the NameOrIdSortMode `"id-ascending"`.
	NameOrIdSortModeIdAscending NameOrIdSortMode = "id-ascending"
)

type NameSortMode

type NameSortMode string

NameSortMode is supported set of sort modes for scanning by name only

Currently, we only support scanning in ascending order.

const (
	// NameSortModeNameAscending represents the NameSortMode `"name-ascending"`.
	NameSortModeNameAscending NameSortMode = "name-ascending"
)

type NetworkInterface

type NetworkInterface struct {
	// Identity is common identifying metadata
	Identity IdentityMetadata `json:"identity,omitempty" yaml:"identity,omitempty"`
	// InstanceID is the Instance to which the interface belongs.
	InstanceID string `json:"instance_id,omitempty" yaml:"instance_id,omitempty"`
	// Ip is the IP address assigned to this interface.
	Ip string `json:"ip,omitempty" yaml:"ip,omitempty"`
	// Mac is the MAC address assigned to this interface.
	Mac MacAddr `json:"mac,omitempty" yaml:"mac,omitempty"`
	// SubnetID is the subnet to which the interface belongs.
	SubnetID string `json:"subnet_id,omitempty" yaml:"subnet_id,omitempty"`
	// VPCId is the VPC to which the interface belongs.
	VPCId string `json:"vpc_id,omitempty" yaml:"vpc_id,omitempty"`
}

NetworkInterface is a `NetworkInterface` represents a virtual network interface device.

type NetworkInterfaceResultsPage

type NetworkInterfaceResultsPage struct {
	// Items is list of items on this page of results
	Items []NetworkInterface `json:"items,omitempty" yaml:"items,omitempty"`
	// NextPage is token used to fetch the next page of results (if any)
	NextPage string `json:"next_page,omitempty" yaml:"next_page,omitempty"`
}

NetworkInterfaceResultsPage is a single page of results

type NetworkingService added in v0.0.3

type NetworkingService service

func (*NetworkingService) RoutersRoutesCreate added in v0.0.3

func (s *NetworkingService) RoutersRoutesCreate(organizationName Name, projectName Name, routerName Name, vpcName Name, j *RouterRouteCreateParams) (*RouterRoute, error)

Create a VPC Router

Parameters:

  • `organizationName`
  • `projectName`
  • `routerName`
  • `vpcName`

func (*NetworkingService) RoutersRoutesDeleteRoute added in v0.0.3

func (s *NetworkingService) RoutersRoutesDeleteRoute(organizationName Name, projectName Name, routeName Name, routerName Name, vpcName Name) error

RoutersRoutesDeleteRoute

Delete a route from its router

Parameters:

  • `organizationName`
  • `projectName`
  • `routeName`
  • `routerName`
  • `vpcName`

func (*NetworkingService) RoutersRoutesGetRoute added in v0.0.3

func (s *NetworkingService) RoutersRoutesGetRoute(organizationName Name, projectName Name, routeName Name, routerName Name, vpcName Name) (*RouterRoute, error)

RoutersRoutesGetRoute

Get a VPC Router route

Parameters:

  • `organizationName`
  • `projectName`
  • `routeName`
  • `routerName`
  • `vpcName`

func (*NetworkingService) RoutersRoutesList added in v0.0.3

func (s *NetworkingService) RoutersRoutesList(limit int, pageToken string, sortBy NameSortMode, organizationName Name, projectName Name, routerName Name, vpcName Name) (*RouterRouteResultsPage, error)

RoutersRoutesList

List a Router's routes

To iterate over all pages, use the `RoutersRoutesListAllPages` method, instead.

Parameters:

  • `limit`
  • `organizationName`
  • `pageToken`
  • `projectName`
  • `routerName`
  • `sortBy`
  • `vpcName`

func (*NetworkingService) RoutersRoutesListAllPages added in v0.0.3

func (s *NetworkingService) RoutersRoutesListAllPages(sortBy NameSortMode, organizationName Name, projectName Name, routerName Name, vpcName Name) (*[]RouterRoute, error)

RoutersRoutesListAllPages

List a Router's routes

This method is a wrapper around the `RoutersRoutesList` method. This method returns all the pages at once.

Parameters:

  • `organizationName`
  • `projectName`
  • `routerName`
  • `sortBy`
  • `vpcName`

func (*NetworkingService) RoutersRoutesPutRoute added in v0.0.3

func (s *NetworkingService) RoutersRoutesPutRoute(organizationName Name, projectName Name, routeName Name, routerName Name, vpcName Name, j *RouterRouteUpdateParams) error

RoutersRoutesPutRoute

Update a Router route

Parameters:

  • `organizationName`
  • `projectName`
  • `routeName`
  • `routerName`
  • `vpcName`

func (*NetworkingService) SubnetsIpsList added in v0.0.3

func (s *NetworkingService) SubnetsIpsList(limit int, pageToken string, sortBy NameSortMode, organizationName Name, projectName Name, subnetName Name, vpcName Name) (*NetworkInterfaceResultsPage, error)

SubnetsIpsList

List IP addresses on a VPC subnet.

To iterate over all pages, use the `SubnetsIpsListAllPages` method, instead.

Parameters:

  • `limit`
  • `organizationName`
  • `pageToken`
  • `projectName`
  • `sortBy`
  • `subnetName`
  • `vpcName`

func (*NetworkingService) SubnetsIpsListAllPages added in v0.0.3

func (s *NetworkingService) SubnetsIpsListAllPages(sortBy NameSortMode, organizationName Name, projectName Name, subnetName Name, vpcName Name) (*[]NetworkInterface, error)

SubnetsIpsListAllPages

List IP addresses on a VPC subnet.

This method is a wrapper around the `SubnetsIpsList` method. This method returns all the pages at once.

Parameters:

  • `organizationName`
  • `projectName`
  • `sortBy`
  • `subnetName`
  • `vpcName`

func (*NetworkingService) VPCFirewallRulesList added in v0.0.3

func (s *NetworkingService) VPCFirewallRulesList(limit int, pageToken string, sortBy NameSortMode, organizationName Name, projectName Name, vpcName Name) (*VPCFirewallRuleResultsPage, error)

VPCFirewallRulesList

List firewall rules for a VPC.

To iterate over all pages, use the `VPCFirewallRulesListAllPages` method, instead.

Parameters:

  • `limit`
  • `organizationName`
  • `pageToken`
  • `projectName`
  • `sortBy`
  • `vpcName`

func (*NetworkingService) VPCFirewallRulesListAllPages added in v0.0.3

func (s *NetworkingService) VPCFirewallRulesListAllPages(sortBy NameSortMode, organizationName Name, projectName Name, vpcName Name) (*[]VPCFirewallRule, error)

VPCFirewallRulesListAllPages

List firewall rules for a VPC.

This method is a wrapper around the `VPCFirewallRulesList` method. This method returns all the pages at once.

Parameters:

  • `organizationName`
  • `projectName`
  • `sortBy`
  • `vpcName`

func (*NetworkingService) VPCFirewallRulesPut added in v0.0.3

func (s *NetworkingService) VPCFirewallRulesPut(organizationName Name, projectName Name, vpcName Name, j *VPCFirewallRuleUpdateParams) (*VPCFirewallRuleUpdateResult, error)

Replace the firewall rules for a VPC

Parameters:

  • `organizationName`
  • `projectName`
  • `vpcName`

func (*NetworkingService) VPCRoutersCreate added in v0.0.3

func (s *NetworkingService) VPCRoutersCreate(organizationName Name, projectName Name, vpcName Name, j *VPCRouterCreate) (*VPCRouter, error)

Create a VPC Router

Parameters:

  • `organizationName`
  • `projectName`
  • `vpcName`

func (*NetworkingService) VPCRoutersDeleteRouter added in v0.0.3

func (s *NetworkingService) VPCRoutersDeleteRouter(organizationName Name, projectName Name, routerName Name, vpcName Name) error

VPCRoutersDeleteRouter

Delete a router from its VPC

Parameters:

  • `organizationName`
  • `projectName`
  • `routerName`
  • `vpcName`

func (*NetworkingService) VPCRoutersGetRouter added in v0.0.3

func (s *NetworkingService) VPCRoutersGetRouter(organizationName Name, projectName Name, routerName Name, vpcName Name) (*VPCRouter, error)

VPCRoutersGetRouter

Get a VPC Router

Parameters:

  • `organizationName`
  • `projectName`
  • `routerName`
  • `vpcName`

func (*NetworkingService) VPCRoutersList added in v0.0.3

func (s *NetworkingService) VPCRoutersList(limit int, pageToken string, sortBy NameSortMode, organizationName Name, projectName Name, vpcName Name) (*VPCRouterResultsPage, error)

VPCRoutersList

List VPC Custom and System Routers

To iterate over all pages, use the `VPCRoutersListAllPages` method, instead.

Parameters:

  • `limit`
  • `organizationName`
  • `pageToken`
  • `projectName`
  • `sortBy`
  • `vpcName`

func (*NetworkingService) VPCRoutersListAllPages added in v0.0.3

func (s *NetworkingService) VPCRoutersListAllPages(sortBy NameSortMode, organizationName Name, projectName Name, vpcName Name) (*[]VPCRouter, error)

VPCRoutersListAllPages

List VPC Custom and System Routers

This method is a wrapper around the `VPCRoutersList` method. This method returns all the pages at once.

Parameters:

  • `organizationName`
  • `projectName`
  • `sortBy`
  • `vpcName`

func (*NetworkingService) VPCRoutersPutRouter added in v0.0.3

func (s *NetworkingService) VPCRoutersPutRouter(organizationName Name, projectName Name, routerName Name, vpcName Name, j *VPCRouterUpdate) error

VPCRoutersPutRouter

Update a VPC Router

Parameters:

  • `organizationName`
  • `projectName`
  • `routerName`
  • `vpcName`

func (*NetworkingService) VPCSubnetsCreate added in v0.0.3

func (s *NetworkingService) VPCSubnetsCreate(organizationName Name, projectName Name, vpcName Name, j *VPCSubnetCreate) (*VPCSubnet, error)

Create a subnet in a VPC.

Parameters:

  • `organizationName`
  • `projectName`
  • `vpcName`

func (*NetworkingService) VPCSubnetsDeleteSubnet added in v0.0.3

func (s *NetworkingService) VPCSubnetsDeleteSubnet(organizationName Name, projectName Name, subnetName Name, vpcName Name) error

VPCSubnetsDeleteSubnet

Delete a subnet from a VPC.

Parameters:

  • `organizationName`
  • `projectName`
  • `subnetName`
  • `vpcName`

func (*NetworkingService) VPCSubnetsGetSubnet added in v0.0.3

func (s *NetworkingService) VPCSubnetsGetSubnet(organizationName Name, projectName Name, subnetName Name, vpcName Name) (*VPCSubnet, error)

VPCSubnetsGetSubnet

Get subnet in a VPC.

Parameters:

  • `organizationName`
  • `projectName`
  • `subnetName`
  • `vpcName`

func (*NetworkingService) VPCSubnetsList added in v0.0.3

func (s *NetworkingService) VPCSubnetsList(limit int, pageToken string, sortBy NameSortMode, organizationName Name, projectName Name, vpcName Name) (*VPCSubnetResultsPage, error)

VPCSubnetsList

List subnets in a VPC.

To iterate over all pages, use the `VPCSubnetsListAllPages` method, instead.

Parameters:

  • `limit`
  • `organizationName`
  • `pageToken`
  • `projectName`
  • `sortBy`
  • `vpcName`

func (*NetworkingService) VPCSubnetsListAllPages added in v0.0.3

func (s *NetworkingService) VPCSubnetsListAllPages(sortBy NameSortMode, organizationName Name, projectName Name, vpcName Name) (*[]VPCSubnet, error)

VPCSubnetsListAllPages

List subnets in a VPC.

This method is a wrapper around the `VPCSubnetsList` method. This method returns all the pages at once.

Parameters:

  • `organizationName`
  • `projectName`
  • `sortBy`
  • `vpcName`

func (*NetworkingService) VPCSubnetsPutSubnet added in v0.0.3

func (s *NetworkingService) VPCSubnetsPutSubnet(organizationName Name, projectName Name, subnetName Name, vpcName Name, j *VPCSubnetUpdate) error

VPCSubnetsPutSubnet

Update a VPC Subnet.

Parameters:

  • `organizationName`
  • `projectName`
  • `subnetName`
  • `vpcName`

func (*NetworkingService) VPCsCreate added in v0.0.3

func (s *NetworkingService) VPCsCreate(organizationName Name, projectName Name, j *VPCCreate) (*VPC, error)

Create a VPC in a project.

Parameters:

  • `organizationName`
  • `projectName`

func (*NetworkingService) VPCsDeleteVPC added in v0.0.3

func (s *NetworkingService) VPCsDeleteVPC(organizationName Name, projectName Name, vpcName Name) error

VPCsDeleteVPC

Delete a vpc from a project.

Parameters:

  • `organizationName`
  • `projectName`
  • `vpcName`

func (*NetworkingService) VPCsGetVPC added in v0.0.3

func (s *NetworkingService) VPCsGetVPC(organizationName Name, projectName Name, vpcName Name) (*VPC, error)

VPCsGetVPC

Get a VPC in a project.

Parameters:

  • `organizationName`
  • `projectName`
  • `vpcName`

func (*NetworkingService) VPCsList added in v0.0.3

func (s *NetworkingService) VPCsList(limit int, pageToken string, sortBy NameSortMode, organizationName Name, projectName Name) (*VPCResultsPage, error)

VPCsList

List VPCs in a project.

To iterate over all pages, use the `VPCsListAllPages` method, instead.

Parameters:

  • `limit`
  • `organizationName`
  • `pageToken`
  • `projectName`
  • `sortBy`

func (*NetworkingService) VPCsListAllPages added in v0.0.3

func (s *NetworkingService) VPCsListAllPages(sortBy NameSortMode, organizationName Name, projectName Name) (*[]VPC, error)

VPCsListAllPages

List VPCs in a project.

This method is a wrapper around the `VPCsList` method. This method returns all the pages at once.

Parameters:

  • `organizationName`
  • `projectName`
  • `sortBy`

func (*NetworkingService) VPCsPutVPC added in v0.0.3

func (s *NetworkingService) VPCsPutVPC(organizationName Name, projectName Name, vpcName Name, j *VPCUpdate) error

VPCsPutVPC

Update a VPC.

Parameters:

  • `organizationName`
  • `projectName`
  • `vpcName`

type Organization

type Organization struct {
	// Description is human-readable free-form text about a resource
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// ID is unique, immutable, system-controlled identifier for each resource
	ID string `json:"id,omitempty" yaml:"id,omitempty"`
	// Name is unique, mutable, user-controlled identifier for each resource
	Name Name `json:"name,omitempty" yaml:"name,omitempty"`
	// TimeCreated is timestamp when this resource was created
	TimeCreated *time.Time `json:"timeCreated,omitempty" yaml:"timeCreated,omitempty"`
	// TimeModified is timestamp when this resource was last modified
	TimeModified *time.Time `json:"timeModified,omitempty" yaml:"timeModified,omitempty"`
}

Organization is client view of an [`Organization`]

type OrganizationCreate

type OrganizationCreate struct {
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// Name is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	Name Name `json:"name,omitempty" yaml:"name,omitempty"`
}

OrganizationCreate is create-time parameters for an [`Organization`]

type OrganizationResultsPage

type OrganizationResultsPage struct {
	// Items is list of items on this page of results
	Items []Organization `json:"items,omitempty" yaml:"items,omitempty"`
	// NextPage is token used to fetch the next page of results (if any)
	NextPage string `json:"next_page,omitempty" yaml:"next_page,omitempty"`
}

OrganizationResultsPage is a single page of results

type OrganizationUpdate

type OrganizationUpdate struct {
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	Name        Name   `json:"name,omitempty" yaml:"name,omitempty"`
}

OrganizationUpdate is updateable properties of an [`Organization`]

type OrganizationsService added in v0.0.3

type OrganizationsService service

func (*OrganizationsService) Create added in v0.0.3

Create a new organization.

func (*OrganizationsService) Delete added in v0.0.3

func (s *OrganizationsService) Delete(organizationName Name) error

Delete

Delete a specific organization.

Parameters:

  • `organizationName`

func (*OrganizationsService) Get added in v0.0.3

func (s *OrganizationsService) Get(organizationName Name) (*Organization, error)

Get

Fetch a specific organization

Parameters:

  • `organizationName`

func (*OrganizationsService) List added in v0.0.3

func (s *OrganizationsService) List(limit int, pageToken string, sortBy NameOrIdSortMode) (*OrganizationResultsPage, error)

List

List all organizations.

To iterate over all pages, use the `ListAllPages` method, instead.

Parameters:

  • `limit`
  • `pageToken`
  • `sortBy`

func (*OrganizationsService) ListAllPages added in v0.0.3

func (s *OrganizationsService) ListAllPages(sortBy NameOrIdSortMode) (*[]Organization, error)

ListAllPages

List all organizations.

This method is a wrapper around the `List` method. This method returns all the pages at once.

Parameters:

  • `sortBy`

func (*OrganizationsService) Put added in v0.0.3

func (s *OrganizationsService) Put(organizationName Name, j *OrganizationUpdate) (*Organization, error)

Put

Update a specific organization.

  • TODO-correctness: Is it valid for PUT to accept application/json that's a subset of what the resource actually represents? If not, is that a problem? (HTTP may require that this be idempotent.) If so, can we get around that having this be a slightly different content-type (e.g., "application/json-patch")? We should see what other APIs do.

Parameters:

  • `organizationName`

type Project

type Project struct {
	// Description is human-readable free-form text about a resource
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// ID is unique, immutable, system-controlled identifier for each resource
	ID string `json:"id,omitempty" yaml:"id,omitempty"`
	// Name is unique, mutable, user-controlled identifier for each resource
	Name           Name   `json:"name,omitempty" yaml:"name,omitempty"`
	OrganizationID string `json:"organizationId,omitempty" yaml:"organizationId,omitempty"`
	// TimeCreated is timestamp when this resource was created
	TimeCreated *time.Time `json:"timeCreated,omitempty" yaml:"timeCreated,omitempty"`
	// TimeModified is timestamp when this resource was last modified
	TimeModified *time.Time `json:"timeModified,omitempty" yaml:"timeModified,omitempty"`
}

Project is client view of a [`Project`]

type ProjectCreate

type ProjectCreate struct {
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// Name is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	Name Name `json:"name,omitempty" yaml:"name,omitempty"`
}

ProjectCreate is create-time parameters for a [`Project`]

type ProjectResultsPage

type ProjectResultsPage struct {
	// Items is list of items on this page of results
	Items []Project `json:"items,omitempty" yaml:"items,omitempty"`
	// NextPage is token used to fetch the next page of results (if any)
	NextPage string `json:"next_page,omitempty" yaml:"next_page,omitempty"`
}

ProjectResultsPage is a single page of results

type ProjectUpdate

type ProjectUpdate struct {
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	Name        Name   `json:"name,omitempty" yaml:"name,omitempty"`
}

ProjectUpdate is updateable properties of a [`Project`]

type ProjectsService added in v0.0.3

type ProjectsService service

func (*ProjectsService) Create added in v0.0.3

func (s *ProjectsService) Create(organizationName Name, j *ProjectCreate) (*Project, error)

Create a new project.

Parameters:

  • `organizationName`

func (*ProjectsService) Delete added in v0.0.3

func (s *ProjectsService) Delete(organizationName Name, projectName Name) error

Delete

Delete a specific project.

Parameters:

  • `organizationName`
  • `projectName`

func (*ProjectsService) DisksCreate added in v0.0.3

func (s *ProjectsService) DisksCreate(organizationName Name, projectName Name, j *DiskCreate) (*Disk, error)

Create a disk in a project.

  • TODO-correctness See note about instance create. This should be async.

Parameters:

  • `organizationName`
  • `projectName`

func (*ProjectsService) DisksDeleteDisk added in v0.0.3

func (s *ProjectsService) DisksDeleteDisk(diskName Name, organizationName Name, projectName Name) error

DisksDeleteDisk

Delete a disk from a project.

Parameters:

  • `diskName`
  • `organizationName`
  • `projectName`

func (*ProjectsService) DisksGetDisk added in v0.0.3

func (s *ProjectsService) DisksGetDisk(diskName Name, organizationName Name, projectName Name) (*Disk, error)

DisksGetDisk

Fetch a single disk in a project.

Parameters:

  • `diskName`
  • `organizationName`
  • `projectName`

func (*ProjectsService) DisksList added in v0.0.3

func (s *ProjectsService) DisksList(limit int, pageToken string, sortBy NameSortMode, organizationName Name, projectName Name) (*DiskResultsPage, error)

DisksList

List disks in a project.

To iterate over all pages, use the `DisksListAllPages` method, instead.

Parameters:

  • `limit`
  • `organizationName`
  • `pageToken`
  • `projectName`
  • `sortBy`

func (*ProjectsService) DisksListAllPages added in v0.0.3

func (s *ProjectsService) DisksListAllPages(sortBy NameSortMode, organizationName Name, projectName Name) (*[]Disk, error)

DisksListAllPages

List disks in a project.

This method is a wrapper around the `DisksList` method. This method returns all the pages at once.

Parameters:

  • `organizationName`
  • `projectName`
  • `sortBy`

func (*ProjectsService) Get added in v0.0.3

func (s *ProjectsService) Get(organizationName Name, projectName Name) (*Project, error)

Get

Fetch a specific project

Parameters:

  • `organizationName`
  • `projectName`

func (*ProjectsService) List added in v0.0.3

func (s *ProjectsService) List(limit int, pageToken string, sortBy NameOrIdSortMode, organizationName Name) (*ProjectResultsPage, error)

List

List all projects.

To iterate over all pages, use the `ListAllPages` method, instead.

Parameters:

  • `limit`
  • `organizationName`
  • `pageToken`
  • `sortBy`

func (*ProjectsService) ListAllPages added in v0.0.3

func (s *ProjectsService) ListAllPages(sortBy NameOrIdSortMode, organizationName Name) (*[]Project, error)

ListAllPages

List all projects.

This method is a wrapper around the `List` method. This method returns all the pages at once.

Parameters:

  • `organizationName`
  • `sortBy`

type Rack

type Rack struct {
	// Identity is identity-related metadata that's included in nearly all public API objects
	Identity IdentityMetadata `json:"identity,omitempty" yaml:"identity,omitempty"`
}

Rack is client view of an [`Rack`]

type RackResultsPage

type RackResultsPage struct {
	// Items is list of items on this page of results
	Items []Rack `json:"items,omitempty" yaml:"items,omitempty"`
	// NextPage is token used to fetch the next page of results (if any)
	NextPage string `json:"next_page,omitempty" yaml:"next_page,omitempty"`
}

RackResultsPage is a single page of results

type Role

type Role struct {
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// Name is role names consist of two string components separated by dot (".").
	Name RoleName `json:"name,omitempty" yaml:"name,omitempty"`
}

Role is client view of a [`Role`]

type RoleName

type RoleName string

RoleName is role names consist of two string components separated by dot (".").

type RoleResultsPage

type RoleResultsPage struct {
	// Items is list of items on this page of results
	Items []Role `json:"items,omitempty" yaml:"items,omitempty"`
	// NextPage is token used to fetch the next page of results (if any)
	NextPage string `json:"next_page,omitempty" yaml:"next_page,omitempty"`
}

RoleResultsPage is a single page of results

type RolesService added in v0.0.3

type RolesService service

func (*RolesService) Get added in v0.0.3

func (s *RolesService) Get(roleName string) (*Role, error)

Fetch a specific built-in role

Parameters:

  • `roleName`

func (*RolesService) List added in v0.0.3

func (s *RolesService) List(limit int, pageToken string) (*RoleResultsPage, error)

List the built-in roles

To iterate over all pages, use the `ListAllPages` method, instead.

Parameters:

  • `limit`
  • `pageToken`

func (*RolesService) ListAllPages added in v0.0.3

func (s *RolesService) ListAllPages() (*[]Role, error)

ListAllPages

List the built-in roles

This method is a wrapper around the `List` method. This method returns all the pages at once.

type RouteDestination

type RouteDestination struct {
	Type  string `json:"type,omitempty" yaml:"type,omitempty"`
	Value string `json:"value,omitempty" yaml:"value,omitempty"`
}

RouteDestination is a subset of [`NetworkTarget`], `RouteDestination` specifies the kind of network traffic that will be matched to be forwarded to the [`RouteTarget`].

type RouteDestinationIp

type RouteDestinationIp struct {
	Type  RouteDestinationType `json:"type,omitempty" yaml:"type,omitempty"`
	Value string               `json:"value,omitempty" yaml:"value,omitempty"`
}

RouteDestinationIp is the type definition for a RouteDestinationIp.

type RouteDestinationSubnet

type RouteDestinationSubnet struct {
	Type RouteDestinationType `json:"type,omitempty" yaml:"type,omitempty"`
	// Value is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	Value Name `json:"value,omitempty" yaml:"value,omitempty"`
}

RouteDestinationSubnet is the type definition for a RouteDestinationSubnet.

type RouteDestinationType

type RouteDestinationType string

RouteDestinationType is the type definition for a RouteDestinationType.

const (
	// RouteDestinationTypeIp represents the RouteDestinationType `"ip"`.
	RouteDestinationTypeIp RouteDestinationType = "ip"
)
const (
	// RouteDestinationTypeSubnet represents the RouteDestinationType `"subnet"`.
	RouteDestinationTypeSubnet RouteDestinationType = "subnet"
)
const (
	// RouteDestinationTypeVpc represents the RouteDestinationType `"vpc"`.
	RouteDestinationTypeVpc RouteDestinationType = "vpc"
)

type RouteDestinationVPC

type RouteDestinationVPC struct {
	Type RouteDestinationType `json:"type,omitempty" yaml:"type,omitempty"`
	// Value is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	Value Name `json:"value,omitempty" yaml:"value,omitempty"`
}

RouteDestinationVPC is the type definition for a RouteDestinationVPC.

type RouteTarget

type RouteTarget struct {
	Type  string `json:"type,omitempty" yaml:"type,omitempty"`
	Value string `json:"value,omitempty" yaml:"value,omitempty"`
}

RouteTarget is a subset of [`NetworkTarget`], `RouteTarget` specifies all possible targets that a route can forward to.

type RouteTargetInstance

type RouteTargetInstance struct {
	Type RouteTargetType `json:"type,omitempty" yaml:"type,omitempty"`
	// Value is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	Value Name `json:"value,omitempty" yaml:"value,omitempty"`
}

RouteTargetInstance is the type definition for a RouteTargetInstance.

type RouteTargetInternetGateway

type RouteTargetInternetGateway struct {
	Type RouteTargetType `json:"type,omitempty" yaml:"type,omitempty"`
	// Value is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	Value Name `json:"value,omitempty" yaml:"value,omitempty"`
}

RouteTargetInternetGateway is the type definition for a RouteTargetInternetGateway.

type RouteTargetIp

type RouteTargetIp struct {
	Type  RouteTargetType `json:"type,omitempty" yaml:"type,omitempty"`
	Value string          `json:"value,omitempty" yaml:"value,omitempty"`
}

RouteTargetIp is the type definition for a RouteTargetIp.

type RouteTargetSubnet

type RouteTargetSubnet struct {
	Type RouteTargetType `json:"type,omitempty" yaml:"type,omitempty"`
	// Value is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	Value Name `json:"value,omitempty" yaml:"value,omitempty"`
}

RouteTargetSubnet is the type definition for a RouteTargetSubnet.

type RouteTargetType

type RouteTargetType string

RouteTargetType is the type definition for a RouteTargetType.

const (
	// RouteTargetTypeInstance represents the RouteTargetType `"instance"`.
	RouteTargetTypeInstance RouteTargetType = "instance"
)
const (
	// RouteTargetTypeInternetGateway represents the RouteTargetType `"internetGateway"`.
	RouteTargetTypeInternetGateway RouteTargetType = "internetGateway"
)
const (
	// RouteTargetTypeIp represents the RouteTargetType `"ip"`.
	RouteTargetTypeIp RouteTargetType = "ip"
)
const (
	// RouteTargetTypeSubnet represents the RouteTargetType `"subnet"`.
	RouteTargetTypeSubnet RouteTargetType = "subnet"
)
const (
	// RouteTargetTypeVpc represents the RouteTargetType `"vpc"`.
	RouteTargetTypeVpc RouteTargetType = "vpc"
)

type RouteTargetVPC

type RouteTargetVPC struct {
	Type RouteTargetType `json:"type,omitempty" yaml:"type,omitempty"`
	// Value is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	Value Name `json:"value,omitempty" yaml:"value,omitempty"`
}

RouteTargetVPC is the type definition for a RouteTargetVPC.

type RouterRoute

type RouterRoute struct {
	// Destination is a subset of [`NetworkTarget`], `RouteDestination` specifies the kind of network traffic that will be matched to be forwarded to the [`RouteTarget`].
	Destination RouteDestination `json:"destination,omitempty" yaml:"destination,omitempty"`
	// Identity is common identifying metadata
	Identity IdentityMetadata `json:"identity,omitempty" yaml:"identity,omitempty"`
	// Kind is describes the kind of router. Set at creation. `read-only`
	Kind RouterRouteKind `json:"kind,omitempty" yaml:"kind,omitempty"`
	// RouterID is the VPC Router to which the route belongs.
	RouterID string `json:"router_id,omitempty" yaml:"router_id,omitempty"`
	// Target is a subset of [`NetworkTarget`], `RouteTarget` specifies all possible targets that a route can forward to.
	Target RouteTarget `json:"target,omitempty" yaml:"target,omitempty"`
}

RouterRoute is a route defines a rule that governs where traffic should be sent based on its destination.

type RouterRouteCreateParams

type RouterRouteCreateParams struct {
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// Destination is a subset of [`NetworkTarget`], `RouteDestination` specifies the kind of network traffic that will be matched to be forwarded to the [`RouteTarget`].
	Destination RouteDestination `json:"destination,omitempty" yaml:"destination,omitempty"`
	// Name is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	Name Name `json:"name,omitempty" yaml:"name,omitempty"`
	// Target is a subset of [`NetworkTarget`], `RouteTarget` specifies all possible targets that a route can forward to.
	Target RouteTarget `json:"target,omitempty" yaml:"target,omitempty"`
}

RouterRouteCreateParams is create-time parameters for a [`RouterRoute`]

type RouterRouteKind

type RouterRouteKind string

RouterRouteKind is the classification of a [`RouterRoute`] as defined by the system. The kind determines certain attributes such as if the route is modifiable and describes how or where the route was created.

See [RFD-21](https://rfd.shared.oxide.computer/rfd/0021#concept-router) for more context

const (
	// RouterRouteKindDefault represents the RouterRouteKind `"Default"`.
	RouterRouteKindDefault RouterRouteKind = "Default"
	// RouterRouteKindVpcSubnet represents the RouterRouteKind `"VpcSubnet"`.
	RouterRouteKindVpcSubnet RouterRouteKind = "VpcSubnet"
	// RouterRouteKindVpcPeering represents the RouterRouteKind `"VpcPeering"`.
	RouterRouteKindVpcPeering RouterRouteKind = "VpcPeering"
	// RouterRouteKindCustom represents the RouterRouteKind `"Custom"`.
	RouterRouteKindCustom RouterRouteKind = "Custom"
)

type RouterRouteResultsPage

type RouterRouteResultsPage struct {
	// Items is list of items on this page of results
	Items []RouterRoute `json:"items,omitempty" yaml:"items,omitempty"`
	// NextPage is token used to fetch the next page of results (if any)
	NextPage string `json:"next_page,omitempty" yaml:"next_page,omitempty"`
}

RouterRouteResultsPage is a single page of results

type RouterRouteUpdateParams

type RouterRouteUpdateParams struct {
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// Destination is a subset of [`NetworkTarget`], `RouteDestination` specifies the kind of network traffic that will be matched to be forwarded to the [`RouteTarget`].
	Destination RouteDestination `json:"destination,omitempty" yaml:"destination,omitempty"`
	Name        Name             `json:"name,omitempty" yaml:"name,omitempty"`
	// Target is a subset of [`NetworkTarget`], `RouteTarget` specifies all possible targets that a route can forward to.
	Target RouteTarget `json:"target,omitempty" yaml:"target,omitempty"`
}

RouterRouteUpdateParams is updateable properties of a [`RouterRoute`]

type Saga

type Saga struct {
	ID    string    `json:"id,omitempty" yaml:"id,omitempty"`
	State SagaState `json:"state,omitempty" yaml:"state,omitempty"`
}

Saga is the type definition for a Saga.

type SagaErrorInfo

type SagaErrorInfo struct {
	Error       string      `json:"error,omitempty" yaml:"error,omitempty"`
	SourceError interface{} `json:"source_error,omitempty" yaml:"source_error,omitempty"`
	Message     string      `json:"message,omitempty" yaml:"message,omitempty"`
}

SagaErrorInfo is the type definition for a SagaErrorInfo.

type SagaErrorInfoActionFailed

type SagaErrorInfoActionFailed struct {
	Error       SagaErrorInfoError `json:"error,omitempty" yaml:"error,omitempty"`
	SourceError interface{}        `json:"source_error,omitempty" yaml:"source_error,omitempty"`
}

SagaErrorInfoActionFailed is the type definition for a SagaErrorInfoActionFailed.

type SagaErrorInfoDeserializeFailed

type SagaErrorInfoDeserializeFailed struct {
	Error   SagaErrorInfoError `json:"error,omitempty" yaml:"error,omitempty"`
	Message string             `json:"message,omitempty" yaml:"message,omitempty"`
}

SagaErrorInfoDeserializeFailed is the type definition for a SagaErrorInfoDeserializeFailed.

type SagaErrorInfoError

type SagaErrorInfoError string

SagaErrorInfoError is the type definition for a SagaErrorInfoError.

const (
	// SagaErrorInfoErrorActionFailed represents the SagaErrorInfoError `"actionFailed"`.
	SagaErrorInfoErrorActionFailed SagaErrorInfoError = "actionFailed"
)
const (
	// SagaErrorInfoErrorDeserializeFailed represents the SagaErrorInfoError `"deserializeFailed"`.
	SagaErrorInfoErrorDeserializeFailed SagaErrorInfoError = "deserializeFailed"
)
const (
	// SagaErrorInfoErrorInjectedError represents the SagaErrorInfoError `"injectedError"`.
	SagaErrorInfoErrorInjectedError SagaErrorInfoError = "injectedError"
)
const (
	// SagaErrorInfoErrorSerializeFailed represents the SagaErrorInfoError `"serializeFailed"`.
	SagaErrorInfoErrorSerializeFailed SagaErrorInfoError = "serializeFailed"
)
const (
	// SagaErrorInfoErrorSubsagaCreateFailed represents the SagaErrorInfoError `"subsagaCreateFailed"`.
	SagaErrorInfoErrorSubsagaCreateFailed SagaErrorInfoError = "subsagaCreateFailed"
)

type SagaErrorInfoInjectedError

type SagaErrorInfoInjectedError struct {
	Error SagaErrorInfoError `json:"error,omitempty" yaml:"error,omitempty"`
}

SagaErrorInfoInjectedError is the type definition for a SagaErrorInfoInjectedError.

type SagaErrorInfoSerializeFailed

type SagaErrorInfoSerializeFailed struct {
	Error   SagaErrorInfoError `json:"error,omitempty" yaml:"error,omitempty"`
	Message string             `json:"message,omitempty" yaml:"message,omitempty"`
}

SagaErrorInfoSerializeFailed is the type definition for a SagaErrorInfoSerializeFailed.

type SagaErrorInfoSubsagaCreateFailed

type SagaErrorInfoSubsagaCreateFailed struct {
	Error   SagaErrorInfoError `json:"error,omitempty" yaml:"error,omitempty"`
	Message string             `json:"message,omitempty" yaml:"message,omitempty"`
}

SagaErrorInfoSubsagaCreateFailed is the type definition for a SagaErrorInfoSubsagaCreateFailed.

type SagaResultsPage

type SagaResultsPage struct {
	// Items is list of items on this page of results
	Items []Saga `json:"items,omitempty" yaml:"items,omitempty"`
	// NextPage is token used to fetch the next page of results (if any)
	NextPage string `json:"next_page,omitempty" yaml:"next_page,omitempty"`
}

SagaResultsPage is a single page of results

type SagaState

type SagaState struct {
	State         string        `json:"state,omitempty" yaml:"state,omitempty"`
	ErrorInfo     SagaErrorInfo `json:"error_info,omitempty" yaml:"error_info,omitempty"`
	ErrorNodeName string        `json:"error_node_name,omitempty" yaml:"error_node_name,omitempty"`
}

SagaState is the type definition for a SagaState.

type SagaStateFailed

type SagaStateFailed struct {
	ErrorInfo     SagaErrorInfo  `json:"error_info,omitempty" yaml:"error_info,omitempty"`
	ErrorNodeName string         `json:"error_node_name,omitempty" yaml:"error_node_name,omitempty"`
	State         SagaStateState `json:"state,omitempty" yaml:"state,omitempty"`
}

SagaStateFailed is the type definition for a SagaStateFailed.

type SagaStateRunning

type SagaStateRunning struct {
	State SagaStateState `json:"state,omitempty" yaml:"state,omitempty"`
}

SagaStateRunning is the type definition for a SagaStateRunning.

type SagaStateState

type SagaStateState string

SagaStateState is the type definition for a SagaStateState.

const (
	// SagaStateStateFailed represents the SagaStateState `"failed"`.
	SagaStateStateFailed SagaStateState = "failed"
)
const (
	// SagaStateStateRunning represents the SagaStateState `"running"`.
	SagaStateStateRunning SagaStateState = "running"
)
const (
	// SagaStateStateSucceeded represents the SagaStateState `"succeeded"`.
	SagaStateStateSucceeded SagaStateState = "succeeded"
)

type SagaStateSucceeded

type SagaStateSucceeded struct {
	State SagaStateState `json:"state,omitempty" yaml:"state,omitempty"`
}

SagaStateSucceeded is the type definition for a SagaStateSucceeded.

type SagasService added in v0.0.3

type SagasService service

func (*SagasService) Get added in v0.0.3

func (s *SagasService) Get(sagaId string) (*Saga, error)

Fetch information about a single saga (for debugging)

Parameters:

  • `sagaId`

func (*SagasService) List added in v0.0.3

func (s *SagasService) List(limit int, pageToken string, sortBy IDSortMode) (*SagaResultsPage, error)

List

List all sagas (for debugging)

To iterate over all pages, use the `ListAllPages` method, instead.

Parameters:

  • `limit`
  • `pageToken`
  • `sortBy`

func (*SagasService) ListAllPages added in v0.0.3

func (s *SagasService) ListAllPages(sortBy IDSortMode) (*[]Saga, error)

ListAllPages

List all sagas (for debugging)

This method is a wrapper around the `List` method. This method returns all the pages at once.

Parameters:

  • `sortBy`

type SessionUser

type SessionUser struct {
	ID string `json:"id,omitempty" yaml:"id,omitempty"`
}

SessionUser is client view of currently authed user.

type Sled

type Sled struct {
	// Description is human-readable free-form text about a resource
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// ID is unique, immutable, system-controlled identifier for each resource
	ID string `json:"id,omitempty" yaml:"id,omitempty"`
	// Name is unique, mutable, user-controlled identifier for each resource
	Name           Name   `json:"name,omitempty" yaml:"name,omitempty"`
	ServiceAddress string `json:"serviceAddress,omitempty" yaml:"serviceAddress,omitempty"`
	// TimeCreated is timestamp when this resource was created
	TimeCreated *time.Time `json:"timeCreated,omitempty" yaml:"timeCreated,omitempty"`
	// TimeModified is timestamp when this resource was last modified
	TimeModified *time.Time `json:"timeModified,omitempty" yaml:"timeModified,omitempty"`
}

Sled is client view of an [`Sled`]

type SledResultsPage

type SledResultsPage struct {
	// Items is list of items on this page of results
	Items []Sled `json:"items,omitempty" yaml:"items,omitempty"`
	// NextPage is token used to fetch the next page of results (if any)
	NextPage string `json:"next_page,omitempty" yaml:"next_page,omitempty"`
}

SledResultsPage is a single page of results

type TimeseriesName

type TimeseriesName string

TimeseriesName is names are constructed by concatenating the target and metric names with ':'. Target and metric names must be lowercase alphanumeric characters with '_' separating words.

type TimeseriesSchema

type TimeseriesSchema struct {
	Created *time.Time `json:"created,omitempty" yaml:"created,omitempty"`
	// DatumType is the type of an individual datum of a metric.
	DatumType   DatumType     `json:"datum_type,omitempty" yaml:"datum_type,omitempty"`
	FieldSchema []FieldSchema `json:"field_schema,omitempty" yaml:"field_schema,omitempty"`
	// TimeseriesName is names are constructed by concatenating the target and metric names with ':'. Target and metric names must be lowercase alphanumeric characters with '_' separating words.
	TimeseriesName TimeseriesName `json:"timeseries_name,omitempty" yaml:"timeseries_name,omitempty"`
}

TimeseriesSchema is the schema for a timeseries.

This includes the name of the timeseries, as well as the datum type of its metric and the schema for each field.

type TimeseriesSchemaResultsPage

type TimeseriesSchemaResultsPage struct {
	// Items is list of items on this page of results
	Items []TimeseriesSchema `json:"items,omitempty" yaml:"items,omitempty"`
	// NextPage is token used to fetch the next page of results (if any)
	NextPage string `json:"next_page,omitempty" yaml:"next_page,omitempty"`
}

TimeseriesSchemaResultsPage is a single page of results

type User

type User struct {
	// Description is human-readable free-form text about a resource
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// ID is unique, immutable, system-controlled identifier for each resource
	ID string `json:"id,omitempty" yaml:"id,omitempty"`
	// Name is unique, mutable, user-controlled identifier for each resource
	Name Name `json:"name,omitempty" yaml:"name,omitempty"`
	// TimeCreated is timestamp when this resource was created
	TimeCreated *time.Time `json:"timeCreated,omitempty" yaml:"timeCreated,omitempty"`
	// TimeModified is timestamp when this resource was last modified
	TimeModified *time.Time `json:"timeModified,omitempty" yaml:"timeModified,omitempty"`
}

User is client view of a [`User`]

type UserResultsPage

type UserResultsPage struct {
	// Items is list of items on this page of results
	Items []User `json:"items,omitempty" yaml:"items,omitempty"`
	// NextPage is token used to fetch the next page of results (if any)
	NextPage string `json:"next_page,omitempty" yaml:"next_page,omitempty"`
}

UserResultsPage is a single page of results

type UsersService added in v0.0.3

type UsersService service

func (*UsersService) Get added in v0.0.3

func (s *UsersService) Get(userName Name) (*User, error)

Fetch a specific built-in system user

Parameters:

  • `userName`

func (*UsersService) List added in v0.0.3

func (s *UsersService) List(limit int, pageToken string, sortBy NameSortMode) (*UserResultsPage, error)

List the built-in system users

To iterate over all pages, use the `ListAllPages` method, instead.

Parameters:

  • `limit`
  • `pageToken`
  • `sortBy`

func (*UsersService) ListAllPages added in v0.0.3

func (s *UsersService) ListAllPages(sortBy NameSortMode) (*[]User, error)

ListAllPages

List the built-in system users

This method is a wrapper around the `List` method. This method returns all the pages at once.

Parameters:

  • `sortBy`

type VPC

type VPC struct {
	// Description is human-readable free-form text about a resource
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// DnsName is the name used for the VPC in DNS.
	DnsName Name `json:"dnsName,omitempty" yaml:"dnsName,omitempty"`
	// ID is unique, immutable, system-controlled identifier for each resource
	ID string `json:"id,omitempty" yaml:"id,omitempty"`
	// Name is unique, mutable, user-controlled identifier for each resource
	Name Name `json:"name,omitempty" yaml:"name,omitempty"`
	// ProjectID is id for the project containing this VPC
	ProjectID string `json:"projectId,omitempty" yaml:"projectId,omitempty"`
	// SystemRouterID is id for the system router where subnet default routes are registered
	SystemRouterID string `json:"systemRouterId,omitempty" yaml:"systemRouterId,omitempty"`
	// TimeCreated is timestamp when this resource was created
	TimeCreated *time.Time `json:"timeCreated,omitempty" yaml:"timeCreated,omitempty"`
	// TimeModified is timestamp when this resource was last modified
	TimeModified *time.Time `json:"timeModified,omitempty" yaml:"timeModified,omitempty"`
}

VPC is client view of a [`Vpc`]

type VPCCreate

type VPCCreate struct {
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// DnsName is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	DnsName Name `json:"dnsName,omitempty" yaml:"dnsName,omitempty"`
	// Name is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	Name Name `json:"name,omitempty" yaml:"name,omitempty"`
}

VPCCreate is create-time parameters for a [`Vpc`]

type VPCFirewallRule

type VPCFirewallRule struct {
	// Action is whether traffic matching the rule should be allowed or dropped
	Action VPCFirewallRuleAction `json:"action,omitempty" yaml:"action,omitempty"`
	// Direction is whether this rule is for incoming or outgoing traffic
	Direction VPCFirewallRuleDirection `json:"direction,omitempty" yaml:"direction,omitempty"`
	// Filters is reductions on the scope of the rule
	Filters VPCFirewallRuleFilter `json:"filters,omitempty" yaml:"filters,omitempty"`
	// Identity is common identifying metadata
	Identity IdentityMetadata `json:"identity,omitempty" yaml:"identity,omitempty"`
	// Priority is the relative priority of this rule
	Priority int `json:"priority,omitempty" yaml:"priority,omitempty"`
	// Status is whether this rule is in effect
	Status VPCFirewallRuleStatus `json:"status,omitempty" yaml:"status,omitempty"`
	// Targets is list of sets of instances that the rule applies to
	Targets []VPCFirewallRuleTarget `json:"targets,omitempty" yaml:"targets,omitempty"`
}

VPCFirewallRule is a single rule in a VPC firewall

type VPCFirewallRuleAction

type VPCFirewallRuleAction string

VPCFirewallRuleAction is the type definition for a VPCFirewallRuleAction.

const (
	// VPCFirewallRuleActionAllow represents the VPCFirewallRuleAction `"allow"`.
	VPCFirewallRuleActionAllow VPCFirewallRuleAction = "allow"
	// VPCFirewallRuleActionDeny represents the VPCFirewallRuleAction `"deny"`.
	VPCFirewallRuleActionDeny VPCFirewallRuleAction = "deny"
)

type VPCFirewallRuleDirection

type VPCFirewallRuleDirection string

VPCFirewallRuleDirection is the type definition for a VPCFirewallRuleDirection.

const (
	// VPCFirewallRuleDirectionInbound represents the VPCFirewallRuleDirection `"inbound"`.
	VPCFirewallRuleDirectionInbound VPCFirewallRuleDirection = "inbound"
	// VPCFirewallRuleDirectionOutbound represents the VPCFirewallRuleDirection `"outbound"`.
	VPCFirewallRuleDirectionOutbound VPCFirewallRuleDirection = "outbound"
)

type VPCFirewallRuleFilter

type VPCFirewallRuleFilter struct {
	// Hosts is if present, the sources (if incoming) or destinations (if outgoing) this rule applies to.
	Hosts []VPCFirewallRuleHostFilter `json:"hosts,omitempty" yaml:"hosts,omitempty"`
	// Ports is if present, the destination ports this rule applies to.
	Ports []L4PortRange `json:"ports,omitempty" yaml:"ports,omitempty"`
	// Protocols is if present, the networking protocols this rule applies to.
	Protocols []VPCFirewallRuleProtocol `json:"protocols,omitempty" yaml:"protocols,omitempty"`
}

VPCFirewallRuleFilter is filter for a firewall rule. A given packet must match every field that is present for the rule to apply to it. A packet matches a field if any entry in that field matches the packet.

type VPCFirewallRuleHostFilter

type VPCFirewallRuleHostFilter struct {
	Type  string `json:"type,omitempty" yaml:"type,omitempty"`
	Value Name   `json:"value,omitempty" yaml:"value,omitempty"`
}

VPCFirewallRuleHostFilter is a subset of [`NetworkTarget`], `VpcFirewallRuleHostFilter` specifies all possible targets that a route can forward to.

type VPCFirewallRuleHostFilterInstance

type VPCFirewallRuleHostFilterInstance struct {
	Type VPCFirewallRuleHostFilterType `json:"type,omitempty" yaml:"type,omitempty"`
	// Value is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	Value Name `json:"value,omitempty" yaml:"value,omitempty"`
}

VPCFirewallRuleHostFilterInstance is the type definition for a VPCFirewallRuleHostFilterInstance.

type VPCFirewallRuleHostFilterInternetGateway

type VPCFirewallRuleHostFilterInternetGateway struct {
	Type VPCFirewallRuleHostFilterType `json:"type,omitempty" yaml:"type,omitempty"`
	// Value is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	Value Name `json:"value,omitempty" yaml:"value,omitempty"`
}

VPCFirewallRuleHostFilterInternetGateway is the type definition for a VPCFirewallRuleHostFilterInternetGateway.

type VPCFirewallRuleHostFilterIp

type VPCFirewallRuleHostFilterIp struct {
	Type  VPCFirewallRuleHostFilterType `json:"type,omitempty" yaml:"type,omitempty"`
	Value string                        `json:"value,omitempty" yaml:"value,omitempty"`
}

VPCFirewallRuleHostFilterIp is the type definition for a VPCFirewallRuleHostFilterIp.

type VPCFirewallRuleHostFilterSubnet

type VPCFirewallRuleHostFilterSubnet struct {
	Type VPCFirewallRuleHostFilterType `json:"type,omitempty" yaml:"type,omitempty"`
	// Value is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	Value Name `json:"value,omitempty" yaml:"value,omitempty"`
}

VPCFirewallRuleHostFilterSubnet is the type definition for a VPCFirewallRuleHostFilterSubnet.

type VPCFirewallRuleHostFilterType

type VPCFirewallRuleHostFilterType string

VPCFirewallRuleHostFilterType is the type definition for a VPCFirewallRuleHostFilterType.

const (
	// VPCFirewallRuleHostFilterTypeInstance represents the VPCFirewallRuleHostFilterType `"instance"`.
	VPCFirewallRuleHostFilterTypeInstance VPCFirewallRuleHostFilterType = "instance"
)
const (
	// VPCFirewallRuleHostFilterTypeInternetGateway represents the VPCFirewallRuleHostFilterType `"internetGateway"`.
	VPCFirewallRuleHostFilterTypeInternetGateway VPCFirewallRuleHostFilterType = "internetGateway"
)
const (
	// VPCFirewallRuleHostFilterTypeIp represents the VPCFirewallRuleHostFilterType `"ip"`.
	VPCFirewallRuleHostFilterTypeIp VPCFirewallRuleHostFilterType = "ip"
)
const (
	// VPCFirewallRuleHostFilterTypeSubnet represents the VPCFirewallRuleHostFilterType `"subnet"`.
	VPCFirewallRuleHostFilterTypeSubnet VPCFirewallRuleHostFilterType = "subnet"
)
const (
	// VPCFirewallRuleHostFilterTypeVpc represents the VPCFirewallRuleHostFilterType `"vpc"`.
	VPCFirewallRuleHostFilterTypeVpc VPCFirewallRuleHostFilterType = "vpc"
)

type VPCFirewallRuleHostFilterVPC

type VPCFirewallRuleHostFilterVPC struct {
	Type VPCFirewallRuleHostFilterType `json:"type,omitempty" yaml:"type,omitempty"`
	// Value is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	Value Name `json:"value,omitempty" yaml:"value,omitempty"`
}

VPCFirewallRuleHostFilterVPC is the type definition for a VPCFirewallRuleHostFilterVPC.

type VPCFirewallRuleProtocol

type VPCFirewallRuleProtocol string

VPCFirewallRuleProtocol is the protocols that may be specified in a firewall rule's filter

const (
	// VPCFirewallRuleProtocolTCP represents the VPCFirewallRuleProtocol `"TCP"`.
	VPCFirewallRuleProtocolTCP VPCFirewallRuleProtocol = "TCP"
	// VPCFirewallRuleProtocolUDP represents the VPCFirewallRuleProtocol `"UDP"`.
	VPCFirewallRuleProtocolUDP VPCFirewallRuleProtocol = "UDP"
	// VPCFirewallRuleProtocolICMP represents the VPCFirewallRuleProtocol `"ICMP"`.
	VPCFirewallRuleProtocolICMP VPCFirewallRuleProtocol = "ICMP"
)

type VPCFirewallRuleResultsPage

type VPCFirewallRuleResultsPage struct {
	// Items is list of items on this page of results
	Items []VPCFirewallRule `json:"items,omitempty" yaml:"items,omitempty"`
	// NextPage is token used to fetch the next page of results (if any)
	NextPage string `json:"next_page,omitempty" yaml:"next_page,omitempty"`
}

VPCFirewallRuleResultsPage is a single page of results

type VPCFirewallRuleStatus

type VPCFirewallRuleStatus string

VPCFirewallRuleStatus is the type definition for a VPCFirewallRuleStatus.

const (
	// VPCFirewallRuleStatusDisabled represents the VPCFirewallRuleStatus `"disabled"`.
	VPCFirewallRuleStatusDisabled VPCFirewallRuleStatus = "disabled"
	// VPCFirewallRuleStatusEnabled represents the VPCFirewallRuleStatus `"enabled"`.
	VPCFirewallRuleStatusEnabled VPCFirewallRuleStatus = "enabled"
)

type VPCFirewallRuleTarget

type VPCFirewallRuleTarget struct {
	Type  string `json:"type,omitempty" yaml:"type,omitempty"`
	Value Name   `json:"value,omitempty" yaml:"value,omitempty"`
}

VPCFirewallRuleTarget is a subset of [`NetworkTarget`], `VpcFirewallRuleTarget` specifies all possible targets that a firewall rule can be attached to.

type VPCFirewallRuleTargetInstance

type VPCFirewallRuleTargetInstance struct {
	Type VPCFirewallRuleTargetType `json:"type,omitempty" yaml:"type,omitempty"`
	// Value is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	Value Name `json:"value,omitempty" yaml:"value,omitempty"`
}

VPCFirewallRuleTargetInstance is the type definition for a VPCFirewallRuleTargetInstance.

type VPCFirewallRuleTargetSubnet

type VPCFirewallRuleTargetSubnet struct {
	Type VPCFirewallRuleTargetType `json:"type,omitempty" yaml:"type,omitempty"`
	// Value is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	Value Name `json:"value,omitempty" yaml:"value,omitempty"`
}

VPCFirewallRuleTargetSubnet is the type definition for a VPCFirewallRuleTargetSubnet.

type VPCFirewallRuleTargetType

type VPCFirewallRuleTargetType string

VPCFirewallRuleTargetType is the type definition for a VPCFirewallRuleTargetType.

const (
	// VPCFirewallRuleTargetTypeInstance represents the VPCFirewallRuleTargetType `"instance"`.
	VPCFirewallRuleTargetTypeInstance VPCFirewallRuleTargetType = "instance"
)
const (
	// VPCFirewallRuleTargetTypeSubnet represents the VPCFirewallRuleTargetType `"subnet"`.
	VPCFirewallRuleTargetTypeSubnet VPCFirewallRuleTargetType = "subnet"
)
const (
	// VPCFirewallRuleTargetTypeVpc represents the VPCFirewallRuleTargetType `"vpc"`.
	VPCFirewallRuleTargetTypeVpc VPCFirewallRuleTargetType = "vpc"
)

type VPCFirewallRuleTargetVPC

type VPCFirewallRuleTargetVPC struct {
	Type VPCFirewallRuleTargetType `json:"type,omitempty" yaml:"type,omitempty"`
	// Value is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	Value Name `json:"value,omitempty" yaml:"value,omitempty"`
}

VPCFirewallRuleTargetVPC is the type definition for a VPCFirewallRuleTargetVPC.

type VPCFirewallRuleUpdate

type VPCFirewallRuleUpdate struct {
	// Action is whether traffic matching the rule should be allowed or dropped
	Action VPCFirewallRuleAction `json:"action,omitempty" yaml:"action,omitempty"`
	// Description is human-readable free-form text about a resource
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// Direction is whether this rule is for incoming or outgoing traffic
	Direction VPCFirewallRuleDirection `json:"direction,omitempty" yaml:"direction,omitempty"`
	// Filters is reductions on the scope of the rule
	Filters VPCFirewallRuleFilter `json:"filters,omitempty" yaml:"filters,omitempty"`
	// Priority is the relative priority of this rule
	Priority int `json:"priority,omitempty" yaml:"priority,omitempty"`
	// Status is whether this rule is in effect
	Status VPCFirewallRuleStatus `json:"status,omitempty" yaml:"status,omitempty"`
	// Targets is list of sets of instances that the rule applies to
	Targets []VPCFirewallRuleTarget `json:"targets,omitempty" yaml:"targets,omitempty"`
}

VPCFirewallRuleUpdate is a single rule in a VPC firewall

type VPCFirewallRuleUpdateParams

type VPCFirewallRuleUpdateParams struct {
}

VPCFirewallRuleUpdateParams is updateable properties of a [`Vpc`]'s firewall Note that VpcFirewallRules are implicitly created along with a Vpc, so there is no explicit creation.

type VPCFirewallRuleUpdateResult

type VPCFirewallRuleUpdateResult struct {
}

VPCFirewallRuleUpdateResult is response to an update replacing [`Vpc`]'s firewall

type VPCResultsPage

type VPCResultsPage struct {
	// Items is list of items on this page of results
	Items []VPC `json:"items,omitempty" yaml:"items,omitempty"`
	// NextPage is token used to fetch the next page of results (if any)
	NextPage string `json:"next_page,omitempty" yaml:"next_page,omitempty"`
}

VPCResultsPage is a single page of results

type VPCRouter

type VPCRouter struct {
	// Identity is common identifying metadata
	Identity IdentityMetadata `json:"identity,omitempty" yaml:"identity,omitempty"`
	Kind     VPCRouterKind    `json:"kind,omitempty" yaml:"kind,omitempty"`
	// VPCId is the VPC to which the router belongs.
	VPCId string `json:"vpc_id,omitempty" yaml:"vpc_id,omitempty"`
}

VPCRouter is a VPC router defines a series of rules that indicate where traffic should be sent depending on its destination.

type VPCRouterCreate

type VPCRouterCreate struct {
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// Name is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	Name Name `json:"name,omitempty" yaml:"name,omitempty"`
}

VPCRouterCreate is create-time parameters for a [`VpcRouter`]

type VPCRouterKind

type VPCRouterKind string

VPCRouterKind is the type definition for a VPCRouterKind.

const (
	// VPCRouterKindSystem represents the VPCRouterKind `"system"`.
	VPCRouterKindSystem VPCRouterKind = "system"
	// VPCRouterKindCustom represents the VPCRouterKind `"custom"`.
	VPCRouterKindCustom VPCRouterKind = "custom"
)

type VPCRouterResultsPage

type VPCRouterResultsPage struct {
	// Items is list of items on this page of results
	Items []VPCRouter `json:"items,omitempty" yaml:"items,omitempty"`
	// NextPage is token used to fetch the next page of results (if any)
	NextPage string `json:"next_page,omitempty" yaml:"next_page,omitempty"`
}

VPCRouterResultsPage is a single page of results

type VPCRouterUpdate

type VPCRouterUpdate struct {
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	Name        Name   `json:"name,omitempty" yaml:"name,omitempty"`
}

VPCRouterUpdate is updateable properties of a [`VpcRouter`]

type VPCSubnet

type VPCSubnet struct {
	// Identity is common identifying metadata
	Identity IdentityMetadata `json:"identity,omitempty" yaml:"identity,omitempty"`
	// IPv4Block is the IPv4 subnet CIDR block.
	IPv4Block IPv4Net `json:"ipv4_block,omitempty" yaml:"ipv4_block,omitempty"`
	// IPv6Block is the IPv6 subnet CIDR block.
	IPv6Block IPv6Net `json:"ipv6_block,omitempty" yaml:"ipv6_block,omitempty"`
	// VPCId is the VPC to which the subnet belongs.
	VPCId string `json:"vpc_id,omitempty" yaml:"vpc_id,omitempty"`
}

VPCSubnet is a VPC subnet represents a logical grouping for instances that allows network traffic between them, within a IPv4 subnetwork or optionall an IPv6 subnetwork.

type VPCSubnetCreate

type VPCSubnetCreate struct {
	Description string  `json:"description,omitempty" yaml:"description,omitempty"`
	IPv4Block   IPv4Net `json:"ipv4Block,omitempty" yaml:"ipv4Block,omitempty"`
	IPv6Block   IPv6Net `json:"ipv6Block,omitempty" yaml:"ipv6Block,omitempty"`
	// Name is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	Name Name `json:"name,omitempty" yaml:"name,omitempty"`
}

VPCSubnetCreate is create-time parameters for a [`VpcSubnet`]

type VPCSubnetResultsPage

type VPCSubnetResultsPage struct {
	// Items is list of items on this page of results
	Items []VPCSubnet `json:"items,omitempty" yaml:"items,omitempty"`
	// NextPage is token used to fetch the next page of results (if any)
	NextPage string `json:"next_page,omitempty" yaml:"next_page,omitempty"`
}

VPCSubnetResultsPage is a single page of results

type VPCSubnetUpdate

type VPCSubnetUpdate struct {
	Description string  `json:"description,omitempty" yaml:"description,omitempty"`
	IPv4Block   IPv4Net `json:"ipv4Block,omitempty" yaml:"ipv4Block,omitempty"`
	IPv6Block   IPv6Net `json:"ipv6Block,omitempty" yaml:"ipv6Block,omitempty"`
	Name        Name    `json:"name,omitempty" yaml:"name,omitempty"`
}

VPCSubnetUpdate is updateable properties of a [`VpcSubnet`]

type VPCUpdate

type VPCUpdate struct {
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	DnsName     Name   `json:"dnsName,omitempty" yaml:"dnsName,omitempty"`
	Name        Name   `json:"name,omitempty" yaml:"name,omitempty"`
}

VPCUpdate is updateable properties of a [`Vpc`]

Jump to

Keyboard shortcuts

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