Package com.pulumi.aws.apigateway
Class UsagePlanKey
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.apigateway.UsagePlanKey
-
public class UsagePlanKey extends com.pulumi.resources.CustomResourceProvides an API Gateway Usage Plan Key. ## Example Usage
## Import Using `pulumi import`, import AWS API Gateway Usage Plan Key using the `USAGE-PLAN-ID/USAGE-PLAN-KEY-ID`. For example: ```sh $ pulumi import aws:apigateway/usagePlanKey:UsagePlanKey key 12345abcde/zzz ```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.RestApiArgs; 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.ApiKeyArgs; import com.pulumi.aws.apigateway.UsagePlanKey; import com.pulumi.aws.apigateway.UsagePlanKeyArgs; import java.util.ArrayList; import java.util.Arrays; 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", RestApiArgs.builder() .name("MyDemoAPI") .build()); // ... var myusageplan = new UsagePlan("myusageplan", UsagePlanArgs.builder() .apiStages(UsagePlanApiStageArgs.builder() .apiId(test.id()) .stage(foo.stageName()) .build()) .name("my_usage_plan") .build()); var mykey = new ApiKey("mykey", ApiKeyArgs.builder() .name("my_key") .build()); var main = new UsagePlanKey("main", UsagePlanKeyArgs.builder() .keyId(mykey.id()) .keyType("API_KEY") .usagePlanId(myusageplan.id()) .build()); } }
-
-
Constructor Summary
Constructors Constructor Description UsagePlanKey(java.lang.String name)UsagePlanKey(java.lang.String name, UsagePlanKeyArgs args)UsagePlanKey(java.lang.String name, UsagePlanKeyArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static UsagePlanKeyget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, UsagePlanKeyState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>keyId()com.pulumi.core.Output<java.lang.String>keyType()com.pulumi.core.Output<java.lang.String>name()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.lang.String>usagePlanId()com.pulumi.core.Output<java.lang.String>value()
-
-
-
Constructor Detail
-
UsagePlanKey
public UsagePlanKey(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
UsagePlanKey
public UsagePlanKey(java.lang.String name, UsagePlanKeyArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
UsagePlanKey
public UsagePlanKey(java.lang.String name, UsagePlanKeyArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
keyId
public com.pulumi.core.Output<java.lang.String> keyId()
- Returns:
- Identifier of the API key resource.
-
keyType
public com.pulumi.core.Output<java.lang.String> keyType()
- Returns:
- Type of the API key resource. Currently, the valid key type is API_KEY.
-
name
public com.pulumi.core.Output<java.lang.String> name()
- Returns:
- Name of a usage plan key.
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
-
usagePlanId
public com.pulumi.core.Output<java.lang.String> usagePlanId()
- Returns:
- ID of the usage plan resource representing to associate the key to.
-
value
public com.pulumi.core.Output<java.lang.String> value()
- Returns:
- Value of a usage plan key.
-
get
public static UsagePlanKey get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable UsagePlanKeyState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-