github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/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  ```hcl
    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  
    25    assume_role_policy = <<EOF
    26  {
    27    "Version": "2012-10-17",
    28    "Statement": [
    29      {
    30        "Sid": "",
    31        "Effect": "Allow",
    32        "Principal": {
    33          "Service": "apigateway.amazonaws.com"
    34        },
    35        "Action": "sts:AssumeRole"
    36      }
    37    ]
    38  }
    39  EOF
    40  }
    41  
    42  resource "aws_iam_role_policy" "cloudwatch" {
    43    name = "default"
    44    role = "${aws_iam_role.cloudwatch.id}"
    45  
    46    policy = <<EOF
    47  {
    48      "Version": "2012-10-17",
    49      "Statement": [
    50          {
    51              "Effect": "Allow",
    52              "Action": [
    53                  "logs:CreateLogGroup",
    54                  "logs:CreateLogStream",
    55                  "logs:DescribeLogGroups",
    56                  "logs:DescribeLogStreams",
    57                  "logs:PutLogEvents",
    58                  "logs:GetLogEvents",
    59                  "logs:FilterLogEvents"
    60              ],
    61              "Resource": "*"
    62          }
    63      ]
    64  }
    65  EOF
    66  }
    67  ```
    68  
    69  ## Argument Reference
    70  
    71  The following argument is supported:
    72  
    73  * `cloudwatch_role_arn` - (Optional) The ARN of an IAM role for CloudWatch (to allow logging & monitoring).
    74  	See more [in AWS Docs](https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-stage-settings.html#how-to-stage-settings-console).
    75  	Logging & monitoring can be enabled/disabled and otherwise tuned on the API Gateway Stage level.
    76  
    77  ## Attribute Reference
    78  
    79  The following attribute is exported:
    80  
    81  * `throttle_settings` - Account-Level throttle settings. See exported fields below.
    82  
    83  `throttle_settings` block exports the following:
    84  
    85  * `burst_limit` - The absolute maximum number of times API Gateway allows the API to be called per second (RPS).
    86  * `rate_limit` - The number of times API Gateway allows the API to be called per second on average (RPS).
    87  
    88  
    89  ## Import
    90  
    91  API Gateway Accounts can be imported using the word `api-gateway-account`, e.g.
    92  
    93  ```
    94  $ terraform import aws_api_gateway_account.demo api-gateway-account
    95  ```