Method: supportEventSubscriptions.create

Creates a support event subscription for an organization.

EXAMPLES:

cURL:

parent="organizations/123456789"
curl \
  --request POST \
  --header "Authorization: Bearer $(gcloud auth print-access-token)" \
  --header 'Content-Type: application/json' \
  --data '{
    "pubSubTopic": "projects/my-project/topics/my-topic"
  }' \
  "https://cloudsupport.googleapis.com/v2beta/$parent/supportEventSubscriptions"

Python:

import googleapiclient.discovery

apiVersion = "v2beta"
supportApiService = googleapiclient.discovery.build(
    serviceName="cloudsupport",
    version=apiVersion,
    discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={apiVersion}",
)
request = supportApiService.supportEventSubscriptions().create(
    parent="organizations/123456789",
    body={
        "pubSubTopic": "projects/my-project/topics/my-topic"
    },
)
print(request.execute())

HTTP request

POST https://cloudsupport.googleapis.com/v2beta/{parent=*/*}/supportEventSubscriptions

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. The parent resource name where the support event subscription will be created. Format: organizations/{organizationId}

Request body

The request body contains an instance of SupportEventSubscription.

Response body

If successful, the response body contains a newly created instance of SupportEventSubscription.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudsupport
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.