@alicloud/cs20151215 3.0.6 → 3.0.9

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/LICENSE ADDED
@@ -0,0 +1,13 @@
1
+ Copyright (c) 2009-present, Alibaba Cloud All rights reserved.
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,25 @@
1
+ English | [简体中文](README-CN.md)
2
+ ![](https://aliyunsdk-pages.alicdn.com/icons/AlibabaCloud.svg)
3
+
4
+ # Alibaba Cloud CS SDK for NodeJS
5
+
6
+ ## Installation
7
+ If you use `npm` to manage your dependence, you can use the following command:
8
+
9
+ ```sh
10
+ npm install @alicloud/cs20151215 -S
11
+ ```
12
+
13
+ ## Issues
14
+ [Opening an Issue](https://github.com/aliyun/alibabacloud-typescript-sdk/issues/new), Issues not conforming to the guidelines may be closed immediately.
15
+
16
+ ## Usage
17
+ [Usage Document](https://github.com/aliyun/alibabacloud-typescript-sdk/blob/master/docs/Usage-EN.md#quick-examples)
18
+
19
+ ## References
20
+ * [Latest Release](https://github.com/aliyun/alibabacloud-typescript-sdk/)
21
+
22
+ ## License
23
+ [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0)
24
+
25
+ Copyright (c) 2009-present, Alibaba Cloud All rights reserved.
package/dist/client.d.ts CHANGED
@@ -574,6 +574,34 @@ export declare class CreateTriggerResponse extends $tea.Model {
574
574
  [key: string]: any;
575
575
  });
576
576
  }
577
+ export declare class DeleteAlertContactResponse extends $tea.Model {
578
+ headers: {
579
+ [key: string]: string;
580
+ };
581
+ static names(): {
582
+ [key: string]: string;
583
+ };
584
+ static types(): {
585
+ [key: string]: any;
586
+ };
587
+ constructor(map?: {
588
+ [key: string]: any;
589
+ });
590
+ }
591
+ export declare class DeleteAlertContactGroupResponse extends $tea.Model {
592
+ headers: {
593
+ [key: string]: string;
594
+ };
595
+ static names(): {
596
+ [key: string]: string;
597
+ };
598
+ static types(): {
599
+ [key: string]: any;
600
+ };
601
+ constructor(map?: {
602
+ [key: string]: any;
603
+ });
604
+ }
577
605
  export declare class DeleteClusterRequest extends $tea.Model {
578
606
  keepSlb?: boolean;
579
607
  retainAllResources?: boolean;
@@ -1374,6 +1402,7 @@ export declare class DescribeClustersV1Request extends $tea.Model {
1374
1402
  pageNumber?: number;
1375
1403
  pageSize?: number;
1376
1404
  profile?: string;
1405
+ regionId?: string;
1377
1406
  static names(): {
1378
1407
  [key: string]: string;
1379
1408
  };
@@ -2411,7 +2440,7 @@ export declare class ModifyClusterTagsResponse extends $tea.Model {
2411
2440
  export declare class ModifyPolicyInstanceRequest extends $tea.Model {
2412
2441
  action?: string;
2413
2442
  instanceName?: string;
2414
- namespace?: string;
2443
+ namespaces?: string[];
2415
2444
  parameters?: {
2416
2445
  [key: string]: any;
2417
2446
  };
@@ -2957,6 +2986,33 @@ export declare class UntagResourcesResponse extends $tea.Model {
2957
2986
  [key: string]: any;
2958
2987
  });
2959
2988
  }
2989
+ export declare class UpdateContactGroupForAlertResponse extends $tea.Model {
2990
+ headers: {
2991
+ [key: string]: string;
2992
+ };
2993
+ static names(): {
2994
+ [key: string]: string;
2995
+ };
2996
+ static types(): {
2997
+ [key: string]: any;
2998
+ };
2999
+ constructor(map?: {
3000
+ [key: string]: any;
3001
+ });
3002
+ }
3003
+ export declare class UpdateK8sClusterUserConfigExpireRequest extends $tea.Model {
3004
+ expireHour?: number;
3005
+ user?: string;
3006
+ static names(): {
3007
+ [key: string]: string;
3008
+ };
3009
+ static types(): {
3010
+ [key: string]: any;
3011
+ };
3012
+ constructor(map?: {
3013
+ [key: string]: any;
3014
+ });
3015
+ }
2960
3016
  export declare class UpdateK8sClusterUserConfigExpireResponse extends $tea.Model {
2961
3017
  headers: {
2962
3018
  [key: string]: string;
@@ -3307,7 +3363,6 @@ export declare class DescribeClusterLogsResponseBody extends $tea.Model {
3307
3363
  ID?: number;
3308
3364
  clusterId?: string;
3309
3365
  clusterLog?: string;
3310
- logLevel?: string;
3311
3366
  created?: string;
3312
3367
  updated?: string;
3313
3368
  static names(): {
@@ -4699,6 +4754,14 @@ export default class Client extends OpenApi {
4699
4754
  createTriggerWithOptions(clusterId: string, request: CreateTriggerRequest, headers: {
4700
4755
  [key: string]: string;
4701
4756
  }, runtime: $Util.RuntimeOptions): Promise<CreateTriggerResponse>;
4757
+ deleteAlertContact(): Promise<DeleteAlertContactResponse>;
4758
+ deleteAlertContactWithOptions(headers: {
4759
+ [key: string]: string;
4760
+ }, runtime: $Util.RuntimeOptions): Promise<DeleteAlertContactResponse>;
4761
+ deleteAlertContactGroup(): Promise<DeleteAlertContactGroupResponse>;
4762
+ deleteAlertContactGroupWithOptions(headers: {
4763
+ [key: string]: string;
4764
+ }, runtime: $Util.RuntimeOptions): Promise<DeleteAlertContactGroupResponse>;
4702
4765
  deleteCluster(ClusterId: string, request: DeleteClusterRequest): Promise<DeleteClusterResponse>;
4703
4766
  deleteClusterWithOptions(ClusterId: string, tmpReq: DeleteClusterRequest, headers: {
4704
4767
  [key: string]: string;
@@ -4995,8 +5058,12 @@ export default class Client extends OpenApi {
4995
5058
  untagResourcesWithOptions(request: UntagResourcesRequest, headers: {
4996
5059
  [key: string]: string;
4997
5060
  }, runtime: $Util.RuntimeOptions): Promise<UntagResourcesResponse>;
4998
- updateK8sClusterUserConfigExpire(ClusterId: string): Promise<UpdateK8sClusterUserConfigExpireResponse>;
4999
- updateK8sClusterUserConfigExpireWithOptions(ClusterId: string, headers: {
5061
+ updateContactGroupForAlert(ClusterId: string): Promise<UpdateContactGroupForAlertResponse>;
5062
+ updateContactGroupForAlertWithOptions(ClusterId: string, headers: {
5063
+ [key: string]: string;
5064
+ }, runtime: $Util.RuntimeOptions): Promise<UpdateContactGroupForAlertResponse>;
5065
+ updateK8sClusterUserConfigExpire(ClusterId: string, request: UpdateK8sClusterUserConfigExpireRequest): Promise<UpdateK8sClusterUserConfigExpireResponse>;
5066
+ updateK8sClusterUserConfigExpireWithOptions(ClusterId: string, request: UpdateK8sClusterUserConfigExpireRequest, headers: {
5000
5067
  [key: string]: string;
5001
5068
  }, runtime: $Util.RuntimeOptions): Promise<UpdateK8sClusterUserConfigExpireResponse>;
5002
5069
  updateTemplate(TemplateId: string, request: UpdateTemplateRequest): Promise<UpdateTemplateResponse>;
package/dist/client.js CHANGED
@@ -851,6 +851,38 @@ class CreateTriggerResponse extends $tea.Model {
851
851
  }
852
852
  }
853
853
  exports.CreateTriggerResponse = CreateTriggerResponse;
854
+ class DeleteAlertContactResponse extends $tea.Model {
855
+ constructor(map) {
856
+ super(map);
857
+ }
858
+ static names() {
859
+ return {
860
+ headers: 'headers',
861
+ };
862
+ }
863
+ static types() {
864
+ return {
865
+ headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
866
+ };
867
+ }
868
+ }
869
+ exports.DeleteAlertContactResponse = DeleteAlertContactResponse;
870
+ class DeleteAlertContactGroupResponse extends $tea.Model {
871
+ constructor(map) {
872
+ super(map);
873
+ }
874
+ static names() {
875
+ return {
876
+ headers: 'headers',
877
+ };
878
+ }
879
+ static types() {
880
+ return {
881
+ headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
882
+ };
883
+ }
884
+ }
885
+ exports.DeleteAlertContactGroupResponse = DeleteAlertContactGroupResponse;
854
886
  class DeleteClusterRequest extends $tea.Model {
855
887
  constructor(map) {
856
888
  super(map);
@@ -1901,6 +1933,7 @@ class DescribeClustersV1Request extends $tea.Model {
1901
1933
  pageNumber: 'page_number',
1902
1934
  pageSize: 'page_size',
1903
1935
  profile: 'profile',
1936
+ regionId: 'region_id',
1904
1937
  };
1905
1938
  }
1906
1939
  static types() {
@@ -1911,6 +1944,7 @@ class DescribeClustersV1Request extends $tea.Model {
1911
1944
  pageNumber: 'number',
1912
1945
  pageSize: 'number',
1913
1946
  profile: 'string',
1947
+ regionId: 'string',
1914
1948
  };
1915
1949
  }
1916
1950
  }
@@ -3275,7 +3309,7 @@ class ModifyPolicyInstanceRequest extends $tea.Model {
3275
3309
  return {
3276
3310
  action: 'action',
3277
3311
  instanceName: 'instance_name',
3278
- namespace: 'namespace',
3312
+ namespaces: 'namespaces',
3279
3313
  parameters: 'parameters',
3280
3314
  };
3281
3315
  }
@@ -3283,7 +3317,7 @@ class ModifyPolicyInstanceRequest extends $tea.Model {
3283
3317
  return {
3284
3318
  action: 'string',
3285
3319
  instanceName: 'string',
3286
- namespace: 'string',
3320
+ namespaces: { 'type': 'array', 'itemType': 'string' },
3287
3321
  parameters: { 'type': 'map', 'keyType': 'string', 'valueType': 'any' },
3288
3322
  };
3289
3323
  }
@@ -4009,6 +4043,40 @@ class UntagResourcesResponse extends $tea.Model {
4009
4043
  }
4010
4044
  }
4011
4045
  exports.UntagResourcesResponse = UntagResourcesResponse;
4046
+ class UpdateContactGroupForAlertResponse extends $tea.Model {
4047
+ constructor(map) {
4048
+ super(map);
4049
+ }
4050
+ static names() {
4051
+ return {
4052
+ headers: 'headers',
4053
+ };
4054
+ }
4055
+ static types() {
4056
+ return {
4057
+ headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
4058
+ };
4059
+ }
4060
+ }
4061
+ exports.UpdateContactGroupForAlertResponse = UpdateContactGroupForAlertResponse;
4062
+ class UpdateK8sClusterUserConfigExpireRequest extends $tea.Model {
4063
+ constructor(map) {
4064
+ super(map);
4065
+ }
4066
+ static names() {
4067
+ return {
4068
+ expireHour: 'expire_hour',
4069
+ user: 'user',
4070
+ };
4071
+ }
4072
+ static types() {
4073
+ return {
4074
+ expireHour: 'number',
4075
+ user: 'string',
4076
+ };
4077
+ }
4078
+ }
4079
+ exports.UpdateK8sClusterUserConfigExpireRequest = UpdateK8sClusterUserConfigExpireRequest;
4012
4080
  class UpdateK8sClusterUserConfigExpireResponse extends $tea.Model {
4013
4081
  constructor(map) {
4014
4082
  super(map);
@@ -4518,7 +4586,6 @@ class DescribeClusterLogsResponseBody extends $tea.Model {
4518
4586
  ID: 'ID',
4519
4587
  clusterId: 'cluster_id',
4520
4588
  clusterLog: 'cluster_log',
4521
- logLevel: 'log_level',
4522
4589
  created: 'created',
4523
4590
  updated: 'updated',
4524
4591
  };
@@ -4528,7 +4595,6 @@ class DescribeClusterLogsResponseBody extends $tea.Model {
4528
4595
  ID: 'number',
4529
4596
  clusterId: 'string',
4530
4597
  clusterLog: 'string',
4531
- logLevel: 'string',
4532
4598
  created: 'string',
4533
4599
  updated: 'string',
4534
4600
  };
@@ -7296,6 +7362,50 @@ class Client extends openapi_client_1.default {
7296
7362
  });
7297
7363
  return $tea.cast(await this.callApi(params, req, runtime), new CreateTriggerResponse({}));
7298
7364
  }
7365
+ async deleteAlertContact() {
7366
+ let runtime = new $Util.RuntimeOptions({});
7367
+ let headers = {};
7368
+ return await this.deleteAlertContactWithOptions(headers, runtime);
7369
+ }
7370
+ async deleteAlertContactWithOptions(headers, runtime) {
7371
+ let req = new $OpenApi.OpenApiRequest({
7372
+ headers: headers,
7373
+ });
7374
+ let params = new $OpenApi.Params({
7375
+ action: "DeleteAlertContact",
7376
+ version: "2015-12-15",
7377
+ protocol: "HTTPS",
7378
+ pathname: `/alert/contacts`,
7379
+ method: "DELETE",
7380
+ authType: "AK",
7381
+ style: "ROA",
7382
+ reqBodyType: "json",
7383
+ bodyType: "none",
7384
+ });
7385
+ return $tea.cast(await this.callApi(params, req, runtime), new DeleteAlertContactResponse({}));
7386
+ }
7387
+ async deleteAlertContactGroup() {
7388
+ let runtime = new $Util.RuntimeOptions({});
7389
+ let headers = {};
7390
+ return await this.deleteAlertContactGroupWithOptions(headers, runtime);
7391
+ }
7392
+ async deleteAlertContactGroupWithOptions(headers, runtime) {
7393
+ let req = new $OpenApi.OpenApiRequest({
7394
+ headers: headers,
7395
+ });
7396
+ let params = new $OpenApi.Params({
7397
+ action: "DeleteAlertContactGroup",
7398
+ version: "2015-12-15",
7399
+ protocol: "HTTPS",
7400
+ pathname: `/alert/contact_groups`,
7401
+ method: "DELETE",
7402
+ authType: "AK",
7403
+ style: "ROA",
7404
+ reqBodyType: "json",
7405
+ bodyType: "none",
7406
+ });
7407
+ return $tea.cast(await this.callApi(params, req, runtime), new DeleteAlertContactGroupResponse({}));
7408
+ }
7299
7409
  async deleteCluster(ClusterId, request) {
7300
7410
  let runtime = new $Util.RuntimeOptions({});
7301
7411
  let headers = {};
@@ -8062,6 +8172,9 @@ class Client extends openapi_client_1.default {
8062
8172
  if (!tea_util_1.default.isUnset(request.profile)) {
8063
8173
  query["profile"] = request.profile;
8064
8174
  }
8175
+ if (!tea_util_1.default.isUnset(request.regionId)) {
8176
+ query["region_id"] = request.regionId;
8177
+ }
8065
8178
  let req = new $OpenApi.OpenApiRequest({
8066
8179
  headers: headers,
8067
8180
  query: openapi_util_1.default.query(query),
@@ -9029,8 +9142,8 @@ class Client extends openapi_client_1.default {
9029
9142
  if (!tea_util_1.default.isUnset(request.instanceName)) {
9030
9143
  body["instance_name"] = request.instanceName;
9031
9144
  }
9032
- if (!tea_util_1.default.isUnset(request.namespace)) {
9033
- body["namespace"] = request.namespace;
9145
+ if (!tea_util_1.default.isUnset(request.namespaces)) {
9146
+ body["namespaces"] = request.namespaces;
9034
9147
  }
9035
9148
  if (!tea_util_1.default.isUnset(request.parameters)) {
9036
9149
  body["parameters"] = request.parameters;
@@ -9648,15 +9761,47 @@ class Client extends openapi_client_1.default {
9648
9761
  });
9649
9762
  return $tea.cast(await this.callApi(params, req, runtime), new UntagResourcesResponse({}));
9650
9763
  }
9651
- async updateK8sClusterUserConfigExpire(ClusterId) {
9764
+ async updateContactGroupForAlert(ClusterId) {
9765
+ let runtime = new $Util.RuntimeOptions({});
9766
+ let headers = {};
9767
+ return await this.updateContactGroupForAlertWithOptions(ClusterId, headers, runtime);
9768
+ }
9769
+ async updateContactGroupForAlertWithOptions(ClusterId, headers, runtime) {
9770
+ ClusterId = openapi_util_1.default.getEncodeParam(ClusterId);
9771
+ let req = new $OpenApi.OpenApiRequest({
9772
+ headers: headers,
9773
+ });
9774
+ let params = new $OpenApi.Params({
9775
+ action: "UpdateContactGroupForAlert",
9776
+ version: "2015-12-15",
9777
+ protocol: "HTTPS",
9778
+ pathname: `/alert/${ClusterId}/alert_rule/contact_groups`,
9779
+ method: "POST",
9780
+ authType: "AK",
9781
+ style: "ROA",
9782
+ reqBodyType: "json",
9783
+ bodyType: "none",
9784
+ });
9785
+ return $tea.cast(await this.callApi(params, req, runtime), new UpdateContactGroupForAlertResponse({}));
9786
+ }
9787
+ async updateK8sClusterUserConfigExpire(ClusterId, request) {
9652
9788
  let runtime = new $Util.RuntimeOptions({});
9653
9789
  let headers = {};
9654
- return await this.updateK8sClusterUserConfigExpireWithOptions(ClusterId, headers, runtime);
9790
+ return await this.updateK8sClusterUserConfigExpireWithOptions(ClusterId, request, headers, runtime);
9655
9791
  }
9656
- async updateK8sClusterUserConfigExpireWithOptions(ClusterId, headers, runtime) {
9792
+ async updateK8sClusterUserConfigExpireWithOptions(ClusterId, request, headers, runtime) {
9793
+ tea_util_1.default.validateModel(request);
9657
9794
  ClusterId = openapi_util_1.default.getEncodeParam(ClusterId);
9795
+ let body = {};
9796
+ if (!tea_util_1.default.isUnset(request.expireHour)) {
9797
+ body["expire_hour"] = request.expireHour;
9798
+ }
9799
+ if (!tea_util_1.default.isUnset(request.user)) {
9800
+ body["user"] = request.user;
9801
+ }
9658
9802
  let req = new $OpenApi.OpenApiRequest({
9659
9803
  headers: headers,
9804
+ body: openapi_util_1.default.parseToMap(body),
9660
9805
  });
9661
9806
  let params = new $OpenApi.Params({
9662
9807
  action: "UpdateK8sClusterUserConfigExpire",