inference

package
v1.0.0-beta.27 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package inference provides methods and message types of the inference v1beta1 API.

Index

Constants

View Source
const (
	DeploymentStatusUnknownStatus = DeploymentStatus("unknown_status")
	DeploymentStatusCreating      = DeploymentStatus("creating")
	DeploymentStatusDeploying     = DeploymentStatus("deploying")
	DeploymentStatusReady         = DeploymentStatus("ready")
	DeploymentStatusError         = DeploymentStatus("error")
	DeploymentStatusDeleting      = DeploymentStatus("deleting")
	DeploymentStatusLocked        = DeploymentStatus("locked")
)
View Source
const (
	ListDeploymentsRequestOrderByCreatedAtDesc = ListDeploymentsRequestOrderBy("created_at_desc")
	ListDeploymentsRequestOrderByCreatedAtAsc  = ListDeploymentsRequestOrderBy("created_at_asc")
	ListDeploymentsRequestOrderByNameAsc       = ListDeploymentsRequestOrderBy("name_asc")
	ListDeploymentsRequestOrderByNameDesc      = ListDeploymentsRequestOrderBy("name_desc")
)
View Source
const (
	ListModelsRequestOrderByCreatedAtAsc  = ListModelsRequestOrderBy("created_at_asc")
	ListModelsRequestOrderByCreatedAtDesc = ListModelsRequestOrderBy("created_at_desc")
	ListModelsRequestOrderByNameAsc       = ListModelsRequestOrderBy("name_asc")
	ListModelsRequestOrderByNameDesc      = ListModelsRequestOrderBy("name_desc")
)
View Source
const (
	NodeTypeStockUnknownStock = NodeTypeStock("unknown_stock")
	NodeTypeStockLowStock     = NodeTypeStock("low_stock")
	NodeTypeStockOutOfStock   = NodeTypeStock("out_of_stock")
	NodeTypeStockAvailable    = NodeTypeStock("available")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ACLRule

type ACLRule struct {
	// ID: unique identifier.
	ID string `json:"id"`

	// IP: allowed IP address or CIDR range.
	IP scw.IPNet `json:"ip"`

	// Description: description of the ACL rule.
	Description string `json:"description"`
}

ACLRule: acl rule.

type ACLRuleRequest

type ACLRuleRequest struct {
	// IP: it can be specified as a single IP address or a range of IP addresses in CIDR notation.
	IP scw.IPNet `json:"ip"`

	// Description: description of the ACL rule.
	Description string `json:"description"`
}

ACLRuleRequest: acl rule request.

type API

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

This API allows you to manage your Inference services.

func NewAPI

func NewAPI(client *scw.Client) *API

NewAPI returns a API object from a Scaleway client.

func (*API) AddDeploymentACLRules

func (s *API) AddDeploymentACLRules(req *AddDeploymentACLRulesRequest, opts ...scw.RequestOption) (*AddDeploymentACLRulesResponse, error)

AddDeploymentACLRules: Add new ACL rules for a specific deployment.

func (*API) CreateDeployment

func (s *API) CreateDeployment(req *CreateDeploymentRequest, opts ...scw.RequestOption) (*Deployment, error)

CreateDeployment: Create a new inference deployment related to a specific model.

func (*API) CreateEndpoint

func (s *API) CreateEndpoint(req *CreateEndpointRequest, opts ...scw.RequestOption) (*Endpoint, error)

CreateEndpoint: Create a new Endpoint related to a specific deployment.

func (*API) DeleteDeployment

func (s *API) DeleteDeployment(req *DeleteDeploymentRequest, opts ...scw.RequestOption) (*Deployment, error)

DeleteDeployment: Delete an existing inference deployment.

func (*API) DeleteDeploymentACLRule

func (s *API) DeleteDeploymentACLRule(req *DeleteDeploymentACLRuleRequest, opts ...scw.RequestOption) error

DeleteDeploymentACLRule: Delete an exising ACL.

func (*API) DeleteEndpoint

func (s *API) DeleteEndpoint(req *DeleteEndpointRequest, opts ...scw.RequestOption) error

DeleteEndpoint: Delete an existing Endpoint.

func (*API) GetDeployment

func (s *API) GetDeployment(req *GetDeploymentRequest, opts ...scw.RequestOption) (*Deployment, error)

GetDeployment: Get the deployment for the given ID.

func (*API) GetDeploymentCertificate

func (s *API) GetDeploymentCertificate(req *GetDeploymentCertificateRequest, opts ...scw.RequestOption) (*scw.File, error)

GetDeploymentCertificate: Get the CA certificate used for the deployment of private endpoints. The CA certificate will be returned as a PEM file.

func (*API) GetModel

func (s *API) GetModel(req *GetModelRequest, opts ...scw.RequestOption) (*Model, error)

GetModel: Get the model for the given ID.

func (*API) GetModelEula

func (s *API) GetModelEula(req *GetModelEulaRequest, opts ...scw.RequestOption) (*Eula, error)

GetModelEula:

func (*API) ListDeploymentACLRules

func (s *API) ListDeploymentACLRules(req *ListDeploymentACLRulesRequest, opts ...scw.RequestOption) (*ListDeploymentACLRulesResponse, error)

ListDeploymentACLRules: List ACLs for a specific deployment.

func (*API) ListDeployments

func (s *API) ListDeployments(req *ListDeploymentsRequest, opts ...scw.RequestOption) (*ListDeploymentsResponse, error)

ListDeployments: List all your inference deployments.

func (*API) ListModels

func (s *API) ListModels(req *ListModelsRequest, opts ...scw.RequestOption) (*ListModelsResponse, error)

ListModels: List all available models.

func (*API) ListNodeTypes

func (s *API) ListNodeTypes(req *ListNodeTypesRequest, opts ...scw.RequestOption) (*ListNodeTypesResponse, error)

ListNodeTypes: List all available node types. By default, the node types returned in the list are ordered by creation date in ascending order, though this can be modified via the `order_by` field.

func (*API) Regions

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

func (*API) SetDeploymentACLRules

func (s *API) SetDeploymentACLRules(req *SetDeploymentACLRulesRequest, opts ...scw.RequestOption) (*SetDeploymentACLRulesResponse, error)

SetDeploymentACLRules: Set new ACL rules for a specific deployment.

func (*API) UpdateDeployment

func (s *API) UpdateDeployment(req *UpdateDeploymentRequest, opts ...scw.RequestOption) (*Deployment, error)

UpdateDeployment: Update an existing inference deployment.

func (*API) UpdateEndpoint

func (s *API) UpdateEndpoint(req *UpdateEndpointRequest, opts ...scw.RequestOption) (*Endpoint, error)

UpdateEndpoint: Update an existing Endpoint.

func (*API) WaitForDeployment

func (s *API) WaitForDeployment(req *WaitForDeploymentRequest, opts ...scw.RequestOption) (*Deployment, error)

type AddDeploymentACLRulesRequest

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

	// DeploymentID: ID of the deployment to add ACL rules to.
	DeploymentID string `json:"-"`

	// ACLs: list of ACL rules to add.
	ACLs []*ACLRuleRequest `json:"acls"`
}

AddDeploymentACLRulesRequest: add deployment acl rules request.

type AddDeploymentACLRulesResponse

type AddDeploymentACLRulesResponse struct {
	// Rules: list of ACL rules added.
	Rules []*ACLRule `json:"rules"`
}

AddDeploymentACLRulesResponse: add deployment acl rules response.

type CreateDeploymentRequest

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

	// Name: name of the deployment.
	Name string `json:"name"`

	// ProjectID: ID of the Project to create the deployment in.
	ProjectID string `json:"project_id"`

	// ModelName: name of the model to use.
	ModelName string `json:"model_name"`

	// AcceptEula: if the model has an EULA, you must accept it before proceeding.
	// The terms of the EULA can be retrieved using the `GetModelEula` API call.
	AcceptEula *bool `json:"accept_eula,omitempty"`

	// NodeType: name of the node type to use.
	NodeType string `json:"node_type"`

	// Tags: list of tags to apply to the deployment.
	Tags []string `json:"tags"`

	// MinSize: defines the minimum size of the pool.
	MinSize *uint32 `json:"min_size,omitempty"`

	// MaxSize: defines the maximum size of the pool.
	MaxSize *uint32 `json:"max_size,omitempty"`

	// Endpoints: list of endpoints to create.
	Endpoints []*EndpointSpec `json:"endpoints"`
}

CreateDeploymentRequest: create deployment request.

type CreateEndpointRequest

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

	// DeploymentID: ID of the deployment to create the endpoint for.
	DeploymentID string `json:"deployment_id"`

	// Endpoint: specification of the endpoint.
	Endpoint *EndpointSpec `json:"endpoint"`
}

CreateEndpointRequest: create endpoint request.

type DeleteDeploymentACLRuleRequest

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

	// ACLID: ID of the ACL rule to delete.
	ACLID string `json:"-"`
}

DeleteDeploymentACLRuleRequest: delete deployment acl rule request.

type DeleteDeploymentRequest

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

	// DeploymentID: ID of the deployment to delete.
	DeploymentID string `json:"-"`
}

DeleteDeploymentRequest: delete deployment request.

type DeleteEndpointRequest

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

	// EndpointID: ID of the endpoint to delete.
	EndpointID string `json:"-"`
}

DeleteEndpointRequest: delete endpoint request.

type Deployment

type Deployment struct {
	// ID: unique identifier.
	ID string `json:"id"`

	// Name: name of the deployment.
	Name string `json:"name"`

	// ProjectID: project ID.
	ProjectID string `json:"project_id"`

	// Status: status of the deployment.
	// Default value: unknown_status
	Status DeploymentStatus `json:"status"`

	// Tags: list of tags applied to the deployment.
	Tags []string `json:"tags"`

	// NodeType: node type of the deployment.
	NodeType string `json:"node_type"`

	// Endpoints: list of endpoints.
	Endpoints []*Endpoint `json:"endpoints"`

	// Size: current size of the pool.
	Size uint32 `json:"size"`

	// MinSize: defines the minimum size of the pool.
	MinSize uint32 `json:"min_size"`

	// MaxSize: defines the maximum size of the pool.
	MaxSize uint32 `json:"max_size"`

	// ErrorMessage: displays information if your deployment is in error state.
	ErrorMessage *string `json:"error_message"`

	// ModelName: the inference model used for the deployment.
	ModelName string `json:"model_name"`

	// CreatedAt: creation date of the deployment.
	CreatedAt *time.Time `json:"created_at"`

	// UpdatedAt: last modification date of the deployment.
	UpdatedAt *time.Time `json:"updated_at"`

	// Region: region of the deployment.
	Region scw.Region `json:"region"`
}

Deployment: deployment.

type DeploymentStatus

type DeploymentStatus string

func (DeploymentStatus) MarshalJSON

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

func (DeploymentStatus) String

func (enum DeploymentStatus) String() string

func (*DeploymentStatus) UnmarshalJSON

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

type Endpoint

type Endpoint struct {
	// ID: unique identifier.
	ID string `json:"id"`

	// URL: for private endpoints, the URL will be accessible only from the Private Network.
	// In addition, private endpoints will expose a CA certificate that can be used to verify the server's identity.
	// This CA certificate can be retrieved using the `GetDeploymentCertificate` API call.
	URL string `json:"url"`

	// PublicAccess: defines whether the endpoint is public.
	// Precisely one of PublicAccess, PrivateNetwork must be set.
	PublicAccess *EndpointPublicAccessDetails `json:"public_access,omitempty"`

	// PrivateNetwork: details of the Private Network.
	// Precisely one of PublicAccess, PrivateNetwork must be set.
	PrivateNetwork *EndpointPrivateNetworkDetails `json:"private_network,omitempty"`

	// DisableAuth: defines whether the authentication is disabled.
	DisableAuth bool `json:"disable_auth"`
}

Endpoint: endpoint.

type EndpointPrivateNetworkDetails

type EndpointPrivateNetworkDetails struct {
	// PrivateNetworkID: ID of the Private Network.
	PrivateNetworkID string `json:"private_network_id"`
}

EndpointPrivateNetworkDetails: endpoint private network details.

type EndpointPublicAccessDetails

type EndpointPublicAccessDetails struct {
}

EndpointPublicAccessDetails: endpoint public access details.

type EndpointSpec

type EndpointSpec struct {
	// Public: set the endpoint as public.
	// Precisely one of Public, PrivateNetwork must be set.
	Public *EndpointSpecPublic `json:"public,omitempty"`

	// PrivateNetwork: private endpoints are only accessible from the Private Network.
	// Precisely one of Public, PrivateNetwork must be set.
	PrivateNetwork *EndpointSpecPrivateNetwork `json:"private_network,omitempty"`

	// DisableAuth: by default, deployments are protected by IAM authentication.
	// When setting this field to true, the authentication will be disabled.
	DisableAuth bool `json:"disable_auth"`
}

EndpointSpec: endpoint spec.

type EndpointSpecPrivateNetwork

type EndpointSpecPrivateNetwork struct {
	// PrivateNetworkID: ID of the Private Network.
	PrivateNetworkID string `json:"private_network_id"`
}

EndpointSpecPrivateNetwork: endpoint spec private network.

type EndpointSpecPublic

type EndpointSpecPublic struct {
}

EndpointSpecPublic: endpoint spec public.

type Eula

type Eula struct {
	// Content: content of the end user licence agreement.
	Content string `json:"content"`
}

Eula: eula.

type GetDeploymentCertificateRequest

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

	DeploymentID string `json:"-"`
}

GetDeploymentCertificateRequest: get deployment certificate request.

type GetDeploymentRequest

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

	// DeploymentID: ID of the deployment to get.
	DeploymentID string `json:"-"`
}

GetDeploymentRequest: get deployment request.

type GetModelEulaRequest

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

	ModelID string `json:"-"`
}

GetModelEulaRequest: get model eula request.

type GetModelRequest

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

	// ModelID: ID of the model to get.
	ModelID string `json:"-"`
}

GetModelRequest: get model request.

type ListDeploymentACLRulesRequest

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

	// DeploymentID: ID of the deployment to list ACL rules for.
	DeploymentID string `json:"-"`

	// Page: page number to return.
	Page *int32 `json:"-"`

	// PageSize: maximum number of ACL rules to return per page.
	PageSize *uint32 `json:"-"`
}

ListDeploymentACLRulesRequest: list deployment acl rules request.

type ListDeploymentACLRulesResponse

type ListDeploymentACLRulesResponse struct {
	// Rules: list of ACL rules on the current page.
	Rules []*ACLRule `json:"rules"`

	// TotalCount: total number of ACL rules.
	TotalCount uint64 `json:"total_count"`
}

ListDeploymentACLRulesResponse: list deployment acl rules response.

func (*ListDeploymentACLRulesResponse) UnsafeAppend

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

UnsafeAppend should not be used Internal usage only

func (*ListDeploymentACLRulesResponse) UnsafeGetTotalCount

func (r *ListDeploymentACLRulesResponse) UnsafeGetTotalCount() uint64

UnsafeGetTotalCount should not be used Internal usage only

type ListDeploymentsRequest

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

	// Page: page number to return.
	Page *int32 `json:"-"`

	// PageSize: maximum number of deployments to return per page.
	PageSize *uint32 `json:"-"`

	// OrderBy: order in which to return results.
	// Default value: created_at_desc
	OrderBy ListDeploymentsRequestOrderBy `json:"-"`

	// ProjectID: filter by Project ID.
	ProjectID *string `json:"-"`

	// OrganizationID: filter by Organization ID.
	OrganizationID *string `json:"-"`

	// Name: filter by deployment name.
	Name *string `json:"-"`

	// Tags: filter by tags.
	Tags []string `json:"-"`
}

ListDeploymentsRequest: list deployments request.

type ListDeploymentsRequestOrderBy

type ListDeploymentsRequestOrderBy string

func (ListDeploymentsRequestOrderBy) MarshalJSON

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

func (ListDeploymentsRequestOrderBy) String

func (enum ListDeploymentsRequestOrderBy) String() string

func (*ListDeploymentsRequestOrderBy) UnmarshalJSON

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

type ListDeploymentsResponse

type ListDeploymentsResponse struct {
	// Deployments: list of deployments on the current page.
	Deployments []*Deployment `json:"deployments"`

	// TotalCount: total number of deployments.
	TotalCount uint64 `json:"total_count"`
}

ListDeploymentsResponse: list deployments response.

func (*ListDeploymentsResponse) UnsafeAppend

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

UnsafeAppend should not be used Internal usage only

func (*ListDeploymentsResponse) UnsafeGetTotalCount

func (r *ListDeploymentsResponse) UnsafeGetTotalCount() uint64

UnsafeGetTotalCount should not be used Internal usage only

type ListModelsRequest

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

	// OrderBy: order in which to return results.
	// Default value: created_at_asc
	OrderBy ListModelsRequestOrderBy `json:"-"`

	// Page: page number to return.
	Page *int32 `json:"-"`

	// PageSize: maximum number of models to return per page.
	PageSize *uint32 `json:"-"`

	// ProjectID: filter by Project ID.
	ProjectID *string `json:"-"`

	// Name: filter by model name.
	Name *string `json:"-"`

	// Tags: filter by tags.
	Tags []string `json:"-"`
}

ListModelsRequest: list models request.

type ListModelsRequestOrderBy

type ListModelsRequestOrderBy string

func (ListModelsRequestOrderBy) MarshalJSON

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

func (ListModelsRequestOrderBy) String

func (enum ListModelsRequestOrderBy) String() string

func (*ListModelsRequestOrderBy) UnmarshalJSON

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

type ListModelsResponse

type ListModelsResponse struct {
	// Models: list of models on the current page.
	Models []*Model `json:"models"`

	// TotalCount: total number of models.
	TotalCount uint64 `json:"total_count"`
}

ListModelsResponse: list models response.

func (*ListModelsResponse) UnsafeAppend

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

UnsafeAppend should not be used Internal usage only

func (*ListModelsResponse) UnsafeGetTotalCount

func (r *ListModelsResponse) UnsafeGetTotalCount() uint64

UnsafeGetTotalCount should not be used Internal usage only

type ListNodeTypesRequest

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

	// Page: page number to return.
	Page *int32 `json:"-"`

	// PageSize: maximum number of node types to return per page.
	PageSize *uint32 `json:"-"`

	// IncludeDisabledTypes: include disabled node types in the response.
	IncludeDisabledTypes bool `json:"-"`
}

ListNodeTypesRequest: list node types request.

type ListNodeTypesResponse

type ListNodeTypesResponse struct {
	// NodeTypes: list of node types.
	NodeTypes []*NodeType `json:"node_types"`

	// TotalCount: total number of node types.
	TotalCount uint64 `json:"total_count"`
}

ListNodeTypesResponse: list node types response.

func (*ListNodeTypesResponse) UnsafeAppend

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

UnsafeAppend should not be used Internal usage only

func (*ListNodeTypesResponse) UnsafeGetTotalCount

func (r *ListNodeTypesResponse) UnsafeGetTotalCount() uint64

UnsafeGetTotalCount should not be used Internal usage only

type Model

type Model struct {
	// ID: unique identifier.
	ID string `json:"id"`

	// Name: unique Name identifier.
	Name string `json:"name"`

	// ProjectID: project ID.
	ProjectID string `json:"project_id"`

	// Provider: name of the model provider.
	Provider string `json:"provider"`

	// Tags: list of tags applied to the model.
	Tags []string `json:"tags"`

	// Description: purpose of the model.
	Description string `json:"description"`

	// HasEula: defines whether the model has an end user licence agreement.
	HasEula bool `json:"has_eula"`

	// CreatedAt: creation date of the model.
	CreatedAt *time.Time `json:"created_at"`

	// UpdatedAt: last modification date of the model.
	UpdatedAt *time.Time `json:"updated_at"`

	// Region: region of the model.
	Region scw.Region `json:"region"`

	// S3Model: s3 URL pointing to the model source weight.
	// Precisely one of S3Model must be set.
	S3Model *ModelS3Model `json:"s3_model,omitempty"`

	// IsPublic: defines whether the model is public or not.
	IsPublic bool `json:"is_public"`

	// CompatibleNodeTypes: names of the node types compatible with the model.
	CompatibleNodeTypes []string `json:"compatible_node_types"`

	// QuantizationLevel: quantization level of the model.
	QuantizationLevel string `json:"quantization_level"`
}

Model: model.

type ModelS3Model

type ModelS3Model struct {
	S3URL string `json:"s3_url"`

	PythonDependencies map[string]string `json:"python_dependencies"`

	NodeType *string `json:"node_type"`

	TritonServerVersion *string `json:"triton_server_version"`
}

ModelS3Model: model s3 model.

type NodeType

type NodeType struct {
	// Name: name of the node type.
	Name string `json:"name"`

	// StockStatus: current stock status for the node type.
	// Default value: unknown_stock
	StockStatus NodeTypeStock `json:"stock_status"`

	// Description: current specs of the offer.
	Description string `json:"description"`

	// Vcpus: number of virtual CPUs.
	Vcpus uint32 `json:"vcpus"`

	// Memory: quantity of RAM.
	Memory scw.Size `json:"memory"`

	// Vram: quantity of GPU RAM.
	Vram scw.Size `json:"vram"`

	// Disabled: the node type is currently disabled.
	Disabled bool `json:"disabled"`

	// Beta: the node type is currently in beta.
	Beta bool `json:"beta"`

	// CreatedAt: creation date of the node type.
	CreatedAt *time.Time `json:"created_at"`

	// UpdatedAt: last modification date of the node type.
	UpdatedAt *time.Time `json:"updated_at"`

	// Gpus: number of GPUs.
	Gpus uint32 `json:"gpus"`

	// Region: region of the node type.
	Region scw.Region `json:"region"`
}

NodeType: node type.

type NodeTypeStock

type NodeTypeStock string

func (NodeTypeStock) MarshalJSON

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

func (NodeTypeStock) String

func (enum NodeTypeStock) String() string

func (*NodeTypeStock) UnmarshalJSON

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

type SetDeploymentACLRulesRequest

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

	// DeploymentID: ID of the deployment to set ACL rules for.
	DeploymentID string `json:"-"`

	// ACLs: all existing ACL rules will be replaced by the new ones.
	ACLs []*ACLRuleRequest `json:"acls"`
}

SetDeploymentACLRulesRequest: set deployment acl rules request.

type SetDeploymentACLRulesResponse

type SetDeploymentACLRulesResponse struct {
	// Rules: list of ACL rules that were set.
	Rules []*ACLRule `json:"rules"`
}

SetDeploymentACLRulesResponse: set deployment acl rules response.

type UpdateDeploymentRequest

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

	// DeploymentID: ID of the deployment to update.
	DeploymentID string `json:"-"`

	// Name: name of the deployment.
	Name *string `json:"name,omitempty"`

	// Tags: list of tags to apply to the deployment.
	Tags *[]string `json:"tags,omitempty"`

	// MinSize: defines the new minimum size of the pool.
	MinSize *uint32 `json:"min_size,omitempty"`

	// MaxSize: defines the new maximum size of the pool.
	MaxSize *uint32 `json:"max_size,omitempty"`
}

UpdateDeploymentRequest: update deployment request.

type UpdateEndpointRequest

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

	// EndpointID: ID of the endpoint to update.
	EndpointID string `json:"-"`

	// DisableAuth: by default, deployments are protected by IAM authentication.
	// When setting this field to true, the authentication will be disabled.
	DisableAuth *bool `json:"disable_auth,omitempty"`
}

UpdateEndpointRequest: update endpoint request.

type WaitForDeploymentRequest

type WaitForDeploymentRequest struct {
	DeploymentId  string
	Region        scw.Region
	Status        DeploymentStatus
	Timeout       *time.Duration
	RetryInterval *time.Duration
}

Jump to

Keyboard shortcuts

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