function main(organizationId, customModuleId, locationId = 'global') {
  // [START securitycenter_get_security_health_analytics_custom_module]
  // npm install '@google-cloud/securitycentermanagement'
  const {
    SecurityCenterManagementClient,
  } = require('@google-cloud/securitycentermanagement');

  const client = new SecurityCenterManagementClient();

  /*
   * Required. Resource name of security health analytics module.
   *     Its format is
   *    `organizations/[organization_id]/locations/[location_id]/securityHealthAnalyticsCustomModules/[custom_module]`
   *    `folders/[folder_id]/locations/[location_id]/securityHealthAnalyticsCustomModules/[custom_module]`
   *    `projects/[project_id]/locations/[location_id]/securityHealthAnalyticsCustomModules/[custom_module]`
   */
  const name = `organizations/${organizationId}/locations/${locationId}/securityHealthAnalyticsCustomModules/${customModuleId}`;

  async function getSecurityHealthAnalyticsCustomModule() {
    const [response] = await client.getSecurityHealthAnalyticsCustomModule({
      name: name,
    });
    console.log(
      'Security Health Analytics Custom Module get succeeded: ',
      response
    );
  }

  getSecurityHealthAnalyticsCustomModule();
  // [END securitycenter_get_security_health_analytics_custom_module]
}
Retrieve an existing security health analytics custom module