Skip to content

Commit c8dc8f5

Browse files
feat: Add standby compression start delay
1 parent 26efd2a commit c8dc8f5

7 files changed

Lines changed: 45 additions & 5 deletions

File tree

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 52
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fhypeman-52bc64e89c8406b774158cdb7fdb239dd4c39e6bace06b32e5224b82462f9ffe.yml
3-
openapi_spec_hash: 647ddb91aa6aca7034f2015071c30ce6
4-
config_hash: d81afc6f4fabf65fc9291db9ddd79f87
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fhypeman-c6da5deb317c83b7a10434593eb22ec7cb27009aba0b92efaefbbe21884054ad.yml
3+
openapi_spec_hash: ff73a0e1f7a8bd5a5d1ae38d994bb9cd
4+
config_hash: ed668fae8826ff533f38df16c9664f44

api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Types:
4242
- <code><a href="./src/resources/instances/instances.ts">SnapshotPolicy</a></code>
4343
- <code><a href="./src/resources/instances/instances.ts">SnapshotSchedule</a></code>
4444
- <code><a href="./src/resources/instances/instances.ts">SnapshotScheduleRetention</a></code>
45+
- <code><a href="./src/resources/instances/instances.ts">StandbyInstanceRequest</a></code>
4546
- <code><a href="./src/resources/instances/instances.ts">VolumeMount</a></code>
4647
- <code><a href="./src/resources/instances/instances.ts">WaitForStateResponse</a></code>
4748
- <code><a href="./src/resources/instances/instances.ts">InstanceListResponse</a></code>

src/client.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ import {
104104
SnapshotPolicy,
105105
SnapshotSchedule,
106106
SnapshotScheduleRetention,
107+
StandbyInstanceRequest,
107108
VolumeMount,
108109
WaitForStateResponse,
109110
} from './resources/instances/instances';
@@ -849,6 +850,7 @@ export declare namespace Hypeman {
849850
type SnapshotPolicy as SnapshotPolicy,
850851
type SnapshotSchedule as SnapshotSchedule,
851852
type SnapshotScheduleRetention as SnapshotScheduleRetention,
853+
type StandbyInstanceRequest as StandbyInstanceRequest,
852854
type VolumeMount as VolumeMount,
853855
type WaitForStateResponse as WaitForStateResponse,
854856
type InstanceListResponse as InstanceListResponse,

src/resources/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export {
5353
type SnapshotPolicy,
5454
type SnapshotSchedule,
5555
type SnapshotScheduleRetention,
56+
type StandbyInstanceRequest,
5657
type VolumeMount,
5758
type WaitForStateResponse,
5859
type InstanceListResponse,

src/resources/instances/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export {
1313
type SnapshotPolicy,
1414
type SnapshotSchedule,
1515
type SnapshotScheduleRetention,
16+
type StandbyInstanceRequest,
1617
type VolumeMount,
1718
type WaitForStateResponse,
1819
type InstanceListResponse,

src/resources/instances/instances.ts

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -665,6 +665,13 @@ export interface SetSnapshotScheduleRequest {
665665

666666
export interface SnapshotPolicy {
667667
compression?: Shared.SnapshotCompressionConfig;
668+
669+
/**
670+
* Delay before standby snapshot compression begins, expressed as a Go duration
671+
* like "30s" or "5m". Applies only to standby compression and defaults to
672+
* immediate start when omitted.
673+
*/
674+
standby_compression_delay?: string;
668675
}
669676

670677
export interface SnapshotSchedule {
@@ -740,6 +747,20 @@ export interface SnapshotScheduleRetention {
740747
max_count?: number;
741748
}
742749

750+
export interface StandbyInstanceRequest {
751+
/**
752+
* Compression settings for standby snapshot memory. Overrides instance defaults.
753+
*/
754+
compression?: Shared.SnapshotCompressionConfig;
755+
756+
/**
757+
* Delay before standby snapshot compression begins, expressed as a Go duration
758+
* like "30s" or "5m". Overrides the instance default for this standby operation
759+
* only.
760+
*/
761+
compression_delay?: string;
762+
}
763+
743764
export interface VolumeMount {
744765
/**
745766
* Path where volume is mounted in the guest
@@ -890,8 +911,9 @@ export interface InstanceCreateParams {
890911
skip_kernel_headers?: boolean;
891912

892913
/**
893-
* Snapshot compression policy for this instance. Controls compression settings
894-
* applied when creating snapshots or entering standby.
914+
* Snapshot policy for this instance. Controls compression settings applied when
915+
* creating snapshots or entering standby, plus any default standby-only
916+
* compression delay.
895917
*/
896918
snapshot_policy?: SnapshotPolicy;
897919

@@ -1107,7 +1129,17 @@ export interface InstanceLogsParams {
11071129
}
11081130

11091131
export interface InstanceStandbyParams {
1132+
/**
1133+
* Compression settings for standby snapshot memory. Overrides instance defaults.
1134+
*/
11101135
compression?: Shared.SnapshotCompressionConfig;
1136+
1137+
/**
1138+
* Delay before standby snapshot compression begins, expressed as a Go duration
1139+
* like "30s" or "5m". Overrides the instance default for this standby operation
1140+
* only.
1141+
*/
1142+
compression_delay?: string;
11111143
}
11121144

11131145
export interface InstanceStartParams {
@@ -1163,6 +1195,7 @@ export declare namespace Instances {
11631195
type SnapshotPolicy as SnapshotPolicy,
11641196
type SnapshotSchedule as SnapshotSchedule,
11651197
type SnapshotScheduleRetention as SnapshotScheduleRetention,
1198+
type StandbyInstanceRequest as StandbyInstanceRequest,
11661199
type VolumeMount as VolumeMount,
11671200
type WaitForStateResponse as WaitForStateResponse,
11681201
type InstanceListResponse as InstanceListResponse,

tests/api-resources/instances/instances.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ describe('resource instances', () => {
7272
algorithm: 'zstd',
7373
level: 1,
7474
},
75+
standby_compression_delay: '2m',
7576
},
7677
tags: { team: 'backend', env: 'staging' },
7778
vcpus: 2,
@@ -234,6 +235,7 @@ describe('resource instances', () => {
234235
algorithm: 'zstd',
235236
level: 1,
236237
},
238+
compression_delay: '45s',
237239
},
238240
{ path: '/_stainless_unknown_path' },
239241
),

0 commit comments

Comments
 (0)