HEX
Server: Apache/2.4.65 (Ubuntu)
System: Linux ielts-store-v2 6.8.0-1036-gcp #38~22.04.1-Ubuntu SMP Thu Aug 14 01:19:18 UTC 2025 x86_64
User: root (0)
PHP: 7.2.34-54+ubuntu20.04.1+deb.sury.org+1
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: //snap/google-cloud-cli/current/lib/surface/scc/assets/update_marks.yaml
- release_tracks: [ALPHA, BETA, GA]

  help_text:
    brief: Update Cloud Security Command Center asset's security marks.
    description: Update Cloud Security Command Center asset's security marks.
    examples: |
      Selectively update value of security mark (key1) with 'val1.1' on asset 5678 under organization 123456. Note that other security marks on the same asset will not change.

        $ {command} 5678 --organization=123456 --security-marks="key1=val1.1" --update-mask="marks.key1"

      Update value of security mark (key1) and delete other marks on asset 5678 under organization 123456:

        $ {command} 5678 --organization=123456 --security-marks="key1=updatedVal"

      Update value of security mark (key1) and delete other marks on asset 5678 under project example-project:

        $ {command} projects/example-project/assets/5678 --security-marks="key1=updatedVal"

      Update value of security mark (key1) and delete other marks on asset 5678 under folder 456:

        $ {command} folders/456/assets/5678 --security-marks="key1=updatedVal"

      Delete all security marks on asset 5678 under organization 123456:

        $ {command} 5678 --organization=123456 --security-marks=""

  request:
    collection: securitycenter.organizations.assets
    api_version: v1
    method: updateSecurityMarks
    modify_request_hooks:
    - googlecloudsdk.command_lib.scc.assets.request_hooks:UpdateAssetSecurityMarksReqHook

  arguments:
    additional_arguments_hook: googlecloudsdk.command_lib.scc.assets.resource_hooks:AppendAssetArg

    params:
    - arg_name: start-time
      type: googlecloudsdk.core.util.times:ParseDateTime
      processor: googlecloudsdk.core.util.times:FormatDateTime
      api_field: startTime
      help_text: |
        Time at which the updated SecurityMarks take effect. See `$ gcloud topic datetimes` for
        information on supported time formats.
    - arg_name: security-marks
      metavar: KEY=VALUE
      api_field: securityMarks
      help_text: |
        SecurityMarks resource to be passed as the request body. It's a key=value pair separated
        by comma (,). For example: --security-marks="key1=val1,key2=val2".
      type: "googlecloudsdk.calliope.arg_parsers:ArgDict:"
      processor: googlecloudsdk.command_lib.scc.hooks:SecurityMarksHook
    - arg_name: update-mask
      api_field: updateMask
      help_text: |
        Use update-mask if you want to selectively update marks represented by --security-marks
        flag. For example: --update-mask="marks.key1,marks.key2". If you want to override all the
        marks for the given asset either skip the update-mask flag or provide an empty value
        (--update-mask '') for it.