REST Resource: projects.locations.wasmPlugins

Resource: WasmPlugin

WasmPlugin is a resource representing a service executing a customer-provided Wasm module.

JSON representation
{
  "name": string,
  "createTime": string,
  "updateTime": string,
  "description": string,
  "labels": {
    string: string,
    ...
  },
  "mainVersionId": string,
  "logConfig": {
    object (LogConfig)
  },
  "versions": {
    string: {
      object (VersionDetails)
    },
    ...
  },
  "usedBy": [
    {
      object (UsedBy)
    }
  ]
}
Fields
name

string

Identifier. Name of the WasmPlugin resource in the following format: projects/{project}/locations/{location}/wasmPlugins/{wasmPlugin}.

createTime

string (Timestamp format)

Output only. The timestamp when the resource was created.

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".

updateTime

string (Timestamp format)

Output only. The timestamp when the resource was updated.

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".

description

string

Optional. A human-readable description of the resource.

labels

map (key: string, value: string)

Optional. Set of labels associated with the WasmPlugin resource.

The format must comply with the following requirements.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

mainVersionId

string

Optional. The ID of the WasmPluginVersion resource that is the currently serving one. The version referred to must be a child of this WasmPlugin resource.

logConfig

object (LogConfig)

Optional. Specifies the logging options for the activity performed by this plugin. If logging is enabled, plugin logs are exported to Cloud Logging. Note that the settings relate to the logs generated by using logging statements in your Wasm code.

versions

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

Optional. All versions of this WasmPlugin resource in the key-value format. The key is the resource ID, and the value is the VersionDetails object.

Lets you create or update a WasmPlugin resource and its versions in a single request. When the mainVersionId field is not empty, it must point to one of the VersionDetails objects in the map.

If provided in a PATCH request, the new versions replace the previous set. Any version omitted from the versions field is removed. Because the WasmPluginVersion resource is immutable, if a WasmPluginVersion resource with the same name already exists and differs, the request fails.

Note: In a GET request, this field is populated only if the field GetWasmPluginRequest.view is set to WASM_PLUGIN_VIEW_FULL.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

usedBy[]

object (UsedBy)

Output only. List of all extensions that use this WasmPlugin resource.

LogConfig

Specifies the logging options for the activity performed by this plugin. If logging is enabled, plugin logs are exported to Cloud Logging.

JSON representation
{
  "enable": boolean,
  "sampleRate": number,
  "minLogLevel": enum (LogLevel)
}
Fields
enable

boolean

Optional. Specifies whether to enable logging for activity by this plugin.

Defaults to false.

sampleRate

number

Non-empty default. Configures the sampling rate of activity logs, where 1.0 means all logged activity is reported and 0.0 means no activity is reported. A floating point value between 0.0 and 1.0 indicates that a percentage of log messages is stored.

The default value when logging is enabled is 1.0. The value of the field must be between 0 and 1 (inclusive).

This field can be specified only if logging is enabled for this plugin.

minLogLevel

enum (LogLevel)

Non-empty default. Specificies the lowest level of the plugin logs that are exported to Cloud Logging. This setting relates to the logs generated by using logging statements in your Wasm code.

This field is can be set only if logging is enabled for the plugin.

If the field is not provided when logging is enabled, it is set to INFO by default.

LogLevel

Possible values to specify the lowest level of logs to be exported to Cloud Logging.

Enums
LOG_LEVEL_UNSPECIFIED Unspecified value. Defaults to LogLevel.INFO.
TRACE Report logs with TRACE level and above.
DEBUG Report logs with DEBUG level and above.
INFO Report logs with INFO level and above.
WARN Report logs with WARN level and above.
ERROR Report logs with ERROR level and above.
CRITICAL Report logs with CRITICAL level only.

VersionDetails

Details of a WasmPluginVersion resource to be inlined in the WasmPlugin resource.

JSON representation
{
  "createTime": string,
  "updateTime": string,
  "description": string,
  "labels": {
    string: string,
    ...
  },
  "imageUri": string,
  "imageDigest": string,
  "pluginConfigDigest": string,

  // Union field plugin_config_source can be only one of the following:
  "pluginConfigData": string,
  "pluginConfigUri": string
  // End of list of possible types for union field plugin_config_source.
}
Fields
createTime

string (Timestamp format)

Output only. The timestamp when the resource was created.

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".

updateTime

string (Timestamp format)

Output only. The timestamp when the resource was updated.

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".

description

string

Optional. A human-readable description of the resource.

labels

map (key: string, value: string)

Optional. Set of labels associated with the WasmPluginVersion resource.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

imageUri

string

Optional. URI of the container image containing the Wasm module, stored in the Artifact Registry. The container image must contain only a single file with the name plugin.wasm. When a new WasmPluginVersion resource is created, the URI gets resolved to an image digest and saved in the imageDigest field.

imageDigest

string

Output only. The resolved digest for the image specified in image. The digest is resolved during the creation of a WasmPluginVersion resource. This field holds the digest value regardless of whether a tag or digest was originally specified in the image field.

pluginConfigDigest

string

Output only. This field holds the digest (usually checksum) value for the plugin configuration. The value is calculated based on the contents of the pluginConfigData field or the container image defined by the pluginConfigUri field.

Union field plugin_config_source.

plugin_config_source can be only one of the following:

pluginConfigData

string (bytes format)

Configuration for the plugin. The configuration is provided to the plugin at runtime through the ON_CONFIGURE callback. When a new WasmPluginVersion version is created, the digest of the contents is saved in the pluginConfigDigest field.

A base64-encoded string.

pluginConfigUri

string

URI of the plugin configuration stored in the Artifact Registry. The configuration is provided to the plugin at runtime through the ON_CONFIGURE callback. The container image must contain only a single file with the name plugin.config. When a new WasmPluginVersion resource is created, the digest of the container image is saved in the pluginConfigDigest field.

UsedBy

Defines a resource that uses the WasmPlugin resource.

JSON representation
{
  "name": string
}
Fields
name

string

Output only. Full name of the resource https://google.aip.dev/122#full-resource-names, for example //networkservices.googleapis.com/projects/{project}/locations/{location}/lbRouteExtensions/{extension}

Methods

create

Creates a new WasmPlugin resource in a given project and location.

delete

Deletes the specified WasmPlugin resource.

get

Gets details of the specified WasmPlugin resource.

list

Lists WasmPlugin resources in a given project and location.

patch

Updates the parameters of the specified WasmPlugin resource.