Skip to content

Commit 07d58db

Browse files
feat(CG-1312): update fetch data and README
1 parent 305da4f commit 07d58db

2 files changed

Lines changed: 18 additions & 45 deletions

File tree

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ CloudGraph GCP Provider will ask you what regions you would like to crawl and wi
9090
| kmsCryptoKeys | aiPlatformNotebooks, iamPolicy, kmsKeyRing, project |
9191
| dnsManagedZone | project |
9292
| dnsPolicy | project, network |
93+
| essentialContacts | project |
9394
| firestoreDatabases | project |
9495
| firewall | network, project |
9596
| folder | iamPolicy, organization, project |
@@ -105,10 +106,10 @@ CloudGraph GCP Provider will ask you what regions you would like to crawl and wi
105106
| secretManager | project |
106107
| serviceAccounts | project |
107108
| sqlInstances | project, network |
108-
| sslPolicies | project, targetHttpsProxies, targetSslProxies |
109+
| sslPolicies | project, targetHttpsProxies, targetSslProxies |
109110
| storageBucket | project |
110111
| subnet | project, network, vmInstance, vpcConnectors, aiPlatformNotebooks |
111-
| targetSslProxies | project, sslPolicies |
112-
| targetHttpsProxies | project, sslPolicies |
112+
| targetSslProxies | project, sslPolicies |
113+
| targetHttpsProxies | project, sslPolicies |
113114
| vmInstance | project, network, subnet |
114115
| vpcConnectors | cloudFunction, project, network, subnet |

src/services/essentialContacts/data.ts

Lines changed: 14 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -31,49 +31,21 @@ export default async ({
3131
* Get all EssentialContacts
3232
*/
3333
try {
34-
// const essentialContactsClient = new EssentialContactsServiceClient({ ...config, apiEndpoint });
35-
// const iterable = essentialContactsClient.listContactsAsync({
36-
// parent: `projects/${projectId}`,
37-
// })
38-
39-
// for await (const response of iterable) {
40-
// if (response) {
41-
// essentialContactList.push({
42-
// id: response.name,
43-
// projectId,
44-
// region: GLOBAL_REGION,
45-
// ...response,
46-
// })
47-
// }
48-
// }
49-
essentialContactList.push({
50-
id: 'a',
51-
projectId,
52-
region: GLOBAL_REGION,
53-
name: 'a',
54-
email: 'a@gmail.com',
55-
notificationCategorySubscriptions: [
56-
google.cloud.essentialcontacts.v1.NotificationCategory.TECHNICAL,
57-
google.cloud.essentialcontacts.v1.NotificationCategory.BILLING,
58-
google.cloud.essentialcontacts.v1.NotificationCategory.LEGAL,
59-
],
60-
languageTag: '',
61-
validationState: google.cloud.essentialcontacts.v1.ValidationState.VALIDATION_STATE_UNSPECIFIED,
62-
})
63-
essentialContactList.push({
64-
id: 'b',
65-
projectId,
66-
region: GLOBAL_REGION,
67-
name: 'b',
68-
email: 'b@gmail.com',
69-
notificationCategorySubscriptions: [
70-
google.cloud.essentialcontacts.v1.NotificationCategory.TECHNICAL,
71-
google.cloud.essentialcontacts.v1.NotificationCategory.BILLING,
72-
google.cloud.essentialcontacts.v1.NotificationCategory.LEGAL,
73-
],
74-
languageTag: '',
75-
validationState: google.cloud.essentialcontacts.v1.ValidationState.VALIDATION_STATE_UNSPECIFIED,
34+
const essentialContactsClient = new EssentialContactsServiceClient({ ...config, apiEndpoint });
35+
const iterable = essentialContactsClient.listContactsAsync({
36+
parent: `projects/${projectId}`,
7637
})
38+
39+
for await (const response of iterable) {
40+
if (response) {
41+
essentialContactList.push({
42+
id: response.name,
43+
projectId,
44+
region: GLOBAL_REGION,
45+
...response,
46+
})
47+
}
48+
}
7749
} catch (error) {
7850
generateGcpErrorLog(serviceName, 'essentialContacts:listContactsAsync', error)
7951
}

0 commit comments

Comments
 (0)