# Google Cloud Support API . cases

## Instance Methods

Returns the attachments Resource.

Returns the comments Resource.

Close the specified case.

Create a new case and associate it with the given Cloud resource.

Escalate a case. Escalating a case will initiate the Cloud Support escalation management process. This operation is only available to certain Customer Care tiers. Go to https://cloud.google.com/support and look for 'Technical support escalations' in the feature list to find out which tiers are able to perform escalations.

Retrieve the specified case.

Retrieve all cases under the specified parent.

Retrieves the next page of results.

Update the specified case. Only a subset of fields (display_name, description, time_zone, subscriber_email_addresses, related_resources, severity, primary_contact, and labels) can be updated.

Search cases using the specified query.

Retrieves the next page of results.

### Method Details

`close(name, body=None, x__xgafv=None)`

    Close the specified case.

    Args:
      name: string, Required. The fully qualified name of the case resource to be closed. (required)
      body: object, The request body.
        The object takes the form of:

    { # The request message for the CloseCase endpoint.
    }

      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # A support case.
      "classification": { # A classification object with a product type and value. # The issue classification applicable to this case.
        "displayName": "A String", # The display name of the classification.
        "id": "A String", # The unique ID for a classification. Must be specified for case creation.
      },
      "createTime": "A String", # Output only. The time this case was created.
      "creator": { # An object containing information about the effective user and authenticated principal responsible for an action. # The user who created the case. Note: The name and email will be obfuscated if the case was created 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 credentials supplied during case creation. If the authenticated principal does not have an email address, one must be provided. When a name is provided, an email must also be provided. This will be obfuscated if the user is a Google Support agent.
        "googleSupport": True or False, # Output only. Whether the actor is a Google support actor.
        "principalId": "A String", # Output only. An ID representing the user that was authenticated when the corresponding action was taken. This will be an email address, if one is available, or some other unique ID. See https://cloud.google.com/docs/authentication for more information on types of authentication.
      },
      "description": "A String", # A broad description of the issue.
      "displayName": "A String", # The short summary of the issue reported in this case.
      "escalated": True or False, # Whether the case is currently escalated.
      "name": "A String", # The resource name for the case.
      "severity": "A String", # The severity of this case.
      "state": "A String", # Output only. The current status of the support case.
      "subscriberEmailAddresses": [ # The email addresses to receive updates on this case.
        "A String",
      ],
      "testCase": True or False, # Whether this case was created for internal API testing and should not be acted on by the support team.
      "timeZone": "A String", # 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.
      "updateTime": "A String", # Output only. The time this case was last updated.
    }

`create(parent, body=None, x__xgafv=None)`

    Create a new case and associate it with the given Cloud resource.

    Args:
      parent: string, Required. The name of the Cloud resource under which the case should be created. (required)
      body: object, The request body.
        The object takes the form of:

    { # A support case.
      "classification": { # A classification object with a product type and value. # The issue classification applicable to this case.
        "displayName": "A String", # The display name of the classification.
        "id": "A String", # The unique ID for a classification. Must be specified for case creation.
      },
      "createTime": "A String", # Output only. The time this case was created.
      "creator": { # An object containing information about the effective user and authenticated principal responsible for an action. # The user who created the case. Note: The name and email will be obfuscated if the case was created 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 credentials supplied during case creation. If the authenticated principal does not have an email address, one must be provided. When a name is provided, an email must also be provided. This will be obfuscated if the user is a Google Support agent.
        "googleSupport": True or False, # Output only. Whether the actor is a Google support actor.
        "principalId": "A String", # Output only. An ID representing the user that was authenticated when the corresponding action was taken. This will be an email address, if one is available, or some other unique ID. See https://cloud.google.com/docs/authentication for more information on types of authentication.
      },
      "description": "A String", # A broad description of the issue.
      "displayName": "A String", # The short summary of the issue reported in this case.
      "escalated": True or False, # Whether the case is currently escalated.
      "name": "A String", # The resource name for the case.
      "severity": "A String", # The severity of this case.
      "state": "A String", # Output only. The current status of the support case.
      "subscriberEmailAddresses": [ # The email addresses to receive updates on this case.
        "A String",
      ],
      "testCase": True or False, # Whether this case was created for internal API testing and should not be acted on by the support team.
      "timeZone": "A String", # 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.
      "updateTime": "A String", # Output only. The time this case was last updated.
    }

      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # A support case.
      "classification": { # A classification object with a product type and value. # The issue classification applicable to this case.
        "displayName": "A String", # The display name of the classification.
        "id": "A String", # The unique ID for a classification. Must be specified for case creation.
      },
      "createTime": "A String", # Output only. The time this case was created.
      "creator": { # An object containing information about the effective user and authenticated principal responsible for an action. # The user who created the case. Note: The name and email will be obfuscated if the case was created 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 credentials supplied during case creation. If the authenticated principal does not have an email address, one must be provided. When a name is provided, an email must also be provided. This will be obfuscated if the user is a Google Support agent.
        "googleSupport": True or False, # Output only. Whether the actor is a Google support actor.
        "principalId": "A String", # Output only. An ID representing the user that was authenticated when the corresponding action was taken. This will be an email address, if one is available, or some other unique ID. See https://cloud.google.com/docs/authentication for more information on types of authentication.
      },
      "description": "A String", # A broad description of the issue.
      "displayName": "A String", # The short summary of the issue reported in this case.
      "escalated": True or False, # Whether the case is currently escalated.
      "name": "A String", # The resource name for the case.
      "severity": "A String", # The severity of this case.
      "state": "A String", # Output only. The current status of the support case.
      "subscriberEmailAddresses": [ # The email addresses to receive updates on this case.
        "A String",
      ],
      "testCase": True or False, # Whether this case was created for internal API testing and should not be acted on by the support team.
      "timeZone": "A String", # 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.
      "updateTime": "A String", # Output only. The time this case was last updated.
    }

`escalate(name, body=None, x__xgafv=None)`

    Escalate a case. Escalating a case will initiate the Cloud Support escalation management process. This operation is only available to certain Customer Care tiers. Go to https://cloud.google.com/support and look for 'Technical support escalations' in the feature list to find out which tiers are able to perform escalations.

    Args:
      name: string, Required. The fully qualified name of the Case resource to be escalated. (required)
      body: object, The request body.
        The object takes the form of:

    { # The request message for the EscalateCase endpoint.
      "escalation": { # An escalation of a support case. # The escalation object to be sent with the escalation request.
        "actor": { # An object containing information about the effective user and authenticated principal responsible for an action. # Output only. The user or Google Support agent initiated this escalation.
          "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 credentials supplied during case creation. If the authenticated principal does not have an email address, one must be provided. When a name is provided, an email must also be provided. This will be obfuscated if the user is a Google Support agent.
          "googleSupport": True or False, # Output only. Whether the actor is a Google support actor.
          "principalId": "A String", # Output only. An ID representing the user that was authenticated when the corresponding action was taken. This will be an email address, if one is available, or some other unique ID. See https://cloud.google.com/docs/authentication for more information on types of authentication.
        },
        "createTime": "A String", # Output only. The time when this escalation event was created.
        "justification": "A String", # Required. A free text description to accompany the `reason` field above. Provides additional context on why the case is being escalated.
        "name": "A String", # Output only. The resource name for the escalation event.
        "reason": "A String", # Required. The reason why the Case is being escalated.
      },
    }

      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # A support case.
      "classification": { # A classification object with a product type and value. # The issue classification applicable to this case.
        "displayName": "A String", # The display name of the classification.
        "id": "A String", # The unique ID for a classification. Must be specified for case creation.
      },
      "createTime": "A String", # Output only. The time this case was created.
      "creator": { # An object containing information about the effective user and authenticated principal responsible for an action. # The user who created the case. Note: The name and email will be obfuscated if the case was created 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 credentials supplied during case creation. If the authenticated principal does not have an email address, one must be provided. When a name is provided, an email must also be provided. This will be obfuscated if the user is a Google Support agent.
        "googleSupport": True or False, # Output only. Whether the actor is a Google support actor.
        "principalId": "A String", # Output only. An ID representing the user that was authenticated when the corresponding action was taken. This will be an email address, if one is available, or some other unique ID. See https://cloud.google.com/docs/authentication for more information on types of authentication.
      },
      "description": "A String", # A broad description of the issue.
      "displayName": "A String", # The short summary of the issue reported in this case.
      "escalated": True or False, # Whether the case is currently escalated.
      "name": "A String", # The resource name for the case.
      "severity": "A String", # The severity of this case.
      "state": "A String", # Output only. The current status of the support case.
      "subscriberEmailAddresses": [ # The email addresses to receive updates on this case.
        "A String",
      ],
      "testCase": True or False, # Whether this case was created for internal API testing and should not be acted on by the support team.
      "timeZone": "A String", # 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.
      "updateTime": "A String", # Output only. The time this case was last updated.
    }

`get(name, x__xgafv=None)`

    Retrieve the specified case.

    Args:
      name: string, Required. The fully qualified name of a case to be retrieved. (required)
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # A support case.
      "classification": { # A classification object with a product type and value. # The issue classification applicable to this case.
        "displayName": "A String", # The display name of the classification.
        "id": "A String", # The unique ID for a classification. Must be specified for case creation.
      },
      "createTime": "A String", # Output only. The time this case was created.
      "creator": { # An object containing information about the effective user and authenticated principal responsible for an action. # The user who created the case. Note: The name and email will be obfuscated if the case was created 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 credentials supplied during case creation. If the authenticated principal does not have an email address, one must be provided. When a name is provided, an email must also be provided. This will be obfuscated if the user is a Google Support agent.
        "googleSupport": True or False, # Output only. Whether the actor is a Google support actor.
        "principalId": "A String", # Output only. An ID representing the user that was authenticated when the corresponding action was taken. This will be an email address, if one is available, or some other unique ID. See https://cloud.google.com/docs/authentication for more information on types of authentication.
      },
      "description": "A String", # A broad description of the issue.
      "displayName": "A String", # The short summary of the issue reported in this case.
      "escalated": True or False, # Whether the case is currently escalated.
      "name": "A String", # The resource name for the case.
      "severity": "A String", # The severity of this case.
      "state": "A String", # Output only. The current status of the support case.
      "subscriberEmailAddresses": [ # The email addresses to receive updates on this case.
        "A String",
      ],
      "testCase": True or False, # Whether this case was created for internal API testing and should not be acted on by the support team.
      "timeZone": "A String", # 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.
      "updateTime": "A String", # Output only. The time this case was last updated.
    }

`list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)`

    Retrieve all cases under the specified parent.

    Args:
      parent: string, Required. The fully qualified name of parent resource to list cases under. (required)
      filter: string, An expression written in the Cloud filter language. If non-empty, then only cases whose fields match the filter are returned. If empty, then no messages are filtered out. Filter strings can use the following fields: - status (Accepted values: OPEN or CLOSED) - severity (Accepted values: S0, S1, S2, S3, or S4) - creator.email with the operators equals (=) and AND. Additionally, a global restriction (with no operator) can be used to search across displayName, description, and comments (e.g. "my search").
      orderBy: string, A comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc`
      pageSize: integer, The maximum number of cases fetched with each request. Defaults to 10.
      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 ListCases endpoint.
      "cases": [ # The list of cases associated with the cloud resource, after any filters have been applied.
        { # A support case.
          "classification": { # A classification object with a product type and value. # The issue classification applicable to this case.
            "displayName": "A String", # The display name of the classification.
            "id": "A String", # The unique ID for a classification. Must be specified for case creation.
          },
          "createTime": "A String", # Output only. The time this case was created.
          "creator": { # An object containing information about the effective user and authenticated principal responsible for an action. # The user who created the case. Note: The name and email will be obfuscated if the case was created 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 credentials supplied during case creation. If the authenticated principal does not have an email address, one must be provided. When a name is provided, an email must also be provided. This will be obfuscated if the user is a Google Support agent.
            "googleSupport": True or False, # Output only. Whether the actor is a Google support actor.
            "principalId": "A String", # Output only. An ID representing the user that was authenticated when the corresponding action was taken. This will be an email address, if one is available, or some other unique ID. See https://cloud.google.com/docs/authentication for more information on types of authentication.
          },
          "description": "A String", # A broad description of the issue.
          "displayName": "A String", # The short summary of the issue reported in this case.
          "escalated": True or False, # Whether the case is currently escalated.
          "name": "A String", # The resource name for the case.
          "severity": "A String", # The severity of this case.
          "state": "A String", # Output only. The current status of the support case.
          "subscriberEmailAddresses": [ # The email addresses to receive updates on this case.
            "A String",
          ],
          "testCase": True or False, # Whether this case was created for internal API testing and should not be acted on by the support team.
          "timeZone": "A String", # 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.
          "updateTime": "A String", # Output only. The time this case was last updated.
        },
      ],
      "nextPageToken": "A String", # A token to retrieve the next page of results. This should be set in the `page_token` field of subsequent `ListCasesRequest` message that is issued. If unspecified, there are no more results to retrieve.
    }

`list_next(previous_request, previous_response)`

    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.

`patch(name, body=None, updateMask=None, x__xgafv=None)`

    Update the specified case. Only a subset of fields (display_name, description, time_zone, subscriber_email_addresses, related_resources, severity, primary_contact, and labels) can be updated.

    Args:
      name: string, The resource name for the case. (required)
      body: object, The request body.
        The object takes the form of:

    { # A support case.
      "classification": { # A classification object with a product type and value. # The issue classification applicable to this case.
        "displayName": "A String", # The display name of the classification.
        "id": "A String", # The unique ID for a classification. Must be specified for case creation.
      },
      "createTime": "A String", # Output only. The time this case was created.
      "creator": { # An object containing information about the effective user and authenticated principal responsible for an action. # The user who created the case. Note: The name and email will be obfuscated if the case was created 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 credentials supplied during case creation. If the authenticated principal does not have an email address, one must be provided. When a name is provided, an email must also be provided. This will be obfuscated if the user is a Google Support agent.
        "googleSupport": True or False, # Output only. Whether the actor is a Google support actor.
        "principalId": "A String", # Output only. An ID representing the user that was authenticated when the corresponding action was taken. This will be an email address, if one is available, or some other unique ID. See https://cloud.google.com/docs/authentication for more information on types of authentication.
      },
      "description": "A String", # A broad description of the issue.
      "displayName": "A String", # The short summary of the issue reported in this case.
      "escalated": True or False, # Whether the case is currently escalated.
      "name": "A String", # The resource name for the case.
      "severity": "A String", # The severity of this case.
      "state": "A String", # Output only. The current status of the support case.
      "subscriberEmailAddresses": [ # The email addresses to receive updates on this case.
        "A String",
      ],
      "testCase": True or False, # Whether this case was created for internal API testing and should not be acted on by the support team.
      "timeZone": "A String", # 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.
      "updateTime": "A String", # Output only. The time this case was last updated.
    }

      updateMask: string, A field that represents attributes of a case object that should be updated as part of this request. Supported values are severity, display_name, and subscriber_email_addresses. If no fields are specified, all supported fields will be updated. WARNING: If you do not provide a field mask then you may accidentally clear some fields. For example, if you leave field mask empty and do not provide a value for subscriber_email_addresses then subscriber_email_addresses will be updated to empty.
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # A support case.
      "classification": { # A classification object with a product type and value. # The issue classification applicable to this case.
        "displayName": "A String", # The display name of the classification.
        "id": "A String", # The unique ID for a classification. Must be specified for case creation.
      },
      "createTime": "A String", # Output only. The time this case was created.
      "creator": { # An object containing information about the effective user and authenticated principal responsible for an action. # The user who created the case. Note: The name and email will be obfuscated if the case was created 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 credentials supplied during case creation. If the authenticated principal does not have an email address, one must be provided. When a name is provided, an email must also be provided. This will be obfuscated if the user is a Google Support agent.
        "googleSupport": True or False, # Output only. Whether the actor is a Google support actor.
        "principalId": "A String", # Output only. An ID representing the user that was authenticated when the corresponding action was taken. This will be an email address, if one is available, or some other unique ID. See https://cloud.google.com/docs/authentication for more information on types of authentication.
      },
      "description": "A String", # A broad description of the issue.
      "displayName": "A String", # The short summary of the issue reported in this case.
      "escalated": True or False, # Whether the case is currently escalated.
      "name": "A String", # The resource name for the case.
      "severity": "A String", # The severity of this case.
      "state": "A String", # Output only. The current status of the support case.
      "subscriberEmailAddresses": [ # The email addresses to receive updates on this case.
        "A String",
      ],
      "testCase": True or False, # Whether this case was created for internal API testing and should not be acted on by the support team.
      "timeZone": "A String", # 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.
      "updateTime": "A String", # Output only. The time this case was last updated.
    }

`search(pageSize=None, pageToken=None, query=None, x__xgafv=None)`

    Search cases using the specified query.

    Args:
      pageSize: integer, The maximum number of cases fetched with each request. The default page size is 10.
      pageToken: string, A token identifying the page of results to return. If unspecified, the first page is retrieved.
      query: string, An expression written in the Cloud filter language. Filter strings can use the following fields: - organization (A name of the form organizations/) - project (A name of the form projects/) - customer (A name of the form customers/) - state (Accepted values: OPEN or CLOSED) - severity (Accepted values: S0, S1, S2, S3, or S4) - creator.email with the operators equals (=) and AND. Additionally, a global restriction (with no key/operator) can be used to search across display_name, description, and comments (e.g. "my search"). One of organization, project, or customer field must be specified.
      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 SearchCases endpoint.
      "cases": [ # The list of Case associated with the cloud resource, after any filters have been applied.
        { # A support case.
          "classification": { # A classification object with a product type and value. # The issue classification applicable to this case.
            "displayName": "A String", # The display name of the classification.
            "id": "A String", # The unique ID for a classification. Must be specified for case creation.
          },
          "createTime": "A String", # Output only. The time this case was created.
          "creator": { # An object containing information about the effective user and authenticated principal responsible for an action. # The user who created the case. Note: The name and email will be obfuscated if the case was created 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 credentials supplied during case creation. If the authenticated principal does not have an email address, one must be provided. When a name is provided, an email must also be provided. This will be obfuscated if the user is a Google Support agent.
            "googleSupport": True or False, # Output only. Whether the actor is a Google support actor.
            "principalId": "A String", # Output only. An ID representing the user that was authenticated when the corresponding action was taken. This will be an email address, if one is available, or some other unique ID. See https://cloud.google.com/docs/authentication for more information on types of authentication.
          },
          "description": "A String", # A broad description of the issue.
          "displayName": "A String", # The short summary of the issue reported in this case.
          "escalated": True or False, # Whether the case is currently escalated.
          "name": "A String", # The resource name for the case.
          "severity": "A String", # The severity of this case.
          "state": "A String", # Output only. The current status of the support case.
          "subscriberEmailAddresses": [ # The email addresses to receive updates on this case.
            "A String",
          ],
          "testCase": True or False, # Whether this case was created for internal API testing and should not be acted on by the support team.
          "timeZone": "A String", # 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.
          "updateTime": "A String", # Output only. The time this case was last updated.
        },
      ],
      "nextPageToken": "A String", # A token to retrieve the next page of results. This should be set in the `page_token` field of subsequent `SearchCaseRequest` message that is issued. If unspecified, there are no more results to retrieve.
    }

`search_next(previous_request, previous_response)`

    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.