@athenaintel/sdk 4.3.2244 → 4.3.2246
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.
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/assets/client/Client.d.ts +19 -1
- package/dist/cjs/api/resources/assets/client/Client.js +86 -1
- package/dist/cjs/api/resources/assets/client/requests/CreateAssetRequestIn.d.ts +2 -0
- package/dist/cjs/api/resources/assets/client/requests/GetAccessAssetsRequest.d.ts +12 -0
- package/dist/cjs/api/resources/assets/client/requests/GetAccessAssetsRequest.js +3 -0
- package/dist/cjs/api/resources/assets/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/databases/client/Client.d.ts +77 -4
- package/dist/cjs/api/resources/databases/client/Client.js +296 -4
- package/dist/cjs/api/resources/databases/client/requests/DatabaseComputeSettingsUpdateRequestIn.d.ts +12 -0
- package/dist/cjs/api/resources/databases/client/requests/DatabaseComputeSettingsUpdateRequestIn.js +3 -0
- package/dist/cjs/api/resources/databases/client/requests/GetSettingsDatabasesRequest.d.ts +9 -0
- package/dist/cjs/api/resources/databases/client/requests/GetSettingsDatabasesRequest.js +3 -0
- package/dist/cjs/api/resources/databases/client/requests/WakeDatabasesRequest.d.ts +9 -0
- package/dist/cjs/api/resources/databases/client/requests/WakeDatabasesRequest.js +3 -0
- package/dist/cjs/api/resources/databases/client/requests/index.d.ts +3 -0
- package/dist/cjs/api/resources/tools/resources/sheets/client/requests/UpdateSheetCellRequest.d.ts +3 -0
- package/dist/cjs/api/types/AssetAccessOut.d.ts +28 -0
- package/dist/cjs/api/types/AssetAccessOut.js +14 -0
- package/dist/cjs/api/types/AssetAccessSourceOut.d.ts +32 -0
- package/dist/cjs/api/types/AssetAccessSourceOut.js +22 -0
- package/dist/cjs/api/types/DatabaseComputeSettingsResponseOut.d.ts +9 -0
- package/dist/cjs/api/types/DatabaseComputeSettingsResponseOut.js +3 -0
- package/dist/cjs/api/types/DatabaseStatusResponse.d.ts +2 -0
- package/dist/cjs/api/types/DatabaseWakeResponseOut.d.ts +19 -0
- package/dist/cjs/api/types/DatabaseWakeResponseOut.js +12 -0
- package/dist/cjs/api/types/index.d.ts +4 -0
- package/dist/cjs/api/types/index.js +4 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/assets/client/Client.d.mts +19 -1
- package/dist/esm/api/resources/assets/client/Client.mjs +86 -1
- package/dist/esm/api/resources/assets/client/requests/CreateAssetRequestIn.d.mts +2 -0
- package/dist/esm/api/resources/assets/client/requests/GetAccessAssetsRequest.d.mts +12 -0
- package/dist/esm/api/resources/assets/client/requests/GetAccessAssetsRequest.mjs +2 -0
- package/dist/esm/api/resources/assets/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/databases/client/Client.d.mts +77 -4
- package/dist/esm/api/resources/databases/client/Client.mjs +296 -4
- package/dist/esm/api/resources/databases/client/requests/DatabaseComputeSettingsUpdateRequestIn.d.mts +12 -0
- package/dist/esm/api/resources/databases/client/requests/DatabaseComputeSettingsUpdateRequestIn.mjs +2 -0
- package/dist/esm/api/resources/databases/client/requests/GetSettingsDatabasesRequest.d.mts +9 -0
- package/dist/esm/api/resources/databases/client/requests/GetSettingsDatabasesRequest.mjs +2 -0
- package/dist/esm/api/resources/databases/client/requests/WakeDatabasesRequest.d.mts +9 -0
- package/dist/esm/api/resources/databases/client/requests/WakeDatabasesRequest.mjs +2 -0
- package/dist/esm/api/resources/databases/client/requests/index.d.mts +3 -0
- package/dist/esm/api/resources/tools/resources/sheets/client/requests/UpdateSheetCellRequest.d.mts +3 -0
- package/dist/esm/api/types/AssetAccessOut.d.mts +28 -0
- package/dist/esm/api/types/AssetAccessOut.mjs +11 -0
- package/dist/esm/api/types/AssetAccessSourceOut.d.mts +32 -0
- package/dist/esm/api/types/AssetAccessSourceOut.mjs +19 -0
- package/dist/esm/api/types/DatabaseComputeSettingsResponseOut.d.mts +9 -0
- package/dist/esm/api/types/DatabaseComputeSettingsResponseOut.mjs +2 -0
- package/dist/esm/api/types/DatabaseStatusResponse.d.mts +2 -0
- package/dist/esm/api/types/DatabaseWakeResponseOut.d.mts +19 -0
- package/dist/esm/api/types/DatabaseWakeResponseOut.mjs +9 -0
- package/dist/esm/api/types/index.d.mts +4 -0
- package/dist/esm/api/types/index.mjs +4 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +275 -5
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
export type { DatabaseComputeSettingsUpdateRequestIn } from "./DatabaseComputeSettingsUpdateRequestIn.js";
|
|
1
2
|
export type { DatabaseSqlRequest } from "./DatabaseSqlRequest.js";
|
|
2
3
|
export type { DeleteDatabasesRequest } from "./DeleteDatabasesRequest.js";
|
|
4
|
+
export type { GetSettingsDatabasesRequest } from "./GetSettingsDatabasesRequest.js";
|
|
3
5
|
export type { GetStatusDatabasesRequest } from "./GetStatusDatabasesRequest.js";
|
|
4
6
|
export type { GetTableSchemaDatabasesRequest } from "./GetTableSchemaDatabasesRequest.js";
|
|
5
7
|
export type { InsertDataRequest } from "./InsertDataRequest.js";
|
|
6
8
|
export type { ListTablesDatabasesRequest } from "./ListTablesDatabasesRequest.js";
|
|
7
9
|
export type { SelectDatabasesRequest } from "./SelectDatabasesRequest.js";
|
|
8
10
|
export type { UpdateDataRequest } from "./UpdateDataRequest.js";
|
|
11
|
+
export type { WakeDatabasesRequest } from "./WakeDatabasesRequest.js";
|
package/dist/cjs/api/resources/tools/resources/sheets/client/requests/UpdateSheetCellRequest.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type * as AthenaIntelligence from "../../../../../../index.js";
|
|
1
2
|
/**
|
|
2
3
|
* @example
|
|
3
4
|
* {
|
|
@@ -12,6 +13,8 @@ export interface UpdateSheetCellRequest {
|
|
|
12
13
|
asset_id: string;
|
|
13
14
|
/** 1-based column index (e.g., 1 = column A) */
|
|
14
15
|
column: number;
|
|
16
|
+
/** Optional cell format (textFormat, backgroundColor, numberFormat, alignment, borders) applied in the same write as the value, like `formatting` on range/update. */
|
|
17
|
+
formatting?: AthenaIntelligence.CellFormat | null;
|
|
15
18
|
/** 1-based row index (e.g., 1 = first row) */
|
|
16
19
|
row: number;
|
|
17
20
|
/** Sheet ID (defaults to 1) */
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type * as AthenaIntelligence from "../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Response model for reading a user's effective access on an asset.
|
|
4
|
+
*/
|
|
5
|
+
export interface AssetAccessOut {
|
|
6
|
+
/** ID of the asset */
|
|
7
|
+
asset_id: string;
|
|
8
|
+
/** Whether the user has an active membership in the asset's workspace. A user who is not a member reads as 'none'; the one exception is the workspace's own external viewer, who can still open what is shared with them. A suspended member reads as 'none' with no sources, and this field still reports their membership. */
|
|
9
|
+
is_member: boolean;
|
|
10
|
+
/** The access the user has, as Athena's permission checks decide it: 'view' can open the asset, 'edit' can also change it and manage its sharing, 'owner' created it and can edit it, 'none' cannot open it. When a check refuses what a listed source grants, the level is lower than that source, and the level is what holds. */
|
|
11
|
+
level: AssetAccessOut.Level;
|
|
12
|
+
/** Every grant that contributes to the level */
|
|
13
|
+
sources: AthenaIntelligence.AssetAccessSourceOut[];
|
|
14
|
+
/** The user whose access was read */
|
|
15
|
+
user_id: string;
|
|
16
|
+
/** The workspace the asset belongs to */
|
|
17
|
+
workspace_id: string | null;
|
|
18
|
+
}
|
|
19
|
+
export declare namespace AssetAccessOut {
|
|
20
|
+
/** The access the user has, as Athena's permission checks decide it: 'view' can open the asset, 'edit' can also change it and manage its sharing, 'owner' created it and can edit it, 'none' cannot open it. When a check refuses what a listed source grants, the level is lower than that source, and the level is what holds. */
|
|
21
|
+
const Level: {
|
|
22
|
+
readonly Owner: "owner";
|
|
23
|
+
readonly Edit: "edit";
|
|
24
|
+
readonly View: "view";
|
|
25
|
+
readonly None: "none";
|
|
26
|
+
};
|
|
27
|
+
type Level = (typeof Level)[keyof typeof Level];
|
|
28
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.AssetAccessOut = void 0;
|
|
5
|
+
var AssetAccessOut;
|
|
6
|
+
(function (AssetAccessOut) {
|
|
7
|
+
/** The access the user has, as Athena's permission checks decide it: 'view' can open the asset, 'edit' can also change it and manage its sharing, 'owner' created it and can edit it, 'none' cannot open it. When a check refuses what a listed source grants, the level is lower than that source, and the level is what holds. */
|
|
8
|
+
AssetAccessOut.Level = {
|
|
9
|
+
Owner: "owner",
|
|
10
|
+
Edit: "edit",
|
|
11
|
+
View: "view",
|
|
12
|
+
None: "none",
|
|
13
|
+
};
|
|
14
|
+
})(AssetAccessOut || (exports.AssetAccessOut = AssetAccessOut = {}));
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One grant that contributes to a user's access on an asset.
|
|
3
|
+
*/
|
|
4
|
+
export interface AssetAccessSourceOut {
|
|
5
|
+
/** The workspace group, when kind is 'group' */
|
|
6
|
+
group_id?: string | null;
|
|
7
|
+
/** The workspace group's name, when kind is 'group' */
|
|
8
|
+
group_name?: string | null;
|
|
9
|
+
/** Where the grant comes from: 'owner' (the user created the asset), 'direct' (the asset is shared with the user), 'group' (it is shared with a workspace group the user belongs to), 'workspace' (it is shared with the whole workspace), 'drive' (a role on the drive the asset is in) or 'other' (access the share list does not hold, for example an environment admin, also on an asset in a drive, or the view of a folder that holds an asset the user can open). A folder's sharing reaches each asset inside it as that asset's own share, so a 'workspace' source on a sub-folder shows that a share of its parent folder reached it. */
|
|
10
|
+
kind: AssetAccessSourceOut.Kind;
|
|
11
|
+
/** The level this grant gives */
|
|
12
|
+
level: AssetAccessSourceOut.Level;
|
|
13
|
+
}
|
|
14
|
+
export declare namespace AssetAccessSourceOut {
|
|
15
|
+
/** Where the grant comes from: 'owner' (the user created the asset), 'direct' (the asset is shared with the user), 'group' (it is shared with a workspace group the user belongs to), 'workspace' (it is shared with the whole workspace), 'drive' (a role on the drive the asset is in) or 'other' (access the share list does not hold, for example an environment admin, also on an asset in a drive, or the view of a folder that holds an asset the user can open). A folder's sharing reaches each asset inside it as that asset's own share, so a 'workspace' source on a sub-folder shows that a share of its parent folder reached it. */
|
|
16
|
+
const Kind: {
|
|
17
|
+
readonly Owner: "owner";
|
|
18
|
+
readonly Direct: "direct";
|
|
19
|
+
readonly Group: "group";
|
|
20
|
+
readonly Workspace: "workspace";
|
|
21
|
+
readonly Drive: "drive";
|
|
22
|
+
readonly Other: "other";
|
|
23
|
+
};
|
|
24
|
+
type Kind = (typeof Kind)[keyof typeof Kind];
|
|
25
|
+
/** The level this grant gives */
|
|
26
|
+
const Level: {
|
|
27
|
+
readonly Owner: "owner";
|
|
28
|
+
readonly Edit: "edit";
|
|
29
|
+
readonly View: "view";
|
|
30
|
+
};
|
|
31
|
+
type Level = (typeof Level)[keyof typeof Level];
|
|
32
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.AssetAccessSourceOut = void 0;
|
|
5
|
+
var AssetAccessSourceOut;
|
|
6
|
+
(function (AssetAccessSourceOut) {
|
|
7
|
+
/** Where the grant comes from: 'owner' (the user created the asset), 'direct' (the asset is shared with the user), 'group' (it is shared with a workspace group the user belongs to), 'workspace' (it is shared with the whole workspace), 'drive' (a role on the drive the asset is in) or 'other' (access the share list does not hold, for example an environment admin, also on an asset in a drive, or the view of a folder that holds an asset the user can open). A folder's sharing reaches each asset inside it as that asset's own share, so a 'workspace' source on a sub-folder shows that a share of its parent folder reached it. */
|
|
8
|
+
AssetAccessSourceOut.Kind = {
|
|
9
|
+
Owner: "owner",
|
|
10
|
+
Direct: "direct",
|
|
11
|
+
Group: "group",
|
|
12
|
+
Workspace: "workspace",
|
|
13
|
+
Drive: "drive",
|
|
14
|
+
Other: "other",
|
|
15
|
+
};
|
|
16
|
+
/** The level this grant gives */
|
|
17
|
+
AssetAccessSourceOut.Level = {
|
|
18
|
+
Owner: "owner",
|
|
19
|
+
Edit: "edit",
|
|
20
|
+
View: "view",
|
|
21
|
+
};
|
|
22
|
+
})(AssetAccessSourceOut || (exports.AssetAccessSourceOut = AssetAccessSourceOut = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The database's compute settings that the public API can read and set.
|
|
3
|
+
*/
|
|
4
|
+
export interface DatabaseComputeSettingsResponseOut {
|
|
5
|
+
/** The database asset ID */
|
|
6
|
+
asset_id: string;
|
|
7
|
+
/** Seconds without activity after which the database suspends (scales to zero). 0 means it never suspends: the compute keeps running, and keeps using capacity, until you change this. Otherwise 60 to 86400 (24 hours). A new database starts with 1800 (30 minutes). The same setting as auto-suspend in the database's Settings in Athena. */
|
|
8
|
+
suspend_timeout_seconds: number;
|
|
9
|
+
}
|
|
@@ -11,6 +11,8 @@ export interface DatabaseStatusResponse {
|
|
|
11
11
|
message?: string | null;
|
|
12
12
|
/** Database provider ('kronos') */
|
|
13
13
|
provider: string;
|
|
14
|
+
/** Why the compute is in this state, when the control plane says: `ComputeUnschedulable` on a `suspended` database means no node could host its compute size, so a wake only restarts the same wait; choose a smaller compute size in the database's Settings in Athena first. Absent on older control planes. */
|
|
15
|
+
reason?: string | null;
|
|
14
16
|
/** Standardized database status */
|
|
15
17
|
status: DatabaseStatusResponse.Status;
|
|
16
18
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Response for a wake request.
|
|
3
|
+
*/
|
|
4
|
+
export interface DatabaseWakeResponseOut {
|
|
5
|
+
/** The database asset ID */
|
|
6
|
+
asset_id: string;
|
|
7
|
+
/** Optional detail from the control plane */
|
|
8
|
+
message?: string | null;
|
|
9
|
+
/** `running`: the compute was already running; its idle clock was reset. `starting`: the compute is starting; poll `GET /databases/{asset_id}/compute-status` until it reports `running`. */
|
|
10
|
+
status: DatabaseWakeResponseOut.Status;
|
|
11
|
+
}
|
|
12
|
+
export declare namespace DatabaseWakeResponseOut {
|
|
13
|
+
/** `running`: the compute was already running; its idle clock was reset. `starting`: the compute is starting; poll `GET /databases/{asset_id}/compute-status` until it reports `running`. */
|
|
14
|
+
const Status: {
|
|
15
|
+
readonly Running: "running";
|
|
16
|
+
readonly Starting: "starting";
|
|
17
|
+
};
|
|
18
|
+
type Status = (typeof Status)[keyof typeof Status];
|
|
19
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.DatabaseWakeResponseOut = void 0;
|
|
5
|
+
var DatabaseWakeResponseOut;
|
|
6
|
+
(function (DatabaseWakeResponseOut) {
|
|
7
|
+
/** `running`: the compute was already running; its idle clock was reset. `starting`: the compute is starting; poll `GET /databases/{asset_id}/compute-status` until it reports `running`. */
|
|
8
|
+
DatabaseWakeResponseOut.Status = {
|
|
9
|
+
Running: "running",
|
|
10
|
+
Starting: "starting",
|
|
11
|
+
};
|
|
12
|
+
})(DatabaseWakeResponseOut || (exports.DatabaseWakeResponseOut = DatabaseWakeResponseOut = {}));
|
|
@@ -15,6 +15,8 @@ export * from "./AopExecuteRequestIn.js";
|
|
|
15
15
|
export * from "./AopExecuteResponseOut.js";
|
|
16
16
|
export * from "./ApprovalMode.js";
|
|
17
17
|
export * from "./ArchiveAssetResponseOut.js";
|
|
18
|
+
export * from "./AssetAccessOut.js";
|
|
19
|
+
export * from "./AssetAccessSourceOut.js";
|
|
18
20
|
export * from "./AssetActivityDeltaResponseOut.js";
|
|
19
21
|
export * from "./AssetActivityResponseOut.js";
|
|
20
22
|
export * from "./AssetCapabilitiesResponseOut.js";
|
|
@@ -52,6 +54,7 @@ export * from "./CreateAssetResponseOut.js";
|
|
|
52
54
|
export * from "./CreateNewSheetTabResponse.js";
|
|
53
55
|
export * from "./CreateProjectResponseOut.js";
|
|
54
56
|
export * from "./DatabaseColumnInfo.js";
|
|
57
|
+
export * from "./DatabaseComputeSettingsResponseOut.js";
|
|
55
58
|
export * from "./DatabaseDataResponse.js";
|
|
56
59
|
export * from "./DatabaseMutationResponse.js";
|
|
57
60
|
export * from "./DatabaseSqlResponse.js";
|
|
@@ -59,6 +62,7 @@ export * from "./DatabaseStatusResponse.js";
|
|
|
59
62
|
export * from "./DatabaseTableInfo.js";
|
|
60
63
|
export * from "./DatabaseTableSchemaResponse.js";
|
|
61
64
|
export * from "./DatabaseTablesResponse.js";
|
|
65
|
+
export * from "./DatabaseWakeResponseOut.js";
|
|
62
66
|
export * from "./DataFrameRequestOut.js";
|
|
63
67
|
export * from "./DataFrameUnknownFormatError.js";
|
|
64
68
|
export * from "./DefaultVisibility.js";
|
|
@@ -31,6 +31,8 @@ __exportStar(require("./AopExecuteRequestIn.js"), exports);
|
|
|
31
31
|
__exportStar(require("./AopExecuteResponseOut.js"), exports);
|
|
32
32
|
__exportStar(require("./ApprovalMode.js"), exports);
|
|
33
33
|
__exportStar(require("./ArchiveAssetResponseOut.js"), exports);
|
|
34
|
+
__exportStar(require("./AssetAccessOut.js"), exports);
|
|
35
|
+
__exportStar(require("./AssetAccessSourceOut.js"), exports);
|
|
34
36
|
__exportStar(require("./AssetActivityDeltaResponseOut.js"), exports);
|
|
35
37
|
__exportStar(require("./AssetActivityResponseOut.js"), exports);
|
|
36
38
|
__exportStar(require("./AssetCapabilitiesResponseOut.js"), exports);
|
|
@@ -68,6 +70,7 @@ __exportStar(require("./CreateAssetResponseOut.js"), exports);
|
|
|
68
70
|
__exportStar(require("./CreateNewSheetTabResponse.js"), exports);
|
|
69
71
|
__exportStar(require("./CreateProjectResponseOut.js"), exports);
|
|
70
72
|
__exportStar(require("./DatabaseColumnInfo.js"), exports);
|
|
73
|
+
__exportStar(require("./DatabaseComputeSettingsResponseOut.js"), exports);
|
|
71
74
|
__exportStar(require("./DatabaseDataResponse.js"), exports);
|
|
72
75
|
__exportStar(require("./DatabaseMutationResponse.js"), exports);
|
|
73
76
|
__exportStar(require("./DatabaseSqlResponse.js"), exports);
|
|
@@ -75,6 +78,7 @@ __exportStar(require("./DatabaseStatusResponse.js"), exports);
|
|
|
75
78
|
__exportStar(require("./DatabaseTableInfo.js"), exports);
|
|
76
79
|
__exportStar(require("./DatabaseTableSchemaResponse.js"), exports);
|
|
77
80
|
__exportStar(require("./DatabaseTablesResponse.js"), exports);
|
|
81
|
+
__exportStar(require("./DatabaseWakeResponseOut.js"), exports);
|
|
78
82
|
__exportStar(require("./DataFrameRequestOut.js"), exports);
|
|
79
83
|
__exportStar(require("./DataFrameUnknownFormatError.js"), exports);
|
|
80
84
|
__exportStar(require("./DefaultVisibility.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "4.3.
|
|
1
|
+
export declare const SDK_VERSION = "4.3.2246";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
|
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
8
|
"X-Fern-SDK-Name": "@athenaintel/sdk",
|
|
9
|
-
"X-Fern-SDK-Version": "4.3.
|
|
10
|
-
"User-Agent": "@athenaintel/sdk/4.3.
|
|
9
|
+
"X-Fern-SDK-Version": "4.3.2246",
|
|
10
|
+
"User-Agent": "@athenaintel/sdk/4.3.2246",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
13
|
"X-Athena-Session-Credential": options === null || options === void 0 ? void 0 : options.sessionCredential,
|
|
@@ -50,7 +50,7 @@ export declare class AssetsClient {
|
|
|
50
50
|
convertExcelToSheet(request: AthenaIntelligence.ConvertExcelToSheetRequestIn, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.ConvertExcelToSheetResponseOut>;
|
|
51
51
|
private __convertExcelToSheet;
|
|
52
52
|
/**
|
|
53
|
-
* Create a new asset such as a spreadsheet, document, folder, database, computer, user interface, skill, collab agent, or generic doc (admin-only) in your workspace with your current permissions. Computer assets return 202 after durable submission, which commits the asset and initialization delivery intent together. Runtime provisioning continues asynchronously. Inspect the returned asset ID for progress instead of repeating creation. Computers accept the same configuration as the Athena UI's creation dialog: template, provider, cpu, memory (GiB), disk (GiB) and env_vars. Sizes must be offered by the environment's computer resource policy, and only admins may pick a size other than the template default (403 otherwise). In capability enforce mode, computer creation requires computer.create and returns 403 when denied.
|
|
53
|
+
* Create a new asset such as a spreadsheet, document, folder, database, computer, user interface, skill, collab agent, or generic doc (admin-only) in your workspace with your current permissions. Computer assets return 202 after durable submission, which commits the asset and initialization delivery intent together. Runtime provisioning continues asynchronously. Inspect the returned asset ID for progress instead of repeating creation. Computers accept the same configuration as the Athena UI's creation dialog: template, provider, cpu, memory (GiB), disk (GiB) and env_vars. Sizes must be offered by the environment's computer resource policy, and only admins may pick a size other than the template default (403 otherwise). In capability enforce mode, computer creation requires computer.create and returns 403 when denied. Databases accept suspend_timeout_seconds, the auto-suspend window from the database's Settings in Athena: 0 keeps the database running (it never suspends, and keeps using capacity), otherwise 60 to 86400 seconds. A database is provisioned in the background: poll GET /api/v0/databases/{asset_id}/compute-status until it reports running or suspended.
|
|
54
54
|
*
|
|
55
55
|
* @param {AthenaIntelligence.CreateAssetRequestIn} request
|
|
56
56
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -157,6 +157,24 @@ export declare class AssetsClient {
|
|
|
157
157
|
*/
|
|
158
158
|
rename(request: AthenaIntelligence.RenameAssetRequestIn, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.RenameAssetResponseOut>;
|
|
159
159
|
private __rename;
|
|
160
|
+
/**
|
|
161
|
+
* Read the access that you, or another user, have on an asset, and every grant that gives it. The level is what Athena's permission checks decide for the user in the asset's own workspace, whichever workspace is active for your key: 'view' can open the asset, 'edit' can also change it and manage its sharing, 'owner' created it and can edit it, and 'none' cannot open it. Each source names one grant: 'owner', 'direct' (shared with the user), 'group' (shared with a workspace group the user belongs to), 'workspace' (shared with the whole workspace), 'drive' (a role on the drive) or 'other' (access the share list does not hold, for example an environment admin). A folder's sharing reaches each asset inside it as that asset's own share, so a 'workspace' source on a sub-folder shows that a share of its parent folder reached it. Without user_id the route reads your own access; you need view access to the asset and membership in its workspace. To read another user's access, pass their user_id; you need edit access to the asset, as for sharing it. A user who is not a member of the asset's workspace, or who does not exist, reads as 'none' with is_member false. A suspended member reads as 'none' with no sources, and is_member still reports their membership. When a permission check cannot be answered (for example on an asset in a drive while the authorization service is unavailable), the route answers 503 and never a level. The route never changes a permission.
|
|
162
|
+
*
|
|
163
|
+
* @param {AthenaIntelligence.GetAccessAssetsRequest} request
|
|
164
|
+
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
165
|
+
*
|
|
166
|
+
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
167
|
+
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
168
|
+
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
169
|
+
* @throws {@link AthenaIntelligence.ServiceUnavailableError}
|
|
170
|
+
*
|
|
171
|
+
* @example
|
|
172
|
+
* await client.assets.getAccess({
|
|
173
|
+
* asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f"
|
|
174
|
+
* })
|
|
175
|
+
*/
|
|
176
|
+
getAccess(request: AthenaIntelligence.GetAccessAssetsRequest, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.AssetAccessOut>;
|
|
177
|
+
private __getAccess;
|
|
160
178
|
/**
|
|
161
179
|
* Admin only. List the edit history of a collaborative asset, newest first: who edited it, when, and under which agent/session attribution. Works for every collaborative asset type. Each item's from_clock/to_clock identify the edit for the companion delta endpoint, which reports what actually changed.
|
|
162
180
|
*
|
|
@@ -216,7 +216,7 @@ export class AssetsClient {
|
|
|
216
216
|
});
|
|
217
217
|
}
|
|
218
218
|
/**
|
|
219
|
-
* Create a new asset such as a spreadsheet, document, folder, database, computer, user interface, skill, collab agent, or generic doc (admin-only) in your workspace with your current permissions. Computer assets return 202 after durable submission, which commits the asset and initialization delivery intent together. Runtime provisioning continues asynchronously. Inspect the returned asset ID for progress instead of repeating creation. Computers accept the same configuration as the Athena UI's creation dialog: template, provider, cpu, memory (GiB), disk (GiB) and env_vars. Sizes must be offered by the environment's computer resource policy, and only admins may pick a size other than the template default (403 otherwise). In capability enforce mode, computer creation requires computer.create and returns 403 when denied.
|
|
219
|
+
* Create a new asset such as a spreadsheet, document, folder, database, computer, user interface, skill, collab agent, or generic doc (admin-only) in your workspace with your current permissions. Computer assets return 202 after durable submission, which commits the asset and initialization delivery intent together. Runtime provisioning continues asynchronously. Inspect the returned asset ID for progress instead of repeating creation. Computers accept the same configuration as the Athena UI's creation dialog: template, provider, cpu, memory (GiB), disk (GiB) and env_vars. Sizes must be offered by the environment's computer resource policy, and only admins may pick a size other than the template default (403 otherwise). In capability enforce mode, computer creation requires computer.create and returns 403 when denied. Databases accept suspend_timeout_seconds, the auto-suspend window from the database's Settings in Athena: 0 keeps the database running (it never suspends, and keeps using capacity), otherwise 60 to 86400 seconds. A database is provisioned in the background: poll GET /api/v0/databases/{asset_id}/compute-status until it reports running or suspended.
|
|
220
220
|
*
|
|
221
221
|
* @param {AthenaIntelligence.CreateAssetRequestIn} request
|
|
222
222
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -663,6 +663,91 @@ export class AssetsClient {
|
|
|
663
663
|
}
|
|
664
664
|
});
|
|
665
665
|
}
|
|
666
|
+
/**
|
|
667
|
+
* Read the access that you, or another user, have on an asset, and every grant that gives it. The level is what Athena's permission checks decide for the user in the asset's own workspace, whichever workspace is active for your key: 'view' can open the asset, 'edit' can also change it and manage its sharing, 'owner' created it and can edit it, and 'none' cannot open it. Each source names one grant: 'owner', 'direct' (shared with the user), 'group' (shared with a workspace group the user belongs to), 'workspace' (shared with the whole workspace), 'drive' (a role on the drive) or 'other' (access the share list does not hold, for example an environment admin). A folder's sharing reaches each asset inside it as that asset's own share, so a 'workspace' source on a sub-folder shows that a share of its parent folder reached it. Without user_id the route reads your own access; you need view access to the asset and membership in its workspace. To read another user's access, pass their user_id; you need edit access to the asset, as for sharing it. A user who is not a member of the asset's workspace, or who does not exist, reads as 'none' with is_member false. A suspended member reads as 'none' with no sources, and is_member still reports their membership. When a permission check cannot be answered (for example on an asset in a drive while the authorization service is unavailable), the route answers 503 and never a level. The route never changes a permission.
|
|
668
|
+
*
|
|
669
|
+
* @param {AthenaIntelligence.GetAccessAssetsRequest} request
|
|
670
|
+
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
671
|
+
*
|
|
672
|
+
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
673
|
+
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
674
|
+
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
675
|
+
* @throws {@link AthenaIntelligence.ServiceUnavailableError}
|
|
676
|
+
*
|
|
677
|
+
* @example
|
|
678
|
+
* await client.assets.getAccess({
|
|
679
|
+
* asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f"
|
|
680
|
+
* })
|
|
681
|
+
*/
|
|
682
|
+
getAccess(request, requestOptions) {
|
|
683
|
+
return core.HttpResponsePromise.fromPromise(this.__getAccess(request, requestOptions));
|
|
684
|
+
}
|
|
685
|
+
__getAccess(request, requestOptions) {
|
|
686
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
687
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
688
|
+
const { asset_id: assetId, user_id: userId } = request;
|
|
689
|
+
const _queryParams = {};
|
|
690
|
+
if (userId !== undefined) {
|
|
691
|
+
_queryParams.user_id = userId;
|
|
692
|
+
}
|
|
693
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
694
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
695
|
+
"X-Athena-Session-Credential": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.sessionCredential) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.sessionCredential,
|
|
696
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
697
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
698
|
+
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.AthenaIntelligenceEnvironment.Production, `api/v0/assets/${core.url.encodePathParam(assetId)}/access`),
|
|
699
|
+
method: "GET",
|
|
700
|
+
headers: _headers,
|
|
701
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
702
|
+
timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
|
|
703
|
+
maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
|
|
704
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
705
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
706
|
+
logging: this._options.logging,
|
|
707
|
+
});
|
|
708
|
+
if (_response.ok) {
|
|
709
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
710
|
+
}
|
|
711
|
+
if (_response.error.reason === "status-code") {
|
|
712
|
+
switch (_response.error.statusCode) {
|
|
713
|
+
case 403:
|
|
714
|
+
throw new AthenaIntelligence.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
715
|
+
case 404:
|
|
716
|
+
throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
|
|
717
|
+
case 422:
|
|
718
|
+
throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
719
|
+
case 503:
|
|
720
|
+
throw new AthenaIntelligence.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
721
|
+
default:
|
|
722
|
+
throw new errors.AthenaIntelligenceError({
|
|
723
|
+
statusCode: _response.error.statusCode,
|
|
724
|
+
body: _response.error.body,
|
|
725
|
+
rawResponse: _response.rawResponse,
|
|
726
|
+
});
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
switch (_response.error.reason) {
|
|
730
|
+
case "non-json":
|
|
731
|
+
throw new errors.AthenaIntelligenceError({
|
|
732
|
+
statusCode: _response.error.statusCode,
|
|
733
|
+
body: _response.error.rawBody,
|
|
734
|
+
rawResponse: _response.rawResponse,
|
|
735
|
+
});
|
|
736
|
+
case "body-is-null":
|
|
737
|
+
throw new errors.AthenaIntelligenceError({
|
|
738
|
+
statusCode: _response.error.statusCode,
|
|
739
|
+
rawResponse: _response.rawResponse,
|
|
740
|
+
});
|
|
741
|
+
case "timeout":
|
|
742
|
+
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling GET /api/v0/assets/{asset_id}/access.");
|
|
743
|
+
case "unknown":
|
|
744
|
+
throw new errors.AthenaIntelligenceError({
|
|
745
|
+
message: _response.error.errorMessage,
|
|
746
|
+
rawResponse: _response.rawResponse,
|
|
747
|
+
});
|
|
748
|
+
}
|
|
749
|
+
});
|
|
750
|
+
}
|
|
666
751
|
/**
|
|
667
752
|
* Admin only. List the edit history of a collaborative asset, newest first: who edited it, when, and under which agent/session attribution. Works for every collaborative asset type. Each item's from_clock/to_clock identify the edit for the companion delta endpoint, which reports what actually changed.
|
|
668
753
|
*
|
|
@@ -28,6 +28,8 @@ export interface CreateAssetRequestIn {
|
|
|
28
28
|
provider?: string | null;
|
|
29
29
|
/** skill only. The skill's SKILL.md content. Created as a draft; publish it with POST /api/v0/assets/{asset_id}/publish. */
|
|
30
30
|
skill_config?: AthenaIntelligence.PublicSkillConfigIn | null;
|
|
31
|
+
/** Database only. Seconds without activity after which the database suspends (scales to zero): 0 means it never suspends (the compute keeps running, and keeps using capacity), otherwise 60 to 86400 (24 hours). Defaults to 1800 (30 minutes). Applied while the database is provisioned; if it cannot be applied, the database is not created and compute-status reports failed. Read or change it later with GET/PATCH /api/v0/databases/{asset_id}/settings. */
|
|
32
|
+
suspend_timeout_seconds?: number | null;
|
|
31
33
|
/** Computer only. Template key to create the computer from, as picked in the Athena UI's computer creation dialog (e.g. 'default'), or an 'environment:<asset_id>' reference to a saved environment. Defaults to the default template. Also accepted as 'snapshot'. */
|
|
32
34
|
template?: string | null;
|
|
33
35
|
/** Title for the new asset */
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f"
|
|
5
|
+
* }
|
|
6
|
+
*/
|
|
7
|
+
export interface GetAccessAssetsRequest {
|
|
8
|
+
/** Unique identifier of the asset */
|
|
9
|
+
asset_id: string;
|
|
10
|
+
/** The user whose access to read. Leave it out to read your own. Reading another user's access needs edit access to the asset. */
|
|
11
|
+
user_id?: string | null;
|
|
12
|
+
}
|
|
@@ -7,6 +7,7 @@ export type { CreateAssetRequestIn } from "./CreateAssetRequestIn.mjs";
|
|
|
7
7
|
export type { CreateProjectRequestIn } from "./CreateProjectRequestIn.mjs";
|
|
8
8
|
export type { DownloadAssetsRequest } from "./DownloadAssetsRequest.mjs";
|
|
9
9
|
export type { DuplicateAssetRequestIn } from "./DuplicateAssetRequestIn.mjs";
|
|
10
|
+
export type { GetAccessAssetsRequest } from "./GetAccessAssetsRequest.mjs";
|
|
10
11
|
export type { GetActivityDeltaAssetsRequest } from "./GetActivityDeltaAssetsRequest.mjs";
|
|
11
12
|
export type { GetAssetsRequest } from "./GetAssetsRequest.mjs";
|
|
12
13
|
export type { ListActivityAssetsRequest } from "./ListActivityAssetsRequest.mjs";
|
|
@@ -16,10 +16,13 @@ export declare class DatabasesClient {
|
|
|
16
16
|
*
|
|
17
17
|
* **Status Values:**
|
|
18
18
|
* - `running` - Database is active and accepting connections
|
|
19
|
-
* - `suspended` - Database is suspended (scale-to-zero)
|
|
20
|
-
* - `starting` - Database is waking up
|
|
21
|
-
* - `
|
|
22
|
-
* - `
|
|
19
|
+
* - `suspended` - Database is suspended (scale-to-zero). It wakes on `POST /databases/{asset_id}/wake` or on the first SQL request. When `reason` is `ComputeUnschedulable`, no node could host its compute size: waking it only restarts the same wait
|
|
20
|
+
* - `starting` - Database is waking up, or its compute is being recreated
|
|
21
|
+
* - `creating` - Database is being created; it has no compute yet
|
|
22
|
+
* - `failed` - Database failed to start, or its creation failed (`message` says which)
|
|
23
|
+
* - `unknown` - Status could not be determined (the control plane did not answer); retry
|
|
24
|
+
*
|
|
25
|
+
* A database suspends (scales to zero) after `suspend_timeout_seconds` without activity; `GET`/`PATCH /databases/{asset_id}/settings` read and set that window, and 0 keeps it running. Reading the compute status or the settings never wakes a suspended database. Two things do: `POST /databases/{asset_id}/wake`, which answers at once while the compute starts, or any request that runs SQL on it, such as `POST /databases/{asset_id}/sql`, which waits for the compute up to 120 seconds; if the compute is still starting then, the answer is 503 with `Retry-After` and the statement did not run. A cold start usually takes 30 seconds to 2 minutes.
|
|
23
26
|
*
|
|
24
27
|
* @param {AthenaIntelligence.GetStatusDatabasesRequest} request
|
|
25
28
|
* @param {DatabasesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -217,6 +220,53 @@ export declare class DatabasesClient {
|
|
|
217
220
|
*/
|
|
218
221
|
getTableSchema(request: AthenaIntelligence.GetTableSchemaDatabasesRequest, requestOptions?: DatabasesClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.DatabaseTableSchemaResponse>;
|
|
219
222
|
private __getTableSchema;
|
|
223
|
+
/**
|
|
224
|
+
* Read the database's auto-suspend window, the same setting as auto-suspend in the database's Settings in Athena. Reading never wakes the database.
|
|
225
|
+
*
|
|
226
|
+
* A database suspends (scales to zero) after `suspend_timeout_seconds` without activity; `GET`/`PATCH /databases/{asset_id}/settings` read and set that window, and 0 keeps it running. Reading the compute status or the settings never wakes a suspended database. Two things do: `POST /databases/{asset_id}/wake`, which answers at once while the compute starts, or any request that runs SQL on it, such as `POST /databases/{asset_id}/sql`, which waits for the compute up to 120 seconds; if the compute is still starting then, the answer is 503 with `Retry-After` and the statement did not run. A cold start usually takes 30 seconds to 2 minutes.
|
|
227
|
+
*
|
|
228
|
+
* @param {AthenaIntelligence.GetSettingsDatabasesRequest} request
|
|
229
|
+
* @param {DatabasesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
230
|
+
*
|
|
231
|
+
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
232
|
+
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
233
|
+
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
234
|
+
* @throws {@link AthenaIntelligence.ConflictError}
|
|
235
|
+
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
236
|
+
* @throws {@link AthenaIntelligence.NotImplementedError}
|
|
237
|
+
* @throws {@link AthenaIntelligence.ServiceUnavailableError}
|
|
238
|
+
*
|
|
239
|
+
* @example
|
|
240
|
+
* await client.databases.getSettings({
|
|
241
|
+
* asset_id: "asset_id"
|
|
242
|
+
* })
|
|
243
|
+
*/
|
|
244
|
+
getSettings(request: AthenaIntelligence.GetSettingsDatabasesRequest, requestOptions?: DatabasesClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.DatabaseComputeSettingsResponseOut>;
|
|
245
|
+
private __getSettings;
|
|
246
|
+
/**
|
|
247
|
+
* Set the database's auto-suspend window: 0 keeps the database running (it never suspends, and keeps using compute capacity), otherwise 60 to 86400 seconds. The same setting, values and edit-access rule as auto-suspend in the database's Settings in Athena; the change applies at once and does not restart or wake the database.
|
|
248
|
+
*
|
|
249
|
+
* A database suspends (scales to zero) after `suspend_timeout_seconds` without activity; `GET`/`PATCH /databases/{asset_id}/settings` read and set that window, and 0 keeps it running. Reading the compute status or the settings never wakes a suspended database. Two things do: `POST /databases/{asset_id}/wake`, which answers at once while the compute starts, or any request that runs SQL on it, such as `POST /databases/{asset_id}/sql`, which waits for the compute up to 120 seconds; if the compute is still starting then, the answer is 503 with `Retry-After` and the statement did not run. A cold start usually takes 30 seconds to 2 minutes.
|
|
250
|
+
*
|
|
251
|
+
* @param {AthenaIntelligence.DatabaseComputeSettingsUpdateRequestIn} request
|
|
252
|
+
* @param {DatabasesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
253
|
+
*
|
|
254
|
+
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
255
|
+
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
256
|
+
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
257
|
+
* @throws {@link AthenaIntelligence.ConflictError}
|
|
258
|
+
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
259
|
+
* @throws {@link AthenaIntelligence.NotImplementedError}
|
|
260
|
+
* @throws {@link AthenaIntelligence.ServiceUnavailableError}
|
|
261
|
+
*
|
|
262
|
+
* @example
|
|
263
|
+
* await client.databases.updateSettings({
|
|
264
|
+
* asset_id: "asset_id",
|
|
265
|
+
* suspend_timeout_seconds: 3600
|
|
266
|
+
* })
|
|
267
|
+
*/
|
|
268
|
+
updateSettings(request: AthenaIntelligence.DatabaseComputeSettingsUpdateRequestIn, requestOptions?: DatabasesClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.DatabaseComputeSettingsResponseOut>;
|
|
269
|
+
private __updateSettings;
|
|
220
270
|
/**
|
|
221
271
|
* Execute a SQL statement against the database. SELECT queries return columns and rows. Non-SELECT statements (CREATE, INSERT, UPDATE, DELETE, ALTER, DROP, etc.) return execution statuses.
|
|
222
272
|
*
|
|
@@ -239,4 +289,27 @@ export declare class DatabasesClient {
|
|
|
239
289
|
*/
|
|
240
290
|
executeSql(request: AthenaIntelligence.DatabaseSqlRequest, requestOptions?: DatabasesClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.DatabaseSqlResponse>;
|
|
241
291
|
private __executeSql;
|
|
292
|
+
/**
|
|
293
|
+
* Start a suspended database's compute and answer at once, without waiting for it to run. Poll `GET /databases/{asset_id}/compute-status` until it reports `running`. Waking a running database resets its idle clock and answers 200 with `running`, so it is safe to call before every batch of work. The same action as Resume Database in Athena; it needs edit access to the database.
|
|
294
|
+
*
|
|
295
|
+
* A database suspends (scales to zero) after `suspend_timeout_seconds` without activity; `GET`/`PATCH /databases/{asset_id}/settings` read and set that window, and 0 keeps it running. Reading the compute status or the settings never wakes a suspended database. Two things do: `POST /databases/{asset_id}/wake`, which answers at once while the compute starts, or any request that runs SQL on it, such as `POST /databases/{asset_id}/sql`, which waits for the compute up to 120 seconds; if the compute is still starting then, the answer is 503 with `Retry-After` and the statement did not run. A cold start usually takes 30 seconds to 2 minutes.
|
|
296
|
+
*
|
|
297
|
+
* @param {AthenaIntelligence.WakeDatabasesRequest} request
|
|
298
|
+
* @param {DatabasesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
299
|
+
*
|
|
300
|
+
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
301
|
+
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
302
|
+
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
303
|
+
* @throws {@link AthenaIntelligence.ConflictError}
|
|
304
|
+
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
305
|
+
* @throws {@link AthenaIntelligence.NotImplementedError}
|
|
306
|
+
* @throws {@link AthenaIntelligence.ServiceUnavailableError}
|
|
307
|
+
*
|
|
308
|
+
* @example
|
|
309
|
+
* await client.databases.wake({
|
|
310
|
+
* asset_id: "asset_id"
|
|
311
|
+
* })
|
|
312
|
+
*/
|
|
313
|
+
wake(request: AthenaIntelligence.WakeDatabasesRequest, requestOptions?: DatabasesClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.DatabaseWakeResponseOut>;
|
|
314
|
+
private __wake;
|
|
242
315
|
}
|