github.com/xsb/terraform@v0.6.13-0.20160314145438-fe415c2f09d7/website/source/docs/providers/aws/r/api_gateway_api_key.html.markdown (about) 1 --- 2 layout: "aws" 3 page_title: "AWS: aws_api_gateway_api_key" 4 sidebar_current: "docs-aws-resource-api-gateway-api-key" 5 description: |- 6 Provides an API Gateway API Key. 7 --- 8 9 # aws\_api\_gateway\_api\_key 10 11 Provides an API Gateway API Key. 12 13 ## Example Usage 14 15 ``` 16 resource "aws_api_gateway_rest_api" "MyDemoAPI" { 17 name = "MyDemoAPI" 18 description = "This is my API for demonstration purposes" 19 } 20 21 resource "aws_api_gateway_api_key" "MyDemoApiKey" { 22 name = "demo" 23 24 stage_key { 25 rest_api_id = "${aws_api_gateway_rest_api.MyDemoAPI.id}" 26 stage_name = "${aws_api_gateway_deployment.MyDemoDeployment.stage_name}" 27 } 28 } 29 30 resource "aws_api_gateway_deployment" "MyDemoDeployment" { 31 rest_api_id = "${aws_api_gateway_rest_api.MyDemoAPI.id}" 32 stage_name = "test" 33 } 34 ``` 35 36 ## Argument Reference 37 38 The following arguments are supported: 39 40 * `name` - (Required) Name of the API Gateway 41 * `description` - (Optional) The API Gateway description 42 * `stage_key` - (Optional) applicable API Gateway stages 43 44 Stage keys support the following: 45 46 * `rest_api_id` - (Required) The ID of the associated API Gateway Rest API. 47 * `stage_name` - (Required) The name of the API Gateway stage.