Google Cloud Support API . supportEventSubscriptions

Instance Methods

close()

Close httplib2 connections.

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

Creates a support event subscription for an organization. EXAMPLES: cURL: ```shell parent="organizations/123456789" curl \ --request POST \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ --header 'Content-Type: application/json' \ --data '{ "pub_sub_topic": "projects/my-project/topics/my-topic" }' \ "https://cloudsupport.googleapis.com/v2beta/$parent/supportEventSubscriptions" ``` 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.supportEventSubscriptions().create( parent="organizations/123456789", body={ "pub_sub_topic": "projects/my-project/topics/my-topic" }, ) print(request.execute()) ```

delete(name, x__xgafv=None)

Soft deletes a support event subscription. EXAMPLES: cURL: ```shell support_event_subscription="organizations/123456789/supportEventSubscriptions/abcdef123456" curl \ --request DELETE \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2beta/$support_event_subscription" ``` 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).supportEventSubscriptions().delete( name="organizations/123456789/supportEventSubscriptions/abcdef123456" ) print(request.execute()) ```

expunge(name, body=None, x__xgafv=None)

Expunges a support event subscription.

get(name, x__xgafv=None)

Gets a support event subscription. EXAMPLES: cURL: ```shell support_event_subscription="organizations/123456789/supportEventSubscriptions/abcdef123456" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2beta/$support_event_subscription" ``` 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.supportEventSubscriptions().get( name="organizations/123456789/supportEventSubscriptions/abcdef123456" ) print(request.execute()) ```

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

Lists support event subscriptions. EXAMPLES: cURL: ```shell parent="organizations/123456789" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2beta/$parent/supportEventSubscriptions" ``` 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.supportEventSubscriptions().list( parent="organizations/123456789" ) print(request.execute()) ```

list_next()

Retrieves the next page of results.

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

Updates a support event subscription. EXAMPLES: cURL: ```shell support_event_subscription="organizations/123456789/supportEventSubscriptions/abcdef123456" curl \ --request PATCH \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ --header "Content-Type: application/json" \ --data '{ "pub_sub_topic": "projects/my-project/topics/new-topic" }' \ "https://cloudsupport.googleapis.com/v2beta/$support_event_subscription?updateMask=pub_sub_topic" ``` 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.supportEventSubscriptions().patch( name="organizations/123456789/supportEventSubscriptions/abcdef123456", body={ "pub_sub_topic": "projects/my-project/topics/new-topic" }, ) print(request.execute()) ```

undelete(name, body=None, x__xgafv=None)

Undeletes a support event subscription. EXAMPLES: cURL: ```shell support_event_subscription="organizations/123456789/supportEventSubscriptions/abcdef123456" curl \ --request POST \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2beta/$support_event_subscription:undelete" ``` 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.supportEventSubscriptions().undelete( name="organizations/123456789/supportEventSubscriptions/abcdef123456" ) print(request.execute()) ``` Undeletes a support event subscription.

Method Details

close()
Close httplib2 connections.
create(parent, body=None, x__xgafv=None)
Creates a support event subscription for an organization. EXAMPLES: cURL: ```shell parent="organizations/123456789" curl \ --request POST \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ --header 'Content-Type: application/json' \ --data '{ "pub_sub_topic": "projects/my-project/topics/my-topic" }' \ "https://cloudsupport.googleapis.com/v2beta/$parent/supportEventSubscriptions" ``` 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.supportEventSubscriptions().create( parent="organizations/123456789", body={ "pub_sub_topic": "projects/my-project/topics/my-topic" }, ) print(request.execute()) ```

Args:
  parent: string, Required. The parent resource name where the support event subscription will be created. Format: organizations/{organization_id} (required)
  body: object, The request body.
    The object takes the form of:

{ # A support event subscription.
  "createTime": "A String", # Output only. The time at which the subscription was created.
  "deleteTime": "A String", # Output only. The time at which the subscription was deleted.
  "failureReason": "A String", # Output only. Reason why subscription is failing. State of subscription must be FAILING in order for this to have a value.
  "name": "A String", # Identifier. The resource name of the support event subscription.
  "pubSubTopic": "A String", # Required. The name of the Pub/Sub topic to publish notifications to. Format: projects/{project}/topics/{topic}
  "purgeTime": "A String", # Output only. The time at which the subscription will be purged.
  "state": "A String", # Output only. The state of the subscription.
  "updateTime": "A String", # Output only. The time at which the subscription 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 event subscription.
  "createTime": "A String", # Output only. The time at which the subscription was created.
  "deleteTime": "A String", # Output only. The time at which the subscription was deleted.
  "failureReason": "A String", # Output only. Reason why subscription is failing. State of subscription must be FAILING in order for this to have a value.
  "name": "A String", # Identifier. The resource name of the support event subscription.
  "pubSubTopic": "A String", # Required. The name of the Pub/Sub topic to publish notifications to. Format: projects/{project}/topics/{topic}
  "purgeTime": "A String", # Output only. The time at which the subscription will be purged.
  "state": "A String", # Output only. The state of the subscription.
  "updateTime": "A String", # Output only. The time at which the subscription was last updated.
}
delete(name, x__xgafv=None)
Soft deletes a support event subscription. EXAMPLES: cURL: ```shell support_event_subscription="organizations/123456789/supportEventSubscriptions/abcdef123456" curl \ --request DELETE \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2beta/$support_event_subscription" ``` 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).supportEventSubscriptions().delete( name="organizations/123456789/supportEventSubscriptions/abcdef123456" ) print(request.execute()) ```

Args:
  name: string, Required. The name of the support event subscription to delete. Format: organizations/{organization_id}/supportEventSubscriptions/{subscription_id} (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 event subscription.
  "createTime": "A String", # Output only. The time at which the subscription was created.
  "deleteTime": "A String", # Output only. The time at which the subscription was deleted.
  "failureReason": "A String", # Output only. Reason why subscription is failing. State of subscription must be FAILING in order for this to have a value.
  "name": "A String", # Identifier. The resource name of the support event subscription.
  "pubSubTopic": "A String", # Required. The name of the Pub/Sub topic to publish notifications to. Format: projects/{project}/topics/{topic}
  "purgeTime": "A String", # Output only. The time at which the subscription will be purged.
  "state": "A String", # Output only. The state of the subscription.
  "updateTime": "A String", # Output only. The time at which the subscription was last updated.
}
expunge(name, body=None, x__xgafv=None)
Expunges a support event subscription.

Args:
  name: string, Required. The name of the support event subscription to expunge. Format: organizations/{organization_id}/supportEventSubscriptions/{subscription_id} (required)
  body: object, The request body.
    The object takes the form of:

{ # Request message for ExpungeSupportEventSubscription.
}

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

Returns:
  An object of the form:

    { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
}
get(name, x__xgafv=None)
Gets a support event subscription. EXAMPLES: cURL: ```shell support_event_subscription="organizations/123456789/supportEventSubscriptions/abcdef123456" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2beta/$support_event_subscription" ``` 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.supportEventSubscriptions().get( name="organizations/123456789/supportEventSubscriptions/abcdef123456" ) print(request.execute()) ```

Args:
  name: string, Required. The name of the support event subscription to retrieve. Format: organizations/{organization_id}/supportEventSubscriptions/{subscription_id} (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 event subscription.
  "createTime": "A String", # Output only. The time at which the subscription was created.
  "deleteTime": "A String", # Output only. The time at which the subscription was deleted.
  "failureReason": "A String", # Output only. Reason why subscription is failing. State of subscription must be FAILING in order for this to have a value.
  "name": "A String", # Identifier. The resource name of the support event subscription.
  "pubSubTopic": "A String", # Required. The name of the Pub/Sub topic to publish notifications to. Format: projects/{project}/topics/{topic}
  "purgeTime": "A String", # Output only. The time at which the subscription will be purged.
  "state": "A String", # Output only. The state of the subscription.
  "updateTime": "A String", # Output only. The time at which the subscription was last updated.
}
list(parent, filter=None, pageSize=None, pageToken=None, showDeleted=None, x__xgafv=None)
Lists support event subscriptions. EXAMPLES: cURL: ```shell parent="organizations/123456789" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2beta/$parent/supportEventSubscriptions" ``` 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.supportEventSubscriptions().list( parent="organizations/123456789" ) print(request.execute()) ```

Args:
  parent: string, Required. The fully qualified name of the Cloud resource to list support event subscriptions under. Format: organizations/{organization_id} (required)
  filter: string, Optional. Filter expression based on AIP-160. Supported fields: - pub_sub_topic - state Examples: - `pub_sub_topic="projects/example-project/topics/example-topic"` - `state=WORKING` - `pub_sub_topic="projects/example-project/topics/example-topic" AND state=WORKING`
  pageSize: integer, Optional. The maximum number of support event subscriptions to return.
  pageToken: string, Optional. A token identifying the page of results to return. If unspecified, the first page is retrieved. When paginating, all other parameters provided to `ListSupportEventSubscriptions` must match the call that provided the page token.
  showDeleted: boolean, Optional. Whether to show deleted subscriptions. By default, deleted subscriptions are not returned.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response message for ListSupportEventSubscriptions.
  "nextPageToken": "A String", # A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
  "supportEventSubscriptions": [ # The support event subscriptions.
    { # A support event subscription.
      "createTime": "A String", # Output only. The time at which the subscription was created.
      "deleteTime": "A String", # Output only. The time at which the subscription was deleted.
      "failureReason": "A String", # Output only. Reason why subscription is failing. State of subscription must be FAILING in order for this to have a value.
      "name": "A String", # Identifier. The resource name of the support event subscription.
      "pubSubTopic": "A String", # Required. The name of the Pub/Sub topic to publish notifications to. Format: projects/{project}/topics/{topic}
      "purgeTime": "A String", # Output only. The time at which the subscription will be purged.
      "state": "A String", # Output only. The state of the subscription.
      "updateTime": "A String", # Output only. The time at which the subscription was last updated.
    },
  ],
}
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.
        
patch(name, body=None, updateMask=None, x__xgafv=None)
Updates a support event subscription. EXAMPLES: cURL: ```shell support_event_subscription="organizations/123456789/supportEventSubscriptions/abcdef123456" curl \ --request PATCH \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ --header "Content-Type: application/json" \ --data '{ "pub_sub_topic": "projects/my-project/topics/new-topic" }' \ "https://cloudsupport.googleapis.com/v2beta/$support_event_subscription?updateMask=pub_sub_topic" ``` 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.supportEventSubscriptions().patch( name="organizations/123456789/supportEventSubscriptions/abcdef123456", body={ "pub_sub_topic": "projects/my-project/topics/new-topic" }, ) print(request.execute()) ```

Args:
  name: string, Identifier. The resource name of the support event subscription. (required)
  body: object, The request body.
    The object takes the form of:

{ # A support event subscription.
  "createTime": "A String", # Output only. The time at which the subscription was created.
  "deleteTime": "A String", # Output only. The time at which the subscription was deleted.
  "failureReason": "A String", # Output only. Reason why subscription is failing. State of subscription must be FAILING in order for this to have a value.
  "name": "A String", # Identifier. The resource name of the support event subscription.
  "pubSubTopic": "A String", # Required. The name of the Pub/Sub topic to publish notifications to. Format: projects/{project}/topics/{topic}
  "purgeTime": "A String", # Output only. The time at which the subscription will be purged.
  "state": "A String", # Output only. The state of the subscription.
  "updateTime": "A String", # Output only. The time at which the subscription was last updated.
}

  updateMask: string, Optional. The list of fields to update. The only supported value is pub_sub_topic.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A support event subscription.
  "createTime": "A String", # Output only. The time at which the subscription was created.
  "deleteTime": "A String", # Output only. The time at which the subscription was deleted.
  "failureReason": "A String", # Output only. Reason why subscription is failing. State of subscription must be FAILING in order for this to have a value.
  "name": "A String", # Identifier. The resource name of the support event subscription.
  "pubSubTopic": "A String", # Required. The name of the Pub/Sub topic to publish notifications to. Format: projects/{project}/topics/{topic}
  "purgeTime": "A String", # Output only. The time at which the subscription will be purged.
  "state": "A String", # Output only. The state of the subscription.
  "updateTime": "A String", # Output only. The time at which the subscription was last updated.
}
undelete(name, body=None, x__xgafv=None)
Undeletes a support event subscription. EXAMPLES: cURL: ```shell support_event_subscription="organizations/123456789/supportEventSubscriptions/abcdef123456" curl \ --request POST \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2beta/$support_event_subscription:undelete" ``` 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.supportEventSubscriptions().undelete( name="organizations/123456789/supportEventSubscriptions/abcdef123456" ) print(request.execute()) ``` Undeletes a support event subscription.

Args:
  name: string, Required. The name of the support event subscription to undelete. Format: organizations/{organization_id}/supportEventSubscriptions/{subscription_id} (required)
  body: object, The request body.
    The object takes the form of:

{ # Request message for UndeleteSupportEventSubscription.
}

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

Returns:
  An object of the form:

    { # A support event subscription.
  "createTime": "A String", # Output only. The time at which the subscription was created.
  "deleteTime": "A String", # Output only. The time at which the subscription was deleted.
  "failureReason": "A String", # Output only. Reason why subscription is failing. State of subscription must be FAILING in order for this to have a value.
  "name": "A String", # Identifier. The resource name of the support event subscription.
  "pubSubTopic": "A String", # Required. The name of the Pub/Sub topic to publish notifications to. Format: projects/{project}/topics/{topic}
  "purgeTime": "A String", # Output only. The time at which the subscription will be purged.
  "state": "A String", # Output only. The state of the subscription.
  "updateTime": "A String", # Output only. The time at which the subscription was last updated.
}