- release_tracks: [ALPHA, BETA]
  help_text:
    brief: Show effective Privileged Access Manager (PAM) settings on a resource.
    description: |
      Show effective Privileged Access Manager (PAM) settings on a resource. The "effective value"
      of a setting on a given resource refers to the final or active value of a setting
      configuration that is applied to a resource.  For each configuration type field in settings
      resource, a hierarchy evaluation will happen to calculate effective value on the resource
      node.
    examples: |
      The following command describes effective settings on a project named `sample-project`, and
      in location `global`:

      $ {command} --project=sample-project --location=global

      The following command describes effective settings on a folder with ID ``FOLDER_ID'', and in
      location `global`:

      $ {command} --folder=FOLDER_ID --location=global

      The following command describes effective settings on an organization with ID
      ``ORGANIZATION_ID'', and in location `global`:

      $ {command} --organization=ORGANIZATION_ID --location=global

  request:
    ALPHA:
      api_version: v1alpha
    BETA:
      api_version: v1beta
    method: fetchEffectiveSettings
    collection:
    - privilegedaccessmanager.projects.locations
    - privilegedaccessmanager.folders.locations
    - privilegedaccessmanager.organizations.locations

  arguments:
    resource:
      arg_name: location
      spec: !REF googlecloudsdk.command_lib.pam.resources:location
      is_positional: false
      help_text: |
        The project/organization/folder location for which the effective settings are to be
        described.
