Api Key
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
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.apigateway.ApiKey("example", {name: "example"});
Content copied to clipboard
import pulumi
import pulumi_aws as aws
example = aws.apigateway.ApiKey("example", name="example")
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.ApiGateway.ApiKey("example", new()
{
Name = "example",
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/apigateway"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := apigateway.NewApiKey(ctx, "example", &apigateway.ApiKeyArgs{
Name: pulumi.String("example"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.apigateway.ApiKey;
import com.pulumi.aws.apigateway.ApiKeyArgs;
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 example = new ApiKey("example", ApiKeyArgs.builder()
.name("example")
.build());
}
}
Content copied to clipboard
resources:
example:
type: aws:apigateway:ApiKey
properties:
name: example
Content copied to clipboard
Import
Using pulumi import
, import API Gateway Keys using the id
. For example:
$ pulumi import aws:apigateway/apiKey:ApiKey example 8bklk8bl1k3sB38D9B3l0enyWT8c09B30lkq0blk
Content copied to clipboard
Properties
Link copied to clipboard
Creation date of the API key
Link copied to clipboard
An Amazon Web Services Marketplace customer identifier, when integrating with the Amazon Web Services SaaS Marketplace.
Link copied to clipboard
API key description. Defaults to "Managed by Pulumi".
Link copied to clipboard
Last update date of the API key
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard