Skip to content

Commit 4a62a4c

Browse files
feat: [eventarc] add wide-scope Eventarc GoogleApiSource flags (#6909)
* feat: add wide-scope Eventarc GoogleApiSource flags feat: add Eventarc Trigger RetryPolicy PiperOrigin-RevId: 836781847 Source-Link: googleapis/googleapis@c9ff4f1 Source-Link: googleapis/googleapis-gen@c146ad3 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWV2ZW50YXJjLy5Pd2xCb3QueWFtbCIsImgiOiJjMTQ2YWQzZGI5MTEyMjYwM2YxNTMwYjY5ZTdmZDk3M2MxODc3NTA5In0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent cad552e commit 4a62a4c

File tree

5 files changed

+1177
-0
lines changed

5 files changed

+1177
-0
lines changed

packages/google-cloud-eventarc/protos/google/cloud/eventarc/v1/google_api_source.proto

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,23 @@ message GoogleApiSource {
3939
singular: "googleApiSource"
4040
};
4141

42+
// Config to enable subscribing to all events from a list of projects.
43+
message ProjectSubscriptions {
44+
// Required. A list of projects to receive events from.
45+
//
46+
// All the projects must be in the same org. The listed projects should have
47+
// the format project/{identifier} where identifier can be either the
48+
// project id for project number. A single list may contain both formats. At
49+
// most 100 projects can be listed.
50+
repeated string list = 1 [(google.api.field_behavior) = REQUIRED];
51+
}
52+
53+
// Config to enabled subscribing to events from other projects in the org.
54+
message OrganizationSubscription {
55+
// Required. Enable org level subscription.
56+
bool enabled = 1 [(google.api.field_behavior) = REQUIRED];
57+
}
58+
4259
// Identifier. Resource name of the form
4360
// projects/{project}/locations/{location}/googleApiSources/{google_api_source}
4461
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
@@ -98,4 +115,22 @@ message GoogleApiSource {
98115

99116
// Optional. Config to control Platform logging for the GoogleApiSource.
100117
LoggingConfig logging_config = 11 [(google.api.field_behavior) = OPTIONAL];
118+
119+
// Config to enabled subscribing to events from other projects in the org.
120+
//
121+
// Users need the eventarc.googleApiSource.create permission on the entire org
122+
// in order to create a resource with these settings.
123+
oneof wide_scope_subscription {
124+
// Optional. Config to enable subscribing to events from all projects in the
125+
// GoogleApiSource's org.
126+
OrganizationSubscription organization_subscription = 12
127+
[(google.api.field_behavior) = OPTIONAL];
128+
129+
// Optional. Config to enable subscribing to all events from a list of
130+
// projects.
131+
//
132+
// All the projects must be in the same org as the GoogleApiSource.
133+
ProjectSubscriptions project_subscriptions = 13
134+
[(google.api.field_behavior) = OPTIONAL];
135+
}
101136
}

packages/google-cloud-eventarc/protos/google/cloud/eventarc/v1/trigger.proto

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,15 @@ message Trigger {
6060
singular: "trigger"
6161
};
6262

63+
// The retry policy configuration for the Trigger.
64+
//
65+
// Can only be set with Cloud Run destinations.
66+
message RetryPolicy {
67+
// Optional. The maximum number of delivery attempts for any message. The
68+
// only valid value is 1.
69+
int32 max_attempts = 1 [(google.api.field_behavior) = OPTIONAL];
70+
}
71+
6372
// Required. The resource name of the trigger. Must be unique within the
6473
// location of the project and must be in
6574
// `projects/{project}/locations/{location}/triggers/{trigger}` format.
@@ -132,6 +141,12 @@ message Trigger {
132141
// physical zone separation
133142
bool satisfies_pzs = 19 [(google.api.field_behavior) = OUTPUT_ONLY];
134143

144+
// Optional. The retry policy to use in the Trigger.
145+
//
146+
// If unset, event delivery will be retried for up to 24 hours by default:
147+
// https://cloud.google.com/eventarc/docs/retry-events
148+
RetryPolicy retry_policy = 20 [(google.api.field_behavior) = OPTIONAL];
149+
135150
// Output only. This checksum is computed by the server based on the value of
136151
// other fields, and might be sent only on create requests to ensure that the
137152
// client has an up-to-date value before proceeding.

0 commit comments

Comments
 (0)