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/396/lib/surface/scc/posture_deployments/create.yaml
- release_tracks: [ALPHA, GA]
  command_type: GENERIC
  help_text:
    brief: Create a Cloud Security Command Center (SCC) posture deployment.
    description: |
      Create a  Cloud Security Command Center (SCC) posture deployment. First argument is the parent of the posture deployment to
      be created. Second argument is the name of the posture deployment to be created. It is followed by details of the posture to be deployed and the target_resource to be deployed on.

      LRO operation ID is returned as the response of the command.
    examples: |
     Create a posture deployment named `posture-deployment-foo-1` within parent `organizations/123/locations/global` on resource `folders/456` (i.e. a posture-deployment in organization `123`, location `global`, with id `posture-deployment-foo-1`, which deploys posture `organizations/123/locations/foo-posture` with revision-id `foo-posture-revision-id` on `folders/456`):

        $ {command} organizations/123/locations/global/postureDeployments/posture-deployment-foo-1 --posture-name=organizations/123/locations/global/foo-posture --posture-revision-id=foo-posture-revision-id --target-resource=projects/456

  request:
    collection: securityposture.organizations.locations.postureDeployments
    api_version: v1alpha
    method: create
    GA:
      api_version: v1

  arguments:
    resource:
      spec: !REF googlecloudsdk.command_lib.scc.resources:posture_deployment
      help_text: |
          The name of the posture deployment to be created. For example organizations/<organizationID>/locations/<location>/postureDeployments/<postureDeploymentID>.

    params:
    - arg_name: posture-name
      api_field: postureDeployment.postureId
      required: true
      help_text: |
        Posture that needs to be deployed. Format:
        organizations/<organizationID>/locations/<location>/postures/<postureID>

    - arg_name: posture-revision-id
      api_field: postureDeployment.postureRevisionId
      required: true
      help_text: |
        Posture revision that needs to be deployed.

    - arg_name: target-resource
      api_field: postureDeployment.targetResource
      required: true
      help_text: |
        Name of the workload on which posture deployment is to be created. It could be an organization, folder or a project.
        Possible formats: |
          organizations/<organizationID> |
          folders/<folderID> |
          projects/<projectID>
        The above mentioned IDs need to have numeric format.

    - arg_name: description
      api_field: postureDeployment.description
      help_text: |
        User-provided description of the posture deployment.

  async:
    collection: securityposture.organizations.locations.operations
    extract_resource_result: false

  output:
    format: yaml