ApiKeyArgs

data class ApiKeyArgs(val customerId: Output<String>? = null, 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

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.apigateway.ApiKey("example", {name: "example"});
import pulumi
import pulumi_aws as aws
example = aws.apigateway.ApiKey("example", name="example")
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",
});
});
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
})
}
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());
}
}
resources:
example:
type: aws:apigateway:ApiKey
properties:
name: example

Import

Using pulumi import, import API Gateway Keys using the id. For example:

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

Constructors

Link copied to clipboard
constructor(customerId: Output<String>? = null, 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 customerId: Output<String>? = null

An Amazon Web Services Marketplace customer identifier, when integrating with the Amazon Web Services SaaS Marketplace.

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