Documentation
¶
Overview ¶
Package autoscaling provides methods and message types of the autoscaling v1alpha1 API.
Index ¶
- Constants
- type API
- func (s *API) CreateInstanceGroup(req *CreateInstanceGroupRequest, opts ...scw.RequestOption) (*InstanceGroup, error)
- func (s *API) CreateInstancePolicy(req *CreateInstancePolicyRequest, opts ...scw.RequestOption) (*InstancePolicy, error)
- func (s *API) CreateInstanceTemplate(req *CreateInstanceTemplateRequest, opts ...scw.RequestOption) (*InstanceTemplate, error)
- func (s *API) DeleteInstanceGroup(req *DeleteInstanceGroupRequest, opts ...scw.RequestOption) error
- func (s *API) DeleteInstancePolicy(req *DeleteInstancePolicyRequest, opts ...scw.RequestOption) error
- func (s *API) DeleteInstanceTemplate(req *DeleteInstanceTemplateRequest, opts ...scw.RequestOption) error
- func (s *API) GetInstanceGroup(req *GetInstanceGroupRequest, opts ...scw.RequestOption) (*InstanceGroup, error)
- func (s *API) GetInstancePolicy(req *GetInstancePolicyRequest, opts ...scw.RequestOption) (*InstancePolicy, error)
- func (s *API) GetInstanceTemplate(req *GetInstanceTemplateRequest, opts ...scw.RequestOption) (*InstanceTemplate, error)
- func (s *API) ListInstanceGroupEvents(req *ListInstanceGroupEventsRequest, opts ...scw.RequestOption) (*ListInstanceGroupEventsResponse, error)
- func (s *API) ListInstanceGroups(req *ListInstanceGroupsRequest, opts ...scw.RequestOption) (*ListInstanceGroupsResponse, error)
- func (s *API) ListInstancePolicies(req *ListInstancePoliciesRequest, opts ...scw.RequestOption) (*ListInstancePoliciesResponse, error)
- func (s *API) ListInstanceTemplates(req *ListInstanceTemplatesRequest, opts ...scw.RequestOption) (*ListInstanceTemplatesResponse, error)
- func (s *API) UpdateInstanceGroup(req *UpdateInstanceGroupRequest, opts ...scw.RequestOption) (*InstanceGroup, error)
- func (s *API) UpdateInstancePolicy(req *UpdateInstancePolicyRequest, opts ...scw.RequestOption) (*InstancePolicy, error)
- func (s *API) UpdateInstanceTemplate(req *UpdateInstanceTemplateRequest, opts ...scw.RequestOption) (*InstanceTemplate, error)
- func (s *API) Zones() []scw.Zone
- type Capacity
- type CreateInstanceGroupRequest
- type CreateInstancePolicyRequest
- type CreateInstanceTemplateRequest
- type DeleteInstanceGroupRequest
- type DeleteInstancePolicyRequest
- type DeleteInstanceTemplateRequest
- type GetInstanceGroupRequest
- type GetInstancePolicyRequest
- type GetInstanceTemplateRequest
- type InstanceGroup
- type InstanceGroupEvent
- type InstanceGroupEventLevel
- type InstanceGroupEventSource
- type InstancePolicy
- type InstancePolicyAction
- type InstancePolicyType
- type InstanceTemplate
- type InstanceTemplateStatus
- type ListInstanceGroupEventsRequest
- type ListInstanceGroupEventsRequestOrderBy
- func (enum ListInstanceGroupEventsRequestOrderBy) MarshalJSON() ([]byte, error)
- func (enum ListInstanceGroupEventsRequestOrderBy) String() string
- func (enum *ListInstanceGroupEventsRequestOrderBy) UnmarshalJSON(data []byte) error
- func (enum ListInstanceGroupEventsRequestOrderBy) Values() []ListInstanceGroupEventsRequestOrderBy
- type ListInstanceGroupEventsResponse
- type ListInstanceGroupsRequest
- type ListInstanceGroupsRequestOrderBy
- func (enum ListInstanceGroupsRequestOrderBy) MarshalJSON() ([]byte, error)
- func (enum ListInstanceGroupsRequestOrderBy) String() string
- func (enum *ListInstanceGroupsRequestOrderBy) UnmarshalJSON(data []byte) error
- func (enum ListInstanceGroupsRequestOrderBy) Values() []ListInstanceGroupsRequestOrderBy
- type ListInstanceGroupsResponse
- type ListInstancePoliciesRequest
- type ListInstancePoliciesRequestOrderBy
- func (enum ListInstancePoliciesRequestOrderBy) MarshalJSON() ([]byte, error)
- func (enum ListInstancePoliciesRequestOrderBy) String() string
- func (enum *ListInstancePoliciesRequestOrderBy) UnmarshalJSON(data []byte) error
- func (enum ListInstancePoliciesRequestOrderBy) Values() []ListInstancePoliciesRequestOrderBy
- type ListInstancePoliciesResponse
- type ListInstanceTemplatesRequest
- type ListInstanceTemplatesRequestOrderBy
- func (enum ListInstanceTemplatesRequestOrderBy) MarshalJSON() ([]byte, error)
- func (enum ListInstanceTemplatesRequestOrderBy) String() string
- func (enum *ListInstanceTemplatesRequestOrderBy) UnmarshalJSON(data []byte) error
- func (enum ListInstanceTemplatesRequestOrderBy) Values() []ListInstanceTemplatesRequestOrderBy
- type ListInstanceTemplatesResponse
- type Loadbalancer
- type Metric
- type MetricAggregate
- type MetricManagedMetric
- type MetricOperator
- type UpdateInstanceGroupRequest
- type UpdateInstanceGroupRequestCapacity
- type UpdateInstanceGroupRequestLoadbalancer
- type UpdateInstancePolicyRequest
- type UpdateInstancePolicyRequestMetric
- type UpdateInstancePolicyRequestMetricAggregate
- func (enum UpdateInstancePolicyRequestMetricAggregate) MarshalJSON() ([]byte, error)
- func (enum UpdateInstancePolicyRequestMetricAggregate) String() string
- func (enum *UpdateInstancePolicyRequestMetricAggregate) UnmarshalJSON(data []byte) error
- func (enum UpdateInstancePolicyRequestMetricAggregate) Values() []UpdateInstancePolicyRequestMetricAggregate
- type UpdateInstancePolicyRequestMetricManagedMetric
- func (enum UpdateInstancePolicyRequestMetricManagedMetric) MarshalJSON() ([]byte, error)
- func (enum UpdateInstancePolicyRequestMetricManagedMetric) String() string
- func (enum *UpdateInstancePolicyRequestMetricManagedMetric) UnmarshalJSON(data []byte) error
- func (enum UpdateInstancePolicyRequestMetricManagedMetric) Values() []UpdateInstancePolicyRequestMetricManagedMetric
- type UpdateInstancePolicyRequestMetricOperator
- func (enum UpdateInstancePolicyRequestMetricOperator) MarshalJSON() ([]byte, error)
- func (enum UpdateInstancePolicyRequestMetricOperator) String() string
- func (enum *UpdateInstancePolicyRequestMetricOperator) UnmarshalJSON(data []byte) error
- func (enum UpdateInstancePolicyRequestMetricOperator) Values() []UpdateInstancePolicyRequestMetricOperator
- type UpdateInstanceTemplateRequest
- type VolumeInstanceTemplate
- type VolumeInstanceTemplateFromEmpty
- type VolumeInstanceTemplateFromSnapshot
- type VolumeInstanceTemplateVolumeType
- func (enum VolumeInstanceTemplateVolumeType) MarshalJSON() ([]byte, error)
- func (enum VolumeInstanceTemplateVolumeType) String() string
- func (enum *VolumeInstanceTemplateVolumeType) UnmarshalJSON(data []byte) error
- func (enum VolumeInstanceTemplateVolumeType) Values() []VolumeInstanceTemplateVolumeType
Constants ¶
const ( // Informational log about the Instance group. InstanceGroupEventLevelInfo = InstanceGroupEventLevel("info") // Success log for Instance scaling or Load Balancer configuration. InstanceGroupEventLevelSuccess = InstanceGroupEventLevel("success") // Error log for Instance group configuration or Instance group operation. InstanceGroupEventLevelError = InstanceGroupEventLevel("error") )
const ( // Unknown source event. InstanceGroupEventSourceUnknownSource = InstanceGroupEventSource("unknown_source") // Responsible for collecting and analyzing metrics. InstanceGroupEventSourceWatcher = InstanceGroupEventSource("watcher") // Responsible for processing the policy and generating Instance scale up/down tasks. InstanceGroupEventSourceScaler = InstanceGroupEventSource("scaler") // Responsible for managing the creation and deletion of Instances, and configuring the Load Balancer attached to the Instance group. InstanceGroupEventSourceInstanceManager = InstanceGroupEventSource("instance_manager") // Global Instance groups supervisor. InstanceGroupEventSourceSupervisor = InstanceGroupEventSource("supervisor") )
const ( // Action of unknown type. InstancePolicyActionUnknownAction = InstancePolicyAction("unknown_action") // Create one or many new Instances (based on policy type and value). InstancePolicyActionScaleUp = InstancePolicyAction("scale_up") // Stop and remove one or many Instances (based on policy type and value). InstancePolicyActionScaleDown = InstancePolicyAction("scale_down") )
const ( // Action of unknown type. InstancePolicyTypeUnknownType = InstancePolicyType("unknown_type") // Add or delete a fixed number of Instances. This must be a positive integer. InstancePolicyTypeFlatCount = InstancePolicyType("flat_count") // Add or delete a percentage of the total Instance group size. InstancePolicyTypePercentOfTotalGroup = InstancePolicyType("percent_of_total_group") // Set the total number of Instances in the group to this arbitrary number. This must be a positive integer. InstancePolicyTypeSetTotalGroup = InstancePolicyType("set_total_group") )
const ( // Unknown status. InstanceTemplateStatusUnknownStatus = InstanceTemplateStatus("unknown_status") // Template is ready and healthy. InstanceTemplateStatusReady = InstanceTemplateStatus("ready") // Template is in error state, see events log. InstanceTemplateStatusError = InstanceTemplateStatus("error") )
const ( // Order by creation date (descending chronological order). ListInstanceGroupEventsRequestOrderByCreatedAtDesc = ListInstanceGroupEventsRequestOrderBy("created_at_desc") // Order by creation date (ascending chronological order). ListInstanceGroupEventsRequestOrderByCreatedAtAsc = ListInstanceGroupEventsRequestOrderBy("created_at_asc") )
const ( // Order by creation date (descending chronological order). ListInstanceGroupsRequestOrderByCreatedAtDesc = ListInstanceGroupsRequestOrderBy("created_at_desc") // Order by creation date (ascending chronological order). ListInstanceGroupsRequestOrderByCreatedAtAsc = ListInstanceGroupsRequestOrderBy("created_at_asc") )
const ( // Order by creation date (descending chronological order). ListInstancePoliciesRequestOrderByCreatedAtDesc = ListInstancePoliciesRequestOrderBy("created_at_desc") // Order by creation date (ascending chronological order). ListInstancePoliciesRequestOrderByCreatedAtAsc = ListInstancePoliciesRequestOrderBy("created_at_asc") )
const ( // Order by creation date (descending chronological order). ListInstanceTemplatesRequestOrderByCreatedAtDesc = ListInstanceTemplatesRequestOrderBy("created_at_desc") // Order by creation date (ascending chronological order). ListInstanceTemplatesRequestOrderByCreatedAtAsc = ListInstanceTemplatesRequestOrderBy("created_at_asc") )
const ( MetricAggregateAggregateUnknown = MetricAggregate("aggregate_unknown") // The average value of all sample points during the specified interval. MetricAggregateAggregateAverage = MetricAggregate("aggregate_average") // The maximum value of all sample points during the specified interval. MetricAggregateAggregateMax = MetricAggregate("aggregate_max") // The minimum value of all sample points during the specified interval. MetricAggregateAggregateMin = MetricAggregate("aggregate_min") // The sum of all sample values during the specified interval. MetricAggregateAggregateSum = MetricAggregate("aggregate_sum") )
const ( MetricManagedMetricManagedMetricUnknown = MetricManagedMetric("managed_metric_unknown") // Percentage of CPU usage across the whole Instance group. MetricManagedMetricManagedMetricInstanceCPU = MetricManagedMetric("managed_metric_instance_cpu") // Rate input, in bytes/sec, of the Instance's public interface. MetricManagedMetricManagedMetricInstanceNetworkIn = MetricManagedMetric("managed_metric_instance_network_in") // Rate output, in bytes/sec, of the Instance's public interface. MetricManagedMetricManagedMetricInstanceNetworkOut = MetricManagedMetric("managed_metric_instance_network_out") // Cumulative number of connections established to the Load Balancer backend related to the Instance group. MetricManagedMetricManagedLoadbalancerBackendConnectionsRate = MetricManagedMetric("managed_loadbalancer_backend_connections_rate") // Rate, in bytes/sec, of all traffic forwarded to all Load Balancer backend servers. MetricManagedMetricManagedLoadbalancerBackendThroughput = MetricManagedMetric("managed_loadbalancer_backend_throughput") )
const ( MetricOperatorOperatorUnknown = MetricOperator("operator_unknown") // Equivalent of a greater than symbol (>). MetricOperatorOperatorGreaterThan = MetricOperator("operator_greater_than") // Equivalent of a less than symbol (<). MetricOperatorOperatorLessThan = MetricOperator("operator_less_than") )
const ( UpdateInstancePolicyRequestMetricAggregateAggregateUnknown = UpdateInstancePolicyRequestMetricAggregate("aggregate_unknown") // The average value of all sample points during the specified interval. UpdateInstancePolicyRequestMetricAggregateAggregateAverage = UpdateInstancePolicyRequestMetricAggregate("aggregate_average") // The maximum value of all sample points during the specified interval. UpdateInstancePolicyRequestMetricAggregateAggregateMax = UpdateInstancePolicyRequestMetricAggregate("aggregate_max") // The minimum value of all sample points during the specified interval. UpdateInstancePolicyRequestMetricAggregateAggregateMin = UpdateInstancePolicyRequestMetricAggregate("aggregate_min") // The sum of all sample values during the specified interval. UpdateInstancePolicyRequestMetricAggregateAggregateSum = UpdateInstancePolicyRequestMetricAggregate("aggregate_sum") )
const ( UpdateInstancePolicyRequestMetricManagedMetricManagedMetricUnknown = UpdateInstancePolicyRequestMetricManagedMetric("managed_metric_unknown") // Percentage of CPU usage across the whole Instance group. UpdateInstancePolicyRequestMetricManagedMetricManagedMetricInstanceCPU = UpdateInstancePolicyRequestMetricManagedMetric("managed_metric_instance_cpu") // Rate input, in bytes/sec, of the Instance's public interface. UpdateInstancePolicyRequestMetricManagedMetricManagedMetricInstanceNetworkIn = UpdateInstancePolicyRequestMetricManagedMetric("managed_metric_instance_network_in") // Rate output, in bytes/sec, of the Instance's public interface. UpdateInstancePolicyRequestMetricManagedMetricManagedMetricInstanceNetworkOut = UpdateInstancePolicyRequestMetricManagedMetric("managed_metric_instance_network_out") // Cumulative number of connections established to the Load Balancer backend related to the Instance group. UpdateInstancePolicyRequestMetricManagedMetricManagedLoadbalancerBackendConnectionsRate = UpdateInstancePolicyRequestMetricManagedMetric("managed_loadbalancer_backend_connections_rate") // Rate, in bytes/sec, of all traffic forwarded to all Load Balancer backend servers. UpdateInstancePolicyRequestMetricManagedMetricManagedLoadbalancerBackendThroughput = UpdateInstancePolicyRequestMetricManagedMetric("managed_loadbalancer_backend_throughput") )
const ( UpdateInstancePolicyRequestMetricOperatorOperatorUnknown = UpdateInstancePolicyRequestMetricOperator("operator_unknown") // Equivalent of a greater than symbol (>). UpdateInstancePolicyRequestMetricOperatorOperatorGreaterThan = UpdateInstancePolicyRequestMetricOperator("operator_greater_than") // Equivalent of a less than symbol (<). UpdateInstancePolicyRequestMetricOperatorOperatorLessThan = UpdateInstancePolicyRequestMetricOperator("operator_less_than") )
const ( // Unknown volume type. VolumeInstanceTemplateVolumeTypeUnknownVolumeType = VolumeInstanceTemplateVolumeType("unknown_volume_type") // Local storage. VolumeInstanceTemplateVolumeTypeLSSD = VolumeInstanceTemplateVolumeType("l_ssd") // Block storage. VolumeInstanceTemplateVolumeTypeSbs = VolumeInstanceTemplateVolumeType("sbs") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
func (*API) CreateInstanceGroup ¶
func (s *API) CreateInstanceGroup(req *CreateInstanceGroupRequest, opts ...scw.RequestOption) (*InstanceGroup, error)
CreateInstanceGroup: Create a new Instance group. You must specify a `template_id`, capacity and Load Balancer object.
func (*API) CreateInstancePolicy ¶
func (s *API) CreateInstancePolicy(req *CreateInstancePolicyRequest, opts ...scw.RequestOption) (*InstancePolicy, error)
CreateInstancePolicy: Create a new scaling policy. You must specify a `policy_id`, capacity and Load Balancer object.
func (*API) CreateInstanceTemplate ¶
func (s *API) CreateInstanceTemplate(req *CreateInstanceTemplateRequest, opts ...scw.RequestOption) (*InstanceTemplate, error)
CreateInstanceTemplate: Create a new Instance template. This specifies the details of the Instance (commercial type, zone, image, volumes etc.) that will be in the Instance group.
func (*API) DeleteInstanceGroup ¶
func (s *API) DeleteInstanceGroup(req *DeleteInstanceGroupRequest, opts ...scw.RequestOption) error
DeleteInstanceGroup: Delete an existing Instance group, specified by its `instance_group_id`. Deleting an Instance group is permanent, and cannot be undone.
func (*API) DeleteInstancePolicy ¶
func (s *API) DeleteInstancePolicy(req *DeleteInstancePolicyRequest, opts ...scw.RequestOption) error
DeleteInstancePolicy: Delete an existing scaling policy, specified by its `policy_id`. Deleting a scaling policy is permanent, and cannot be undone.
func (*API) DeleteInstanceTemplate ¶
func (s *API) DeleteInstanceTemplate(req *DeleteInstanceTemplateRequest, opts ...scw.RequestOption) error
DeleteInstanceTemplate: Delete an existing Instance template. This action is permanent and cannot be undone.
func (*API) GetInstanceGroup ¶
func (s *API) GetInstanceGroup(req *GetInstanceGroupRequest, opts ...scw.RequestOption) (*InstanceGroup, error)
GetInstanceGroup: Retrieve information about an existing Instance group, specified by its `instance_group_id`. Its full details, including errors, are returned in the response object.
func (*API) GetInstancePolicy ¶
func (s *API) GetInstancePolicy(req *GetInstancePolicyRequest, opts ...scw.RequestOption) (*InstancePolicy, error)
GetInstancePolicy: Retrieve information about an existing scaling policy, specified by its `policy_id`. Its full details are returned in the response object.
func (*API) GetInstanceTemplate ¶
func (s *API) GetInstanceTemplate(req *GetInstanceTemplateRequest, opts ...scw.RequestOption) (*InstanceTemplate, error)
GetInstanceTemplate: Get an existing Instance template from its `template_id`.
func (*API) ListInstanceGroupEvents ¶
func (s *API) ListInstanceGroupEvents(req *ListInstanceGroupEventsRequest, opts ...scw.RequestOption) (*ListInstanceGroupEventsResponse, error)
ListInstanceGroupEvents: List all events for a given Instance group. By default, the events are ordered by creation date in descending order, though this can be modified via the `order_by` field.
func (*API) ListInstanceGroups ¶
func (s *API) ListInstanceGroups(req *ListInstanceGroupsRequest, opts ...scw.RequestOption) (*ListInstanceGroupsResponse, error)
ListInstanceGroups: List all Instance groups, for a Scaleway Organization or Scaleway Project. By default, the Instance groups returned in the list are ordered by creation date in ascending order, though this can be modified via the `order_by` field.
func (*API) ListInstancePolicies ¶
func (s *API) ListInstancePolicies(req *ListInstancePoliciesRequest, opts ...scw.RequestOption) (*ListInstancePoliciesResponse, error)
ListInstancePolicies: List all scaling policies, for a Scaleway Organization or Scaleway Project. By default, the policies returned in the list are ordered by creation date in ascending order, though this can be modified via the `order_by` field.
func (*API) ListInstanceTemplates ¶
func (s *API) ListInstanceTemplates(req *ListInstanceTemplatesRequest, opts ...scw.RequestOption) (*ListInstanceTemplatesResponse, error)
ListInstanceTemplates: List all Instance templates, for a Scaleway Organization or Scaleway Project. By default, the Instance templates returned in the list are ordered by creation date in ascending order, though this can be modified via the `order_by` field.
func (*API) UpdateInstanceGroup ¶
func (s *API) UpdateInstanceGroup(req *UpdateInstanceGroupRequest, opts ...scw.RequestOption) (*InstanceGroup, error)
UpdateInstanceGroup: Update the parameters of an existing Instance group, specified by its `instance_group_id`.
func (*API) UpdateInstancePolicy ¶
func (s *API) UpdateInstancePolicy(req *UpdateInstancePolicyRequest, opts ...scw.RequestOption) (*InstancePolicy, error)
UpdateInstancePolicy: Update the parameters of an existing scaling policy, specified by its `policy_id`.
func (*API) UpdateInstanceTemplate ¶
func (s *API) UpdateInstanceTemplate(req *UpdateInstanceTemplateRequest, opts ...scw.RequestOption) (*InstanceTemplate, error)
UpdateInstanceTemplate: Update an Instance template, such as its commercial offer type, image or volume template.
type Capacity ¶
type Capacity struct {
// MaxReplicas: maximum count of Instances for the Instance group.
MaxReplicas uint32 `json:"max_replicas"`
// MinReplicas: minimum count of Instances for the Instance group.
MinReplicas uint32 `json:"min_replicas"`
// CooldownDelay: time (in seconds) after a scaling action during which requests to carry out a new scaling action will be denied.
CooldownDelay *scw.Duration `json:"cooldown_delay"`
}
Capacity: capacity.
type CreateInstanceGroupRequest ¶
type CreateInstanceGroupRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// ProjectID: project ID to filter for, only Instance groups from this Project will be returned.
ProjectID string `json:"project_id"`
// Name: name of Instance group.
Name string `json:"name"`
// Tags: list of tags for the Instance group.
Tags []string `json:"tags"`
// TemplateID: template ID (ID of the Instance template to attach to the Instance group).
TemplateID string `json:"template_id"`
// Capacity: specification of the minimum and maximum replicas for the Instance group, and the cooldown interval between two scaling events.
Capacity *Capacity `json:"capacity"`
// Loadbalancer: specification of the Load Balancer to link to the Instance group.
Loadbalancer *Loadbalancer `json:"loadbalancer"`
}
CreateInstanceGroupRequest: create instance group request.
type CreateInstancePolicyRequest ¶
type CreateInstancePolicyRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// Name: name of the policy.
Name string `json:"name"`
// Metric: cockpit metric to use when determining whether to trigger a scale up/down action.
// Precisely one of Metric must be set.
Metric *Metric `json:"metric,omitempty"`
// Action: action to execute when the metric-based condition is met.
// Default value: unknown_action
Action InstancePolicyAction `json:"action"`
// Type: how to use the number defined in `value` when determining by how many Instances to scale up/down.
// Default value: unknown_type
Type InstancePolicyType `json:"type"`
// Value: value representing the magnitude of the scaling action to take for the Instance group. Depending on the `type` parameter, this number could represent a total number of Instances in the group, a number of Instances to add, or a percentage to scale the group by.
Value uint32 `json:"value"`
// Priority: priority of this policy compared to all other scaling policies. This determines the processing order. The lower the number, the higher the priority.
Priority uint32 `json:"priority"`
// InstanceGroupID: instance group ID related to this policy.
InstanceGroupID string `json:"instance_group_id"`
}
CreateInstancePolicyRequest: create instance policy request.
type CreateInstanceTemplateRequest ¶
type CreateInstanceTemplateRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// CommercialType: name of Instance commercial type.
CommercialType string `json:"commercial_type"`
// ImageID: instance image ID. Can be an ID of a marketplace or personal image. This image must be compatible with `volume` and `commercial_type` template.
ImageID *string `json:"image_id,omitempty"`
// Volumes: template of Instance volume.
Volumes map[string]*VolumeInstanceTemplate `json:"volumes"`
// Tags: list of tags for the Instance template.
Tags []string `json:"tags"`
// SecurityGroupID: instance security group ID (optional).
SecurityGroupID *string `json:"security_group_id,omitempty"`
// PlacementGroupID: instance placement group ID. This is optional, but it is highly recommended to set a preference for Instance location within Availability Zone.
PlacementGroupID *string `json:"placement_group_id,omitempty"`
// PublicIPsV4Count: number of flexible IPv4 addresses to attach to the new Instance.
PublicIPsV4Count *uint32 `json:"public_ips_v4_count,omitempty"`
// PublicIPsV6Count: number of flexible IPv6 addresses to attach to the new Instance.
PublicIPsV6Count *uint32 `json:"public_ips_v6_count,omitempty"`
// ProjectID: ID of the Project containing the Instance template resource.
ProjectID string `json:"project_id"`
// Name: name of Instance template.
Name string `json:"name"`
// PrivateNetworkIDs: private Network IDs to attach to the new Instance.
PrivateNetworkIDs []string `json:"private_network_ids"`
// CloudInit: cloud-config file must be passed in Base64 format. Cloud-config files are special scripts designed to be run by the cloud-init process. These are generally used for initial configuration on the very first boot of a server.
CloudInit *[]byte `json:"cloud_init,omitempty"`
}
CreateInstanceTemplateRequest: create instance template request.
type DeleteInstanceGroupRequest ¶
type DeleteInstanceGroupRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// InstanceGroupID: ID of the Instance group to delete.
InstanceGroupID string `json:"-"`
}
DeleteInstanceGroupRequest: delete instance group request.
type DeleteInstancePolicyRequest ¶
type DeleteInstancePolicyRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// PolicyID: ID of the policy to delete.
PolicyID string `json:"-"`
}
DeleteInstancePolicyRequest: delete instance policy request.
type DeleteInstanceTemplateRequest ¶
type DeleteInstanceTemplateRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// TemplateID: ID of the template to delete.
TemplateID string `json:"-"`
}
DeleteInstanceTemplateRequest: delete instance template request.
type GetInstanceGroupRequest ¶
type GetInstanceGroupRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// InstanceGroupID: ID of the requested Instance group.
InstanceGroupID string `json:"-"`
}
GetInstanceGroupRequest: get instance group request.
type GetInstancePolicyRequest ¶
type GetInstancePolicyRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// PolicyID: policy ID.
PolicyID string `json:"-"`
}
GetInstancePolicyRequest: get instance policy request.
type GetInstanceTemplateRequest ¶
type GetInstanceTemplateRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// TemplateID: template ID of the resource.
TemplateID string `json:"-"`
}
GetInstanceTemplateRequest: get instance template request.
type InstanceGroup ¶
type InstanceGroup struct {
// ID: instance group ID.
ID string `json:"id"`
// ProjectID: project ID of the Instance group.
ProjectID string `json:"project_id"`
// Name: name of the Instance group.
Name string `json:"name"`
// Tags: instance group tags.
Tags []string `json:"tags"`
// InstanceTemplateID: template ID (ID of the Instance template to attach to the Instance group).
InstanceTemplateID string `json:"instance_template_id"`
// Capacity: specification of the minimum and maximum replicas for the Instance group, and the cooldown interval between two scaling events.
Capacity *Capacity `json:"capacity"`
// Loadbalancer: specification of the Load Balancer linked to the Instance group.
Loadbalancer *Loadbalancer `json:"loadbalancer"`
// ErrorMessages: any configuration errors for dependencies (Load Balancer, Private Network, Instance template etc.).
ErrorMessages []string `json:"error_messages"`
// CreatedAt: date on which the Instance group was created.
CreatedAt *time.Time `json:"created_at"`
// UpdatedAt: date on which the Instance group was last updated.
UpdatedAt *time.Time `json:"updated_at"`
}
InstanceGroup: instance group.
type InstanceGroupEvent ¶
type InstanceGroupEvent struct {
// ID: instance group event ID.
ID string `json:"id"`
// Source: log source.
// Default value: unknown_source
Source InstanceGroupEventSource `json:"source"`
// Level: the severity of the log.
// Default value: info
Level InstanceGroupEventLevel `json:"level"`
// Name: log title.
Name string `json:"name"`
// CreatedAt: date and time of the log.
CreatedAt *time.Time `json:"created_at"`
// Details: full text of the log.
Details *string `json:"details"`
}
InstanceGroupEvent: instance group event.
type InstanceGroupEventLevel ¶
type InstanceGroupEventLevel string
func (InstanceGroupEventLevel) MarshalJSON ¶
func (enum InstanceGroupEventLevel) MarshalJSON() ([]byte, error)
func (InstanceGroupEventLevel) String ¶
func (enum InstanceGroupEventLevel) String() string
func (*InstanceGroupEventLevel) UnmarshalJSON ¶
func (enum *InstanceGroupEventLevel) UnmarshalJSON(data []byte) error
func (InstanceGroupEventLevel) Values ¶
func (enum InstanceGroupEventLevel) Values() []InstanceGroupEventLevel
type InstanceGroupEventSource ¶
type InstanceGroupEventSource string
func (InstanceGroupEventSource) MarshalJSON ¶
func (enum InstanceGroupEventSource) MarshalJSON() ([]byte, error)
func (InstanceGroupEventSource) String ¶
func (enum InstanceGroupEventSource) String() string
func (*InstanceGroupEventSource) UnmarshalJSON ¶
func (enum *InstanceGroupEventSource) UnmarshalJSON(data []byte) error
func (InstanceGroupEventSource) Values ¶
func (enum InstanceGroupEventSource) Values() []InstanceGroupEventSource
type InstancePolicy ¶
type InstancePolicy struct {
// ID: scaling policy ID.
ID string `json:"id"`
// Name: name of scaling policy.
Name string `json:"name"`
// Metric: managed metric to use for this policy. These are available by default in Cockpit without any configuration or `node_exporter`. The chosen metric forms the basis of the condition that will be checked to determine whether a scaling action should be triggered.
// Precisely one of Metric must be set.
Metric *Metric `json:"metric,omitempty"`
// Action: action to execute when the metric-based condition is met.
// Default value: unknown_action
Action InstancePolicyAction `json:"action"`
// Type: how to use the number defined in `value` when determining by how many Instances to scale up/down.
// Default value: unknown_type
Type InstancePolicyType `json:"type"`
// Value: number representing the magnitude of the scaling action to take for the Instance group.
Value uint32 `json:"value"`
// Priority: priority of this policy compared to all other scaling policies. The lower the number, the higher the priority (higher priority will be processed sooner in the order).
Priority uint32 `json:"priority"`
// InstanceGroupID: instance group ID related to this policy.
InstanceGroupID string `json:"instance_group_id"`
}
InstancePolicy: instance policy.
type InstancePolicyAction ¶
type InstancePolicyAction string
func (InstancePolicyAction) MarshalJSON ¶
func (enum InstancePolicyAction) MarshalJSON() ([]byte, error)
func (InstancePolicyAction) String ¶
func (enum InstancePolicyAction) String() string
func (*InstancePolicyAction) UnmarshalJSON ¶
func (enum *InstancePolicyAction) UnmarshalJSON(data []byte) error
func (InstancePolicyAction) Values ¶
func (enum InstancePolicyAction) Values() []InstancePolicyAction
type InstancePolicyType ¶
type InstancePolicyType string
func (InstancePolicyType) MarshalJSON ¶
func (enum InstancePolicyType) MarshalJSON() ([]byte, error)
func (InstancePolicyType) String ¶
func (enum InstancePolicyType) String() string
func (*InstancePolicyType) UnmarshalJSON ¶
func (enum *InstancePolicyType) UnmarshalJSON(data []byte) error
func (InstancePolicyType) Values ¶
func (enum InstancePolicyType) Values() []InstancePolicyType
type InstanceTemplate ¶
type InstanceTemplate struct {
// ID: ID of Instance template resource.
ID string `json:"id"`
// CommercialType: name of Instance commercial type.
CommercialType string `json:"commercial_type"`
// ImageID: instance image ID. Can be an ID of a marketplace or personal image. This image must be compatible with `volume` and `commercial_type` template.
ImageID *string `json:"image_id"`
// Volumes: template of Instance volume.
Volumes map[string]*VolumeInstanceTemplate `json:"volumes"`
// Tags: list of tags for the Instance template.
Tags []string `json:"tags"`
// SecurityGroupID: instance security group ID (optional).
SecurityGroupID *string `json:"security_group_id"`
// PlacementGroupID: instance placement group ID. This is optional, but it is highly recommended to set a preference for Instance location within Availability Zone.
PlacementGroupID *string `json:"placement_group_id"`
// PublicIPsV4Count: number of flexible IPv4 addresses to attach to the new Instance.
PublicIPsV4Count *uint32 `json:"public_ips_v4_count"`
// PublicIPsV6Count: number of flexible IPv6 addresses to attach to the new Instance.
PublicIPsV6Count *uint32 `json:"public_ips_v6_count"`
// ProjectID: ID of the Project containing the Instance template resource.
ProjectID string `json:"project_id"`
// Name: name of Instance template.
Name string `json:"name"`
// PrivateNetworkIDs: private Network IDs to attach to the new Instance.
PrivateNetworkIDs []string `json:"private_network_ids"`
// Status: status of Instance template.
// Default value: unknown_status
Status InstanceTemplateStatus `json:"status"`
// CloudInit: cloud-config file must be passed in Base64 format. Cloud-config files are special scripts designed to be run by the cloud-init process. These are generally used for initial configuration on the very first boot of a server.
CloudInit *[]byte `json:"cloud_init"`
// CreatedAt: date on which the Instance template was created.
CreatedAt *time.Time `json:"created_at"`
// UpdatedAt: date on which the Instance template was last updated.
UpdatedAt *time.Time `json:"updated_at"`
}
InstanceTemplate: instance template.
type InstanceTemplateStatus ¶
type InstanceTemplateStatus string
func (InstanceTemplateStatus) MarshalJSON ¶
func (enum InstanceTemplateStatus) MarshalJSON() ([]byte, error)
func (InstanceTemplateStatus) String ¶
func (enum InstanceTemplateStatus) String() string
func (*InstanceTemplateStatus) UnmarshalJSON ¶
func (enum *InstanceTemplateStatus) UnmarshalJSON(data []byte) error
func (InstanceTemplateStatus) Values ¶
func (enum InstanceTemplateStatus) Values() []InstanceTemplateStatus
type ListInstanceGroupEventsRequest ¶
type ListInstanceGroupEventsRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// InstanceGroupID: list all event logs for the Instance group ID.
InstanceGroupID string `json:"-"`
// OrderBy: sort order of Instance groups in the response.
// Default value: created_at_desc
OrderBy ListInstanceGroupEventsRequestOrderBy `json:"-"`
// Page: page number to return, from the paginated results.
Page *int32 `json:"-"`
// PageSize: number of Instance groups to return per page.
PageSize *uint32 `json:"-"`
}
ListInstanceGroupEventsRequest: list instance group events request.
type ListInstanceGroupEventsRequestOrderBy ¶
type ListInstanceGroupEventsRequestOrderBy string
func (ListInstanceGroupEventsRequestOrderBy) MarshalJSON ¶
func (enum ListInstanceGroupEventsRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListInstanceGroupEventsRequestOrderBy) String ¶
func (enum ListInstanceGroupEventsRequestOrderBy) String() string
func (*ListInstanceGroupEventsRequestOrderBy) UnmarshalJSON ¶
func (enum *ListInstanceGroupEventsRequestOrderBy) UnmarshalJSON(data []byte) error
func (ListInstanceGroupEventsRequestOrderBy) Values ¶
func (enum ListInstanceGroupEventsRequestOrderBy) Values() []ListInstanceGroupEventsRequestOrderBy
type ListInstanceGroupEventsResponse ¶
type ListInstanceGroupEventsResponse struct {
// InstanceEvents: paginated list of Instance groups.
InstanceEvents []*InstanceGroupEvent `json:"instance_events"`
// TotalCount: count of all Instance groups matching the requested criteria.
TotalCount uint64 `json:"total_count"`
}
ListInstanceGroupEventsResponse: list instance group events response.
func (*ListInstanceGroupEventsResponse) UnsafeAppend ¶
func (r *ListInstanceGroupEventsResponse) UnsafeAppend(res any) (uint64, error)
UnsafeAppend should not be used Internal usage only
func (*ListInstanceGroupEventsResponse) UnsafeGetTotalCount ¶
func (r *ListInstanceGroupEventsResponse) UnsafeGetTotalCount() uint64
UnsafeGetTotalCount should not be used Internal usage only
type ListInstanceGroupsRequest ¶
type ListInstanceGroupsRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// OrderBy: sort order of Instance groups in the response.
// Default value: created_at_desc
OrderBy ListInstanceGroupsRequestOrderBy `json:"-"`
// Page: page number to return, from the paginated results.
Page *int32 `json:"-"`
// PageSize: number of Instance groups to return per page.
PageSize *uint32 `json:"-"`
}
ListInstanceGroupsRequest: list instance groups request.
type ListInstanceGroupsRequestOrderBy ¶
type ListInstanceGroupsRequestOrderBy string
func (ListInstanceGroupsRequestOrderBy) MarshalJSON ¶
func (enum ListInstanceGroupsRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListInstanceGroupsRequestOrderBy) String ¶
func (enum ListInstanceGroupsRequestOrderBy) String() string
func (*ListInstanceGroupsRequestOrderBy) UnmarshalJSON ¶
func (enum *ListInstanceGroupsRequestOrderBy) UnmarshalJSON(data []byte) error
func (ListInstanceGroupsRequestOrderBy) Values ¶
func (enum ListInstanceGroupsRequestOrderBy) Values() []ListInstanceGroupsRequestOrderBy
type ListInstanceGroupsResponse ¶
type ListInstanceGroupsResponse struct {
// InstanceGroups: paginated list of Instance groups.
InstanceGroups []*InstanceGroup `json:"instance_groups"`
// TotalCount: count of all Instance groups matching the requested criteria.
TotalCount uint64 `json:"total_count"`
}
ListInstanceGroupsResponse: list instance groups response.
func (*ListInstanceGroupsResponse) UnsafeAppend ¶
func (r *ListInstanceGroupsResponse) UnsafeAppend(res any) (uint64, error)
UnsafeAppend should not be used Internal usage only
func (*ListInstanceGroupsResponse) UnsafeGetTotalCount ¶
func (r *ListInstanceGroupsResponse) UnsafeGetTotalCount() uint64
UnsafeGetTotalCount should not be used Internal usage only
type ListInstancePoliciesRequest ¶
type ListInstancePoliciesRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// OrderBy: sort order of Instance groups in the response.
// Default value: created_at_desc
OrderBy ListInstancePoliciesRequestOrderBy `json:"-"`
// InstanceGroupID: instance group ID.
InstanceGroupID string `json:"-"`
// Page: page number to return, from the paginated results.
Page *int32 `json:"-"`
// PageSize: number of scaling policies to return per page.
PageSize *uint32 `json:"-"`
}
ListInstancePoliciesRequest: list instance policies request.
type ListInstancePoliciesRequestOrderBy ¶
type ListInstancePoliciesRequestOrderBy string
func (ListInstancePoliciesRequestOrderBy) MarshalJSON ¶
func (enum ListInstancePoliciesRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListInstancePoliciesRequestOrderBy) String ¶
func (enum ListInstancePoliciesRequestOrderBy) String() string
func (*ListInstancePoliciesRequestOrderBy) UnmarshalJSON ¶
func (enum *ListInstancePoliciesRequestOrderBy) UnmarshalJSON(data []byte) error
func (ListInstancePoliciesRequestOrderBy) Values ¶
func (enum ListInstancePoliciesRequestOrderBy) Values() []ListInstancePoliciesRequestOrderBy
type ListInstancePoliciesResponse ¶
type ListInstancePoliciesResponse struct {
// Policies: paginated list of policies.
Policies []*InstancePolicy `json:"policies"`
// TotalCount: count of all policies matching the requested criteria.
TotalCount uint64 `json:"total_count"`
}
ListInstancePoliciesResponse: list instance policies response.
func (*ListInstancePoliciesResponse) UnsafeAppend ¶
func (r *ListInstancePoliciesResponse) UnsafeAppend(res any) (uint64, error)
UnsafeAppend should not be used Internal usage only
func (*ListInstancePoliciesResponse) UnsafeGetTotalCount ¶
func (r *ListInstancePoliciesResponse) UnsafeGetTotalCount() uint64
UnsafeGetTotalCount should not be used Internal usage only
type ListInstanceTemplatesRequest ¶
type ListInstanceTemplatesRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// OrderBy: sort order of Instance groups in the response.
// Default value: created_at_desc
OrderBy ListInstanceTemplatesRequestOrderBy `json:"-"`
// Page: page number to return, from the paginated results.
Page *int32 `json:"-"`
// PageSize: number of Instance groups to return per page.
PageSize *uint32 `json:"-"`
}
ListInstanceTemplatesRequest: list instance templates request.
type ListInstanceTemplatesRequestOrderBy ¶
type ListInstanceTemplatesRequestOrderBy string
func (ListInstanceTemplatesRequestOrderBy) MarshalJSON ¶
func (enum ListInstanceTemplatesRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListInstanceTemplatesRequestOrderBy) String ¶
func (enum ListInstanceTemplatesRequestOrderBy) String() string
func (*ListInstanceTemplatesRequestOrderBy) UnmarshalJSON ¶
func (enum *ListInstanceTemplatesRequestOrderBy) UnmarshalJSON(data []byte) error
func (ListInstanceTemplatesRequestOrderBy) Values ¶
func (enum ListInstanceTemplatesRequestOrderBy) Values() []ListInstanceTemplatesRequestOrderBy
type ListInstanceTemplatesResponse ¶
type ListInstanceTemplatesResponse struct {
// TotalCount: count of all templates matching the requested criteria.
TotalCount uint64 `json:"total_count"`
// InstanceTemplates: paginated list of Instance templates.
InstanceTemplates []*InstanceTemplate `json:"instance_templates"`
}
ListInstanceTemplatesResponse: list instance templates response.
func (*ListInstanceTemplatesResponse) UnsafeAppend ¶
func (r *ListInstanceTemplatesResponse) UnsafeAppend(res any) (uint64, error)
UnsafeAppend should not be used Internal usage only
func (*ListInstanceTemplatesResponse) UnsafeGetTotalCount ¶
func (r *ListInstanceTemplatesResponse) UnsafeGetTotalCount() uint64
UnsafeGetTotalCount should not be used Internal usage only
type Loadbalancer ¶
type Loadbalancer struct {
// ID: load Balancer ID.
ID string `json:"id"`
// BackendIDs: load Balancer backend IDs.
BackendIDs []string `json:"backend_ids"`
// PrivateNetworkID: ID of the Private Network attached to the Load Balancer.
PrivateNetworkID string `json:"private_network_id"`
}
Loadbalancer: loadbalancer.
type Metric ¶
type Metric struct {
// Name: name or description of the metric policy.
Name string `json:"name"`
// ManagedMetric: managed metric to use for this policy. These are available by default in Cockpit without any configuration or `node_exporter`. The chosen metric forms the basis of the condition that will be checked to determine whether a scaling action should be triggered.
// Default value: managed_metric_unknown
// Precisely one of ManagedMetric, CockpitMetricName must be set.
ManagedMetric *MetricManagedMetric `json:"managed_metric,omitempty"`
// CockpitMetricName: custom metric to use for this policy. This must be stored in Scaleway Cockpit. The metric forms the basis of the condition that will be checked to determine whether a scaling action should be triggered.
// Precisely one of ManagedMetric, CockpitMetricName must be set.
CockpitMetricName *string `json:"cockpit_metric_name,omitempty"`
// Operator: operator used when comparing the threshold value of the chosen `metric` to the actual sampled and aggregated value.
// Default value: operator_unknown
Operator MetricOperator `json:"operator"`
// Aggregate: how the values sampled for the `metric` should be aggregated.
// Default value: aggregate_unknown
Aggregate MetricAggregate `json:"aggregate"`
// SamplingRangeMin: interval of time, in minutes, during which metric is sampled.
SamplingRangeMin uint32 `json:"sampling_range_min"`
// Threshold: threshold value to measure the aggregated sampled `metric` value against. Combined with the `operator` field, determines whether a scaling action should be triggered.
Threshold float32 `json:"threshold"`
}
Metric: metric.
type MetricAggregate ¶
type MetricAggregate string
func (MetricAggregate) MarshalJSON ¶
func (enum MetricAggregate) MarshalJSON() ([]byte, error)
func (MetricAggregate) String ¶
func (enum MetricAggregate) String() string
func (*MetricAggregate) UnmarshalJSON ¶
func (enum *MetricAggregate) UnmarshalJSON(data []byte) error
func (MetricAggregate) Values ¶
func (enum MetricAggregate) Values() []MetricAggregate
type MetricManagedMetric ¶
type MetricManagedMetric string
func (MetricManagedMetric) MarshalJSON ¶
func (enum MetricManagedMetric) MarshalJSON() ([]byte, error)
func (MetricManagedMetric) String ¶
func (enum MetricManagedMetric) String() string
func (*MetricManagedMetric) UnmarshalJSON ¶
func (enum *MetricManagedMetric) UnmarshalJSON(data []byte) error
func (MetricManagedMetric) Values ¶
func (enum MetricManagedMetric) Values() []MetricManagedMetric
type MetricOperator ¶
type MetricOperator string
func (MetricOperator) MarshalJSON ¶
func (enum MetricOperator) MarshalJSON() ([]byte, error)
func (MetricOperator) String ¶
func (enum MetricOperator) String() string
func (*MetricOperator) UnmarshalJSON ¶
func (enum *MetricOperator) UnmarshalJSON(data []byte) error
func (MetricOperator) Values ¶
func (enum MetricOperator) Values() []MetricOperator
type UpdateInstanceGroupRequest ¶
type UpdateInstanceGroupRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// InstanceGroupID: instance group ID to update.
InstanceGroupID string `json:"-"`
// Name: name of Instance group.
Name *string `json:"name,omitempty"`
// Tags: list of tags for the Load Balancer.
Tags *[]string `json:"tags,omitempty"`
// Capacity: specification of the minimum and maximum replicas for the Instance group, and the cooldown interval between two scaling events.
Capacity *UpdateInstanceGroupRequestCapacity `json:"capacity,omitempty"`
// Loadbalancer: specification of the Load Balancer to link to the Instance group.
Loadbalancer *UpdateInstanceGroupRequestLoadbalancer `json:"loadbalancer,omitempty"`
}
UpdateInstanceGroupRequest: update instance group request.
type UpdateInstanceGroupRequestCapacity ¶
type UpdateInstanceGroupRequestCapacity struct {
// MaxReplicas: maximum count of Instances for the Instance group.
MaxReplicas *uint32 `json:"max_replicas"`
// MinReplicas: minimum count of Instances for the Instance group.
MinReplicas *uint32 `json:"min_replicas"`
// CooldownDelay: time (in seconds) after a scaling action during which requests to carry out a new scaling action will be denied.
CooldownDelay *scw.Duration `json:"cooldown_delay"`
}
UpdateInstanceGroupRequestCapacity: update instance group request capacity.
type UpdateInstanceGroupRequestLoadbalancer ¶
type UpdateInstanceGroupRequestLoadbalancer struct {
// BackendIDs: load Balancer backend IDs.
BackendIDs *[]string `json:"backend_ids"`
}
UpdateInstanceGroupRequestLoadbalancer: update instance group request loadbalancer.
type UpdateInstancePolicyRequest ¶
type UpdateInstancePolicyRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// PolicyID: policy ID to update.
PolicyID string `json:"-"`
// Name: policy name to update.
Name *string `json:"name,omitempty"`
// Metric: metric specification to update (Cockpit metric to use when determining whether to trigger a scale up/down action).
// Precisely one of Metric must be set.
Metric *UpdateInstancePolicyRequestMetric `json:"metric,omitempty"`
// Action: action to update (action to execute when the metric-based condition is met).
// Default value: unknown_action
Action InstancePolicyAction `json:"action"`
// Type: type to update (how to use the number defined in `value` when determining by how many Instances to scale up/down).
// Default value: unknown_type
Type InstancePolicyType `json:"type"`
// Value: value to update (number representing the magnitude of the scaling action to take for the Instance group).
Value *uint32 `json:"value,omitempty"`
// Priority: priority to update (priority of this policy compared to all other scaling policies. The lower the number, the higher the priority).
Priority *uint32 `json:"priority,omitempty"`
}
UpdateInstancePolicyRequest: update instance policy request.
type UpdateInstancePolicyRequestMetric ¶
type UpdateInstancePolicyRequestMetric struct {
// Name: name or description of your metric policy.
Name *string `json:"name"`
// ManagedMetric: managed metric to use for this policy. These are available by default in Cockpit without any configuration or `node_exporter`. The chosen metric forms the basis of the condition that will be checked to determine whether a scaling action should be triggered.
// Default value: managed_metric_unknown
// Precisely one of ManagedMetric, CockpitMetricName must be set.
ManagedMetric *UpdateInstancePolicyRequestMetricManagedMetric `json:"managed_metric,omitempty"`
// CockpitMetricName: custom metric to use for this policy. This must be stored in Scaleway Cockpit. The metric forms the basis of the condition that will be checked to determine whether a scaling action should be triggered.
// Precisely one of ManagedMetric, CockpitMetricName must be set.
CockpitMetricName *string `json:"cockpit_metric_name,omitempty"`
// Operator: operator used when comparing the threshold value of the chosen `metric` to the actual sampled and aggregated value.
// Default value: operator_unknown
Operator UpdateInstancePolicyRequestMetricOperator `json:"operator"`
// Aggregate: how the values sampled for the `metric` should be aggregated.
// Default value: aggregate_unknown
Aggregate UpdateInstancePolicyRequestMetricAggregate `json:"aggregate"`
// SamplingRangeMin: interval of time, in minutes, during which metric is sampled.
SamplingRangeMin *uint32 `json:"sampling_range_min"`
// Threshold: threshold value to measure the aggregated sampled `metric` value against. Combined with the `operator` field, determines whether a scaling action should be triggered.
Threshold *float32 `json:"threshold"`
}
UpdateInstancePolicyRequestMetric: update instance policy request metric.
type UpdateInstancePolicyRequestMetricAggregate ¶
type UpdateInstancePolicyRequestMetricAggregate string
func (UpdateInstancePolicyRequestMetricAggregate) MarshalJSON ¶
func (enum UpdateInstancePolicyRequestMetricAggregate) MarshalJSON() ([]byte, error)
func (UpdateInstancePolicyRequestMetricAggregate) String ¶
func (enum UpdateInstancePolicyRequestMetricAggregate) String() string
func (*UpdateInstancePolicyRequestMetricAggregate) UnmarshalJSON ¶
func (enum *UpdateInstancePolicyRequestMetricAggregate) UnmarshalJSON(data []byte) error
func (UpdateInstancePolicyRequestMetricAggregate) Values ¶
func (enum UpdateInstancePolicyRequestMetricAggregate) Values() []UpdateInstancePolicyRequestMetricAggregate
type UpdateInstancePolicyRequestMetricManagedMetric ¶
type UpdateInstancePolicyRequestMetricManagedMetric string
func (UpdateInstancePolicyRequestMetricManagedMetric) MarshalJSON ¶
func (enum UpdateInstancePolicyRequestMetricManagedMetric) MarshalJSON() ([]byte, error)
func (UpdateInstancePolicyRequestMetricManagedMetric) String ¶
func (enum UpdateInstancePolicyRequestMetricManagedMetric) String() string
func (*UpdateInstancePolicyRequestMetricManagedMetric) UnmarshalJSON ¶
func (enum *UpdateInstancePolicyRequestMetricManagedMetric) UnmarshalJSON(data []byte) error
func (UpdateInstancePolicyRequestMetricManagedMetric) Values ¶
func (enum UpdateInstancePolicyRequestMetricManagedMetric) Values() []UpdateInstancePolicyRequestMetricManagedMetric
type UpdateInstancePolicyRequestMetricOperator ¶
type UpdateInstancePolicyRequestMetricOperator string
func (UpdateInstancePolicyRequestMetricOperator) MarshalJSON ¶
func (enum UpdateInstancePolicyRequestMetricOperator) MarshalJSON() ([]byte, error)
func (UpdateInstancePolicyRequestMetricOperator) String ¶
func (enum UpdateInstancePolicyRequestMetricOperator) String() string
func (*UpdateInstancePolicyRequestMetricOperator) UnmarshalJSON ¶
func (enum *UpdateInstancePolicyRequestMetricOperator) UnmarshalJSON(data []byte) error
func (UpdateInstancePolicyRequestMetricOperator) Values ¶
func (enum UpdateInstancePolicyRequestMetricOperator) Values() []UpdateInstancePolicyRequestMetricOperator
type UpdateInstanceTemplateRequest ¶
type UpdateInstanceTemplateRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// TemplateID: template ID of the resource.
TemplateID string `json:"-"`
// CommercialType: name of Instance commercial type.
CommercialType *string `json:"commercial_type,omitempty"`
// ImageID: instance image ID. Can be an ID of a marketplace or personal image. This image must be compatible with `volume` and `commercial_type` template.
ImageID *string `json:"image_id,omitempty"`
// Volumes: template of Instance volume.
Volumes map[string]*VolumeInstanceTemplate `json:"volumes"`
// Tags: list of tags for the Instance template.
Tags *[]string `json:"tags,omitempty"`
// SecurityGroupID: instance security group ID (optional).
SecurityGroupID *string `json:"security_group_id,omitempty"`
// PlacementGroupID: instance placement group ID. This is optional, but it is highly recommended to set a preference for Instance location within Availability Zone.
PlacementGroupID *string `json:"placement_group_id,omitempty"`
// PublicIPsV4Count: number of flexible IPv4 addresses to attach to the new Instance.
PublicIPsV4Count *uint32 `json:"public_ips_v4_count,omitempty"`
// PublicIPsV6Count: number of flexible IPv6 addresses to attach to the new Instance.
PublicIPsV6Count *uint32 `json:"public_ips_v6_count,omitempty"`
// Name: name of Instance template.
Name *string `json:"name,omitempty"`
// PrivateNetworkIDs: private Network IDs to attach to the new Instance.
PrivateNetworkIDs *[]string `json:"private_network_ids,omitempty"`
// CloudInit: cloud-config file must be passed in Base64 format. Cloud-config files are special scripts designed to be run by the cloud-init process. These are generally used for initial configuration on the very first boot of a server.
CloudInit *[]byte `json:"cloud_init,omitempty"`
}
UpdateInstanceTemplateRequest: update instance template request.
type VolumeInstanceTemplate ¶
type VolumeInstanceTemplate struct {
// Name: name of the volume.
Name string `json:"name"`
// PerfIops: the maximum IO/s expected, according to the different options available in stock (`5000 | 15000`).
// Precisely one of PerfIops must be set.
PerfIops *uint32 `json:"perf_iops,omitempty"`
// FromEmpty: specify the size of the new volume if creating a new one from scratch.
// Precisely one of FromEmpty, FromSnapshot must be set.
FromEmpty *VolumeInstanceTemplateFromEmpty `json:"from_empty,omitempty"`
// FromSnapshot: specify the snapshot ID of the original snapshot.
// Precisely one of FromEmpty, FromSnapshot must be set.
FromSnapshot *VolumeInstanceTemplateFromSnapshot `json:"from_snapshot,omitempty"`
// Tags: list of tags assigned to the volume.
Tags []string `json:"tags"`
// Boot: force the Instance to boot on this volume.
Boot bool `json:"boot"`
// VolumeType: type of the volume.
// Default value: unknown_volume_type
VolumeType VolumeInstanceTemplateVolumeType `json:"volume_type"`
}
VolumeInstanceTemplate: volume instance template.
type VolumeInstanceTemplateFromEmpty ¶
VolumeInstanceTemplateFromEmpty: volume instance template from empty.
type VolumeInstanceTemplateFromSnapshot ¶
type VolumeInstanceTemplateFromSnapshot struct {
Size *scw.Size `json:"size"`
SnapshotID string `json:"snapshot_id"`
}
VolumeInstanceTemplateFromSnapshot: volume instance template from snapshot.
type VolumeInstanceTemplateVolumeType ¶
type VolumeInstanceTemplateVolumeType string
func (VolumeInstanceTemplateVolumeType) MarshalJSON ¶
func (enum VolumeInstanceTemplateVolumeType) MarshalJSON() ([]byte, error)
func (VolumeInstanceTemplateVolumeType) String ¶
func (enum VolumeInstanceTemplateVolumeType) String() string
func (*VolumeInstanceTemplateVolumeType) UnmarshalJSON ¶
func (enum *VolumeInstanceTemplateVolumeType) UnmarshalJSON(data []byte) error
func (VolumeInstanceTemplateVolumeType) Values ¶
func (enum VolumeInstanceTemplateVolumeType) Values() []VolumeInstanceTemplateVolumeType