regions

package
v1.79.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const RegionNameUsChi1 = shared.RegionNameUsChi1

Equals "us-chi-1"

View Source
const RegionNameUsSva1 = shared.RegionNameUsSva1

Equals "us-sva-1"

View Source
const RegionNameUsSva2 = shared.RegionNameUsSva2

Equals "us-sva-2"

View Source
const ResourceStatusCreating = shared.ResourceStatusCreating

Equals "creating"

View Source
const ResourceStatusDeleted = shared.ResourceStatusDeleted

Equals "deleted"

View Source
const ResourceStatusDeleting = shared.ResourceStatusDeleting

Equals "deleting"

View Source
const ResourceStatusError = shared.ResourceStatusError

Equals "error"

View Source
const ResourceStatusPending = shared.ResourceStatusPending

Equals "pending"

View Source
const ResourceStatusReady = shared.ResourceStatusReady

Equals "ready"

View Source
const ResourceStatusUpdating = shared.ResourceStatusUpdating

Equals "updating"

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error = apierror.Error

type Pagination

type Pagination = shared.Pagination

Pagination response details.

This is an alias to an internal type.

type Region

type Region struct {
	// Availability status of the region.
	//
	// Any of "live", "preview", "maintenance", "sunset".
	Availability RegionAvailability `json:"availability" api:"required"`
	// Compute products available in this region.
	Compute RegionCompute `json:"compute" api:"required"`
	// Name of the region.
	Name string `json:"name" api:"required"`
	// Networking products available in this region.
	Networking RegionNetworking `json:"networking" api:"required"`
	// NKS products available in this region.
	NKS RegionNKS `json:"nks" api:"required"`
	// Storage products available in this region.
	Storage RegionStorage `json:"storage" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Availability respjson.Field
		Compute      respjson.Field
		Name         respjson.Field
		Networking   respjson.Field
		NKS          respjson.Field
		Storage      respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Region response with product availability.

func (Region) RawJSON

func (r Region) RawJSON() string

Returns the unmodified JSON received from the API

func (*Region) UnmarshalJSON

func (r *Region) UnmarshalJSON(data []byte) error

type RegionAvailability

type RegionAvailability string

Availability status of the region.

const (
	RegionAvailabilityLive        RegionAvailability = "live"
	RegionAvailabilityPreview     RegionAvailability = "preview"
	RegionAvailabilityMaintenance RegionAvailability = "maintenance"
	RegionAvailabilitySunset      RegionAvailability = "sunset"
)

type RegionCompute

type RegionCompute struct {
	// VMs indicates if Virtual Machines are available.
	VMs bool `json:"vms" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		VMs         respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Compute products available in this region.

func (RegionCompute) RawJSON

func (r RegionCompute) RawJSON() string

Returns the unmodified JSON received from the API

func (*RegionCompute) UnmarshalJSON

func (r *RegionCompute) UnmarshalJSON(data []byte) error

type RegionList

type RegionList struct {
	Items []Region `json:"items" api:"required"`
	// Pagination response details.
	Pagination shared.Pagination `json:"pagination" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		Pagination  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (RegionList) RawJSON

func (r RegionList) RawJSON() string

Returns the unmodified JSON received from the API

func (*RegionList) UnmarshalJSON

func (r *RegionList) UnmarshalJSON(data []byte) error

type RegionListParams

type RegionListParams struct {
	// Pagination cursor returned by a previous request
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// Maximum number of items to return
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (RegionListParams) URLQuery

func (r RegionListParams) URLQuery() (v url.Values, err error)

URLQuery serializes RegionListParams's query parameters as `url.Values`.

type RegionNKS added in v1.53.0

type RegionNKS struct {
	// Clusters indicates if NKS managed Kubernetes clusters are available.
	Clusters bool `json:"clusters" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Clusters    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

NKS products available in this region.

func (RegionNKS) RawJSON added in v1.53.0

func (r RegionNKS) RawJSON() string

Returns the unmodified JSON received from the API

func (*RegionNKS) UnmarshalJSON added in v1.53.0

func (r *RegionNKS) UnmarshalJSON(data []byte) error

type RegionName

type RegionName = shared.RegionName

Region the resource is in.

This is an alias to an internal type.

type RegionNetworking

type RegionNetworking struct {
	// Connect indicates if Nirvana Connect is available.
	Connect bool `json:"connect" api:"required"`
	// VPCs indicates if Virtual Private Clouds are available.
	VPCs bool `json:"vpcs" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Connect     respjson.Field
		VPCs        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Networking products available in this region.

func (RegionNetworking) RawJSON

func (r RegionNetworking) RawJSON() string

Returns the unmodified JSON received from the API

func (*RegionNetworking) UnmarshalJSON

func (r *RegionNetworking) UnmarshalJSON(data []byte) error

type RegionService

type RegionService struct {
	Options []option.RequestOption
}

RegionService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRegionService method instead.

func NewRegionService

func NewRegionService(opts ...option.RequestOption) (r RegionService)

NewRegionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*RegionService) Get

func (r *RegionService) Get(ctx context.Context, name string, opts ...option.RequestOption) (res *Region, err error)

Get a region by name

func (*RegionService) List

func (r *RegionService) List(ctx context.Context, query RegionListParams, opts ...option.RequestOption) (res *pagination.Cursor[Region], err error)

List all regions

func (*RegionService) ListAutoPaging

List all regions

type RegionStorage

type RegionStorage struct {
	// ABS indicates if Accelerated Block Storage is available.
	ABS bool `json:"abs" api:"required"`
	// LocalNVMe indicates if locally-attached NVMe storage is available.
	LocalNvme bool `json:"local_nvme" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ABS         respjson.Field
		LocalNvme   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Storage products available in this region.

func (RegionStorage) RawJSON

func (r RegionStorage) RawJSON() string

Returns the unmodified JSON received from the API

func (*RegionStorage) UnmarshalJSON

func (r *RegionStorage) UnmarshalJSON(data []byte) error

type ResourceStatus

type ResourceStatus = shared.ResourceStatus

Status of the resource.

This is an alias to an internal type.

type SourceIPRuleParam added in v1.35.0

type SourceIPRuleParam = shared.SourceIPRuleParam

IP filter rules.

This is an alias to an internal type.

type SourceIPRuleResponse added in v1.54.0

type SourceIPRuleResponse = shared.SourceIPRuleResponse

IP filter rules.

This is an alias to an internal type.

Jump to

Keyboard shortcuts

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