ApiKey
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
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var myDemoApiKey = new Aws.ApiGateway.ApiKey("myDemoApiKey", new Aws.ApiGateway.ApiKeyArgs
{
});
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/apigateway"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := apigateway.NewApiKey(ctx, "myDemoApiKey", nil)
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
my_demo_api_key = aws.apigateway.ApiKey("myDemoApiKey")import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const myDemoApiKey = new aws.apigateway.ApiKey("MyDemoApiKey", {});Create a ApiKey Resource
new ApiKey(name: string, args?: ApiKeyArgs, opts?: CustomResourceOptions);def ApiKey(resource_name, opts=None, description=None, enabled=None, name=None, tags=None, value=None, __props__=None);func NewApiKey(ctx *Context, name string, args *ApiKeyArgs, opts ...ResourceOption) (*ApiKey, error)public ApiKey(string name, ApiKeyArgs? args = null, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args ApiKeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ApiKeyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ApiKeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
ApiKey Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The ApiKey resource accepts the following input properties:
- Description string
The API key description. Defaults to “Managed by Pulumi”.
- Enabled bool
Specifies whether the API key can be used by callers. Defaults to
true.- Name string
The name of the API key
- Dictionary<string, string>
Key-value map of resource tags
- Value string
The value of the API key. If not specified, it will be automatically generated by AWS on creation.
- Description string
The API key description. Defaults to “Managed by Pulumi”.
- Enabled bool
Specifies whether the API key can be used by callers. Defaults to
true.- Name string
The name of the API key
- map[string]string
Key-value map of resource tags
- Value string
The value of the API key. If not specified, it will be automatically generated by AWS on creation.
- description string
The API key description. Defaults to “Managed by Pulumi”.
- enabled boolean
Specifies whether the API key can be used by callers. Defaults to
true.- name string
The name of the API key
- {[key: string]: string}
Key-value map of resource tags
- value string
The value of the API key. If not specified, it will be automatically generated by AWS on creation.
- description str
The API key description. Defaults to “Managed by Pulumi”.
- enabled bool
Specifies whether the API key can be used by callers. Defaults to
true.- name str
The name of the API key
- Dict[str, str]
Key-value map of resource tags
- value str
The value of the API key. If not specified, it will be automatically generated by AWS on creation.
Outputs
All input properties are implicitly available as output properties. Additionally, the ApiKey resource produces the following output properties:
- Arn string
Amazon Resource Name (ARN)
- Created
Date string The creation date of the API key
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Updated stringDate The last update date of the API key
- Arn string
Amazon Resource Name (ARN)
- Created
Date string The creation date of the API key
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Updated stringDate The last update date of the API key
- arn string
Amazon Resource Name (ARN)
- created
Date string The creation date of the API key
- id string
- The provider-assigned unique ID for this managed resource.
- last
Updated stringDate The last update date of the API key
- arn str
Amazon Resource Name (ARN)
- created_
date str The creation date of the API key
- id str
- The provider-assigned unique ID for this managed resource.
- last_
updated_ strdate The last update date of the API key
Look up an Existing ApiKey Resource
Get an existing ApiKey resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ApiKeyState, opts?: CustomResourceOptions): ApiKeystatic get(resource_name, id, opts=None, arn=None, created_date=None, description=None, enabled=None, last_updated_date=None, name=None, tags=None, value=None, __props__=None);func GetApiKey(ctx *Context, name string, id IDInput, state *ApiKeyState, opts ...ResourceOption) (*ApiKey, error)public static ApiKey Get(string name, Input<string> id, ApiKeyState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Arn string
Amazon Resource Name (ARN)
- Created
Date string The creation date of the API key
- Description string
The API key description. Defaults to “Managed by Pulumi”.
- Enabled bool
Specifies whether the API key can be used by callers. Defaults to
true.- Last
Updated stringDate The last update date of the API key
- Name string
The name of the API key
- Dictionary<string, string>
Key-value map of resource tags
- Value string
The value of the API key. If not specified, it will be automatically generated by AWS on creation.
- Arn string
Amazon Resource Name (ARN)
- Created
Date string The creation date of the API key
- Description string
The API key description. Defaults to “Managed by Pulumi”.
- Enabled bool
Specifies whether the API key can be used by callers. Defaults to
true.- Last
Updated stringDate The last update date of the API key
- Name string
The name of the API key
- map[string]string
Key-value map of resource tags
- Value string
The value of the API key. If not specified, it will be automatically generated by AWS on creation.
- arn string
Amazon Resource Name (ARN)
- created
Date string The creation date of the API key
- description string
The API key description. Defaults to “Managed by Pulumi”.
- enabled boolean
Specifies whether the API key can be used by callers. Defaults to
true.- last
Updated stringDate The last update date of the API key
- name string
The name of the API key
- {[key: string]: string}
Key-value map of resource tags
- value string
The value of the API key. If not specified, it will be automatically generated by AWS on creation.
- arn str
Amazon Resource Name (ARN)
- created_
date str The creation date of the API key
- description str
The API key description. Defaults to “Managed by Pulumi”.
- enabled bool
Specifies whether the API key can be used by callers. Defaults to
true.- last_
updated_ strdate The last update date of the API key
- name str
The name of the API key
- Dict[str, str]
Key-value map of resource tags
- value str
The value of the API key. If not specified, it will be automatically generated by AWS on creation.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.