HEX
Server: Apache/2.4.59 (Debian)
System: Linux keymana 4.19.0-21-cloud-amd64 #1 SMP Debian 4.19.249-2 (2022-06-30) x86_64
User: lijunjie (1003)
PHP: 7.4.33
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,pcntl_unshare,
Upload Files
File: //lib/google-cloud-sdk/lib/surface/scc/findings/update.yaml
- release_tracks: [ALPHA, BETA, GA]

  help_text:
    brief: Update a Cloud Security Command Center finding.
    description: Update a Cloud Security Command Center finding.
    examples: |
      Update my-finding's state from ACTIVE to INACTIVE:

        $ {command} my-finding --organization=123456 --source=5678 --state INACTIVE

      Override all source properties on my-finding:

        $ {command} my-finding --organization=123456 --source=5678 --source-properties "propKey1=propVal1,propKey2=propVal2"

      Selectively update a specific source property on my-finding:

        $ {command} my-finding --organization=123456 --source=5678 --source-properties "propKey1=propVal1,propKey2=propVal2" --update-mask "source_properties.propKey1"

  request:
    collection: securitycenter.organizations.sources.findings
    api_version: v1
    method: patch
    modify_request_hooks:
    - googlecloudsdk.command_lib.scc.findings.request_hooks:UpdateFindingsReqHook

  arguments:

    resource:
      help_text: The finding you want to update.
      spec: !REF googlecloudsdk.command_lib.scc.resources:finding

    params:
    - !REF googlecloudsdk.command_lib.scc.findings.flags:event_time
    - !REF googlecloudsdk.command_lib.scc.findings.flags:external_uri
    - !REF googlecloudsdk.command_lib.scc.findings.flags:source_properties
    - !REF googlecloudsdk.command_lib.scc.findings.flags:state
    - arg_name: update-mask
      api_field: updateMask
      help_text: |
        Optional: If left unspecified (default), an update-mask is automatically created using the
        flags specified in the command and only those values are updated.
        For example: --external-uri='<some-uri>' --event-time='<some-time>' would automatically
        generate --update-mask 'external_uri,event_time'. Note that as a result, only external-uri
        and event-time are updated for the given finding and everything else remains untouched. If
        you want to delete attributes/properties (that are not being changed in the update command)
        use an empty update-mask (''). That will delete all the mutable properties/attributes that
        aren't specified as flags in the update command. In the above example it would delete
        source-properties. State can be toggled from ACTIVE to INACTIVE and vice-versa but it cannot
        be deleted.