Class: Google::Apis::CloudsupportV2beta::CloudSupportService
- Inherits:
-
Google::Apis::Core::BaseService
- Object
- Google::Apis::Core::BaseService
- Google::Apis::CloudsupportV2beta::CloudSupportService
- Defined in:
- lib/google/apis/cloudsupport_v2beta/service.rb
Overview
Google Cloud Support API
Manages Google Cloud technical support cases for Customer Care support offerings.
Constant Summary collapse
- DEFAULT_ENDPOINT_TEMPLATE =
"https://cloudsupport.$UNIVERSE_DOMAIN$/"
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#close_case(name, close_case_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudsupportV2beta::Case
Close a case.
-
#create_case(parent, case_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudsupportV2beta::Case
Create a new case and associate it with a parent.
-
#create_case_comment(parent, comment_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudsupportV2beta::Comment
Add a new comment to a case.
-
#create_support_event_subscription(parent, support_event_subscription_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudsupportV2beta::SupportEventSubscription
Creates a support event subscription for an organization.
-
#delete_support_event_subscription(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudsupportV2beta::SupportEventSubscription
Soft deletes a support event subscription.
-
#download_medium(name, fields: nil, quota_user: nil, download_dest: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudsupportV2beta::Media
Download a file attached to a case.
-
#escalate_case(name, escalate_case_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudsupportV2beta::Case
Escalate a case, starting the Google Cloud Support escalation management process.
-
#get_case(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudsupportV2beta::Case
Retrieve a case.
-
#get_case_attachment(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudsupportV2beta::Attachment
Retrieve an attachment associated with a support case.
-
#get_case_comment(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudsupportV2beta::Comment
Retrieve a comment.
-
#get_support_event_subscription(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudsupportV2beta::SupportEventSubscription
Gets a support event subscription.
-
#initialize ⇒ CloudSupportService
constructor
A new instance of CloudSupportService.
-
#list_case_attachments(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudsupportV2beta::ListAttachmentsResponse
List all the attachments associated with a support case.
-
#list_case_comments(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudsupportV2beta::ListCommentsResponse
List all the comments associated with a case.
-
#list_cases(parent, filter: nil, page_size: nil, page_token: nil, product_line: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudsupportV2beta::ListCasesResponse
Retrieve all cases under a parent, but not its children.
-
#list_support_event_subscriptions(parent, filter: nil, page_size: nil, page_token: nil, show_deleted: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudsupportV2beta::ListSupportEventSubscriptionsResponse
Lists support event subscriptions.
-
#patch_case(name, case_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudsupportV2beta::Case
Update a case.
-
#patch_support_event_subscription(name, support_event_subscription_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudsupportV2beta::SupportEventSubscription
Updates a support event subscription.
-
#search_case_classifications(page_size: nil, page_token: nil, product_product_line: nil, query: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudsupportV2beta::SearchCaseClassificationsResponse
Retrieve valid classifications to use when creating a support case.
-
#search_cases(page_size: nil, page_token: nil, parent: nil, query: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudsupportV2beta::SearchCasesResponse
Search for cases using a query.
-
#show_case_feed(parent, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudsupportV2beta::ShowFeedResponse
Show items in the feed of this case, including case emails, attachments, and comments.
-
#undelete_support_event_subscription(name, undelete_support_event_subscription_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudsupportV2beta::SupportEventSubscription
Undeletes a support event subscription.
-
#upload_medium(parent, create_attachment_request_object = nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudsupportV2beta::Attachment
Create a file attachment on a case or Cloud resource.
Constructor Details
#initialize ⇒ CloudSupportService
Returns a new instance of CloudSupportService.
48 49 50 51 52 53 |
# File 'lib/google/apis/cloudsupport_v2beta/service.rb', line 48 def initialize super(DEFAULT_ENDPOINT_TEMPLATE, '', client_name: 'google-apis-cloudsupport_v2beta', client_version: Google::Apis::CloudsupportV2beta::GEM_VERSION) @batch_path = 'batch' end |
Instance Attribute Details
#key ⇒ String
Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
41 42 43 |
# File 'lib/google/apis/cloudsupport_v2beta/service.rb', line 41 def key @key end |
#quota_user ⇒ String
Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
46 47 48 |
# File 'lib/google/apis/cloudsupport_v2beta/service.rb', line 46 def quota_user @quota_user end |
Instance Method Details
#close_case(name, close_case_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudsupportV2beta::Case
Close a case. EXAMPLES: cURL: shell case="projects/some-project/cases/
43595344" curl \ --request POST \ --header "Authorization: Bearer $(gcloud
auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2beta/$case:
close" Python: python import googleapiclient.discovery api_version = "
v2beta" supportApiService = googleapiclient.discovery.build( serviceName="
cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.
googleapis.com/$discovery/rest?version=`api_version`", ) request =
supportApiService.cases().close( name="projects/some-project/cases/43595344" )
print(request.execute())
140 141 142 143 144 145 146 147 148 149 150 |
# File 'lib/google/apis/cloudsupport_v2beta/service.rb', line 140 def close_case(name, close_case_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2beta/{+name}:close', ) command.request_representation = Google::Apis::CloudsupportV2beta::CloseCaseRequest::Representation command.request_object = close_case_request_object command.response_representation = Google::Apis::CloudsupportV2beta::Case::Representation command.response_class = Google::Apis::CloudsupportV2beta::Case command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#create_case(parent, case_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudsupportV2beta::Case
Create a new case and associate it with a parent. It must have the following
fields set: display_name, description, classification, and priority.
If you're just testing the API and don't want to route your case to an agent,
set testCase=true. EXAMPLES: cURL: shell parent="projects/some-project"
curl \ --request POST \ --header "Authorization: Bearer $(gcloud auth print-
access-token)" \ --header 'Content-Type: application/json' \ --data '` "
display_name": "Test case created by me.", "description": "a random test case,
feel free to close", "classification": ` "id": "
1BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8"
`, "time_zone": "-07:00", "subscriber_email_addresses": [ "foo@domain.com", "
bar@domain.com" ], "testCase": true, "priority": "P3" `' \ "https://
cloudsupport.googleapis.com/v2beta/$parent/cases" Python: python import
googleapiclient.discovery api_version = "v2beta" supportApiService =
googleapiclient.discovery.build( serviceName="cloudsupport", version=
api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$
discovery/rest?version=`api_version`", ) request = supportApiService.cases().
create( parent="projects/some-project", body=` "displayName": "A Test Case", "
description": "This is a test case.", "testCase": True, "priority": "P2", "
classification": ` "id": "
1BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8"
`, `, ) print(request.execute())
193 194 195 196 197 198 199 200 201 202 203 |
# File 'lib/google/apis/cloudsupport_v2beta/service.rb', line 193 def create_case(parent, case_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2beta/{+parent}/cases', ) command.request_representation = Google::Apis::CloudsupportV2beta::Case::Representation command.request_object = case_object command.response_representation = Google::Apis::CloudsupportV2beta::Case::Representation command.response_class = Google::Apis::CloudsupportV2beta::Case command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#create_case_comment(parent, comment_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudsupportV2beta::Comment
Add a new comment to a case. The comment must have the following fields set:
body. EXAMPLES: cURL: shell case="projects/some-project/cases/43591344"
curl \ --request POST \ --header "Authorization: Bearer $(gcloud auth print-
access-token)" \ --header 'Content-Type: application/json' \ --data '` "body":
"This is a test comment." `' \ "https://cloudsupport.googleapis.com/v2beta/$
case/comments" Python: python import googleapiclient.discovery
api_version = "v2beta" supportApiService = googleapiclient.discovery.build(
serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://
cloudsupport.googleapis.com/$discovery/rest?version=`api_version`", ) request =
( supportApiService.cases() .comments() .create( parent="projects/some-
project/cases/43595344", body=`"body": "This is a test comment."`, ) ) print(
request.execute())
643 644 645 646 647 648 649 650 651 652 653 |
# File 'lib/google/apis/cloudsupport_v2beta/service.rb', line 643 def create_case_comment(parent, comment_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2beta/{+parent}/comments', ) command.request_representation = Google::Apis::CloudsupportV2beta::Comment::Representation command.request_object = comment_object command.response_representation = Google::Apis::CloudsupportV2beta::Comment::Representation command.response_class = Google::Apis::CloudsupportV2beta::Comment command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#create_support_event_subscription(parent, support_event_subscription_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudsupportV2beta::SupportEventSubscription
Creates a support event subscription for an organization.
867 868 869 870 871 872 873 874 875 876 877 |
# File 'lib/google/apis/cloudsupport_v2beta/service.rb', line 867 def create_support_event_subscription(parent, support_event_subscription_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2beta/{+parent}/supportEventSubscriptions', ) command.request_representation = Google::Apis::CloudsupportV2beta::SupportEventSubscription::Representation command.request_object = support_event_subscription_object command.response_representation = Google::Apis::CloudsupportV2beta::SupportEventSubscription::Representation command.response_class = Google::Apis::CloudsupportV2beta::SupportEventSubscription command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_support_event_subscription(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudsupportV2beta::SupportEventSubscription
Soft deletes a support event subscription.
900 901 902 903 904 905 906 907 908 |
# File 'lib/google/apis/cloudsupport_v2beta/service.rb', line 900 def delete_support_event_subscription(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v2beta/{+name}', ) command.response_representation = Google::Apis::CloudsupportV2beta::SupportEventSubscription::Representation command.response_class = Google::Apis::CloudsupportV2beta::SupportEventSubscription command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#download_medium(name, fields: nil, quota_user: nil, download_dest: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudsupportV2beta::Media
Download a file attached to a case. When this endpoint is called, no "response
body" will be returned. Instead, the attachment's blob will be returned. Note:
HTTP requests must append "?alt=media" to the URL. EXAMPLES: cURL: shell
name="projects/some-project/cases/43594844/attachments/0674M00000WijAnZAJ"
curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "
https://cloudsupport.googleapis.com/v2beta/$name:download?alt=media"
Python: python import googleapiclient.discovery api_version = "v2beta"
supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport"
, version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.
com/$discovery/rest?version=`api_version`", ) request = supportApiService.
media().download( name="projects/some-project/cases/43595344/attachments/
0684M00000Pw6pHQAR" ) request.uri = request.uri.split("?")[0] + "?alt=media"
print(request.execute())
772 773 774 775 776 777 778 779 780 781 782 783 784 785 |
# File 'lib/google/apis/cloudsupport_v2beta/service.rb', line 772 def download_medium(name, fields: nil, quota_user: nil, download_dest: nil, options: nil, &block) if download_dest.nil? command = make_simple_command(:get, 'v2beta/{+name}:download', ) else command = make_download_command(:get, 'v2beta/{+name}:download', ) command.download_dest = download_dest end command.response_representation = Google::Apis::CloudsupportV2beta::Media::Representation command.response_class = Google::Apis::CloudsupportV2beta::Media command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#escalate_case(name, escalate_case_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudsupportV2beta::Case
Escalate a case, starting the Google Cloud Support escalation management
process. This operation is only available for some support services. Go to
https://cloud.google.com/support and look for 'Technical support escalations'
in the feature list to find out which ones let you do that. EXAMPLES: cURL:
shell case="projects/some-project/cases/43595344" curl \ --request POST \ --
header "Authorization: Bearer $(gcloud auth print-access-token)" \ --header "
Content-Type: application/json" \ --data '` "escalation": ` "reason": "
BUSINESS_IMPACT", "justification": "This is a test escalation." ` `' \ "https:/
/cloudsupport.googleapis.com/v2beta/$case:escalate" Python: python
import googleapiclient.discovery api_version = "v2beta" supportApiService =
googleapiclient.discovery.build( serviceName="cloudsupport", version=
api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$
discovery/rest?version=`api_version`", ) request = supportApiService.cases().
escalate( name="projects/some-project/cases/43595344", body=` "escalation": ` "
reason": "BUSINESS_IMPACT", "justification": "This is a test escalation.", `, `
, ) print(request.execute())
241 242 243 244 245 246 247 248 249 250 251 |
# File 'lib/google/apis/cloudsupport_v2beta/service.rb', line 241 def escalate_case(name, escalate_case_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2beta/{+name}:escalate', ) command.request_representation = Google::Apis::CloudsupportV2beta::EscalateCaseRequest::Representation command.request_object = escalate_case_request_object command.response_representation = Google::Apis::CloudsupportV2beta::Case::Representation command.response_class = Google::Apis::CloudsupportV2beta::Case command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_case(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudsupportV2beta::Case
Retrieve a case. EXAMPLES: cURL: shell case="projects/some-project/cases/
16033687" curl \ --header "Authorization: Bearer $(gcloud auth print-access-
token)" \ "https://cloudsupport.googleapis.com/v2beta/$case" Python:
python import googleapiclient.discovery api_version = "v2beta"
supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport"
, version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.
com/$discovery/rest?version=`api_version`", ) request = supportApiService.
cases().get( name="projects/some-project/cases/43595344", ) print(request.
execute())
281 282 283 284 285 286 287 288 289 |
# File 'lib/google/apis/cloudsupport_v2beta/service.rb', line 281 def get_case(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta/{+name}', ) command.response_representation = Google::Apis::CloudsupportV2beta::Case::Representation command.response_class = Google::Apis::CloudsupportV2beta::Case command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_case_attachment(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudsupportV2beta::Attachment
Retrieve an attachment associated with a support case. EXAMPLES: cURL:
shell attachment="projects/some-project/cases/23598314/attachments/
0684M00000P3h1fQAB" curl \ --header "Authorization: Bearer $(gcloud auth print-
access-token)" \ "https://cloudsupport.googleapis.com/v2beta/$attachment"
Python: python import googleapiclient.discovery api_version = "v2beta"
supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport"
, version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.
com/$discovery/rest?version=`api_version`", ) request = ( supportApiService.
cases() .attachments() .get(name="projects/some-project/cases/43595344/
attachments/0684M00000P3h1fQAB") ) print(request.execute())
551 552 553 554 555 556 557 558 559 |
# File 'lib/google/apis/cloudsupport_v2beta/service.rb', line 551 def (name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta/{+name}', ) command.response_representation = Google::Apis::CloudsupportV2beta::Attachment::Representation command.response_class = Google::Apis::CloudsupportV2beta::Attachment command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_case_comment(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudsupportV2beta::Comment
Retrieve a comment. EXAMPLES: cURL: shell comment="projects/some-project/
cases/43595344/comments/234567890" curl \ --header "Authorization: Bearer $(
gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2beta/
$comment" Python: python import googleapiclient.discovery api_version =
"v2beta" supportApiService = googleapiclient.discovery.build( serviceName="
cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.
googleapis.com/$discovery/rest?version=`api_version`", ) request =
supportApiService.cases().comments().get( name="projects/some-project/cases/
43595344/comments/234567890", ) print(request.execute())
683 684 685 686 687 688 689 690 691 |
# File 'lib/google/apis/cloudsupport_v2beta/service.rb', line 683 def get_case_comment(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta/{+name}', ) command.response_representation = Google::Apis::CloudsupportV2beta::Comment::Representation command.response_class = Google::Apis::CloudsupportV2beta::Comment command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_support_event_subscription(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudsupportV2beta::SupportEventSubscription
Gets a support event subscription.
931 932 933 934 935 936 937 938 939 |
# File 'lib/google/apis/cloudsupport_v2beta/service.rb', line 931 def get_support_event_subscription(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta/{+name}', ) command.response_representation = Google::Apis::CloudsupportV2beta::SupportEventSubscription::Representation command.response_class = Google::Apis::CloudsupportV2beta::SupportEventSubscription command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_case_attachments(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudsupportV2beta::ListAttachmentsResponse
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/v2beta/$case/attachments" Python: python
import googleapiclient.discovery api_version = "v2beta" 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())
599 600 601 602 603 604 605 606 607 608 609 |
# File 'lib/google/apis/cloudsupport_v2beta/service.rb', line 599 def (parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta/{+parent}/attachments', ) command.response_representation = Google::Apis::CloudsupportV2beta::ListAttachmentsResponse::Representation command.response_class = Google::Apis::CloudsupportV2beta::ListAttachmentsResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_case_comments(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudsupportV2beta::ListCommentsResponse
List all the comments associated with a case. EXAMPLES: cURL: shell case="
projects/some-project/cases/43595344" curl \ --header "Authorization: Bearer $(
gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2beta/
$case/comments" Python: python import googleapiclient.discovery
api_version = "v2beta" supportApiService = googleapiclient.discovery.build(
serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://
cloudsupport.googleapis.com/$discovery/rest?version=`api_version`", ) request =
( supportApiService.cases() .comments() .list(parent="projects/some-project/
cases/43595344") ) print(request.execute())
726 727 728 729 730 731 732 733 734 735 736 |
# File 'lib/google/apis/cloudsupport_v2beta/service.rb', line 726 def list_case_comments(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta/{+parent}/comments', ) command.response_representation = Google::Apis::CloudsupportV2beta::ListCommentsResponse::Representation command.response_class = Google::Apis::CloudsupportV2beta::ListCommentsResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_cases(parent, filter: nil, page_size: nil, page_token: nil, product_line: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudsupportV2beta::ListCasesResponse
Retrieve all cases under a parent, but not its children. For example, listing
cases under an organization only returns the cases that are directly parented
by that organization. To retrieve cases under an organization and its projects,
use cases.search. EXAMPLES: cURL: shell parent="projects/some-project"
curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "
https://cloudsupport.googleapis.com/v2beta/$parent/cases" Python:
python import googleapiclient.discovery api_version = "v2beta"
supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport"
, version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.
com/$discovery/rest?version=`api_version`", ) request = supportApiService.
cases().list(parent="projects/some-project") print(request.execute())
339 340 341 342 343 344 345 346 347 348 349 350 351 |
# File 'lib/google/apis/cloudsupport_v2beta/service.rb', line 339 def list_cases(parent, filter: nil, page_size: nil, page_token: nil, product_line: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta/{+parent}/cases', ) command.response_representation = Google::Apis::CloudsupportV2beta::ListCasesResponse::Representation command.response_class = Google::Apis::CloudsupportV2beta::ListCasesResponse command.params['parent'] = parent unless parent.nil? command.query['filter'] = filter unless filter.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['productLine'] = product_line unless product_line.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_support_event_subscriptions(parent, filter: nil, page_size: nil, page_token: nil, show_deleted: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudsupportV2beta::ListSupportEventSubscriptionsResponse
Lists support event subscriptions.
977 978 979 980 981 982 983 984 985 986 987 988 989 |
# File 'lib/google/apis/cloudsupport_v2beta/service.rb', line 977 def list_support_event_subscriptions(parent, filter: nil, page_size: nil, page_token: nil, show_deleted: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta/{+parent}/supportEventSubscriptions', ) command.response_representation = Google::Apis::CloudsupportV2beta::ListSupportEventSubscriptionsResponse::Representation command.response_class = Google::Apis::CloudsupportV2beta::ListSupportEventSubscriptionsResponse command.params['parent'] = parent unless parent.nil? command.query['filter'] = filter unless filter.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['showDeleted'] = show_deleted unless show_deleted.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#patch_case(name, case_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudsupportV2beta::Case
Update a case. Only some fields can be updated. EXAMPLES: cURL: shell case="
projects/some-project/cases/43595344" curl \ --request PATCH \ --header "
Authorization: Bearer $(gcloud auth print-access-token)" \ --header "Content-
Type: application/json" \ --data '` "priority": "P1" `' \ "https://
cloudsupport.googleapis.com/v2beta/$case?updateMask=priority" Python:
python import googleapiclient.discovery api_version = "v2beta"
supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport"
, version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.
com/$discovery/rest?version=`api_version`", ) request = supportApiService.
cases().patch( name="projects/some-project/cases/43112854", body=` "
displayName": "This is Now a New Title", "priority": "P2", `, ) print(request.
execute())
393 394 395 396 397 398 399 400 401 402 403 404 |
# File 'lib/google/apis/cloudsupport_v2beta/service.rb', line 393 def patch_case(name, case_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v2beta/{+name}', ) command.request_representation = Google::Apis::CloudsupportV2beta::Case::Representation command.request_object = case_object command.response_representation = Google::Apis::CloudsupportV2beta::Case::Representation command.response_class = Google::Apis::CloudsupportV2beta::Case command.params['name'] = name unless name.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#patch_support_event_subscription(name, support_event_subscription_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudsupportV2beta::SupportEventSubscription
Updates a support event subscription.
1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 |
# File 'lib/google/apis/cloudsupport_v2beta/service.rb', line 1015 def patch_support_event_subscription(name, support_event_subscription_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v2beta/{+name}', ) command.request_representation = Google::Apis::CloudsupportV2beta::SupportEventSubscription::Representation command.request_object = support_event_subscription_object command.response_representation = Google::Apis::CloudsupportV2beta::SupportEventSubscription::Representation command.response_class = Google::Apis::CloudsupportV2beta::SupportEventSubscription command.params['name'] = name unless name.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#search_case_classifications(page_size: nil, page_token: nil, product_product_line: nil, query: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudsupportV2beta::SearchCaseClassificationsResponse
Retrieve valid classifications to use when creating a support case.
Classifications are hierarchical. Each classification is a string containing
all levels of the hierarchy separated by " > ". For example, "Technical
Issue > Compute > Compute Engine". Classification IDs returned by this
endpoint are valid for at least six months. When a classification is
deactivated, this endpoint immediately stops returning it. After six months,
case.create requests using the classification will fail. EXAMPLES: cURL:
shell curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)"
\ 'https://cloudsupport.googleapis.com/v2beta/caseClassifications:search?
query=display_name:"*Compute%20Engine*"' Python: python import
googleapiclient.discovery supportApiService = googleapiclient.discovery.build(
serviceName="cloudsupport", version="v2beta", discoveryServiceUrl=f"https://
cloudsupport.googleapis.com/$discovery/rest?version=v2", ) request =
supportApiService.caseClassifications().search( query='display_name:"*Compute
Engine*"' ) print(request.execute())
98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/google/apis/cloudsupport_v2beta/service.rb', line 98 def search_case_classifications(page_size: nil, page_token: nil, product_product_line: nil, query: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta/caseClassifications:search', ) command.response_representation = Google::Apis::CloudsupportV2beta::SearchCaseClassificationsResponse::Representation command.response_class = Google::Apis::CloudsupportV2beta::SearchCaseClassificationsResponse command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['product.productLine'] = product_product_line unless product_product_line.nil? command.query['query'] = query unless query.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#search_cases(page_size: nil, page_token: nil, parent: nil, query: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudsupportV2beta::SearchCasesResponse
Search for cases using a query. EXAMPLES: cURL: shell parent="projects/some-
project" curl \ --header "Authorization: Bearer $(gcloud auth print-access-
token)" \ "https://cloudsupport.googleapis.com/v2beta/$parent/cases:search"
Python: python import googleapiclient.discovery api_version = "v2beta"
supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport"
, version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.
com/$discovery/rest?version=`api_version`", ) request = supportApiService.
cases().search( parent="projects/some-project", query="state=OPEN" ) print(
request.execute())
465 466 467 468 469 470 471 472 473 474 475 476 |
# File 'lib/google/apis/cloudsupport_v2beta/service.rb', line 465 def search_cases(page_size: nil, page_token: nil, parent: nil, query: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta/cases:search', ) command.response_representation = Google::Apis::CloudsupportV2beta::SearchCasesResponse::Representation command.response_class = Google::Apis::CloudsupportV2beta::SearchCasesResponse command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['parent'] = parent unless parent.nil? command.query['query'] = query unless query.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#show_case_feed(parent, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudsupportV2beta::ShowFeedResponse
Show items in the feed of this case, including case emails, attachments, and comments.
509 510 511 512 513 514 515 516 517 518 519 520 |
# File 'lib/google/apis/cloudsupport_v2beta/service.rb', line 509 def show_case_feed(parent, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta/{+parent}:showFeed', ) command.response_representation = Google::Apis::CloudsupportV2beta::ShowFeedResponse::Representation command.response_class = Google::Apis::CloudsupportV2beta::ShowFeedResponse command.params['parent'] = parent unless parent.nil? command.query['orderBy'] = order_by unless order_by.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#undelete_support_event_subscription(name, undelete_support_event_subscription_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudsupportV2beta::SupportEventSubscription
Undeletes a support event subscription.
1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 |
# File 'lib/google/apis/cloudsupport_v2beta/service.rb', line 1050 def undelete_support_event_subscription(name, undelete_support_event_subscription_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2beta/{+name}:undelete', ) command.request_representation = Google::Apis::CloudsupportV2beta::UndeleteSupportEventSubscriptionRequest::Representation command.request_object = undelete_support_event_subscription_request_object command.response_representation = Google::Apis::CloudsupportV2beta::SupportEventSubscription::Representation command.response_class = Google::Apis::CloudsupportV2beta::SupportEventSubscription command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#upload_medium(parent, create_attachment_request_object = nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudsupportV2beta::Attachment
Create a file attachment on a case or Cloud resource. The attachment must have
the following fields set: filename. EXAMPLES: cURL: shell echo "This text
is in a file I'm uploading using CSAPI." \ > "./example_file.txt" case="
projects/some-project/cases/43594844" curl \ --header "Authorization: Bearer $(
gcloud auth print-access-token)" \ --data-binary @"./example_file.txt" \ "
https://cloudsupport.googleapis.com/upload/v2beta/$case/attachments?attachment.
filename=uploaded_via_curl.txt" Python: ``python import googleapiclient.
discovery api_version = "v2beta" supportApiService = googleapiclient.discovery.
build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"
https://cloudsupport.googleapis.com/$discovery/rest?version=api_version`", )
file_path = "./example_file.txt" with open(file_path, "w") as file: file.write(
"This text is inside a file I'm going to upload using the Cloud Support API.",
) request = supportApiService.media().upload( parent="projects/some-project/
cases/43595344", media_body=file_path ) request.uri = request.uri.split("?")[0]
- "?attachment.filename=uploaded_via_python.txt" print(request.execute()) ```
827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 |
# File 'lib/google/apis/cloudsupport_v2beta/service.rb', line 827 def upload_medium(parent, = nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil, &block) if upload_source.nil? command = make_simple_command(:post, 'v2beta/{+parent}/attachments', ) else command = make_upload_command(:post, 'v2beta/{+parent}/attachments', ) command.upload_source = upload_source command.upload_content_type = content_type end command.request_representation = Google::Apis::CloudsupportV2beta::CreateAttachmentRequest::Representation command.request_object = command.response_representation = Google::Apis::CloudsupportV2beta::Attachment::Representation command.response_class = Google::Apis::CloudsupportV2beta::Attachment command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |