create(parent, body=None, configId=None, x__xgafv=None)
Creates a notification config.
Deletes a notification config.
Gets a notification config.
list(parent, pageToken=None, pageSize=None, x__xgafv=None)
Lists notification configs.
list_next(previous_request, previous_response)
Retrieves the next page of results.
patch(name, body=None, updateMask=None, x__xgafv=None)
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]". (required)
body: object, The request body.
The object takes the form of:
{ # Security Command Center notification configs.
#
# A notification config is a Security Command Center 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).
"streamingConfig": { # The config for streaming-based notifications, which send each event as soon # The config for triggering streaming-based notifications.
# as it is detected.
"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 `<field> <operator> <value>` 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.
},
"eventType": "A String", # The type of events the config is for, e.g. FINDING.
"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".
"serviceAccount": "A String", # Output only. The service account that needs "pubsub.topics.publish"
# permission to publish to the Pub/Sub topic.
"pubsubTopic": "A String", # The Pub/Sub topic to send notifications to. Its format is
# "projects/[project_id]/topics/[topic]".
}
configId: string, Required.
Unique identifier provided by the client within the parent scope.
It must be between 1 and 128 characters, and contains 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:
{ # Security Command Center notification configs.
#
# A notification config is a Security Command Center 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).
"streamingConfig": { # The config for streaming-based notifications, which send each event as soon # The config for triggering streaming-based notifications.
# as it is detected.
"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 `<field> <operator> <value>` 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.
},
"eventType": "A String", # The type of events the config is for, e.g. FINDING.
"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".
"serviceAccount": "A String", # Output only. The service account that needs "pubsub.topics.publish"
# permission to publish to the Pub/Sub topic.
"pubsubTopic": "A String", # The Pub/Sub topic to send notifications to. Its format is
# "projects/[project_id]/topics/[topic]".
}
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]". (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);
# }
#
# The JSON representation for `Empty` is empty JSON object `{}`.
}
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]". (required)
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Security Command Center notification configs.
#
# A notification config is a Security Command Center 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).
"streamingConfig": { # The config for streaming-based notifications, which send each event as soon # The config for triggering streaming-based notifications.
# as it is detected.
"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 `<field> <operator> <value>` 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.
},
"eventType": "A String", # The type of events the config is for, e.g. FINDING.
"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".
"serviceAccount": "A String", # Output only. The service account that needs "pubsub.topics.publish"
# permission to publish to the Pub/Sub topic.
"pubsubTopic": "A String", # The Pub/Sub topic to send notifications to. Its format is
# "projects/[project_id]/topics/[topic]".
}
list(parent, pageToken=None, pageSize=None, x__xgafv=None)
Lists notification configs.
Args:
parent: string, Required. Name of the organization to list notification configs.
Its format is "organizations/[organization_id]". (required)
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.
pageSize: integer, The maximum number of results to return in a single response. Default is
10, minimum is 1, maximum is 1000.
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.
{ # Security Command Center notification configs.
#
# A notification config is a Security Command Center 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).
"streamingConfig": { # The config for streaming-based notifications, which send each event as soon # The config for triggering streaming-based notifications.
# as it is detected.
"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 `<field> <operator> <value>` 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.
},
"eventType": "A String", # The type of events the config is for, e.g. FINDING.
"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".
"serviceAccount": "A String", # Output only. The service account that needs "pubsub.topics.publish"
# permission to publish to the Pub/Sub topic.
"pubsubTopic": "A String", # The Pub/Sub topic to send notifications to. Its format is
# "projects/[project_id]/topics/[topic]".
},
],
}
list_next(previous_request, previous_response)
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.
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". (required)
body: object, The request body.
The object takes the form of:
{ # Security Command Center notification configs.
#
# A notification config is a Security Command Center 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).
"streamingConfig": { # The config for streaming-based notifications, which send each event as soon # The config for triggering streaming-based notifications.
# as it is detected.
"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 `<field> <operator> <value>` 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.
},
"eventType": "A String", # The type of events the config is for, e.g. FINDING.
"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".
"serviceAccount": "A String", # Output only. The service account that needs "pubsub.topics.publish"
# permission to publish to the Pub/Sub topic.
"pubsubTopic": "A String", # The Pub/Sub topic to send notifications to. Its format is
# "projects/[project_id]/topics/[topic]".
}
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:
{ # Security Command Center notification configs.
#
# A notification config is a Security Command Center 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).
"streamingConfig": { # The config for streaming-based notifications, which send each event as soon # The config for triggering streaming-based notifications.
# as it is detected.
"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 `<field> <operator> <value>` 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.
},
"eventType": "A String", # The type of events the config is for, e.g. FINDING.
"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".
"serviceAccount": "A String", # Output only. The service account that needs "pubsub.topics.publish"
# permission to publish to the Pub/Sub topic.
"pubsubTopic": "A String", # The Pub/Sub topic to send notifications to. Its format is
# "projects/[project_id]/topics/[topic]".
}