UsagePlanKeyArgs

data class UsagePlanKeyArgs(val keyId: Output<String>? = null, val keyType: Output<String>? = null, val usagePlanId: Output<String>? = null) : ConvertibleToJava<UsagePlanKeyArgs>

Provides an API Gateway Usage Plan Key.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.apigateway.RestApi;
import com.pulumi.aws.apigateway.UsagePlan;
import com.pulumi.aws.apigateway.UsagePlanArgs;
import com.pulumi.aws.apigateway.inputs.UsagePlanApiStageArgs;
import com.pulumi.aws.apigateway.ApiKey;
import com.pulumi.aws.apigateway.UsagePlanKey;
import com.pulumi.aws.apigateway.UsagePlanKeyArgs;
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 test = new RestApi("test");
var myusageplan = new UsagePlan("myusageplan", UsagePlanArgs.builder()
.apiStages(UsagePlanApiStageArgs.builder()
.apiId(test.id())
.stage(aws_api_gateway_stage.foo().stage_name())
.build())
.build());
var mykey = new ApiKey("mykey");
var main = new UsagePlanKey("main", UsagePlanKeyArgs.builder()
.keyId(mykey.id())
.keyType("API_KEY")
.usagePlanId(myusageplan.id())
.build());
}
}

Import

AWS API Gateway Usage Plan Key can be imported using the USAGE-PLAN-ID/USAGE-PLAN-KEY-ID, e.g.,

$ pulumi import aws:apigateway/usagePlanKey:UsagePlanKey key 12345abcde/zzz

Constructors

Link copied to clipboard
constructor(keyId: Output<String>? = null, keyType: Output<String>? = null, usagePlanId: Output<String>? = null)

Properties

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

Identifier of the API key resource.

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

Type of the API key resource. Currently, the valid key type is API_KEY.

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

Id of the usage plan resource representing to associate the key to.

Functions

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