PluginArgs

data class PluginArgs(val description: Output<String>? = null, val pluginData: Output<String>? = null, val pluginName: Output<String>? = null, val pluginType: Output<String>? = null, val tags: Output<Map<String, Any>>? = null) : ConvertibleToJava<PluginArgs>

Provides a Api Gateway Plugin resource. For information about Api Gateway Plugin and how to use it, see What is Plugin.

NOTE: Available since v1.187.0.

Example Usage

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.apigateway.Plugin;
import com.pulumi.alicloud.apigateway.PluginArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var default_ = new Plugin("default", PluginArgs.builder()
.description("tf_example")
.pluginData("{\"allowOrigins\": \"api.foo.com\",\"allowMethods\": \"GET,POST,PUT,DELETE,HEAD,OPTIONS,PATCH\",\"allowHeaders\": \"Authorization,Accept,Accept-Ranges,Cache-Control,Range,Date,Content-Type,Content-Length,Content-MD5,User-Agent,X-Ca-Signature,X-Ca-Signature-Headers,X-Ca-Signature-Method,X-Ca-Key,X-Ca-Timestamp,X-Ca-Nonce,X-Ca-Stage,X-Ca-Request-Mode,x-ca-deviceid\",\"exposeHeaders\": \"Content-MD5,Server,Date,Latency,X-Ca-Request-Id,X-Ca-Error-Code,X-Ca-Error-Message\",\"maxAge\": 172800,\"allowCredentials\": true}")
.pluginName("tf_example")
.pluginType("cors")
.tags(Map.ofEntries(
Map.entry("Created", "TF"),
Map.entry("For", "example")
))
.build());
}
}

Import

Api Gateway Plugin can be imported using the id, e.g.

$ pulumi import alicloud:apigateway/plugin:Plugin example <id>

Constructors

Link copied to clipboard
fun PluginArgs(description: Output<String>? = null, pluginData: Output<String>? = null, pluginName: Output<String>? = null, pluginType: Output<String>? = null, tags: Output<Map<String, Any>>? = null)

Functions

Link copied to clipboard
open override fun toJava(): PluginArgs

Properties

Link copied to clipboard
val description: Output<String>? = null

The description of the plug-in, which cannot exceed 200 characters.

Link copied to clipboard
val pluginData: Output<String>? = null

The definition statement of the plug-in. Plug-in definition statements in the JSON and YAML formats are supported.

Link copied to clipboard
val pluginName: Output<String>? = null

The name of the plug-in that you want to create. It can contain uppercase English letters, lowercase English letters, Chinese characters, numbers, and underscores (). It must be 4 to 50 characters in length and cannot start with an underscore ().

Link copied to clipboard
val pluginType: Output<String>? = null

The type of the plug-in. Valid values: backendSignature, caching, cors, ipControl, jwtAuth, trafficControl.

Link copied to clipboard
val tags: Output<Map<String, Any>>? = null

A mapping of tags to assign to the resource.