Skip to content

Commit

Permalink
docs: remove unused region tags (#359)
Browse files Browse the repository at this point in the history
* fix unmatched region tag

* fix lint

* fix bad copy paste

* fix another bad copy paste

* add new region tags to different demos

* update new tags to match most-used tag from other langs

* docs: remove unused region tags

Co-authored-by: Benjamin E. Coe <bencoe@google.com>
Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com>
  • Loading branch information
3 people authored Mar 8, 2021
1 parent 76ef5e0 commit 8062d54
Show file tree
Hide file tree
Showing 32 changed files with 0 additions and 64 deletions.
2 changes: 0 additions & 2 deletions security-center/snippets/v1/addDeleteSecurityMarks.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
*/
function main(assetName = 'full asset path to add marks to') {
// [START securitycenter_add_delete_security_marks]
// [START demo]
// Imports the Google Cloud client library.
const {SecurityCenterClient} = require('@google-cloud/security-center');

Expand All @@ -44,7 +43,6 @@ function main(assetName = 'full asset path to add marks to') {
console.log('New marks: %j', newMarks);
}
addDeleteSecurityMarks();
// [END demo]
// [END securitycenter_add_delete_security_marks]
}

Expand Down
2 changes: 0 additions & 2 deletions security-center/snippets/v1/addFindingSecurityMarks.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
*/
function main(findingName = 'full finding path to add marks to') {
// [START securitycenter_add_finding_security_marks]
// [START demo]
// Imports the Google Cloud client library.
const {SecurityCenterClient} = require('@google-cloud/security-center');

Expand All @@ -44,7 +43,6 @@ function main(findingName = 'full finding path to add marks to') {
console.log('New marks: %j', newMarks);
}
addFindingSecurityMarks();
// [END demo]
// [END securitycenter_add_finding_security_marks]
}

Expand Down
2 changes: 0 additions & 2 deletions security-center/snippets/v1/addSecurityMarks.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
*/
function main(assetName = 'full asset path to add marks to') {
// [START securitycenter_add_security_marks]
// [START demo]
// Imports the Google Cloud client library.
const {SecurityCenterClient} = require('@google-cloud/security-center');

Expand All @@ -44,7 +43,6 @@ function main(assetName = 'full asset path to add marks to') {
console.log('New marks: %', newMarks);
}
addSecurityMarks();
// [END demo]
// [END securitycenter_add_security_marks]
}

Expand Down
2 changes: 0 additions & 2 deletions security-center/snippets/v1/createFinding.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
*/
function main(sourceName = 'FULL_PATH_TO_SOURCE_FOR_FINDING') {
// [START securitycenter_create_finding]
// [START demo]
// Imports the Google Cloud client library.
const {SecurityCenterClient} = require('@google-cloud/security-center');

Expand Down Expand Up @@ -56,7 +55,6 @@ function main(sourceName = 'FULL_PATH_TO_SOURCE_FOR_FINDING') {
console.log('New finding created: %j', newFinding);
}
createFinding();
// [END demo]
// [END securitycenter_create_finding]
}

Expand Down
2 changes: 0 additions & 2 deletions security-center/snippets/v1/createFindingSourceProperties.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
*/
function main(sourceName = 'FULL_PATH_TO_SOURCE_FOR_FINDING') {
// [START securitycenter_create_finding_with_source_properties]
// [START demo]
// Imports the Google Cloud client library.
const {SecurityCenterClient} = require('@google-cloud/security-center');

Expand Down Expand Up @@ -61,7 +60,6 @@ function main(sourceName = 'FULL_PATH_TO_SOURCE_FOR_FINDING') {
console.log('New finding created: %j', newFinding);
}
createFinding();
// [END demo]
// [END securitycenter_create_finding_with_source_properties]
}

Expand Down
2 changes: 0 additions & 2 deletions security-center/snippets/v1/createNotificationConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ function main(
pubsubTopic = 'projects/{your-project}/topics/{your-topic}'
) {
// [START securitycenter_create_notification_config]
// [START scc_create_notification_config]
// npm install @google-cloud/security-center/
const {SecurityCenterClient} = require('@google-cloud/security-center');

Expand All @@ -46,7 +45,6 @@ function main(
}

createNotificationConfig();
// [END scc_create_notification_config]
// [END securitycenter_create_notification_config]
}

Expand Down
2 changes: 0 additions & 2 deletions security-center/snippets/v1/createSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
*/
function main(organizationId = 'YOUR_NUMERIC_ORG_ID') {
// [START securitycenter_create_source]
// [START demo]
// Imports the Google Cloud client library.
const {SecurityCenterClient} = require('@google-cloud/security-center');

Expand All @@ -41,7 +40,6 @@ function main(organizationId = 'YOUR_NUMERIC_ORG_ID') {
console.log('New Source: %j', source);
}
createSource();
// [END demo]
// [END securitycenter_create_source]
}

Expand Down
2 changes: 0 additions & 2 deletions security-center/snippets/v1/deleteNotificationConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

function main(organizationId = 'your-org-id', configId = 'your-config-id') {
// [START securitycenter_delete_notification_config]
// [START scc_delete_notification_config]
// npm install @google-cloud/security-center/
const {SecurityCenterClient} = require('@google-cloud/security-center');

Expand All @@ -34,7 +33,6 @@ function main(organizationId = 'your-org-id', configId = 'your-config-id') {
}

deleteNotificationConfg();
// [END scc_delete_notification_config]
// [END securitycenter_delete_notification_config]
}

Expand Down
2 changes: 0 additions & 2 deletions security-center/snippets/v1/deleteSecurityMarks.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
*/
function main(assetName = 'full asset path to add marks to') {
// [START securitycenter_delete_security_marks]
// [START demo]
// Imports the Google Cloud client library.
const {SecurityCenterClient} = require('@google-cloud/security-center');

Expand All @@ -44,7 +43,6 @@ function main(assetName = 'full asset path to add marks to') {
console.log('Updated marks: %j', newMarks);
}
deleteSecurityMarks();
// [END demo]
// [END securitycenter_delete_security_marks]
}

Expand Down
2 changes: 0 additions & 2 deletions security-center/snippets/v1/enableAssetDiscovery.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
*/
function main(organizationId = 'YOUR_NUMERIC_ORG_ID') {
// [START securitycenter_enable_asset_discovery]
// [START demo]
// Imports the Google Cloud client library.
const {SecurityCenterClient} = require('@google-cloud/security-center');

Expand All @@ -45,7 +44,6 @@ function main(organizationId = 'YOUR_NUMERIC_ORG_ID') {
console.log('New settings: %j', newSettings);
}
updateOrgSettings();
// [END demo]
// [END securitycenter_enable_asset_discovery]
}

Expand Down
2 changes: 0 additions & 2 deletions security-center/snippets/v1/getNotificationConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

function main(organizationId = 'your-org-id', configId = 'your-config-id') {
// [START securitycenter_get_notification_config]
// [START scc_get_notification_configs]
// npm install @google-cloud/security-center/
const {SecurityCenterClient} = require('@google-cloud/security-center');

Expand All @@ -36,7 +35,6 @@ function main(organizationId = 'your-org-id', configId = 'your-config-id') {
}

getNotificationConfg();
// [END scc_get_notification_configs]
// [END securitycenter_get_notification_config]
}

Expand Down
2 changes: 0 additions & 2 deletions security-center/snippets/v1/getOrganizationSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
*/
function main(organizationId = 'YOUR_NUMERIC_ORG_ID') {
// [START securitycenter_get_org_settings]
// [START demo]
// Imports the Google Cloud client library.
const {SecurityCenterClient} = require('@google-cloud/security-center');

Expand All @@ -41,7 +40,6 @@ function main(organizationId = 'YOUR_NUMERIC_ORG_ID') {
console.log('Current settings: %j', settings);
}
getOrgSettings();
// [END demo]
// [END securitycenter_get_org_settings]
}

Expand Down
2 changes: 0 additions & 2 deletions security-center/snippets/v1/getSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
*/
function main(sourceName = 'FULL_PATH_TO_SOURCE') {
// [START securitycenter_get_source]
// [START demo]
// Imports the Google Cloud client library.
const {SecurityCenterClient} = require('@google-cloud/security-center');

Expand All @@ -37,7 +36,6 @@ function main(sourceName = 'FULL_PATH_TO_SOURCE') {
}

getSource();
// [END demo]
// [END securitycenter_get_source]
}

Expand Down
2 changes: 0 additions & 2 deletions security-center/snippets/v1/getSourceIam.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
*/
function main(sourceName = 'FULL_PATH_TO_SOURCE') {
// [START securitycenter_get_source_iam]
// [START demo]
// Imports the Google Cloud client library.
const {SecurityCenterClient} = require('@google-cloud/security-center');

Expand All @@ -40,7 +39,6 @@ function main(sourceName = 'FULL_PATH_TO_SOURCE') {
console.log('Current policy: %j', existingPolicy);
}
getSourceIamPolicy();
// [END demo]
// [END securitycenter_get_source_iam]
}

Expand Down
2 changes: 0 additions & 2 deletions security-center/snippets/v1/listAllAssets.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
/** Prints all assets in an organization. */
function main(organizationId = 'YOUR_NUMERIC_ORG_ID') {
// [START securitycenter_list_all_assets]
// [START demo]
// Imports the Google Cloud client library.
const {SecurityCenterClient} = require('@google-cloud/security-center');

Expand All @@ -43,7 +42,6 @@ function main(organizationId = 'YOUR_NUMERIC_ORG_ID') {
}

listAssets();
// [END demo]
// [END securitycenter_list_all_assets]
}

Expand Down
2 changes: 0 additions & 2 deletions security-center/snippets/v1/listAllFindings.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
/** Prints all findings across all sources. */
function main(organizationId = 'YOUR_NUMERIC_ORG_ID') {
// [START securitycenter_list_all_findings]
// [START demo]
// Imports the Google Cloud client library.
const {SecurityCenterClient} = require('@google-cloud/security-center');

Expand All @@ -42,7 +41,6 @@ function main(organizationId = 'YOUR_NUMERIC_ORG_ID') {
);
}
listAllFindings();
// [END demo]
// [END securitycenter_list_all_findings]
}

Expand Down
2 changes: 0 additions & 2 deletions security-center/snippets/v1/listAllSources.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
/** Prints all sources in an organization. */
function main(organizationId = 'YOUR_NUMERIC_ORG_ID') {
// [START securitycenter_list_sources]
// [START demo]
// Imports the Google Cloud client library.
const {SecurityCenterClient} = require('@google-cloud/security-center');

Expand All @@ -40,7 +39,6 @@ function main(organizationId = 'YOUR_NUMERIC_ORG_ID') {
}

listSources();
// [END demo]
// [END securitycenter_list_sources]
}

Expand Down
2 changes: 0 additions & 2 deletions security-center/snippets/v1/listAssetsAndChanges.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
*/
function main(organizationId = 'YOUR_NUMERIC_ORG_ID') {
// [START securitycenter_list_assets_and_changes]
// [START demo]
// Imports the Google Cloud client library.
const {SecurityCenterClient} = require('@google-cloud/security-center');

Expand Down Expand Up @@ -51,7 +50,6 @@ function main(organizationId = 'YOUR_NUMERIC_ORG_ID') {
}

listAssetsAndChanges();
// [END demo]
// [END securitycenter_list_assets_and_changes]
}

Expand Down
2 changes: 0 additions & 2 deletions security-center/snippets/v1/listAssetsAtTime.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
*/
function main(organizationId = 'YOUR_NUMERIC_ORG_ID') {
// [START securitycenter_list_assets_at_time]
// [START demo]
// Imports the Google Cloud client library.
const {SecurityCenterClient} = require('@google-cloud/security-center');

Expand Down Expand Up @@ -59,7 +58,6 @@ function main(organizationId = 'YOUR_NUMERIC_ORG_ID') {
}

listAssetsAtTime();
// [END demo]
// [END securitycenter_list_assets_at_time]
}

Expand Down
2 changes: 0 additions & 2 deletions security-center/snippets/v1/listAssetsWithSecurityMarks.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
*/
function main(organizationId = 'YOUR_NUMERIC_ORG_ID') {
// [START securitycenter_list_assets_with_security_marks]
// [START demo]
// Imports the Google Cloud client library.
const {SecurityCenterClient} = require('@google-cloud/security-center');

Expand Down Expand Up @@ -49,7 +48,6 @@ function main(organizationId = 'YOUR_NUMERIC_ORG_ID') {
}

listAssetsWithSecurityMarks();
// [END demo]
// [END securitycenter_list_assets_with_security_marks]
}

Expand Down
2 changes: 0 additions & 2 deletions security-center/snippets/v1/listFilteredAssets.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
*/
function main(organizationId = 'YOUR_NUMERIC_ORG_ID') {
// [START securitycenter_list_assets_with_filter]
// [START demo]
// Imports the Google Cloud client library.
const {SecurityCenterClient} = require('@google-cloud/security-center');

Expand Down Expand Up @@ -50,7 +49,6 @@ function main(organizationId = 'YOUR_NUMERIC_ORG_ID') {
}

listFilteredAssets();
// [END demo]
// [END securitycenter_list_assets_with_filter]
}

Expand Down
2 changes: 0 additions & 2 deletions security-center/snippets/v1/listFilteredFindings.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
/** Demonstrates listing only specific findings. */
function main(sourceName = 'YOUR_NUMERIC_ORG_ID') {
// [START securitycenter_list_filtered_findings]
// [START demo]
// Imports the Google Cloud client library.
const {SecurityCenterClient} = require('@google-cloud/security-center');

Expand All @@ -44,7 +43,6 @@ function main(sourceName = 'YOUR_NUMERIC_ORG_ID') {
);
}
listFilteredFindings();
// [END demo]
// [END securitycenter_list_filtered_findings]
}

Expand Down
2 changes: 0 additions & 2 deletions security-center/snippets/v1/listFindingsAtTime.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
/** Demonstrates listing findings at a point in time. */
function main(sourceName = 'FULL RESOURCE PATH TO PARENT SOURCE') {
// [START securitycenter_list_findings_at_time]
// [START demo]
// Imports the Google Cloud client library.
const {SecurityCenterClient} = require('@google-cloud/security-center');

Expand Down Expand Up @@ -50,7 +49,6 @@ function main(sourceName = 'FULL RESOURCE PATH TO PARENT SOURCE') {
);
}
listFindingsAtTime();
// [END demo]
// [END securitycenter_list_findings_at_time]
}

Expand Down
2 changes: 0 additions & 2 deletions security-center/snippets/v1/listFindingsWithSecurityMarks.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
/** Demonstrates listing findings by filtering on security marks. */
function main(sourceName = 'YOUR_NUMERIC_ORG_ID') {
// [START securitycenter_list_findings_with_security_marks]
// [START demo]
// Imports the Google Cloud client library.
const {SecurityCenterClient} = require('@google-cloud/security-center');

Expand All @@ -44,7 +43,6 @@ function main(sourceName = 'YOUR_NUMERIC_ORG_ID') {
);
}
listFindingsWithSecurityMarks();
// [END demo]
// [END securitycenter_list_findings_with_security_marks]
}

Expand Down
2 changes: 0 additions & 2 deletions security-center/snippets/v1/listNotificationConfigs.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

function main(organizationId = 'your-org-id') {
// [START securitycenter_list_notification_configs]
// [START scc_list_notification_configs]
// npm install @google-cloud/security-center/
const {SecurityCenterClient} = require('@google-cloud/security-center');

Expand All @@ -33,7 +32,6 @@ function main(organizationId = 'your-org-id') {
}

listNotificationConfigs();
// [END scc_list_notification_configs]
// [END securitycenter_list_notification_configs]
}

Expand Down
Loading

0 comments on commit 8062d54

Please sign in to comment.