oxide

package module
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2022 License: MIT Imports: 13 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.

Releasing a new version
  1. Make sure the VERSION.txt has the new version you want to release.
  2. Make sure you have run make all and pushed any changes. The release will fail if running make all causes any changes to the generated code.
  3. Run make tag this is just an easy command for making a tag formatted correctly with the version.
  4. Push the tag (the result of make tag gives instructions for this)
  5. Everything else is triggered from the tag push. Just make sure all the tests pass on the main branch before making and pushing a new tag.

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

BinRangedoubleTypes is the collection of all BinRangedoubleType values.

BinRangeint64Types is the collection of all BinRangeint64Type values.

DatumTypes is the collection of all DatumType values.

View Source
var DigestTypes = []DigestType{
	DigestTypeSha256,
}

DigestTypes is the collection of all DigestType values.

DiskMetricNames is the collection of all DiskMetricName values.

DiskSourceTypes is the collection of all DiskSourceType values.

DiskStateStates is the collection of all DiskStateState values.

ExternalIpCreateTypes is the collection of all ExternalIpCreateType values.

FieldSources is the collection of all FieldSource values.

FieldTypes is the collection of all FieldType values.

FirewallRuleActions is the collection of all FirewallRuleAction values.

FirewallRuleDirections is the collection of all FirewallRuleDirection values.

FirewallRuleHostFilterTypes is the collection of all FirewallRuleHostFilterType values.

FirewallRuleProtocols is the collection of all FirewallRuleProtocol values.

FirewallRuleStatuses is the collection of all FirewallRuleStatus values.

FirewallRuleTargetTypes is the collection of all FirewallRuleTargetType values.

FleetRoles is the collection of all FleetRole values.

View Source
var IdSortModes = []IdSortMode{
	IdSortModeIdAscending,
}

IdSortModes is the collection of all IdSortMode values.

View Source
var IdentityProviderTypes = []IdentityProviderType{
	IdentityProviderTypeSaml,
}

IdentityProviderTypes is the collection of all IdentityProviderType values.

IdentityTypes is the collection of all IdentityType values.

IdpMetadataSourceTypes is the collection of all IdpMetadataSourceType values.

ImageSourceTypes is the collection of all ImageSourceType values.

InstanceDiskAttachmentTypes is the collection of all InstanceDiskAttachmentType values.

InstanceNetworkInterfaceAttachmentTypes is the collection of all InstanceNetworkInterfaceAttachmentType values.

InstanceStates is the collection of all InstanceState values.

IpKinds is the collection of all IpKind values.

NameOrIdSortModes is the collection of all NameOrIdSortMode values.

NameSortModes is the collection of all NameSortMode values.

OrganizationRoles is the collection of all OrganizationRole values.

ProjectRoles is the collection of all ProjectRole values.

RouteDestinationTypes is the collection of all RouteDestinationType values.

RouteKinds is the collection of all RouteKind values.

RouteTargetTypes is the collection of all RouteTargetType values.

RouterKinds is the collection of all RouterKind values.

SagaErrorInfoErrors is the collection of all SagaErrorInfoError values.

SagaStateStates is the collection of all SagaStateState values.

SiloRoles is the collection of all SiloRole values.

UserProvisionTypes is the collection of all UserProvisionType values.

Functions

This section is empty.

Types

type BinRangedouble added in v0.0.20

type BinRangedouble struct {
	End   float64 `json:"end,omitempty" yaml:"end,omitempty"`
	Type  string  `json:"type,omitempty" yaml:"type,omitempty"`
	Start float64 `json:"start,omitempty" yaml:"start,omitempty"`
}

BinRangedouble is a type storing a range over `T`.

This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively.

type BinRangedoubleRange added in v0.0.20

type BinRangedoubleRange struct {
	End   float64            `json:"end,omitempty" yaml:"end,omitempty"`
	Start float64            `json:"start,omitempty" yaml:"start,omitempty"`
	Type  BinRangedoubleType `json:"type,omitempty" yaml:"type,omitempty"`
}

BinRangedoubleRange is a range bounded inclusively below and exclusively above, `start..end`.

type BinRangedoubleRangeFrom added in v0.0.20

type BinRangedoubleRangeFrom struct {
	Start float64            `json:"start,omitempty" yaml:"start,omitempty"`
	Type  BinRangedoubleType `json:"type,omitempty" yaml:"type,omitempty"`
}

BinRangedoubleRangeFrom is a range bounded inclusively below and unbounded above, `start..`.

type BinRangedoubleRangeTo added in v0.0.20

type BinRangedoubleRangeTo struct {
	End  float64            `json:"end,omitempty" yaml:"end,omitempty"`
	Type BinRangedoubleType `json:"type,omitempty" yaml:"type,omitempty"`
}

BinRangedoubleRangeTo is a range unbounded below and exclusively above, `..end`.

type BinRangedoubleType added in v0.0.20

type BinRangedoubleType string

BinRangedoubleType is the type definition for a BinRangedoubleType.

const (
	// BinRangedoubleTypeRange represents the BinRangedoubleType `"range"`.
	BinRangedoubleTypeRange BinRangedoubleType = "range"
)
const (
	// BinRangedoubleTypeRangeFrom represents the BinRangedoubleType `"range_from"`.
	BinRangedoubleTypeRangeFrom BinRangedoubleType = "range_from"
)
const (
	// BinRangedoubleTypeRangeTo represents the BinRangedoubleType `"range_to"`.
	BinRangedoubleTypeRangeTo BinRangedoubleType = "range_to"
)

type BinRangeint64 added in v0.0.20

type BinRangeint64 struct {
	End   int    `json:"end,omitempty" yaml:"end,omitempty"`
	Type  string `json:"type,omitempty" yaml:"type,omitempty"`
	Start int    `json:"start,omitempty" yaml:"start,omitempty"`
}

BinRangeint64 is a type storing a range over `T`.

This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively.

type BinRangeint64Range added in v0.0.20

type BinRangeint64Range struct {
	End   int               `json:"end,omitempty" yaml:"end,omitempty"`
	Start int               `json:"start,omitempty" yaml:"start,omitempty"`
	Type  BinRangeint64Type `json:"type,omitempty" yaml:"type,omitempty"`
}

BinRangeint64Range is a range bounded inclusively below and exclusively above, `start..end`.

type BinRangeint64RangeFrom added in v0.0.20

type BinRangeint64RangeFrom struct {
	Start int               `json:"start,omitempty" yaml:"start,omitempty"`
	Type  BinRangeint64Type `json:"type,omitempty" yaml:"type,omitempty"`
}

BinRangeint64RangeFrom is a range bounded inclusively below and unbounded above, `start..`.

type BinRangeint64RangeTo added in v0.0.20

type BinRangeint64RangeTo struct {
	End  int               `json:"end,omitempty" yaml:"end,omitempty"`
	Type BinRangeint64Type `json:"type,omitempty" yaml:"type,omitempty"`
}

BinRangeint64RangeTo is a range unbounded below and exclusively above, `..end`.

type BinRangeint64Type added in v0.0.20

type BinRangeint64Type string

BinRangeint64Type is the type definition for a BinRangeint64Type.

const (
	// BinRangeint64TypeRange represents the BinRangeint64Type `"range"`.
	BinRangeint64TypeRange BinRangeint64Type = "range"
)
const (
	// BinRangeint64TypeRangeFrom represents the BinRangeint64Type `"range_from"`.
	BinRangeint64TypeRangeFrom BinRangeint64Type = "range_from"
)
const (
	// BinRangeint64TypeRangeTo represents the BinRangeint64Type `"range_to"`.
	BinRangeint64TypeRangeTo BinRangeint64Type = "range_to"
)

type Bindouble added in v0.0.20

type Bindouble struct {
	// Count is the total count of samples in this bin.
	Count int `json:"count,omitempty" yaml:"count,omitempty"`
	// Range is the range of the support covered by this bin.
	Range BinRangedouble `json:"range,omitempty" yaml:"range,omitempty"`
}

Bindouble is type storing bin edges and a count of samples within it.

type Binint64 added in v0.0.20

type Binint64 struct {
	// Count is the total count of samples in this bin.
	Count int `json:"count,omitempty" yaml:"count,omitempty"`
	// Range is the range of the support covered by this bin.
	Range BinRangeint64 `json:"range,omitempty" yaml:"range,omitempty"`
}

Binint64 is type storing bin edges and a count of samples within it.

type BlockSize added in v0.0.14

type BlockSize int64

type ByteCount

type ByteCount int64

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 {

	// Disks: Virtual disks are used to store instance-local data which includes the operating system.
	Disks *DisksService
	// Firewall: Firewall operation controls the flow of network data into a VPC
	Firewall *FirewallService
	// Hardware: These operations pertain to hardware inventory and management. Racks are the unit of expansion of an Oxide deployment. Racks are in turn composed of sleds, switches, power supplies, and a cabled backplane.
	Hardware *HardwareService
	// Hidden: TODO operations that will not ship to customers
	Hidden *HiddenService
	// Images: Images are read-only Virtual Disks that may be used to boot Virtual Machines
	Images *ImagesService
	// Imagesglobal: Images are read-only Virtual Disks that may be used to boot Virtual Machines. These images are scoped globally.
	Imagesglobal *ImagesglobalService
	// Instances: Virtual machine instances are the basic unit of computation. These operations are used for provisioning, controlling, and destroying instances.
	Instances *InstancesService
	// IpPools: IP Pools contain external IP addresses that can be assigned to virtual machine Instances.
	IpPools *IpPoolsService
	// Login: Authentication endpoints
	Login *LoginService
	// Metrics: Metrics provide insight into the operation of the Oxide deployment. These include telemetry on hardware and software components that can be used to understand the current state as well as to diagnose issues.
	Metrics *MetricsService
	// Organizations: Organizations represent a subset of users and projects in an Oxide deployment.
	Organizations *OrganizationsService
	// Policy: System-wide IAM policy
	Policy *PolicyService
	// Projects: Projects are a grouping of associated resources such as instances and disks within an organization for purposes of billing and access control.
	Projects *ProjectsService
	// Roles: Roles are a component of Identity and Access Management (IAM) that allow a user or agent account access to additional permissions.
	Roles *RolesService
	// Routers: Routers direct the flow of network traffic into, out of, and within a VPC via routes.
	Routers *RoutersService
	// Routes: Routes define router policy.
	Routes *RoutesService
	// Sagas: Sagas are the abstraction used to represent multi-step operations within the Oxide deployment. These operations can be used to query saga status and report errors.
	Sagas *SagasService
	// Session: Information pertaining to the current session.
	Session *SessionService
	// Silos: Silos represent a logical partition of users and resources.
	Silos *SilosService
	// Snapshots: Snapshots of Virtual Disks at a particular point in time.
	Snapshots *SnapshotsService
	// Subnets: This tag should be moved into a generic network tag
	Subnets *SubnetsService
	// System: Internal system information
	System *SystemService
	// Updates: This tag should be moved into a operations tag
	Updates *UpdatesService
	// VPCs: A Virtual Private Cloud (VPC) is an isolated network environment that should probaby be moved into a more generic networking tag
	VPCs *VPCsService
	// 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 Cumulativedouble added in v0.0.20

type Cumulativedouble struct {
	StartTime *time.Time `json:"start_time,omitempty" yaml:"start_time,omitempty"`
	Value     float64    `json:"value,omitempty" yaml:"value,omitempty"`
}

Cumulativedouble is a cumulative or counter data type.

type Cumulativeint64 added in v0.0.20

type Cumulativeint64 struct {
	StartTime *time.Time `json:"start_time,omitempty" yaml:"start_time,omitempty"`
	Value     int        `json:"value,omitempty" yaml:"value,omitempty"`
}

Cumulativeint64 is a cumulative or counter data type.

type Datum added in v0.0.20

type Datum struct {
	Datum bool   `json:"datum,omitempty" yaml:"datum,omitempty"`
	Type  string `json:"type,omitempty" yaml:"type,omitempty"`
}

Datum is a `Datum` is a single sampled data point from a metric.

type DatumBool added in v0.0.20

type DatumBool struct {
	Datum bool      `json:"datum,omitempty" yaml:"datum,omitempty"`
	Type  DatumType `json:"type,omitempty" yaml:"type,omitempty"`
}

DatumBool is the type definition for a DatumBool.

type DatumBytes added in v0.0.20

type DatumBytes struct {
	Datum []string  `json:"datum,omitempty" yaml:"datum,omitempty"`
	Type  DatumType `json:"type,omitempty" yaml:"type,omitempty"`
}

DatumBytes is the type definition for a DatumBytes.

type DatumCumulativeF64 added in v0.0.20

type DatumCumulativeF64 struct {
	// Datum is a cumulative or counter data type.
	Datum Cumulativedouble `json:"datum,omitempty" yaml:"datum,omitempty"`
	Type  DatumType        `json:"type,omitempty" yaml:"type,omitempty"`
}

DatumCumulativeF64 is the type definition for a DatumCumulativeF64.

type DatumCumulativeI64 added in v0.0.20

type DatumCumulativeI64 struct {
	// Datum is a cumulative or counter data type.
	Datum Cumulativeint64 `json:"datum,omitempty" yaml:"datum,omitempty"`
	Type  DatumType       `json:"type,omitempty" yaml:"type,omitempty"`
}

DatumCumulativeI64 is the type definition for a DatumCumulativeI64.

type DatumF64 added in v0.0.20

type DatumF64 struct {
	Datum float64   `json:"datum,omitempty" yaml:"datum,omitempty"`
	Type  DatumType `json:"type,omitempty" yaml:"type,omitempty"`
}

DatumF64 is the type definition for a DatumF64.

type DatumHistogramF64 added in v0.0.20

type DatumHistogramF64 struct {
	// Datum is a simple type for managing a histogram metric.
	//
	// A histogram maintains the count of any number of samples, over a set of bins. Bins are specified on construction via their _left_ edges, inclusive. There can't be any "gaps" in the bins, and an additional bin may be added to the left, right, or both so that the bins extend to the entire range of the support.
	//
	// Note that any gaps, unsorted bins, or non-finite values will result in an error.
	//
	// Example ------- “`rust use oximeter::histogram::{BinRange, Histogram};
	//
	// let edges = [0i64, 10, 20]; let mut hist = Histogram::new(&edges).unwrap(); assert_eq!(hist.n_bins(), 4); // One additional bin for the range (20..) assert_eq!(hist.n_samples(), 0); hist.sample(4); hist.sample(100); assert_eq!(hist.n_samples(), 2);
	//
	// let data = hist.iter().collect::<Vec<_>>(); assert_eq!(data[0].range, BinRange::range(i64::MIN, 0)); // An additional bin for `..0` assert_eq!(data[0].count, 0); // Nothing is in this bin
	//
	// assert_eq!(data[1].range, BinRange::range(0, 10)); // The range `0..10` assert_eq!(data[1].count, 1); // 4 is sampled into this bin “`
	//
	// Notes -----
	//
	// Histograms may be constructed either from their left bin edges, or from a sequence of ranges. In either case, the left-most bin may be converted upon construction. In particular, if the left-most value is not equal to the minimum of the support, a new bin will be added from the minimum to that provided value. If the left-most value _is_ the support's minimum, because the provided bin was unbounded below, such as `(..0)`, then that bin will be converted into one bounded below, `(MIN..0)` in this case.
	//
	// The short of this is that, most of the time, it shouldn't matter. If one specifies the extremes of the support as their bins, be aware that the left-most may be converted from a `BinRange::RangeTo` into a `BinRange::Range`. In other words, the first bin of a histogram is _always_ a `Bin::Range` or a `Bin::RangeFrom` after construction. In fact, every bin is one of those variants, the `BinRange::RangeTo` is only provided as a convenience during construction.
	Datum Histogramdouble `json:"datum,omitempty" yaml:"datum,omitempty"`
	Type  DatumType       `json:"type,omitempty" yaml:"type,omitempty"`
}

DatumHistogramF64 is the type definition for a DatumHistogramF64.

type DatumHistogramI64 added in v0.0.20

type DatumHistogramI64 struct {
	// Datum is a simple type for managing a histogram metric.
	//
	// A histogram maintains the count of any number of samples, over a set of bins. Bins are specified on construction via their _left_ edges, inclusive. There can't be any "gaps" in the bins, and an additional bin may be added to the left, right, or both so that the bins extend to the entire range of the support.
	//
	// Note that any gaps, unsorted bins, or non-finite values will result in an error.
	//
	// Example ------- “`rust use oximeter::histogram::{BinRange, Histogram};
	//
	// let edges = [0i64, 10, 20]; let mut hist = Histogram::new(&edges).unwrap(); assert_eq!(hist.n_bins(), 4); // One additional bin for the range (20..) assert_eq!(hist.n_samples(), 0); hist.sample(4); hist.sample(100); assert_eq!(hist.n_samples(), 2);
	//
	// let data = hist.iter().collect::<Vec<_>>(); assert_eq!(data[0].range, BinRange::range(i64::MIN, 0)); // An additional bin for `..0` assert_eq!(data[0].count, 0); // Nothing is in this bin
	//
	// assert_eq!(data[1].range, BinRange::range(0, 10)); // The range `0..10` assert_eq!(data[1].count, 1); // 4 is sampled into this bin “`
	//
	// Notes -----
	//
	// Histograms may be constructed either from their left bin edges, or from a sequence of ranges. In either case, the left-most bin may be converted upon construction. In particular, if the left-most value is not equal to the minimum of the support, a new bin will be added from the minimum to that provided value. If the left-most value _is_ the support's minimum, because the provided bin was unbounded below, such as `(..0)`, then that bin will be converted into one bounded below, `(MIN..0)` in this case.
	//
	// The short of this is that, most of the time, it shouldn't matter. If one specifies the extremes of the support as their bins, be aware that the left-most may be converted from a `BinRange::RangeTo` into a `BinRange::Range`. In other words, the first bin of a histogram is _always_ a `Bin::Range` or a `Bin::RangeFrom` after construction. In fact, every bin is one of those variants, the `BinRange::RangeTo` is only provided as a convenience during construction.
	Datum Histogramint64 `json:"datum,omitempty" yaml:"datum,omitempty"`
	Type  DatumType      `json:"type,omitempty" yaml:"type,omitempty"`
}

DatumHistogramI64 is the type definition for a DatumHistogramI64.

type DatumI64 added in v0.0.20

type DatumI64 struct {
	Datum int       `json:"datum,omitempty" yaml:"datum,omitempty"`
	Type  DatumType `json:"type,omitempty" yaml:"type,omitempty"`
}

DatumI64 is the type definition for a DatumI64.

type DatumString added in v0.0.20

type DatumString struct {
	Datum string    `json:"datum,omitempty" yaml:"datum,omitempty"`
	Type  DatumType `json:"type,omitempty" yaml:"type,omitempty"`
}

DatumString is the type definition for a DatumString.

type DatumType

type DatumType string

DatumType is the type definition for a DatumType.

const (
	// DatumTypeBool represents the DatumType `"bool"`.
	DatumTypeBool DatumType = "bool"
)
const (
	// DatumTypeBytes represents the DatumType `"bytes"`.
	DatumTypeBytes DatumType = "bytes"
)
const (
	// DatumTypeCumulativeF64 represents the DatumType `"cumulative_f64"`.
	DatumTypeCumulativeF64 DatumType = "cumulative_f64"
)
const (
	// DatumTypeCumulativeI64 represents the DatumType `"cumulative_i64"`.
	DatumTypeCumulativeI64 DatumType = "cumulative_i64"
)
const (
	// DatumTypeF64 represents the DatumType `"f64"`.
	DatumTypeF64 DatumType = "f64"
)
const (
	// DatumTypeHistogramF64 represents the DatumType `"histogram_f64"`.
	DatumTypeHistogramF64 DatumType = "histogram_f64"
)
const (
	// DatumTypeHistogramI64 represents the DatumType `"histogram_i64"`.
	DatumTypeHistogramI64 DatumType = "histogram_i64"
)
const (
	// DatumTypeI64 represents the DatumType `"i64"`.
	DatumTypeI64 DatumType = "i64"
)
const (
	// DatumTypeString represents the DatumType `"string"`.
	DatumTypeString DatumType = "string"
)

type DerEncodedKeyPair added in v0.0.18

type DerEncodedKeyPair struct {
	// PrivateKey is request signing private key (base64 encoded der file)
	PrivateKey string `json:"private_key,omitempty" yaml:"private_key,omitempty"`
	// PublicCert is request signing public certificate (base64 encoded der file)
	PublicCert string `json:"public_cert,omitempty" yaml:"public_cert,omitempty"`
}

DerEncodedKeyPair is the type definition for a DerEncodedKeyPair.

type DeviceAccessTokenRequest added in v0.0.20

type DeviceAccessTokenRequest struct {
	ClientID   string `json:"client_id,omitempty" yaml:"client_id,omitempty"`
	DeviceCode string `json:"device_code,omitempty" yaml:"device_code,omitempty"`
	GrantType  string `json:"grant_type,omitempty" yaml:"grant_type,omitempty"`
}

DeviceAccessTokenRequest is the type definition for a DeviceAccessTokenRequest.

type DeviceAuthRequest added in v0.0.20

type DeviceAuthRequest struct {
	ClientID string `json:"client_id,omitempty" yaml:"client_id,omitempty"`
}

DeviceAuthRequest is the type definition for a DeviceAuthRequest.

type DeviceAuthVerify added in v0.0.20

type DeviceAuthVerify struct {
	UserCode string `json:"user_code,omitempty" yaml:"user_code,omitempty"`
}

DeviceAuthVerify is the type definition for a DeviceAuthVerify.

type Digest added in v0.0.15

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

Digest is the type definition for a Digest.

type DigestSha256 added in v0.0.15

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

DigestSha256 is the type definition for a DigestSha256.

type DigestType added in v0.0.17

type DigestType string

DigestType is the type definition for a DigestType.

const (
	// DigestTypeSha256 represents the DigestType `"sha256"`.
	DigestTypeSha256 DigestType = "sha256"
)

type Disk

type Disk struct {
	// BlockSize 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.
	BlockSize ByteCount `json:"block_size,omitempty" yaml:"block_size,omitempty"`
	// Description is human-readable free-form text about a resource
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	DevicePath  string `json:"device_path,omitempty" yaml:"device_path,omitempty"`
	// ID is unique, immutable, system-controlled identifier for each resource
	ID      string `json:"id,omitempty" yaml:"id,omitempty"`
	ImageID string `json:"image_id,omitempty" yaml:"image_id,omitempty"`
	// Name is unique, mutable, user-controlled identifier for each resource
	Name      string `json:"name,omitempty" yaml:"name,omitempty"`
	ProjectID string `json:"project_id,omitempty" yaml:"project_id,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:"snapshot_id,omitempty" yaml:"snapshot_id,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:"time_created,omitempty" yaml:"time_created,omitempty"`
	// TimeModified is timestamp when this resource was last modified
	TimeModified *time.Time `json:"time_modified,omitempty" yaml:"time_modified,omitempty"`
}

Disk is client view of a [`Disk`]

type DiskCreate

type DiskCreate struct {
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// DiskSource is initial source for this disk
	DiskSource DiskSource `json:"disk_source,omitempty" yaml:"disk_source,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 '-'. Names cannot be a UUID though they may contain a UUID.
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
	// Size is total size of the Disk in bytes
	Size ByteCount `json:"size,omitempty" yaml:"size,omitempty"`
}

DiskCreate is create-time parameters for a [`Disk`](omicron_common::api::external::Disk)

type DiskIdentifier

type DiskIdentifier struct {
	// 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 '-'. Names cannot be a UUID though they may contain a UUID.
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
}

DiskIdentifier is parameters for the [`Disk`](omicron_common::api::external::Disk) to be attached or detached to an instance

type DiskMetricName added in v0.0.20

type DiskMetricName string

DiskMetricName is the type definition for a DiskMetricName.

const (
	// DiskMetricNameActivated represents the DiskMetricName `"activated"`.
	DiskMetricNameActivated DiskMetricName = "activated"
	// DiskMetricNameFlush represents the DiskMetricName `"flush"`.
	DiskMetricNameFlush DiskMetricName = "flush"
	// DiskMetricNameRead represents the DiskMetricName `"read"`.
	DiskMetricNameRead DiskMetricName = "read"
	// DiskMetricNameReadBytes represents the DiskMetricName `"read_bytes"`.
	DiskMetricNameReadBytes DiskMetricName = "read_bytes"
	// DiskMetricNameWrite represents the DiskMetricName `"write"`.
	DiskMetricNameWrite DiskMetricName = "write"
	// DiskMetricNameWriteBytes represents the DiskMetricName `"write_bytes"`.
	DiskMetricNameWriteBytes DiskMetricName = "write_bytes"
)

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 DiskSource added in v0.0.15

type DiskSource struct {
	BlockSize  BlockSize `json:"block_size,omitempty" yaml:"block_size,omitempty"`
	Type       string    `json:"type,omitempty" yaml:"type,omitempty"`
	SnapshotID string    `json:"snapshot_id,omitempty" yaml:"snapshot_id,omitempty"`
	ImageID    string    `json:"image_id,omitempty" yaml:"image_id,omitempty"`
}

DiskSource is different sources for a disk

type DiskSourceBlank added in v0.0.15

type DiskSourceBlank struct {
	// BlockSize is size of blocks for this Disk. valid values are: 512, 2048, or 4096
	BlockSize BlockSize      `json:"block_size,omitempty" yaml:"block_size,omitempty"`
	Type      DiskSourceType `json:"type,omitempty" yaml:"type,omitempty"`
}

DiskSourceBlank is create a blank disk

type DiskSourceGlobalImage added in v0.0.15

type DiskSourceGlobalImage struct {
	ImageID string         `json:"image_id,omitempty" yaml:"image_id,omitempty"`
	Type    DiskSourceType `json:"type,omitempty" yaml:"type,omitempty"`
}

DiskSourceGlobalImage is create a disk from a global image

type DiskSourceImage added in v0.0.15

type DiskSourceImage struct {
	ImageID string         `json:"image_id,omitempty" yaml:"image_id,omitempty"`
	Type    DiskSourceType `json:"type,omitempty" yaml:"type,omitempty"`
}

DiskSourceImage is create a disk from a project image

type DiskSourceSnapshot added in v0.0.15

type DiskSourceSnapshot struct {
	SnapshotID string         `json:"snapshot_id,omitempty" yaml:"snapshot_id,omitempty"`
	Type       DiskSourceType `json:"type,omitempty" yaml:"type,omitempty"`
}

DiskSourceSnapshot is create a disk from a disk snapshot

type DiskSourceType added in v0.0.15

type DiskSourceType string

DiskSourceType is the type definition for a DiskSourceType.

const (
	// DiskSourceTypeBlank represents the DiskSourceType `"blank"`.
	DiskSourceTypeBlank DiskSourceType = "blank"
)
const (
	// DiskSourceTypeGlobalImage represents the DiskSourceType `"global_image"`.
	DiskSourceTypeGlobalImage DiskSourceType = "global_image"
)
const (
	// DiskSourceTypeImage represents the DiskSourceType `"image"`.
	DiskSourceTypeImage DiskSourceType = "image"
)
const (
	// DiskSourceTypeSnapshot represents the DiskSourceType `"snapshot"`.
	DiskSourceTypeSnapshot DiskSourceType = "snapshot"
)

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 DisksService added in v0.0.7

type DisksService service

DisksService: Virtual disks are used to store instance-local data which includes the operating system.

func (*DisksService) Create added in v0.0.7

func (s *DisksService) Create(organizationName string, projectName string, j *DiskCreate) (*Disk, error)

Parameters:

  • `organizationName`: The organization's unique name.
  • `projectName`: The project's unique name within the organization.

func (*DisksService) Delete added in v0.0.7

func (s *DisksService) Delete(diskName string, organizationName string, projectName string) error

Delete: Delete a disk

Parameters:

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

func (*DisksService) List added in v0.0.7

func (s *DisksService) List(limit int, pageToken string, sortBy NameSortMode, organizationName string, projectName string) (*DiskResultsPage, error)

List: List disks

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

Parameters:

  • `limit`: Maximum number of items returned by a single call
  • `organizationName`: The organization's unique name.
  • `pageToken`: Token returned by previous call to retrieve the subsequent page
  • `projectName`: The project's unique name within the organization.
  • `sortBy`

func (*DisksService) ListAllPages added in v0.0.7

func (s *DisksService) ListAllPages(sortBy NameSortMode, organizationName string, projectName string) (*[]Disk, error)

ListAllPages: List disks

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

Parameters:

  • `organizationName`: The organization's unique name.
  • `projectName`: The project's unique name within the organization.
  • `sortBy`

func (*DisksService) MetricsList added in v0.0.20

func (s *DisksService) MetricsList(diskName string, metricName DiskMetricName, organizationName string, projectName string, endTime *time.Time, limit int, pageToken string, startTime *time.Time) (*MeasurementResultsPage, error)

MetricsList: Fetch disk metrics

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

Parameters:

  • `diskName`
  • `endTime`: An exclusive end time of metrics.
  • `limit`: Maximum number of items returned by a single call
  • `metricName`
  • `organizationName`
  • `pageToken`: Token returned by previous call to retrieve the subsequent page
  • `projectName`
  • `startTime`: An inclusive start time of metrics.

func (*DisksService) MetricsListAllPages added in v0.0.20

func (s *DisksService) MetricsListAllPages(diskName string, metricName DiskMetricName, organizationName string, projectName string, endTime *time.Time, startTime *time.Time) (*[]Measurement, error)

MetricsListAllPages: Fetch disk metrics

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

Parameters:

  • `diskName`
  • `endTime`: An exclusive end time of metrics.
  • `metricName`
  • `organizationName`
  • `projectName`
  • `startTime`: An inclusive start time of metrics.

func (*DisksService) View added in v0.0.20

func (s *DisksService) View(diskName string, organizationName string, projectName string) (*Disk, error)

View: Fetch a disk

Parameters:

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

func (*DisksService) ViewByID added in v0.0.20

func (s *DisksService) ViewByID(id string) (*Disk, error)

ViewByID: Fetch a disk by id

Parameters:

  • `id`

type Distribution added in v0.0.17

type Distribution struct {
	// Name is the name of the distribution (e.g. "alpine" or "ubuntu")
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
	// Version is the version of the distribution (e.g. "3.10" or "18.04")
	Version string `json:"version,omitempty" yaml:"version,omitempty"`
}

Distribution is oS image distribution

type Error added in v0.0.7

type Error struct {
	ErrorCode string `json:"error_code,omitempty" yaml:"error_code,omitempty"`
	Message   string `json:"message,omitempty" yaml:"message,omitempty"`
	RequestID string `json:"request_id,omitempty" yaml:"request_id,omitempty"`
}

Error is error information from a response.

type ErrorResponse added in v0.0.7

type ErrorResponse Error

ErrorResponse is the response given when error

type ExternalIp added in v0.0.20

type ExternalIp struct {
	Ip string `json:"ip,omitempty" yaml:"ip,omitempty"`
	// Kind is the kind of an external IP address for an instance
	Kind IpKind `json:"kind,omitempty" yaml:"kind,omitempty"`
}

ExternalIp is the type definition for a ExternalIp.

type ExternalIpCreate added in v0.0.20

type ExternalIpCreate struct {
	PoolName string `json:"pool_name,omitempty" yaml:"pool_name,omitempty"`
	Type     string `json:"type,omitempty" yaml:"type,omitempty"`
}

ExternalIpCreate is parameters for creating an external IP address for instances.

type ExternalIpCreateEphemeral added in v0.0.20

type ExternalIpCreateEphemeral struct {
	PoolName string               `json:"pool_name,omitempty" yaml:"pool_name,omitempty"`
	Type     ExternalIpCreateType `json:"type,omitempty" yaml:"type,omitempty"`
}

ExternalIpCreateEphemeral is an IP address providing both inbound and outbound access. The address is automatically-assigned from the provided IP Pool, or all available pools if not specified.

type ExternalIpCreateType added in v0.0.20

type ExternalIpCreateType string

ExternalIpCreateType is the type definition for a ExternalIpCreateType.

const (
	// ExternalIpCreateTypeEphemeral represents the ExternalIpCreateType `"ephemeral"`.
	ExternalIpCreateTypeEphemeral ExternalIpCreateType = "ephemeral"
)

type ExternalIpResultsPage added in v0.0.20

type ExternalIpResultsPage struct {
	// Items is list of items on this page of results
	Items []ExternalIp `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"`
}

ExternalIpResultsPage is a single page of results

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 `"ip_addr"`.
	FieldTypeIpAddr FieldType = "ip_addr"
	// FieldTypeUuid represents the FieldType `"uuid"`.
	FieldTypeUuid FieldType = "uuid"
	// FieldTypeBool represents the FieldType `"bool"`.
	FieldTypeBool FieldType = "bool"
)

type FirewallRule added in v0.0.7

type FirewallRule struct {
	// Action is whether traffic matching the rule should be allowed or dropped
	Action FirewallRuleAction `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 FirewallRuleDirection `json:"direction,omitempty" yaml:"direction,omitempty"`
	// Filters is reductions on the scope of the rule
	Filters FirewallRuleFilter `json:"filters,omitempty" yaml:"filters,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 string `json:"name,omitempty" yaml:"name,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 FirewallRuleStatus `json:"status,omitempty" yaml:"status,omitempty"`
	// Targets is list of sets of instances that the rule applies to
	Targets []FirewallRuleTarget `json:"targets,omitempty" yaml:"targets,omitempty"`
	// TimeCreated is timestamp when this resource was created
	TimeCreated *time.Time `json:"time_created,omitempty" yaml:"time_created,omitempty"`
	// TimeModified is timestamp when this resource was last modified
	TimeModified *time.Time `json:"time_modified,omitempty" yaml:"time_modified,omitempty"`
	// VPCId is the VPC to which this rule belongs
	VPCId string `json:"vpc_id,omitempty" yaml:"vpc_id,omitempty"`
}

FirewallRule is a single rule in a VPC firewall

type FirewallRuleAction added in v0.0.7

type FirewallRuleAction string

FirewallRuleAction is the type definition for a FirewallRuleAction.

const (
	// FirewallRuleActionAllow represents the FirewallRuleAction `"allow"`.
	FirewallRuleActionAllow FirewallRuleAction = "allow"
	// FirewallRuleActionDeny represents the FirewallRuleAction `"deny"`.
	FirewallRuleActionDeny FirewallRuleAction = "deny"
)

type FirewallRuleDirection added in v0.0.7

type FirewallRuleDirection string

FirewallRuleDirection is the type definition for a FirewallRuleDirection.

const (
	// FirewallRuleDirectionInbound represents the FirewallRuleDirection `"inbound"`.
	FirewallRuleDirectionInbound FirewallRuleDirection = "inbound"
	// FirewallRuleDirectionOutbound represents the FirewallRuleDirection `"outbound"`.
	FirewallRuleDirectionOutbound FirewallRuleDirection = "outbound"
)

type FirewallRuleFilter added in v0.0.7

type FirewallRuleFilter struct {
	// Hosts is if present, the sources (if incoming) or destinations (if outgoing) this rule applies to.
	Hosts []FirewallRuleHostFilter `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 []FirewallRuleProtocol `json:"protocols,omitempty" yaml:"protocols,omitempty"`
}

FirewallRuleFilter 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 FirewallRuleHostFilter added in v0.0.7

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

FirewallRuleHostFilter is the `VpcFirewallRuleHostFilter` is used to filter traffic on the basis of its source or destination host.

type FirewallRuleHostFilterInstance added in v0.0.7

type FirewallRuleHostFilterInstance struct {
	Type FirewallRuleHostFilterType `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 '-'. Names cannot be a UUID though they may contain a UUID.
	Value string `json:"value,omitempty" yaml:"value,omitempty"`
}

FirewallRuleHostFilterInstance is the rule applies to traffic from/to this specific instance

type FirewallRuleHostFilterIp added in v0.0.7

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

FirewallRuleHostFilterIp is the rule applies to traffic from/to a specific IP address

type FirewallRuleHostFilterIpNet added in v0.0.7

type FirewallRuleHostFilterIpNet struct {
	Type  FirewallRuleHostFilterType `json:"type,omitempty" yaml:"type,omitempty"`
	Value IpNet                      `json:"value,omitempty" yaml:"value,omitempty"`
}

FirewallRuleHostFilterIpNet is the rule applies to traffic from/to a specific IP subnet

type FirewallRuleHostFilterSubnet added in v0.0.7

type FirewallRuleHostFilterSubnet struct {
	Type FirewallRuleHostFilterType `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 '-'. Names cannot be a UUID though they may contain a UUID.
	Value string `json:"value,omitempty" yaml:"value,omitempty"`
}

FirewallRuleHostFilterSubnet is the rule applies to traffic from/to all instances in the VPC Subnet

type FirewallRuleHostFilterType added in v0.0.7

type FirewallRuleHostFilterType string

FirewallRuleHostFilterType is the type definition for a FirewallRuleHostFilterType.

const (
	// FirewallRuleHostFilterTypeInstance represents the FirewallRuleHostFilterType `"instance"`.
	FirewallRuleHostFilterTypeInstance FirewallRuleHostFilterType = "instance"
)
const (
	// FirewallRuleHostFilterTypeIp represents the FirewallRuleHostFilterType `"ip"`.
	FirewallRuleHostFilterTypeIp FirewallRuleHostFilterType = "ip"
)
const (
	// FirewallRuleHostFilterTypeIpNet represents the FirewallRuleHostFilterType `"ip_net"`.
	FirewallRuleHostFilterTypeIpNet FirewallRuleHostFilterType = "ip_net"
)
const (
	// FirewallRuleHostFilterTypeSubnet represents the FirewallRuleHostFilterType `"subnet"`.
	FirewallRuleHostFilterTypeSubnet FirewallRuleHostFilterType = "subnet"
)
const (
	// FirewallRuleHostFilterTypeVpc represents the FirewallRuleHostFilterType `"vpc"`.
	FirewallRuleHostFilterTypeVpc FirewallRuleHostFilterType = "vpc"
)

type FirewallRuleHostFilterVPC added in v0.0.7

type FirewallRuleHostFilterVPC struct {
	Type FirewallRuleHostFilterType `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 '-'. Names cannot be a UUID though they may contain a UUID.
	Value string `json:"value,omitempty" yaml:"value,omitempty"`
}

FirewallRuleHostFilterVPC is the rule applies to traffic from/to all instances in the VPC

type FirewallRuleProtocol added in v0.0.7

type FirewallRuleProtocol string

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

const (
	// FirewallRuleProtocolTCP represents the FirewallRuleProtocol `"TCP"`.
	FirewallRuleProtocolTCP FirewallRuleProtocol = "TCP"
	// FirewallRuleProtocolUDP represents the FirewallRuleProtocol `"UDP"`.
	FirewallRuleProtocolUDP FirewallRuleProtocol = "UDP"
	// FirewallRuleProtocolICMP represents the FirewallRuleProtocol `"ICMP"`.
	FirewallRuleProtocolICMP FirewallRuleProtocol = "ICMP"
)

type FirewallRuleStatus added in v0.0.7

type FirewallRuleStatus string

FirewallRuleStatus is the type definition for a FirewallRuleStatus.

const (
	// FirewallRuleStatusDisabled represents the FirewallRuleStatus `"disabled"`.
	FirewallRuleStatusDisabled FirewallRuleStatus = "disabled"
	// FirewallRuleStatusEnabled represents the FirewallRuleStatus `"enabled"`.
	FirewallRuleStatusEnabled FirewallRuleStatus = "enabled"
)

type FirewallRuleTarget added in v0.0.7

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

FirewallRuleTarget is a `VpcFirewallRuleTarget` is used to specify the set of [`Instance`]s to which a firewall rule applies.

type FirewallRuleTargetInstance added in v0.0.7

type FirewallRuleTargetInstance struct {
	Type FirewallRuleTargetType `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 '-'. Names cannot be a UUID though they may contain a UUID.
	Value string `json:"value,omitempty" yaml:"value,omitempty"`
}

FirewallRuleTargetInstance is the rule applies to this specific instance

type FirewallRuleTargetIp added in v0.0.7

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

FirewallRuleTargetIp is the rule applies to a specific IP address

type FirewallRuleTargetIpNet added in v0.0.7

type FirewallRuleTargetIpNet struct {
	Type  FirewallRuleTargetType `json:"type,omitempty" yaml:"type,omitempty"`
	Value IpNet                  `json:"value,omitempty" yaml:"value,omitempty"`
}

FirewallRuleTargetIpNet is the rule applies to a specific IP subnet

type FirewallRuleTargetSubnet added in v0.0.7

type FirewallRuleTargetSubnet struct {
	Type FirewallRuleTargetType `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 '-'. Names cannot be a UUID though they may contain a UUID.
	Value string `json:"value,omitempty" yaml:"value,omitempty"`
}

FirewallRuleTargetSubnet is the rule applies to all instances in the VPC Subnet

type FirewallRuleTargetType added in v0.0.7

type FirewallRuleTargetType string

FirewallRuleTargetType is the type definition for a FirewallRuleTargetType.

const (
	// FirewallRuleTargetTypeInstance represents the FirewallRuleTargetType `"instance"`.
	FirewallRuleTargetTypeInstance FirewallRuleTargetType = "instance"
)
const (
	// FirewallRuleTargetTypeIp represents the FirewallRuleTargetType `"ip"`.
	FirewallRuleTargetTypeIp FirewallRuleTargetType = "ip"
)
const (
	// FirewallRuleTargetTypeIpNet represents the FirewallRuleTargetType `"ip_net"`.
	FirewallRuleTargetTypeIpNet FirewallRuleTargetType = "ip_net"
)
const (
	// FirewallRuleTargetTypeSubnet represents the FirewallRuleTargetType `"subnet"`.
	FirewallRuleTargetTypeSubnet FirewallRuleTargetType = "subnet"
)
const (
	// FirewallRuleTargetTypeVpc represents the FirewallRuleTargetType `"vpc"`.
	FirewallRuleTargetTypeVpc FirewallRuleTargetType = "vpc"
)

type FirewallRuleTargetVPC added in v0.0.7

type FirewallRuleTargetVPC struct {
	Type FirewallRuleTargetType `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 '-'. Names cannot be a UUID though they may contain a UUID.
	Value string `json:"value,omitempty" yaml:"value,omitempty"`
}

FirewallRuleTargetVPC is the rule applies to all instances in the VPC

type FirewallRuleUpdate added in v0.0.7

type FirewallRuleUpdate struct {
	// Action is whether traffic matching the rule should be allowed or dropped
	Action FirewallRuleAction `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 FirewallRuleDirection `json:"direction,omitempty" yaml:"direction,omitempty"`
	// Filters is reductions on the scope of the rule
	Filters FirewallRuleFilter `json:"filters,omitempty" yaml:"filters,omitempty"`
	// Name is name of the rule, unique to this VPC
	Name string `json:"name,omitempty" yaml:"name,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 FirewallRuleStatus `json:"status,omitempty" yaml:"status,omitempty"`
	// Targets is list of sets of instances that the rule applies to
	Targets []FirewallRuleTarget `json:"targets,omitempty" yaml:"targets,omitempty"`
}

FirewallRuleUpdate is a single rule in a VPC firewall

type FirewallRuleUpdateParams added in v0.0.7

type FirewallRuleUpdateParams struct {
	Rules []FirewallRuleUpdate `json:"rules,omitempty" yaml:"rules,omitempty"`
}

FirewallRuleUpdateParams 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 FirewallRules added in v0.0.7

type FirewallRules struct {
	Rules []FirewallRule `json:"rules,omitempty" yaml:"rules,omitempty"`
}

FirewallRules is collection of a Vpc's firewall rules

type FirewallService added in v0.0.7

type FirewallService service

FirewallService: Firewall operation controls the flow of network data into a VPC

type FleetRole added in v0.0.17

type FleetRole string

FleetRole is the type definition for a FleetRole.

const (
	// FleetRoleAdmin represents the FleetRole `"admin"`.
	FleetRoleAdmin FleetRole = "admin"
	// FleetRoleCollaborator represents the FleetRole `"collaborator"`.
	FleetRoleCollaborator FleetRole = "collaborator"
	// FleetRoleViewer represents the FleetRole `"viewer"`.
	FleetRoleViewer FleetRole = "viewer"
)

type FleetRolePolicy added in v0.0.18

type FleetRolePolicy struct {
	// RoleAssignments is roles directly assigned on this resource
	RoleAssignments []FleetRoleRoleAssignment `json:"role_assignments,omitempty" yaml:"role_assignments,omitempty"`
}

FleetRolePolicy is client view of a [`Policy`], which describes how this resource may be accessed

Note that the Policy only describes access granted explicitly for this resource. The policies of parent resources can also cause a user to have access to this resource.

type FleetRoleRoleAssignment added in v0.0.18

type FleetRoleRoleAssignment struct {
	IdentityID string `json:"identity_id,omitempty" yaml:"identity_id,omitempty"`
	// IdentityType is describes what kind of identity is described by an id
	IdentityType IdentityType `json:"identity_type,omitempty" yaml:"identity_type,omitempty"`
	RoleName     FleetRole    `json:"role_name,omitempty" yaml:"role_name,omitempty"`
}

FleetRoleRoleAssignment is describes the assignment of a particular role on a particular resource to a particular identity (user, group, etc.)

The resource is not part of this structure. Rather, [`RoleAssignment`]s are put into a [`Policy`] and that Policy is applied to a particular resource.

type GlobalImage added in v0.0.15

type GlobalImage struct {
	// BlockSize is size of blocks in bytes
	BlockSize ByteCount `json:"block_size,omitempty" yaml:"block_size,omitempty"`
	// Description is human-readable free-form text about a resource
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// Digest is hash of the image contents, if applicable
	Digest Digest `json:"digest,omitempty" yaml:"digest,omitempty"`
	// Distribution is image distribution
	Distribution string `json:"distribution,omitempty" yaml:"distribution,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 string `json:"name,omitempty" yaml:"name,omitempty"`
	// Size is total size in bytes
	Size ByteCount `json:"size,omitempty" yaml:"size,omitempty"`
	// TimeCreated is timestamp when this resource was created
	TimeCreated *time.Time `json:"time_created,omitempty" yaml:"time_created,omitempty"`
	// TimeModified is timestamp when this resource was last modified
	TimeModified *time.Time `json:"time_modified,omitempty" yaml:"time_modified,omitempty"`
	// Url is uRL source of this image, if any
	Url string `json:"url,omitempty" yaml:"url,omitempty"`
	// Version is image version
	Version string `json:"version,omitempty" yaml:"version,omitempty"`
}

GlobalImage is client view of global Images

type GlobalImageCreate added in v0.0.17

type GlobalImageCreate struct {
	// BlockSize is block size in bytes
	BlockSize   BlockSize `json:"block_size,omitempty" yaml:"block_size,omitempty"`
	Description string    `json:"description,omitempty" yaml:"description,omitempty"`
	// Distribution is oS image distribution
	Distribution Distribution `json:"distribution,omitempty" yaml:"distribution,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 '-'. Names cannot be a UUID though they may contain a UUID.
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
	// Source is the source of the image's contents.
	Source ImageSource `json:"source,omitempty" yaml:"source,omitempty"`
}

GlobalImageCreate is create-time parameters for an [`GlobalImage`](crate::external_api::views::GlobalImage)

type GlobalImageResultsPage added in v0.0.15

type GlobalImageResultsPage struct {
	// Items is list of items on this page of results
	Items []GlobalImage `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"`
}

GlobalImageResultsPage is a single page of results

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

HardwareService: These operations pertain to hardware inventory and management. Racks are the unit of expansion of an Oxide deployment. Racks are in turn composed of sleds, switches, power supplies, and a cabled backplane.

func (*HardwareService) RackList added in v0.0.20

func (s *HardwareService) RackList(limit int, pageToken string, sortBy IdSortMode) (*RackResultsPage, error)

RackList: List racks

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

Parameters:

  • `limit`: Maximum number of items returned by a single call
  • `pageToken`: Token returned by previous call to retrieve the subsequent page
  • `sortBy`

func (*HardwareService) RackListAllPages added in v0.0.20

func (s *HardwareService) RackListAllPages(sortBy IdSortMode) (*[]Rack, error)

RackListAllPages: List racks

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

Parameters:

  • `sortBy`

func (*HardwareService) RackView added in v0.0.20

func (s *HardwareService) RackView(rackID string) (*Rack, error)

Parameters:

  • `rackId`: The rack's unique ID.

func (*HardwareService) SledList added in v0.0.20

func (s *HardwareService) SledList(limit int, pageToken string, sortBy IdSortMode) (*SledResultsPage, error)

SledList: List sleds

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

Parameters:

  • `limit`: Maximum number of items returned by a single call
  • `pageToken`: Token returned by previous call to retrieve the subsequent page
  • `sortBy`

func (*HardwareService) SledListAllPages added in v0.0.20

func (s *HardwareService) SledListAllPages(sortBy IdSortMode) (*[]Sled, error)

SledListAllPages: List sleds

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

Parameters:

  • `sortBy`

func (*HardwareService) SledView added in v0.0.20

func (s *HardwareService) SledView(sledID string) (*Sled, error)

Parameters:

  • `sledId`: The sled's unique ID.

type HiddenService added in v0.0.7

type HiddenService service

HiddenService: TODO operations that will not ship to customers

type Histogramdouble added in v0.0.20

type Histogramdouble struct {
	Bins      []Bindouble `json:"bins,omitempty" yaml:"bins,omitempty"`
	NSamples  int         `json:"n_samples,omitempty" yaml:"n_samples,omitempty"`
	StartTime *time.Time  `json:"start_time,omitempty" yaml:"start_time,omitempty"`
}

Histogramdouble is a simple type for managing a histogram metric.

A histogram maintains the count of any number of samples, over a set of bins. Bins are specified on construction via their _left_ edges, inclusive. There can't be any "gaps" in the bins, and an additional bin may be added to the left, right, or both so that the bins extend to the entire range of the support.

Note that any gaps, unsorted bins, or non-finite values will result in an error.

Example ------- ```rust use oximeter::histogram::{BinRange, Histogram};

let edges = [0i64, 10, 20]; let mut hist = Histogram::new(&edges).unwrap(); assert_eq!(hist.n_bins(), 4); // One additional bin for the range (20..) assert_eq!(hist.n_samples(), 0); hist.sample(4); hist.sample(100); assert_eq!(hist.n_samples(), 2);

let data = hist.iter().collect::<Vec<_>>(); assert_eq!(data[0].range, BinRange::range(i64::MIN, 0)); // An additional bin for `..0` assert_eq!(data[0].count, 0); // Nothing is in this bin

assert_eq!(data[1].range, BinRange::range(0, 10)); // The range `0..10` assert_eq!(data[1].count, 1); // 4 is sampled into this bin ```

Notes -----

Histograms may be constructed either from their left bin edges, or from a sequence of ranges. In either case, the left-most bin may be converted upon construction. In particular, if the left-most value is not equal to the minimum of the support, a new bin will be added from the minimum to that provided value. If the left-most value _is_ the support's minimum, because the provided bin was unbounded below, such as `(..0)`, then that bin will be converted into one bounded below, `(MIN..0)` in this case.

The short of this is that, most of the time, it shouldn't matter. If one specifies the extremes of the support as their bins, be aware that the left-most may be converted from a `BinRange::RangeTo` into a `BinRange::Range`. In other words, the first bin of a histogram is _always_ a `Bin::Range` or a `Bin::RangeFrom` after construction. In fact, every bin is one of those variants, the `BinRange::RangeTo` is only provided as a convenience during construction.

type Histogramint64 added in v0.0.20

type Histogramint64 struct {
	Bins      []Binint64 `json:"bins,omitempty" yaml:"bins,omitempty"`
	NSamples  int        `json:"n_samples,omitempty" yaml:"n_samples,omitempty"`
	StartTime *time.Time `json:"start_time,omitempty" yaml:"start_time,omitempty"`
}

Histogramint64 is a simple type for managing a histogram metric.

A histogram maintains the count of any number of samples, over a set of bins. Bins are specified on construction via their _left_ edges, inclusive. There can't be any "gaps" in the bins, and an additional bin may be added to the left, right, or both so that the bins extend to the entire range of the support.

Note that any gaps, unsorted bins, or non-finite values will result in an error.

Example ------- ```rust use oximeter::histogram::{BinRange, Histogram};

let edges = [0i64, 10, 20]; let mut hist = Histogram::new(&edges).unwrap(); assert_eq!(hist.n_bins(), 4); // One additional bin for the range (20..) assert_eq!(hist.n_samples(), 0); hist.sample(4); hist.sample(100); assert_eq!(hist.n_samples(), 2);

let data = hist.iter().collect::<Vec<_>>(); assert_eq!(data[0].range, BinRange::range(i64::MIN, 0)); // An additional bin for `..0` assert_eq!(data[0].count, 0); // Nothing is in this bin

assert_eq!(data[1].range, BinRange::range(0, 10)); // The range `0..10` assert_eq!(data[1].count, 1); // 4 is sampled into this bin ```

Notes -----

Histograms may be constructed either from their left bin edges, or from a sequence of ranges. In either case, the left-most bin may be converted upon construction. In particular, if the left-most value is not equal to the minimum of the support, a new bin will be added from the minimum to that provided value. If the left-most value _is_ the support's minimum, because the provided bin was unbounded below, such as `(..0)`, then that bin will be converted into one bounded below, `(MIN..0)` in this case.

The short of this is that, most of the time, it shouldn't matter. If one specifies the extremes of the support as their bins, be aware that the left-most may be converted from a `BinRange::RangeTo` into a `BinRange::Range`. In other words, the first bin of a histogram is _always_ a `Bin::Range` or a `Bin::RangeFrom` after construction. In fact, every bin is one of those variants, the `BinRange::RangeTo` is only provided as a convenience during construction.

type IPv4Net

type IPv4Net string

IPv4Net is an IPv4 subnet, including prefix and subnet mask

type IPv4Range added in v0.0.19

type IPv4Range struct {
	First string `json:"first,omitempty" yaml:"first,omitempty"`
	Last  string `json:"last,omitempty" yaml:"last,omitempty"`
}

IPv4Range is a non-decreasing IPv4 address range, inclusive of both ends.

The first address must be less than or equal to the last address.

type IPv6Net

type IPv6Net string

IPv6Net is an IPv6 subnet, including prefix and subnet mask

type IPv6Range added in v0.0.19

type IPv6Range struct {
	First string `json:"first,omitempty" yaml:"first,omitempty"`
	Last  string `json:"last,omitempty" yaml:"last,omitempty"`
}

IPv6Range is a non-decreasing IPv6 address range, inclusive of both ends.

The first address must be less than or equal to the last address.

type IdSortMode added in v0.0.6

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 IdentityProvider added in v0.0.18

type IdentityProvider 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 string `json:"name,omitempty" yaml:"name,omitempty"`
	// ProviderType is identity provider type
	ProviderType IdentityProviderType `json:"provider_type,omitempty" yaml:"provider_type,omitempty"`
	// TimeCreated is timestamp when this resource was created
	TimeCreated *time.Time `json:"time_created,omitempty" yaml:"time_created,omitempty"`
	// TimeModified is timestamp when this resource was last modified
	TimeModified *time.Time `json:"time_modified,omitempty" yaml:"time_modified,omitempty"`
}

IdentityProvider is client view of an [`IdentityProvider`]

type IdentityProviderResultsPage added in v0.0.18

type IdentityProviderResultsPage struct {
	// Items is list of items on this page of results
	Items []IdentityProvider `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"`
}

IdentityProviderResultsPage is a single page of results

type IdentityProviderType added in v0.0.18

type IdentityProviderType string

IdentityProviderType is the type definition for a IdentityProviderType.

const (
	// IdentityProviderTypeSaml represents the IdentityProviderType `"saml"`.
	IdentityProviderTypeSaml IdentityProviderType = "saml"
)

type IdentityType added in v0.0.15

type IdentityType string

IdentityType is describes what kind of identity is described by an id

const (
	// IdentityTypeSiloUser represents the IdentityType `"silo_user"`.
	IdentityTypeSiloUser IdentityType = "silo_user"
	// IdentityTypeSiloGroup represents the IdentityType `"silo_group"`.
	IdentityTypeSiloGroup IdentityType = "silo_group"
)

type IdpMetadataSource added in v0.0.18

type IdpMetadataSource struct {
	Type string `json:"type,omitempty" yaml:"type,omitempty"`
	Url  string `json:"url,omitempty" yaml:"url,omitempty"`
	Data string `json:"data,omitempty" yaml:"data,omitempty"`
}

IdpMetadataSource is the type definition for a IdpMetadataSource.

type IdpMetadataSourceBase64EncodedXml added in v0.0.18

type IdpMetadataSourceBase64EncodedXml struct {
	Data string                `json:"data,omitempty" yaml:"data,omitempty"`
	Type IdpMetadataSourceType `json:"type,omitempty" yaml:"type,omitempty"`
}

IdpMetadataSourceBase64EncodedXml is the type definition for a IdpMetadataSourceBase64EncodedXml.

type IdpMetadataSourceType added in v0.0.18

type IdpMetadataSourceType string

IdpMetadataSourceType is the type definition for a IdpMetadataSourceType.

const (
	// IdpMetadataSourceTypeBase64EncodedXml represents the IdpMetadataSourceType `"base64_encoded_xml"`.
	IdpMetadataSourceTypeBase64EncodedXml IdpMetadataSourceType = "base64_encoded_xml"
)
const (
	// IdpMetadataSourceTypeUrl represents the IdpMetadataSourceType `"url"`.
	IdpMetadataSourceTypeUrl IdpMetadataSourceType = "url"
)

type IdpMetadataSourceUrl added in v0.0.18

type IdpMetadataSourceUrl struct {
	Type IdpMetadataSourceType `json:"type,omitempty" yaml:"type,omitempty"`
	Url  string                `json:"url,omitempty" yaml:"url,omitempty"`
}

IdpMetadataSourceUrl is the type definition for a IdpMetadataSourceUrl.

type Image added in v0.0.12

type Image struct {
	// BlockSize is size of blocks in bytes
	BlockSize ByteCount `json:"block_size,omitempty" yaml:"block_size,omitempty"`
	// Description is human-readable free-form text about a resource
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// Digest is hash of the image contents, if applicable
	Digest Digest `json:"digest,omitempty" yaml:"digest,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 string `json:"name,omitempty" yaml:"name,omitempty"`
	// ProjectID is the project the disk belongs to
	ProjectID string `json:"project_id,omitempty" yaml:"project_id,omitempty"`
	// Size is total size in bytes
	Size ByteCount `json:"size,omitempty" yaml:"size,omitempty"`
	// TimeCreated is timestamp when this resource was created
	TimeCreated *time.Time `json:"time_created,omitempty" yaml:"time_created,omitempty"`
	// TimeModified is timestamp when this resource was last modified
	TimeModified *time.Time `json:"time_modified,omitempty" yaml:"time_modified,omitempty"`
	// Url is uRL source of this image, if any
	Url string `json:"url,omitempty" yaml:"url,omitempty"`
	// Version is version of this, if any
	Version string `json:"version,omitempty" yaml:"version,omitempty"`
}

Image is client view of project Images

type ImageCreate added in v0.0.12

type ImageCreate struct {
	// BlockSize is block size in bytes
	BlockSize   BlockSize `json:"block_size,omitempty" yaml:"block_size,omitempty"`
	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 '-'. Names cannot be a UUID though they may contain a UUID.
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
	// Source is the source of the image's contents.
	Source ImageSource `json:"source,omitempty" yaml:"source,omitempty"`
}

ImageCreate is create-time parameters for an [`Image`](crate::external_api::views::Image)

type ImageResultsPage added in v0.0.12

type ImageResultsPage struct {
	// Items is list of items on this page of results
	Items []Image `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"`
}

ImageResultsPage is a single page of results

type ImageSource added in v0.0.12

type ImageSource struct {
	Type string `json:"type,omitempty" yaml:"type,omitempty"`
	Url  string `json:"url,omitempty" yaml:"url,omitempty"`
	ID   string `json:"id,omitempty" yaml:"id,omitempty"`
}

ImageSource is the source of the underlying image.

type ImageSourceSnapshot added in v0.0.12

type ImageSourceSnapshot struct {
	ID   string          `json:"id,omitempty" yaml:"id,omitempty"`
	Type ImageSourceType `json:"type,omitempty" yaml:"type,omitempty"`
}

ImageSourceSnapshot is the type definition for a ImageSourceSnapshot.

type ImageSourceType added in v0.0.17

type ImageSourceType string

ImageSourceType is the type definition for a ImageSourceType.

const (
	// ImageSourceTypeSnapshot represents the ImageSourceType `"snapshot"`.
	ImageSourceTypeSnapshot ImageSourceType = "snapshot"
)
const (
	// ImageSourceTypeUrl represents the ImageSourceType `"url"`.
	ImageSourceTypeUrl ImageSourceType = "url"
)
const (
	// ImageSourceTypeYouCanBootAnythingAsLongAsItsAlpine represents the ImageSourceType `"you_can_boot_anything_as_long_as_its_alpine"`.
	ImageSourceTypeYouCanBootAnythingAsLongAsItsAlpine ImageSourceType = "you_can_boot_anything_as_long_as_its_alpine"
)

type ImageSourceUrl added in v0.0.12

type ImageSourceUrl struct {
	Type ImageSourceType `json:"type,omitempty" yaml:"type,omitempty"`
	Url  string          `json:"url,omitempty" yaml:"url,omitempty"`
}

ImageSourceUrl is the type definition for a ImageSourceUrl.

type ImageSourceYouCanBootAnythingAsLongAsItsAlpine added in v0.0.17

type ImageSourceYouCanBootAnythingAsLongAsItsAlpine struct {
	Type ImageSourceType `json:"type,omitempty" yaml:"type,omitempty"`
}

ImageSourceYouCanBootAnythingAsLongAsItsAlpine is boot the Alpine ISO that ships with the Propolis zone. Intended for development purposes only.

type ImagesService added in v0.0.12

type ImagesService service

ImagesService: Images are read-only Virtual Disks that may be used to boot Virtual Machines

func (*ImagesService) Create added in v0.0.12

func (s *ImagesService) Create(organizationName string, projectName string, j *ImageCreate) (*Image, error)

Create a new image in a project.

Parameters:

  • `organizationName`: The organization's unique name.
  • `projectName`: The project's unique name within the organization.

func (*ImagesService) Delete added in v0.0.12

func (s *ImagesService) Delete(imageName string, organizationName string, projectName string) error

Delete: Delete an image

Permanently delete an image from a project. This operation cannot be undone. Any instances in the project using the image will continue to run, however new instances can not be created with this image.

Parameters:

  • `imageName`
  • `organizationName`
  • `projectName`

func (*ImagesService) GlobalGlobalCreate added in v0.0.20

func (s *ImagesService) GlobalGlobalCreate(j *GlobalImageCreate) (*GlobalImage, error)

Create a new global image. This image can then be used by any user as a base for instances.

func (*ImagesService) GlobalGlobalDelete added in v0.0.20

func (s *ImagesService) GlobalGlobalDelete(imageName string) error

GlobalGlobalDelete: Delete a global image

Permanently delete a global image. This operation cannot be undone. Any instances using the global image will continue to run, however new instances can not be created with this image.

Parameters:

  • `imageName`

func (*ImagesService) GlobalGlobalList added in v0.0.20

func (s *ImagesService) GlobalGlobalList(limit int, pageToken string, sortBy NameSortMode) (*GlobalImageResultsPage, error)

GlobalGlobalList: List global images

Returns a list of all the global images. Global images are returned sorted by creation date, with the most recent images appearing first.

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

Parameters:

  • `limit`: Maximum number of items returned by a single call
  • `pageToken`: Token returned by previous call to retrieve the subsequent page
  • `sortBy`

func (*ImagesService) GlobalGlobalListAllPages added in v0.0.20

func (s *ImagesService) GlobalGlobalListAllPages(sortBy NameSortMode) (*[]GlobalImage, error)

GlobalGlobalListAllPages: List global images

Returns a list of all the global images. Global images are returned sorted by creation date, with the most recent images appearing first.

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

Parameters:

  • `sortBy`

func (*ImagesService) GlobalGlobalView added in v0.0.20

func (s *ImagesService) GlobalGlobalView(imageName string) (*GlobalImage, error)

GlobalGlobalView: Fetch a global image

Returns the details of a specific global image.

Parameters:

  • `imageName`

func (*ImagesService) GlobalGlobalViewByID added in v0.0.20

func (s *ImagesService) GlobalGlobalViewByID(id string) (*GlobalImage, error)

GlobalGlobalViewByID: Fetch a global image by id

Parameters:

  • `id`

func (*ImagesService) List added in v0.0.13

func (s *ImagesService) List(limit int, pageToken string, sortBy NameSortMode, organizationName string, projectName string) (*ImageResultsPage, error)

List images in a project. The images are returned sorted by creation date, with the most recent images appearing first.

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

Parameters:

  • `limit`: Maximum number of items returned by a single call
  • `organizationName`: The organization's unique name.
  • `pageToken`: Token returned by previous call to retrieve the subsequent page
  • `projectName`: The project's unique name within the organization.
  • `sortBy`

func (*ImagesService) ListAllPages added in v0.0.13

func (s *ImagesService) ListAllPages(sortBy NameSortMode, organizationName string, projectName string) (*[]Image, error)

ListAllPages: List images

List images in a project. The images are returned sorted by creation date, with the most recent images appearing first.

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

Parameters:

  • `organizationName`: The organization's unique name.
  • `projectName`: The project's unique name within the organization.
  • `sortBy`

func (*ImagesService) View added in v0.0.20

func (s *ImagesService) View(imageName string, organizationName string, projectName string) (*Image, error)

View: Fetch an image

Fetch the details for a specific image in a project.

Parameters:

  • `imageName`
  • `organizationName`
  • `projectName`

func (*ImagesService) ViewByID added in v0.0.20

func (s *ImagesService) ViewByID(id string) (*Image, error)

ViewByID: Fetch an image by id

Parameters:

  • `id`

type ImagesglobalService added in v0.0.13

type ImagesglobalService service

ImagesglobalService: Images are read-only Virtual Disks that may be used to boot Virtual Machines. These images are scoped globally.

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 string `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:"project_id,omitempty" yaml:"project_id,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:"run_state,omitempty" yaml:"run_state,omitempty"`
	// TimeCreated is timestamp when this resource was created
	TimeCreated *time.Time `json:"time_created,omitempty" yaml:"time_created,omitempty"`
	// TimeModified is timestamp when this resource was last modified
	TimeModified        *time.Time `json:"time_modified,omitempty" yaml:"time_modified,omitempty"`
	TimeRunStateUpdated *time.Time `json:"time_run_state_updated,omitempty" yaml:"time_run_state_updated,omitempty"`
}

Instance is client view of an [`Instance`]

type InstanceCPUCount added in v0.0.4

type InstanceCPUCount int64

InstanceCPUCount is the number of CPUs in an Instance

type InstanceCreate

type InstanceCreate struct {
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// Disks is the disks to be created or attached for this instance.
	Disks []InstanceDiskAttachment `json:"disks,omitempty" yaml:"disks,omitempty"`
	// ExternalIps is the external IP addresses provided to this instance.
	//
	// By default, all instances have outbound connectivity, but no inbound connectivity. These external addresses can be used to provide a fixed, known IP address for making inbound connections to the instance.
	ExternalIps []ExternalIpCreate `json:"external_ips,omitempty" yaml:"external_ips,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 '-'. Names cannot be a UUID though they may contain a UUID.
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
	// NCPUs is the number of CPUs in an Instance
	NCPUs InstanceCPUCount `json:"ncpus,omitempty" yaml:"ncpus,omitempty"`
	// NetworkInterfaces is the network interfaces to be created for this instance.
	NetworkInterfaces InstanceNetworkInterfaceAttachment `json:"network_interfaces,omitempty" yaml:"network_interfaces,omitempty"`
	// UserData is user data for instance initialization systems (such as cloud-init). Must be a Base64-encoded string, as specified in RFC 4648 § 4 (+ and / characters with padding). Maximum 32 KiB unencoded data.
	UserData string `json:"user_data,omitempty" yaml:"user_data,omitempty"`
}

InstanceCreate is create-time parameters for an [`Instance`](omicron_common::api::external::Instance)

type InstanceDiskAttachment added in v0.0.12

type InstanceDiskAttachment struct {
	Description string     `json:"description,omitempty" yaml:"description,omitempty"`
	DiskSource  DiskSource `json:"disk_source,omitempty" yaml:"disk_source,omitempty"`
	Name        string     `json:"name,omitempty" yaml:"name,omitempty"`
	Size        ByteCount  `json:"size,omitempty" yaml:"size,omitempty"`
	Type        string     `json:"type,omitempty" yaml:"type,omitempty"`
}

InstanceDiskAttachment is describe the instance's disks at creation time

type InstanceDiskAttachmentAttach added in v0.0.12

type InstanceDiskAttachmentAttach struct {
	// Name is a disk name to attach
	Name string                     `json:"name,omitempty" yaml:"name,omitempty"`
	Type InstanceDiskAttachmentType `json:"type,omitempty" yaml:"type,omitempty"`
}

InstanceDiskAttachmentAttach is during instance creation, attach this disk

type InstanceDiskAttachmentCreate added in v0.0.12

type InstanceDiskAttachmentCreate struct {
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// DiskSource is initial source for this disk
	DiskSource DiskSource `json:"disk_source,omitempty" yaml:"disk_source,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 '-'. Names cannot be a UUID though they may contain a UUID.
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
	// Size is total size of the Disk in bytes
	Size ByteCount                  `json:"size,omitempty" yaml:"size,omitempty"`
	Type InstanceDiskAttachmentType `json:"type,omitempty" yaml:"type,omitempty"`
}

InstanceDiskAttachmentCreate is during instance creation, create and attach disks

type InstanceDiskAttachmentType added in v0.0.12

type InstanceDiskAttachmentType string

InstanceDiskAttachmentType is the type definition for a InstanceDiskAttachmentType.

const (
	// InstanceDiskAttachmentTypeAttach represents the InstanceDiskAttachmentType `"attach"`.
	InstanceDiskAttachmentTypeAttach InstanceDiskAttachmentType = "attach"
)
const (
	// InstanceDiskAttachmentTypeCreate represents the InstanceDiskAttachmentType `"create"`.
	InstanceDiskAttachmentTypeCreate InstanceDiskAttachmentType = "create"
)

type InstanceMigrate added in v0.0.7

type InstanceMigrate struct {
	DstSledID string `json:"dst_sled_id,omitempty" yaml:"dst_sled_id,omitempty"`
}

InstanceMigrate is migration parameters for an [`Instance`](omicron_common::api::external::Instance)

type InstanceNetworkInterfaceAttachment added in v0.0.7

type InstanceNetworkInterfaceAttachment struct {
	Params []NetworkInterfaceCreate `json:"params,omitempty" yaml:"params,omitempty"`
	Type   string                   `json:"type,omitempty" yaml:"type,omitempty"`
}

InstanceNetworkInterfaceAttachment is describes an attachment of a `NetworkInterface` to an `Instance`, at the time the instance is created.

type InstanceNetworkInterfaceAttachmentCreate added in v0.0.7

type InstanceNetworkInterfaceAttachmentCreate struct {
	Params []NetworkInterfaceCreate               `json:"params,omitempty" yaml:"params,omitempty"`
	Type   InstanceNetworkInterfaceAttachmentType `json:"type,omitempty" yaml:"type,omitempty"`
}

InstanceNetworkInterfaceAttachmentCreate is create one or more `NetworkInterface`s for the `Instance`.

If more than one interface is provided, then the first will be designated the primary interface for the instance.

type InstanceNetworkInterfaceAttachmentDefault added in v0.0.7

type InstanceNetworkInterfaceAttachmentDefault struct {
	Type InstanceNetworkInterfaceAttachmentType `json:"type,omitempty" yaml:"type,omitempty"`
}

InstanceNetworkInterfaceAttachmentDefault is the default networking configuration for an instance is to create a single primary interface with an automatically-assigned IP address. The IP will be pulled from the Project's default VPC / VPC Subnet.

type InstanceNetworkInterfaceAttachmentNone added in v0.0.7

type InstanceNetworkInterfaceAttachmentNone struct {
	Type InstanceNetworkInterfaceAttachmentType `json:"type,omitempty" yaml:"type,omitempty"`
}

InstanceNetworkInterfaceAttachmentNone is no network interfaces at all will be created for the instance.

type InstanceNetworkInterfaceAttachmentType added in v0.0.7

type InstanceNetworkInterfaceAttachmentType string

InstanceNetworkInterfaceAttachmentType is the type definition for a InstanceNetworkInterfaceAttachmentType.

const (
	// InstanceNetworkInterfaceAttachmentTypeCreate represents the InstanceNetworkInterfaceAttachmentType `"create"`.
	InstanceNetworkInterfaceAttachmentTypeCreate InstanceNetworkInterfaceAttachmentType = "create"
)
const (
	// InstanceNetworkInterfaceAttachmentTypeDefault represents the InstanceNetworkInterfaceAttachmentType `"default"`.
	InstanceNetworkInterfaceAttachmentTypeDefault InstanceNetworkInterfaceAttachmentType = "default"
)
const (
	// InstanceNetworkInterfaceAttachmentTypeNone represents the InstanceNetworkInterfaceAttachmentType `"none"`.
	InstanceNetworkInterfaceAttachmentTypeNone InstanceNetworkInterfaceAttachmentType = "none"
)

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 InstanceSerialConsoleData added in v0.0.18

type InstanceSerialConsoleData struct {
	// Data is the bytes starting from the requested offset up to either the end of the buffer or the request's `max_bytes`. Provided as a u8 array rather than a string, as it may not be UTF-8.
	Data []string `json:"data,omitempty" yaml:"data,omitempty"`
	// LastByteOffset is the absolute offset since boot (suitable for use as `byte_offset` in a subsequent request) of the last byte returned in `data`.
	LastByteOffset int `json:"last_byte_offset,omitempty" yaml:"last_byte_offset,omitempty"`
}

InstanceSerialConsoleData is contents of an Instance's serial console buffer.

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"
	// InstanceStateMigrating represents the InstanceState `"migrating"`.
	InstanceStateMigrating InstanceState = "migrating"
	// 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

InstancesService: Virtual machine instances are the basic unit of computation. These operations are used for provisioning, controlling, and destroying instances.

func (*InstancesService) Create added in v0.0.3

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

Parameters:

  • `organizationName`: The organization's unique name.
  • `projectName`: The project's unique name within the organization.

func (*InstancesService) Delete added in v0.0.3

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

Delete: Delete an instance

Parameters:

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

func (*InstancesService) DiskAttach added in v0.0.20

func (s *InstancesService) DiskAttach(instanceName string, organizationName string, projectName string, j *DiskIdentifier) (*Disk, error)

Parameters:

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

func (*InstancesService) DiskDetach added in v0.0.20

func (s *InstancesService) DiskDetach(instanceName string, organizationName string, projectName string, j *DiskIdentifier) (*Disk, error)

DiskDetach: Detach a disk from an instance

Parameters:

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

func (*InstancesService) DiskList added in v0.0.20

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

DiskList: List an instance's disks

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

Parameters:

  • `instanceName`
  • `limit`: Maximum number of items returned by a single call
  • `organizationName`
  • `pageToken`: Token returned by previous call to retrieve the subsequent page
  • `projectName`
  • `sortBy`

func (*InstancesService) DiskListAllPages added in v0.0.20

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

DiskListAllPages: List an instance's disks

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

Parameters:

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

func (*InstancesService) ExternalIpList added in v0.0.20

func (s *InstancesService) ExternalIpList(instanceName string, organizationName string, projectName string) (*ExternalIpResultsPage, error)

ExternalIpList: List external IP addresses

Parameters:

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

func (*InstancesService) List added in v0.0.3

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

List: List instances

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

Parameters:

  • `limit`: Maximum number of items returned by a single call
  • `organizationName`: The organization's unique name.
  • `pageToken`: Token returned by previous call to retrieve the subsequent page
  • `projectName`: The project's unique name within the organization.
  • `sortBy`

func (*InstancesService) ListAllPages added in v0.0.3

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

ListAllPages: List instances

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

Parameters:

  • `organizationName`: The organization's unique name.
  • `projectName`: The project's unique name within the organization.
  • `sortBy`

func (*InstancesService) Migrate added in v0.0.7

func (s *InstancesService) Migrate(instanceName string, organizationName string, projectName string, j *InstanceMigrate) (*Instance, error)

Migrate: Migrate an instance

Parameters:

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

func (*InstancesService) NetworkInterfaceCreate added in v0.0.20

func (s *InstancesService) NetworkInterfaceCreate(instanceName string, organizationName string, projectName string, j *NetworkInterfaceCreate) (*NetworkInterface, error)

Parameters:

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

func (*InstancesService) NetworkInterfaceDelete added in v0.0.20

func (s *InstancesService) NetworkInterfaceDelete(instanceName string, interfaceName string, organizationName string, projectName string) error

NetworkInterfaceDelete: Delete a network interface

Note that the primary interface for an instance cannot be deleted if there are any secondary interfaces. A new primary interface must be designated first. The primary interface can be deleted if there are no secondary interfaces.

Parameters:

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

func (*InstancesService) NetworkInterfaceList added in v0.0.20

func (s *InstancesService) NetworkInterfaceList(limit int, pageToken string, sortBy NameSortMode, instanceName string, organizationName string, projectName string) (*NetworkInterfaceResultsPage, error)

NetworkInterfaceList: List network interfaces

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

Parameters:

  • `instanceName`
  • `limit`: Maximum number of items returned by a single call
  • `organizationName`
  • `pageToken`: Token returned by previous call to retrieve the subsequent page
  • `projectName`
  • `sortBy`

func (*InstancesService) NetworkInterfaceListAllPages added in v0.0.20

func (s *InstancesService) NetworkInterfaceListAllPages(sortBy NameSortMode, instanceName string, organizationName string, projectName string) (*[]NetworkInterface, error)

NetworkInterfaceListAllPages: List network interfaces

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

Parameters:

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

func (*InstancesService) NetworkInterfaceUpdate added in v0.0.20

func (s *InstancesService) NetworkInterfaceUpdate(instanceName string, interfaceName string, organizationName string, projectName string, j *NetworkInterfaceUpdate) (*NetworkInterface, error)

NetworkInterfaceUpdate: Update a network interface

Parameters:

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

func (*InstancesService) NetworkInterfaceView added in v0.0.20

func (s *InstancesService) NetworkInterfaceView(instanceName string, interfaceName string, organizationName string, projectName string) (*NetworkInterface, error)

NetworkInterfaceView: Fetch a network interface

Parameters:

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

func (*InstancesService) NetworkInterfaceViewByID added in v0.0.20

func (s *InstancesService) NetworkInterfaceViewByID(id string) (*NetworkInterface, error)

NetworkInterfaceViewByID: Fetch a network interface by id

Parameters:

  • `id`

func (*InstancesService) Reboot added in v0.0.3

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

Reboot: Reboot an instance

Parameters:

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

func (*InstancesService) SerialConsole added in v0.0.20

func (s *InstancesService) SerialConsole(instanceName string, organizationName string, projectName string, fromStart int, maxBytes int, mostRecent int) (*InstanceSerialConsoleData, error)

SerialConsole: Fetch an instance's serial console

Parameters:

  • `fromStart`: Character index in the serial buffer from which to read, counting the bytes output since instance start. If this is not provided, `most_recent` must be provided, and if this *is* provided, `most_recent` must *not* be provided.
  • `instanceName`
  • `maxBytes`: Maximum number of bytes of buffered serial console contents to return. If the requested range runs to the end of the available buffer, the data returned will be shorter than `max_bytes`.
  • `mostRecent`: Character index in the serial buffer from which to read, counting *backward* from the most recently buffered data retrieved from the instance. (See note on `from_start` about mutual exclusivity)
  • `organizationName`
  • `projectName`

func (*InstancesService) Start added in v0.0.3

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

Start: Boot an instance

Parameters:

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

func (*InstancesService) Stop added in v0.0.3

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

Stop: Halt an instance

Parameters:

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

func (*InstancesService) View added in v0.0.20

func (s *InstancesService) View(instanceName string, organizationName string, projectName string) (*Instance, error)

View: Fetch an instance

Parameters:

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

func (*InstancesService) ViewByID added in v0.0.20

func (s *InstancesService) ViewByID(id string) (*Instance, error)

ViewByID: Fetch an instance by id

Parameters:

  • `id`

type IpKind added in v0.0.20

type IpKind string

IpKind is the kind of an external IP address for an instance

const (
	// IpKindEphemeral represents the IpKind `"ephemeral"`.
	IpKindEphemeral IpKind = "ephemeral"
	// IpKindFloating represents the IpKind `"floating"`.
	IpKindFloating IpKind = "floating"
)

type IpNet added in v0.0.7

type IpNet struct {
}

IpNet is the type definition for a IpNet.

type IpPool added in v0.0.19

type IpPool 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      string `json:"name,omitempty" yaml:"name,omitempty"`
	ProjectID string `json:"project_id,omitempty" yaml:"project_id,omitempty"`
	// TimeCreated is timestamp when this resource was created
	TimeCreated *time.Time `json:"time_created,omitempty" yaml:"time_created,omitempty"`
	// TimeModified is timestamp when this resource was last modified
	TimeModified *time.Time `json:"time_modified,omitempty" yaml:"time_modified,omitempty"`
}

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

type IpPoolCreate added in v0.0.19

type IpPoolCreate 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 '-'. Names cannot be a UUID though they may contain a UUID.
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
	// Organization 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 '-'. Names cannot be a UUID though they may contain a UUID.
	Organization string `json:"organization,omitempty" yaml:"organization,omitempty"`
	// Project 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 '-'. Names cannot be a UUID though they may contain a UUID.
	Project string `json:"project,omitempty" yaml:"project,omitempty"`
}

IpPoolCreate is create-time parameters for an IP Pool.

See [`IpPool`](crate::external_api::views::IpPool)

type IpPoolRange added in v0.0.19

type IpPoolRange struct {
	ID          string     `json:"id,omitempty" yaml:"id,omitempty"`
	Range       IpRange    `json:"range,omitempty" yaml:"range,omitempty"`
	TimeCreated *time.Time `json:"time_created,omitempty" yaml:"time_created,omitempty"`
}

IpPoolRange is the type definition for a IpPoolRange.

type IpPoolRangeResultsPage added in v0.0.19

type IpPoolRangeResultsPage struct {
	// Items is list of items on this page of results
	Items []IpPoolRange `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"`
}

IpPoolRangeResultsPage is a single page of results

type IpPoolResultsPage added in v0.0.19

type IpPoolResultsPage struct {
	// Items is list of items on this page of results
	Items []IpPool `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"`
}

IpPoolResultsPage is a single page of results

type IpPoolUpdate added in v0.0.19

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

IpPoolUpdate is parameters for updating an IP Pool

type IpPoolsService added in v0.0.19

type IpPoolsService service

IpPoolsService: IP Pools contain external IP addresses that can be assigned to virtual machine Instances.

func (*IpPoolsService) Create added in v0.0.19

func (s *IpPoolsService) Create(j *IpPoolCreate) (*IpPool, error)

func (*IpPoolsService) Delete added in v0.0.19

func (s *IpPoolsService) Delete(poolName string) error

Delete: Delete an IP Pool

Parameters:

  • `poolName`

func (*IpPoolsService) List added in v0.0.19

func (s *IpPoolsService) List(limit int, pageToken string, sortBy NameOrIdSortMode) (*IpPoolResultsPage, error)

List: List IP pools

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

Parameters:

  • `limit`: Maximum number of items returned by a single call
  • `pageToken`: Token returned by previous call to retrieve the subsequent page
  • `sortBy`

func (*IpPoolsService) ListAllPages added in v0.0.19

func (s *IpPoolsService) ListAllPages(sortBy NameOrIdSortMode) (*[]IpPool, error)

ListAllPages: List IP pools

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

Parameters:

  • `sortBy`

func (*IpPoolsService) RangeAdd added in v0.0.20

func (s *IpPoolsService) RangeAdd(poolName string, j *IpRange) (*IpPoolRange, error)

Parameters:

  • `poolName`

func (*IpPoolsService) RangeList added in v0.0.20

func (s *IpPoolsService) RangeList(poolName string, limit int, pageToken string) (*IpPoolRangeResultsPage, error)

RangeList: List ranges for an IP pool

Ranges are ordered by their first address.

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

Parameters:

  • `limit`: Maximum number of items returned by a single call
  • `pageToken`: Token returned by previous call to retrieve the subsequent page
  • `poolName`

func (*IpPoolsService) RangeListAllPages added in v0.0.20

func (s *IpPoolsService) RangeListAllPages(poolName string) (*[]IpPoolRange, error)

RangeListAllPages: List ranges for an IP pool

Ranges are ordered by their first address.

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

Parameters:

  • `poolName`

func (*IpPoolsService) RangeRemove added in v0.0.20

func (s *IpPoolsService) RangeRemove(poolName string, j *IpRange) error

RangeRemove: Remove a range from an IP pool

Parameters:

  • `poolName`

func (*IpPoolsService) ServiceRangeAdd added in v0.0.20

func (s *IpPoolsService) ServiceRangeAdd(rackID string, j *IpRange) (*IpPoolRange, error)

Parameters:

  • `rackId`

func (*IpPoolsService) ServiceRangeList added in v0.0.20

func (s *IpPoolsService) ServiceRangeList(rackID string, limit int, pageToken string) (*IpPoolRangeResultsPage, error)

ServiceRangeList: List ranges for an IP pool used for Oxide services.

Ranges are ordered by their first address.

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

Parameters:

  • `limit`: Maximum number of items returned by a single call
  • `pageToken`: Token returned by previous call to retrieve the subsequent page
  • `rackId`

func (*IpPoolsService) ServiceRangeListAllPages added in v0.0.20

func (s *IpPoolsService) ServiceRangeListAllPages(rackID string) (*[]IpPoolRange, error)

ServiceRangeListAllPages: List ranges for an IP pool used for Oxide services.

Ranges are ordered by their first address.

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

Parameters:

  • `rackId`

func (*IpPoolsService) ServiceRangeRemove added in v0.0.20

func (s *IpPoolsService) ServiceRangeRemove(rackID string, j *IpRange) error

ServiceRangeRemove: Remove a range from an IP pool used for Oxide services.

Parameters:

  • `rackId`

func (*IpPoolsService) ServiceView added in v0.0.20

func (s *IpPoolsService) ServiceView(rackID string) (*IpPool, error)

ServiceView: Fetch an IP pool used for Oxide services.

Parameters:

  • `rackId`

func (*IpPoolsService) Update added in v0.0.20

func (s *IpPoolsService) Update(poolName string, j *IpPoolUpdate) (*IpPool, error)

Update: Update an IP Pool

Parameters:

  • `poolName`

func (*IpPoolsService) View added in v0.0.20

func (s *IpPoolsService) View(poolName string) (*IpPool, error)

View: Fetch an IP pool

Parameters:

  • `poolName`

type IpRange added in v0.0.19

type IpRange struct {
}

IpRange is the type definition for a IpRange.

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 LoginService added in v0.0.18

type LoginService service

LoginService: Authentication endpoints

func (*LoginService) ConsumeCredentials added in v0.0.18

func (s *LoginService) ConsumeCredentials(providerName string, siloName string, b io.Reader) error

ConsumeCredentials: Authenticate a user

Either receive a username and password, or some sort of identity provider data (like a SAMLResponse). Use these to set the user's session cookie.

Parameters:

  • `providerName`
  • `siloName`

func (*LoginService) Login added in v0.0.18

func (s *LoginService) Login(providerName string, siloName string) error

Login: Prompt user login

Either display a page asking a user for their credentials, or redirect them to their identity provider.

Parameters:

  • `providerName`
  • `siloName`

type MacAddr

type MacAddr string

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

type Measurement added in v0.0.20

type Measurement struct {
	// Datum is a `Datum` is a single sampled data point from a metric.
	Datum     Datum      `json:"datum,omitempty" yaml:"datum,omitempty"`
	Timestamp *time.Time `json:"timestamp,omitempty" yaml:"timestamp,omitempty"`
}

Measurement is a `Measurement` is a timestamped datum from a single metric

type MeasurementResultsPage added in v0.0.20

type MeasurementResultsPage struct {
	// Items is list of items on this page of results
	Items []Measurement `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"`
}

MeasurementResultsPage is a single page of results

type MetricsService added in v0.0.3

type MetricsService service

MetricsService: Metrics provide insight into the operation of the Oxide deployment. These include telemetry on hardware and software components that can be used to understand the current state as well as to diagnose issues.

func (*MetricsService) TimeseriesSchemaList added in v0.0.3

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

TimeseriesSchemaList: List timeseries schema

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

Parameters:

  • `limit`: Maximum number of items returned by a single call
  • `pageToken`: Token returned by previous call to retrieve the subsequent page

func (*MetricsService) TimeseriesSchemaListAllPages added in v0.0.3

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

TimeseriesSchemaListAllPages: List 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 '-'. Names cannot be a UUID though they may contain a UUID.

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 {
	// 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"`
	// 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"`
	// Name is unique, mutable, user-controlled identifier for each resource
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
	// Primary is true if this interface is the primary for the instance to which it's attached.
	Primary bool `json:"primary,omitempty" yaml:"primary,omitempty"`
	// SubnetID is the subnet to which the interface belongs.
	SubnetID string `json:"subnet_id,omitempty" yaml:"subnet_id,omitempty"`
	// TimeCreated is timestamp when this resource was created
	TimeCreated *time.Time `json:"time_created,omitempty" yaml:"time_created,omitempty"`
	// TimeModified is timestamp when this resource was last modified
	TimeModified *time.Time `json:"time_modified,omitempty" yaml:"time_modified,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 NetworkInterfaceCreate added in v0.0.7

type NetworkInterfaceCreate struct {
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// Ip is the IP address for the interface. One will be auto-assigned if not provided.
	Ip string `json:"ip,omitempty" yaml:"ip,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 '-'. Names cannot be a UUID though they may contain a UUID.
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
	// SubnetName is the VPC Subnet in which to create the interface.
	SubnetName string `json:"subnet_name,omitempty" yaml:"subnet_name,omitempty"`
	// VPCName is the VPC in which to create the interface.
	VPCName string `json:"vpc_name,omitempty" yaml:"vpc_name,omitempty"`
}

NetworkInterfaceCreate is create-time parameters for a [`NetworkInterface`](omicron_common::api::external::NetworkInterface)

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 NetworkInterfaceUpdate added in v0.0.18

type NetworkInterfaceUpdate struct {
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// MakePrimary is make a secondary interface the instance's primary interface.
	//
	// If applied to a secondary interface, that interface will become the primary on the next reboot of the instance. Note that this may have implications for routing between instances, as the new primary interface will be on a distinct subnet from the previous primary interface.
	//
	// Note that this can only be used to select a new primary interface for an instance. Requests to change the primary interface into a secondary will return an error.
	MakePrimary bool   `json:"make_primary,omitempty" yaml:"make_primary,omitempty"`
	Name        string `json:"name,omitempty" yaml:"name,omitempty"`
}

NetworkInterfaceUpdate is parameters for updating a [`NetworkInterface`](omicron_common::api::external::NetworkInterface).

Note that modifying IP addresses for an interface is not yet supported, a new interface must be created instead.

type NodeName added in v0.0.20

type NodeName string

NodeName is unique name for a saga [`Node`]

Each node requires a string name that's unique within its DAG. The name is used to identify its output. Nodes that depend on a given node (either directly or indirectly) can access the node's output using its name.

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 string `json:"name,omitempty" yaml:"name,omitempty"`
	// TimeCreated is timestamp when this resource was created
	TimeCreated *time.Time `json:"time_created,omitempty" yaml:"time_created,omitempty"`
	// TimeModified is timestamp when this resource was last modified
	TimeModified *time.Time `json:"time_modified,omitempty" yaml:"time_modified,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 '-'. Names cannot be a UUID though they may contain a UUID.
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
}

OrganizationCreate is create-time parameters for an [`Organization`](crate::external_api::views::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 OrganizationRole added in v0.0.15

type OrganizationRole string

OrganizationRole is the type definition for a OrganizationRole.

const (
	// OrganizationRoleAdmin represents the OrganizationRole `"admin"`.
	OrganizationRoleAdmin OrganizationRole = "admin"
	// OrganizationRoleCollaborator represents the OrganizationRole `"collaborator"`.
	OrganizationRoleCollaborator OrganizationRole = "collaborator"
	// OrganizationRoleViewer represents the OrganizationRole `"viewer"`.
	OrganizationRoleViewer OrganizationRole = "viewer"
)

type OrganizationRolePolicy added in v0.0.18

type OrganizationRolePolicy struct {
	// RoleAssignments is roles directly assigned on this resource
	RoleAssignments []OrganizationRoleRoleAssignment `json:"role_assignments,omitempty" yaml:"role_assignments,omitempty"`
}

OrganizationRolePolicy is client view of a [`Policy`], which describes how this resource may be accessed

Note that the Policy only describes access granted explicitly for this resource. The policies of parent resources can also cause a user to have access to this resource.

type OrganizationRoleRoleAssignment added in v0.0.18

type OrganizationRoleRoleAssignment struct {
	IdentityID string `json:"identity_id,omitempty" yaml:"identity_id,omitempty"`
	// IdentityType is describes what kind of identity is described by an id
	IdentityType IdentityType     `json:"identity_type,omitempty" yaml:"identity_type,omitempty"`
	RoleName     OrganizationRole `json:"role_name,omitempty" yaml:"role_name,omitempty"`
}

OrganizationRoleRoleAssignment is describes the assignment of a particular role on a particular resource to a particular identity (user, group, etc.)

The resource is not part of this structure. Rather, [`RoleAssignment`]s are put into a [`Policy`] and that Policy is applied to a particular resource.

type OrganizationUpdate

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

OrganizationUpdate is updateable properties of an [`Organization`](crate::external_api::views::Organization)

type OrganizationsService added in v0.0.3

type OrganizationsService service

OrganizationsService: Organizations represent a subset of users and projects in an Oxide deployment.

func (*OrganizationsService) Create added in v0.0.3

func (*OrganizationsService) Delete added in v0.0.3

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

Delete: Delete an organization

Parameters:

  • `organizationName`: The organization's unique name.

func (*OrganizationsService) List added in v0.0.3

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

List: List organizations

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

Parameters:

  • `limit`: Maximum number of items returned by a single call
  • `pageToken`: Token returned by previous call to retrieve the subsequent page
  • `sortBy`

func (*OrganizationsService) ListAllPages added in v0.0.3

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

ListAllPages: List organizations

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

Parameters:

  • `sortBy`

func (*OrganizationsService) PolicyUpdate added in v0.0.20

func (s *OrganizationsService) PolicyUpdate(organizationName string, j *OrganizationRolePolicy) (*OrganizationRolePolicy, error)

PolicyUpdate: Update an organization's IAM policy

Parameters:

  • `organizationName`: The organization's unique name.

func (*OrganizationsService) PolicyView added in v0.0.20

func (s *OrganizationsService) PolicyView(organizationName string) (*OrganizationRolePolicy, error)

PolicyView: Fetch an organization's IAM policy

Parameters:

  • `organizationName`: The organization's unique name.

func (*OrganizationsService) Update added in v0.0.20

func (s *OrganizationsService) Update(organizationName string, j *OrganizationUpdate) (*Organization, error)

Update: Update an organization

Parameters:

  • `organizationName`: The organization's unique name.

func (*OrganizationsService) View added in v0.0.20

func (s *OrganizationsService) View(organizationName string) (*Organization, error)

View: Fetch an organization

Parameters:

  • `organizationName`: The organization's unique name.

func (*OrganizationsService) ViewByID added in v0.0.20

func (s *OrganizationsService) ViewByID(id string) (*Organization, error)

ViewByID: Fetch an organization by id

Parameters:

  • `id`

type PolicyService added in v0.0.17

type PolicyService service

PolicyService: System-wide IAM policy

func (*PolicyService) Update added in v0.0.20

Update: Update the top-level IAM policy

func (*PolicyService) View added in v0.0.20

func (s *PolicyService) View() (*FleetRolePolicy, error)

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           string `json:"name,omitempty" yaml:"name,omitempty"`
	OrganizationID string `json:"organization_id,omitempty" yaml:"organization_id,omitempty"`
	// TimeCreated is timestamp when this resource was created
	TimeCreated *time.Time `json:"time_created,omitempty" yaml:"time_created,omitempty"`
	// TimeModified is timestamp when this resource was last modified
	TimeModified *time.Time `json:"time_modified,omitempty" yaml:"time_modified,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 '-'. Names cannot be a UUID though they may contain a UUID.
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
}

ProjectCreate is create-time parameters for a [`Project`](crate::external_api::views::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 ProjectRole added in v0.0.15

type ProjectRole string

ProjectRole is the type definition for a ProjectRole.

const (
	// ProjectRoleAdmin represents the ProjectRole `"admin"`.
	ProjectRoleAdmin ProjectRole = "admin"
	// ProjectRoleCollaborator represents the ProjectRole `"collaborator"`.
	ProjectRoleCollaborator ProjectRole = "collaborator"
	// ProjectRoleViewer represents the ProjectRole `"viewer"`.
	ProjectRoleViewer ProjectRole = "viewer"
)

type ProjectRolePolicy added in v0.0.18

type ProjectRolePolicy struct {
	// RoleAssignments is roles directly assigned on this resource
	RoleAssignments []ProjectRoleRoleAssignment `json:"role_assignments,omitempty" yaml:"role_assignments,omitempty"`
}

ProjectRolePolicy is client view of a [`Policy`], which describes how this resource may be accessed

Note that the Policy only describes access granted explicitly for this resource. The policies of parent resources can also cause a user to have access to this resource.

type ProjectRoleRoleAssignment added in v0.0.18

type ProjectRoleRoleAssignment struct {
	IdentityID string `json:"identity_id,omitempty" yaml:"identity_id,omitempty"`
	// IdentityType is describes what kind of identity is described by an id
	IdentityType IdentityType `json:"identity_type,omitempty" yaml:"identity_type,omitempty"`
	RoleName     ProjectRole  `json:"role_name,omitempty" yaml:"role_name,omitempty"`
}

ProjectRoleRoleAssignment is describes the assignment of a particular role on a particular resource to a particular identity (user, group, etc.)

The resource is not part of this structure. Rather, [`RoleAssignment`]s are put into a [`Policy`] and that Policy is applied to a particular resource.

type ProjectUpdate

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

ProjectUpdate is updateable properties of a [`Project`](crate::external_api::views::Project)

type ProjectsService added in v0.0.3

type ProjectsService service

ProjectsService: Projects are a grouping of associated resources such as instances and disks within an organization for purposes of billing and access control.

func (*ProjectsService) Create added in v0.0.3

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

Parameters:

  • `organizationName`: The organization's unique name.

func (*ProjectsService) Delete added in v0.0.3

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

Delete: Delete a project

Parameters:

  • `organizationName`: The organization's unique name.
  • `projectName`: The project's unique name within the organization.

func (*ProjectsService) List added in v0.0.3

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

List: List projects

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

Parameters:

  • `limit`: Maximum number of items returned by a single call
  • `organizationName`: The organization's unique name.
  • `pageToken`: Token returned by previous call to retrieve the subsequent page
  • `sortBy`

func (*ProjectsService) ListAllPages added in v0.0.3

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

ListAllPages: List projects

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

Parameters:

  • `organizationName`: The organization's unique name.
  • `sortBy`

func (*ProjectsService) PolicyUpdate added in v0.0.20

func (s *ProjectsService) PolicyUpdate(organizationName string, projectName string, j *ProjectRolePolicy) (*ProjectRolePolicy, error)

PolicyUpdate: Update a project's IAM policy

Parameters:

  • `organizationName`: The organization's unique name.
  • `projectName`: The project's unique name within the organization.

func (*ProjectsService) PolicyView added in v0.0.20

func (s *ProjectsService) PolicyView(organizationName string, projectName string) (*ProjectRolePolicy, error)

PolicyView: Fetch a project's IAM policy

Parameters:

  • `organizationName`: The organization's unique name.
  • `projectName`: The project's unique name within the organization.

func (*ProjectsService) Update added in v0.0.20

func (s *ProjectsService) Update(organizationName string, projectName string, j *ProjectUpdate) (*Project, error)

Update: Update a project

Parameters:

  • `organizationName`: The organization's unique name.
  • `projectName`: The project's unique name within the organization.

func (*ProjectsService) View added in v0.0.20

func (s *ProjectsService) View(organizationName string, projectName string) (*Project, error)

View: Fetch a project

Parameters:

  • `organizationName`: The organization's unique name.
  • `projectName`: The project's unique name within the organization.

func (*ProjectsService) ViewByID added in v0.0.20

func (s *ProjectsService) ViewByID(id string) (*Project, error)

ViewByID: Fetch a project by id

Parameters:

  • `id`

type Rack

type Rack struct {
	// ID is unique, immutable, system-controlled identifier for each resource
	ID string `json:"id,omitempty" yaml:"id,omitempty"`
	// TimeCreated is timestamp when this resource was created
	TimeCreated *time.Time `json:"time_created,omitempty" yaml:"time_created,omitempty"`
	// TimeModified is timestamp when this resource was last modified
	TimeModified *time.Time `json:"time_modified,omitempty" yaml:"time_modified,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

RolesService: Roles are a component of Identity and Access Management (IAM) that allow a user or agent account access to additional permissions.

func (*RolesService) List added in v0.0.3

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

List: List built-in roles

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

Parameters:

  • `limit`: Maximum number of items returned by a single call
  • `pageToken`: Token returned by previous call to retrieve the subsequent page

func (*RolesService) ListAllPages added in v0.0.3

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

ListAllPages: List built-in roles

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

func (*RolesService) View added in v0.0.20

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

Parameters:

  • `roleName`: The built-in role's unique name.

type Route added in v0.0.7

type Route struct {
	// Description is human-readable free-form text about a resource
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// Destination is a `RouteDestination` is used to match traffic with a routing rule, on the destination of that traffic.
	//
	// When traffic is to be sent to a destination that is within a given `RouteDestination`, the corresponding [`RouterRoute`] applies, and traffic will be forward to the [`RouteTarget`] for that rule.
	Destination RouteDestination `json:"destination,omitempty" yaml:"destination,omitempty"`
	// ID is unique, immutable, system-controlled identifier for each resource
	ID string `json:"id,omitempty" yaml:"id,omitempty"`
	// Kind is describes the kind of router. Set at creation. `read-only`
	Kind RouteKind `json:"kind,omitempty" yaml:"kind,omitempty"`
	// Name is unique, mutable, user-controlled identifier for each resource
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
	// Target is a `RouteTarget` describes the possible locations that traffic matching a route destination can be sent.
	Target RouteTarget `json:"target,omitempty" yaml:"target,omitempty"`
	// TimeCreated is timestamp when this resource was created
	TimeCreated *time.Time `json:"time_created,omitempty" yaml:"time_created,omitempty"`
	// TimeModified is timestamp when this resource was last modified
	TimeModified *time.Time `json:"time_modified,omitempty" yaml:"time_modified,omitempty"`
	// RouterId is the VPC Router to which the route belongs.
	RouterId string `json:"vpc_router_id,omitempty" yaml:"vpc_router_id,omitempty"`
}

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

type RouteCreate added in v0.0.8

type RouteCreate struct {
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// Destination is a `RouteDestination` is used to match traffic with a routing rule, on the destination of that traffic.
	//
	// When traffic is to be sent to a destination that is within a given `RouteDestination`, the corresponding [`RouterRoute`] applies, and traffic will be forward to the [`RouteTarget`] for that rule.
	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 '-'. Names cannot be a UUID though they may contain a UUID.
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
	// Target is a `RouteTarget` describes the possible locations that traffic matching a route destination can be sent.
	Target RouteTarget `json:"target,omitempty" yaml:"target,omitempty"`
}

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

type RouteDestination

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

RouteDestination is a `RouteDestination` is used to match traffic with a routing rule, on the destination of that traffic.

When traffic is to be sent to a destination that is within a given `RouteDestination`, the corresponding [`RouterRoute`] applies, and traffic will be forward to the [`RouteTarget`] for that rule.

type RouteDestinationIp

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

RouteDestinationIp is route applies to traffic destined for a specific IP address

type RouteDestinationIpNet added in v0.0.7

type RouteDestinationIpNet struct {
	Type  RouteDestinationType `json:"type,omitempty" yaml:"type,omitempty"`
	Value IpNet                `json:"value,omitempty" yaml:"value,omitempty"`
}

RouteDestinationIpNet is route applies to traffic destined for a specific IP subnet

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 '-'. Names cannot be a UUID though they may contain a UUID.
	Value string `json:"value,omitempty" yaml:"value,omitempty"`
}

RouteDestinationSubnet is route applies to traffic

type RouteDestinationType

type RouteDestinationType string

RouteDestinationType is the type definition for a RouteDestinationType.

const (
	// RouteDestinationTypeIp represents the RouteDestinationType `"ip"`.
	RouteDestinationTypeIp RouteDestinationType = "ip"
)
const (
	// RouteDestinationTypeIpNet represents the RouteDestinationType `"ip_net"`.
	RouteDestinationTypeIpNet RouteDestinationType = "ip_net"
)
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 '-'. Names cannot be a UUID though they may contain a UUID.
	Value string `json:"value,omitempty" yaml:"value,omitempty"`
}

RouteDestinationVPC is route applies to traffic destined for the given VPC.

type RouteKind added in v0.0.7

type RouteKind string

RouteKind 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 (
	// RouteKindDefault represents the RouteKind `"default"`.
	RouteKindDefault RouteKind = "default"
	// RouteKindVpcSubnet represents the RouteKind `"vpc_subnet"`.
	RouteKindVpcSubnet RouteKind = "vpc_subnet"
	// RouteKindVpcPeering represents the RouteKind `"vpc_peering"`.
	RouteKindVpcPeering RouteKind = "vpc_peering"
	// RouteKindCustom represents the RouteKind `"custom"`.
	RouteKindCustom RouteKind = "custom"
)

type RouteResultsPage added in v0.0.7

type RouteResultsPage struct {
	// Items is list of items on this page of results
	Items []Route `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"`
}

RouteResultsPage is a single page of results

type RouteTarget

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

RouteTarget is a `RouteTarget` describes the possible locations that traffic matching a route destination can be sent.

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 '-'. Names cannot be a UUID though they may contain a UUID.
	Value string `json:"value,omitempty" yaml:"value,omitempty"`
}

RouteTargetInstance is forward traffic to a specific instance

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 '-'. Names cannot be a UUID though they may contain a UUID.
	Value string `json:"value,omitempty" yaml:"value,omitempty"`
}

RouteTargetInternetGateway is forward traffic to an internet gateway

type RouteTargetIp

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

RouteTargetIp is forward traffic to a particular IP address.

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 '-'. Names cannot be a UUID though they may contain a UUID.
	Value string `json:"value,omitempty" yaml:"value,omitempty"`
}

RouteTargetSubnet is forward traffic to a VPC Subnet

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 `"internet_gateway"`.
	RouteTargetTypeInternetGateway RouteTargetType = "internet_gateway"
)
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 '-'. Names cannot be a UUID though they may contain a UUID.
	Value string `json:"value,omitempty" yaml:"value,omitempty"`
}

RouteTargetVPC is forward traffic to a VPC

type RouteUpdate added in v0.0.8

type RouteUpdate struct {
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// Destination is a `RouteDestination` is used to match traffic with a routing rule, on the destination of that traffic.
	//
	// When traffic is to be sent to a destination that is within a given `RouteDestination`, the corresponding [`RouterRoute`] applies, and traffic will be forward to the [`RouteTarget`] for that rule.
	Destination RouteDestination `json:"destination,omitempty" yaml:"destination,omitempty"`
	Name        string           `json:"name,omitempty" yaml:"name,omitempty"`
	// Target is a `RouteTarget` describes the possible locations that traffic matching a route destination can be sent.
	Target RouteTarget `json:"target,omitempty" yaml:"target,omitempty"`
}

RouteUpdate is updateable properties of a [`RouterRoute`]

type Router added in v0.0.7

type Router 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"`
	Kind RouterKind `json:"kind,omitempty" yaml:"kind,omitempty"`
	// Name is unique, mutable, user-controlled identifier for each resource
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
	// TimeCreated is timestamp when this resource was created
	TimeCreated *time.Time `json:"time_created,omitempty" yaml:"time_created,omitempty"`
	// TimeModified is timestamp when this resource was last modified
	TimeModified *time.Time `json:"time_modified,omitempty" yaml:"time_modified,omitempty"`
	// VPCId is the VPC to which the router belongs.
	VPCId string `json:"vpc_id,omitempty" yaml:"vpc_id,omitempty"`
}

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

type RouterCreate added in v0.0.7

type RouterCreate 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 '-'. Names cannot be a UUID though they may contain a UUID.
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
}

RouterCreate is create-time parameters for a [`VpcRouter`](crate::external_api::views::VpcRouter)

type RouterKind added in v0.0.7

type RouterKind string

RouterKind is the type definition for a RouterKind.

const (
	// RouterKindSystem represents the RouterKind `"system"`.
	RouterKindSystem RouterKind = "system"
	// RouterKindCustom represents the RouterKind `"custom"`.
	RouterKindCustom RouterKind = "custom"
)

type RouterResultsPage added in v0.0.7

type RouterResultsPage struct {
	// Items is list of items on this page of results
	Items []Router `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"`
}

RouterResultsPage is a single page of results

type RouterUpdate added in v0.0.7

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

RouterUpdate is updateable properties of a [`VpcRouter`](crate::external_api::views::VpcRouter)

type RoutersService added in v0.0.7

type RoutersService service

RoutersService: Routers direct the flow of network traffic into, out of, and within a VPC via routes.

type RoutesService added in v0.0.7

type RoutesService service

RoutesService: Routes define router policy.

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 `"action_failed"`.
	SagaErrorInfoErrorActionFailed SagaErrorInfoError = "action_failed"
)
const (
	// SagaErrorInfoErrorDeserializeFailed represents the SagaErrorInfoError `"deserialize_failed"`.
	SagaErrorInfoErrorDeserializeFailed SagaErrorInfoError = "deserialize_failed"
)
const (
	// SagaErrorInfoErrorInjectedError represents the SagaErrorInfoError `"injected_error"`.
	SagaErrorInfoErrorInjectedError SagaErrorInfoError = "injected_error"
)
const (
	// SagaErrorInfoErrorSerializeFailed represents the SagaErrorInfoError `"serialize_failed"`.
	SagaErrorInfoErrorSerializeFailed SagaErrorInfoError = "serialize_failed"
)
const (
	// SagaErrorInfoErrorSubsagaCreateFailed represents the SagaErrorInfoError `"subsaga_create_failed"`.
	SagaErrorInfoErrorSubsagaCreateFailed SagaErrorInfoError = "subsaga_create_failed"
)

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 NodeName      `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 is unique name for a saga [`Node`]
	//
	// Each node requires a string name that's unique within its DAG.  The name is used to identify its output.  Nodes that depend on a given node (either directly or indirectly) can access the node's output using its name.
	ErrorNodeName NodeName       `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

SagasService: Sagas are the abstraction used to represent multi-step operations within the Oxide deployment. These operations can be used to query saga status and report errors.

func (*SagasService) List added in v0.0.3

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

List: List sagas

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

Parameters:

  • `limit`: Maximum number of items returned by a single call
  • `pageToken`: Token returned by previous call to retrieve the subsequent page
  • `sortBy`

func (*SagasService) ListAllPages added in v0.0.3

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

ListAllPages: List sagas

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

Parameters:

  • `sortBy`

func (*SagasService) View added in v0.0.20

func (s *SagasService) View(sagaID string) (*Saga, error)

Parameters:

  • `sagaId`

type SamlIdentityProvider added in v0.0.18

type SamlIdentityProvider struct {
	// AcsUrl is service provider endpoint where the response will be sent
	AcsUrl string `json:"acs_url,omitempty" yaml:"acs_url,omitempty"`
	// 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"`
	// IdpEntityID is idp's entity id
	IdpEntityID string `json:"idp_entity_id,omitempty" yaml:"idp_entity_id,omitempty"`
	// Name is unique, mutable, user-controlled identifier for each resource
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
	// PublicCert is optional request signing public certificate (base64 encoded der file)
	PublicCert string `json:"public_cert,omitempty" yaml:"public_cert,omitempty"`
	// SloUrl is service provider endpoint where the idp should send log out requests
	SloUrl string `json:"slo_url,omitempty" yaml:"slo_url,omitempty"`
	// SpClientID is sp's client id
	SpClientID string `json:"sp_client_id,omitempty" yaml:"sp_client_id,omitempty"`
	// TechnicalContactEmail is customer's technical contact for saml configuration
	TechnicalContactEmail string `json:"technical_contact_email,omitempty" yaml:"technical_contact_email,omitempty"`
	// TimeCreated is timestamp when this resource was created
	TimeCreated *time.Time `json:"time_created,omitempty" yaml:"time_created,omitempty"`
	// TimeModified is timestamp when this resource was last modified
	TimeModified *time.Time `json:"time_modified,omitempty" yaml:"time_modified,omitempty"`
}

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

type SamlIdentityProviderCreate added in v0.0.18

type SamlIdentityProviderCreate struct {
	// AcsUrl is service provider endpoint where the response will be sent
	AcsUrl      string `json:"acs_url,omitempty" yaml:"acs_url,omitempty"`
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// GroupAttributeName is if set, SAML attributes with this name will be considered to denote a user's group membership, where the attribute value(s) should be a comma-separated list of group names.
	GroupAttributeName string `json:"group_attribute_name,omitempty" yaml:"group_attribute_name,omitempty"`
	// IdpEntityID is idp's entity id
	IdpEntityID string `json:"idp_entity_id,omitempty" yaml:"idp_entity_id,omitempty"`
	// IdpMetadataSource is the source of an identity provider metadata descriptor
	IdpMetadataSource IdpMetadataSource `json:"idp_metadata_source,omitempty" yaml:"idp_metadata_source,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 '-'. Names cannot be a UUID though they may contain a UUID.
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
	// SigningKeypair is optional request signing key pair
	SigningKeypair DerEncodedKeyPair `json:"signing_keypair,omitempty" yaml:"signing_keypair,omitempty"`
	// SloUrl is service provider endpoint where the idp should send log out requests
	SloUrl string `json:"slo_url,omitempty" yaml:"slo_url,omitempty"`
	// SpClientID is sp's client id
	SpClientID string `json:"sp_client_id,omitempty" yaml:"sp_client_id,omitempty"`
	// TechnicalContactEmail is customer's technical contact for saml configuration
	TechnicalContactEmail string `json:"technical_contact_email,omitempty" yaml:"technical_contact_email,omitempty"`
}

SamlIdentityProviderCreate is create-time identity-related parameters

type SessionService added in v0.0.20

type SessionService service

SessionService: Information pertaining to the current session.

func (*SessionService) SshkeyCreate added in v0.0.20

func (s *SessionService) SshkeyCreate(j *SshKeyCreate) (*SshKey, error)

Create an SSH public key for the currently authenticated user.

func (*SessionService) SshkeyDelete added in v0.0.20

func (s *SessionService) SshkeyDelete(sshKeyName string) error

SshkeyDelete: Delete an SSH public key

Delete an SSH public key associated with the currently authenticated user.

Parameters:

  • `sshKeyName`

func (*SessionService) SshkeyList added in v0.0.20

func (s *SessionService) SshkeyList(limit int, pageToken string, sortBy NameSortMode) (*SshKeyResultsPage, error)

SshkeyList: List SSH public keys

Lists SSH public keys for the currently authenticated user.

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

Parameters:

  • `limit`: Maximum number of items returned by a single call
  • `pageToken`: Token returned by previous call to retrieve the subsequent page
  • `sortBy`

func (*SessionService) SshkeyListAllPages added in v0.0.20

func (s *SessionService) SshkeyListAllPages(sortBy NameSortMode) (*[]SshKey, error)

SshkeyListAllPages: List SSH public keys

Lists SSH public keys for the currently authenticated user.

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

Parameters:

  • `sortBy`

func (*SessionService) SshkeyView added in v0.0.20

func (s *SessionService) SshkeyView(sshKeyName string) (*SshKey, error)

SshkeyView: Fetch an SSH public key

Fetch an SSH public key associated with the currently authenticated user.

Parameters:

  • `sshKeyName`

type Silo added in v0.0.12

type Silo struct {
	// Description is human-readable free-form text about a resource
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// Discoverable is a silo where discoverable is false can be retrieved only by its id - it will not be part of the "list all silos" output.
	Discoverable bool `json:"discoverable,omitempty" yaml:"discoverable,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 string `json:"name,omitempty" yaml:"name,omitempty"`
	// TimeCreated is timestamp when this resource was created
	TimeCreated *time.Time `json:"time_created,omitempty" yaml:"time_created,omitempty"`
	// TimeModified is timestamp when this resource was last modified
	TimeModified *time.Time `json:"time_modified,omitempty" yaml:"time_modified,omitempty"`
	// UserProvisionType is user provision type
	UserProvisionType UserProvisionType `json:"user_provision_type,omitempty" yaml:"user_provision_type,omitempty"`
}

Silo is client view of a ['Silo']

type SiloCreate added in v0.0.12

type SiloCreate struct {
	// AdminGroupName is if set, this group will be created during Silo creation and granted the "Silo Admin" role. Identity providers can assert that users belong to this group and those users can log in and further initialize the Silo.
	//
	// Note that if configuring a SAML based identity provider, group_attribute_name must be set for users to be considered part of a group. See [`SamlIdentityProviderCreate`] for more information.
	AdminGroupName string `json:"admin_group_name,omitempty" yaml:"admin_group_name,omitempty"`
	Description    string `json:"description,omitempty" yaml:"description,omitempty"`
	Discoverable   bool   `json:"discoverable,omitempty" yaml:"discoverable,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 '-'. Names cannot be a UUID though they may contain a UUID.
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
	// UserProvisionType is how users will be provisioned in a silo during authentication.
	UserProvisionType UserProvisionType `json:"user_provision_type,omitempty" yaml:"user_provision_type,omitempty"`
}

SiloCreate is create-time parameters for a [`Silo`](crate::external_api::views::Silo)

type SiloResultsPage added in v0.0.12

type SiloResultsPage struct {
	// Items is list of items on this page of results
	Items []Silo `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"`
}

SiloResultsPage is a single page of results

type SiloRole added in v0.0.15

type SiloRole string

SiloRole is the type definition for a SiloRole.

const (
	// SiloRoleAdmin represents the SiloRole `"admin"`.
	SiloRoleAdmin SiloRole = "admin"
	// SiloRoleCollaborator represents the SiloRole `"collaborator"`.
	SiloRoleCollaborator SiloRole = "collaborator"
	// SiloRoleViewer represents the SiloRole `"viewer"`.
	SiloRoleViewer SiloRole = "viewer"
)

type SiloRolePolicy added in v0.0.18

type SiloRolePolicy struct {
	// RoleAssignments is roles directly assigned on this resource
	RoleAssignments []SiloRoleRoleAssignment `json:"role_assignments,omitempty" yaml:"role_assignments,omitempty"`
}

SiloRolePolicy is client view of a [`Policy`], which describes how this resource may be accessed

Note that the Policy only describes access granted explicitly for this resource. The policies of parent resources can also cause a user to have access to this resource.

type SiloRoleRoleAssignment added in v0.0.18

type SiloRoleRoleAssignment struct {
	IdentityID string `json:"identity_id,omitempty" yaml:"identity_id,omitempty"`
	// IdentityType is describes what kind of identity is described by an id
	IdentityType IdentityType `json:"identity_type,omitempty" yaml:"identity_type,omitempty"`
	RoleName     SiloRole     `json:"role_name,omitempty" yaml:"role_name,omitempty"`
}

SiloRoleRoleAssignment is describes the assignment of a particular role on a particular resource to a particular identity (user, group, etc.)

The resource is not part of this structure. Rather, [`RoleAssignment`]s are put into a [`Policy`] and that Policy is applied to a particular resource.

type SilosService added in v0.0.12

type SilosService service

SilosService: Silos represent a logical partition of users and resources.

func (*SilosService) Create added in v0.0.12

func (s *SilosService) Create(j *SiloCreate) (*Silo, error)

func (*SilosService) Delete added in v0.0.12

func (s *SilosService) Delete(siloName string) error

Delete: Delete a silo

Delete a silo by name.

Parameters:

  • `siloName`: The silo's unique name.

func (*SilosService) IdentityProviderCreate added in v0.0.20

func (s *SilosService) IdentityProviderCreate(siloName string, j *SamlIdentityProviderCreate) (*SamlIdentityProvider, error)

IdentityProviderCreate: Create a SAML IDP

Parameters:

  • `siloName`: The silo's unique name.

func (*SilosService) IdentityProviderList added in v0.0.20

func (s *SilosService) IdentityProviderList(siloName string, limit int, pageToken string, sortBy NameSortMode) (*IdentityProviderResultsPage, error)

IdentityProviderList: List a silo's IDPs

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

Parameters:

  • `limit`: Maximum number of items returned by a single call
  • `pageToken`: Token returned by previous call to retrieve the subsequent page
  • `siloName`: The silo's unique name.
  • `sortBy`

func (*SilosService) IdentityProviderListAllPages added in v0.0.20

func (s *SilosService) IdentityProviderListAllPages(siloName string, sortBy NameSortMode) (*[]IdentityProvider, error)

IdentityProviderListAllPages: List a silo's IDPs

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

Parameters:

  • `siloName`: The silo's unique name.
  • `sortBy`

func (*SilosService) IdentityProviderView added in v0.0.20

func (s *SilosService) IdentityProviderView(providerName string, siloName string) (*SamlIdentityProvider, error)

IdentityProviderView: Fetch a SAML IDP

Parameters:

  • `providerName`: The SAML identity provider's name
  • `siloName`: The silo's unique name.

func (*SilosService) List added in v0.0.12

func (s *SilosService) List(limit int, pageToken string, sortBy NameOrIdSortMode) (*SiloResultsPage, error)

List: List silos

Lists silos that are discoverable based on the current permissions.

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

Parameters:

  • `limit`: Maximum number of items returned by a single call
  • `pageToken`: Token returned by previous call to retrieve the subsequent page
  • `sortBy`

func (*SilosService) ListAllPages added in v0.0.12

func (s *SilosService) ListAllPages(sortBy NameOrIdSortMode) (*[]Silo, error)

ListAllPages: List silos

Lists silos that are discoverable based on the current permissions.

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

Parameters:

  • `sortBy`

func (*SilosService) PolicyUpdate added in v0.0.20

func (s *SilosService) PolicyUpdate(siloName string, j *SiloRolePolicy) (*SiloRolePolicy, error)

PolicyUpdate: Update a silo's IAM policy

Parameters:

  • `siloName`: The silo's unique name.

func (*SilosService) PolicyView added in v0.0.20

func (s *SilosService) PolicyView(siloName string) (*SiloRolePolicy, error)

Parameters:

  • `siloName`: The silo's unique name.

func (*SilosService) UserList added in v0.0.20

func (s *SilosService) UserList(limit int, pageToken string, sortBy IdSortMode) (*UserResultsPage, error)

UserList: List users

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

Parameters:

  • `limit`: Maximum number of items returned by a single call
  • `pageToken`: Token returned by previous call to retrieve the subsequent page
  • `sortBy`

func (*SilosService) UserListAllPages added in v0.0.20

func (s *SilosService) UserListAllPages(sortBy IdSortMode) (*[]User, error)

UserListAllPages: List users

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

Parameters:

  • `sortBy`

func (*SilosService) View added in v0.0.20

func (s *SilosService) View(siloName string) (*Silo, error)

View: Fetch a silo

Fetch a silo by name.

Parameters:

  • `siloName`: The silo's unique name.

type Sled

type Sled struct {
	// ID is unique, immutable, system-controlled identifier for each resource
	ID             string `json:"id,omitempty" yaml:"id,omitempty"`
	ServiceAddress string `json:"service_address,omitempty" yaml:"service_address,omitempty"`
	// TimeCreated is timestamp when this resource was created
	TimeCreated *time.Time `json:"time_created,omitempty" yaml:"time_created,omitempty"`
	// TimeModified is timestamp when this resource was last modified
	TimeModified *time.Time `json:"time_modified,omitempty" yaml:"time_modified,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 Snapshot added in v0.0.7

type Snapshot struct {
	// Description is human-readable free-form text about a resource
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	DiskID      string `json:"disk_id,omitempty" yaml:"disk_id,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      string `json:"name,omitempty" yaml:"name,omitempty"`
	ProjectID string `json:"project_id,omitempty" yaml:"project_id,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"`
	// TimeCreated is timestamp when this resource was created
	TimeCreated *time.Time `json:"time_created,omitempty" yaml:"time_created,omitempty"`
	// TimeModified is timestamp when this resource was last modified
	TimeModified *time.Time `json:"time_modified,omitempty" yaml:"time_modified,omitempty"`
}

Snapshot is client view of a Snapshot

type SnapshotCreate added in v0.0.7

type SnapshotCreate struct {
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// Disk is the name of the disk to be snapshotted
	Disk string `json:"disk,omitempty" yaml:"disk,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 '-'. Names cannot be a UUID though they may contain a UUID.
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
}

SnapshotCreate is create-time parameters for a [`Snapshot`](crate::external_api::views::Snapshot)

type SnapshotResultsPage added in v0.0.7

type SnapshotResultsPage struct {
	// Items is list of items on this page of results
	Items []Snapshot `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"`
}

SnapshotResultsPage is a single page of results

type SnapshotsService added in v0.0.7

type SnapshotsService service

SnapshotsService: Snapshots of Virtual Disks at a particular point in time.

func (*SnapshotsService) Create added in v0.0.7

func (s *SnapshotsService) Create(organizationName string, projectName string, j *SnapshotCreate) (*Snapshot, error)

Creates a point-in-time snapshot from a disk.

Parameters:

  • `organizationName`: The organization's unique name.
  • `projectName`: The project's unique name within the organization.

func (*SnapshotsService) Delete added in v0.0.7

func (s *SnapshotsService) Delete(organizationName string, projectName string, snapshotName string) error

Delete: Delete a snapshot

Parameters:

  • `organizationName`
  • `projectName`
  • `snapshotName`

func (*SnapshotsService) List added in v0.0.7

func (s *SnapshotsService) List(limit int, pageToken string, sortBy NameSortMode, organizationName string, projectName string) (*SnapshotResultsPage, error)

List: List snapshots

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

Parameters:

  • `limit`: Maximum number of items returned by a single call
  • `organizationName`: The organization's unique name.
  • `pageToken`: Token returned by previous call to retrieve the subsequent page
  • `projectName`: The project's unique name within the organization.
  • `sortBy`

func (*SnapshotsService) ListAllPages added in v0.0.7

func (s *SnapshotsService) ListAllPages(sortBy NameSortMode, organizationName string, projectName string) (*[]Snapshot, error)

ListAllPages: List snapshots

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

Parameters:

  • `organizationName`: The organization's unique name.
  • `projectName`: The project's unique name within the organization.
  • `sortBy`

func (*SnapshotsService) View added in v0.0.20

func (s *SnapshotsService) View(organizationName string, projectName string, snapshotName string) (*Snapshot, error)

View: Fetch a snapshot

Parameters:

  • `organizationName`
  • `projectName`
  • `snapshotName`

func (*SnapshotsService) ViewByID added in v0.0.20

func (s *SnapshotsService) ViewByID(id string) (*Snapshot, error)

ViewByID: Fetch a snapshot by id

Parameters:

  • `id`

type SpoofLoginBody added in v0.0.18

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

SpoofLoginBody is the type definition for a SpoofLoginBody.

type SshKey added in v0.0.15

type SshKey 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 string `json:"name,omitempty" yaml:"name,omitempty"`
	// PublicKey is sSH public key, e.g., `"ssh-ed25519 AAAAC3NzaC..."`
	PublicKey string `json:"public_key,omitempty" yaml:"public_key,omitempty"`
	// SiloUserID is the user to whom this key belongs
	SiloUserID string `json:"silo_user_id,omitempty" yaml:"silo_user_id,omitempty"`
	// TimeCreated is timestamp when this resource was created
	TimeCreated *time.Time `json:"time_created,omitempty" yaml:"time_created,omitempty"`
	// TimeModified is timestamp when this resource was last modified
	TimeModified *time.Time `json:"time_modified,omitempty" yaml:"time_modified,omitempty"`
}

SshKey is client view of a [`SshKey`]

type SshKeyCreate added in v0.0.15

type SshKeyCreate 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 '-'. Names cannot be a UUID though they may contain a UUID.
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
	// PublicKey is sSH public key, e.g., `"ssh-ed25519 AAAAC3NzaC..."`
	PublicKey string `json:"public_key,omitempty" yaml:"public_key,omitempty"`
}

SshKeyCreate is create-time parameters for an [`SshKey`](crate::external_api::views::SshKey)

type SshKeyResultsPage added in v0.0.15

type SshKeyResultsPage struct {
	// Items is list of items on this page of results
	Items []SshKey `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"`
}

SshKeyResultsPage is a single page of results

type Subnet added in v0.0.7

type Subnet 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"`
	// 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"`
	// Name is unique, mutable, user-controlled identifier for each resource
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
	// TimeCreated is timestamp when this resource was created
	TimeCreated *time.Time `json:"time_created,omitempty" yaml:"time_created,omitempty"`
	// TimeModified is timestamp when this resource was last modified
	TimeModified *time.Time `json:"time_modified,omitempty" yaml:"time_modified,omitempty"`
	// VPCId is the VPC to which the subnet belongs.
	VPCId string `json:"vpc_id,omitempty" yaml:"vpc_id,omitempty"`
}

Subnet 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 SubnetCreate added in v0.0.7

type SubnetCreate struct {
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// IPv4Block is the IPv4 address range for this subnet.
	//
	// It must be allocated from an RFC 1918 private address range, and must not overlap with any other existing subnet in the VPC.
	IPv4Block IPv4Net `json:"ipv4_block,omitempty" yaml:"ipv4_block,omitempty"`
	// IPv6Block is the IPv6 address range for this subnet.
	//
	// It must be allocated from the RFC 4193 Unique Local Address range, with the prefix equal to the parent VPC's prefix. A random `/64` block will be assigned if one is not provided. It must not overlap with any existing subnet in the VPC.
	IPv6Block IPv6Net `json:"ipv6_block,omitempty" yaml:"ipv6_block,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 '-'. Names cannot be a UUID though they may contain a UUID.
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
}

SubnetCreate is create-time parameters for a [`VpcSubnet`](crate::external_api::views::VpcSubnet)

type SubnetResultsPage added in v0.0.7

type SubnetResultsPage struct {
	// Items is list of items on this page of results
	Items []Subnet `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"`
}

SubnetResultsPage is a single page of results

type SubnetUpdate added in v0.0.7

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

SubnetUpdate is updateable properties of a [`VpcSubnet`](crate::external_api::views::VpcSubnet)

type SubnetsService added in v0.0.7

type SubnetsService service

SubnetsService: This tag should be moved into a generic network tag

type SystemService added in v0.0.19

type SystemService service

SystemService: Internal system information

func (*SystemService) UserList added in v0.0.20

func (s *SystemService) UserList(limit int, pageToken string, sortBy NameSortMode) (*UserBuiltinResultsPage, error)

UserList: List built-in users

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

Parameters:

  • `limit`: Maximum number of items returned by a single call
  • `pageToken`: Token returned by previous call to retrieve the subsequent page
  • `sortBy`

func (*SystemService) UserListAllPages added in v0.0.20

func (s *SystemService) UserListAllPages(sortBy NameSortMode) (*[]UserBuiltin, error)

UserListAllPages: List built-in users

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

Parameters:

  • `sortBy`

func (*SystemService) UserView added in v0.0.20

func (s *SystemService) UserView(userName string) (*UserBuiltin, error)

Parameters:

  • `userName`: The built-in user's unique name.

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 UpdatesService added in v0.0.7

type UpdatesService service

UpdatesService: This tag should be moved into a operations tag

func (*UpdatesService) Refresh added in v0.0.7

func (s *UpdatesService) Refresh() error

type User

type User struct {
	// DisplayName is human-readable name that can identify the user
	DisplayName string `json:"display_name,omitempty" yaml:"display_name,omitempty"`
	ID          string `json:"id,omitempty" yaml:"id,omitempty"`
}

User is client view of a [`User`]

type UserBuiltin added in v0.0.19

type UserBuiltin 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 string `json:"name,omitempty" yaml:"name,omitempty"`
	// TimeCreated is timestamp when this resource was created
	TimeCreated *time.Time `json:"time_created,omitempty" yaml:"time_created,omitempty"`
	// TimeModified is timestamp when this resource was last modified
	TimeModified *time.Time `json:"time_modified,omitempty" yaml:"time_modified,omitempty"`
}

UserBuiltin is client view of a [`UserBuiltin`]

type UserBuiltinResultsPage added in v0.0.19

type UserBuiltinResultsPage struct {
	// Items is list of items on this page of results
	Items []UserBuiltin `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"`
}

UserBuiltinResultsPage is a single page of results

type UserProvisionType added in v0.0.20

type UserProvisionType string

UserProvisionType is how users will be provisioned in a silo during authentication.

const (
	// UserProvisionTypeFixed represents the UserProvisionType `"fixed"`.
	UserProvisionTypeFixed UserProvisionType = "fixed"
	// UserProvisionTypeJit represents the UserProvisionType `"jit"`.
	UserProvisionTypeJit UserProvisionType = "jit"
)

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 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 string `json:"dns_name,omitempty" yaml:"dns_name,omitempty"`
	// ID is unique, immutable, system-controlled identifier for each resource
	ID string `json:"id,omitempty" yaml:"id,omitempty"`
	// IPv6Prefix is the unique local IPv6 address range for subnets in this VPC
	IPv6Prefix IPv6Net `json:"ipv6_prefix,omitempty" yaml:"ipv6_prefix,omitempty"`
	// Name is unique, mutable, user-controlled identifier for each resource
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
	// ProjectID is id for the project containing this VPC
	ProjectID string `json:"project_id,omitempty" yaml:"project_id,omitempty"`
	// SystemRouterID is id for the system router where subnet default routes are registered
	SystemRouterID string `json:"system_router_id,omitempty" yaml:"system_router_id,omitempty"`
	// TimeCreated is timestamp when this resource was created
	TimeCreated *time.Time `json:"time_created,omitempty" yaml:"time_created,omitempty"`
	// TimeModified is timestamp when this resource was last modified
	TimeModified *time.Time `json:"time_modified,omitempty" yaml:"time_modified,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 '-'. Names cannot be a UUID though they may contain a UUID.
	DnsName string `json:"dns_name,omitempty" yaml:"dns_name,omitempty"`
	// IPv6Prefix is the IPv6 prefix for this VPC.
	//
	// All IPv6 subnets created from this VPC must be taken from this range, which sould be a Unique Local Address in the range `fd00::/48`. The default VPC Subnet will have the first `/64` range from this prefix.
	IPv6Prefix IPv6Net `json:"ipv6_prefix,omitempty" yaml:"ipv6_prefix,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 '-'. Names cannot be a UUID though they may contain a UUID.
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
}

VPCCreate is create-time parameters for a [`Vpc`](crate::external_api::views::Vpc)

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 VPCUpdate

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

VPCUpdate is updateable properties of a [`Vpc`](crate::external_api::views::Vpc)

type VPCsService added in v0.0.7

type VPCsService service

VPCsService: A Virtual Private Cloud (VPC) is an isolated network environment that should probaby be moved into a more generic networking tag

func (*VPCsService) FirewallRulesUpdate added in v0.0.20

func (s *VPCsService) FirewallRulesUpdate(organizationName string, projectName string, vpcName string, j *FirewallRuleUpdateParams) (*FirewallRules, error)

FirewallRulesUpdate: Replace firewall rules

Parameters:

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

func (*VPCsService) FirewallRulesView added in v0.0.20

func (s *VPCsService) FirewallRulesView(organizationName string, projectName string, vpcName string) (*FirewallRules, error)

FirewallRulesView: List firewall rules

Parameters:

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

func (*VPCsService) RouteCreate added in v0.0.20

func (s *VPCsService) RouteCreate(organizationName string, projectName string, routerName string, vpcName string, j *RouteCreate) (*Route, error)

Parameters:

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

func (*VPCsService) RouteDelete added in v0.0.20

func (s *VPCsService) RouteDelete(organizationName string, projectName string, routeName string, routerName string, vpcName string) error

RouteDelete: Delete a route

Parameters:

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

func (*VPCsService) RouteList added in v0.0.20

func (s *VPCsService) RouteList(limit int, pageToken string, sortBy NameSortMode, organizationName string, projectName string, routerName string, vpcName string) (*RouteResultsPage, error)

RouteList: List routes

List the routes associated with a router in a particular VPC.

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

Parameters:

  • `limit`: Maximum number of items returned by a single call
  • `organizationName`
  • `pageToken`: Token returned by previous call to retrieve the subsequent page
  • `projectName`
  • `routerName`
  • `sortBy`
  • `vpcName`

func (*VPCsService) RouteListAllPages added in v0.0.20

func (s *VPCsService) RouteListAllPages(sortBy NameSortMode, organizationName string, projectName string, routerName string, vpcName string) (*[]Route, error)

RouteListAllPages: List routes

List the routes associated with a router in a particular VPC.

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

Parameters:

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

func (*VPCsService) RouteUpdate added in v0.0.20

func (s *VPCsService) RouteUpdate(organizationName string, projectName string, routeName string, routerName string, vpcName string, j *RouteUpdate) (*Route, error)

RouteUpdate: Update a route

Parameters:

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

func (*VPCsService) RouteView added in v0.0.20

func (s *VPCsService) RouteView(organizationName string, projectName string, routeName string, routerName string, vpcName string) (*Route, error)

RouteView: Fetch a route

Parameters:

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

func (*VPCsService) RouteViewById added in v0.0.20

func (s *VPCsService) RouteViewById(id string) (*Route, error)

RouteViewById: Fetch a route by id

Parameters:

  • `id`

func (*VPCsService) RouterCreate added in v0.0.20

func (s *VPCsService) RouterCreate(organizationName string, projectName string, vpcName string, j *RouterCreate) (*Router, error)

Parameters:

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

func (*VPCsService) RouterDelete added in v0.0.20

func (s *VPCsService) RouterDelete(organizationName string, projectName string, routerName string, vpcName string) error

RouterDelete: Delete a router

Parameters:

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

func (*VPCsService) RouterList added in v0.0.20

func (s *VPCsService) RouterList(limit int, pageToken string, sortBy NameSortMode, organizationName string, projectName string, vpcName string) (*RouterResultsPage, error)

RouterList: List routers

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

Parameters:

  • `limit`: Maximum number of items returned by a single call
  • `organizationName`
  • `pageToken`: Token returned by previous call to retrieve the subsequent page
  • `projectName`
  • `sortBy`
  • `vpcName`

func (*VPCsService) RouterListAllPages added in v0.0.20

func (s *VPCsService) RouterListAllPages(sortBy NameSortMode, organizationName string, projectName string, vpcName string) (*[]Router, error)

RouterListAllPages: List routers

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

Parameters:

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

func (*VPCsService) RouterUpdate added in v0.0.20

func (s *VPCsService) RouterUpdate(organizationName string, projectName string, routerName string, vpcName string, j *RouterUpdate) (*Router, error)

RouterUpdate: Update a router

Parameters:

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

func (*VPCsService) RouterView added in v0.0.20

func (s *VPCsService) RouterView(organizationName string, projectName string, routerName string, vpcName string) (*Router, error)

RouterView: Get a router

Parameters:

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

func (*VPCsService) RouterViewById added in v0.0.20

func (s *VPCsService) RouterViewById(id string) (*Router, error)

RouterViewById: Get a router by id

Parameters:

  • `id`

func (*VPCsService) SubnetCreate added in v0.0.20

func (s *VPCsService) SubnetCreate(organizationName string, projectName string, vpcName string, j *SubnetCreate) (*Subnet, error)

Parameters:

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

func (*VPCsService) SubnetDelete added in v0.0.20

func (s *VPCsService) SubnetDelete(organizationName string, projectName string, subnetName string, vpcName string) error

SubnetDelete: Delete a subnet

Parameters:

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

func (*VPCsService) SubnetList added in v0.0.20

func (s *VPCsService) SubnetList(limit int, pageToken string, sortBy NameSortMode, organizationName string, projectName string, vpcName string) (*SubnetResultsPage, error)

SubnetList: List subnets

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

Parameters:

  • `limit`: Maximum number of items returned by a single call
  • `organizationName`
  • `pageToken`: Token returned by previous call to retrieve the subsequent page
  • `projectName`
  • `sortBy`
  • `vpcName`

func (*VPCsService) SubnetListAllPages added in v0.0.20

func (s *VPCsService) SubnetListAllPages(sortBy NameSortMode, organizationName string, projectName string, vpcName string) (*[]Subnet, error)

SubnetListAllPages: List subnets

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

Parameters:

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

func (*VPCsService) SubnetListNetworkInterfaces added in v0.0.20

func (s *VPCsService) SubnetListNetworkInterfaces(limit int, pageToken string, sortBy NameSortMode, organizationName string, projectName string, subnetName string, vpcName string) (*NetworkInterfaceResultsPage, error)

SubnetListNetworkInterfaces: List network interfaces

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

Parameters:

  • `limit`: Maximum number of items returned by a single call
  • `organizationName`
  • `pageToken`: Token returned by previous call to retrieve the subsequent page
  • `projectName`
  • `sortBy`
  • `subnetName`
  • `vpcName`

func (*VPCsService) SubnetListNetworkInterfacesAllPages added in v0.0.20

func (s *VPCsService) SubnetListNetworkInterfacesAllPages(sortBy NameSortMode, organizationName string, projectName string, subnetName string, vpcName string) (*[]NetworkInterface, error)

SubnetListNetworkInterfacesAllPages: List network interfaces

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

Parameters:

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

func (*VPCsService) SubnetUpdate added in v0.0.20

func (s *VPCsService) SubnetUpdate(organizationName string, projectName string, subnetName string, vpcName string, j *SubnetUpdate) (*Subnet, error)

SubnetUpdate: Update a subnet

Parameters:

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

func (*VPCsService) SubnetView added in v0.0.20

func (s *VPCsService) SubnetView(organizationName string, projectName string, subnetName string, vpcName string) (*Subnet, error)

SubnetView: Fetch a subnet

Parameters:

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

func (*VPCsService) SubnetViewById added in v0.0.20

func (s *VPCsService) SubnetViewById(id string) (*Subnet, error)

SubnetViewById: Fetch a subnet by id

Parameters:

  • `id`

func (*VPCsService) VPCCreate added in v0.0.20

func (s *VPCsService) VPCCreate(organizationName string, projectName string, j *VPCCreate) (*VPC, error)

Parameters:

  • `organizationName`: The organization's unique name.
  • `projectName`: The project's unique name within the organization.

func (*VPCsService) VPCDelete added in v0.0.20

func (s *VPCsService) VPCDelete(organizationName string, projectName string, vpcName string) error

VPCDelete: Delete a VPC

Parameters:

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

func (*VPCsService) VPCList added in v0.0.20

func (s *VPCsService) VPCList(limit int, pageToken string, sortBy NameSortMode, organizationName string, projectName string) (*VPCResultsPage, error)

VPCList: List VPCs

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

Parameters:

  • `limit`: Maximum number of items returned by a single call
  • `organizationName`: The organization's unique name.
  • `pageToken`: Token returned by previous call to retrieve the subsequent page
  • `projectName`: The project's unique name within the organization.
  • `sortBy`

func (*VPCsService) VPCListAllPages added in v0.0.20

func (s *VPCsService) VPCListAllPages(sortBy NameSortMode, organizationName string, projectName string) (*[]VPC, error)

VPCListAllPages: List VPCs

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

Parameters:

  • `organizationName`: The organization's unique name.
  • `projectName`: The project's unique name within the organization.
  • `sortBy`

func (*VPCsService) VPCUpdate added in v0.0.20

func (s *VPCsService) VPCUpdate(organizationName string, projectName string, vpcName string, j *VPCUpdate) (*VPC, error)

VPCUpdate: Update a VPC

Parameters:

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

func (*VPCsService) VPCView added in v0.0.20

func (s *VPCsService) VPCView(organizationName string, projectName string, vpcName string) (*VPC, error)

VPCView: Fetch a VPC

Parameters:

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

func (*VPCsService) VPCViewById added in v0.0.20

func (s *VPCsService) VPCViewById(id string) (*VPC, error)

VPCViewById: Fetch a VPC

Parameters:

  • `id`

Jump to

Keyboard shortcuts

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