Update a case. Only some fields can be updated. EXAMPLES: cURL: shell case="projects/some-project/cases/43595344" curl \ --request PATCH \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ --header "Content-Type: application/json" \ --data '{ "priority": "P1" }' \ "https://cloudsupport.googleapis.com/v2/$case?updateMask=priority"
Python: python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) request = supportApiService.cases().patch( name="projects/some-project/cases/43112854", body={ "displayName": "This is Now a New Title", "priority": "P2", }, ) print(request.execute())
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: cloudsupport2-beta --scope <scope> cases patch ...
Required Scalar Argument
- <name> (string)
- The resource name for the case.
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:
Case:
classification:
display-name: string
id: string
product:
product-line: string
product-subline: string
contact-email: string
create-time: string
creator:
display-name: string
email: string
google-support: boolean
username: string
description: string
display-name: string
escalated: boolean
language-code: string
name: string
priority: string
severity: string
state: string
subscriber-email-addresses: [string]
test-case: boolean
time-zone: string
update-time: 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 .classification display-name=lorem
- A display name for the classification. The display name is not static and can change. To uniquely and consistently identify classifications, use the
CaseClassification.id
field.
- A display name for the classification. The display name is not static and can change. To uniquely and consistently identify classifications, use the
id=eos
- The unique ID for a classification. Must be specified for case creation. To retrieve valid classification IDs for case creation, use
caseClassifications.search
. Classification IDs returned bycaseClassifications.search
are guaranteed to be valid for at least 6 months. If a given classification is deactiveated, it will immediately stop being returned. After 6 months,case.create
requests using the classification ID will fail.
- The unique ID for a classification. Must be specified for case creation. To retrieve valid classification IDs for case creation, use
product product-line=labore
- The Product Line of the Product.
-
product-subline=sed
- The Product Subline of the Product, such as "Maps Billing".
-
... contact-email=duo
- A user-supplied email address to send case update notifications for. This should only be used in BYOID flows, where we cannot infer the user's email address directly from their EUCs.
create-time=sed
- Output only. The time this case was created.
creator display-name=no
- The name to display for the actor. If not provided, it is inferred from credentials supplied during case creation. When an email is provided, a display name must also be provided. This will be obfuscated if the user is a Google Support agent.
email=stet
- The email address of the actor. If not provided, it is inferred from the credentials supplied during case creation. When a name is provided, an email must also be provided. If the user is a Google Support agent, this is obfuscated. This field is deprecated. Use username field instead.
google-support=true
- Output only. Whether the actor is a Google support actor.
-
username=et
- Output only. The username of the actor. It may look like an email or other format provided by the identity provider. If not provided, it is inferred from the credentials supplied. When a name is provided, a username must also be provided. If the user is a Google Support agent, this will not be set.
-
.. description=et
- A broad description of the issue.
display-name=vero
- The short summary of the issue reported in this case.
escalated=false
- Whether the case is currently escalated.
language-code=duo
- The language the user has requested to receive support in. This should be a BCP 47 language code (e.g.,
"en"
,"zh-CN"
,"zh-TW"
,"ja"
,"ko"
). If no language or an unsupported language is specified, this field defaults to English (en). Language selection during case creation may affect your available support options. For a list of supported languages and their support working hours, see: https://cloud.google.com/support/docs/language-working-hours
- The language the user has requested to receive support in. This should be a BCP 47 language code (e.g.,
name=dolore
- The resource name for the case.
priority=et
- The priority of this case.
severity=voluptua.
- REMOVED. The severity of this case. Use priority instead.
state=amet.
- Output only. The current status of the support case.
subscriber-email-addresses=consetetur
- The email addresses to receive updates on this case.
- Each invocation of this argument appends the given value to the array.
test-case=false
- Whether this case was created for internal API testing and should not be acted on by the support team.
time-zone=dolor
- The timezone of the user who created the support case. It should be in a format IANA recognizes: https://www.iana.org/time-zones. There is no additional validation done by the API.
update-time=et
- Output only. The time this case was last updated.
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.
- out specifies the destination to which to write the server's result to.
It will be a JSON-encoded structure.
The destination may be
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
- A list of attributes of the case that should be updated. Supported values are
priority
,display_name
, andsubscriber_email_addresses
. If no fields are specified, all supported fields are updated. Be careful - if you do not provide a field mask, then you might accidentally clear some fields. For example, if you leave the field mask empty and do not provide a value forsubscriber_email_addresses
, thensubscriber_email_addresses
is updated to empty.
- A list of attributes of the case that should be updated. Supported values are
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").