Api Key Args
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");
}
}
Content copied to clipboard
Import
API Gateway Keys can be imported using the id
, e.g.,
$ pulumi import aws:apigateway/apiKey:ApiKey my_demo_key 8bklk8bl1k3sB38D9B3l0enyWT8c09B30lkq0blk
Content copied to clipboard