// Imports the Google Cloud client library.
const {SecurityCenterClient} = require('@google-cloud/security-center');
// Creates a new client.
const client = new SecurityCenterClient();
async function getOrgSettings() {
// organizationId is the numeric ID of the organization.
/*
* TODO(developer): Uncomment the following lines
*/
// const organizaionId = "111122222444";
const orgName = client.organizationPath(organizationId);
const [settings] = await client.getOrganizationSettings({
name: `${orgName}/organizationSettings`,
});
console.log('Current settings: %j', settings);
}
getOrgSettings();
from google.cloud import securitycenter
client = securitycenter.SecurityCenterClient()
# organization_id is numeric ID for the organization. e.g.
# organization_id = "111112223333"
org_settings_name = client.organization_settings_path(organization_id)
org_settings = client.get_organization_settings(request={"name": org_settings_name})
print(org_settings)