Class UsagePlanKey
Provides an API Gateway Usage Plan Key.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var test = new Aws.ApiGateway.RestApi("test", new Aws.ApiGateway.RestApiArgs
{
});
var myusageplan = new Aws.ApiGateway.UsagePlan("myusageplan", new Aws.ApiGateway.UsagePlanArgs
{
ApiStages =
{
new Aws.ApiGateway.Inputs.UsagePlanApiStageArgs
{
ApiId = test.Id,
Stage = aws_api_gateway_deployment.Foo.Stage_name,
},
},
});
var mykey = new Aws.ApiGateway.ApiKey("mykey", new Aws.ApiGateway.ApiKeyArgs
{
});
var main = new Aws.ApiGateway.UsagePlanKey("main", new Aws.ApiGateway.UsagePlanKeyArgs
{
KeyId = mykey.Id,
KeyType = "API_KEY",
UsagePlanId = myusageplan.Id,
});
}
}
Inherited Members
Namespace: Pulumi.Aws.ApiGateway
Assembly: Pulumi.Aws.dll
Syntax
public class UsagePlanKey : CustomResource
Constructors
View SourceUsagePlanKey(String, UsagePlanKeyArgs, CustomResourceOptions)
Create a UsagePlanKey resource with the given unique name, arguments, and options.
Declaration
public UsagePlanKey(string name, UsagePlanKeyArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| UsagePlanKeyArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceKeyId
The identifier of the API key resource.
Declaration
public Output<string> KeyId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
KeyType
The type of the API key resource. Currently, the valid key type is API_KEY.
Declaration
public Output<string> KeyType { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
The name of a usage plan key.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
UsagePlanId
The Id of the usage plan resource representing to associate the key to.
Declaration
public Output<string> UsagePlanId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Value
The value of a usage plan key.
Declaration
public Output<string> Value { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, UsagePlanKeyState, CustomResourceOptions)
Get an existing UsagePlanKey resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static UsagePlanKey Get(string name, Input<string> id, UsagePlanKeyState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| UsagePlanKeyState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| UsagePlanKey |