Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions healthcare/fhir/getFhirStoreIamPolicy.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const main = (
auth: new google.auth.GoogleAuth({
scopes: ['https://www.googleapis.com/auth/cloud-platform'],
}),
responseType: 'json',
});

const getFhirStoreIamPolicy = async () => {
Expand All @@ -38,14 +39,21 @@ const main = (
const resource_ = `projects/${projectId}/locations/${cloudRegion}/datasets/${datasetId}/fhirStores/${fhirStoreId}`;
const request = {resource_};

const fhirStore =
await healthcare.projects.locations.datasets.fhirStores.getIamPolicy(
request
try {
const fhirStore =
await healthcare.projects.locations.datasets.fhirStores.getIamPolicy(
request
);
console.log(
'Got FHIR store IAM policy:',
JSON.stringify(fhirStore.data, null, 2)
);
console.log(
'Got FHIR store IAM policy:',
JSON.stringify(fhirStore.data, null, 2)
);
} catch (error) {
console.error(
'Error getting FHIR store IAM policy:',
error.message || error
);
}
};

getFhirStoreIamPolicy();
Expand Down
Loading