---
title: "POST /v1/{+parent}/wasmPlugins"
method: POST
path: "/v1/{+parent}/wasmPlugins"
tags: ["projects"]
---

# POST /v1/{+parent}/wasmPlugins

`POST /v1/{+parent}/wasmPlugins`

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

## Path parameters

- `parent` string, required

## Query parameters

- `wasmPluginId` string

## Request body

- WasmPlugin — `WasmPlugin` is a resource representing a service executing a customer-provided Wasm module.
  - `name` string — Identifier. Name of the `WasmPlugin` resource in the following format: `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}`.
  - `createTime` string, google-datetime — Output only. The timestamp when the resource was created.
  - `updateTime` string, google-datetime — Output only. The timestamp when the resource was updated.
  - `description` string — Optional. A human-readable description of the resource.
  - `labels` object — Optional. Set of labels associated with the `WasmPlugin` resource. The format must comply with [the following requirements](/compute/docs/labeling-resources#requirements).
  - `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` WasmPluginLogConfig — Specifies the logging options for the activity performed by this plugin. If logging is enabled, plugin logs are exported to Cloud Logging.
    - `enable` boolean — Optional. Specifies whether to enable logging for activity by this plugin. Defaults to `false`.
    - `sampleRate` number, float — 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` 'LOG_LEVEL_UNSPECIFIED' | 'TRACE' | 'DEBUG' | 'INFO' | 'WARN' | 'ERROR' | 'CRITICAL' — Non-empty default. Specifies 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.
  - `versions` object — 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 `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`.
  - `usedBy` WasmPluginUsedBy[] — Output only. List of all [extensions](https://cloud.google.com/service-extensions/docs/overview) that use this `WasmPlugin` resource.
    - `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}`

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/networkservices.md) · [All operations](https://skmtc.net/google/apis/networkservices/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/networkservices/versions/ff841dec54e1/schema)
