@scaleway/sdk-autoscaling 2.15.0 → 2.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { CreateGroupRequest, DeleteGroupRequest, GetGroupRequest, Group, ListAlertsRequest, ListAlertsResponse, ListGroupsRequest, ListGroupsResponse, ListLogsRequest, ListLogsResponse, ListServersRequest, ListServersResponse, UpdateGroupRequest } from "./types.gen.js";
1
+ import { CreateGroupRequest, DeleteGroupRequest, GetGroupRequest, Group, ListAlertsRequest, ListAlertsResponse, ListGroupsRequest, ListGroupsResponse, ListLogsRequest, ListLogsResponse, ListServersRequest, ListServersResponse, RefreshGroupRequest, UpdateGroupRequest } from "./types.gen.js";
2
2
  import { API, ApiLocality, WaitForOptions } from "@scaleway/sdk-client";
3
3
  //#region src/v1alpha2/api.gen.d.ts
4
4
  /**
@@ -42,6 +42,14 @@ declare class API$1 extends API {
42
42
  * @returns A Promise of Group
43
43
  */
44
44
  createGroup: (request: Readonly<CreateGroupRequest>) => Promise<Group>;
45
+ /**
46
+ * Refresh an autoscaling group. This will replace all the instances of the group.
47
+ Its main use case is applying changes if the instance template has been updated.
48
+ *
49
+ * @param request - The request {@link RefreshGroupRequest}
50
+ * @returns A Promise of Group
51
+ */
52
+ refreshGroup: (request: Readonly<RefreshGroupRequest>) => Promise<Group>;
45
53
  /**
46
54
  * Update an autoscaling group. Update the configuration of a specified autoscaling group including
47
55
  name, tags, template, scaling policy, and load balancer settings.
@@ -26,6 +26,12 @@ var API$1 = class extends API {
26
26
  method: "POST",
27
27
  path: `/autoscaling/v1alpha2/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/groups`
28
28
  }, unmarshalGroup);
29
+ this.refreshGroup = (request) => this.client.fetch({
30
+ body: "{}",
31
+ headers: jsonContentHeaders,
32
+ method: "POST",
33
+ path: `/autoscaling/v1alpha2/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/groups/${validatePathParam("groupId", request.groupId)}/refresh`
34
+ }, unmarshalGroup);
29
35
  this.updateGroup = (request) => this.client.fetch({
30
36
  body: JSON.stringify(marshalUpdateGroupRequest(request, this.client.settings)),
31
37
  headers: jsonContentHeaders,
@@ -63,7 +69,13 @@ var API$1 = class extends API {
63
69
  this.LOCALITY = toApiLocality({ zones: [
64
70
  "fr-par-1",
65
71
  "fr-par-2",
66
- "fr-par-3"
72
+ "fr-par-3",
73
+ "nl-ams-1",
74
+ "nl-ams-2",
75
+ "nl-ams-3",
76
+ "pl-waw-1",
77
+ "pl-waw-2",
78
+ "pl-waw-3"
67
79
  ] });
68
80
  }
69
81
  };
@@ -1,11 +1,11 @@
1
- import { Alert, AlertAlertType, CreateGroupRequest, DeleteGroupRequest, GetGroupRequest, Group, GroupGroupStatus, GroupLoadBalancerConfiguration, GroupLoadBalancerConfigurationAutoHealing, GroupLoadBalancerConfigurationBackend, GroupLoadBalancerConfigurationBackendAddressFamily, GroupScalingPolicy, GroupScalingPolicyScalingPolicyCpuTarget, GroupScalingPolicyScalingPolicyFixedSize, GroupScalingPolicyScalingPolicyMemoryTarget, GroupSummary, GroupSummaryScalingPolicyTargetType, ListAlertsRequest, ListAlertsResponse, ListGroupsRequest, ListGroupsRequestOrderBy, ListGroupsResponse, ListLogsRequest, ListLogsResponse, ListServersRequest, ListServersResponse, LoadBalancerConfigurationSpec, LoadBalancerConfigurationSpecAutoHealing, LoadBalancerConfigurationSpecBackend, Log, LogLogLevel, ScalingPolicySpec, Server, UpdateGroupRequest } from "./types.gen.js";
1
+ import { Alert, AlertAlertType, CreateGroupRequest, DeleteGroupRequest, GetGroupRequest, Group, GroupGroupStatus, GroupLoadBalancerConfiguration, GroupLoadBalancerConfigurationAutoHealing, GroupLoadBalancerConfigurationBackend, GroupLoadBalancerConfigurationBackendAddressFamily, GroupScalingPolicy, GroupScalingPolicyScalingPolicyCpuTarget, GroupScalingPolicyScalingPolicyFixedSize, GroupScalingPolicyScalingPolicyMemoryTarget, GroupSummary, GroupSummaryScalingPolicyTargetType, ListAlertsRequest, ListAlertsResponse, ListGroupsRequest, ListGroupsRequestOrderBy, ListGroupsResponse, ListLogsRequest, ListLogsResponse, ListServersRequest, ListServersResponse, LoadBalancerConfigurationSpec, LoadBalancerConfigurationSpecAutoHealing, LoadBalancerConfigurationSpecBackend, Log, LogLogLevel, RefreshGroupRequest, ScalingPolicySpec, Server, UpdateGroupRequest } from "./types.gen.js";
2
2
  import { API } from "./api.gen.js";
3
3
  import { GROUP_GROUP_TRANSIENT_STATUSES } from "./content.gen.js";
4
4
  import { ALERT_ALERT_TYPES, GROUP_GROUP_STATUSES, GROUP_LOAD_BALANCER_CONFIGURATION_BACKEND_ADDRESS_FAMILIES, GROUP_SUMMARY_SCALING_POLICY_TARGET_TYPES, LIST_GROUPS_REQUEST_ORDER_BIES, LOG_LOG_LEVELS } from "./constants.gen.js";
5
5
  import { marshalCreateGroupRequest, marshalUpdateGroupRequest, unmarshalGroup, unmarshalListAlertsResponse, unmarshalListGroupsResponse, unmarshalListLogsResponse, unmarshalListServersResponse } from "./marshalling.gen.js";
6
6
  import { validation_rules_gen_d_exports } from "./validation-rules.gen.js";
7
7
  declare namespace index_gen_d_exports {
8
- export { ALERT_ALERT_TYPES, API, Alert, AlertAlertType, CreateGroupRequest, DeleteGroupRequest, GROUP_GROUP_STATUSES, GROUP_GROUP_TRANSIENT_STATUSES, GROUP_LOAD_BALANCER_CONFIGURATION_BACKEND_ADDRESS_FAMILIES, GROUP_SUMMARY_SCALING_POLICY_TARGET_TYPES, GetGroupRequest, Group, GroupGroupStatus, GroupLoadBalancerConfiguration, GroupLoadBalancerConfigurationAutoHealing, GroupLoadBalancerConfigurationBackend, GroupLoadBalancerConfigurationBackendAddressFamily, GroupScalingPolicy, GroupScalingPolicyScalingPolicyCpuTarget, GroupScalingPolicyScalingPolicyFixedSize, GroupScalingPolicyScalingPolicyMemoryTarget, GroupSummary, GroupSummaryScalingPolicyTargetType, LIST_GROUPS_REQUEST_ORDER_BIES, LOG_LOG_LEVELS, ListAlertsRequest, ListAlertsResponse, ListGroupsRequest, ListGroupsRequestOrderBy, ListGroupsResponse, ListLogsRequest, ListLogsResponse, ListServersRequest, ListServersResponse, LoadBalancerConfigurationSpec, LoadBalancerConfigurationSpecAutoHealing, LoadBalancerConfigurationSpecBackend, Log, LogLogLevel, ScalingPolicySpec, Server, UpdateGroupRequest, validation_rules_gen_d_exports as ValidationRules, marshalCreateGroupRequest, marshalUpdateGroupRequest, unmarshalGroup, unmarshalListAlertsResponse, unmarshalListGroupsResponse, unmarshalListLogsResponse, unmarshalListServersResponse };
8
+ export { ALERT_ALERT_TYPES, API, Alert, AlertAlertType, CreateGroupRequest, DeleteGroupRequest, GROUP_GROUP_STATUSES, GROUP_GROUP_TRANSIENT_STATUSES, GROUP_LOAD_BALANCER_CONFIGURATION_BACKEND_ADDRESS_FAMILIES, GROUP_SUMMARY_SCALING_POLICY_TARGET_TYPES, GetGroupRequest, Group, GroupGroupStatus, GroupLoadBalancerConfiguration, GroupLoadBalancerConfigurationAutoHealing, GroupLoadBalancerConfigurationBackend, GroupLoadBalancerConfigurationBackendAddressFamily, GroupScalingPolicy, GroupScalingPolicyScalingPolicyCpuTarget, GroupScalingPolicyScalingPolicyFixedSize, GroupScalingPolicyScalingPolicyMemoryTarget, GroupSummary, GroupSummaryScalingPolicyTargetType, LIST_GROUPS_REQUEST_ORDER_BIES, LOG_LOG_LEVELS, ListAlertsRequest, ListAlertsResponse, ListGroupsRequest, ListGroupsRequestOrderBy, ListGroupsResponse, ListLogsRequest, ListLogsResponse, ListServersRequest, ListServersResponse, LoadBalancerConfigurationSpec, LoadBalancerConfigurationSpecAutoHealing, LoadBalancerConfigurationSpecBackend, Log, LogLogLevel, RefreshGroupRequest, ScalingPolicySpec, Server, UpdateGroupRequest, validation_rules_gen_d_exports as ValidationRules, marshalCreateGroupRequest, marshalUpdateGroupRequest, unmarshalGroup, unmarshalListAlertsResponse, unmarshalListGroupsResponse, unmarshalListLogsResponse, unmarshalListServersResponse };
9
9
  }
10
10
  //#endregion
11
- export { ALERT_ALERT_TYPES, API, type Alert, type AlertAlertType, type CreateGroupRequest, type DeleteGroupRequest, GROUP_GROUP_STATUSES, GROUP_GROUP_TRANSIENT_STATUSES, GROUP_LOAD_BALANCER_CONFIGURATION_BACKEND_ADDRESS_FAMILIES, GROUP_SUMMARY_SCALING_POLICY_TARGET_TYPES, type GetGroupRequest, type Group, type GroupGroupStatus, type GroupLoadBalancerConfiguration, type GroupLoadBalancerConfigurationAutoHealing, type GroupLoadBalancerConfigurationBackend, type GroupLoadBalancerConfigurationBackendAddressFamily, type GroupScalingPolicy, type GroupScalingPolicyScalingPolicyCpuTarget, type GroupScalingPolicyScalingPolicyFixedSize, type GroupScalingPolicyScalingPolicyMemoryTarget, type GroupSummary, type GroupSummaryScalingPolicyTargetType, LIST_GROUPS_REQUEST_ORDER_BIES, LOG_LOG_LEVELS, type ListAlertsRequest, type ListAlertsResponse, type ListGroupsRequest, type ListGroupsRequestOrderBy, type ListGroupsResponse, type ListLogsRequest, type ListLogsResponse, type ListServersRequest, type ListServersResponse, type LoadBalancerConfigurationSpec, type LoadBalancerConfigurationSpecAutoHealing, type LoadBalancerConfigurationSpecBackend, type Log, type LogLogLevel, type ScalingPolicySpec, type Server, type UpdateGroupRequest, validation_rules_gen_d_exports as ValidationRules, index_gen_d_exports, marshalCreateGroupRequest, marshalUpdateGroupRequest, unmarshalGroup, unmarshalListAlertsResponse, unmarshalListGroupsResponse, unmarshalListLogsResponse, unmarshalListServersResponse };
11
+ export { ALERT_ALERT_TYPES, API, type Alert, type AlertAlertType, type CreateGroupRequest, type DeleteGroupRequest, GROUP_GROUP_STATUSES, GROUP_GROUP_TRANSIENT_STATUSES, GROUP_LOAD_BALANCER_CONFIGURATION_BACKEND_ADDRESS_FAMILIES, GROUP_SUMMARY_SCALING_POLICY_TARGET_TYPES, type GetGroupRequest, type Group, type GroupGroupStatus, type GroupLoadBalancerConfiguration, type GroupLoadBalancerConfigurationAutoHealing, type GroupLoadBalancerConfigurationBackend, type GroupLoadBalancerConfigurationBackendAddressFamily, type GroupScalingPolicy, type GroupScalingPolicyScalingPolicyCpuTarget, type GroupScalingPolicyScalingPolicyFixedSize, type GroupScalingPolicyScalingPolicyMemoryTarget, type GroupSummary, type GroupSummaryScalingPolicyTargetType, LIST_GROUPS_REQUEST_ORDER_BIES, LOG_LOG_LEVELS, type ListAlertsRequest, type ListAlertsResponse, type ListGroupsRequest, type ListGroupsRequestOrderBy, type ListGroupsResponse, type ListLogsRequest, type ListLogsResponse, type ListServersRequest, type ListServersResponse, type LoadBalancerConfigurationSpec, type LoadBalancerConfigurationSpecAutoHealing, type LoadBalancerConfigurationSpecBackend, type Log, type LogLogLevel, type RefreshGroupRequest, type ScalingPolicySpec, type Server, type UpdateGroupRequest, validation_rules_gen_d_exports as ValidationRules, index_gen_d_exports, marshalCreateGroupRequest, marshalUpdateGroupRequest, unmarshalGroup, unmarshalListAlertsResponse, unmarshalListGroupsResponse, unmarshalListLogsResponse, unmarshalListServersResponse };
@@ -474,6 +474,13 @@ export interface ListServersResponse {
474
474
  */
475
475
  totalCount: number;
476
476
  }
477
+ export type RefreshGroupRequest = {
478
+ /**
479
+ * Zone to target. If none is passed will use default zone from the config.
480
+ */
481
+ zone?: Zone;
482
+ groupId: string;
483
+ };
477
484
  export type UpdateGroupRequest = {
478
485
  /**
479
486
  * Zone to target. If none is passed will use default zone from the config.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-autoscaling",
3
- "version": "2.15.0",
3
+ "version": "2.15.1",
4
4
  "description": "Scaleway SDK autoscaling",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -33,14 +33,14 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@scaleway/random-name": "6.0.2",
36
- "@scaleway/sdk-std": "2.9.0"
36
+ "@scaleway/sdk-std": "2.9.1"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@repo/configs": "^0.1.1",
40
- "@scaleway/sdk-client": "^2.12.0"
40
+ "@scaleway/sdk-client": "^2.12.1"
41
41
  },
42
42
  "peerDependencies": {
43
- "@scaleway/sdk-client": "^2.12.0"
43
+ "@scaleway/sdk-client": "^2.12.1"
44
44
  },
45
45
  "scripts": {
46
46
  "package:check": "pnpm publint",