@alicloud/apig20240327 4.3.2 → 4.4.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.
- package/dist/client.d.ts +56 -2
- package/dist/client.js +182 -2
- package/dist/client.js.map +1 -1
- package/dist/models/CreateAndAttachPolicyRequest.d.ts +58 -0
- package/dist/models/CreateAndAttachPolicyRequest.js +75 -0
- package/dist/models/CreateAndAttachPolicyRequest.js.map +1 -0
- package/dist/models/CreateAndAttachPolicyResponse.d.ts +19 -0
- package/dist/models/CreateAndAttachPolicyResponse.js +69 -0
- package/dist/models/CreateAndAttachPolicyResponse.js.map +1 -0
- package/dist/models/CreateAndAttachPolicyResponseBody.d.ts +48 -0
- package/dist/models/CreateAndAttachPolicyResponseBody.js +92 -0
- package/dist/models/CreateAndAttachPolicyResponseBody.js.map +1 -0
- package/dist/models/HttpApiDeployConfig.d.ts +5 -0
- package/dist/models/HttpApiDeployConfig.js +2 -0
- package/dist/models/HttpApiDeployConfig.js.map +1 -1
- package/dist/models/ListPoliciesRequest.d.ts +39 -0
- package/dist/models/ListPoliciesRequest.js +68 -0
- package/dist/models/ListPoliciesRequest.js.map +1 -0
- package/dist/models/ListPoliciesResponse.d.ts +19 -0
- package/dist/models/ListPoliciesResponse.js +69 -0
- package/dist/models/ListPoliciesResponse.js.map +1 -0
- package/dist/models/ListPoliciesResponseBody.d.ts +58 -0
- package/dist/models/ListPoliciesResponseBody.js +96 -0
- package/dist/models/ListPoliciesResponseBody.js.map +1 -0
- package/dist/models/UndeployHttpApiRequest.d.ts +1 -1
- package/dist/models/UpdateAndAttachPolicyRequest.d.ts +50 -0
- package/dist/models/UpdateAndAttachPolicyRequest.js +73 -0
- package/dist/models/UpdateAndAttachPolicyRequest.js.map +1 -0
- package/dist/models/UpdateAndAttachPolicyResponse.d.ts +19 -0
- package/dist/models/UpdateAndAttachPolicyResponse.js +69 -0
- package/dist/models/UpdateAndAttachPolicyResponse.js.map +1 -0
- package/dist/models/UpdateAndAttachPolicyResponseBody.d.ts +28 -0
- package/dist/models/UpdateAndAttachPolicyResponseBody.js +62 -0
- package/dist/models/UpdateAndAttachPolicyResponseBody.js.map +1 -0
- package/dist/models/model.d.ts +11 -0
- package/dist/models/model.js +30 -8
- package/dist/models/model.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +209 -2
- package/src/models/CreateAndAttachPolicyRequest.ts +88 -0
- package/src/models/CreateAndAttachPolicyResponse.ts +40 -0
- package/src/models/CreateAndAttachPolicyResponseBody.ts +85 -0
- package/src/models/HttpApiDeployConfig.ts +7 -0
- package/src/models/ListPoliciesRequest.ts +62 -0
- package/src/models/ListPoliciesResponse.ts +40 -0
- package/src/models/ListPoliciesResponseBody.ts +99 -0
- package/src/models/UndeployHttpApiRequest.ts +1 -1
- package/src/models/UpdateAndAttachPolicyRequest.ts +78 -0
- package/src/models/UpdateAndAttachPolicyResponse.ts +40 -0
- package/src/models/UpdateAndAttachPolicyResponseBody.ts +45 -0
- package/src/models/model.ts +11 -0
package/dist/client.d.ts
CHANGED
|
@@ -62,6 +62,24 @@ export default class Client extends OpenApi {
|
|
|
62
62
|
* @returns ChangeResourceGroupResponse
|
|
63
63
|
*/
|
|
64
64
|
changeResourceGroup(request: $_model.ChangeResourceGroupRequest): Promise<$_model.ChangeResourceGroupResponse>;
|
|
65
|
+
/**
|
|
66
|
+
* CreateAndAttachPolicy
|
|
67
|
+
*
|
|
68
|
+
* @param request - CreateAndAttachPolicyRequest
|
|
69
|
+
* @param headers - map
|
|
70
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
71
|
+
* @returns CreateAndAttachPolicyResponse
|
|
72
|
+
*/
|
|
73
|
+
createAndAttachPolicyWithOptions(request: $_model.CreateAndAttachPolicyRequest, headers: {
|
|
74
|
+
[key: string]: string;
|
|
75
|
+
}, runtime: $dara.RuntimeOptions): Promise<$_model.CreateAndAttachPolicyResponse>;
|
|
76
|
+
/**
|
|
77
|
+
* CreateAndAttachPolicy
|
|
78
|
+
*
|
|
79
|
+
* @param request - CreateAndAttachPolicyRequest
|
|
80
|
+
* @returns CreateAndAttachPolicyResponse
|
|
81
|
+
*/
|
|
82
|
+
createAndAttachPolicy(request: $_model.CreateAndAttachPolicyRequest): Promise<$_model.CreateAndAttachPolicyResponse>;
|
|
65
83
|
/**
|
|
66
84
|
* 创建消费者
|
|
67
85
|
*
|
|
@@ -981,6 +999,24 @@ export default class Client extends OpenApi {
|
|
|
981
999
|
* @returns ListPluginsResponse
|
|
982
1000
|
*/
|
|
983
1001
|
listPlugins(request: $_model.ListPluginsRequest): Promise<$_model.ListPluginsResponse>;
|
|
1002
|
+
/**
|
|
1003
|
+
* ListPolicies
|
|
1004
|
+
*
|
|
1005
|
+
* @param request - ListPoliciesRequest
|
|
1006
|
+
* @param headers - map
|
|
1007
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
1008
|
+
* @returns ListPoliciesResponse
|
|
1009
|
+
*/
|
|
1010
|
+
listPoliciesWithOptions(request: $_model.ListPoliciesRequest, headers: {
|
|
1011
|
+
[key: string]: string;
|
|
1012
|
+
}, runtime: $dara.RuntimeOptions): Promise<$_model.ListPoliciesResponse>;
|
|
1013
|
+
/**
|
|
1014
|
+
* ListPolicies
|
|
1015
|
+
*
|
|
1016
|
+
* @param request - ListPoliciesRequest
|
|
1017
|
+
* @returns ListPoliciesResponse
|
|
1018
|
+
*/
|
|
1019
|
+
listPolicies(request: $_model.ListPoliciesRequest): Promise<$_model.ListPoliciesResponse>;
|
|
984
1020
|
/**
|
|
985
1021
|
* ListPolicyClasses
|
|
986
1022
|
*
|
|
@@ -1099,7 +1135,7 @@ export default class Client extends OpenApi {
|
|
|
1099
1135
|
*/
|
|
1100
1136
|
restartGateway(gatewayId: string): Promise<$_model.RestartGatewayResponse>;
|
|
1101
1137
|
/**
|
|
1102
|
-
*
|
|
1138
|
+
* Unpublishes an HTTP API.
|
|
1103
1139
|
*
|
|
1104
1140
|
* @param request - UndeployHttpApiRequest
|
|
1105
1141
|
* @param headers - map
|
|
@@ -1110,12 +1146,30 @@ export default class Client extends OpenApi {
|
|
|
1110
1146
|
[key: string]: string;
|
|
1111
1147
|
}, runtime: $dara.RuntimeOptions): Promise<$_model.UndeployHttpApiResponse>;
|
|
1112
1148
|
/**
|
|
1113
|
-
*
|
|
1149
|
+
* Unpublishes an HTTP API.
|
|
1114
1150
|
*
|
|
1115
1151
|
* @param request - UndeployHttpApiRequest
|
|
1116
1152
|
* @returns UndeployHttpApiResponse
|
|
1117
1153
|
*/
|
|
1118
1154
|
undeployHttpApi(httpApiId: string, request: $_model.UndeployHttpApiRequest): Promise<$_model.UndeployHttpApiResponse>;
|
|
1155
|
+
/**
|
|
1156
|
+
* UpdateAndAttachPolicy
|
|
1157
|
+
*
|
|
1158
|
+
* @param request - UpdateAndAttachPolicyRequest
|
|
1159
|
+
* @param headers - map
|
|
1160
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
1161
|
+
* @returns UpdateAndAttachPolicyResponse
|
|
1162
|
+
*/
|
|
1163
|
+
updateAndAttachPolicyWithOptions(policyId: string, request: $_model.UpdateAndAttachPolicyRequest, headers: {
|
|
1164
|
+
[key: string]: string;
|
|
1165
|
+
}, runtime: $dara.RuntimeOptions): Promise<$_model.UpdateAndAttachPolicyResponse>;
|
|
1166
|
+
/**
|
|
1167
|
+
* UpdateAndAttachPolicy
|
|
1168
|
+
*
|
|
1169
|
+
* @param request - UpdateAndAttachPolicyRequest
|
|
1170
|
+
* @returns UpdateAndAttachPolicyResponse
|
|
1171
|
+
*/
|
|
1172
|
+
updateAndAttachPolicy(policyId: string, request: $_model.UpdateAndAttachPolicyRequest): Promise<$_model.UpdateAndAttachPolicyResponse>;
|
|
1119
1173
|
/**
|
|
1120
1174
|
* 更新消费者
|
|
1121
1175
|
*
|
package/dist/client.js
CHANGED
|
@@ -202,6 +202,69 @@ class Client extends openapi_core_1.default {
|
|
|
202
202
|
let headers = {};
|
|
203
203
|
return await this.changeResourceGroupWithOptions(request, headers, runtime);
|
|
204
204
|
}
|
|
205
|
+
/**
|
|
206
|
+
* CreateAndAttachPolicy
|
|
207
|
+
*
|
|
208
|
+
* @param request - CreateAndAttachPolicyRequest
|
|
209
|
+
* @param headers - map
|
|
210
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
211
|
+
* @returns CreateAndAttachPolicyResponse
|
|
212
|
+
*/
|
|
213
|
+
async createAndAttachPolicyWithOptions(request, headers, runtime) {
|
|
214
|
+
request.validate();
|
|
215
|
+
let body = {};
|
|
216
|
+
if (!$dara.isNull(request.attachResourceIds)) {
|
|
217
|
+
body["attachResourceIds"] = request.attachResourceIds;
|
|
218
|
+
}
|
|
219
|
+
if (!$dara.isNull(request.attachResourceType)) {
|
|
220
|
+
body["attachResourceType"] = request.attachResourceType;
|
|
221
|
+
}
|
|
222
|
+
if (!$dara.isNull(request.className)) {
|
|
223
|
+
body["className"] = request.className;
|
|
224
|
+
}
|
|
225
|
+
if (!$dara.isNull(request.config)) {
|
|
226
|
+
body["config"] = request.config;
|
|
227
|
+
}
|
|
228
|
+
if (!$dara.isNull(request.description)) {
|
|
229
|
+
body["description"] = request.description;
|
|
230
|
+
}
|
|
231
|
+
if (!$dara.isNull(request.environmentId)) {
|
|
232
|
+
body["environmentId"] = request.environmentId;
|
|
233
|
+
}
|
|
234
|
+
if (!$dara.isNull(request.gatewayId)) {
|
|
235
|
+
body["gatewayId"] = request.gatewayId;
|
|
236
|
+
}
|
|
237
|
+
if (!$dara.isNull(request.name)) {
|
|
238
|
+
body["name"] = request.name;
|
|
239
|
+
}
|
|
240
|
+
let req = new openapi_core_2.$OpenApiUtil.OpenApiRequest({
|
|
241
|
+
headers: headers,
|
|
242
|
+
body: openapi_core_2.OpenApiUtil.parseToMap(body),
|
|
243
|
+
});
|
|
244
|
+
let params = new openapi_core_2.$OpenApiUtil.Params({
|
|
245
|
+
action: "CreateAndAttachPolicy",
|
|
246
|
+
version: "2024-03-27",
|
|
247
|
+
protocol: "HTTPS",
|
|
248
|
+
pathname: `/v1/policies`,
|
|
249
|
+
method: "POST",
|
|
250
|
+
authType: "AK",
|
|
251
|
+
style: "ROA",
|
|
252
|
+
reqBodyType: "json",
|
|
253
|
+
bodyType: "json",
|
|
254
|
+
});
|
|
255
|
+
return $dara.cast(await this.callApi(params, req, runtime), new $_model.CreateAndAttachPolicyResponse({}));
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* CreateAndAttachPolicy
|
|
259
|
+
*
|
|
260
|
+
* @param request - CreateAndAttachPolicyRequest
|
|
261
|
+
* @returns CreateAndAttachPolicyResponse
|
|
262
|
+
*/
|
|
263
|
+
async createAndAttachPolicy(request) {
|
|
264
|
+
let runtime = new $dara.RuntimeOptions({});
|
|
265
|
+
let headers = {};
|
|
266
|
+
return await this.createAndAttachPolicyWithOptions(request, headers, runtime);
|
|
267
|
+
}
|
|
205
268
|
/**
|
|
206
269
|
* 创建消费者
|
|
207
270
|
*
|
|
@@ -2788,6 +2851,63 @@ class Client extends openapi_core_1.default {
|
|
|
2788
2851
|
let headers = {};
|
|
2789
2852
|
return await this.listPluginsWithOptions(request, headers, runtime);
|
|
2790
2853
|
}
|
|
2854
|
+
/**
|
|
2855
|
+
* ListPolicies
|
|
2856
|
+
*
|
|
2857
|
+
* @param request - ListPoliciesRequest
|
|
2858
|
+
* @param headers - map
|
|
2859
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
2860
|
+
* @returns ListPoliciesResponse
|
|
2861
|
+
*/
|
|
2862
|
+
async listPoliciesWithOptions(request, headers, runtime) {
|
|
2863
|
+
request.validate();
|
|
2864
|
+
let query = {};
|
|
2865
|
+
if (!$dara.isNull(request.attachResourceId)) {
|
|
2866
|
+
query["attachResourceId"] = request.attachResourceId;
|
|
2867
|
+
}
|
|
2868
|
+
if (!$dara.isNull(request.attachResourceType)) {
|
|
2869
|
+
query["attachResourceType"] = request.attachResourceType;
|
|
2870
|
+
}
|
|
2871
|
+
if (!$dara.isNull(request.environmentId)) {
|
|
2872
|
+
query["environmentId"] = request.environmentId;
|
|
2873
|
+
}
|
|
2874
|
+
if (!$dara.isNull(request.gatewayId)) {
|
|
2875
|
+
query["gatewayId"] = request.gatewayId;
|
|
2876
|
+
}
|
|
2877
|
+
if (!$dara.isNull(request.withAttachments)) {
|
|
2878
|
+
query["withAttachments"] = request.withAttachments;
|
|
2879
|
+
}
|
|
2880
|
+
if (!$dara.isNull(request.withSystemPolicy)) {
|
|
2881
|
+
query["withSystemPolicy"] = request.withSystemPolicy;
|
|
2882
|
+
}
|
|
2883
|
+
let req = new openapi_core_2.$OpenApiUtil.OpenApiRequest({
|
|
2884
|
+
headers: headers,
|
|
2885
|
+
query: openapi_core_2.OpenApiUtil.query(query),
|
|
2886
|
+
});
|
|
2887
|
+
let params = new openapi_core_2.$OpenApiUtil.Params({
|
|
2888
|
+
action: "ListPolicies",
|
|
2889
|
+
version: "2024-03-27",
|
|
2890
|
+
protocol: "HTTPS",
|
|
2891
|
+
pathname: `/v1/policies`,
|
|
2892
|
+
method: "GET",
|
|
2893
|
+
authType: "AK",
|
|
2894
|
+
style: "ROA",
|
|
2895
|
+
reqBodyType: "json",
|
|
2896
|
+
bodyType: "json",
|
|
2897
|
+
});
|
|
2898
|
+
return $dara.cast(await this.callApi(params, req, runtime), new $_model.ListPoliciesResponse({}));
|
|
2899
|
+
}
|
|
2900
|
+
/**
|
|
2901
|
+
* ListPolicies
|
|
2902
|
+
*
|
|
2903
|
+
* @param request - ListPoliciesRequest
|
|
2904
|
+
* @returns ListPoliciesResponse
|
|
2905
|
+
*/
|
|
2906
|
+
async listPolicies(request) {
|
|
2907
|
+
let runtime = new $dara.RuntimeOptions({});
|
|
2908
|
+
let headers = {};
|
|
2909
|
+
return await this.listPoliciesWithOptions(request, headers, runtime);
|
|
2910
|
+
}
|
|
2791
2911
|
/**
|
|
2792
2912
|
* ListPolicyClasses
|
|
2793
2913
|
*
|
|
@@ -3131,7 +3251,7 @@ class Client extends openapi_core_1.default {
|
|
|
3131
3251
|
return await this.restartGatewayWithOptions(gatewayId, headers, runtime);
|
|
3132
3252
|
}
|
|
3133
3253
|
/**
|
|
3134
|
-
*
|
|
3254
|
+
* Unpublishes an HTTP API.
|
|
3135
3255
|
*
|
|
3136
3256
|
* @param request - UndeployHttpApiRequest
|
|
3137
3257
|
* @param headers - map
|
|
@@ -3171,7 +3291,7 @@ class Client extends openapi_core_1.default {
|
|
|
3171
3291
|
return $dara.cast(await this.callApi(params, req, runtime), new $_model.UndeployHttpApiResponse({}));
|
|
3172
3292
|
}
|
|
3173
3293
|
/**
|
|
3174
|
-
*
|
|
3294
|
+
* Unpublishes an HTTP API.
|
|
3175
3295
|
*
|
|
3176
3296
|
* @param request - UndeployHttpApiRequest
|
|
3177
3297
|
* @returns UndeployHttpApiResponse
|
|
@@ -3181,6 +3301,66 @@ class Client extends openapi_core_1.default {
|
|
|
3181
3301
|
let headers = {};
|
|
3182
3302
|
return await this.undeployHttpApiWithOptions(httpApiId, request, headers, runtime);
|
|
3183
3303
|
}
|
|
3304
|
+
/**
|
|
3305
|
+
* UpdateAndAttachPolicy
|
|
3306
|
+
*
|
|
3307
|
+
* @param request - UpdateAndAttachPolicyRequest
|
|
3308
|
+
* @param headers - map
|
|
3309
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
3310
|
+
* @returns UpdateAndAttachPolicyResponse
|
|
3311
|
+
*/
|
|
3312
|
+
async updateAndAttachPolicyWithOptions(policyId, request, headers, runtime) {
|
|
3313
|
+
request.validate();
|
|
3314
|
+
let body = {};
|
|
3315
|
+
if (!$dara.isNull(request.attachResourceIds)) {
|
|
3316
|
+
body["attachResourceIds"] = request.attachResourceIds;
|
|
3317
|
+
}
|
|
3318
|
+
if (!$dara.isNull(request.attachResourceType)) {
|
|
3319
|
+
body["attachResourceType"] = request.attachResourceType;
|
|
3320
|
+
}
|
|
3321
|
+
if (!$dara.isNull(request.config)) {
|
|
3322
|
+
body["config"] = request.config;
|
|
3323
|
+
}
|
|
3324
|
+
if (!$dara.isNull(request.description)) {
|
|
3325
|
+
body["description"] = request.description;
|
|
3326
|
+
}
|
|
3327
|
+
if (!$dara.isNull(request.environmentId)) {
|
|
3328
|
+
body["environmentId"] = request.environmentId;
|
|
3329
|
+
}
|
|
3330
|
+
if (!$dara.isNull(request.gatewayId)) {
|
|
3331
|
+
body["gatewayId"] = request.gatewayId;
|
|
3332
|
+
}
|
|
3333
|
+
if (!$dara.isNull(request.name)) {
|
|
3334
|
+
body["name"] = request.name;
|
|
3335
|
+
}
|
|
3336
|
+
let req = new openapi_core_2.$OpenApiUtil.OpenApiRequest({
|
|
3337
|
+
headers: headers,
|
|
3338
|
+
body: openapi_core_2.OpenApiUtil.parseToMap(body),
|
|
3339
|
+
});
|
|
3340
|
+
let params = new openapi_core_2.$OpenApiUtil.Params({
|
|
3341
|
+
action: "UpdateAndAttachPolicy",
|
|
3342
|
+
version: "2024-03-27",
|
|
3343
|
+
protocol: "HTTPS",
|
|
3344
|
+
pathname: `/v1/policies/${$dara.URL.percentEncode(policyId)}`,
|
|
3345
|
+
method: "PUT",
|
|
3346
|
+
authType: "AK",
|
|
3347
|
+
style: "ROA",
|
|
3348
|
+
reqBodyType: "json",
|
|
3349
|
+
bodyType: "json",
|
|
3350
|
+
});
|
|
3351
|
+
return $dara.cast(await this.callApi(params, req, runtime), new $_model.UpdateAndAttachPolicyResponse({}));
|
|
3352
|
+
}
|
|
3353
|
+
/**
|
|
3354
|
+
* UpdateAndAttachPolicy
|
|
3355
|
+
*
|
|
3356
|
+
* @param request - UpdateAndAttachPolicyRequest
|
|
3357
|
+
* @returns UpdateAndAttachPolicyResponse
|
|
3358
|
+
*/
|
|
3359
|
+
async updateAndAttachPolicy(policyId, request) {
|
|
3360
|
+
let runtime = new $dara.RuntimeOptions({});
|
|
3361
|
+
let headers = {};
|
|
3362
|
+
return await this.updateAndAttachPolicyWithOptions(policyId, request, headers, runtime);
|
|
3363
|
+
}
|
|
3184
3364
|
/**
|
|
3185
3365
|
* 更新消费者
|
|
3186
3366
|
*
|