account_hook.proto
path mgmt/v1alpha1/account_hook.proto
package mgmt.v1alpha1
Messages
AccountHook
Name | Type | Description |
---|---|---|
id | string | The unique identifier of this hook. |
name | string | Name of the hook for display/reference. |
description | string | Description of what this hook does. |
account_id | string | The unique identifier of the account this hook belongs to. |
events | repeated AccountHookEvent | The events that will trigger this hook. |
config | AccountHookConfig | Hook-type specific configuration. |
created_by_user_id | string | The user that created this hook. |
created_at | google.protobuf.Timestamp | The time this hook was created. |
updated_by_user_id | string | The user that last updated this hook. |
updated_at | google.protobuf.Timestamp | The last time this hook was updated. |
enabled | bool | Whether or not the hook is enabled. |
AccountHookConfig
Hook-specific configuration
Name | Type | Description |
---|---|---|
webhook | AccountHookConfig.WebHook | Webhook-based hooks Slack-based hooks SlackHook slack = 2; Future: Discord, Teams, etc. |
AccountHookConfig.WebHook
Webhook-specific configuration
Name | Type | Description |
---|---|---|
url | string | The webhook URL to send the event to. |
secret | string | The secret to use for the webhook. |
disable_ssl_verification | bool | Whether to disable SSL verification for the webhook. |
CreateAccountHookRequest
Name | Type | Description |
---|---|---|
account_id | string | The account ID to create the hook for. |
hook | NewAccountHook | The new account hook configuration. |
CreateAccountHookResponse
Name | Type | Description |
---|---|---|
hook | AccountHook | The newly created account hook. |
DeleteAccountHookRequest
Name | Type | Description |
---|---|---|
id | string | The ID of the hook to delete. |
DeleteAccountHookResponse
Name | Type | Description |
---|---|---|
hook | AccountHook | The deleted account hook. |
GetAccountHookRequest
Name | Type | Description |
---|---|---|
id | string | The ID of the hook to retrieve. |
GetAccountHookResponse
Name | Type | Description |
---|---|---|
hook | AccountHook | The account hook. |
GetAccountHooksRequest
Name | Type | Description |
---|---|---|
account_id | string | The account ID to retrieve hooks for. |
GetAccountHooksResponse
Name | Type | Description |
---|---|---|
hooks | repeated AccountHook | The list of account hooks. |
GetActiveAccountHooksByEventRequest
Name | Type | Description |
---|---|---|
account_id | string | The account ID to retrieve hooks for. |
event | AccountHookEvent | The event to retrieve hooks for. A specific event will return hooks that are listening to that specific event as well as wildcard hooks. If you want to retrieve only wildcard hooks, use ACCOUNT_HOOK_EVENT_UNSPECIFIED. |
GetActiveAccountHooksByEventResponse
Name | Type | Description |
---|---|---|
hooks | repeated AccountHook | The list of active account hooks. |
IsAccountHookNameAvailableRequest
Name | Type | Description |
---|---|---|
account_id | string | The account ID to check the name for. |
name | string | The name to check. |
IsAccountHookNameAvailableResponse
Name | Type | Description |
---|---|---|
is_available | bool | Whether the name is available. |
NewAccountHook
Name | Type | Description |
---|---|---|
name | string | Name of the hook for display/reference. |
description | string | Description of what this hook does. |
events | repeated AccountHookEvent | The events that will trigger this hook. |
config | AccountHookConfig | Hook-type specific configuration. |
enabled | bool | Whether or not the hook is enabled. |
SetAccountHookEnabledRequest
Name | Type | Description |
---|---|---|
id | string | The ID of the hook to enable/disable. |
enabled | bool | Whether to enable or disable the hook. |
SetAccountHookEnabledResponse
Name | Type | Description |
---|---|---|
hook | AccountHook | The updated account hook. |
UpdateAccountHookRequest
Name | Type | Description |
---|---|---|
id | string | The ID of the hook to update. |
name | string | Name of the hook for display/reference. |
description | string | Description of what this hook does. |
events | repeated AccountHookEvent | The events that will trigger this hook. |
config | AccountHookConfig | Hook-type specific configuration. |
enabled | bool | Whether or not the hook is enabled. |
UpdateAccountHookResponse
Name | Type | Description |
---|---|---|
hook | AccountHook | The updated account hook. |
Enums
AccountHookEvent
Enum of all possible events that can trigger an account hook.
Name | Number | Description |
---|---|---|
ACCOUNT_HOOK_EVENT_UNSPECIFIED | 0 | If unspecified, hook will be triggered for all events. |
ACCOUNT_HOOK_EVENT_JOB_RUN_CREATED | 1 | Triggered when a job run is created. |
ACCOUNT_HOOK_EVENT_JOB_RUN_FAILED | 2 | Triggered when a job run fails. |
ACCOUNT_HOOK_EVENT_JOB_RUN_SUCCEEDED | 3 | Triggered when a job run succeeds. |
Services
AccountHookService
GetAccountHooks
Method | GetAccountHooks |
---|---|
Request | GetAccountHooksRequest |
Response | GetAccountHooksResponse |
Description | Retrieves all account hooks. |
GetAccountHook
Method | GetAccountHook |
---|---|
Request | GetAccountHookRequest |
Response | GetAccountHookResponse |
Description | Retrieves a specific account hook. |
CreateAccountHook
Method | CreateAccountHook |
---|---|
Request | CreateAccountHookRequest |
Response | CreateAccountHookResponse |
Description | Creates a new account hook. |
UpdateAccountHook
Method | UpdateAccountHook |
---|---|
Request | UpdateAccountHookRequest |
Response | UpdateAccountHookResponse |
Description | Updates an existing account hook. |
DeleteAccountHook
Method | DeleteAccountHook |
---|---|
Request | DeleteAccountHookRequest |
Response | DeleteAccountHookResponse |
Description | Deletes an account hook. |
IsAccountHookNameAvailable
Method | IsAccountHookNameAvailable |
---|---|
Request | IsAccountHookNameAvailableRequest |
Response | IsAccountHookNameAvailableResponse |
Description | Checks if an account hook name is available. |
SetAccountHookEnabled
Method | SetAccountHookEnabled |
---|---|
Request | SetAccountHookEnabledRequest |
Response | SetAccountHookEnabledResponse |
Description | Enables or disables an account hook. |
GetActiveAccountHooksByEvent
Method | GetActiveAccountHooksByEvent |
---|---|
Request | GetActiveAccountHooksByEventRequest |
Response | GetActiveAccountHooksByEventResponse |
Description | Retrieves all active account hooks for a specific event. |