attachments
Creates, updates, deletes, gets or lists an attachments
resource.
Overview
Name | attachments |
Type | Resource |
Id | google.cloudsupport.attachments |
Fields
The following fields are returned by SELECT
queries:
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. Identifier. The resource name of the attachment. |
createTime | string (google-datetime) | Output only. The time at which the attachment was created. |
creator | object | Output only. The user who uploaded the attachment. Note, the name and email will be obfuscated if the attachment was uploaded by Google support. (id: Actor) |
filename | string | The filename of the attachment (e.g. "graph.jpg" ). |
mimeType | string | Output only. The MIME type of the attachment (e.g. text/plain). |
sizeBytes | string (int64) | Output only. The size of the attachment in bytes. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
list | select | parentType , parent | pageSize , pageToken | List all the attachments associated with a support case. EXAMPLES: cURL: shell case="projects/some-project/cases/23598314" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$case/attachments" 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() .attachments() .list(parent="projects/some-project/cases/43595344") ) print(request.execute()) |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
parent | string | |
parentType | string | |
pageSize | integer (int32) | |
pageToken | string |
SELECT
examples
- list
List all the attachments associated with a support case. EXAMPLES: cURL: shell case="projects/some-project/cases/23598314" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$case/attachments"
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() .attachments() .list(parent="projects/some-project/cases/43595344") ) print(request.execute())
SELECT
name,
createTime,
creator,
filename,
mimeType,
sizeBytes
FROM google.cloudsupport.attachments
WHERE parentType = '{{ parentType }}' -- required
AND parent = '{{ parent }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';