Skip to content

Commit 03587e0

Browse files
committed
Support API GetTableToken.
1 parent c989866 commit 03587e0

13 files changed

+255
-1
lines changed

dlfnext-20250310/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@alicloud/dlfnext20250310",
3-
"version": "3.1.1",
3+
"version": "3.2.0",
44
"description": "",
55
"main": "dist/client.js",
66
"scripts": {

dlfnext-20250310/src/client.ts

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1649,6 +1649,51 @@ export default class Client extends OpenApi {
16491649
return await this.getTableSummaryWithOptions(catalogId, database, table, request, headers, runtime);
16501650
}
16511651

1652+
/**
1653+
* 获取数据湖表的临时访问凭证
1654+
*
1655+
* @param request - GetTableTokenRequest
1656+
* @param headers - map
1657+
* @param runtime - runtime options for this request RuntimeOptions
1658+
* @returns GetTableTokenResponse
1659+
*/
1660+
async getTableTokenWithOptions(catalogId: string, database: string, table: string, request: $_model.GetTableTokenRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.GetTableTokenResponse> {
1661+
request.validate();
1662+
let query : {[key: string ]: any} = { };
1663+
if (!$dara.isNull(request.isInternal)) {
1664+
query["isInternal"] = request.isInternal;
1665+
}
1666+
1667+
let req = new $OpenApiUtil.OpenApiRequest({
1668+
headers: headers,
1669+
query: OpenApiUtil.query(query),
1670+
});
1671+
let params = new $OpenApiUtil.Params({
1672+
action: "GetTableToken",
1673+
version: "2025-03-10",
1674+
protocol: "HTTPS",
1675+
pathname: `/dlf/v1/${$dara.URL.percentEncode(catalogId)}/databases/${$dara.URL.percentEncode(database)}/tables/${$dara.URL.percentEncode(table)}/token`,
1676+
method: "GET",
1677+
authType: "AK",
1678+
style: "ROA",
1679+
reqBodyType: "json",
1680+
bodyType: "json",
1681+
});
1682+
return $dara.cast<$_model.GetTableTokenResponse>(await this.callApi(params, req, runtime), new $_model.GetTableTokenResponse({}));
1683+
}
1684+
1685+
/**
1686+
* 获取数据湖表的临时访问凭证
1687+
*
1688+
* @param request - GetTableTokenRequest
1689+
* @returns GetTableTokenResponse
1690+
*/
1691+
async getTableToken(catalogId: string, database: string, table: string, request: $_model.GetTableTokenRequest): Promise<$_model.GetTableTokenResponse> {
1692+
let runtime = new $dara.RuntimeOptions({ });
1693+
let headers : {[key: string ]: string} = { };
1694+
return await this.getTableTokenWithOptions(catalogId, database, table, request, headers, runtime);
1695+
}
1696+
16521697
/**
16531698
* 获取用户
16541699
*
@@ -2610,6 +2655,10 @@ export default class Client extends OpenApi {
26102655
query["tableNamePattern"] = request.tableNamePattern;
26112656
}
26122657

2658+
if (!$dara.isNull(request.type)) {
2659+
query["type"] = request.type;
2660+
}
2661+
26132662
let req = new $OpenApiUtil.OpenApiRequest({
26142663
headers: headers,
26152664
query: OpenApiUtil.query(query),

dlfnext-20250310/src/models/CatalogSummary.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export class CatalogSummary extends $dara.Model {
2121
throughputMonthly?: number;
2222
totalFileCount?: MoMValues;
2323
totalFileSizeInBytes?: MoMValues;
24+
totalMetaSizeInBytes?: MoMValues;
2425
static names(): { [key: string]: string } {
2526
return {
2627
apiVisitCountMonthly: 'apiVisitCountMonthly',
@@ -36,6 +37,7 @@ export class CatalogSummary extends $dara.Model {
3637
throughputMonthly: 'throughputMonthly',
3738
totalFileCount: 'totalFileCount',
3839
totalFileSizeInBytes: 'totalFileSizeInBytes',
40+
totalMetaSizeInBytes: 'totalMetaSizeInBytes',
3941
};
4042
}
4143

@@ -54,6 +56,7 @@ export class CatalogSummary extends $dara.Model {
5456
throughputMonthly: 'number',
5557
totalFileCount: MoMValues,
5658
totalFileSizeInBytes: MoMValues,
59+
totalMetaSizeInBytes: MoMValues,
5760
};
5861
}
5962

@@ -73,6 +76,9 @@ export class CatalogSummary extends $dara.Model {
7376
if(this.totalFileSizeInBytes && typeof (this.totalFileSizeInBytes as any).validate === 'function') {
7477
(this.totalFileSizeInBytes as any).validate();
7578
}
79+
if(this.totalMetaSizeInBytes && typeof (this.totalMetaSizeInBytes as any).validate === 'function') {
80+
(this.totalMetaSizeInBytes as any).validate();
81+
}
7682
super.validate();
7783
}
7884

dlfnext-20250310/src/models/DatabaseSummary.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export class DatabaseSummary extends $dara.Model {
3939
* Total file count
4040
*/
4141
totalFileSizeInBytes?: number;
42+
totalMetaSizeInBytes?: number;
4243
static names(): { [key: string]: string } {
4344
return {
4445
createdAt: 'createdAt',
@@ -53,6 +54,7 @@ export class DatabaseSummary extends $dara.Model {
5354
tableCount: 'tableCount',
5455
totalFileCount: 'totalFileCount',
5556
totalFileSizeInBytes: 'totalFileSizeInBytes',
57+
totalMetaSizeInBytes: 'totalMetaSizeInBytes',
5658
};
5759
}
5860

@@ -70,6 +72,7 @@ export class DatabaseSummary extends $dara.Model {
7072
tableCount: 'number',
7173
totalFileCount: 'number',
7274
totalFileSizeInBytes: 'number',
75+
totalMetaSizeInBytes: 'number',
7376
};
7477
}
7578

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// This file is auto-generated, don't edit it
2+
import * as $dara from '@darabonba/typescript';
3+
4+
5+
export class GetTableTokenRequest extends $dara.Model {
6+
/**
7+
* @example
8+
* true
9+
*/
10+
isInternal?: boolean;
11+
static names(): { [key: string]: string } {
12+
return {
13+
isInternal: 'isInternal',
14+
};
15+
}
16+
17+
static types(): { [key: string]: any } {
18+
return {
19+
isInternal: 'boolean',
20+
};
21+
}
22+
23+
validate() {
24+
super.validate();
25+
}
26+
27+
constructor(map?: { [key: string]: any }) {
28+
super(map);
29+
}
30+
}
31+
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// This file is auto-generated, don't edit it
2+
import * as $dara from '@darabonba/typescript';
3+
import { GetTableTokenResponseBody } from "./GetTableTokenResponseBody";
4+
5+
6+
export class GetTableTokenResponse extends $dara.Model {
7+
headers?: { [key: string]: string };
8+
statusCode?: number;
9+
body?: GetTableTokenResponseBody;
10+
static names(): { [key: string]: string } {
11+
return {
12+
headers: 'headers',
13+
statusCode: 'statusCode',
14+
body: 'body',
15+
};
16+
}
17+
18+
static types(): { [key: string]: any } {
19+
return {
20+
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
21+
statusCode: 'number',
22+
body: GetTableTokenResponseBody,
23+
};
24+
}
25+
26+
validate() {
27+
if(this.headers) {
28+
$dara.Model.validateMap(this.headers);
29+
}
30+
if(this.body && typeof (this.body as any).validate === 'function') {
31+
(this.body as any).validate();
32+
}
33+
super.validate();
34+
}
35+
36+
constructor(map?: { [key: string]: any }) {
37+
super(map);
38+
}
39+
}
40+
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// This file is auto-generated, don't edit it
2+
import * as $dara from '@darabonba/typescript';
3+
4+
5+
export class GetTableTokenResponseBody extends $dara.Model {
6+
/**
7+
* @example
8+
* 1749160909000
9+
*/
10+
expiresAtMillis?: number;
11+
token?: { [key: string]: string };
12+
static names(): { [key: string]: string } {
13+
return {
14+
expiresAtMillis: 'expiresAtMillis',
15+
token: 'token',
16+
};
17+
}
18+
19+
static types(): { [key: string]: any } {
20+
return {
21+
expiresAtMillis: 'number',
22+
token: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
23+
};
24+
}
25+
26+
validate() {
27+
if(this.token) {
28+
$dara.Model.validateMap(this.token);
29+
}
30+
super.validate();
31+
}
32+
33+
constructor(map?: { [key: string]: any }) {
34+
super(map);
35+
}
36+
}
37+

dlfnext-20250310/src/models/IcebergTableMetadata.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@ import { IcebergPartitionField } from "./IcebergPartitionField";
88
export class IcebergTableMetadata extends $dara.Model {
99
currentSnapshot?: IcebergSnapshot;
1010
fields?: IcebergNestedField[];
11+
identifierFieldIds?: number[];
1112
partitionFields?: IcebergPartitionField[];
1213
properties?: { [key: string]: string };
1314
static names(): { [key: string]: string } {
1415
return {
1516
currentSnapshot: 'currentSnapshot',
1617
fields: 'fields',
18+
identifierFieldIds: 'identifierFieldIds',
1719
partitionFields: 'partitionFields',
1820
properties: 'properties',
1921
};
@@ -23,6 +25,7 @@ export class IcebergTableMetadata extends $dara.Model {
2325
return {
2426
currentSnapshot: IcebergSnapshot,
2527
fields: { 'type': 'array', 'itemType': IcebergNestedField },
28+
identifierFieldIds: { 'type': 'array', 'itemType': 'number' },
2629
partitionFields: { 'type': 'array', 'itemType': IcebergPartitionField },
2730
properties: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
2831
};
@@ -35,6 +38,9 @@ export class IcebergTableMetadata extends $dara.Model {
3538
if(Array.isArray(this.fields)) {
3639
$dara.Model.validateArray(this.fields);
3740
}
41+
if(Array.isArray(this.identifierFieldIds)) {
42+
$dara.Model.validateArray(this.identifierFieldIds);
43+
}
3844
if(Array.isArray(this.partitionFields)) {
3945
$dara.Model.validateArray(this.partitionFields);
4046
}

dlfnext-20250310/src/models/ListTableDetailsRequest.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@ export class ListTableDetailsRequest extends $dara.Model {
1414
*/
1515
pageToken?: string;
1616
tableNamePattern?: string;
17+
type?: string;
1718
static names(): { [key: string]: string } {
1819
return {
1920
maxResults: 'maxResults',
2021
pageToken: 'pageToken',
2122
tableNamePattern: 'tableNamePattern',
23+
type: 'type',
2224
};
2325
}
2426

@@ -27,6 +29,7 @@ export class ListTableDetailsRequest extends $dara.Model {
2729
maxResults: 'number',
2830
pageToken: 'string',
2931
tableNamePattern: 'string',
32+
type: 'string',
3033
};
3134
}
3235

dlfnext-20250310/src/models/TableCompaction.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,28 @@ import * as $dara from '@darabonba/typescript';
55
export class TableCompaction extends $dara.Model {
66
catalogId?: string;
77
cuUsage?: number;
8+
/**
9+
* **if can be null:**
10+
* true
11+
*
12+
* @deprecated
13+
*/
814
lastCompactedFileTime?: number;
15+
latencyFileEarliestTime?: number;
16+
/**
17+
* **if can be null:**
18+
* true
19+
*
20+
* @deprecated
21+
*/
922
maxLevel0FileCount?: string;
1023
tableId?: string;
1124
static names(): { [key: string]: string } {
1225
return {
1326
catalogId: 'catalogId',
1427
cuUsage: 'cuUsage',
1528
lastCompactedFileTime: 'lastCompactedFileTime',
29+
latencyFileEarliestTime: 'latencyFileEarliestTime',
1630
maxLevel0FileCount: 'maxLevel0FileCount',
1731
tableId: 'tableId',
1832
};
@@ -23,6 +37,7 @@ export class TableCompaction extends $dara.Model {
2337
catalogId: 'string',
2438
cuUsage: 'number',
2539
lastCompactedFileTime: 'number',
40+
latencyFileEarliestTime: 'number',
2641
maxLevel0FileCount: 'string',
2742
tableId: 'string',
2843
};

0 commit comments

Comments
 (0)