Skip to content

API Reference

Charles d'Avernas edited this page Jul 28, 2023 · 5 revisions

Resources

Gateway

Name Type Required Description
metadata ResourceMetadata yes Describes the gateway.
spec GatewaySpec yes The desired state of the gateway.
status GatewayStatus no The actual status of the gateway.

Spec

Name Type Required Description
authorization CloudEventAuthorizationPolicy no The authorization policy that applies to cloud events of any source.
validation CloudEventValidationPolicy no The validation policy that applies to cloud events of any source.
sources CloudEventSourceDefinition[] no The configuration that applies to specific cloud event sources.
events CloudEventIngestionConfiguration[] no A list containing event-specific ingestion configurations.
service ServiceConfiguration no An object used to configure the gateway service, if any.

Status

Name Type Required Description
healthStatus string no The gateway's health status.
lastHealthCheckAt dateTimeOffset no The date and time at which the last gateway health check has been performed.

Models

Resource Metadata

Name Type Required Description
name string yes The described resource's name.
Must start, end and be composed exlusively of a maximum of 63 alphanumeric characters, with the exception of -, _ and .
namespace string no The namespace the described resource belongs to.
Required in case the described resource has Namespaced scope, otherwise ignored.
labels object no A key/value mappings of the described resource's labels, if any.
Label keys and values must follow the DNS label standard as defined in RFC1123.
Label values must start, end and be composed exlusively of a maximum of 63 alphanumeric characters, with the exception of -, _ and .
annotations object no A key/value mappings of the described resource's annotations, if any.
creationTimestamp dateTimeOffset no The date and time at which the described resource has been created.
generation ulong no A value that represents the amount of revisions of the described resource's desired state (spec).
resourceVersion string no A value that represents the version of the resource. Changes everytime any aspect of the described resource changes (including status).

Cloud Event Authorization Policy

Name Type Required Description
decisionStrategy string yes The strategy to use when deciding whether or not the authorization policy applies.
Supported values are:
consensus: a majority of rules should apply for the decision to be taken
minority: at least one rule should apply for the decision to be taken
unanimous: all rules should apply for the decision to be taken
rules CloudEventAuthorizationRule[] yes A list containing the rules the policy is made out of.

Cloud Event Authorization Rule

Name Type Required Description
type string yes The rule's type.
Supported values are:
attribute: checks on cloud event context attributes
payload: a policy that performs checks on cloud event payloads
timeOfDay: a policy that grants or refuses accesss based on the time of day
temporary: a policy that grants or refuses access over a given period of time
effect string yes The rule's effect.
Supported values are:
authorize: grant authorization when rule applies
forbid: forbid authorization when rule applies
from DateTimeOffset depends The date and time the policy applies from.
When type is set to timeOfDay, represents the time of the day starting from which the policy applies. The date component is ignored.
When type is set to temporary, represents the date and time starting from which the policy applies.
to DateTimeOffset depends The date and time the policy applies until.
When type is set to timeOfDay, represents the time of the day until which the policy applies. The date component is ignored.
When type is set to temporary, represents the date and time until which the policy applies.
attributeName string depends The name of the required attribute.
Required when type is set to attribute, otherwise ignored.
attributeValue string depends The value of the required attribute. Supports regular expressions.
Required when type is set to attribute, otherwise ignored.
maxSize long depends The maximum size of incoming cloud events.
Required when type is set to payload, otherwise ignored.

Cloud Event Validation Policy

Name Type Required Description
skip boolean no A boolean indicating whether or not to skip cloud event validation.
validationStrategy string yes The strategy to use when validating inbound cloud events.
Supported values are:
none: no validation is performed
warn: validation is performed but errors are treated as warnings
fail: validation fails on errors
dataSchema DataSchemaValidationPolicy no An object used to configure the JSON schema based validation of incoming cloud events.

Data Schema Validation Policy

Name Type Required Description
required boolean no A boolean indicating whether or not inbound cloud events should define a valid data schema.
Defaults to true.
autoGenerate boolean no A boolean indicating whether or not schemas for unknown inbound cloud events for be automatically generated and registered in the application's schema registry.

Cloud Event Source Definition

Name Type Required Description
uri uri yes The uri of the cloud event source to configure.
authorization CloudEventAuthorizationPolicy no The policy to use to authorize cloud events produced by the source.
validation CloudEventValidationPolicy no The validation policy that applies to cloud events produced by the source.

Cloud Event Ingestion Configuration

Name Type Required Description
source string yes The source (context attribute) of cloud events to configure the ingestion of.
Supports regular expressions.
type string yes The type (context attribute) of cloud events to configure the ingestion of.
Supports regular expressions.
metadata CloudEventMetadataResolutionConfiguration no An object used to configure the way the metadata of ingested cloud events should be resolved.

Cloud Event Metadata Resolution Configuration

Name Type Required Description
properties CloudEventMetadataPropertyResolver[] no A list containing the configuration of the resolution of a cloud event's metadata properties.

Cloud Event Metadata Property Resolver

Name Type Required Description
name string yes The name of the cloud event metadata property to resolve.
Metadata properties used to partition events:
$correlationId: an identifier used to correlate events. Typically references the aggregate that has produced the event.
$causationId: a value used to identify the causation of a given event. Typically references the cause of an event produced by a given aggregate.
strategy string yes The strategy to use to resolve the cloud event's metadata property.
Supported values are:
attribute: the metadata property is extracted from a context attribute
expression: the metadata property is extracted by evaluating a runtime expression against the event
attribute CloudEventAttributeFilter depends An object used to configure the cloud event context attribute to extract the metadata property from.
Required if strategy has been set to attribute.
expression string depends A runtime expression used to resolve the cloud event metadata property.
Required if strategy has been set to expression.

Cloud Event Attribute Filter

Name Type Required Description
name string yes The name of the cloud event context attribute to filter.
value string no The value of the cloud event context attribute to filter.
Not setting any value configures the filter to only check if cloud events defined the attribute, no matter its value.

Service Configuration

Name Type Required Description
uri uri yes The base uri of the configured service.
healthChecks ServiceHealthCheckConfiguration no An object used to configure the service's health checks, if any.

Service Health Check Configuration

Name Type Required Description
request HttpRequestConfiguration yes An object used to configure the HTTP-based health check request.
interval string no The ISO8601 formatted amount of time to wait between every health check request.

Http Request Configuration

Name Type Required Description
method string yes The method of the HTTP request to perform (ex: GET, POST, PATCH, PUT, DELETE, etc.).
path string yes The path of the HTTP request to perform.
headers object no The headers of the HTTP request to perform, if any.
body object no The request's body, if any.
Clone this wiki locally