Module: Google::Cloud::SecurityCenter::V2::SecurityCenter::Paths
- Extended by:
- Paths
- Included in:
- Client, Paths, Rest::Client
- Defined in:
- lib/google/cloud/security_center/v2/security_center/paths.rb
Overview
Path helper methods for the SecurityCenter API.
Instance Method Summary collapse
-
#big_query_export_path(**args) ⇒ ::String
Create a fully-qualified BigQueryExport resource string.
-
#dlp_job_path(**args) ⇒ ::String
Create a fully-qualified DlpJob resource string.
-
#external_system_path(**args) ⇒ ::String
Create a fully-qualified ExternalSystem resource string.
-
#finding_path(**args) ⇒ ::String
Create a fully-qualified Finding resource string.
-
#folder_location_path(folder:, location:) ⇒ ::String
Create a fully-qualified FolderLocation resource string.
-
#folder_path(folder:) ⇒ ::String
Create a fully-qualified Folder resource string.
-
#location_path(project:, location:) ⇒ ::String
Create a fully-qualified Location resource string.
-
#mute_config_path(**args) ⇒ ::String
Create a fully-qualified MuteConfig resource string.
-
#notification_config_path(**args) ⇒ ::String
Create a fully-qualified NotificationConfig resource string.
-
#organization_location_path(organization:, location:) ⇒ ::String
Create a fully-qualified OrganizationLocation resource string.
-
#organization_path(organization:) ⇒ ::String
Create a fully-qualified Organization resource string.
-
#organization_valued_resource_path(organization:, location:, simulation:, valued_resource:) ⇒ ::String
Create a fully-qualified OrganizationValuedResource resource string.
-
#policy_path(**args) ⇒ ::String
Create a fully-qualified Policy resource string.
-
#project_path(project:) ⇒ ::String
Create a fully-qualified Project resource string.
-
#resource_value_config_path(**args) ⇒ ::String
Create a fully-qualified ResourceValueConfig resource string.
-
#security_marks_path(**args) ⇒ ::String
Create a fully-qualified SecurityMarks resource string.
-
#simulation_path(**args) ⇒ ::String
Create a fully-qualified Simulation resource string.
-
#source_path(**args) ⇒ ::String
Create a fully-qualified Source resource string.
-
#table_data_profile_path(**args) ⇒ ::String
Create a fully-qualified TableDataProfile resource string.
-
#topic_path(project:, topic:) ⇒ ::String
Create a fully-qualified Topic resource string.
-
#valued_resource_path(**args) ⇒ ::String
Create a fully-qualified ValuedResource resource string.
Instance Method Details
#big_query_export_path(organization: , location: , export: ) ⇒ ::String #big_query_export_path(folder: , location: , export: ) ⇒ ::String #big_query_export_path(project: , location: , export: ) ⇒ ::String
Create a fully-qualified BigQueryExport resource string.
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/google/cloud/security_center/v2/security_center/paths.rb', line 58 def big_query_export_path **args resources = { "export:location:organization" => (proc do |organization:, location:, export:| raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "organizations/#{organization}/locations/#{location}/bigQueryExports/#{export}" end), "export:folder:location" => (proc do |folder:, location:, export:| raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "folders/#{folder}/locations/#{location}/bigQueryExports/#{export}" end), "export:location:project" => (proc do |project:, location:, export:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/bigQueryExports/#{export}" end) } resource = resources[args.keys.sort.join(":")] raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? resource.call(**args) end |
#dlp_job_path(project: , dlp_job: ) ⇒ ::String #dlp_job_path(project: , location: , dlp_job: ) ⇒ ::String
Create a fully-qualified DlpJob resource string.
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
# File 'lib/google/cloud/security_center/v2/security_center/paths.rb', line 106 def dlp_job_path **args resources = { "dlp_job:project" => (proc do |project:, dlp_job:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/dlpJobs/#{dlp_job}" end), "dlp_job:location:project" => (proc do |project:, location:, dlp_job:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/dlpJobs/#{dlp_job}" end) } resource = resources[args.keys.sort.join(":")] raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? resource.call(**args) end |
#external_system_path(organization: , source: , finding: , externalsystem: ) ⇒ ::String #external_system_path(organization: , source: , location: , finding: , externalsystem: ) ⇒ ::String #external_system_path(folder: , source: , finding: , externalsystem: ) ⇒ ::String #external_system_path(folder: , source: , location: , finding: , externalsystem: ) ⇒ ::String #external_system_path(project: , source: , finding: , externalsystem: ) ⇒ ::String #external_system_path(project: , source: , location: , finding: , externalsystem: ) ⇒ ::String
Create a fully-qualified ExternalSystem resource string.
193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 |
# File 'lib/google/cloud/security_center/v2/security_center/paths.rb', line 193 def external_system_path **args resources = { "externalsystem:finding:organization:source" => (proc do |organization:, source:, finding:, externalsystem:| raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" raise ::ArgumentError, "finding cannot contain /" if finding.to_s.include? "/" "organizations/#{organization}/sources/#{source}/findings/#{finding}/externalSystems/#{externalsystem}" end), "externalsystem:finding:location:organization:source" => (proc do |organization:, source:, location:, finding:, externalsystem:| raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "finding cannot contain /" if finding.to_s.include? "/" "organizations/#{organization}/sources/#{source}/locations/#{location}/findings/#{finding}/externalSystems/#{externalsystem}" end), "externalsystem:finding:folder:source" => (proc do |folder:, source:, finding:, externalsystem:| raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" raise ::ArgumentError, "finding cannot contain /" if finding.to_s.include? "/" "folders/#{folder}/sources/#{source}/findings/#{finding}/externalSystems/#{externalsystem}" end), "externalsystem:finding:folder:location:source" => (proc do |folder:, source:, location:, finding:, externalsystem:| raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "finding cannot contain /" if finding.to_s.include? "/" "folders/#{folder}/sources/#{source}/locations/#{location}/findings/#{finding}/externalSystems/#{externalsystem}" end), "externalsystem:finding:project:source" => (proc do |project:, source:, finding:, externalsystem:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" raise ::ArgumentError, "finding cannot contain /" if finding.to_s.include? "/" "projects/#{project}/sources/#{source}/findings/#{finding}/externalSystems/#{externalsystem}" end), "externalsystem:finding:location:project:source" => (proc do |project:, source:, location:, finding:, externalsystem:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "finding cannot contain /" if finding.to_s.include? "/" "projects/#{project}/sources/#{source}/locations/#{location}/findings/#{finding}/externalSystems/#{externalsystem}" end) } resource = resources[args.keys.sort.join(":")] raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? resource.call(**args) end |
#finding_path(organization: , source: , finding: ) ⇒ ::String #finding_path(organization: , source: , location: , finding: ) ⇒ ::String #finding_path(folder: , source: , finding: ) ⇒ ::String #finding_path(folder: , source: , location: , finding: ) ⇒ ::String #finding_path(project: , source: , finding: ) ⇒ ::String #finding_path(project: , source: , location: , finding: ) ⇒ ::String
Create a fully-qualified Finding resource string.
308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 |
# File 'lib/google/cloud/security_center/v2/security_center/paths.rb', line 308 def finding_path **args resources = { "finding:organization:source" => (proc do |organization:, source:, finding:| raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" "organizations/#{organization}/sources/#{source}/findings/#{finding}" end), "finding:location:organization:source" => (proc do |organization:, source:, location:, finding:| raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "organizations/#{organization}/sources/#{source}/locations/#{location}/findings/#{finding}" end), "finding:folder:source" => (proc do |folder:, source:, finding:| raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" "folders/#{folder}/sources/#{source}/findings/#{finding}" end), "finding:folder:location:source" => (proc do |folder:, source:, location:, finding:| raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "folders/#{folder}/sources/#{source}/locations/#{location}/findings/#{finding}" end), "finding:project:source" => (proc do |project:, source:, finding:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" "projects/#{project}/sources/#{source}/findings/#{finding}" end), "finding:location:project:source" => (proc do |project:, source:, location:, finding:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/sources/#{source}/locations/#{location}/findings/#{finding}" end) } resource = resources[args.keys.sort.join(":")] raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? resource.call(**args) end |
#folder_location_path(folder:, location:) ⇒ ::String
Create a fully-qualified FolderLocation resource string.
The resource will be in the following format:
folders/{folder}/locations/{location}
381 382 383 384 385 |
# File 'lib/google/cloud/security_center/v2/security_center/paths.rb', line 381 def folder_location_path folder:, location: raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" "folders/#{folder}/locations/#{location}" end |
#folder_path(folder:) ⇒ ::String
Create a fully-qualified Folder resource string.
The resource will be in the following format:
folders/{folder}
366 367 368 |
# File 'lib/google/cloud/security_center/v2/security_center/paths.rb', line 366 def folder_path folder: "folders/#{folder}" end |
#location_path(project:, location:) ⇒ ::String
Create a fully-qualified Location resource string.
The resource will be in the following format:
projects/{project}/locations/{location}
398 399 400 401 402 |
# File 'lib/google/cloud/security_center/v2/security_center/paths.rb', line 398 def location_path project:, location: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/locations/#{location}" end |
#mute_config_path(organization: , mute_config: ) ⇒ ::String #mute_config_path(organization: , location: , mute_config: ) ⇒ ::String #mute_config_path(folder: , mute_config: ) ⇒ ::String #mute_config_path(folder: , location: , mute_config: ) ⇒ ::String #mute_config_path(project: , mute_config: ) ⇒ ::String #mute_config_path(project: , location: , mute_config: ) ⇒ ::String
Create a fully-qualified MuteConfig resource string.
459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 |
# File 'lib/google/cloud/security_center/v2/security_center/paths.rb', line 459 def mute_config_path **args resources = { "mute_config:organization" => (proc do |organization:, mute_config:| raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" "organizations/#{organization}/muteConfigs/#{mute_config}" end), "location:mute_config:organization" => (proc do |organization:, location:, mute_config:| raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "organizations/#{organization}/locations/#{location}/muteConfigs/#{mute_config}" end), "folder:mute_config" => (proc do |folder:, mute_config:| raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" "folders/#{folder}/muteConfigs/#{mute_config}" end), "folder:location:mute_config" => (proc do |folder:, location:, mute_config:| raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "folders/#{folder}/locations/#{location}/muteConfigs/#{mute_config}" end), "mute_config:project" => (proc do |project:, mute_config:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/muteConfigs/#{mute_config}" end), "location:mute_config:project" => (proc do |project:, location:, mute_config:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/muteConfigs/#{mute_config}" end) } resource = resources[args.keys.sort.join(":")] raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? resource.call(**args) end |
#notification_config_path(organization: , location: , notification_config: ) ⇒ ::String #notification_config_path(folder: , location: , notification_config: ) ⇒ ::String #notification_config_path(project: , location: , notification_config: ) ⇒ ::String
Create a fully-qualified NotificationConfig resource string.
532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 |
# File 'lib/google/cloud/security_center/v2/security_center/paths.rb', line 532 def notification_config_path **args resources = { "location:notification_config:organization" => (proc do |organization:, location:, notification_config:| raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "organizations/#{organization}/locations/#{location}/notificationConfigs/#{notification_config}" end), "folder:location:notification_config" => (proc do |folder:, location:, notification_config:| raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "folders/#{folder}/locations/#{location}/notificationConfigs/#{notification_config}" end), "location:notification_config:project" => (proc do |project:, location:, notification_config:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/notificationConfigs/#{notification_config}" end) } resource = resources[args.keys.sort.join(":")] raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? resource.call(**args) end |
#organization_location_path(organization:, location:) ⇒ ::String
Create a fully-qualified OrganizationLocation resource string.
The resource will be in the following format:
organizations/{organization}/locations/{location}
584 585 586 587 588 |
# File 'lib/google/cloud/security_center/v2/security_center/paths.rb', line 584 def organization_location_path organization:, location: raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" "organizations/#{organization}/locations/#{location}" end |
#organization_path(organization:) ⇒ ::String
Create a fully-qualified Organization resource string.
The resource will be in the following format:
organizations/{organization}
569 570 571 |
# File 'lib/google/cloud/security_center/v2/security_center/paths.rb', line 569 def organization_path organization: "organizations/#{organization}" end |
#organization_valued_resource_path(organization:, location:, simulation:, valued_resource:) ⇒ ::String
Create a fully-qualified OrganizationValuedResource resource string.
The resource will be in the following format:
organizations/{organization}/locations/{location}/simulations/{simulation}/valuedResources/{valued_resource}
603 604 605 606 607 608 609 |
# File 'lib/google/cloud/security_center/v2/security_center/paths.rb', line 603 def organization_valued_resource_path organization:, location:, simulation:, valued_resource: raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "simulation cannot contain /" if simulation.to_s.include? "/" "organizations/#{organization}/locations/#{location}/simulations/#{simulation}/valuedResources/#{valued_resource}" end |
#policy_path(organization: , constraint_name: ) ⇒ ::String #policy_path(folder: , constraint_name: ) ⇒ ::String #policy_path(project: , constraint_name: ) ⇒ ::String
Create a fully-qualified Policy resource string.
639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 |
# File 'lib/google/cloud/security_center/v2/security_center/paths.rb', line 639 def policy_path **args resources = { "constraint_name:organization" => (proc do |organization:, constraint_name:| raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" "organizations/#{organization}/policies/#{constraint_name}" end), "constraint_name:folder" => (proc do |folder:, constraint_name:| raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" "folders/#{folder}/policies/#{constraint_name}" end), "constraint_name:project" => (proc do |project:, constraint_name:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/policies/#{constraint_name}" end) } resource = resources[args.keys.sort.join(":")] raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? resource.call(**args) end |
#project_path(project:) ⇒ ::String
Create a fully-qualified Project resource string.
The resource will be in the following format:
projects/{project}
673 674 675 |
# File 'lib/google/cloud/security_center/v2/security_center/paths.rb', line 673 def project_path project: "projects/#{project}" end |
#resource_value_config_path(organization: , resource_value_config: ) ⇒ ::String #resource_value_config_path(organization: , location: , resource_value_config: ) ⇒ ::String
Create a fully-qualified ResourceValueConfig resource string.
698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 |
# File 'lib/google/cloud/security_center/v2/security_center/paths.rb', line 698 def resource_value_config_path **args resources = { "organization:resource_value_config" => (proc do |organization:, resource_value_config:| raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" "organizations/#{organization}/resourceValueConfigs/#{resource_value_config}" end), "location:organization:resource_value_config" => (proc do |organization:, location:, resource_value_config:| raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "organizations/#{organization}/locations/#{location}/resourceValueConfigs/#{resource_value_config}" end) } resource = resources[args.keys.sort.join(":")] raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? resource.call(**args) end |
#security_marks_path(organization: , asset: ) ⇒ ::String #security_marks_path(organization: , source: , finding: ) ⇒ ::String #security_marks_path(organization: , source: , location: , finding: ) ⇒ ::String #security_marks_path(folder: , asset: ) ⇒ ::String #security_marks_path(folder: , source: , finding: ) ⇒ ::String #security_marks_path(folder: , source: , location: , finding: ) ⇒ ::String #security_marks_path(project: , asset: ) ⇒ ::String #security_marks_path(project: , source: , finding: ) ⇒ ::String #security_marks_path(project: , source: , location: , finding: ) ⇒ ::String
Create a fully-qualified SecurityMarks resource string.
803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 |
# File 'lib/google/cloud/security_center/v2/security_center/paths.rb', line 803 def security_marks_path **args resources = { "asset:organization" => (proc do |organization:, asset:| raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" "organizations/#{organization}/assets/#{asset}/securityMarks" end), "finding:organization:source" => (proc do |organization:, source:, finding:| raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" "organizations/#{organization}/sources/#{source}/findings/#{finding}/securityMarks" end), "finding:location:organization:source" => (proc do |organization:, source:, location:, finding:| raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "organizations/#{organization}/sources/#{source}/locations/#{location}/findings/#{finding}/securityMarks" end), "asset:folder" => (proc do |folder:, asset:| raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" "folders/#{folder}/assets/#{asset}/securityMarks" end), "finding:folder:source" => (proc do |folder:, source:, finding:| raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" "folders/#{folder}/sources/#{source}/findings/#{finding}/securityMarks" end), "finding:folder:location:source" => (proc do |folder:, source:, location:, finding:| raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "folders/#{folder}/sources/#{source}/locations/#{location}/findings/#{finding}/securityMarks" end), "asset:project" => (proc do |project:, asset:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/assets/#{asset}/securityMarks" end), "finding:project:source" => (proc do |project:, source:, finding:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" "projects/#{project}/sources/#{source}/findings/#{finding}/securityMarks" end), "finding:location:project:source" => (proc do |project:, source:, location:, finding:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/sources/#{source}/locations/#{location}/findings/#{finding}/securityMarks" end) } resource = resources[args.keys.sort.join(":")] raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? resource.call(**args) end |
#simulation_path(organization: , simulation: ) ⇒ ::String #simulation_path(organization: , location: , simluation: ) ⇒ ::String
Create a fully-qualified Simulation resource string.
887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 |
# File 'lib/google/cloud/security_center/v2/security_center/paths.rb', line 887 def simulation_path **args resources = { "organization:simulation" => (proc do |organization:, simulation:| raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" "organizations/#{organization}/simulations/#{simulation}" end), "location:organization:simluation" => (proc do |organization:, location:, simluation:| raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "organizations/#{organization}/locations/#{location}/simulations/#{simluation}" end) } resource = resources[args.keys.sort.join(":")] raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? resource.call(**args) end |
#source_path(organization: , source: ) ⇒ ::String #source_path(folder: , source: ) ⇒ ::String #source_path(project: , source: ) ⇒ ::String
Create a fully-qualified Source resource string.
935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 |
# File 'lib/google/cloud/security_center/v2/security_center/paths.rb', line 935 def source_path **args resources = { "organization:source" => (proc do |organization:, source:| raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" "organizations/#{organization}/sources/#{source}" end), "folder:source" => (proc do |folder:, source:| raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" "folders/#{folder}/sources/#{source}" end), "project:source" => (proc do |project:, source:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/sources/#{source}" end) } resource = resources[args.keys.sort.join(":")] raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? resource.call(**args) end |
#table_data_profile_path(project: , table_profile: ) ⇒ ::String #table_data_profile_path(project: , location: , table_profile: ) ⇒ ::String
Create a fully-qualified TableDataProfile resource string.
980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 |
# File 'lib/google/cloud/security_center/v2/security_center/paths.rb', line 980 def table_data_profile_path **args resources = { "project:table_profile" => (proc do |project:, table_profile:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/tableProfiles/#{table_profile}" end), "location:project:table_profile" => (proc do |project:, location:, table_profile:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/tableProfiles/#{table_profile}" end) } resource = resources[args.keys.sort.join(":")] raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? resource.call(**args) end |
#topic_path(project:, topic:) ⇒ ::String
Create a fully-qualified Topic resource string.
The resource will be in the following format:
projects/{project}/topics/{topic}
1011 1012 1013 1014 1015 |
# File 'lib/google/cloud/security_center/v2/security_center/paths.rb', line 1011 def topic_path project:, topic: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/topics/#{topic}" end |
#valued_resource_path(organization: , simulation: , valued_resource: ) ⇒ ::String #valued_resource_path(organization: , location: , simluation: , valued_resource: ) ⇒ ::String
Create a fully-qualified ValuedResource resource string.
1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 |
# File 'lib/google/cloud/security_center/v2/security_center/paths.rb', line 1040 def valued_resource_path **args resources = { "organization:simulation:valued_resource" => (proc do |organization:, simulation:, valued_resource:| raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" raise ::ArgumentError, "simulation cannot contain /" if simulation.to_s.include? "/" "organizations/#{organization}/simulations/#{simulation}/valuedResources/#{valued_resource}" end), "location:organization:simluation:valued_resource" => (proc do |organization:, location:, simluation:, valued_resource:| raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "simluation cannot contain /" if simluation.to_s.include? "/" "organizations/#{organization}/locations/#{location}/simulations/#{simluation}/valuedResources/#{valued_resource}" end) } resource = resources[args.keys.sort.join(":")] raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? resource.call(**args) end |