attachments
Creates, updates, deletes, gets or lists a attachments
resource.
Overview
Name | attachments |
Type | Resource |
Id | google.cloudsupport.attachments |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Output only. The resource name of the attachment. |
createTime | string | Output only. The time at which the attachment 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. |
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 | Output only. The size of the attachment in bytes. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
list | SELECT | parent, parentType | 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
examples
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 parent = '{{ parent }}'
AND parentType = '{{ parentType }}';