The AWS::ApiGateway::ApiKey
resource creates a unique key that you can distribute to clients who are executing API Gateway Method
resources that require an API key. To specify which API key clients must use, map the API key with the RestApi
and Stage
resources that include the methods that require a key.
resource "awscc_apigateway_api_key" "example" {
name = "example"
description = "Example API key"
enabled = true
tags = [{
key = "Modified By"
value = "AWSCC"
}]
}
customer_id
(String) An MKT customer identifier, when integrating with the AWS SaaS Marketplace.description
(String) The description of the ApiKey.enabled
(Boolean) Specifies whether the ApiKey can be used by callers.generate_distinct_id
(Boolean) Specifies whether (true
) or not (false
) the key identifier is distinct from the created API key value. This parameter is deprecated and should not be used.name
(String) A name for the API key. If you don't specify a name, CFN generates a unique physical ID and uses that ID for the API key name. For more information, see Name Type.
If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.stage_keys
(Attributes List) DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key. (see below for nested schema)tags
(Attributes List) The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with aws:
. The tag value can be up to 256 characters. (see below for nested schema)value
(String) Specifies a value of the API key.api_key_id
(String)id
(String) Uniquely identifies the resource.stage_keys
Optional:
rest_api_id
(String) The string identifier of the associated RestApi.stage_name
(String) The stage name associated with the stage key.tags
Required:
key
(String) The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.value
(String) The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.Import is supported using the following syntax:
$ terraform import awscc_apigateway_api_key.example <resource ID>