NAME
    gcloud alpha apihub attributes update - update an Attribute

SYNOPSIS
    gcloud alpha apihub attributes update (ATTRIBUTE : --location=LOCATION)
        [--cardinality=CARDINALITY] [--data-type=DATA_TYPE]
        [--description=DESCRIPTION] [--display-name=DISPLAY_NAME]
        [--scope=SCOPE]
        [--allowed-values=[description=DESCRIPTION],
          [displayName=DISPLAYNAME],[id=ID],[immutable=IMMUTABLE]
          | --add-allowed-values=[description=DESCRIPTION],
          [displayName=DISPLAYNAME],[id=ID],[immutable=IMMUTABLE]
          --clear-allowed-values
          | --remove-allowed-values=[description=DESCRIPTION],
          [displayName=DISPLAYNAME],[id=ID],[immutable=IMMUTABLE]]
        [GCLOUD_WIDE_FLAG ...]

DESCRIPTION
    (ALPHA) Update an attribute

EXAMPLES
    To update the display name of an attribute with the ID my-attribute, run:

        $ gcloud alpha apihub attributes update my-attribute \
            --display-name="New Display Name" --project=my-project \
            --location=us-central1

POSITIONAL ARGUMENTS
     Attribute resource - Identifier. The name of the attribute in the API Hub.

     Format: projects/{project}/locations/{location}/attributes/{attribute} The
     arguments in this group can be used to specify the attributes of this
     resource. (NOTE) Some attributes are not given arguments in this group but
     can be set in other ways.

     To set the project attribute:
      ◆ provide the argument attribute on the command line with a fully
        specified name;
      ◆ provide the argument --project on the command line;
      ◆ set the property core/project.

     This must be specified.

       ATTRIBUTE
          ID of the attribute or fully qualified identifier for the attribute.

          To set the attribute attribute:
          ▸ provide the argument attribute on the command line.

          This positional argument must be specified if any of the other
          arguments in this group are specified.

       --location=LOCATION
          The location id of the attribute resource.

          To set the location attribute:
          ▸ provide the argument attribute on the command line with a fully
            specified name;
          ▸ provide the argument --location on the command line.

FLAGS
     --cardinality=CARDINALITY
        The maximum number of values that the attribute can have when
        associated with an API Hub resource. Cardinality 1 would represent a
        single-valued attribute. It must not be less than 1 or greater than 20.
        If not specified, the cardinality would be set to 1 by default and
        represent a single-valued attribute.

     --data-type=DATA_TYPE
        The type of the data of the attribute. DATA_TYPE must be one of:

         enum
            Attribute's value is of type enum.
         json
            Attribute's value is of type json.
         string
            Attribute's value is of type string.
         uri
            Attribute's value is of type uri.

     --description=DESCRIPTION
        The description of the attribute.

     --display-name=DISPLAY_NAME
        The display name of the attribute.

     --scope=SCOPE
        The scope of the attribute. It represents the resource in the API Hub
        to which the attribute can be linked. SCOPE must be one of:

         api
            Attribute can be linked to an API.
         api-operation
            Attribute can be linked to an API Operation.
         definition
            Attribute can be linked to a definition.
         dependency
            Attribute can be linked to a Dependency.
         deployment
            Attribute can be linked to a Deployment.
         external-api
            Attribute can be linked to a ExternalAPI.
         plugin
            Attribute can be linked to a Plugin.
         spec
            Attribute can be linked to a Spec.
         version
            Attribute can be linked to an API version.

     Update allowed_values.

     At most one of these can be specified:

       --allowed-values=[description=DESCRIPTION],[displayName=DISPLAYNAME],[id=ID],[immutable=IMMUTABLE]
          Set allowed_values to new value. The list of allowed values when the
          attribute value is of type enum. This is required when the data_type
          of the attribute is ENUM. The maximum number of allowed values of an
          attribute will be 1000.

           description
              The detailed description of the allowed value.

           displayName
              The display name of the allowed value.

           id
              The ID of the allowed value.
              ▫ If provided, the same will be used. The service will throw an
                error if the specified id is already used by another allowed
                value in the same attribute resource.
              ▫ If not provided, a system generated id derived from the
                display name will be used. In this case, the service will
                handle conflict resolution by adding a system generated suffix
                in case of duplicates.

              This value should be 4-63 characters, and valid characters are
              /[a-z][0-9]-/.

           immutable
              When set to true, the allowed value cannot be updated or deleted
              by the user. It can only be true for System defined attributes.

          Shorthand Example:

              --allowed-values=description=string,displayName=string,id=string,immutable=boolean --allowed-values=description=string,displayName=string,id=string,immutable=boolean

          JSON Example:

              --allowed-values='[{"description": "string", "displayName": "string", "id": "string", "immutable": boolean}]'

          File Example:

              --allowed-values=path_to_file.(yaml|json)

       Or at least one of these can be specified:

         --add-allowed-values=[description=DESCRIPTION],[displayName=DISPLAYNAME],[id=ID],[immutable=IMMUTABLE]
            Add new value to allowed_values list. The list of allowed values
            when the attribute value is of type enum. This is required when the
            data_type of the attribute is ENUM. The maximum number of allowed
            values of an attribute will be 1000.

             description
                The detailed description of the allowed value.

             displayName
                The display name of the allowed value.

             id
                The ID of the allowed value.
                ◇ If provided, the same will be used. The service will throw
                  an error if the specified id is already used by another
                  allowed value in the same attribute resource.
                ◇ If not provided, a system generated id derived from the
                  display name will be used. In this case, the service will
                  handle conflict resolution by adding a system generated
                  suffix in case of duplicates.

                This value should be 4-63 characters, and valid characters are
                /[a-z][0-9]-/.

             immutable
                When set to true, the allowed value cannot be updated or
                deleted by the user. It can only be true for System defined
                attributes.

            Shorthand Example:

                --add-allowed-values=description=string,displayName=string,id=string,immutable=boolean --add-allowed-values=description=string,displayName=string,id=string,immutable=boolean

            JSON Example:

                --add-allowed-values='[{"description": "string", "displayName": "string", "id": "string", "immutable": boolean}]'

            File Example:

                --add-allowed-values=path_to_file.(yaml|json)

         At most one of these can be specified:

           --clear-allowed-values
              Clear allowed_values value and set to empty list.

           --remove-allowed-values=[description=DESCRIPTION],[displayName=DISPLAYNAME],[id=ID],[immutable=IMMUTABLE]
              Remove existing value from allowed_values list. The list of
              allowed values when the attribute value is of type enum. This is
              required when the data_type of the attribute is ENUM. The maximum
              number of allowed values of an attribute will be 1000.

               description
                  The detailed description of the allowed value.

               displayName
                  The display name of the allowed value.

               id
                  The ID of the allowed value.
                  ▹ If provided, the same will be used. The service will
                    throw an error if the specified id is already used by
                    another allowed value in the same attribute resource.
                  ▹ If not provided, a system generated id derived from the
                    display name will be used. In this case, the service will
                    handle conflict resolution by adding a system generated
                    suffix in case of duplicates.

                  This value should be 4-63 characters, and valid characters
                  are /[a-z][0-9]-/.

               immutable
                  When set to true, the allowed value cannot be updated or
                  deleted by the user. It can only be true for System defined
                  attributes.

              Shorthand Example:

                  --remove-allowed-values=description=string,displayName=string,id=string,immutable=boolean --remove-allowed-values=description=string,displayName=string,id=string,immutable=boolean

              JSON Example:

                  --remove-allowed-values='[{"description": "string", "displayName": "string", "id": "string", "immutable": boolean}]'

              File Example:

                  --remove-allowed-values=path_to_file.(yaml|json)

GCLOUD WIDE FLAGS
    These flags are available to all commands: --access-token-file, --account,
    --billing-project, --configuration, --flags-file, --flatten, --format,
    --help, --impersonate-service-account, --log-http, --project, --quiet,
    --trace-token, --user-output-enabled, --verbosity.

    Run $ gcloud help for details.

API REFERENCE
    This command uses the apihub/v1 API. The full documentation for this API
    can be found at:
    https://cloud.google.com/apigee/docs/api-hub/what-is-api-hub

NOTES
    This command is currently in alpha and might change without notice. If this
    command fails with API permission errors despite specifying the correct
    project, you might be trying to access an API with an invitation-only early
    access allowlist. This variant is also available:

        $ gcloud apihub attributes update

