@alicloud/esa20240910 2.34.1 → 2.35.0
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/client.d.ts +16 -1
- package/dist/client.js +126 -34
- package/dist/client.js.map +1 -1
- package/dist/models/CreateOriginProtectionRequest.d.ts +5 -0
- package/dist/models/CreateOriginProtectionRequest.js +2 -0
- package/dist/models/CreateOriginProtectionRequest.js.map +1 -1
- package/dist/models/CreateTransportLayerApplicationRequest.d.ts +1 -1
- package/dist/models/GetApiSchemaUsageRequest.d.ts +23 -0
- package/dist/models/GetApiSchemaUsageRequest.js +60 -0
- package/dist/models/GetApiSchemaUsageRequest.js.map +1 -0
- package/dist/models/GetApiSchemaUsageResponse.d.ts +19 -0
- package/dist/models/GetApiSchemaUsageResponse.js +69 -0
- package/dist/models/GetApiSchemaUsageResponse.js.map +1 -0
- package/dist/models/GetApiSchemaUsageResponseBody.d.ts +59 -0
- package/dist/models/GetApiSchemaUsageResponseBody.js +90 -0
- package/dist/models/GetApiSchemaUsageResponseBody.js.map +1 -0
- package/dist/models/GetOriginProtectionResponseBody.d.ts +313 -0
- package/dist/models/GetOriginProtectionResponseBody.js +395 -1
- package/dist/models/GetOriginProtectionResponseBody.js.map +1 -1
- package/dist/models/ListTransportLayerApplicationsResponseBody.d.ts +1 -1
- package/dist/models/ListUserRatePlanInstancesRequest.d.ts +1 -0
- package/dist/models/ListUserRatePlanInstancesRequest.js +2 -0
- package/dist/models/ListUserRatePlanInstancesRequest.js.map +1 -1
- package/dist/models/UpdateOriginProtectionRequest.d.ts +5 -0
- package/dist/models/UpdateOriginProtectionRequest.js +2 -0
- package/dist/models/UpdateOriginProtectionRequest.js.map +1 -1
- package/dist/models/model.d.ts +20 -0
- package/dist/models/model.js +69 -29
- package/dist/models/model.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +139 -39
- package/src/models/CreateOriginProtectionRequest.ts +7 -0
- package/src/models/CreateTransportLayerApplicationRequest.ts +1 -1
- package/src/models/GetApiSchemaUsageRequest.ts +38 -0
- package/src/models/GetApiSchemaUsageResponse.ts +40 -0
- package/src/models/GetApiSchemaUsageResponseBody.ts +95 -0
- package/src/models/GetOriginProtectionResponseBody.ts +563 -0
- package/src/models/ListTransportLayerApplicationsResponseBody.ts +1 -1
- package/src/models/ListUserRatePlanInstancesRequest.ts +3 -0
- package/src/models/UpdateOriginProtectionRequest.ts +7 -0
- package/src/models/model.ts +20 -0
package/dist/client.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export default class Client extends OpenApi {
|
|
|
7
7
|
constructor(config: $OpenApiUtil.Config);
|
|
8
8
|
_postOSSObject(bucketName: string, form: {
|
|
9
9
|
[key: string]: any;
|
|
10
|
-
}): Promise<{
|
|
10
|
+
}, runtime: $dara.RuntimeOptions): Promise<{
|
|
11
11
|
[key: string]: any;
|
|
12
12
|
}>;
|
|
13
13
|
getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: {
|
|
@@ -2267,6 +2267,21 @@ export default class Client extends OpenApi {
|
|
|
2267
2267
|
* @returns ExportRecordsResponse
|
|
2268
2268
|
*/
|
|
2269
2269
|
exportRecords(request: $_model.ExportRecordsRequest): Promise<$_model.ExportRecordsResponse>;
|
|
2270
|
+
/**
|
|
2271
|
+
* 获取架构文件套餐使用情况
|
|
2272
|
+
*
|
|
2273
|
+
* @param request - GetApiSchemaUsageRequest
|
|
2274
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
2275
|
+
* @returns GetApiSchemaUsageResponse
|
|
2276
|
+
*/
|
|
2277
|
+
getApiSchemaUsageWithOptions(request: $_model.GetApiSchemaUsageRequest, runtime: $dara.RuntimeOptions): Promise<$_model.GetApiSchemaUsageResponse>;
|
|
2278
|
+
/**
|
|
2279
|
+
* 获取架构文件套餐使用情况
|
|
2280
|
+
*
|
|
2281
|
+
* @param request - GetApiSchemaUsageRequest
|
|
2282
|
+
* @returns GetApiSchemaUsageResponse
|
|
2283
|
+
*/
|
|
2284
|
+
getApiSchemaUsage(request: $_model.GetApiSchemaUsageRequest): Promise<$_model.GetApiSchemaUsageResponse>;
|
|
2270
2285
|
/**
|
|
2271
2286
|
* Queries the available specifications of cache reserve instances.
|
|
2272
2287
|
*
|
package/dist/client.js
CHANGED
|
@@ -49,37 +49,81 @@ class Client extends openapi_core_1.default {
|
|
|
49
49
|
this.checkConfig(config);
|
|
50
50
|
this._endpoint = this.getEndpoint("esa", this._regionId, this._endpointRule, this._network, this._suffix, this._endpointMap, this._endpoint);
|
|
51
51
|
}
|
|
52
|
-
async _postOSSObject(bucketName, form) {
|
|
53
|
-
let
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
52
|
+
async _postOSSObject(bucketName, form, runtime) {
|
|
53
|
+
let _runtime = {
|
|
54
|
+
key: runtime.key || this._key,
|
|
55
|
+
cert: runtime.cert || this._cert,
|
|
56
|
+
ca: runtime.ca || this._ca,
|
|
57
|
+
readTimeout: runtime.readTimeout || this._readTimeout,
|
|
58
|
+
connectTimeout: runtime.connectTimeout || this._connectTimeout,
|
|
59
|
+
httpProxy: runtime.httpProxy || this._httpProxy,
|
|
60
|
+
httpsProxy: runtime.httpsProxy || this._httpsProxy,
|
|
61
|
+
noProxy: runtime.noProxy || this._noProxy,
|
|
62
|
+
socks5Proxy: runtime.socks5Proxy || this._socks5Proxy,
|
|
63
|
+
socks5NetWork: runtime.socks5NetWork || this._socks5NetWork,
|
|
64
|
+
maxIdleConns: runtime.maxIdleConns || this._maxIdleConns,
|
|
65
|
+
retryOptions: this._retryOptions,
|
|
66
|
+
ignoreSSL: runtime.ignoreSSL || false,
|
|
67
|
+
tlsMinVersion: this._tlsMinVersion,
|
|
62
68
|
};
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
let
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
69
|
+
let _retriesAttempted = 0;
|
|
70
|
+
let _lastRequest = null, _lastResponse = null;
|
|
71
|
+
let _context = new $dara.RetryPolicyContext({
|
|
72
|
+
retriesAttempted: _retriesAttempted,
|
|
73
|
+
});
|
|
74
|
+
while ($dara.shouldRetry(_runtime['retryOptions'], _context)) {
|
|
75
|
+
if (_retriesAttempted > 0) {
|
|
76
|
+
let _backoffTime = $dara.getBackoffDelay(_runtime['retryOptions'], _context);
|
|
77
|
+
if (_backoffTime > 0) {
|
|
78
|
+
await $dara.sleep(_backoffTime);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
_retriesAttempted = _retriesAttempted + 1;
|
|
82
|
+
try {
|
|
83
|
+
let request_ = new $dara.Request();
|
|
84
|
+
let boundary = $dara.Form.getBoundary();
|
|
85
|
+
request_.protocol = "HTTPS";
|
|
86
|
+
request_.method = "POST";
|
|
87
|
+
request_.pathname = `/`;
|
|
88
|
+
request_.headers = {
|
|
89
|
+
host: String(form["host"]),
|
|
90
|
+
date: openapi_core_2.OpenApiUtil.getDateUTCString(),
|
|
91
|
+
'user-agent': openapi_core_2.OpenApiUtil.getUserAgent(""),
|
|
92
|
+
};
|
|
93
|
+
request_.headers["content-type"] = `multipart/form-data; boundary=${boundary}`;
|
|
94
|
+
request_.body = $dara.Form.toFileForm(form, boundary);
|
|
95
|
+
_lastRequest = request_;
|
|
96
|
+
let response_ = await $dara.doAction(request_, _runtime);
|
|
97
|
+
_lastResponse = response_;
|
|
98
|
+
let respMap = null;
|
|
99
|
+
let bodyStr = await $dara.Stream.readAsString(response_.body);
|
|
100
|
+
if ((response_.statusCode >= 400) && (response_.statusCode < 600)) {
|
|
101
|
+
respMap = $dara.XML.parseXml(bodyStr, null);
|
|
102
|
+
let err = respMap["Error"];
|
|
103
|
+
throw new $OpenApi.ClientError({
|
|
104
|
+
code: String(err["Code"]),
|
|
105
|
+
message: String(err["Message"]),
|
|
106
|
+
data: {
|
|
107
|
+
httpCode: response_.statusCode,
|
|
108
|
+
requestId: String(err["RequestId"]),
|
|
109
|
+
hostId: String(err["HostId"]),
|
|
110
|
+
},
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
respMap = $dara.XML.parseXml(bodyStr, null);
|
|
114
|
+
return Object.assign({}, respMap);
|
|
115
|
+
}
|
|
116
|
+
catch (ex) {
|
|
117
|
+
_context = new $dara.RetryPolicyContext({
|
|
118
|
+
retriesAttempted: _retriesAttempted,
|
|
119
|
+
httpRequest: _lastRequest,
|
|
120
|
+
httpResponse: _lastResponse,
|
|
121
|
+
exception: ex,
|
|
122
|
+
});
|
|
123
|
+
continue;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
throw $dara.newUnretryableError(_context);
|
|
83
127
|
}
|
|
84
128
|
getEndpoint(productId, regionId, endpointRule, network, suffix, endpointMap, endpoint) {
|
|
85
129
|
if (!$dara.isNull(endpoint)) {
|
|
@@ -560,7 +604,7 @@ class Client extends openapi_core_1.default {
|
|
|
560
604
|
file: fileObj,
|
|
561
605
|
success_action_status: "201",
|
|
562
606
|
};
|
|
563
|
-
await this._postOSSObject(authResponseBody["Bucket"], ossHeader);
|
|
607
|
+
await this._postOSSObject(authResponseBody["Bucket"], ossHeader, runtime);
|
|
564
608
|
batchDeleteKvWithHighCapacityReq.url = `http://${authResponseBody["Bucket"]}.${authResponseBody["Endpoint"]}/${authResponseBody["ObjectKey"]}`;
|
|
565
609
|
}
|
|
566
610
|
let batchDeleteKvWithHighCapacityResp = await this.batchDeleteKvWithHighCapacityWithOptions(batchDeleteKvWithHighCapacityReq, runtime);
|
|
@@ -883,7 +927,7 @@ class Client extends openapi_core_1.default {
|
|
|
883
927
|
file: fileObj,
|
|
884
928
|
success_action_status: "201",
|
|
885
929
|
};
|
|
886
|
-
await this._postOSSObject(authResponseBody["Bucket"], ossHeader);
|
|
930
|
+
await this._postOSSObject(authResponseBody["Bucket"], ossHeader, runtime);
|
|
887
931
|
batchPutKvWithHighCapacityReq.url = `http://${authResponseBody["Bucket"]}.${authResponseBody["Endpoint"]}/${authResponseBody["ObjectKey"]}`;
|
|
888
932
|
}
|
|
889
933
|
let batchPutKvWithHighCapacityResp = await this.batchPutKvWithHighCapacityWithOptions(batchPutKvWithHighCapacityReq, runtime);
|
|
@@ -2465,6 +2509,9 @@ class Client extends openapi_core_1.default {
|
|
|
2465
2509
|
async createOriginProtectionWithOptions(request, runtime) {
|
|
2466
2510
|
request.validate();
|
|
2467
2511
|
let query = {};
|
|
2512
|
+
if (!$dara.isNull(request.autoConfirmIPList)) {
|
|
2513
|
+
query["AutoConfirmIPList"] = request.autoConfirmIPList;
|
|
2514
|
+
}
|
|
2468
2515
|
if (!$dara.isNull(request.siteId)) {
|
|
2469
2516
|
query["SiteId"] = request.siteId;
|
|
2470
2517
|
}
|
|
@@ -7020,6 +7067,48 @@ class Client extends openapi_core_1.default {
|
|
|
7020
7067
|
let runtime = new $dara.RuntimeOptions({});
|
|
7021
7068
|
return await this.exportRecordsWithOptions(request, runtime);
|
|
7022
7069
|
}
|
|
7070
|
+
/**
|
|
7071
|
+
* 获取架构文件套餐使用情况
|
|
7072
|
+
*
|
|
7073
|
+
* @param request - GetApiSchemaUsageRequest
|
|
7074
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
7075
|
+
* @returns GetApiSchemaUsageResponse
|
|
7076
|
+
*/
|
|
7077
|
+
async getApiSchemaUsageWithOptions(request, runtime) {
|
|
7078
|
+
request.validate();
|
|
7079
|
+
let query = {};
|
|
7080
|
+
if (!$dara.isNull(request.siteId)) {
|
|
7081
|
+
query["SiteId"] = request.siteId;
|
|
7082
|
+
}
|
|
7083
|
+
if (!$dara.isNull(request.siteVersion)) {
|
|
7084
|
+
query["SiteVersion"] = request.siteVersion;
|
|
7085
|
+
}
|
|
7086
|
+
let req = new openapi_core_2.$OpenApiUtil.OpenApiRequest({
|
|
7087
|
+
query: openapi_core_2.OpenApiUtil.query(query),
|
|
7088
|
+
});
|
|
7089
|
+
let params = new openapi_core_2.$OpenApiUtil.Params({
|
|
7090
|
+
action: "GetApiSchemaUsage",
|
|
7091
|
+
version: "2024-09-10",
|
|
7092
|
+
protocol: "HTTPS",
|
|
7093
|
+
pathname: "/",
|
|
7094
|
+
method: "POST",
|
|
7095
|
+
authType: "AK",
|
|
7096
|
+
style: "RPC",
|
|
7097
|
+
reqBodyType: "formData",
|
|
7098
|
+
bodyType: "json",
|
|
7099
|
+
});
|
|
7100
|
+
return $dara.cast(await this.callApi(params, req, runtime), new $_model.GetApiSchemaUsageResponse({}));
|
|
7101
|
+
}
|
|
7102
|
+
/**
|
|
7103
|
+
* 获取架构文件套餐使用情况
|
|
7104
|
+
*
|
|
7105
|
+
* @param request - GetApiSchemaUsageRequest
|
|
7106
|
+
* @returns GetApiSchemaUsageResponse
|
|
7107
|
+
*/
|
|
7108
|
+
async getApiSchemaUsage(request) {
|
|
7109
|
+
let runtime = new $dara.RuntimeOptions({});
|
|
7110
|
+
return await this.getApiSchemaUsageWithOptions(request, runtime);
|
|
7111
|
+
}
|
|
7023
7112
|
/**
|
|
7024
7113
|
* Queries the available specifications of cache reserve instances.
|
|
7025
7114
|
*
|
|
@@ -13294,7 +13383,7 @@ class Client extends openapi_core_1.default {
|
|
|
13294
13383
|
file: fileObj,
|
|
13295
13384
|
success_action_status: "201",
|
|
13296
13385
|
};
|
|
13297
|
-
await this._postOSSObject(authResponseBody["Bucket"], ossHeader);
|
|
13386
|
+
await this._postOSSObject(authResponseBody["Bucket"], ossHeader, runtime);
|
|
13298
13387
|
putKvWithHighCapacityReq.url = `http://${authResponseBody["Bucket"]}.${authResponseBody["Endpoint"]}/${authResponseBody["ObjectKey"]}`;
|
|
13299
13388
|
}
|
|
13300
13389
|
let putKvWithHighCapacityResp = await this.putKvWithHighCapacityWithOptions(putKvWithHighCapacityReq, runtime);
|
|
@@ -15337,6 +15426,9 @@ class Client extends openapi_core_1.default {
|
|
|
15337
15426
|
async updateOriginProtectionWithOptions(request, runtime) {
|
|
15338
15427
|
request.validate();
|
|
15339
15428
|
let query = {};
|
|
15429
|
+
if (!$dara.isNull(request.autoConfirmIPList)) {
|
|
15430
|
+
query["AutoConfirmIPList"] = request.autoConfirmIPList;
|
|
15431
|
+
}
|
|
15340
15432
|
if (!$dara.isNull(request.originConverge)) {
|
|
15341
15433
|
query["OriginConverge"] = request.originConverge;
|
|
15342
15434
|
}
|
|
@@ -17264,7 +17356,7 @@ class Client extends openapi_core_1.default {
|
|
|
17264
17356
|
file: fileObj,
|
|
17265
17357
|
success_action_status: "201",
|
|
17266
17358
|
};
|
|
17267
|
-
await this._postOSSObject(authResponseBody["Bucket"], ossHeader);
|
|
17359
|
+
await this._postOSSObject(authResponseBody["Bucket"], ossHeader, runtime);
|
|
17268
17360
|
uploadFileReq.url = `http://${authResponseBody["Bucket"]}.${authResponseBody["Endpoint"]}/${authResponseBody["ObjectKey"]}`;
|
|
17269
17361
|
}
|
|
17270
17362
|
let uploadFileResp = await this.uploadFileWithOptions(uploadFileReq, runtime);
|