Reference documentation and code samples for the Google Workspace Events V1 API class Google::Apps::Events::Subscriptions::V1::Subscription.
A subscription to receive events about a Google Workspace resource. To learn more about subscriptions, see the Google Workspace Events API overview.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#authority
def authority() -> ::String
-
(::String) — Output only. The user who authorized the creation of the
subscription.
Format:
users/{user}
For Google Workspace users, the
{user}
value is theuser.id
field from the Directory API.
#create_time
def create_time() -> ::Google::Protobuf::Timestamp
- (::Google::Protobuf::Timestamp) — Output only. The time when the subscription is created.
#etag
def etag() -> ::String
- (::String) — Optional. This checksum is computed by the server based on the value of other fields, and might be sent on update requests to ensure the client has an up-to-date value before proceeding.
#etag=
def etag=(value) -> ::String
- value (::String) — Optional. This checksum is computed by the server based on the value of other fields, and might be sent on update requests to ensure the client has an up-to-date value before proceeding.
- (::String) — Optional. This checksum is computed by the server based on the value of other fields, and might be sent on update requests to ensure the client has an up-to-date value before proceeding.
#event_types
def event_types() -> ::Array<::String>
-
(::Array<::String>) — Required. Immutable. Unordered list. Input for creating a subscription.
Otherwise, output only. One or more types of events to receive about the
target resource. Formatted according to the CloudEvents specification.
The supported event types depend on the target resource of your subscription. For details, see Supported Google Workspace events.
By default, you also receive events about the lifecycle of your subscription. You don't need to specify lifecycle events for this field.
If you specify an event type that doesn't exist for the target resource, the request returns an HTTP
400 Bad Request
status code.
#event_types=
def event_types=(value) -> ::Array<::String>
-
value (::Array<::String>) — Required. Immutable. Unordered list. Input for creating a subscription.
Otherwise, output only. One or more types of events to receive about the
target resource. Formatted according to the CloudEvents specification.
The supported event types depend on the target resource of your subscription. For details, see Supported Google Workspace events.
By default, you also receive events about the lifecycle of your subscription. You don't need to specify lifecycle events for this field.
If you specify an event type that doesn't exist for the target resource, the request returns an HTTP
400 Bad Request
status code.
-
(::Array<::String>) — Required. Immutable. Unordered list. Input for creating a subscription.
Otherwise, output only. One or more types of events to receive about the
target resource. Formatted according to the CloudEvents specification.
The supported event types depend on the target resource of your subscription. For details, see Supported Google Workspace events.
By default, you also receive events about the lifecycle of your subscription. You don't need to specify lifecycle events for this field.
If you specify an event type that doesn't exist for the target resource, the request returns an HTTP
400 Bad Request
status code.
#expire_time
def expire_time() -> ::Google::Protobuf::Timestamp
- (::Google::Protobuf::Timestamp) — Non-empty default. The timestamp in UTC when the subscription expires. Always displayed on output, regardless of what was used on input.
#expire_time=
def expire_time=(value) -> ::Google::Protobuf::Timestamp
- value (::Google::Protobuf::Timestamp) — Non-empty default. The timestamp in UTC when the subscription expires. Always displayed on output, regardless of what was used on input.
- (::Google::Protobuf::Timestamp) — Non-empty default. The timestamp in UTC when the subscription expires. Always displayed on output, regardless of what was used on input.
#name
def name() -> ::String
-
(::String) — Optional. Immutable. Identifier. Resource name of the subscription.
Format:
subscriptions/{subscription}
#name=
def name=(value) -> ::String
-
value (::String) — Optional. Immutable. Identifier. Resource name of the subscription.
Format:
subscriptions/{subscription}
-
(::String) — Optional. Immutable. Identifier. Resource name of the subscription.
Format:
subscriptions/{subscription}
#notification_endpoint
def notification_endpoint() -> ::Google::Apps::Events::Subscriptions::V1::NotificationEndpoint
- (::Google::Apps::Events::Subscriptions::V1::NotificationEndpoint) — Required. Immutable. The endpoint where the subscription delivers events, such as a Pub/Sub topic.
#notification_endpoint=
def notification_endpoint=(value) -> ::Google::Apps::Events::Subscriptions::V1::NotificationEndpoint
- value (::Google::Apps::Events::Subscriptions::V1::NotificationEndpoint) — Required. Immutable. The endpoint where the subscription delivers events, such as a Pub/Sub topic.
- (::Google::Apps::Events::Subscriptions::V1::NotificationEndpoint) — Required. Immutable. The endpoint where the subscription delivers events, such as a Pub/Sub topic.
#payload_options
def payload_options() -> ::Google::Apps::Events::Subscriptions::V1::PayloadOptions
- (::Google::Apps::Events::Subscriptions::V1::PayloadOptions) — Optional. Options about what data to include in the event payload. Only supported for Google Chat events.
#payload_options=
def payload_options=(value) -> ::Google::Apps::Events::Subscriptions::V1::PayloadOptions
- value (::Google::Apps::Events::Subscriptions::V1::PayloadOptions) — Optional. Options about what data to include in the event payload. Only supported for Google Chat events.
- (::Google::Apps::Events::Subscriptions::V1::PayloadOptions) — Optional. Options about what data to include in the event payload. Only supported for Google Chat events.
#reconciling
def reconciling() -> ::Boolean
-
(::Boolean) — Output only. If
true
, the subscription is in the process of being updated.
#state
def state() -> ::Google::Apps::Events::Subscriptions::V1::Subscription::State
- (::Google::Apps::Events::Subscriptions::V1::Subscription::State) — Output only. The state of the subscription. Determines whether the subscription can receive events and deliver them to the notification endpoint.
#suspension_reason
def suspension_reason() -> ::Google::Apps::Events::Subscriptions::V1::Subscription::ErrorType
-
(::Google::Apps::Events::Subscriptions::V1::Subscription::ErrorType) — Output only. The error that suspended the subscription.
To reactivate the subscription, resolve the error and call the
ReactivateSubscription
method.
#target_resource
def target_resource() -> ::String
-
(::String) — Required. Immutable. The Google Workspace resource that's monitored for
events, formatted as the full resource
name. To learn about
target resources and the events that they support, see Supported Google
Workspace
events.
A user can only authorize your app to create one subscription for a given target resource. If your app tries to create another subscription with the same user credentials, the request returns an
ALREADY_EXISTS
error.
#target_resource=
def target_resource=(value) -> ::String
-
value (::String) — Required. Immutable. The Google Workspace resource that's monitored for
events, formatted as the full resource
name. To learn about
target resources and the events that they support, see Supported Google
Workspace
events.
A user can only authorize your app to create one subscription for a given target resource. If your app tries to create another subscription with the same user credentials, the request returns an
ALREADY_EXISTS
error.
-
(::String) — Required. Immutable. The Google Workspace resource that's monitored for
events, formatted as the full resource
name. To learn about
target resources and the events that they support, see Supported Google
Workspace
events.
A user can only authorize your app to create one subscription for a given target resource. If your app tries to create another subscription with the same user credentials, the request returns an
ALREADY_EXISTS
error.
#ttl
def ttl() -> ::Google::Protobuf::Duration
-
(::Google::Protobuf::Duration) — Input only. The time-to-live (TTL) or duration for the subscription. If
unspecified or set to
0
, uses the maximum possible duration.
#ttl=
def ttl=(value) -> ::Google::Protobuf::Duration
-
value (::Google::Protobuf::Duration) — Input only. The time-to-live (TTL) or duration for the subscription. If
unspecified or set to
0
, uses the maximum possible duration.
-
(::Google::Protobuf::Duration) — Input only. The time-to-live (TTL) or duration for the subscription. If
unspecified or set to
0
, uses the maximum possible duration.
#uid
def uid() -> ::String
- (::String) — Output only. System-assigned unique identifier for the subscription.
#update_time
def update_time() -> ::Google::Protobuf::Timestamp
- (::Google::Protobuf::Timestamp) — Output only. The last time that the subscription is updated.