Updates a Control. Control cannot be set to a different oneof field, if so an INVALID_ARGUMENT is returned. If the Control to update does not exist, a NOT_FOUND error is returned.

Scopes

You will need authorization for the https://www.googleapis.com/auth/cloud-platform scope to make a valid call.

If unset, the scope for this method defaults to https://www.googleapis.com/auth/cloud-platform. You can set the scope for this method like this: retail2 --scope <scope> projects locations-catalogs-controls-patch ...

Required Scalar Argument

  • <name> (string)
    • Immutable. Fully qualified name projects/*/locations/global/catalogs/*/controls/*

Required Request Value

The request value is a data-structure with various fields. Each field may be a simple scalar or another data-structure. In the latter case it is advised to set the field-cursor to the data-structure's field to specify values more concisely.

For example, a structure like this:

GoogleCloudRetailV2Control:
  associated-serving-config-ids: [string]
  display-name: string
  name: string
  rule:
    boost-action:
      boost: number
      products-filter: string
    condition:
      page-categories: [string]
    do-not-associate-action:
      do-not-associate-terms: [string]
      query-terms: [string]
      terms: [string]
    filter-action:
      filter: string
    ignore-action:
      ignore-terms: [string]
    oneway-synonyms-action:
      oneway-terms: [string]
      query-terms: [string]
      synonyms: [string]
    redirect-action:
      redirect-uri: string
    remove-facet-action:
      attribute-names: [string]
    replacement-action:
      query-terms: [string]
      replacement-term: string
      term: string
    twoway-synonyms-action:
      synonyms: [string]
  search-solution-use-case: [string]
  solution-types: [string]

can be set completely with the following arguments which are assumed to be executed in the given order. Note how the cursor position is adjusted to the respective structures, allowing simple field names to be used most of the time.

  • -r . associated-serving-config-ids=consetetur
    • Output only. List of serving config ids that are associated with this control in the same Catalog. Note the association is managed via the ServingConfig, this is an output only denormalized view.
    • Each invocation of this argument appends the given value to the array.
  • display-name=dolores
    • Required. The human readable control display name. Used in Retail UI. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is thrown.
  • name=sed
    • Immutable. Fully qualified name projects/*/locations/global/catalogs/*/controls/*
  • rule.boost-action boost=0.4962661437411874
    • Strength of the condition boost, which must be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the item a big promotion. However, it does not necessarily mean that the boosted item will be the top result at all times, nor that other items will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant items. Setting to -1.0 gives the item a big demotion. However, results that are deeply relevant might still be shown. The item will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored.
  • products-filter=dolor

    • The filter can have a max size of 5000 characters. An expression which specifies which products to apply an action to. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost products with product ID "product_1" or "product_2", and color "Red" or "Blue": (id: ANY("product_1", "product_2")) * AND * *(colorFamilies: ANY("Red", "Blue")) *
  • ..condition page-categories=aliquyam

    • Used to support browse uses cases. A list (up to 10 entries) of categories or departments. The format should be the same as UserEvent.page_categories;
    • Each invocation of this argument appends the given value to the array.
  • ..do-not-associate-action do-not-associate-terms=magna

    • Cannot contain duplicates or the query term. Can specify up to 100 terms.
    • Each invocation of this argument appends the given value to the array.
  • query-terms=diam
    • Terms from the search query. Will not consider do_not_associate_terms for search if in search query. Can specify up to 100 terms.
    • Each invocation of this argument appends the given value to the array.
  • terms=nonumy

    • Will be [deprecated = true] post migration;
    • Each invocation of this argument appends the given value to the array.
  • ..filter-action filter=et

    • A filter to apply on the matching condition results. Supported features: * filter must be set. * Filter syntax is identical to SearchRequest.filter. For more information, see Filter. * To filter products with product ID "product_1" or "product_2", and color "Red" or "Blue": (id: ANY("product_1", "product_2")) * AND * *(colorFamilies: ANY("Red", "Blue")) *
  • ..ignore-action ignore-terms=sanctus

    • Terms to ignore in the search query.
    • Each invocation of this argument appends the given value to the array.
  • ..oneway-synonyms-action oneway-terms=accusam

    • Will be [deprecated = true] post migration;
    • Each invocation of this argument appends the given value to the array.
  • query-terms=tempor
    • Terms from the search query. Will treat synonyms as their synonyms. Not themselves synonyms of the synonyms. Can specify up to 100 terms.
    • Each invocation of this argument appends the given value to the array.
  • synonyms=sed

    • Defines a set of synonyms. Cannot contain duplicates. Can specify up to 100 synonyms.
    • Each invocation of this argument appends the given value to the array.
  • ..redirect-action redirect-uri=est

    • URL must have length equal or less than 2000 characters.
  • ..remove-facet-action attribute-names=takimata

    • The attribute names (i.e. facet keys) to remove from the dynamic facets (if present in the request). There can't be more 3 attribute names. Each attribute name should be a valid attribute name, be non-empty and contain at most 80 characters.
    • Each invocation of this argument appends the given value to the array.
  • ..replacement-action query-terms=dolor

    • Terms from the search query. Will be replaced by replacement term. Can specify up to 100 terms.
    • Each invocation of this argument appends the given value to the array.
  • replacement-term=diam
    • Term that will be used for replacement.
  • term=at

    • Will be [deprecated = true] post migration;
  • ..twoway-synonyms-action synonyms=erat

    • Defines a set of synonyms. Can specify up to 100 synonyms. Must specify at least 2 synonyms.
    • Each invocation of this argument appends the given value to the array.
  • ... search-solution-use-case=justo

    • Specifies the use case for the control. Affects what condition fields can be set. Only settable by search controls. Will default to SEARCH_SOLUTION_USE_CASE_SEARCH if not specified. Currently only allow one search_solution_use_case per control.
    • Each invocation of this argument appends the given value to the array.
  • solution-types=ipsum
    • Required. Immutable. The solution types that the control is used for. Currently we support setting only one type of solution at creation time. Only SOLUTION_TYPE_SEARCH value is supported at the moment. If no solution type is provided at creation time, will default to SOLUTION_TYPE_SEARCH.
    • Each invocation of this argument appends the given value to the array.

About Cursors

The cursor position is key to comfortably set complex nested structures. The following rules apply:

  • The cursor position is always set relative to the current one, unless the field name starts with the . character. Fields can be nested such as in -r f.s.o .
  • The cursor position is set relative to the top-level structure if it starts with ., e.g. -r .s.s
  • You can also set nested fields without setting the cursor explicitly. For example, to set a value relative to the current cursor position, you would specify -r struct.sub_struct=bar.
  • You can move the cursor one level up by using ... Each additional . moves it up one additional level. E.g. ... would go three levels up.

Optional Output Flags

The method's return value a JSON encoded structure, which will be written to standard output by default.

  • -o out
    • out specifies the destination to which to write the server's result to. It will be a JSON-encoded structure. The destination may be - to indicate standard output, or a filepath that is to contain the received bytes. If unset, it defaults to standard output.

Optional Method Properties

You may set the following properties to further configure the call. Please note that -p is followed by one or more key-value-pairs, and is called like this -p k1=v1 k2=v2 even though the listing below repeats the -p for completeness.

  • -p update-mask=string
    • Indicates which fields in the provided Control to update. The following are NOT supported: * Control.name If not set or empty, all supported fields are updated.

Optional General Properties

The following properties can configure any call, and are not specific to this method.

  • -p $-xgafv=string

    • V1 error format.
  • -p access-token=string

    • OAuth access token.
  • -p alt=string

    • Data format for response.
  • -p callback=string

    • JSONP
  • -p fields=string

    • Selector specifying which fields to include in a partial response.
  • -p key=string

    • API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
  • -p oauth-token=string

    • OAuth 2.0 token for the current user.
  • -p pretty-print=boolean

    • Returns response with indentations and line breaks.
  • -p quota-user=string

    • Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
  • -p upload-type=string

    • Legacy upload protocol for media (e.g. "media", "multipart").
  • -p upload-protocol=string

    • Upload protocol for media (e.g. "raw", "multipart").