ApiKeyArgs

data class ApiKeyArgs(val description: Output<String>? = null, val enabled: Output<Boolean>? = null, val name: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val value: Output<String>? = null) : ConvertibleToJava<ApiKeyArgs>

Provides an API Gateway API Key.

NOTE: Since the API Gateway usage plans feature was launched on August 11, 2016, usage plans are now required to associate an API key with an API stage.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.apigateway.ApiKey;
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 myDemoApiKey = new ApiKey("myDemoApiKey");
}
}

Import

API Gateway Keys can be imported using the id, e.g.,

$ pulumi import aws:apigateway/apiKey:ApiKey my_demo_key 8bklk8bl1k3sB38D9B3l0enyWT8c09B30lkq0blk

Constructors

Link copied to clipboard
constructor(description: Output<String>? = null, enabled: Output<Boolean>? = null, name: Output<String>? = null, tags: Output<Map<String, String>>? = null, value: Output<String>? = null)

Properties

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

API key description. Defaults to "Managed by Pulumi".

Link copied to clipboard
val enabled: Output<Boolean>? = null

Whether the API key can be used by callers. Defaults to true.

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

Name of the API key.

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

Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

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

Value of the API key. If specified, the value must be an alphanumeric string between 20 and 128 characters. If not specified, it will be automatically generated by AWS on creation.

Functions

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