REST Resource: projects.locations.integrations.versions

Resource: IntegrationVersion

The integration version definition.

JSON representation
{
  "name": string,
  "description": string,
  "taskConfigs": [
    {
      object (TaskConfig)
    }
  ],
  "triggerConfigs": [
    {
      object (TriggerConfig)
    }
  ],
  "integrationParameters": [
    {
      object (IntegrationParameter)
    }
  ],
  "state": enum (IntegrationState),
  "snapshotNumber": string,
  "updateTime": string,
  "lockHolder": string,
  "createTime": string,
  "lastModifierEmail": string,
  "parentTemplateId": string,
  "userLabel": string,
  "databasePersistencePolicy": enum (DatabasePersistencePolicy),
  "errorCatcherConfigs": [
    {
      object (ErrorCatcherConfig)
    }
  ],
  "runAsServiceAccount": string,
  "cloudLoggingDetails": {
    object (CloudLoggingDetails)
  },
  "integrationConfigParameters": [
    {
      object (IntegrationConfigParameter)
    }
  ],
  "enableVariableMasking": boolean
}
Fields
name

string

Output only. Auto-generated primary key.

description

string

Optional. The integration description.

taskConfigs[]

object (TaskConfig)

Optional. Task configuration for the integration. It's optional, but the integration doesn't do anything without taskConfigs.

triggerConfigs[]

object (TriggerConfig)

Optional. Trigger configurations.

integrationParameters[]

object (IntegrationParameter)

Optional. Parameters that are expected to be passed to the integration when an event is triggered. This consists of all the parameters that are expected in the integration execution. This gives the user the ability to provide default values, add information like PII and also provide data types of each parameter.

state

enum (IntegrationState)

Output only. User should not set it as an input.

snapshotNumber

string (int64 format)

Optional. An increasing sequence that is set when a new snapshot is created. The last created snapshot can be identified by [workflowName, org_id latest(snapshotNumber)]. However, last created snapshot need not be same as the HEAD. So users should always use "HEAD" tag to identify the head.

updateTime

string (Timestamp format)

Output only. Auto-generated.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

lockHolder

string

Optional. The edit lock holder's email address. Generated based on the End User Credentials/LOAS role of the user making the call.

createTime

string (Timestamp format)

Output only. Auto-generated.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

lastModifierEmail

string

Optional. The last modifier's email address. Generated based on the End User Credentials/LOAS role of the user making the call.

parentTemplateId

string

Optional. The id of the template which was used to create this integrationVersion.

userLabel

string

Optional. A user-defined label that annotates an integration version. Typically, this is only set when the integration version is created.

databasePersistencePolicy

enum (DatabasePersistencePolicy)

Optional. Flag to disable database persistence for execution data, including event execution info, execution export info, execution metadata index and execution param index.

errorCatcherConfigs[]

object (ErrorCatcherConfig)

Optional. Error Catch Task configuration for the integration. It's optional.

runAsServiceAccount

string

Optional. The run-as service account email, if set and auth config is not configured, that will be used to generate auth token to be used in Connector task, Rest caller task and Cloud function task.

cloudLoggingDetails

object (CloudLoggingDetails)

Optional. Cloud Logging details for the integration version

integrationConfigParameters[]

object (IntegrationConfigParameter)

Optional. Config Parameters that are expected to be passed to the integration when an integration is published. This consists of all the parameters that are expected to provide configuration in the integration execution. This gives the user the ability to provide default values, value, add information like connection url, project based configuration value and also provide data types of each parameter.

enableVariableMasking

boolean

Optional. True if variable masking feature should be turned on for this version

TaskConfig

The task configuration details. This is not the implementation of Task. There might be multiple TaskConfigs for the same Task.

JSON representation
{
  "task": string,
  "taskId": string,
  "parameters": {
    string: {
      object (EventParameter)
    },
    ...
  },
  "failurePolicy": {
    object (FailurePolicy)
  },
  "synchronousCallFailurePolicy": {
    object (FailurePolicy)
  },
  "nextTasks": [
    {
      object (NextTask)
    }
  ],
  "nextTasksExecutionPolicy": enum (NextTasksExecutionPolicy),
  "taskExecutionStrategy": enum (TaskExecutionStrategy),
  "displayName": string,
  "successPolicy": {
    object (SuccessPolicy)
  },
  "jsonValidationOption": enum (JsonValidationOption),
  "description": string,
  "taskTemplate": string,
  "errorCatcherId": string,
  "externalTaskType": enum (ExternalTaskType),
  "position": {
    object (Coordinate)
  }
}
Fields
task

string

Optional. The name for the task.

taskId

string

Required. The identifier of this task within its parent event config, specified by the client. This should be unique among all the tasks belong to the same event config. We use this field as the identifier to find next tasks (via field nextTasks.task_id).

parameters

map (key: string, value: object (EventParameter))

Optional. The customized parameters the user can pass to this task.

failurePolicy

object (FailurePolicy)

Optional. Determines the number of times the task will be retried on failure and with what retry strategy. This is applicable for asynchronous calls to Eventbus alone (events.post To Queue, events.schedule etc.).

synchronousCallFailurePolicy

object (FailurePolicy)

Optional. Determines the number of times the task will be retried on failure and with what retry strategy. This is applicable for synchronous calls to Eventbus alone (events.post).

nextTasks[]

object (NextTask)

Optional. The set of tasks that are next in line to be executed as per the execution graph defined for the parent event, specified by eventConfigId. Each of these next tasks are executed only if the condition associated with them evaluates to true.

nextTasksExecutionPolicy

enum (NextTasksExecutionPolicy)

Optional. The policy dictating the execution of the next set of tasks for the current task.

taskExecutionStrategy

enum (TaskExecutionStrategy)

Optional. The policy dictating the execution strategy of this task.

displayName

string

Optional. User-provided label that is attached to this TaskConfig in the UI.

successPolicy

object (SuccessPolicy)

Optional. Determines what action to take upon successful task completion.

jsonValidationOption

enum (JsonValidationOption)

Optional. If set, overrides the option configured in the Task implementation class.

description

string

Optional. User-provided description intended to give additional business context about the task.

taskTemplate

string

Optional. Used to define task-template name if task is of type task-template

errorCatcherId

string

Optional. Optional Error catcher id of the error catch flow which will be executed when execution error happens in the task

externalTaskType

enum (ExternalTaskType)

Optional. External task type of the task

position

object (Coordinate)

Optional. Informs the front-end application where to draw this error catcher config on the UI.

EventParameter

This message is used for processing and persisting (when applicable) key value pair parameters for each event in the event bus. Next available id: 4

JSON representation
{
  "key": string,
  "value": {
    object (ValueType)
  },
  "masked": boolean
}
Fields
key

string

Key is used to retrieve the corresponding parameter value. This should be unique for a given fired event. These parameters must be predefined in the integration definition.

value

object (ValueType)

Values for the defined keys. Each value can either be string, int, double or any proto message.

masked

boolean

True if this parameter should be masked in the logs

FailurePolicy

Policy that defines the task retry logic and failure type. If no FailurePolicy is defined for a task, all its dependent tasks will not be executed (i.e, a retryStrategy of NONE will be applied).

JSON representation
{
  "retryStrategy": enum (RetryStrategy),
  "maxRetries": integer,
  "intervalTime": string
}
Fields
retryStrategy

enum (RetryStrategy)

Defines what happens to the task upon failure.

maxRetries

integer

Required if retryStrategy is FIXED_INTERVAL or LINEAR/EXPONENTIAL_BACKOFF/RESTART_INTEGRATION_WITH_BACKOFF. Defines the number of times the task will be retried if failed.

intervalTime

string (Timestamp format)

Required if retryStrategy is FIXED_INTERVAL or LINEAR/EXPONENTIAL_BACKOFF/RESTART_INTEGRATION_WITH_BACKOFF. Defines the initial interval in seconds for backoff.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

RetryStrategy

The behavior when the taks failed.

Enums
RETRY_STRATEGY_UNSPECIFIED UNSPECIFIED.
IGNORE Ignores the failure of this task. The rest of the integration will be executed Assuming this task succeeded.
NONE Causes a permanent failure of the task. However, if the last task(s) of event was successfully completed despite the failure of this task, it has no impact on the integration.
FATAL Causes a permanent failure of the event. It is different from NONE because this will mark the event as FAILED by shutting down the event execution.
FIXED_INTERVAL The task will be retried from the failed task onwards after a fixed delay. A max-retry count is required to be specified with this strategy. A jitter is added to each exponential interval so that concurrently failing tasks of the same type do not end up retrying after the exact same exponential interval. maxRetries and intervalInSeconds must be specified.
LINEAR_BACKOFF The task will be retried from the failed task onwards after a fixed delay that linearly increases with each retry attempt. A jitter is added to each exponential interval so that concurrently failing tasks of the same type do not end up retrying after the exact same exponential interval. A max-retry count is required to be specified with this strategy. maxRetries and intervalInSeconds must be specified.
EXPONENTIAL_BACKOFF The task will be retried after an exponentially increasing period of time with each failure. A jitter is added to each exponential interval so that concurrently failing tasks of the same type do not end up retrying after the exact same exponential interval. A max-retry count is required to be specified with this strategy. maxRetries and intervalInSeconds must be specified.
RESTART_INTEGRATION_WITH_BACKOFF The entire integration will be restarted with the initial parameters that were set when the event was fired. A max-retry count is required to be specified with this strategy. maxRetries and intervalInSeconds must be specified.

NextTask

The task that is next in line to be executed, if the condition specified evaluated to true.

JSON representation
{
  "taskConfigId": string,
  "taskId": string,
  "condition": string,
  "displayName": string,
  "description": string
}
Fields
taskConfigId

string

ID of the next task.

taskId

string

Task number of the next task.

condition

string

Standard filter expression for this task to become an eligible next task.

displayName

string

User-provided label that is attached to this edge in the UI.

description

string

User-provided description intended to give additional business context about the task.

NextTasksExecutionPolicy

Various policies for executing the next set of tasks.

Enums
NEXT_TASKS_EXECUTION_POLICY_UNSPECIFIED Default.
RUN_ALL_MATCH Execute all the tasks that satisfy their associated condition.
RUN_FIRST_MATCH Execute the first task that satisfies the associated condition.

TaskExecutionStrategy

Various policies to trigger the execution of this task.

Enums
TASK_EXECUTION_STRATEGY_UNSPECIFIED Default. If the strategy is not set explicitly, it will default to WHEN_ALL_SUCCEED.
WHEN_ALL_SUCCEED Wait until all of its previous tasks finished execution, then verify at least one of the edge conditions is met, and execute if possible. This should be considered as WHEN_ALL_TASKS_SUCCEED.
WHEN_ANY_SUCCEED Start execution as long as any of its previous tasks finished execution and the corresponding edge condition is met (since we will execute if only that succeeding edge condition is met).
WHEN_ALL_TASKS_AND_CONDITIONS_SUCCEED Wait until all of its previous tasks finished execution, then verify the all edge conditions are met and execute if possible.

SuccessPolicy

Policy that dictates the behavior for the task after it completes successfully.

JSON representation
{
  "finalState": enum (FinalState)
}
Fields
finalState

enum (FinalState)

State to which the execution snapshot status will be set if the task succeeds.

FinalState

The state of execution.

Enums
FINAL_STATE_UNSPECIFIED UNSPECIFIED.
SUCCEEDED The default behavior, where successful tasks will be marked as SUCCEEDED.
SUSPENDED Sets the state to SUSPENDED after executing. This is required for SuspensionTask; event execution will continue once the user calls ResolveSuspensions with the eventExecutionInfoId and the task number.

JsonValidationOption

Options for how to validate json schemas.

Enums
JSON_VALIDATION_OPTION_UNSPECIFIED As per the default behavior, no validation will be run. Will not override any option set in a Task.
SKIP Do not run any validation against JSON schemas.
PRE_EXECUTION Validate all potential input JSON parameters against schemas specified in IntegrationParameter.
POST_EXECUTION Validate all potential output JSON parameters against schemas specified in IntegrationParameter.
PRE_POST_EXECUTION Perform both PRE_EXECUTION and POST_EXECUTION validations.

ExternalTaskType

Defines the type of the task for external customer

Enums
EXTERNAL_TASK_TYPE_UNSPECIFIED Default value. External task type is not specified
NORMAL_TASK Tasks belongs to the normal task flows
ERROR_TASK Task belongs to the error catch task flows

Coordinate

Configuration detail of coordinate, it used for UI

JSON representation
{
  "x": integer,
  "y": integer
}
Fields
x

integer

Required. X axis of the coordinate

y

integer

Required. Y axis of the coordinate

TriggerConfig

Configuration detail of a trigger.

JSON representation
{
  "label": string,
  "startTasks": [
    {
      object (NextTask)
    }
  ],
  "properties": {
    string: string,
    ...
  },
  "triggerType": enum (TriggerType),
  "triggerNumber": string,
  "nextTasksExecutionPolicy": enum (NextTasksExecutionPolicy),
  "triggerId": string,
  "description": string,
  "cloudSchedulerConfig": {
    object (CloudSchedulerConfig)
  },
  "errorCatcherId": string,
  "position": {
    object (Coordinate)
  },
  "trigger": string
}
Fields
label

string

Optional. The user created label for a particular trigger.

startTasks[]

object (NextTask)

Optional. Set of tasks numbers from where the integration execution is started by this trigger. If this is empty, then integration is executed with default start tasks. In the list of start tasks, none of two tasks can have direct ancestor-descendant relationships (i.e. in a same integration execution graph).

properties

map (key: string, value: string)

Optional. Configurable properties of the trigger, not to be confused with integration parameters. E.g. "name" is a property for API triggers and "subscription" is a property for Pub/sub triggers.

triggerType

enum (TriggerType)

Optional. type of trigger

triggerNumber

string

Required. A number to uniquely identify each trigger config within the integration on UI.

nextTasksExecutionPolicy

enum (NextTasksExecutionPolicy)

Optional. Dictates how next tasks will be executed.

triggerId

string

Optional. Auto-generated trigger ID. The ID is based on the properties that you define in the trigger config. For example, for an API trigger, the trigger ID follows the format:

api_trigger/TRIGGER_NAME

Where trigger config has properties with value {"Trigger name": TRIGGER_NAME}

description

string

Optional. User-provided description intended to give additional business context about the task.

cloudSchedulerConfig

object (CloudSchedulerConfig)

Optional. Cloud Scheduler Trigger related metadata

errorCatcherId

string

Optional. Optional Error catcher id of the error catch flow which will be executed when execution error happens in the task

position

object (Coordinate)

Optional. Informs the front-end application where to draw this error catcher config on the UI.

trigger

string

Optional. name of the trigger. Example: "API Trigger", "Cloud Pub Sub Trigger" When set will be sent out to monitoring dashabord for tracking purpose.

TriggerType

Types of triggers.

Enums
TRIGGER_TYPE_UNSPECIFIED Unknown.
CRON Trigger by scheduled time.
API Trigger by API call.
SFDC_CHANNEL Trigger by Salesforce Channel.
CLOUD_PUBSUB_EXTERNAL Trigger by Pub/Sub external.
SFDC_CDC_CHANNEL SFDC Channel Trigger for CDC.
CLOUD_SCHEDULER Trigger by Cloud Scheduler job.
INTEGRATION_CONNECTOR_TRIGGER Trigger by Connector Event
PRIVATE_TRIGGER Trigger for private workflow

CloudSchedulerConfig

Cloud Scheduler Trigger configuration

JSON representation
{
  "serviceAccountEmail": string,
  "cronTab": string,
  "location": string,
  "errorMessage": string
}
Fields
serviceAccountEmail

string

Required. Service account used by Cloud Scheduler to trigger the integration at scheduled time

cronTab

string

Required. The cron tab of cloud scheduler trigger.

location

string

Required. The location where associated cloud scheduler job will be created

errorMessage

string

Optional. When the job was deleted from Pantheon UI, errorMessage will be populated when Get/List integrations

IntegrationParameter

Integration Parameter is defined in the integration config and are used to provide information about data types of the expected parameters and provide any default values if needed. They can also be used to add custom attributes. These are static in nature and should not be used for dynamic event definition.

JSON representation
{
  "key": string,
  "dataType": enum (IntegrationParameterDataType),
  "defaultValue": {
    object (ValueType)
  },
  "searchable": boolean,
  "displayName": string,
  "inputOutputType": enum (InOutType),
  "isTransient": boolean,
  "producer": string,
  "jsonSchema": string,
  "containsLargeData": boolean,
  "masked": boolean
}
Fields
key

string

Key is used to retrieve the corresponding parameter value. This should be unique for a given fired event. These parameters must be predefined in the integration definition.

dataType

enum (IntegrationParameterDataType)

type of the parameter.

defaultValue

object (ValueType)

Default values for the defined keys. Each value can either be string, int, double or any proto message or a serialized object.

searchable

boolean

Searchable in the execution log or not.

displayName

string

The name (without prefix) to be displayed in the UI for this parameter. E.g. if the key is "foo.bar.myName", then the name would be "myName".

inputOutputType

enum (InOutType)

Specifies the input/output type for the parameter.

isTransient

boolean

Whether this parameter is a transient parameter.

producer

string

The identifier of the node (TaskConfig/TriggerConfig) this parameter was produced by, if it is a transient param or a copy of an input param.

jsonSchema

string

This schema will be used to validate runtime JSON-typed values of this parameter.

containsLargeData

boolean

Indicates whether this variable contains large data and need to be uploaded to Cloud Storage.

masked

boolean

True if this parameter should be masked in the logs

InOutType

Is the parameter input, output of a integration.

Enums
IN_OUT_TYPE_UNSPECIFIED Default.
IN Input parameters for the integration. EventBus validates that these parameters exist in the integrations before execution.
OUT Output Parameters for the integration. EventBus will only return the integration parameters tagged with OUT in the response back.
IN_OUT Input and Output Parameters. These can be used as both input and output. EventBus will validate for the existence of these parameters before execution and will also return this parameter back in the response.

DatabasePersistencePolicy

Flag to disable database persistence for execution data, including event execution info, execution export info, execution metadata index and execution param index.

Enums
DATABASE_PERSISTENCE_POLICY_UNSPECIFIED Enables persistence for all execution data.
DATABASE_PERSISTENCE_DISABLED Disables persistence for all execution data.
DATABASE_PERSISTENCE_ASYNC Asynchronously persist all execution data.

ErrorCatcherConfig

Configuration detail of a error catch task

JSON representation
{
  "errorCatcherId": string,
  "label": string,
  "errorCatcherNumber": string,
  "startErrorTasks": [
    {
      object (NextTask)
    }
  ],
  "description": string,
  "position": {
    object (Coordinate)
  }
}
Fields
errorCatcherId

string

Required. An error catcher id is string representation for the error catcher config. Within a workflow, errorCatcherId uniquely identifies an error catcher config among all error catcher configs for the workflow

label

string

Optional. The user created label for a particular error catcher. Optional.

errorCatcherNumber

string

Required. A number to uniquely identify each error catcher config within the workflow on UI.

startErrorTasks[]

object (NextTask)

Required. The set of start tasks that are to be executed for the error catch flow

description

string

Optional. User-provided description intended to give more business context about the error catcher config.

position

object (Coordinate)

Optional. Informs the front-end application where to draw this error catcher config on the UI.

IntegrationConfigParameter

Integration Config Parameter is defined in the integration config and are used to provide external configuration for integration. It provide information about data types of the expected parameters and provide any default values or value. They can also be used to add custom attributes.

JSON representation
{
  "parameter": {
    object (IntegrationParameter)
  },
  "value": {
    object (ValueType)
  }
}
Fields
parameter

object (IntegrationParameter)

Optional. Integration Parameter to provide the default value, data type and attributes required for the Integration config variables.

value

object (ValueType)

Values for the defined keys. Each value can either be string, int, double or any proto message or a serialized object.

Methods

create

Create a integration with a draft version in the specified project.

delete

Soft-deletes the integration.

download

Downloads an integration.

downloadJsonPackage

Downloads an Integration version package like IntegrationVersion,Integration Config etc.

get

Get a integration in the specified project.

list

Returns the list of all integration versions in the specified project.

patch

Update a integration with a draft version in the specified project.

publish

This RPC throws an exception if the integration is in ARCHIVED or ACTIVE state.

unpublish

Sets the status of the ACTIVE integration to SNAPSHOT with a new tag "PREVIOUSLY_PUBLISHED" after validating it.

upload

Uploads an integration.