Wednesday, October 9, 2024
No menu items!
HomeCloud ComputingCloud Support API: Building a "red button" for creating critical cases

Cloud Support API: Building a “red button” for creating critical cases

The Cymbal Group is a happy (and fictional) GCP premium support customer. They enjoy the benefits of being a premium support customer – access to a dedicated Technical Account Manager (TAM), 15 minute response time for P1 Technical support cases, 24 hours a day, 7 days a week, and now – access to the Cloud Support API. 

Folks at Cymbal realize that when it comes to urgent situations, every second counts. Previously, the Cymbal Group team spent time finding the correct team members that have access to file cases as well as filling out several boilerplate form entries before the support case was created. Every extra minute it took to reach out to support, Cymbal knew that more and more of their customers would be impacted. 

To fix this they wanted to create a “red button” or “break-glass” case creation tool in these urgent situations, specifically to file top priority support cases. This tool would be a form on a simple website, helping them to cut out many of the time consuming aspects of filing a support case. 

Building the red button web page

The Cymbal Group made a simple drop-down menu with preconfigured case components that map to their most commonly used Google Cloud services such as Big Query or Dataproc. The form also can require a URL to a Google Meet video conference room that both Cymbal and Google employees could join and further discuss the situation. 

The Cymbal case creation page is configured to have many optional fields, such as project ID, because Cymbal automatically creates a case in the Cymbal org (not linked to a specific project) if the field is empty. While many fields are optional, Cymbal realizes that the more information it can provide to Google Support initially, the better they will be to address the issue quickly and efficiently.

The Cymbal team created a wireframe mockup of their entry form and confirmation page. They then used the set up instructions on the Cloud Support API documentation page to activate the API in a Cymbal GCP project and created a Service Account with the proper roles. After reviewing the Cloud Support API documentation, Cymbal created a simple Python application using the Case Creation method from scratch. Here’s a code snippet!

code_block[StructValue([(u’code’, u’import googleapiclient.discoveryrnrnSERVICE_NAME = “cloudsupport”rnAPI_VERSION = “v2beta”rnORGANIZATION_ID = ‘1234567890’ #example org IDrnORGANIZATION_AS_PARENT = ‘organizations/’ + ORGANIZATION_IDrnAPI_DEFINITION_URL = “https://cloudsupport.googleapis.com/$discovery/rest?version=” + API_VERSIONrnrnsupportApiService = googleapiclient.discovery.build(rn serviceName=SERVICE_NAME,rn version=API_VERSION,rn discoveryServiceUrl=API_DEFINITION_URL)’), (u’language’, u”)])]

This code snippet above initializes the Cloud Support client library and defines the Organization ID that the Cybal Group will be using to create a case under. Next, they pull from the fields from the UI web form and insert them in a JSON request body. This will contain the details used for creating a support case, such as the description of the case, and the component id which denotes which GCP product is affected – hardcoded into the drop-down menu. In this case, the case description is a combination of several fields in the form, using a custom-made function called build_description_value.

code_block[StructValue([(u’code’, u’request_body = {rn ‘display_name’: display_name,rn ‘description’: build_description_value(project, impact, googlemeet_link, comments),rn ‘classification’: {rn ‘id’: componentrn },rn ‘time_zone’: “-06:00”, rn ‘subscriber_email_addresses’: subscribers,rn ‘severity’: “S1″rn }’), (u’language’, u”)])]

Cymbal hard coded the subject of the case and provided a stock description. The subject (display_name) is “BUSINESS CRITICAL P1 ISSUE – PLEASE JOIN GVC LINK ” + googlemeet_link + ” IMMEDIATELY”. 

In the next code snippet, the JSON body is passed to the cases.create() method in order to create a support case.

code_block[StructValue([(u’code’, u’create_case_response = supportApiService.cases()\rn .create(parent=ORGANIZATION_AS_PARENT, body=request_body)\rn .execute()’), (u’language’, u”)])]

When the creation of the case is completed, the API returns the case number in the response. Cymbal then displays this on a case confirmation page, as well as a link to the Cloud Console where they can view the support case and add additional comments throughout the investigation.

And it’s as simple as that! The Cymbal Group team members await for the Google Support team to join the Google Meet call to further discuss the critical issue at hand. The Cymbal group is happy to have saved time getting help with their critical production issue. 

If you have ideas for creating your own case creation tool similar to the one described in this blog post, you can find more information about the Cloud Support API and its capabilities in our documentation here https://cloud.google.com/support/docs/reference/support-api and here https://cloud.google.com/support/docs/reference/rest.

For Cloud Support API examples like the ones mentioned in this blog post, please view this GitHub repository: https://github.com/GoogleCloudPlatform/professional-services/tree/main/examples/cloud-support/

Related Article

Customer Care portfolio: Flexible, scalable, robust support

The Google Cloud Customer Care portfolio offers a range of technical support options designed to optimize hybrid work environments.

Read Article

Cloud BlogRead More

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments