File tree Expand file tree Collapse file tree 4 files changed +7
-2
lines changed Expand file tree Collapse file tree 4 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import CloudGraph from '@cloudgraph/sdk'
4
4
import groupBy from 'lodash/groupBy'
5
5
import isEmpty from 'lodash/isEmpty'
6
6
import { StrategyInfo } from 'tencentcloud-sdk-nodejs/tencentcloud/services/cam/v20190116/cam_models'
7
+ import cuid from 'cuid'
7
8
import loggerText from '../../properties/logger'
8
9
import { TencentServiceInput } from '../../types'
9
10
import { initTestEndpoint , generateTencentErrorLog } from '../../utils'
@@ -14,7 +15,7 @@ export const serviceName = 'CamPolicy'
14
15
const apiEndpoint = initTestEndpoint ( serviceName )
15
16
16
17
export interface RawTencentCamPolicy extends StrategyInfo {
17
- id : number
18
+ id : string
18
19
region : string
19
20
}
20
21
@@ -38,7 +39,7 @@ export default async ({
38
39
if ( response && ! isEmpty ( response . List ) ) {
39
40
for ( const instance of response . List ) {
40
41
camPolicyList . push ( {
41
- id : instance . PolicyId ,
42
+ id : cuid ( ) ,
42
43
...instance ,
43
44
region,
44
45
} )
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ export default ({
10
10
} ) : TencentCamPolicy => {
11
11
const {
12
12
id,
13
+ PolicyId : policyId ,
13
14
PolicyName : name ,
14
15
AddTime : addTime ,
15
16
Type : type ,
@@ -28,6 +29,7 @@ export default ({
28
29
29
30
return {
30
31
id : `${ id } ` ,
32
+ policyId,
31
33
region,
32
34
name,
33
35
addTime,
Original file line number Diff line number Diff line change 1
1
type tencentCamPolicy implements tencentBaseService @key (fields : " id" ) {
2
+ policyId : Int @search
2
3
name : String @search (by : [hash , regexp ])
3
4
addTime : String @search (by : [hash , regexp ])
4
5
type : Int @search
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ export type TencentCamPolicy = TencentBaseService & {
29
29
isAttached ?: Maybe < Scalars [ 'Int' ] > ;
30
30
isServiceLinkedPolicy ?: Maybe < Scalars [ 'Int' ] > ;
31
31
name ?: Maybe < Scalars [ 'String' ] > ;
32
+ policyId ?: Maybe < Scalars [ 'Int' ] > ;
32
33
serviceType ?: Maybe < Scalars [ 'String' ] > ;
33
34
type ?: Maybe < Scalars [ 'Int' ] > ;
34
35
updateTime ?: Maybe < Scalars [ 'String' ] > ;
You can’t perform that action at this time.
0 commit comments