Skip to main content

wasm_plugins

Creates, updates, deletes, gets or lists a wasm_plugins resource.

Overview

Namewasm_plugins
TypeResource
Idgoogle.networkservices.wasm_plugins

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. Name of the WasmPlugin resource in the following format: projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}.
createTimestring (google-datetime)Output only. The timestamp when the resource was created.
descriptionstringOptional. A human-readable description of the resource.
labelsobjectOptional. Set of labels associated with the WasmPlugin resource. The format must comply with the following requirements.
logConfigobjectOptional. 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. (id: WasmPluginLogConfig)
mainVersionIdstringOptional. The ID of the WasmPluginVersion resource that is the currently serving one. The version referred to must be a child of this WasmPlugin resource.
updateTimestring (google-datetime)Output only. The timestamp when the resource was updated.
usedByarrayOutput only. List of all extensions that use this WasmPlugin resource.
versionsobjectOptional. 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 main_version_id 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.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, wasmPluginsIdviewGets details of the specified WasmPlugin resource.
listselectprojectsId, locationsIdpageSize, pageTokenLists WasmPlugin resources in a given project and location.
createinsertprojectsId, locationsIdwasmPluginIdCreates a new WasmPlugin resource in a given project and location.
patchupdateprojectsId, locationsId, wasmPluginsIdupdateMaskUpdates the parameters of the specified WasmPlugin resource.
deletedeleteprojectsId, locationsId, wasmPluginsIdDeletes the specified WasmPlugin resource.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
locationsIdstring
projectsIdstring
wasmPluginsIdstring
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)
viewstring
wasmPluginIdstring

SELECT examples

Gets details of the specified WasmPlugin resource.

SELECT
name,
createTime,
description,
labels,
logConfig,
mainVersionId,
updateTime,
usedBy,
versions
FROM google.networkservices.wasm_plugins
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND wasmPluginsId = '{{ wasmPluginsId }}' -- required
AND view = '{{ view }}';

INSERT examples

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

INSERT INTO google.networkservices.wasm_plugins (
data__name,
data__description,
data__labels,
data__mainVersionId,
data__logConfig,
data__versions,
projectsId,
locationsId,
wasmPluginId
)
SELECT
'{{ name }}',
'{{ description }}',
'{{ labels }}',
'{{ mainVersionId }}',
'{{ logConfig }}',
'{{ versions }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ wasmPluginId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates the parameters of the specified WasmPlugin resource.

UPDATE google.networkservices.wasm_plugins
SET
data__name = '{{ name }}',
data__description = '{{ description }}',
data__labels = '{{ labels }}',
data__mainVersionId = '{{ mainVersionId }}',
data__logConfig = '{{ logConfig }}',
data__versions = '{{ versions }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND wasmPluginsId = '{{ wasmPluginsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Deletes the specified WasmPlugin resource.

DELETE FROM google.networkservices.wasm_plugins
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND wasmPluginsId = '{{ wasmPluginsId }}' --required;