Google Cloud Support API . cases . attachments

Instance Methods

close()

Close httplib2 connections.

list(parent, pageSize=None, pageToken=None, x__xgafv=None)

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()) ```

list_next()

Retrieves the next page of results.

Method Details

close()
Close httplib2 connections.
list(parent, pageSize=None, pageToken=None, x__xgafv=None)
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()) ```

Args:
  parent: string, Required. The name of the case for which attachments should be listed. (required)
  pageSize: integer, The maximum number of attachments fetched with each request. If not provided, the default is 10. The maximum page size that will be returned is 100.
  pageToken: string, A token identifying the page of results to return. If unspecified, the first page is retrieved.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # The response message for the ListAttachments endpoint.
  "attachments": [ # The list of attachments associated with a case.
    { # An Attachment contains metadata about a file that was uploaded to a case - it is NOT a file itself. That being said, the name of an Attachment object can be used to download its accompanying file through the `media.download` endpoint. While attachments can be uploaded in the console at the same time as a comment, they're associated on a "case" level, not a "comment" level.
      "createTime": "A String", # Output only. The time at which the attachment was created.
      "creator": { # 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. # Output only. The user who uploaded the attachment. Note, the name and email will be obfuscated if the attachment was uploaded by Google support.
        "displayName": "A String", # 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": "A String", # 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.
        "googleSupport": True or False, # Output only. Whether the actor is a Google support actor.
        "username": "A String", # 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.
      },
      "filename": "A String", # The filename of the attachment (e.g. `"graph.jpg"`).
      "mimeType": "A String", # Output only. The MIME type of the attachment (e.g. text/plain).
      "name": "A String", # Output only. The resource name of the attachment.
      "sizeBytes": "A String", # Output only. The size of the attachment in bytes.
    },
  ],
  "nextPageToken": "A String", # A token to retrieve the next page of results. Set this in the `page_token` field of subsequent `cases.attachments.list` requests. If unspecified, there are no more results to retrieve.
}
list_next()
Retrieves the next page of results.

        Args:
          previous_request: The request for the previous page. (required)
          previous_response: The response from the request for the previous page. (required)

        Returns:
          A request object that you can call 'execute()' on to request the next
          page. Returns None if there are no more items in the collection.