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'
44import groupBy from 'lodash/groupBy'
55import isEmpty from 'lodash/isEmpty'
66import { StrategyInfo } from 'tencentcloud-sdk-nodejs/tencentcloud/services/cam/v20190116/cam_models'
7+ import cuid from 'cuid'
78import loggerText from '../../properties/logger'
89import { TencentServiceInput } from '../../types'
910import { initTestEndpoint , generateTencentErrorLog } from '../../utils'
@@ -14,7 +15,7 @@ export const serviceName = 'CamPolicy'
1415const apiEndpoint = initTestEndpoint ( serviceName )
1516
1617export interface RawTencentCamPolicy extends StrategyInfo {
17- id : number
18+ id : string
1819 region : string
1920}
2021
@@ -38,7 +39,7 @@ export default async ({
3839 if ( response && ! isEmpty ( response . List ) ) {
3940 for ( const instance of response . List ) {
4041 camPolicyList . push ( {
41- id : instance . PolicyId ,
42+ id : cuid ( ) ,
4243 ...instance ,
4344 region,
4445 } )
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ export default ({
1010} ) : TencentCamPolicy => {
1111 const {
1212 id,
13+ PolicyId : policyId ,
1314 PolicyName : name ,
1415 AddTime : addTime ,
1516 Type : type ,
@@ -28,6 +29,7 @@ export default ({
2829
2930 return {
3031 id : `${ id } ` ,
32+ policyId,
3133 region,
3234 name,
3335 addTime,
Original file line number Diff line number Diff line change 11type tencentCamPolicy implements tencentBaseService @key (fields : " id" ) {
2+ policyId : Int @search
23 name : String @search (by : [hash , regexp ])
34 addTime : String @search (by : [hash , regexp ])
45 type : Int @search
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ export type TencentCamPolicy = TencentBaseService & {
2929 isAttached ?: Maybe < Scalars [ 'Int' ] > ;
3030 isServiceLinkedPolicy ?: Maybe < Scalars [ 'Int' ] > ;
3131 name ?: Maybe < Scalars [ 'String' ] > ;
32+ policyId ?: Maybe < Scalars [ 'Int' ] > ;
3233 serviceType ?: Maybe < Scalars [ 'String' ] > ;
3334 type ?: Maybe < Scalars [ 'Int' ] > ;
3435 updateTime ?: Maybe < Scalars [ 'String' ] > ;
You can’t perform that action at this time.
0 commit comments