github.com/adrian-bl/terraform@v0.7.0-rc2.0.20160705220747-de0a34fc3517/website/source/docs/providers/aws/r/api_gateway_account.html.markdown (about) 1 --- 2 layout: "aws" 3 page_title: "AWS: aws_api_gateway_account" 4 sidebar_current: "docs-aws-resource-api-gateway-account" 5 description: |- 6 Provides a settings of an API Gateway Account. 7 --- 8 9 # aws\_api\_gateway\_account 10 11 Provides a settings of an API Gateway Account. Settings is applied region-wide per `provider` block. 12 13 -> **Note:** As there is no API method for deleting account settings or resetting it to defaults, destroying this resource will keep your account settings intact 14 15 ## Example Usage 16 17 ``` 18 resource "aws_api_gateway_account" "demo" { 19 cloudwatch_role_arn = "${aws_iam_role.cloudwatch.arn}" 20 } 21 22 resource "aws_iam_role" "cloudwatch" { 23 name = "api_gateway_cloudwatch_global" 24 assume_role_policy = <<EOF 25 { 26 "Version": "2012-10-17", 27 "Statement": [ 28 { 29 "Sid": "", 30 "Effect": "Allow", 31 "Principal": { 32 "Service": "apigateway.amazonaws.com" 33 }, 34 "Action": "sts:AssumeRole" 35 } 36 ] 37 } 38 EOF 39 } 40 41 resource "aws_iam_role_policy" "cloudwatch" { 42 name = "default" 43 role = "${aws_iam_role.cloudwatch.id}" 44 policy = <<EOF 45 { 46 "Version": "2012-10-17", 47 "Statement": [ 48 { 49 "Effect": "Allow", 50 "Action": [ 51 "logs:CreateLogGroup", 52 "logs:CreateLogStream", 53 "logs:DescribeLogGroups", 54 "logs:DescribeLogStreams", 55 "logs:PutLogEvents", 56 "logs:GetLogEvents", 57 "logs:FilterLogEvents" 58 ], 59 "Resource": "*" 60 } 61 ] 62 } 63 EOF 64 } 65 ``` 66 67 ## Argument Reference 68 69 The following argument is supported: 70 71 * `cloudwatch_role_arn` - (Optional) The ARN of an IAM role for CloudWatch (to allow logging & monitoring). 72 See more [in AWS Docs](https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-stage-settings.html#how-to-stage-settings-console). 73 Logging & monitoring can be enabled/disabled and otherwise tuned on the API Gateway Stage level. 74 75 ## Attribute Reference 76 77 The following attribute is exported: 78 79 * `throttle_settings` - Account-Level throttle settings. See exported fields below. 80 81 `throttle_settings` block exports the following: 82 83 * `burst_limit` - The absolute maximum number of times API Gateway allows the API to be called per second (RPS). 84 * `rate_limit` - The number of times API Gateway allows the API to be called per second on average (RPS).