yandexcloud

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 23, 2025 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyRequestOptions

func ApplyRequestOptions(req *http.Request, userAgent, endpointOverride *string)

ApplyRequestOptions applies user-agent and endpoint override to http.Request.

func DoWithRetry

func DoWithRetry(ctx context.Context, client *http.Client, reqFactory func() *http.Request, retryCount int, timeoutSec int64) (*http.Response, error)

DoWithRetry performs HTTP request with retry support for temporary errors (5xx, 429). ctx - context for logging and cancellation, retryCount - number of attempts (>=1), timeoutSec - timeout for each attempt. reqFactory - function returning new *http.Request for each attempt.

func GetHTTPClient

func GetHTTPClient(timeoutSec int64) *http.Client

GetHTTPClient returns http.Client with the specified timeout (seconds).

func HandleHTTPError

func HandleHTTPError(resp *http.Response, ignoreCodes ...int) error

HandleHTTPError centrally handles HTTP response errors. ignoreCodes - list of codes that are considered not an error (e.g., 404, 403).

func LogDebug

func LogDebug(ctx context.Context, format string, args ...interface{})

LogDebug logs debug messages, falling back to log.Printf if logger is missing.

func LogError

func LogError(ctx context.Context, format string, args ...interface{})

LogError logs error messages, falling back to log.Printf if logger is missing.

func LogInfo

func LogInfo(ctx context.Context, format string, args ...interface{})

LogInfo logs info messages, falling back to log.Printf if logger is missing.

func Plugin

func Plugin() *plugin.Plugin

Plugin returns the top-level plugin definition used by Steampipe.

func SetLogLevelFromConfig

func SetLogLevelFromConfig(cfg *Config)

func ShouldLog

func ShouldLog(level LogLevel) bool

func ValidateConfig

func ValidateConfig(cfg *Config) error

ValidateConfig checks required and conflicting config parameters.

Types

type AddressRequirements

type AddressRequirements struct {
	DdosProtectionProvider string `json:"ddosProtectionProvider"`
	OutgoingSmtpCapability string `json:"outgoingSmtpCapability"`
}

type AuthError

type AuthError string

Strict error type for authentication

func (AuthError) Error

func (e AuthError) Error() string

type BillingAccount

type BillingAccount struct {
	Id          string            `json:"id"`
	Name        string            `json:"name"`
	CreatedAt   string            `json:"createdAt"`
	CountryCode string            `json:"countryCode"`
	Balance     string            `json:"balance"`
	Currency    string            `json:"currency"`
	Active      bool              `json:"active"`
	Labels      map[string]string `json:"labels"`
}

BillingAccount describes the structure of a Yandex Cloud billing account Used in the REST client, tables, and tests

type BillingAccountsResponse

type BillingAccountsResponse struct {
	BillingAccounts []BillingAccount `json:"billingAccounts"`
}

type BillingClient

type BillingClient interface {
	ListBillingAccounts(ctx context.Context, token, pageToken string, pageSize int64, timeoutSec int64) ([]*BillingAccount, string, error)
	GetBillingAccount(ctx context.Context, token, accountID string, timeoutSec int64) (*BillingAccount, error)
}

func NewBillingClient

func NewBillingClient() BillingClient

type ClientError

type ClientError string

Strict error type for client.go

func (ClientError) Error

func (e ClientError) Error() string

type CloudID

type CloudID string

Strict types for identifiers and parameters

type ComputeClient

type ComputeClient interface {
	ListInstances(ctx context.Context, folderID FolderID, filter Filter, pageToken PageToken, pageSize PageSize, timeout TimeoutSec, retry RetryCount) ([]*Instance, PageToken, error)
	GetInstance(ctx context.Context, instanceID InstanceID, timeout TimeoutSec, retry RetryCount) (*Instance, error)
	ListSnapshots(ctx context.Context, folderID FolderID, filter Filter, pageToken PageToken, pageSize PageSize, timeout TimeoutSec, retry RetryCount) ([]*Snapshot, PageToken, error)
	GetSnapshot(ctx context.Context, snapshotID SnapshotID, timeout TimeoutSec, retry RetryCount) (*Snapshot, error)
	ListImages(ctx context.Context, folderID FolderID, filter Filter, pageToken PageToken, pageSize PageSize, timeout TimeoutSec, retry RetryCount) ([]*Image, PageToken, error)
	GetImage(ctx context.Context, imageID ImageID, timeout TimeoutSec, retry RetryCount) (*Image, error)
	ListDisks(ctx context.Context, folderID FolderID, filter Filter, pageToken PageToken, pageSize PageSize, timeout TimeoutSec, retry RetryCount) ([]*Disk, PageToken, error)
	GetDisk(ctx context.Context, diskID DiskID, timeout TimeoutSec, retry RetryCount) (*Disk, error)
	ListFilesystems(ctx context.Context, folderID FolderID, filter Filter, pageToken PageToken, pageSize PageSize, timeout TimeoutSec, retry RetryCount) ([]*Filesystem, PageToken, error)
	GetFilesystem(ctx context.Context, filesystemID FilesystemID, timeout TimeoutSec, retry RetryCount) (*Filesystem, error)
	ListPlacementGroups(ctx context.Context, folderID FolderID, filter Filter, pageToken PageToken, pageSize PageSize, timeout TimeoutSec, retry RetryCount) ([]*PlacementGroup, PageToken, error)
	GetPlacementGroup(ctx context.Context, placementGroupID PlacementGroupID, timeout TimeoutSec, retry RetryCount) (*PlacementGroup, error)
	ListHostGroups(ctx context.Context, folderID FolderID, filter Filter, pageToken PageToken, pageSize PageSize, timeout TimeoutSec, retry RetryCount) ([]*HostGroup, PageToken, error)
	GetHostGroup(ctx context.Context, hostGroupID HostGroupID, timeout TimeoutSec, retry RetryCount) (*HostGroup, error)
	ListGPUClusters(ctx context.Context, folderID FolderID, filter Filter, pageToken PageToken, pageSize PageSize, timeout TimeoutSec, retry RetryCount) ([]*GPUCluster, PageToken, error)
	GetGPUCluster(ctx context.Context, gpuClusterID GPUClusterID, timeout TimeoutSec, retry RetryCount) (*GPUCluster, error)
	ListDiskPlacementGroups(ctx context.Context, folderID FolderID, filter Filter, pageToken PageToken, pageSize PageSize, timeout TimeoutSec, retry RetryCount) ([]*DiskPlacementGroup, PageToken, error)
	GetDiskPlacementGroup(ctx context.Context, diskPlacementGroupID DiskPlacementGroupID, timeout TimeoutSec, retry RetryCount) (*DiskPlacementGroup, error)
	ListSnapshotSchedules(ctx context.Context, folderID FolderID, filter Filter, pageToken PageToken, pageSize PageSize, timeout TimeoutSec, retry RetryCount) ([]*SnapshotSchedule, PageToken, error)
	GetSnapshotSchedule(ctx context.Context, snapshotScheduleID SnapshotScheduleID, timeout TimeoutSec, retry RetryCount) (*SnapshotSchedule, error)
	ListReservedInstancePools(ctx context.Context, folderID FolderID, filter Filter, pageToken PageToken, pageSize PageSize, timeout TimeoutSec, retry RetryCount) ([]*ReservedInstancePool, PageToken, error)
	GetReservedInstancePool(ctx context.Context, reservedInstancePoolID ReservedInstancePoolID, timeout TimeoutSec, retry RetryCount) (*ReservedInstancePool, error)
	ListZones(ctx context.Context, pageToken PageToken, pageSize PageSize, timeout TimeoutSec, retry RetryCount) ([]*Zone, PageToken, error)
	ListDiskTypes(ctx context.Context, zoneID string, pageToken PageToken, pageSize PageSize, timeout TimeoutSec, retry RetryCount) ([]*DiskType, PageToken, error)
	ListHostTypes(ctx context.Context, zoneID string, pageToken PageToken, pageSize PageSize, timeout TimeoutSec, retry RetryCount) ([]*HostType, PageToken, error)
	ListOperations(ctx context.Context, folderID FolderID, filter Filter, pageToken PageToken, pageSize PageSize, timeout TimeoutSec, retry RetryCount) ([]*Operation, PageToken, error)
	GetOperation(ctx context.Context, operationID OperationID, timeout TimeoutSec, retry RetryCount) (*Operation, error)
	Token() string
}

func NewComputeClient

func NewComputeClient(token string, timeoutSec int64, config *Config) ComputeClient

type Config

type Config struct {
	Token                 *Token            `cty:"token"`
	ServiceAccountKeyFile *string           `cty:"service_account_key_file"`
	CloudID               *CloudID          `cty:"cloud_id"`
	FolderID              *FolderID         `cty:"folder_id"`
	Timeout               *int              `cty:"timeout"`
	Retry                 *int              `cty:"retry"`
	UserAgent             *UserAgent        `cty:"user_agent"`
	EndpointOverride      *EndpointOverride `cty:"endpoint_override"`
	LogLevel              *LogLevel         `cty:"log_level"`
}

func GetConfig

func GetConfig(conn *plugin.Connection) *Config

GetConfig is syntactic sugar to cast connection config.

type ConfigError

type ConfigError string

Strict error type for configs

func (ConfigError) Error

func (e ConfigError) Error() string

type Disk

type Disk struct {
	Id               string            `json:"id"`
	Name             string            `json:"name"`
	Description      string            `json:"description"`
	FolderId         string            `json:"folderId"`
	ZoneId           string            `json:"zoneId"`
	TypeId           string            `json:"typeId"`
	Size             string            `json:"size"`
	Status           string            `json:"status"`
	CreatedAt        string            `json:"createdAt"`
	SourceImageId    string            `json:"sourceImageId"`
	SourceSnapshotId string            `json:"sourceSnapshotId"`
	BlockSize        string            `json:"blockSize"`
	Labels           map[string]string `json:"labels"`
}

type DiskID

type DiskID string

type DiskPlacementGroup

type DiskPlacementGroup struct {
	Id          string            `json:"id"`
	Name        string            `json:"name"`
	Description string            `json:"description"`
	FolderId    string            `json:"folderId"`
	ZoneId      string            `json:"zoneId"`
	Type        string            `json:"type"`
	Status      string            `json:"status"`
	CreatedAt   string            `json:"createdAt"`
	Labels      map[string]string `json:"labels"`
}

type DiskPlacementGroupID

type DiskPlacementGroupID string

type DiskType

type DiskType struct {
	Id          string `json:"id"`
	ZoneId      string `json:"zoneId"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

type DiskTypeID

type DiskTypeID string

type DnsRecord

type DnsRecord struct {
	Fqdn      string `json:"fqdn"`
	DnsZoneId string `json:"dnsZoneId"`
	Ttl       string `json:"ttl"`
	Ptr       bool   `json:"ptr"`
}

type EndpointOverride

type EndpointOverride string

type ExternalIpv4Address

type ExternalIpv4Address struct {
	Address      string               `json:"address"`
	ZoneId       string               `json:"zoneId"`
	Requirements *AddressRequirements `json:"requirements,omitempty"`
}

type Filesystem

type Filesystem struct {
	Id          string            `json:"id"`
	Name        string            `json:"name"`
	Description string            `json:"description"`
	FolderId    string            `json:"folderId"`
	ZoneId      string            `json:"zoneId"`
	TypeId      string            `json:"typeId"`
	Size        string            `json:"size"`
	Status      string            `json:"status"`
	CreatedAt   string            `json:"createdAt"`
	Labels      map[string]string `json:"labels"`
}

type FilesystemID

type FilesystemID string

type Filter

type Filter string

type FolderID

type FolderID string

type GPUCluster

type GPUCluster struct {
	Id          string            `json:"id"`
	Name        string            `json:"name"`
	Description string            `json:"description"`
	FolderId    string            `json:"folderId"`
	ZoneId      string            `json:"zoneId"`
	Type        string            `json:"type"`
	Status      string            `json:"status"`
	CreatedAt   string            `json:"createdAt"`
	Labels      map[string]string `json:"labels"`
}

type GPUClusterID

type GPUClusterID string

type GetBillingAccountResponse

type GetBillingAccountResponse struct {
	BillingAccount *BillingAccount `json:"billingAccount"`
}

type GetDiskPlacementGroupResponse

type GetDiskPlacementGroupResponse struct {
	DiskPlacementGroup *DiskPlacementGroup `json:"diskPlacementGroup"`
}

type GetDiskResponse

type GetDiskResponse struct {
	Disk *Disk `json:"disk"`
}

type GetFilesystemResponse

type GetFilesystemResponse struct {
	Filesystem *Filesystem `json:"filesystem"`
}

type GetGPUClusterResponse

type GetGPUClusterResponse struct {
	GPUCluster *GPUCluster `json:"gpuCluster"`
}

type GetHostGroupResponse

type GetHostGroupResponse struct {
	HostGroup *HostGroup `json:"hostGroup"`
}

type GetImageResponse

type GetImageResponse struct {
	Image *Image `json:"image"`
}

type GetInstanceResponse

type GetInstanceResponse struct {
	Instance *Instance `json:"instance"`
}

type GetOperationResponse

type GetOperationResponse struct {
	Operation *Operation `json:"operation"`
}

type GetPlacementGroupResponse

type GetPlacementGroupResponse struct {
	PlacementGroup *PlacementGroup `json:"placementGroup"`
}

type GetReservedInstancePoolResponse

type GetReservedInstancePoolResponse struct {
	ReservedInstancePool *ReservedInstancePool `json:"reservedInstancePool"`
}

type GetSnapshotResponse

type GetSnapshotResponse struct {
	Snapshot *Snapshot `json:"snapshot"`
}

type GetSnapshotScheduleResponse

type GetSnapshotScheduleResponse struct {
	SnapshotSchedule *SnapshotSchedule `json:"snapshotSchedule"`
}

type GetVPCAddressResponse

type GetVPCAddressResponse struct {
	Address *VPCAddress `json:"address"`
}

type GetVPCGatewayResponse

type GetVPCGatewayResponse struct {
	Gateway *VPCGateway `json:"gateway"`
}

type GetVPCNetworkResponse

type GetVPCNetworkResponse struct {
	Network *VPCNetwork `json:"network"`
}

type GetVPCOperationResponse

type GetVPCOperationResponse struct {
	Operation *VPCOperation `json:"operation"`
}

type GetVPCRouteTableResponse

type GetVPCRouteTableResponse struct {
	RouteTable *VPCRouteTable `json:"routeTable"`
}

type GetVPCSecurityGroupResponse

type GetVPCSecurityGroupResponse struct {
	SecurityGroup *VPCSecurityGroup `json:"securityGroup"`
}

type GetVPCSubnetResponse

type GetVPCSubnetResponse struct {
	Subnet *VPCSubnet `json:"subnet"`
}

type HostGroup

type HostGroup struct {
	Id          string            `json:"id"`
	Name        string            `json:"name"`
	Description string            `json:"description"`
	FolderId    string            `json:"folderId"`
	ZoneId      string            `json:"zoneId"`
	Type        string            `json:"type"`
	Status      string            `json:"status"`
	CreatedAt   string            `json:"createdAt"`
	Labels      map[string]string `json:"labels"`
}

type HostGroupID

type HostGroupID string

type HostType

type HostType struct {
	Id          string `json:"id"`
	ZoneId      string `json:"zoneId"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

type HostTypeID

type HostTypeID string

type Hostname

type Hostname string

type Image

type Image struct {
	Id          string            `json:"id"`
	Name        string            `json:"name"`
	Description string            `json:"description"`
	FolderId    string            `json:"folderId"`
	Family      string            `json:"family"`
	ProductIds  []string          `json:"productIds"`
	Status      string            `json:"status"`
	CreatedAt   string            `json:"createdAt"`
	MinDiskSize string            `json:"minDiskSize"`
	Size        string            `json:"size"`
	OsType      string            `json:"osType"`
	OsVersion   string            `json:"osVersion"`
	Labels      map[string]string `json:"labels"`
}

type ImageID

type ImageID string

type Instance

type Instance struct {
	Id                 string                       `json:"id"`
	Name               string                       `json:"name"`
	ZoneId             ZoneID                       `json:"zoneId"`
	Status             Status                       `json:"status"`
	FolderId           string                       `json:"folderId"`
	Description        string                       `json:"description"`
	Labels             map[string]string            `json:"labels"`
	PlatformId         PlatformID                   `json:"platformId"`
	CreatedAt          string                       `json:"createdAt"`
	Resources          map[ResourceType]interface{} `json:"resources"`
	Metadata           map[MetadataKey]string       `json:"metadata"`
	MetadataOptions    map[string]interface{}       `json:"metadataOptions"`
	BootDisk           map[string]interface{}       `json:"bootDisk"`
	SecondaryDisks     []map[string]interface{}     `json:"secondaryDisks"`
	NetworkInterfaces  []map[string]interface{}     `json:"networkInterfaces"`
	FQDN               string                       `json:"fqdn"`
	ServiceAccountId   ServiceAccountID             `json:"serviceAccountId"`
	Hostname           Hostname                     `json:"hostname"`
	DeletionProtection bool                         `json:"deletionProtection"`
}

type InstanceID

type InstanceID string

type ListBillingAccountsResponse

type ListBillingAccountsResponse struct {
	BillingAccounts []*BillingAccount `json:"billingAccounts"`
	NextPageToken   string            `json:"nextPageToken"`
}

type ListDiskPlacementGroupsResponse

type ListDiskPlacementGroupsResponse struct {
	DiskPlacementGroups []*DiskPlacementGroup `json:"diskPlacementGroups"`
	NextPageToken       string                `json:"nextPageToken"`
}

type ListDiskTypesResponse

type ListDiskTypesResponse struct {
	DiskTypes     []*DiskType `json:"diskTypes"`
	NextPageToken string      `json:"nextPageToken"`
}

type ListDisksResponse

type ListDisksResponse struct {
	Disks         []*Disk `json:"disks"`
	NextPageToken string  `json:"nextPageToken"`
}

type ListFilesystemsResponse

type ListFilesystemsResponse struct {
	Filesystems   []*Filesystem `json:"filesystems"`
	NextPageToken string        `json:"nextPageToken"`
}

type ListGPUClustersResponse

type ListGPUClustersResponse struct {
	GPUClusters   []*GPUCluster `json:"gpuClusters"`
	NextPageToken string        `json:"nextPageToken"`
}

type ListHostGroupsResponse

type ListHostGroupsResponse struct {
	HostGroups    []*HostGroup `json:"hostGroups"`
	NextPageToken string       `json:"nextPageToken"`
}

type ListHostTypesResponse

type ListHostTypesResponse struct {
	HostTypes     []*HostType `json:"hostTypes"`
	NextPageToken string      `json:"nextPageToken"`
}

type ListImagesResponse

type ListImagesResponse struct {
	Images        []*Image `json:"images"`
	NextPageToken string   `json:"nextPageToken"`
}

type ListInstancesResponse

type ListInstancesResponse struct {
	Instances     []*Instance `json:"instances"`
	NextPageToken string      `json:"nextPageToken"`
}

type ListOperationsResponse

type ListOperationsResponse struct {
	Operations    []*Operation `json:"operations"`
	NextPageToken string       `json:"nextPageToken"`
}

type ListPlacementGroupsResponse

type ListPlacementGroupsResponse struct {
	PlacementGroups []*PlacementGroup `json:"placementGroups"`
	NextPageToken   string            `json:"nextPageToken"`
}

type ListReservedInstancePoolsResponse

type ListReservedInstancePoolsResponse struct {
	ReservedInstancePools []*ReservedInstancePool `json:"reservedInstancePools"`
	NextPageToken         string                  `json:"nextPageToken"`
}

type ListSnapshotSchedulesResponse

type ListSnapshotSchedulesResponse struct {
	SnapshotSchedules []*SnapshotSchedule `json:"snapshotSchedules"`
	NextPageToken     string              `json:"nextPageToken"`
}

type ListSnapshotsResponse

type ListSnapshotsResponse struct {
	Snapshots     []*Snapshot `json:"snapshots"`
	NextPageToken string      `json:"nextPageToken"`
}

type ListVPCAddressesResponse

type ListVPCAddressesResponse struct {
	Addresses     []*VPCAddress `json:"addresses"`
	NextPageToken string        `json:"nextPageToken"`
}

type ListVPCGatewaysResponse

type ListVPCGatewaysResponse struct {
	Gateways      []*VPCGateway `json:"gateways"`
	NextPageToken string        `json:"nextPageToken"`
}

type ListVPCNetworksResponse

type ListVPCNetworksResponse struct {
	Networks      []*VPCNetwork `json:"networks"`
	NextPageToken string        `json:"nextPageToken"`
}

type ListVPCOperationsResponse

type ListVPCOperationsResponse struct {
	Operations    []*VPCOperation `json:"operations"`
	NextPageToken string          `json:"nextPageToken"`
}

type ListVPCRouteTablesResponse

type ListVPCRouteTablesResponse struct {
	RouteTables   []*VPCRouteTable `json:"routeTables"`
	NextPageToken string           `json:"nextPageToken"`
}

type ListVPCSecurityGroupsResponse

type ListVPCSecurityGroupsResponse struct {
	SecurityGroups []*VPCSecurityGroup `json:"securityGroups"`
	NextPageToken  string              `json:"nextPageToken"`
}

type ListVPCSubnetsResponse

type ListVPCSubnetsResponse struct {
	Subnets       []*VPCSubnet `json:"subnets"`
	NextPageToken string       `json:"nextPageToken"`
}

type ListZonesResponse

type ListZonesResponse struct {
	Zones         []*Zone `json:"zones"`
	NextPageToken string  `json:"nextPageToken"`
}

type LogLevel

type LogLevel string
const (
	LogLevelError LogLevel = "error"
	LogLevelInfo  LogLevel = "info"
	LogLevelDebug LogLevel = "debug"
)

type MetadataKey

type MetadataKey string

type Operation

type Operation struct {
	Id          string                 `json:"id"`
	Description string                 `json:"description"`
	CreatedAt   string                 `json:"createdAt"`
	Done        bool                   `json:"done"`
	Status      string                 `json:"status"`
	FolderId    string                 `json:"folderId"`
	Error       map[string]interface{} `json:"error"`
	Response    map[string]interface{} `json:"response"`
	Metadata    map[string]interface{} `json:"metadata"`
}

type OperationID

type OperationID string

type PageSize

type PageSize int64

type PageToken

type PageToken string

type PlacementGroup

type PlacementGroup struct {
	Id          string            `json:"id"`
	Name        string            `json:"name"`
	Description string            `json:"description"`
	FolderId    string            `json:"folderId"`
	ZoneId      string            `json:"zoneId"`
	Type        string            `json:"type"`
	Status      string            `json:"status"`
	CreatedAt   string            `json:"createdAt"`
	Labels      map[string]string `json:"labels"`
}

type PlacementGroupID

type PlacementGroupID string

type PlatformID

type PlatformID string

type ReservedInstancePool

type ReservedInstancePool struct {
	Id          string            `json:"id"`
	Name        string            `json:"name"`
	Description string            `json:"description"`
	FolderId    string            `json:"folderId"`
	ZoneId      string            `json:"zoneId"`
	Type        string            `json:"type"`
	Status      string            `json:"status"`
	CreatedAt   string            `json:"createdAt"`
	Labels      map[string]string `json:"labels"`
}

type ReservedInstancePoolID

type ReservedInstancePoolID string

type ResourceType

type ResourceType string

type RetryCount

type RetryCount int

type ServiceAccountID

type ServiceAccountID string

type Snapshot

type Snapshot struct {
	Id           string            `json:"id"`
	Name         string            `json:"name"`
	Description  string            `json:"description"`
	FolderId     string            `json:"folderId"`
	ZoneId       string            `json:"zoneId"`
	Status       string            `json:"status"`
	CreatedAt    string            `json:"createdAt"`
	SourceDiskId string            `json:"sourceDiskId"`
	Size         string            `json:"size"`
	Labels       map[string]string `json:"labels"`
}

type SnapshotID

type SnapshotID string

type SnapshotSchedule

type SnapshotSchedule struct {
	Id             string                 `json:"id"`
	Name           string                 `json:"name"`
	Description    string                 `json:"description"`
	FolderId       string                 `json:"folderId"`
	Status         string                 `json:"status"`
	CreatedAt      string                 `json:"createdAt"`
	SchedulePolicy map[string]interface{} `json:"schedulePolicy"`
	Labels         map[string]string      `json:"labels"`
}

type SnapshotScheduleID

type SnapshotScheduleID string

type Status

type Status string
const (
	StatusRunning      Status = "RUNNING"
	StatusStopped      Status = "STOPPED"
	StatusProvisioning Status = "PROVISIONING"
	StatusStarting     Status = "STARTING"
	StatusStopping     Status = "STOPPING"
	StatusUnknown      Status = "UNKNOWN"
)

type TimeoutSec

type TimeoutSec int64

type Token

type Token string

FolderID is declared only here, do not duplicate type FolderID string

type UserAgent

type UserAgent string

type VPCAddress

type VPCAddress struct {
	Id                  string               `json:"id"`
	FolderId            string               `json:"folderId"`
	CreatedAt           string               `json:"createdAt"`
	Name                string               `json:"name"`
	Description         string               `json:"description"`
	Labels              map[string]string    `json:"labels"`
	ExternalIpv4Address *ExternalIpv4Address `json:"externalIpv4Address,omitempty"`
	Reserved            bool                 `json:"reserved"`
	Used                bool                 `json:"used"`
	Type                string               `json:"type"`
	IpVersion           string               `json:"ipVersion"`
	DeletionProtection  bool                 `json:"deletionProtection"`
	DnsRecords          []DnsRecord          `json:"dnsRecords"`
}

--- VPC Address types ---

type VPCAddressID

type VPCAddressID string

type VPCClient

type VPCClient interface {
	ListVPCNetworks(ctx context.Context, folderID string, pageToken string, pageSize int64) ([]*VPCNetwork, string, error)
	GetVPCNetwork(ctx context.Context, networkID VPCNetworkID) (*VPCNetwork, error)
	ListVPCSubnets(ctx context.Context, folderID string, pageToken string, pageSize int64) ([]*VPCSubnet, string, error)
	GetVPCSubnet(ctx context.Context, subnetID VPCSubnetID) (*VPCSubnet, error)
	ListVPCRouteTables(ctx context.Context, folderID string, pageToken string, pageSize int64) ([]*VPCRouteTable, string, error)
	GetVPCRouteTable(ctx context.Context, routeTableID VPCRouteTableID) (*VPCRouteTable, error)
	ListVPCSecurityGroups(ctx context.Context, folderID string, pageToken string, pageSize int64) ([]*VPCSecurityGroup, string, error)
	GetVPCSecurityGroup(ctx context.Context, securityGroupID VPCSecurityGroupID) (*VPCSecurityGroup, error)
	ListVPCAddresses(ctx context.Context, folderID string, pageToken string, pageSize int64) ([]*VPCAddress, string, error)
	GetVPCAddress(ctx context.Context, addressID VPCAddressID) (*VPCAddress, error)
	ListVPCGateways(ctx context.Context, folderID string, pageToken string, pageSize int64) ([]*VPCGateway, string, error)
	GetVPCGateway(ctx context.Context, gatewayID VPCGatewayID) (*VPCGateway, error)
	ListVPCOperations(ctx context.Context, pageToken string, pageSize int64) ([]*VPCOperation, string, error)
	GetVPCOperation(ctx context.Context, operationID VPCOperationID) (*VPCOperation, error)
}

func NewVPCClient

func NewVPCClient(token string, timeoutSec int64, config *Config) VPCClient

type VPCGateway

type VPCGateway struct {
	Id                  string                 `json:"id"`
	FolderId            string                 `json:"folderId"`
	CreatedAt           string                 `json:"createdAt"`
	Name                string                 `json:"name"`
	Description         string                 `json:"description"`
	Labels              map[string]string      `json:"labels"`
	SharedEgressGateway map[string]interface{} `json:"sharedEgressGateway"`
}

--- VPC Gateway types ---

type VPCGatewayID

type VPCGatewayID string

type VPCNetwork

type VPCNetwork struct {
	Id          string            `json:"id"`
	FolderId    string            `json:"folderId"`
	Name        string            `json:"name"`
	Description string            `json:"description"`
	Labels      map[string]string `json:"labels"`
	CreatedAt   string            `json:"createdAt"`
}

type VPCNetworkID

type VPCNetworkID string

type VPCOperation

type VPCOperation struct {
	Id          string                 `json:"id"`
	Description string                 `json:"description"`
	CreatedAt   string                 `json:"createdAt"`
	CreatedBy   string                 `json:"createdBy"`
	ModifiedAt  string                 `json:"modifiedAt"`
	Done        bool                   `json:"done"`
	Metadata    map[string]interface{} `json:"metadata"`
	Error       map[string]interface{} `json:"error"`
	Response    map[string]interface{} `json:"response"`
}

--- VPC Operation types ---

type VPCOperationID

type VPCOperationID string

type VPCRouteTable

type VPCRouteTable struct {
	Id           string                   `json:"id"`
	FolderId     string                   `json:"folderId"`
	NetworkId    string                   `json:"networkId"`
	Name         string                   `json:"name"`
	Description  string                   `json:"description"`
	Labels       map[string]string        `json:"labels"`
	CreatedAt    string                   `json:"createdAt"`
	StaticRoutes []map[string]interface{} `json:"staticRoutes"`
}

type VPCRouteTableID

type VPCRouteTableID string

type VPCSecurityGroup

type VPCSecurityGroup struct {
	Id           string                   `json:"id"`
	FolderId     string                   `json:"folderId"`
	NetworkId    string                   `json:"networkId"`
	Name         string                   `json:"name"`
	Description  string                   `json:"description"`
	Labels       map[string]string        `json:"labels"`
	CreatedAt    string                   `json:"createdAt"`
	Rules        []map[string]interface{} `json:"rules"`
	IngressRules []map[string]interface{} `json:"ingressRules"`
	EgressRules  []map[string]interface{} `json:"egressRules"`
}

type VPCSecurityGroupID

type VPCSecurityGroupID string

type VPCSubnet

type VPCSubnet struct {
	Id          string            `json:"id"`
	FolderId    string            `json:"folderId"`
	NetworkId   string            `json:"networkId"`
	ZoneId      string            `json:"zoneId"`
	Name        string            `json:"name"`
	Description string            `json:"description"`
	Labels      map[string]string `json:"labels"`
	CreatedAt   string            `json:"createdAt"`
	CidrBlocks  []string          `json:"v4CidrBlocks"`
}

type VPCSubnetID

type VPCSubnetID string

type Zone

type Zone struct {
	Id       string `json:"id"`
	RegionId string `json:"regionId"`
	Name     string `json:"name"`
	Status   string `json:"status"`
}

type ZoneID

type ZoneID string

Jump to

Keyboard shortcuts

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