Skip to content

Commit a9ae90e

Browse files
committed
Support API ListProtectedResources.
1 parent 35475a8 commit a9ae90e

File tree

6 files changed

+321
-1
lines changed

6 files changed

+321
-1
lines changed

hbr-20170908/package.json

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

hbr-20170908/src/client.ts

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4305,6 +4305,68 @@ export default class Client extends OpenApi {
43054305
return await this.installBackupClientsWithOptions(request, runtime);
43064306
}
43074307

4308+
/**
4309+
* 查询已保护的资源列表
4310+
*
4311+
* @param request - ListProtectedResourcesRequest
4312+
* @param runtime - runtime options for this request RuntimeOptions
4313+
* @returns ListProtectedResourcesResponse
4314+
*/
4315+
async listProtectedResourcesWithOptions(request: $_model.ListProtectedResourcesRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ListProtectedResourcesResponse> {
4316+
request.validate();
4317+
let query = { };
4318+
if (!$dara.isNull(request.createdByProduct)) {
4319+
query["CreatedByProduct"] = request.createdByProduct;
4320+
}
4321+
4322+
if (!$dara.isNull(request.maxResults)) {
4323+
query["MaxResults"] = request.maxResults;
4324+
}
4325+
4326+
if (!$dara.isNull(request.nextToken)) {
4327+
query["NextToken"] = request.nextToken;
4328+
}
4329+
4330+
if (!$dara.isNull(request.resourceId)) {
4331+
query["ResourceId"] = request.resourceId;
4332+
}
4333+
4334+
if (!$dara.isNull(request.skip)) {
4335+
query["Skip"] = request.skip;
4336+
}
4337+
4338+
if (!$dara.isNull(request.sourceType)) {
4339+
query["SourceType"] = request.sourceType;
4340+
}
4341+
4342+
let req = new $OpenApiUtil.OpenApiRequest({
4343+
query: OpenApiUtil.query(query),
4344+
});
4345+
let params = new $OpenApiUtil.Params({
4346+
action: "ListProtectedResources",
4347+
version: "2017-09-08",
4348+
protocol: "HTTPS",
4349+
pathname: "/",
4350+
method: "POST",
4351+
authType: "AK",
4352+
style: "RPC",
4353+
reqBodyType: "formData",
4354+
bodyType: "json",
4355+
});
4356+
return $dara.cast<$_model.ListProtectedResourcesResponse>(await this.callApi(params, req, runtime), new $_model.ListProtectedResourcesResponse({}));
4357+
}
4358+
4359+
/**
4360+
* 查询已保护的资源列表
4361+
*
4362+
* @param request - ListProtectedResourcesRequest
4363+
* @returns ListProtectedResourcesResponse
4364+
*/
4365+
async listProtectedResources(request: $_model.ListProtectedResourcesRequest): Promise<$_model.ListProtectedResourcesResponse> {
4366+
let runtime = new $dara.RuntimeOptions({ });
4367+
return await this.listProtectedResourcesWithOptions(request, runtime);
4368+
}
4369+
43084370
/**
43094371
* Activates Cloud Backup.
43104372
*
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
// This file is auto-generated, don't edit it
2+
import * as $dara from '@darabonba/typescript';
3+
4+
5+
export class ListProtectedResourcesRequest extends $dara.Model {
6+
/**
7+
* @example
8+
* BASIC
9+
*/
10+
createdByProduct?: string;
11+
/**
12+
* @example
13+
* 10
14+
*/
15+
maxResults?: number;
16+
/**
17+
* @example
18+
* aWQj********MCMy
19+
*/
20+
nextToken?: string;
21+
/**
22+
* @example
23+
* i-wz95************7zrd
24+
*/
25+
resourceId?: string;
26+
/**
27+
* @example
28+
* 10
29+
*/
30+
skip?: number;
31+
/**
32+
* @example
33+
* ECS_FILE
34+
*/
35+
sourceType?: string;
36+
static names(): { [key: string]: string } {
37+
return {
38+
createdByProduct: 'CreatedByProduct',
39+
maxResults: 'MaxResults',
40+
nextToken: 'NextToken',
41+
resourceId: 'ResourceId',
42+
skip: 'Skip',
43+
sourceType: 'SourceType',
44+
};
45+
}
46+
47+
static types(): { [key: string]: any } {
48+
return {
49+
createdByProduct: 'string',
50+
maxResults: 'number',
51+
nextToken: 'string',
52+
resourceId: 'string',
53+
skip: 'number',
54+
sourceType: 'string',
55+
};
56+
}
57+
58+
validate() {
59+
super.validate();
60+
}
61+
62+
constructor(map?: { [key: string]: any }) {
63+
super(map);
64+
}
65+
}
66+
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 { ListProtectedResourcesResponseBody } from "./ListProtectedResourcesResponseBody";
4+
5+
6+
export class ListProtectedResourcesResponse extends $dara.Model {
7+
headers?: { [key: string]: string };
8+
statusCode?: number;
9+
body?: ListProtectedResourcesResponseBody;
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: ListProtectedResourcesResponseBody,
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: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
// This file is auto-generated, don't edit it
2+
import * as $dara from '@darabonba/typescript';
3+
4+
5+
export class ListProtectedResourcesResponseBodyProtectedResources extends $dara.Model {
6+
/**
7+
* @example
8+
* BASIC
9+
*/
10+
createdByProduct?: string;
11+
/**
12+
* @example
13+
* 107374182400
14+
*/
15+
protectedDataSize?: number;
16+
/**
17+
* @example
18+
* pr-0004************gs61
19+
*/
20+
protectedResourceId?: string;
21+
/**
22+
* @example
23+
* i-wz95************7zrd
24+
*/
25+
resourceId?: string;
26+
/**
27+
* @example
28+
* 1024********0703
29+
*/
30+
resourceOwnerId?: number;
31+
/**
32+
* @example
33+
* 30
34+
*/
35+
snapshotCount?: number;
36+
/**
37+
* @example
38+
* ECS_FILE
39+
*/
40+
sourceType?: string;
41+
static names(): { [key: string]: string } {
42+
return {
43+
createdByProduct: 'CreatedByProduct',
44+
protectedDataSize: 'ProtectedDataSize',
45+
protectedResourceId: 'ProtectedResourceId',
46+
resourceId: 'ResourceId',
47+
resourceOwnerId: 'ResourceOwnerId',
48+
snapshotCount: 'SnapshotCount',
49+
sourceType: 'SourceType',
50+
};
51+
}
52+
53+
static types(): { [key: string]: any } {
54+
return {
55+
createdByProduct: 'string',
56+
protectedDataSize: 'number',
57+
protectedResourceId: 'string',
58+
resourceId: 'string',
59+
resourceOwnerId: 'number',
60+
snapshotCount: 'number',
61+
sourceType: 'string',
62+
};
63+
}
64+
65+
validate() {
66+
super.validate();
67+
}
68+
69+
constructor(map?: { [key: string]: any }) {
70+
super(map);
71+
}
72+
}
73+
74+
export class ListProtectedResourcesResponseBody extends $dara.Model {
75+
/**
76+
* @example
77+
* 200
78+
*/
79+
code?: string;
80+
/**
81+
* @example
82+
* 10
83+
*/
84+
maxResults?: number;
85+
/**
86+
* @example
87+
* successful
88+
*/
89+
message?: string;
90+
/**
91+
* @example
92+
* eyJJ************MX0=
93+
*/
94+
nextToken?: string;
95+
protectedResources?: ListProtectedResourcesResponseBodyProtectedResources[];
96+
/**
97+
* @example
98+
* EB09****-****-****-****-********6C38
99+
*/
100+
requestId?: string;
101+
/**
102+
* @example
103+
* true
104+
*/
105+
success?: boolean;
106+
/**
107+
* @example
108+
* 3
109+
*/
110+
totalCount?: number;
111+
static names(): { [key: string]: string } {
112+
return {
113+
code: 'Code',
114+
maxResults: 'MaxResults',
115+
message: 'Message',
116+
nextToken: 'NextToken',
117+
protectedResources: 'ProtectedResources',
118+
requestId: 'RequestId',
119+
success: 'Success',
120+
totalCount: 'TotalCount',
121+
};
122+
}
123+
124+
static types(): { [key: string]: any } {
125+
return {
126+
code: 'string',
127+
maxResults: 'number',
128+
message: 'string',
129+
nextToken: 'string',
130+
protectedResources: { 'type': 'array', 'itemType': ListProtectedResourcesResponseBodyProtectedResources },
131+
requestId: 'string',
132+
success: 'boolean',
133+
totalCount: 'number',
134+
};
135+
}
136+
137+
validate() {
138+
if(Array.isArray(this.protectedResources)) {
139+
$dara.Model.validateArray(this.protectedResources);
140+
}
141+
super.validate();
142+
}
143+
144+
constructor(map?: { [key: string]: any }) {
145+
super(map);
146+
}
147+
}
148+

hbr-20170908/src/models/model.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ export { DescribeVaultsResponseBodyVaultsVaultTrialInfo } from './DescribeVaults
9797
export { DescribeVaultsResponseBodyVaultsVault } from './DescribeVaultsResponseBody';
9898
export { DescribeVaultsResponseBodyVaults } from './DescribeVaultsResponseBody';
9999
export { InstallBackupClientsResponseBodyInstanceStatuses } from './InstallBackupClientsResponseBody';
100+
export { ListProtectedResourcesResponseBodyProtectedResources } from './ListProtectedResourcesResponseBody';
100101
export { SearchHistoricalSnapshotsResponseBodySnapshotsSnapshotPaths } from './SearchHistoricalSnapshotsResponseBody';
101102
export { SearchHistoricalSnapshotsResponseBodySnapshotsSnapshot } from './SearchHistoricalSnapshotsResponseBody';
102103
export { SearchHistoricalSnapshotsResponseBodySnapshots } from './SearchHistoricalSnapshotsResponseBody';
@@ -316,6 +317,9 @@ export { InstallBackupClientsRequest } from './InstallBackupClientsRequest';
316317
export { InstallBackupClientsShrinkRequest } from './InstallBackupClientsShrinkRequest';
317318
export { InstallBackupClientsResponseBody } from './InstallBackupClientsResponseBody';
318319
export { InstallBackupClientsResponse } from './InstallBackupClientsResponse';
320+
export { ListProtectedResourcesRequest } from './ListProtectedResourcesRequest';
321+
export { ListProtectedResourcesResponseBody } from './ListProtectedResourcesResponseBody';
322+
export { ListProtectedResourcesResponse } from './ListProtectedResourcesResponse';
319323
export { OpenHbrServiceResponseBody } from './OpenHbrServiceResponseBody';
320324
export { OpenHbrServiceResponse } from './OpenHbrServiceResponse';
321325
export { SearchHistoricalSnapshotsRequest } from './SearchHistoricalSnapshotsRequest';

0 commit comments

Comments
 (0)