comments
Creates, updates, deletes, gets or lists a comments
resource.
Overview
Name | comments |
Type | Resource |
Id | google.cloudsupport.comments |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Output only. Identifier. The resource name of the comment. |
body | string | The full comment body. Maximum of 12800 characters. |
createTime | string | Output only. The time when the comment was created. |
creator | object | An Actor represents an entity that performed an action. For example, an actor could be a user who posted a comment on a support case, a user who uploaded an attachment, or a service account that created a support case. |
plainTextBody | string | Output only. DEPRECATED. DO NOT USE. A duplicate of the body field. This field is only present for legacy reasons. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
list | SELECT | parent, parentType | List all the comments associated with a case. EXAMPLES: cURL: shell case="projects/some-project/cases/43595344" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$case/comments" 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() .comments() .list(parent="projects/some-project/cases/43595344") ) print(request.execute()) |
create | INSERT | parent, parentType | Add a new comment to a case. The comment must have the following fields set: body . EXAMPLES: cURL: shell case="projects/some-project/cases/43591344" curl \ --request POST \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ --header 'Content-Type: application/json' \ --data '{ "body": "This is a test comment." }' \ "https://cloudsupport.googleapis.com/v2/$case/comments" 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() .comments() .create( parent="projects/some-project/cases/43595344", body={"body": "This is a test comment."}, ) ) print(request.execute()) |
SELECT
examples
List all the comments associated with a case. EXAMPLES: cURL: shell case="projects/some-project/cases/43595344" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$case/comments"
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() .comments() .list(parent="projects/some-project/cases/43595344") ) print(request.execute())
SELECT
name,
body,
createTime,
creator,
plainTextBody
FROM google.cloudsupport.comments
WHERE parent = '{{ parent }}'
AND parentType = '{{ parentType }}';
INSERT
example
Use the following StackQL query and manifest file to create a new comments
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.cloudsupport.comments (
parent,
parentType,
body
)
SELECT
'{{ parent }}',
'{{ parentType }}',
'{{ body }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: plainTextBody
value: string
- name: body
value: string
- name: createTime
value: string
- name: creator
value:
- name: displayName
value: string
- name: email
value: string
- name: googleSupport
value: boolean
- name: username
value: string