|
57 | 57 | "ExpirationPolicy", |
58 | 58 | "PushConfig", |
59 | 59 | "BigQueryConfig", |
| 60 | + "BigtableConfig", |
60 | 61 | "CloudStorageConfig", |
61 | 62 | "ReceivedMessage", |
62 | 63 | "GetSubscriptionRequest", |
@@ -2010,6 +2011,10 @@ class Subscription(proto.Message): |
2010 | 2011 | Optional. If delivery to Google Cloud Storage |
2011 | 2012 | is used with this subscription, this field is |
2012 | 2013 | used to configure it. |
| 2014 | + bigtable_config (google.pubsub_v1.types.BigtableConfig): |
| 2015 | + Optional. If delivery to Bigtable is used |
| 2016 | + with this subscription, this field is used to |
| 2017 | + configure it. |
2013 | 2018 | ack_deadline_seconds (int): |
2014 | 2019 | Optional. The approximate amount of time (on a best-effort |
2015 | 2020 | basis) Pub/Sub waits for the subscriber to acknowledge |
@@ -2224,6 +2229,11 @@ class AnalyticsHubSubscriptionInfo(proto.Message): |
2224 | 2229 | number=22, |
2225 | 2230 | message="CloudStorageConfig", |
2226 | 2231 | ) |
| 2232 | + bigtable_config: "BigtableConfig" = proto.Field( |
| 2233 | + proto.MESSAGE, |
| 2234 | + number=27, |
| 2235 | + message="BigtableConfig", |
| 2236 | + ) |
2227 | 2237 | ack_deadline_seconds: int = proto.Field( |
2228 | 2238 | proto.INT32, |
2229 | 2239 | number=5, |
@@ -2674,6 +2684,123 @@ class State(proto.Enum): |
2674 | 2684 | ) |
2675 | 2685 |
|
2676 | 2686 |
|
| 2687 | +class BigtableConfig(proto.Message): |
| 2688 | + r"""Configuration for a Bigtable subscription. The Pub/Sub |
| 2689 | + message will be written to a Bigtable row as follows: |
| 2690 | +
|
| 2691 | + - row key: subscription name and message ID delimited by #. |
| 2692 | + - columns: message bytes written to a single column family |
| 2693 | + "data" with an empty-string column qualifier. |
| 2694 | + - cell timestamp: the message publish timestamp. |
| 2695 | +
|
| 2696 | + Attributes: |
| 2697 | + table (str): |
| 2698 | + Optional. The unique name of the table to write messages to. |
| 2699 | +
|
| 2700 | + Values are of the form |
| 2701 | + ``projects/<project>/instances/<instance>/tables/<table>``. |
| 2702 | + app_profile_id (str): |
| 2703 | + Optional. The app profile to use for the |
| 2704 | + Bigtable writes. If not specified, the "default" |
| 2705 | + application profile will be used. The app |
| 2706 | + profile must use single-cluster routing. |
| 2707 | + service_account_email (str): |
| 2708 | + Optional. The service account to use to write to Bigtable. |
| 2709 | + The subscription creator or updater that specifies this |
| 2710 | + field must have ``iam.serviceAccounts.actAs`` permission on |
| 2711 | + the service account. If not specified, the Pub/Sub `service |
| 2712 | + agent <https://cloud.google.com/iam/docs/service-agents>`__, |
| 2713 | + service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, |
| 2714 | + is used. |
| 2715 | + write_metadata (bool): |
| 2716 | + Optional. When true, write the subscription name, |
| 2717 | + message_id, publish_time, attributes, and ordering_key to |
| 2718 | + additional columns in the table under the pubsub_metadata |
| 2719 | + column family. The subscription name, message_id, and |
| 2720 | + publish_time fields are put in their own columns while all |
| 2721 | + other message properties (other than data) are written to a |
| 2722 | + JSON object in the attributes column. |
| 2723 | + state (google.pubsub_v1.types.BigtableConfig.State): |
| 2724 | + Output only. An output-only field that |
| 2725 | + indicates whether or not the subscription can |
| 2726 | + receive messages. |
| 2727 | + """ |
| 2728 | + |
| 2729 | + class State(proto.Enum): |
| 2730 | + r"""Possible states for a Bigtable subscription. |
| 2731 | + Note: more states could be added in the future. Please code |
| 2732 | + accordingly. |
| 2733 | +
|
| 2734 | + Values: |
| 2735 | + STATE_UNSPECIFIED (0): |
| 2736 | + Default value. This value is unused. |
| 2737 | + ACTIVE (1): |
| 2738 | + The subscription can actively send messages |
| 2739 | + to Bigtable. |
| 2740 | + NOT_FOUND (2): |
| 2741 | + Cannot write to Bigtable because the |
| 2742 | + instance, table, or app profile does not exist. |
| 2743 | + APP_PROFILE_MISCONFIGURED (3): |
| 2744 | + Cannot write to Bigtable because the app |
| 2745 | + profile is not configured for single-cluster |
| 2746 | + routing. |
| 2747 | + PERMISSION_DENIED (4): |
| 2748 | + Cannot write to Bigtable because of permission denied |
| 2749 | + errors. This can happen if: |
| 2750 | +
|
| 2751 | + - The Pub/Sub service agent has not been granted the |
| 2752 | + `appropriate Bigtable IAM permission |
| 2753 | + bigtable.tables.mutateRows <{$universe.dns_names.final_documentation_domain}/bigtable/docs/access-control#permissions>`__ |
| 2754 | + - The bigtable.googleapis.com API is not enabled for the |
| 2755 | + project |
| 2756 | + (`instructions <{$universe.dns_names.final_documentation_domain}/service-usage/docs/enable-disable>`__) |
| 2757 | + SCHEMA_MISMATCH (5): |
| 2758 | + Cannot write to Bigtable because of a missing |
| 2759 | + column family ("data") or if there is no |
| 2760 | + structured row key for the subscription name + |
| 2761 | + message ID. |
| 2762 | + IN_TRANSIT_LOCATION_RESTRICTION (6): |
| 2763 | + Cannot write to the destination because enforce_in_transit |
| 2764 | + is set to true and the destination locations are not in the |
| 2765 | + allowed regions. |
| 2766 | + VERTEX_AI_LOCATION_RESTRICTION (7): |
| 2767 | + Cannot write to Bigtable because the table is not in the |
| 2768 | + same location as where Vertex AI models used in |
| 2769 | + ``message_transform``\ s are deployed. |
| 2770 | + """ |
| 2771 | + |
| 2772 | + STATE_UNSPECIFIED = 0 |
| 2773 | + ACTIVE = 1 |
| 2774 | + NOT_FOUND = 2 |
| 2775 | + APP_PROFILE_MISCONFIGURED = 3 |
| 2776 | + PERMISSION_DENIED = 4 |
| 2777 | + SCHEMA_MISMATCH = 5 |
| 2778 | + IN_TRANSIT_LOCATION_RESTRICTION = 6 |
| 2779 | + VERTEX_AI_LOCATION_RESTRICTION = 7 |
| 2780 | + |
| 2781 | + table: str = proto.Field( |
| 2782 | + proto.STRING, |
| 2783 | + number=1, |
| 2784 | + ) |
| 2785 | + app_profile_id: str = proto.Field( |
| 2786 | + proto.STRING, |
| 2787 | + number=2, |
| 2788 | + ) |
| 2789 | + service_account_email: str = proto.Field( |
| 2790 | + proto.STRING, |
| 2791 | + number=3, |
| 2792 | + ) |
| 2793 | + write_metadata: bool = proto.Field( |
| 2794 | + proto.BOOL, |
| 2795 | + number=5, |
| 2796 | + ) |
| 2797 | + state: State = proto.Field( |
| 2798 | + proto.ENUM, |
| 2799 | + number=4, |
| 2800 | + enum=State, |
| 2801 | + ) |
| 2802 | + |
| 2803 | + |
2677 | 2804 | class CloudStorageConfig(proto.Message): |
2678 | 2805 | r"""Configuration for a Cloud Storage subscription. |
2679 | 2806 |
|
|
0 commit comments