Security Command Center API . folders . notificationConfigs

Instance Methods

close()

Close httplib2 connections.

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

Creates a notification config.

delete(name, x__xgafv=None)

Deletes a notification config.

get(name, x__xgafv=None)

Gets a notification config.

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

Lists notification configs.

list_next()

Retrieves the next page of results.

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

Updates a notification config. The following update fields are allowed: description, pubsub_topic, streaming_config.filter

Method Details

close()
Close httplib2 connections.
create(parent, body=None, configId=None, x__xgafv=None)
Creates a notification config.

Args:
  parent: string, Required. Resource name of the new notification config's parent. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". (required)
  body: object, The request body.
    The object takes the form of:

{ # Cloud Security Command Center (Cloud SCC) notification configs. A notification config is a Cloud SCC resource that contains the configuration to send notifications for create/update events of findings, assets and etc.
  "description": "A String", # The description of the notification config (max of 1024 characters).
  "name": "A String", # The relative resource name of this notification config. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id}/notificationConfigs/notify_public_bucket", "folders/{folder_id}/notificationConfigs/notify_public_bucket", or "projects/{project_id}/notificationConfigs/notify_public_bucket".
  "pubsubTopic": "A String", # The Pub/Sub topic to send notifications to. Its format is "projects/[project_id]/topics/[topic]".
  "serviceAccount": "A String", # Output only. The service account that needs "pubsub.topics.publish" permission to publish to the Pub/Sub topic.
  "streamingConfig": { # The config for streaming-based notifications, which send each event as soon as it is detected. # The config for triggering streaming-based notifications.
    "filter": "A String", # Expression that defines the filter to apply across create/update events of assets or findings as specified by the event type. The expression is a list of zero or more restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. The fields map to those defined in the corresponding resource. The supported operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes.
  },
}

  configId: string, Required. Unique identifier provided by the client within the parent scope. It must be between 1 and 128 characters and contain alphanumeric characters, underscores, or hyphens only.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Cloud Security Command Center (Cloud SCC) notification configs. A notification config is a Cloud SCC resource that contains the configuration to send notifications for create/update events of findings, assets and etc.
  "description": "A String", # The description of the notification config (max of 1024 characters).
  "name": "A String", # The relative resource name of this notification config. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id}/notificationConfigs/notify_public_bucket", "folders/{folder_id}/notificationConfigs/notify_public_bucket", or "projects/{project_id}/notificationConfigs/notify_public_bucket".
  "pubsubTopic": "A String", # The Pub/Sub topic to send notifications to. Its format is "projects/[project_id]/topics/[topic]".
  "serviceAccount": "A String", # Output only. The service account that needs "pubsub.topics.publish" permission to publish to the Pub/Sub topic.
  "streamingConfig": { # The config for streaming-based notifications, which send each event as soon as it is detected. # The config for triggering streaming-based notifications.
    "filter": "A String", # Expression that defines the filter to apply across create/update events of assets or findings as specified by the event type. The expression is a list of zero or more restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. The fields map to those defined in the corresponding resource. The supported operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes.
  },
}
delete(name, x__xgafv=None)
Deletes a notification config.

Args:
  name: string, Required. Name of the notification config to delete. Its format is "organizations/[organization_id]/notificationConfigs/[config_id]", "folders/[folder_id]/notificationConfigs/[config_id]", or "projects/[project_id]/notificationConfigs/[config_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 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 notification config.

Args:
  name: string, Required. Name of the notification config to get. Its format is "organizations/[organization_id]/notificationConfigs/[config_id]", "folders/[folder_id]/notificationConfigs/[config_id]", or "projects/[project_id]/notificationConfigs/[config_id]". (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Cloud Security Command Center (Cloud SCC) notification configs. A notification config is a Cloud SCC resource that contains the configuration to send notifications for create/update events of findings, assets and etc.
  "description": "A String", # The description of the notification config (max of 1024 characters).
  "name": "A String", # The relative resource name of this notification config. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id}/notificationConfigs/notify_public_bucket", "folders/{folder_id}/notificationConfigs/notify_public_bucket", or "projects/{project_id}/notificationConfigs/notify_public_bucket".
  "pubsubTopic": "A String", # The Pub/Sub topic to send notifications to. Its format is "projects/[project_id]/topics/[topic]".
  "serviceAccount": "A String", # Output only. The service account that needs "pubsub.topics.publish" permission to publish to the Pub/Sub topic.
  "streamingConfig": { # The config for streaming-based notifications, which send each event as soon as it is detected. # The config for triggering streaming-based notifications.
    "filter": "A String", # Expression that defines the filter to apply across create/update events of assets or findings as specified by the event type. The expression is a list of zero or more restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. The fields map to those defined in the corresponding resource. The supported operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes.
  },
}
list(parent, pageSize=None, pageToken=None, x__xgafv=None)
Lists notification configs.

Args:
  parent: string, Required. The name of the parent in which to list the notification configurations. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". (required)
  pageSize: integer, The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.
  pageToken: string, The value returned by the last `ListNotificationConfigsResponse`; indicates that this is a continuation of a prior `ListNotificationConfigs` call, and that the system should return the next page of data.
  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 listing notification configs.
  "nextPageToken": "A String", # Token to retrieve the next page of results, or empty if there are no more results.
  "notificationConfigs": [ # Notification configs belonging to the requested parent.
    { # Cloud Security Command Center (Cloud SCC) notification configs. A notification config is a Cloud SCC resource that contains the configuration to send notifications for create/update events of findings, assets and etc.
      "description": "A String", # The description of the notification config (max of 1024 characters).
      "name": "A String", # The relative resource name of this notification config. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id}/notificationConfigs/notify_public_bucket", "folders/{folder_id}/notificationConfigs/notify_public_bucket", or "projects/{project_id}/notificationConfigs/notify_public_bucket".
      "pubsubTopic": "A String", # The Pub/Sub topic to send notifications to. Its format is "projects/[project_id]/topics/[topic]".
      "serviceAccount": "A String", # Output only. The service account that needs "pubsub.topics.publish" permission to publish to the Pub/Sub topic.
      "streamingConfig": { # The config for streaming-based notifications, which send each event as soon as it is detected. # The config for triggering streaming-based notifications.
        "filter": "A String", # Expression that defines the filter to apply across create/update events of assets or findings as specified by the event type. The expression is a list of zero or more restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. The fields map to those defined in the corresponding resource. The supported operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes.
      },
    },
  ],
}
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 notification config. The following update fields are allowed: description, pubsub_topic, streaming_config.filter

Args:
  name: string, The relative resource name of this notification config. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id}/notificationConfigs/notify_public_bucket", "folders/{folder_id}/notificationConfigs/notify_public_bucket", or "projects/{project_id}/notificationConfigs/notify_public_bucket". (required)
  body: object, The request body.
    The object takes the form of:

{ # Cloud Security Command Center (Cloud SCC) notification configs. A notification config is a Cloud SCC resource that contains the configuration to send notifications for create/update events of findings, assets and etc.
  "description": "A String", # The description of the notification config (max of 1024 characters).
  "name": "A String", # The relative resource name of this notification config. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id}/notificationConfigs/notify_public_bucket", "folders/{folder_id}/notificationConfigs/notify_public_bucket", or "projects/{project_id}/notificationConfigs/notify_public_bucket".
  "pubsubTopic": "A String", # The Pub/Sub topic to send notifications to. Its format is "projects/[project_id]/topics/[topic]".
  "serviceAccount": "A String", # Output only. The service account that needs "pubsub.topics.publish" permission to publish to the Pub/Sub topic.
  "streamingConfig": { # The config for streaming-based notifications, which send each event as soon as it is detected. # The config for triggering streaming-based notifications.
    "filter": "A String", # Expression that defines the filter to apply across create/update events of assets or findings as specified by the event type. The expression is a list of zero or more restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. The fields map to those defined in the corresponding resource. The supported operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes.
  },
}

  updateMask: string, The FieldMask to use when updating the notification config. If empty all mutable fields will be updated.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Cloud Security Command Center (Cloud SCC) notification configs. A notification config is a Cloud SCC resource that contains the configuration to send notifications for create/update events of findings, assets and etc.
  "description": "A String", # The description of the notification config (max of 1024 characters).
  "name": "A String", # The relative resource name of this notification config. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id}/notificationConfigs/notify_public_bucket", "folders/{folder_id}/notificationConfigs/notify_public_bucket", or "projects/{project_id}/notificationConfigs/notify_public_bucket".
  "pubsubTopic": "A String", # The Pub/Sub topic to send notifications to. Its format is "projects/[project_id]/topics/[topic]".
  "serviceAccount": "A String", # Output only. The service account that needs "pubsub.topics.publish" permission to publish to the Pub/Sub topic.
  "streamingConfig": { # The config for streaming-based notifications, which send each event as soon as it is detected. # The config for triggering streaming-based notifications.
    "filter": "A String", # Expression that defines the filter to apply across create/update events of assets or findings as specified by the event type. The expression is a list of zero or more restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. The fields map to those defined in the corresponding resource. The supported operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes.
  },
}