

This is the new *CloudFormation Template Reference Guide*. Please update your bookmarks and links. For help getting started with CloudFormation, see the [AWS CloudFormation User Guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html).

# Amazon API Gateway
<a name="AWS_ApiGateway"></a>

**Resource types**
+ [AWS::ApiGateway::Account](aws-resource-apigateway-account.md)
+ [AWS::ApiGateway::ApiKey](aws-resource-apigateway-apikey.md)
+ [AWS::ApiGateway::Authorizer](aws-resource-apigateway-authorizer.md)
+ [AWS::ApiGateway::BasePathMapping](aws-resource-apigateway-basepathmapping.md)
+ [AWS::ApiGateway::BasePathMappingV2](aws-resource-apigateway-basepathmappingv2.md)
+ [AWS::ApiGateway::ClientCertificate](aws-resource-apigateway-clientcertificate.md)
+ [AWS::ApiGateway::Deployment](aws-resource-apigateway-deployment.md)
+ [AWS::ApiGateway::DocumentationPart](aws-resource-apigateway-documentationpart.md)
+ [AWS::ApiGateway::DocumentationVersion](aws-resource-apigateway-documentationversion.md)
+ [AWS::ApiGateway::DomainName](aws-resource-apigateway-domainname.md)
+ [AWS::ApiGateway::DomainNameAccessAssociation](aws-resource-apigateway-domainnameaccessassociation.md)
+ [AWS::ApiGateway::DomainNameV2](aws-resource-apigateway-domainnamev2.md)
+ [AWS::ApiGateway::GatewayResponse](aws-resource-apigateway-gatewayresponse.md)
+ [AWS::ApiGateway::Method](aws-resource-apigateway-method.md)
+ [AWS::ApiGateway::Model](aws-resource-apigateway-model.md)
+ [AWS::ApiGateway::RequestValidator](aws-resource-apigateway-requestvalidator.md)
+ [AWS::ApiGateway::Resource](aws-resource-apigateway-resource.md)
+ [AWS::ApiGateway::RestApi](aws-resource-apigateway-restapi.md)
+ [AWS::ApiGateway::Stage](aws-resource-apigateway-stage.md)
+ [AWS::ApiGateway::UsagePlan](aws-resource-apigateway-usageplan.md)
+ [AWS::ApiGateway::UsagePlanKey](aws-resource-apigateway-usageplankey.md)
+ [AWS::ApiGateway::VpcLink](aws-resource-apigateway-vpclink.md)

# AWS::ApiGateway::Account
<a name="aws-resource-apigateway-account"></a>

The `AWS::ApiGateway::Account` resource specifies the IAM role that Amazon API Gateway uses to write API logs to Amazon CloudWatch Logs. To avoid overwriting other roles, you should only have one `AWS::ApiGateway::Account` resource per region per account. 

When you delete a stack containing this resource, API Gateway can still assume the provided IAM role to write API logs to CloudWatch Logs. To deny API Gateway access to write API logs to CloudWatch logs, update the permissions policies or change the IAM role to deny access.

## Syntax
<a name="aws-resource-apigateway-account-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-apigateway-account-syntax.json"></a>

```
{
  "Type" : "AWS::ApiGateway::Account",
  "Properties" : {
      "[CloudWatchRoleArn](#cfn-apigateway-account-cloudwatchrolearn)" : String
    }
}
```

### YAML
<a name="aws-resource-apigateway-account-syntax.yaml"></a>

```
Type: AWS::ApiGateway::Account
Properties:
  [CloudWatchRoleArn](#cfn-apigateway-account-cloudwatchrolearn): String
```

## Properties
<a name="aws-resource-apigateway-account-properties"></a>

`CloudWatchRoleArn`  <a name="cfn-apigateway-account-cloudwatchrolearn"></a>
The ARN of an Amazon CloudWatch role for the current Account.   
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-apigateway-account-return-values"></a>

### Ref
<a name="aws-resource-apigateway-account-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the ID of the resource, such as `mysta-accou-01234b567890example`.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-apigateway-account-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-apigateway-account-return-values-fn--getatt-fn--getatt"></a>

`Id`  <a name="Id-fn::getatt"></a>
The ID for the account. For example: `abc123`.

## Examples
<a name="aws-resource-apigateway-account--examples"></a>



### Associate account with IAM role
<a name="aws-resource-apigateway-account--examples--Associate_account_with_IAM_role"></a>

The following example creates an IAM role that API Gateway can assume to push logs to CloudWatch Logs. The example associates the role with the `AWS::ApiGateway::Account resource`.

#### JSON
<a name="aws-resource-apigateway-account--examples--Associate_account_with_IAM_role--json"></a>

```
{
    "CloudWatchRole": {
        "Type": "AWS::IAM::Role",
        "Properties": {
            "AssumeRolePolicyDocument": {
                "Version": "2012-10-17"		 	 	 ,
                "Statement": [
                    {
                        "Effect": "Allow",
                        "Principal": {
                            "Service": [
                                "apigateway.amazonaws.com"
                            ]
                        },
                        "Action": "sts:AssumeRole"
                    }
                ]
            },
            "Path": "/",
            "ManagedPolicyArns": [
                "arn:aws:iam::aws:policy/service-role/AmazonAPIGatewayPushToCloudWatchLogs"
            ]
        }
    },
    "Account": {
        "Type": "AWS::ApiGateway::Account",
        "Properties": {
            "CloudWatchRoleArn": {
                "Fn::GetAtt": [
                    "CloudWatchRole",
                    "Arn"
                ]
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-apigateway-account--examples--Associate_account_with_IAM_role--yaml"></a>

```
CloudWatchRole:
  Type: 'AWS::IAM::Role'
  Properties:
    AssumeRolePolicyDocument:
      Version: 2012-10-17
      Statement:
        - Effect: Allow
          Principal:
            Service:
              - apigateway.amazonaws.com
          Action: 'sts:AssumeRole'
    Path: /
    ManagedPolicyArns:
      - >-
        arn:aws:iam::aws:policy/service-role/AmazonAPIGatewayPushToCloudWatchLogs
Account:
  Type: 'AWS::ApiGateway::Account'
  Properties:
    CloudWatchRoleArn: !GetAtt 
      - CloudWatchRole
      - Arn
```

## See also
<a name="aws-resource-apigateway-account--seealso"></a>
+ [account:update](https://docs.aws.amazon.com/apigateway/latest/api/API_UpdateAccount.html) in the *Amazon API Gateway REST API Reference*



# AWS::ApiGateway::ApiKey
<a name="aws-resource-apigateway-apikey"></a>

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. 

## Syntax
<a name="aws-resource-apigateway-apikey-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-apigateway-apikey-syntax.json"></a>

```
{
  "Type" : "AWS::ApiGateway::ApiKey",
  "Properties" : {
      "[CustomerId](#cfn-apigateway-apikey-customerid)" : String,
      "[Description](#cfn-apigateway-apikey-description)" : String,
      "[Enabled](#cfn-apigateway-apikey-enabled)" : Boolean,
      "[GenerateDistinctId](#cfn-apigateway-apikey-generatedistinctid)" : Boolean,
      "[Name](#cfn-apigateway-apikey-name)" : String,
      "[StageKeys](#cfn-apigateway-apikey-stagekeys)" : [ StageKey, ... ],
      "[Tags](#cfn-apigateway-apikey-tags)" : [ Tag, ... ],
      "[Value](#cfn-apigateway-apikey-value)" : String
    }
}
```

### YAML
<a name="aws-resource-apigateway-apikey-syntax.yaml"></a>

```
Type: AWS::ApiGateway::ApiKey
Properties:
  [CustomerId](#cfn-apigateway-apikey-customerid): String
  [Description](#cfn-apigateway-apikey-description): String
  [Enabled](#cfn-apigateway-apikey-enabled): Boolean
  [GenerateDistinctId](#cfn-apigateway-apikey-generatedistinctid): Boolean
  [Name](#cfn-apigateway-apikey-name): String
  [StageKeys](#cfn-apigateway-apikey-stagekeys): 
    - StageKey
  [Tags](#cfn-apigateway-apikey-tags): 
    - Tag
  [Value](#cfn-apigateway-apikey-value): String
```

## Properties
<a name="aws-resource-apigateway-apikey-properties"></a>

`CustomerId`  <a name="cfn-apigateway-apikey-customerid"></a>
An AWS Marketplace customer identifier, when integrating with the AWS SaaS Marketplace.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Description`  <a name="cfn-apigateway-apikey-description"></a>
The description of the ApiKey.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Enabled`  <a name="cfn-apigateway-apikey-enabled"></a>
Specifies whether the ApiKey can be used by callers.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`GenerateDistinctId`  <a name="cfn-apigateway-apikey-generatedistinctid"></a>
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.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Name`  <a name="cfn-apigateway-apikey-name"></a>
A name for the API key. If you don't specify a name, CloudFormation generates a unique physical ID and uses that ID for the API key name. For more information, see [Name Type](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-name.html).  
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. 
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`StageKeys`  <a name="cfn-apigateway-apikey-stagekeys"></a>
DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key.  
*Required*: No  
*Type*: Array of [StageKey](aws-properties-apigateway-apikey-stagekey.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Tags`  <a name="cfn-apigateway-apikey-tags"></a>
The key-value map of strings. The valid character set is [a-zA-Z\$1-=.\$1:/]. The tag key can be up to 128 characters and must not start with `aws:`. The tag value can be up to 256 characters.  
*Required*: No  
*Type*: Array of [Tag](aws-properties-apigateway-apikey-tag.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-apigateway-apikey-value"></a>
Specifies a value of the API key.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-apigateway-apikey-return-values"></a>

### Ref
<a name="aws-resource-apigateway-apikey-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the API key ID, such as `m2m1k7sybf`.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-apigateway-apikey-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-apigateway-apikey-return-values-fn--getatt-fn--getatt"></a>

`APIKeyId`  <a name="APIKeyId-fn::getatt"></a>
The ID for the API key. For example: `abc123`.

## Examples
<a name="aws-resource-apigateway-apikey--examples"></a>



### API Key
<a name="aws-resource-apigateway-apikey--examples--API_Key"></a>

The following example creates an API key and associates it with the `Test` stage of the `TestAPIDeployment` deployment. To ensure that CloudFormation creates the stage and deployment (which are declared elsewhere in the same template) before the API key, the example adds an explicit dependency on the deployment and stage. Without this dependency, CloudFormation might create the API key first, which would cause the association to fail because the deployment and stage wouldn't exist.

#### JSON
<a name="aws-resource-apigateway-apikey--examples--API_Key--json"></a>

```
{
    "ApiKey": {
        "Type": "AWS::ApiGateway::ApiKey",
        "DependsOn": [
            "TestAPIDeployment",
            "Test"
        ],
        "Properties": {
            "Name": "TestApiKey",
            "Description": "CloudFormation API Key V1",
            "Enabled": true,
            "StageKeys": [
                {
                    "RestApiId": {
                        "Ref": "RestApi"
                    },
                    "StageName": "Test"
                }
            ]
        }
    }
}
```

#### YAML
<a name="aws-resource-apigateway-apikey--examples--API_Key--yaml"></a>

```
ApiKey:
  Type: 'AWS::ApiGateway::ApiKey'
  DependsOn:
    - TestAPIDeployment
    - Test
  Properties:
    Name: TestApiKey
    Description: CloudFormation API Key V1
    Enabled: true
    StageKeys:
      - RestApiId: !Ref RestApi
        StageName: Test
```

## See also
<a name="aws-resource-apigateway-apikey--seealso"></a>
+ [apikey:create](https://docs.aws.amazon.com/apigateway/latest/api/API_CreateApiKey.html) in the *Amazon API Gateway REST API Reference*



# AWS::ApiGateway::ApiKey StageKey
<a name="aws-properties-apigateway-apikey-stagekey"></a>

`StageKey` is a property of the [AWS::ApiGateway::ApiKey](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-apikey.html) resource that specifies the stage to associate with the API key. This association allows only clients with the key to make requests to methods in that stage.

## Syntax
<a name="aws-properties-apigateway-apikey-stagekey-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-apigateway-apikey-stagekey-syntax.json"></a>

```
{
  "[RestApiId](#cfn-apigateway-apikey-stagekey-restapiid)" : String,
  "[StageName](#cfn-apigateway-apikey-stagekey-stagename)" : String
}
```

### YAML
<a name="aws-properties-apigateway-apikey-stagekey-syntax.yaml"></a>

```
  [RestApiId](#cfn-apigateway-apikey-stagekey-restapiid): String
  [StageName](#cfn-apigateway-apikey-stagekey-stagename): String
```

## Properties
<a name="aws-properties-apigateway-apikey-stagekey-properties"></a>

`RestApiId`  <a name="cfn-apigateway-apikey-stagekey-restapiid"></a>
The string identifier of the associated RestApi.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`StageName`  <a name="cfn-apigateway-apikey-stagekey-stagename"></a>
The stage name associated with the stage key.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-apigateway-apikey-stagekey--seealso"></a>
+ [stageKeys](https://docs.aws.amazon.com/apigateway/latest/api/API_CreateApiKey.html#stageKeys) in the *Amazon API Gateway REST API Reference*



# AWS::ApiGateway::ApiKey Tag
<a name="aws-properties-apigateway-apikey-tag"></a>

An array of key-value pairs to apply to this resource.

For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).

## Syntax
<a name="aws-properties-apigateway-apikey-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-apigateway-apikey-tag-syntax.json"></a>

```
{
  "[Key](#cfn-apigateway-apikey-tag-key)" : String,
  "[Value](#cfn-apigateway-apikey-tag-value)" : String
}
```

### YAML
<a name="aws-properties-apigateway-apikey-tag-syntax.yaml"></a>

```
  [Key](#cfn-apigateway-apikey-tag-key): String
  [Value](#cfn-apigateway-apikey-tag-value): String
```

## Properties
<a name="aws-properties-apigateway-apikey-tag-properties"></a>

`Key`  <a name="cfn-apigateway-apikey-tag-key"></a>
A string you can use to assign a value. The combination of tag keys and values can help you organize and categorize your resources.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-apigateway-apikey-tag-value"></a>
The value for the specified tag key.  
*Required*: Yes  
*Type*: String  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ApiGateway::Authorizer
<a name="aws-resource-apigateway-authorizer"></a>

The `AWS::ApiGateway::Authorizer` resource creates an authorization layer that API Gateway activates for methods that have authorization enabled. API Gateway activates the authorizer when a client calls those methods.

## Syntax
<a name="aws-resource-apigateway-authorizer-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-apigateway-authorizer-syntax.json"></a>

```
{
  "Type" : "AWS::ApiGateway::Authorizer",
  "Properties" : {
      "[AuthorizerCredentials](#cfn-apigateway-authorizer-authorizercredentials)" : String,
      "[AuthorizerResultTtlInSeconds](#cfn-apigateway-authorizer-authorizerresultttlinseconds)" : Integer,
      "[AuthorizerUri](#cfn-apigateway-authorizer-authorizeruri)" : String,
      "[AuthType](#cfn-apigateway-authorizer-authtype)" : String,
      "[IdentitySource](#cfn-apigateway-authorizer-identitysource)" : String,
      "[IdentityValidationExpression](#cfn-apigateway-authorizer-identityvalidationexpression)" : String,
      "[Name](#cfn-apigateway-authorizer-name)" : String,
      "[ProviderARNs](#cfn-apigateway-authorizer-providerarns)" : [ String, ... ],
      "[RestApiId](#cfn-apigateway-authorizer-restapiid)" : String,
      "[Type](#cfn-apigateway-authorizer-type)" : String
    }
}
```

### YAML
<a name="aws-resource-apigateway-authorizer-syntax.yaml"></a>

```
Type: AWS::ApiGateway::Authorizer
Properties:
  [AuthorizerCredentials](#cfn-apigateway-authorizer-authorizercredentials): String
  [AuthorizerResultTtlInSeconds](#cfn-apigateway-authorizer-authorizerresultttlinseconds): Integer
  [AuthorizerUri](#cfn-apigateway-authorizer-authorizeruri): String
  [AuthType](#cfn-apigateway-authorizer-authtype): String
  [IdentitySource](#cfn-apigateway-authorizer-identitysource): String
  [IdentityValidationExpression](#cfn-apigateway-authorizer-identityvalidationexpression): String
  [Name](#cfn-apigateway-authorizer-name): String
  [ProviderARNs](#cfn-apigateway-authorizer-providerarns): 
    - String
  [RestApiId](#cfn-apigateway-authorizer-restapiid): String
  [Type](#cfn-apigateway-authorizer-type): String
```

## Properties
<a name="aws-resource-apigateway-authorizer-properties"></a>

`AuthorizerCredentials`  <a name="cfn-apigateway-authorizer-authorizercredentials"></a>
Specifies the required credentials as an IAM role for API Gateway to invoke the authorizer. To specify an IAM role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AuthorizerResultTtlInSeconds`  <a name="cfn-apigateway-authorizer-authorizerresultttlinseconds"></a>
The TTL in seconds of cached authorizer results. If it equals 0, authorization caching is disabled. If it is greater than 0, API Gateway will cache authorizer responses. If this field is not set, the default value is 300. The maximum value is 3600, or 1 hour.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AuthorizerUri`  <a name="cfn-apigateway-authorizer-authorizeruri"></a>
Specifies the authorizer's Uniform Resource Identifier (URI). For `TOKEN` or `REQUEST` authorizers, this must be a well-formed Lambda function URI, for example, `arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:{account_id}:function:{lambda_function_name}/invocations`. In general, the URI has this form `arn:aws:apigateway:{region}:lambda:path/{service_api}`, where `{region}` is the same as the region hosting the Lambda function, `path` indicates that the remaining substring in the URI should be treated as the path to the resource, including the initial `/`. For Lambda functions, this is usually of the form `/2015-03-31/functions/[FunctionARN]/invocations`.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AuthType`  <a name="cfn-apigateway-authorizer-authtype"></a>
Optional customer-defined field, used in OpenAPI imports and exports without functional impact.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`IdentitySource`  <a name="cfn-apigateway-authorizer-identitysource"></a>
The identity source for which authorization is requested. For a `TOKEN` or `COGNITO_USER_POOLS` authorizer, this is required and specifies the request header mapping expression for the custom header holding the authorization token submitted by the client. For example, if the token header name is `Auth`, the header mapping expression is `method.request.header.Auth`. For the `REQUEST` authorizer, this is required when authorization caching is enabled. The value is a comma-separated string of one or more mapping expressions of the specified request parameters. For example, if an `Auth` header, a `Name` query string parameter are defined as identity sources, this value is `method.request.header.Auth, method.request.querystring.Name`. These parameters will be used to derive the authorization caching key and to perform runtime validation of the `REQUEST` authorizer by verifying all of the identity-related request parameters are present, not null and non-empty. Only when this is true does the authorizer invoke the authorizer Lambda function, otherwise, it returns a 401 Unauthorized response without calling the Lambda function. The valid value is a string of comma-separated mapping expressions of the specified request parameters. When the authorization caching is not enabled, this property is optional.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`IdentityValidationExpression`  <a name="cfn-apigateway-authorizer-identityvalidationexpression"></a>
A validation expression for the incoming identity token. For `TOKEN` authorizers, this value is a regular expression. For `COGNITO_USER_POOLS` authorizers, API Gateway will match the `aud` field of the incoming token from the client against the specified regular expression. It will invoke the authorizer's Lambda function when there is a match. Otherwise, it will return a 401 Unauthorized response without calling the Lambda function. The validation expression does not apply to the `REQUEST` authorizer.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Name`  <a name="cfn-apigateway-authorizer-name"></a>
The name of the authorizer.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ProviderARNs`  <a name="cfn-apigateway-authorizer-providerarns"></a>
A list of the Amazon Cognito user pool ARNs for the `COGNITO_USER_POOLS` authorizer. Each element is of this format: `arn:aws:cognito-idp:{region}:{account_id}:userpool/{user_pool_id}`. For a `TOKEN` or `REQUEST` authorizer, this is not defined.   
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RestApiId`  <a name="cfn-apigateway-authorizer-restapiid"></a>
The string identifier of the associated RestApi.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Type`  <a name="cfn-apigateway-authorizer-type"></a>
The authorizer type. Valid values are `TOKEN` for a Lambda function using a single authorization token submitted in a custom header, `REQUEST` for a Lambda function using incoming request parameters, and `COGNITO_USER_POOLS` for using an Amazon Cognito user pool.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-apigateway-authorizer-return-values"></a>

### Ref
<a name="aws-resource-apigateway-authorizer-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the authorizer's ID, such as `abcde1`.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-apigateway-authorizer-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-apigateway-authorizer-return-values-fn--getatt-fn--getatt"></a>

`AuthorizerId`  <a name="AuthorizerId-fn::getatt"></a>
The ID for the authorizer. For example: `abc123`.

## Examples
<a name="aws-resource-apigateway-authorizer--examples"></a>



### Create authorizer
<a name="aws-resource-apigateway-authorizer--examples--Create_authorizer"></a>

The following examples create a custom authorizer that is an AWS Lambda function.

#### JSON
<a name="aws-resource-apigateway-authorizer--examples--Create_authorizer--json"></a>

```
{
    "Authorizer": {
        "Type": "AWS::ApiGateway::Authorizer",
        "Properties": {
            "AuthorizerCredentials": {
                "Fn::GetAtt": [
                    "LambdaInvocationRole",
                    "Arn"
                ]
            },
            "AuthorizerResultTtlInSeconds": "300",
            "AuthorizerUri": {
                "Fn::Join": [
                    "",
                    [
                        "arn:aws:apigateway:",
                        {
                            "Ref": "AWS::Region"
                        },
                        ":lambda:path/2015-03-31/functions/",
                        {
                            "Fn::GetAtt": [
                                "LambdaAuthorizer",
                                "Arn"
                            ]
                        },
                        "/invocations"
                    ]
                ]
            },
            "Type": "TOKEN",
            "IdentitySource": "method.request.header.Auth",
            "Name": "DefaultAuthorizer",
            "RestApiId": {
                "Ref": "RestApi"
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-apigateway-authorizer--examples--Create_authorizer--yaml"></a>

```
Authorizer:
  Type: 'AWS::ApiGateway::Authorizer'
  Properties:
    AuthorizerCredentials: !GetAtt 
      - LambdaInvocationRole
      - Arn
    AuthorizerResultTtlInSeconds: '300'
    AuthorizerUri: !Join 
      - ''
      - - 'arn:aws:apigateway:'
        - !Ref 'AWS::Region'
        - ':lambda:path/2015-03-31/functions/'
        - !GetAtt 
          - LambdaAuthorizer
          - Arn
        - /invocations
    Type: TOKEN
    IdentitySource: method.request.header.Auth
    Name: DefaultAuthorizer
    RestApiId: !Ref RestApi
```

## See also
<a name="aws-resource-apigateway-authorizer--seealso"></a>
+ [authorizer:create](https://docs.aws.amazon.com/apigateway/latest/api/API_CreateAuthorizer.html) in the *Amazon API Gateway REST API Reference*



# AWS::ApiGateway::BasePathMapping
<a name="aws-resource-apigateway-basepathmapping"></a>

The `AWS::ApiGateway::BasePathMapping` resource creates a base path that clients who call your API must use in the invocation URL. Supported only for public custom domain names.

## Syntax
<a name="aws-resource-apigateway-basepathmapping-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-apigateway-basepathmapping-syntax.json"></a>

```
{
  "Type" : "AWS::ApiGateway::BasePathMapping",
  "Properties" : {
      "[BasePath](#cfn-apigateway-basepathmapping-basepath)" : String,
      "[DomainName](#cfn-apigateway-basepathmapping-domainname)" : String,
      "[RestApiId](#cfn-apigateway-basepathmapping-restapiid)" : String,
      "[Stage](#cfn-apigateway-basepathmapping-stage)" : String
    }
}
```

### YAML
<a name="aws-resource-apigateway-basepathmapping-syntax.yaml"></a>

```
Type: AWS::ApiGateway::BasePathMapping
Properties:
  [BasePath](#cfn-apigateway-basepathmapping-basepath): String
  [DomainName](#cfn-apigateway-basepathmapping-domainname): String
  [RestApiId](#cfn-apigateway-basepathmapping-restapiid): String
  [Stage](#cfn-apigateway-basepathmapping-stage): String
```

## Properties
<a name="aws-resource-apigateway-basepathmapping-properties"></a>

`BasePath`  <a name="cfn-apigateway-basepathmapping-basepath"></a>
The base path name that callers of the API must provide as part of the URL after the domain name.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DomainName`  <a name="cfn-apigateway-basepathmapping-domainname"></a>
The domain name of the BasePathMapping resource to be described.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`RestApiId`  <a name="cfn-apigateway-basepathmapping-restapiid"></a>
The string identifier of the associated RestApi.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Stage`  <a name="cfn-apigateway-basepathmapping-stage"></a>
The name of the associated stage.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-resource-apigateway-basepathmapping--seealso"></a>
+ [basepathmapping:create](https://docs.aws.amazon.com/apigateway/latest/api/API_CreateBasePathMapping.html) in the *Amazon API Gateway REST API Reference*



# AWS::ApiGateway::BasePathMappingV2
<a name="aws-resource-apigateway-basepathmappingv2"></a>

The `AWS::ApiGateway::BasePathMappingV2` resource creates a base path that clients who call your API must use in the invocation URL. Supported only for private custom domain names.

## Syntax
<a name="aws-resource-apigateway-basepathmappingv2-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-apigateway-basepathmappingv2-syntax.json"></a>

```
{
  "Type" : "AWS::ApiGateway::BasePathMappingV2",
  "Properties" : {
      "[BasePath](#cfn-apigateway-basepathmappingv2-basepath)" : String,
      "[DomainNameArn](#cfn-apigateway-basepathmappingv2-domainnamearn)" : String,
      "[RestApiId](#cfn-apigateway-basepathmappingv2-restapiid)" : String,
      "[Stage](#cfn-apigateway-basepathmappingv2-stage)" : String
    }
}
```

### YAML
<a name="aws-resource-apigateway-basepathmappingv2-syntax.yaml"></a>

```
Type: AWS::ApiGateway::BasePathMappingV2
Properties:
  [BasePath](#cfn-apigateway-basepathmappingv2-basepath): String
  [DomainNameArn](#cfn-apigateway-basepathmappingv2-domainnamearn): String
  [RestApiId](#cfn-apigateway-basepathmappingv2-restapiid): String
  [Stage](#cfn-apigateway-basepathmappingv2-stage): String
```

## Properties
<a name="aws-resource-apigateway-basepathmappingv2-properties"></a>

`BasePath`  <a name="cfn-apigateway-basepathmappingv2-basepath"></a>
The base path name that callers of the private API must provide as part of the URL after the domain name.   
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DomainNameArn`  <a name="cfn-apigateway-basepathmappingv2-domainnamearn"></a>
The ARN of the domain name for the BasePathMappingV2 resource to be described.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`RestApiId`  <a name="cfn-apigateway-basepathmappingv2-restapiid"></a>
The private API's identifier. This identifier is unique across all of your APIs in API Gateway.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Stage`  <a name="cfn-apigateway-basepathmappingv2-stage"></a>
Represents a unique identifier for a version of a deployed private RestApi that is callable by users. The Stage must depend on the `RestApi`'s stage. To create a dependency, add a DependsOn attribute to the BasePathMappingV2 resource.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Examples
<a name="aws-resource-apigateway-basepathmappingv2--examples"></a>



### Base path mapping creation example
<a name="aws-resource-apigateway-basepathmappingv2--examples--Base_path_mapping_creation_example"></a>

The following example creates a `BasePathMappingV2` resource called `MyBasePathMappingV2`.

#### JSON
<a name="aws-resource-apigateway-basepathmappingv2--examples--Base_path_mapping_creation_example--json"></a>

```
{
    "MyBasePathMappingV2": {
        "Type": "AWS::ApiGateway::BasePathMappingV2",
        "DependsOn": [
            "PrivateApiStage"
         ],
        "Properties": {
            "BasePath": "prod",
            "DomainNameArn": {
                "Fn::GetAtt": [
                    "MyDomainName",
                    "DomainNameArn"
                ]
            },
            "RestApiId": "a1b2c3",
            "Stage": "users"
        }
    }
}
```

#### YAML
<a name="aws-resource-apigateway-basepathmappingv2--examples--Base_path_mapping_creation_example--yaml"></a>

```
MyBasePathMappingV2:
  Type: AWS::ApiGateway::BasePathMappingV2
  DependsOn:
   - PrivateApiStage
  Properties:
    BasePath: prod
    DomainNameArn: !GetAtt MyDomainName.DomainNameArn
    RestApiId: a1b2c3
    Stage: users
```

# AWS::ApiGateway::ClientCertificate
<a name="aws-resource-apigateway-clientcertificate"></a>

The `AWS::ApiGateway::ClientCertificate` resource creates a client certificate that API Gateway uses to configure client-side SSL authentication for sending requests to the integration endpoint.

## Syntax
<a name="aws-resource-apigateway-clientcertificate-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-apigateway-clientcertificate-syntax.json"></a>

```
{
  "Type" : "AWS::ApiGateway::ClientCertificate",
  "Properties" : {
      "[Description](#cfn-apigateway-clientcertificate-description)" : String,
      "[Tags](#cfn-apigateway-clientcertificate-tags)" : [ Tag, ... ]
    }
}
```

### YAML
<a name="aws-resource-apigateway-clientcertificate-syntax.yaml"></a>

```
Type: AWS::ApiGateway::ClientCertificate
Properties:
  [Description](#cfn-apigateway-clientcertificate-description): String
  [Tags](#cfn-apigateway-clientcertificate-tags): 
    - Tag
```

## Properties
<a name="aws-resource-apigateway-clientcertificate-properties"></a>

`Description`  <a name="cfn-apigateway-clientcertificate-description"></a>
The description of the client certificate.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Tags`  <a name="cfn-apigateway-clientcertificate-tags"></a>
The collection of tags. Each tag element is associated with a given resource.  
*Required*: No  
*Type*: Array of [Tag](aws-properties-apigateway-clientcertificate-tag.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-apigateway-clientcertificate-return-values"></a>

### Ref
<a name="aws-resource-apigateway-clientcertificate-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the client certificate name, such as `abc123`.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-apigateway-clientcertificate-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-apigateway-clientcertificate-return-values-fn--getatt-fn--getatt"></a>

`ClientCertificateId`  <a name="ClientCertificateId-fn::getatt"></a>
The ID for the client certificate. For example: `abc123`.

## Examples
<a name="aws-resource-apigateway-clientcertificate--examples"></a>



### Create client certificate
<a name="aws-resource-apigateway-clientcertificate--examples--Create_client_certificate"></a>

The following example creates a client certificate that you can use with an API Gateway deployment and stage.

#### JSON
<a name="aws-resource-apigateway-clientcertificate--examples--Create_client_certificate--json"></a>

```
{
    "TestClientCertificate": {
        "Type": "AWS::ApiGateway::ClientCertificate",
        "Properties": {
            "Description": "A test client certificate"
        }
    }
}
```

#### YAML
<a name="aws-resource-apigateway-clientcertificate--examples--Create_client_certificate--yaml"></a>

```
TestClientCertificate:
  Type: 'AWS::ApiGateway::ClientCertificate'
  Properties:
    Description: A test client certificate
```

## See also
<a name="aws-resource-apigateway-clientcertificate--seealso"></a>
+ [clientcertificate:generate](https://docs.aws.amazon.com/apigateway/latest/api/API_GenerateClientCertificate.html) in the *Amazon API Gateway REST API Reference*



# AWS::ApiGateway::ClientCertificate Tag
<a name="aws-properties-apigateway-clientcertificate-tag"></a>

An array of key-value pairs to apply to this resource.

For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).

## Syntax
<a name="aws-properties-apigateway-clientcertificate-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-apigateway-clientcertificate-tag-syntax.json"></a>

```
{
  "[Key](#cfn-apigateway-clientcertificate-tag-key)" : String,
  "[Value](#cfn-apigateway-clientcertificate-tag-value)" : String
}
```

### YAML
<a name="aws-properties-apigateway-clientcertificate-tag-syntax.yaml"></a>

```
  [Key](#cfn-apigateway-clientcertificate-tag-key): String
  [Value](#cfn-apigateway-clientcertificate-tag-value): String
```

## Properties
<a name="aws-properties-apigateway-clientcertificate-tag-properties"></a>

`Key`  <a name="cfn-apigateway-clientcertificate-tag-key"></a>
A string you can use to assign a value. The combination of tag keys and values can help you organize and categorize your resources.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-apigateway-clientcertificate-tag-value"></a>
The value for the specified tag key.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ApiGateway::Deployment
<a name="aws-resource-apigateway-deployment"></a>

The `AWS::ApiGateway::Deployment` resource deploys an API Gateway `RestApi` resource to a stage so that clients can call the API over the internet. The stage acts as an environment.

## Syntax
<a name="aws-resource-apigateway-deployment-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-apigateway-deployment-syntax.json"></a>

```
{
  "Type" : "AWS::ApiGateway::Deployment",
  "Properties" : {
      "[DeploymentCanarySettings](#cfn-apigateway-deployment-deploymentcanarysettings)" : DeploymentCanarySettings,
      "[Description](#cfn-apigateway-deployment-description)" : String,
      "[RestApiId](#cfn-apigateway-deployment-restapiid)" : String,
      "[StageDescription](#cfn-apigateway-deployment-stagedescription)" : StageDescription,
      "[StageName](#cfn-apigateway-deployment-stagename)" : String
    }
}
```

### YAML
<a name="aws-resource-apigateway-deployment-syntax.yaml"></a>

```
Type: AWS::ApiGateway::Deployment
Properties:
  [DeploymentCanarySettings](#cfn-apigateway-deployment-deploymentcanarysettings): 
    DeploymentCanarySettings
  [Description](#cfn-apigateway-deployment-description): String
  [RestApiId](#cfn-apigateway-deployment-restapiid): String
  [StageDescription](#cfn-apigateway-deployment-stagedescription): 
    StageDescription
  [StageName](#cfn-apigateway-deployment-stagename): String
```

## Properties
<a name="aws-resource-apigateway-deployment-properties"></a>

`DeploymentCanarySettings`  <a name="cfn-apigateway-deployment-deploymentcanarysettings"></a>
The input configuration for a canary deployment.  
*Required*: No  
*Type*: [DeploymentCanarySettings](aws-properties-apigateway-deployment-deploymentcanarysettings.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Description`  <a name="cfn-apigateway-deployment-description"></a>
The description for the Deployment resource to create.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RestApiId`  <a name="cfn-apigateway-deployment-restapiid"></a>
The string identifier of the associated RestApi.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`StageDescription`  <a name="cfn-apigateway-deployment-stagedescription"></a>
The description of the Stage resource for the Deployment resource to create. To specify a stage description, you must also provide a stage name.  
*Required*: Conditional  
*Type*: [StageDescription](aws-properties-apigateway-deployment-stagedescription.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`StageName`  <a name="cfn-apigateway-deployment-stagename"></a>
The name of the Stage resource for the Deployment resource to create.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-apigateway-deployment-return-values"></a>

### Ref
<a name="aws-resource-apigateway-deployment-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the deployment ID, such as `123abc`.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-apigateway-deployment-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-apigateway-deployment-return-values-fn--getatt-fn--getatt"></a>

`DeploymentId`  <a name="DeploymentId-fn::getatt"></a>
The ID for the deployment. For example: `abc123`.

## Examples
<a name="aws-resource-apigateway-deployment--examples"></a>

The following sections provide examples for declaring API Gateway deployments.

**Topics**
+ [Deployment with an empty embedded stage](#aws-resource-apigateway-deployment--examples--Deployment_with_an_empty_embedded_stage)
+ [AWS::ApiGateway::Method Dependency](#aws-resource-apigateway-deployment--examples--AWS::ApiGateway::Method_Dependency)

### Deployment with an empty embedded stage
<a name="aws-resource-apigateway-deployment--examples--Deployment_with_an_empty_embedded_stage"></a>

The following example deploys the `MyApi` API to a stage named `DummyStage`.

#### JSON
<a name="aws-resource-apigateway-deployment--examples--Deployment_with_an_empty_embedded_stage--json"></a>

```
{
    "Deployment": {
        "Type": "AWS::ApiGateway::Deployment",
        "Properties": {
            "RestApiId": {
                "Ref": "MyApi"
            },
            "Description": "My deployment",
            "StageName": "DummyStage"
        }
    }
}
```

#### YAML
<a name="aws-resource-apigateway-deployment--examples--Deployment_with_an_empty_embedded_stage--yaml"></a>

```
Deployment:
  Type: 'AWS::ApiGateway::Deployment'
  Properties:
    RestApiId: !Ref MyApi
    Description: My deployment
    StageName: DummyStage
```

### AWS::ApiGateway::Method Dependency
<a name="aws-resource-apigateway-deployment--examples--AWS::ApiGateway::Method_Dependency"></a>

If you create an [AWS::ApiGateway::RestApi](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-restapi.html) resource and its methods (using [AWS::ApiGateway::Method](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-method.html)) in the same template as your deployment, the deployment must depend on the `RestApi`'s methods. To create a dependency, add a `DependsOn` attribute to the deployment. If you don't, CloudFormation creates the deployment right after it creates the `RestApi` resource that doesn't contain any methods, and CloudFormation encounters the following error: `The REST API doesn't contain any methods`.

#### JSON
<a name="aws-resource-apigateway-deployment--examples--AWS::ApiGateway::Method_Dependency--json"></a>

```
{
    "Deployment": {
        "DependsOn": "MyMethod",
        "Type": "AWS::ApiGateway::Deployment",
        "Properties": {
            "RestApiId": {
                "Ref": "MyApi"
            },
            "Description": "My deployment",
            "StageName": "DummyStage"
        }
    }
}
```

#### YAML
<a name="aws-resource-apigateway-deployment--examples--AWS::ApiGateway::Method_Dependency--yaml"></a>

```
Deployment:
  DependsOn: MyMethod
  Type: 'AWS::ApiGateway::Deployment'
  Properties:
    RestApiId: !Ref MyApi
    Description: My deployment
    StageName: DummyStage
```

## See also
<a name="aws-resource-apigateway-deployment--seealso"></a>
+ [deployment:create](https://docs.aws.amazon.com/apigateway/latest/api/API_CreateDeployment.html) in the *Amazon API Gateway REST API Reference*



# AWS::ApiGateway::Deployment AccessLogSetting
<a name="aws-properties-apigateway-deployment-accesslogsetting"></a>

The `AccessLogSetting` property type specifies settings for logging access in this stage.

`AccessLogSetting` is a property of the [StageDescription](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription.html) property type.

## Syntax
<a name="aws-properties-apigateway-deployment-accesslogsetting-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-apigateway-deployment-accesslogsetting-syntax.json"></a>

```
{
  "[DestinationArn](#cfn-apigateway-deployment-accesslogsetting-destinationarn)" : String,
  "[Format](#cfn-apigateway-deployment-accesslogsetting-format)" : String
}
```

### YAML
<a name="aws-properties-apigateway-deployment-accesslogsetting-syntax.yaml"></a>

```
  [DestinationArn](#cfn-apigateway-deployment-accesslogsetting-destinationarn): String
  [Format](#cfn-apigateway-deployment-accesslogsetting-format): String
```

## Properties
<a name="aws-properties-apigateway-deployment-accesslogsetting-properties"></a>

`DestinationArn`  <a name="cfn-apigateway-deployment-accesslogsetting-destinationarn"></a>
The Amazon Resource Name (ARN) of the CloudWatch Logs log group or Kinesis Data Firehose delivery stream to receive access logs. If you specify a Kinesis Data Firehose delivery stream, the stream name must begin with `amazon-apigateway-`.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Format`  <a name="cfn-apigateway-deployment-accesslogsetting-format"></a>
A single line format of the access logs of data, as specified by selected \$1context variables. The format must include at least `$context.requestId`.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-apigateway-deployment-accesslogsetting--seealso"></a>
+ [accessLogSettings](https://docs.aws.amazon.com/apigateway/latest/api/API_Stage.html#accessLogSettings) in the *Amazon API Gateway REST API Reference*



# AWS::ApiGateway::Deployment CanarySetting
<a name="aws-properties-apigateway-deployment-canarysetting"></a>

The `CanarySetting` property type specifies settings for the canary deployment in this stage.

`CanarySetting` is a property of the [StageDescription](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription.html) property type.

## Syntax
<a name="aws-properties-apigateway-deployment-canarysetting-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-apigateway-deployment-canarysetting-syntax.json"></a>

```
{
  "[PercentTraffic](#cfn-apigateway-deployment-canarysetting-percenttraffic)" : Number,
  "[StageVariableOverrides](#cfn-apigateway-deployment-canarysetting-stagevariableoverrides)" : {Key: Value, ...},
  "[UseStageCache](#cfn-apigateway-deployment-canarysetting-usestagecache)" : Boolean
}
```

### YAML
<a name="aws-properties-apigateway-deployment-canarysetting-syntax.yaml"></a>

```
  [PercentTraffic](#cfn-apigateway-deployment-canarysetting-percenttraffic): Number
  [StageVariableOverrides](#cfn-apigateway-deployment-canarysetting-stagevariableoverrides): 
    Key: Value
  [UseStageCache](#cfn-apigateway-deployment-canarysetting-usestagecache): Boolean
```

## Properties
<a name="aws-properties-apigateway-deployment-canarysetting-properties"></a>

`PercentTraffic`  <a name="cfn-apigateway-deployment-canarysetting-percenttraffic"></a>
The percent (0-100) of traffic diverted to a canary deployment.  
*Required*: No  
*Type*: Number  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`StageVariableOverrides`  <a name="cfn-apigateway-deployment-canarysetting-stagevariableoverrides"></a>
Stage variables overridden for a canary release deployment, including new stage variables introduced in the canary. These stage variables are represented as a string-to-string map between stage variable names and their values.  
*Required*: No  
*Type*: Object of String  
*Pattern*: `[a-zA-Z0-9]+`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`UseStageCache`  <a name="cfn-apigateway-deployment-canarysetting-usestagecache"></a>
A Boolean flag to indicate whether the canary deployment uses the stage cache or not.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-apigateway-deployment-canarysetting--seealso"></a>
+ [Stage](https://docs.aws.amazon.com/apigateway/latest/api/API_Stage.html) in the *Amazon API Gateway REST API Reference*



# AWS::ApiGateway::Deployment DeploymentCanarySettings
<a name="aws-properties-apigateway-deployment-deploymentcanarysettings"></a>

The `DeploymentCanarySettings` property type specifies settings for the canary deployment.

## Syntax
<a name="aws-properties-apigateway-deployment-deploymentcanarysettings-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-apigateway-deployment-deploymentcanarysettings-syntax.json"></a>

```
{
  "[PercentTraffic](#cfn-apigateway-deployment-deploymentcanarysettings-percenttraffic)" : Number,
  "[StageVariableOverrides](#cfn-apigateway-deployment-deploymentcanarysettings-stagevariableoverrides)" : {Key: Value, ...},
  "[UseStageCache](#cfn-apigateway-deployment-deploymentcanarysettings-usestagecache)" : Boolean
}
```

### YAML
<a name="aws-properties-apigateway-deployment-deploymentcanarysettings-syntax.yaml"></a>

```
  [PercentTraffic](#cfn-apigateway-deployment-deploymentcanarysettings-percenttraffic): Number
  [StageVariableOverrides](#cfn-apigateway-deployment-deploymentcanarysettings-stagevariableoverrides): 
    Key: Value
  [UseStageCache](#cfn-apigateway-deployment-deploymentcanarysettings-usestagecache): Boolean
```

## Properties
<a name="aws-properties-apigateway-deployment-deploymentcanarysettings-properties"></a>

`PercentTraffic`  <a name="cfn-apigateway-deployment-deploymentcanarysettings-percenttraffic"></a>
The percentage (0.0-100.0) of traffic routed to the canary deployment.  
*Required*: No  
*Type*: Number  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`StageVariableOverrides`  <a name="cfn-apigateway-deployment-deploymentcanarysettings-stagevariableoverrides"></a>
A stage variable overrides used for the canary release deployment. They can override existing stage variables or add new stage variables for the canary release deployment. These stage variables are represented as a string-to-string map between stage variable names and their values.  
*Required*: No  
*Type*: Object of String  
*Pattern*: `[a-zA-Z0-9]+`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`UseStageCache`  <a name="cfn-apigateway-deployment-deploymentcanarysettings-usestagecache"></a>
A Boolean flag to indicate whether the canary release deployment uses the stage cache or not.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## See also
<a name="aws-properties-apigateway-deployment-deploymentcanarysettings--seealso"></a>
+ [CreateDeployment](https://docs.aws.amazon.com/apigateway/latest/api/API_CreateDeployment.html) in the *Amazon API Gateway REST API Reference*



# AWS::ApiGateway::Deployment MethodSetting
<a name="aws-properties-apigateway-deployment-methodsetting"></a>

The `MethodSetting` property type configures settings for all methods in a stage. If you modify this property type, you must create a new deployment for your API.

The `MethodSettings` property of the [Amazon API Gateway Deployment StageDescription](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription.html) property type contains a list of `MethodSetting` property types. 

## Syntax
<a name="aws-properties-apigateway-deployment-methodsetting-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-apigateway-deployment-methodsetting-syntax.json"></a>

```
{
  "[CacheDataEncrypted](#cfn-apigateway-deployment-methodsetting-cachedataencrypted)" : Boolean,
  "[CacheTtlInSeconds](#cfn-apigateway-deployment-methodsetting-cachettlinseconds)" : Integer,
  "[CachingEnabled](#cfn-apigateway-deployment-methodsetting-cachingenabled)" : Boolean,
  "[DataTraceEnabled](#cfn-apigateway-deployment-methodsetting-datatraceenabled)" : Boolean,
  "[HttpMethod](#cfn-apigateway-deployment-methodsetting-httpmethod)" : String,
  "[LoggingLevel](#cfn-apigateway-deployment-methodsetting-logginglevel)" : String,
  "[MetricsEnabled](#cfn-apigateway-deployment-methodsetting-metricsenabled)" : Boolean,
  "[ResourcePath](#cfn-apigateway-deployment-methodsetting-resourcepath)" : String,
  "[ThrottlingBurstLimit](#cfn-apigateway-deployment-methodsetting-throttlingburstlimit)" : Integer,
  "[ThrottlingRateLimit](#cfn-apigateway-deployment-methodsetting-throttlingratelimit)" : Number
}
```

### YAML
<a name="aws-properties-apigateway-deployment-methodsetting-syntax.yaml"></a>

```
  [CacheDataEncrypted](#cfn-apigateway-deployment-methodsetting-cachedataencrypted): Boolean
  [CacheTtlInSeconds](#cfn-apigateway-deployment-methodsetting-cachettlinseconds): Integer
  [CachingEnabled](#cfn-apigateway-deployment-methodsetting-cachingenabled): Boolean
  [DataTraceEnabled](#cfn-apigateway-deployment-methodsetting-datatraceenabled): Boolean
  [HttpMethod](#cfn-apigateway-deployment-methodsetting-httpmethod): String
  [LoggingLevel](#cfn-apigateway-deployment-methodsetting-logginglevel): String
  [MetricsEnabled](#cfn-apigateway-deployment-methodsetting-metricsenabled): Boolean
  [ResourcePath](#cfn-apigateway-deployment-methodsetting-resourcepath): String
  [ThrottlingBurstLimit](#cfn-apigateway-deployment-methodsetting-throttlingburstlimit): Integer
  [ThrottlingRateLimit](#cfn-apigateway-deployment-methodsetting-throttlingratelimit): Number
```

## Properties
<a name="aws-properties-apigateway-deployment-methodsetting-properties"></a>

`CacheDataEncrypted`  <a name="cfn-apigateway-deployment-methodsetting-cachedataencrypted"></a>
Specifies whether the cached responses are encrypted.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CacheTtlInSeconds`  <a name="cfn-apigateway-deployment-methodsetting-cachettlinseconds"></a>
Specifies the time to live (TTL), in seconds, for cached responses. The higher the TTL, the longer the response will be cached.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CachingEnabled`  <a name="cfn-apigateway-deployment-methodsetting-cachingenabled"></a>
Specifies whether responses should be cached and returned for requests. A cache cluster must be enabled on the stage for responses to be cached.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DataTraceEnabled`  <a name="cfn-apigateway-deployment-methodsetting-datatraceenabled"></a>
Specifies whether data trace logging is enabled for this method, which affects the log entries pushed to Amazon CloudWatch Logs. This can be useful to troubleshoot APIs, but can result in logging sensitive data. We recommend that you don't enable this option for production APIs.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`HttpMethod`  <a name="cfn-apigateway-deployment-methodsetting-httpmethod"></a>
The HTTP method.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LoggingLevel`  <a name="cfn-apigateway-deployment-methodsetting-logginglevel"></a>
Specifies the logging level for this method, which affects the log entries pushed to Amazon CloudWatch Logs. Valid values are `OFF`, `ERROR`, and `INFO`. Choose `ERROR` to write only error-level entries to CloudWatch Logs, or choose `INFO` to include all `ERROR` events as well as extra informational events.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MetricsEnabled`  <a name="cfn-apigateway-deployment-methodsetting-metricsenabled"></a>
Specifies whether Amazon CloudWatch metrics are enabled for this method.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ResourcePath`  <a name="cfn-apigateway-deployment-methodsetting-resourcepath"></a>
The resource path for this method. Forward slashes (`/`) are encoded as `~1` and the initial slash must include a forward slash. For example, the path value `/resource/subresource` must be encoded as `/~1resource~1subresource`. To specify the root path, use only a slash (`/`).  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ThrottlingBurstLimit`  <a name="cfn-apigateway-deployment-methodsetting-throttlingburstlimit"></a>
Specifies the throttling burst limit.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ThrottlingRateLimit`  <a name="cfn-apigateway-deployment-methodsetting-throttlingratelimit"></a>
Specifies the throttling rate limit.  
*Required*: No  
*Type*: Number  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-apigateway-deployment-methodsetting--seealso"></a>
+ [Stage](https://docs.aws.amazon.com/apigateway/latest/api/API_Stage.html) in the *Amazon API Gateway REST API Reference*



# AWS::ApiGateway::Deployment StageDescription
<a name="aws-properties-apigateway-deployment-stagedescription"></a>

`StageDescription` is a property of the [AWS::ApiGateway::Deployment](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-deployment.html) resource that configures a deployment stage. 

## Syntax
<a name="aws-properties-apigateway-deployment-stagedescription-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-apigateway-deployment-stagedescription-syntax.json"></a>

```
{
  "[AccessLogSetting](#cfn-apigateway-deployment-stagedescription-accesslogsetting)" : AccessLogSetting,
  "[CacheClusterEnabled](#cfn-apigateway-deployment-stagedescription-cacheclusterenabled)" : Boolean,
  "[CacheClusterSize](#cfn-apigateway-deployment-stagedescription-cacheclustersize)" : String,
  "[CacheDataEncrypted](#cfn-apigateway-deployment-stagedescription-cachedataencrypted)" : Boolean,
  "[CacheTtlInSeconds](#cfn-apigateway-deployment-stagedescription-cachettlinseconds)" : Integer,
  "[CachingEnabled](#cfn-apigateway-deployment-stagedescription-cachingenabled)" : Boolean,
  "[CanarySetting](#cfn-apigateway-deployment-stagedescription-canarysetting)" : CanarySetting,
  "[ClientCertificateId](#cfn-apigateway-deployment-stagedescription-clientcertificateid)" : String,
  "[DataTraceEnabled](#cfn-apigateway-deployment-stagedescription-datatraceenabled)" : Boolean,
  "[Description](#cfn-apigateway-deployment-stagedescription-description)" : String,
  "[DocumentationVersion](#cfn-apigateway-deployment-stagedescription-documentationversion)" : String,
  "[LoggingLevel](#cfn-apigateway-deployment-stagedescription-logginglevel)" : String,
  "[MethodSettings](#cfn-apigateway-deployment-stagedescription-methodsettings)" : [ MethodSetting, ... ],
  "[MetricsEnabled](#cfn-apigateway-deployment-stagedescription-metricsenabled)" : Boolean,
  "[Tags](#cfn-apigateway-deployment-stagedescription-tags)" : [ Tag, ... ],
  "[ThrottlingBurstLimit](#cfn-apigateway-deployment-stagedescription-throttlingburstlimit)" : Integer,
  "[ThrottlingRateLimit](#cfn-apigateway-deployment-stagedescription-throttlingratelimit)" : Number,
  "[TracingEnabled](#cfn-apigateway-deployment-stagedescription-tracingenabled)" : Boolean,
  "[Variables](#cfn-apigateway-deployment-stagedescription-variables)" : {Key: Value, ...}
}
```

### YAML
<a name="aws-properties-apigateway-deployment-stagedescription-syntax.yaml"></a>

```
  [AccessLogSetting](#cfn-apigateway-deployment-stagedescription-accesslogsetting): 
    AccessLogSetting
  [CacheClusterEnabled](#cfn-apigateway-deployment-stagedescription-cacheclusterenabled): Boolean
  [CacheClusterSize](#cfn-apigateway-deployment-stagedescription-cacheclustersize): String
  [CacheDataEncrypted](#cfn-apigateway-deployment-stagedescription-cachedataencrypted): Boolean
  [CacheTtlInSeconds](#cfn-apigateway-deployment-stagedescription-cachettlinseconds): Integer
  [CachingEnabled](#cfn-apigateway-deployment-stagedescription-cachingenabled): Boolean
  [CanarySetting](#cfn-apigateway-deployment-stagedescription-canarysetting): 
    CanarySetting
  [ClientCertificateId](#cfn-apigateway-deployment-stagedescription-clientcertificateid): String
  [DataTraceEnabled](#cfn-apigateway-deployment-stagedescription-datatraceenabled): Boolean
  [Description](#cfn-apigateway-deployment-stagedescription-description): String
  [DocumentationVersion](#cfn-apigateway-deployment-stagedescription-documentationversion): String
  [LoggingLevel](#cfn-apigateway-deployment-stagedescription-logginglevel): String
  [MethodSettings](#cfn-apigateway-deployment-stagedescription-methodsettings): 
    - MethodSetting
  [MetricsEnabled](#cfn-apigateway-deployment-stagedescription-metricsenabled): Boolean
  [Tags](#cfn-apigateway-deployment-stagedescription-tags): 
    - Tag
  [ThrottlingBurstLimit](#cfn-apigateway-deployment-stagedescription-throttlingburstlimit): Integer
  [ThrottlingRateLimit](#cfn-apigateway-deployment-stagedescription-throttlingratelimit): Number
  [TracingEnabled](#cfn-apigateway-deployment-stagedescription-tracingenabled): Boolean
  [Variables](#cfn-apigateway-deployment-stagedescription-variables): 
    Key: Value
```

## Properties
<a name="aws-properties-apigateway-deployment-stagedescription-properties"></a>

`AccessLogSetting`  <a name="cfn-apigateway-deployment-stagedescription-accesslogsetting"></a>
Specifies settings for logging access in this stage.  
*Required*: No  
*Type*: [AccessLogSetting](aws-properties-apigateway-deployment-accesslogsetting.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CacheClusterEnabled`  <a name="cfn-apigateway-deployment-stagedescription-cacheclusterenabled"></a>
Specifies whether a cache cluster is enabled for the stage. To activate a method-level cache, set `CachingEnabled` to `true` for a method.   
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CacheClusterSize`  <a name="cfn-apigateway-deployment-stagedescription-cacheclustersize"></a>
The size of the stage's cache cluster. For more information, see [cacheClusterSize](https://docs.aws.amazon.com/apigateway/latest/api/API_CreateStage.html#apigw-CreateStage-request-cacheClusterSize) in the *API Gateway API Reference*.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CacheDataEncrypted`  <a name="cfn-apigateway-deployment-stagedescription-cachedataencrypted"></a>
Indicates whether the cached responses are encrypted.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CacheTtlInSeconds`  <a name="cfn-apigateway-deployment-stagedescription-cachettlinseconds"></a>
The time-to-live (TTL) period, in seconds, that specifies how long API Gateway caches responses.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CachingEnabled`  <a name="cfn-apigateway-deployment-stagedescription-cachingenabled"></a>
Indicates whether responses are cached and returned for requests. You must enable a cache cluster on the stage to cache responses. For more information, see [Enable API Gateway Caching in a Stage to Enhance API Performance](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-caching.html) in the *API Gateway Developer Guide*.   
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CanarySetting`  <a name="cfn-apigateway-deployment-stagedescription-canarysetting"></a>
Specifies settings for the canary deployment in this stage.  
*Required*: No  
*Type*: [CanarySetting](aws-properties-apigateway-deployment-canarysetting.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ClientCertificateId`  <a name="cfn-apigateway-deployment-stagedescription-clientcertificateid"></a>
The identifier of the client certificate that API Gateway uses to call your integration endpoints in the stage.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DataTraceEnabled`  <a name="cfn-apigateway-deployment-stagedescription-datatraceenabled"></a>
Indicates whether data trace logging is enabled for methods in the stage. API Gateway pushes these logs to Amazon CloudWatch Logs.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Description`  <a name="cfn-apigateway-deployment-stagedescription-description"></a>
A description of the purpose of the stage.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DocumentationVersion`  <a name="cfn-apigateway-deployment-stagedescription-documentationversion"></a>
The version identifier of the API documentation snapshot.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LoggingLevel`  <a name="cfn-apigateway-deployment-stagedescription-logginglevel"></a>
The logging level for this method. For valid values, see the `loggingLevel` property of the [MethodSetting](https://docs.aws.amazon.com/apigateway/latest/api/API_MethodSetting.html) resource in the *Amazon API Gateway API Reference*.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MethodSettings`  <a name="cfn-apigateway-deployment-stagedescription-methodsettings"></a>
Configures settings for all of the stage's methods.  
*Required*: No  
*Type*: Array of [MethodSetting](aws-properties-apigateway-deployment-methodsetting.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MetricsEnabled`  <a name="cfn-apigateway-deployment-stagedescription-metricsenabled"></a>
Indicates whether Amazon CloudWatch metrics are enabled for methods in the stage.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Tags`  <a name="cfn-apigateway-deployment-stagedescription-tags"></a>
An array of arbitrary tags (key-value pairs) to associate with the stage.  
*Required*: No  
*Type*: Array of [Tag](aws-properties-apigateway-deployment-tag.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ThrottlingBurstLimit`  <a name="cfn-apigateway-deployment-stagedescription-throttlingburstlimit"></a>
The target request burst rate limit. This allows more requests through for a period of time than the target rate limit. For more information, see [Manage API Request Throttling](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-request-throttling.html) in the *API Gateway Developer Guide*.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ThrottlingRateLimit`  <a name="cfn-apigateway-deployment-stagedescription-throttlingratelimit"></a>
The target request steady-state rate limit. For more information, see [Manage API Request Throttling](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-request-throttling.html) in the *API Gateway Developer Guide*.  
*Required*: No  
*Type*: Number  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TracingEnabled`  <a name="cfn-apigateway-deployment-stagedescription-tracingenabled"></a>
Specifies whether active tracing with X-ray is enabled for this stage.  
For more information, see [Trace API Gateway API Execution with AWS X-Ray](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-xray.html) in the *API Gateway Developer Guide*.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Variables`  <a name="cfn-apigateway-deployment-stagedescription-variables"></a>
A map that defines the stage variables. Variable names must consist of alphanumeric characters, and the values must match the following regular expression: `[A-Za-z0-9-._~:/?#&=,]+`.   
*Required*: No  
*Type*: Object of String  
*Pattern*: `[a-zA-Z0-9]+`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-apigateway-deployment-stagedescription--seealso"></a>
+ [Stage](https://docs.aws.amazon.com/apigateway/latest/api/API_Stage.html) in the *Amazon API Gateway REST API Reference*



# AWS::ApiGateway::Deployment Tag
<a name="aws-properties-apigateway-deployment-tag"></a>

An array of key-value pairs to apply to this resource.

For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).

## Syntax
<a name="aws-properties-apigateway-deployment-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-apigateway-deployment-tag-syntax.json"></a>

```
{
  "[Key](#cfn-apigateway-deployment-tag-key)" : String,
  "[Value](#cfn-apigateway-deployment-tag-value)" : String
}
```

### YAML
<a name="aws-properties-apigateway-deployment-tag-syntax.yaml"></a>

```
  [Key](#cfn-apigateway-deployment-tag-key): String
  [Value](#cfn-apigateway-deployment-tag-value): String
```

## Properties
<a name="aws-properties-apigateway-deployment-tag-properties"></a>

`Key`  <a name="cfn-apigateway-deployment-tag-key"></a>
A string you can use to assign a value. The combination of tag keys and values can help you organize and categorize your resources.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-apigateway-deployment-tag-value"></a>
The value for the specified tag key.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ApiGateway::DocumentationPart
<a name="aws-resource-apigateway-documentationpart"></a>

The `AWS::ApiGateway::DocumentationPart` resource creates a documentation part for an API. For more information, see [Representation of API Documentation in API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-documenting-api-content-representation.html) in the *API Gateway Developer Guide*.

## Syntax
<a name="aws-resource-apigateway-documentationpart-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-apigateway-documentationpart-syntax.json"></a>

```
{
  "Type" : "AWS::ApiGateway::DocumentationPart",
  "Properties" : {
      "[Location](#cfn-apigateway-documentationpart-location)" : Location,
      "[Properties](#cfn-apigateway-documentationpart-properties)" : String,
      "[RestApiId](#cfn-apigateway-documentationpart-restapiid)" : String
    }
}
```

### YAML
<a name="aws-resource-apigateway-documentationpart-syntax.yaml"></a>

```
Type: AWS::ApiGateway::DocumentationPart
Properties:
  [Location](#cfn-apigateway-documentationpart-location): 
    Location
  [Properties](#cfn-apigateway-documentationpart-properties): String
  [RestApiId](#cfn-apigateway-documentationpart-restapiid): String
```

## Properties
<a name="aws-resource-apigateway-documentationpart-properties"></a>

`Location`  <a name="cfn-apigateway-documentationpart-location"></a>
The location of the targeted API entity of the to-be-created documentation part.  
*Required*: Yes  
*Type*: [Location](aws-properties-apigateway-documentationpart-location.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Properties`  <a name="cfn-apigateway-documentationpart-properties"></a>
The new documentation content map of the targeted API entity. Enclosed key-value pairs are API-specific, but only OpenAPI-compliant key-value pairs can be exported and, hence, published.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RestApiId`  <a name="cfn-apigateway-documentationpart-restapiid"></a>
The string identifier of the associated RestApi.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-apigateway-documentationpart-return-values"></a>

### Ref
<a name="aws-resource-apigateway-documentationpart-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the ID of the documentation part, such as `abc123`.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-apigateway-documentationpart-return-values-fn--getatt"></a>

#### 
<a name="aws-resource-apigateway-documentationpart-return-values-fn--getatt-fn--getatt"></a>

`DocumentationPartId`  <a name="DocumentationPartId-fn::getatt"></a>
The ID for the documentation part.

## Examples
<a name="aws-resource-apigateway-documentationpart--examples"></a>



### Associate documentation part with documentation version
<a name="aws-resource-apigateway-documentationpart--examples--Associate_documentation_part_with_documentation_version"></a>

The following example associates a documentation part for an API entity with a documentation version.

#### JSON
<a name="aws-resource-apigateway-documentationpart--examples--Associate_documentation_part_with_documentation_version--json"></a>

```
{
    "Parameters": {
        "apiName": {
            "Type": "String"
        },
        "description": {
            "Type": "String"
        },
        "version": {
            "Type": "String"
        },
        "type": {
            "Type": "String"
        },
        "property": {
            "Type": "String"
        }
    },
    "Resources": {
        "RestApi": {
            "Type": "AWS::ApiGateway::RestApi",
            "Properties": {
                "Name": {
                    "Ref": "apiName"
                }
            }
        },
        "DocumentationPart": {
            "Type": "AWS::ApiGateway::DocumentationPart",
            "Properties": {
                "Location": {
                    "Type": {
                        "Ref": "type"
                    }
                },
                "RestApiId": {
                    "Ref": "RestApi"
                },
                "Properties": {
                    "Ref": "property"
                }
            }
        },
        "DocumentationVersion": {
            "Type": "AWS::ApiGateway::DocumentationVersion",
            "Properties": {
                "Description": {
                    "Ref": "description"
                },
                "DocumentationVersion": {
                    "Ref": "version"
                },
                "RestApiId": {
                    "Ref": "RestApi"
                }
            },
            "DependsOn": "DocumentationPart"
        }
    }
}
```

#### YAML
<a name="aws-resource-apigateway-documentationpart--examples--Associate_documentation_part_with_documentation_version--yaml"></a>

```
Parameters:
  apiName:
    Type: String
  description:
    Type: String
  version:
    Type: String
  type:
    Type: String
  property:
    Type: String
Resources:
  RestApi:
    Type: AWS::ApiGateway::RestApi
    Properties:
      Name: !Ref apiName
  DocumentationPart:
    Type: AWS::ApiGateway::DocumentationPart
    Properties:
      Location:
        Type: !Ref type
      RestApiId: !Ref RestApi
      Properties: !Ref property
  DocumentationVersion:
    Type: AWS::ApiGateway::DocumentationVersion
    Properties:
      Description: !Ref description
      DocumentationVersion: !Ref version
      RestApiId: !Ref RestApi
    DependsOn: DocumentationPart
```

## See also
<a name="aws-resource-apigateway-documentationpart--seealso"></a>
+ [documentationpart:create](https://docs.aws.amazon.com/apigateway/latest/api/API_CreateDocumentationPart.html) in the *Amazon API Gateway REST API Reference*



# AWS::ApiGateway::DocumentationPart Location
<a name="aws-properties-apigateway-documentationpart-location"></a>

The `Location` property specifies the location of the Amazon API Gateway API entity that the documentation applies to. `Location` is a property of the [AWS::ApiGateway::DocumentationPart](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-documentationpart.html) resource.

**Note**  
For more information about each property, including constraints and valid values, see [DocumentationPart](https://docs.aws.amazon.com/apigateway/latest/api/API_DocumentationPartLocation.html) in the *Amazon API Gateway REST API Reference*.

## Syntax
<a name="aws-properties-apigateway-documentationpart-location-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-apigateway-documentationpart-location-syntax.json"></a>

```
{
  "[Method](#cfn-apigateway-documentationpart-location-method)" : String,
  "[Name](#cfn-apigateway-documentationpart-location-name)" : String,
  "[Path](#cfn-apigateway-documentationpart-location-path)" : String,
  "[StatusCode](#cfn-apigateway-documentationpart-location-statuscode)" : String,
  "[Type](#cfn-apigateway-documentationpart-location-type)" : String
}
```

### YAML
<a name="aws-properties-apigateway-documentationpart-location-syntax.yaml"></a>

```
  [Method](#cfn-apigateway-documentationpart-location-method): String
  [Name](#cfn-apigateway-documentationpart-location-name): String
  [Path](#cfn-apigateway-documentationpart-location-path): String
  [StatusCode](#cfn-apigateway-documentationpart-location-statuscode): String
  [Type](#cfn-apigateway-documentationpart-location-type): String
```

## Properties
<a name="aws-properties-apigateway-documentationpart-location-properties"></a>

`Method`  <a name="cfn-apigateway-documentationpart-location-method"></a>
The HTTP verb of a method. It is a valid field for the API entity types of `METHOD`, `PATH_PARAMETER`, `QUERY_PARAMETER`, `REQUEST_HEADER`, `REQUEST_BODY`, `RESPONSE`, `RESPONSE_HEADER`, and `RESPONSE_BODY`. The default value is `*` for any method. When an applicable child entity inherits the content of an entity of the same type with more general specifications of the other `location` attributes, the child entity's `method` attribute must match that of the parent entity exactly.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Name`  <a name="cfn-apigateway-documentationpart-location-name"></a>
The name of the targeted API entity. It is a valid and required field for the API entity types of `AUTHORIZER`, `MODEL`, `PATH_PARAMETER`, `QUERY_PARAMETER`, `REQUEST_HEADER`, `REQUEST_BODY` and `RESPONSE_HEADER`. It is an invalid field for any other entity type.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Path`  <a name="cfn-apigateway-documentationpart-location-path"></a>
The URL path of the target. It is a valid field for the API entity types of `RESOURCE`, `METHOD`, `PATH_PARAMETER`, `QUERY_PARAMETER`, `REQUEST_HEADER`, `REQUEST_BODY`, `RESPONSE`, `RESPONSE_HEADER`, and `RESPONSE_BODY`. The default value is `/` for the root resource. When an applicable child entity inherits the content of another entity of the same type with more general specifications of the other `location` attributes, the child entity's `path` attribute must match that of the parent entity as a prefix.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`StatusCode`  <a name="cfn-apigateway-documentationpart-location-statuscode"></a>
The HTTP status code of a response. It is a valid field for the API entity types of `RESPONSE`, `RESPONSE_HEADER`, and `RESPONSE_BODY`. The default value is `*` for any status code. When an applicable child entity inherits the content of an entity of the same type with more general specifications of the other `location` attributes, the child entity's `statusCode` attribute must match that of the parent entity exactly.  
*Required*: No  
*Type*: String  
*Pattern*: `^([1-5]\d\d|\*|\s*)$`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Type`  <a name="cfn-apigateway-documentationpart-location-type"></a>
The type of API entity to which the documentation content applies. Valid values are `API`, `AUTHORIZER`, `MODEL`, `RESOURCE`, `METHOD`, `PATH_PARAMETER`, `QUERY_PARAMETER`, `REQUEST_HEADER`, `REQUEST_BODY`, `RESPONSE`, `RESPONSE_HEADER`, and `RESPONSE_BODY`. Content inheritance does not apply to any entity of the `API`, `AUTHORIZER`, `METHOD`, `MODEL`, `REQUEST_BODY`, or `RESOURCE` type.  
*Required*: No  
*Type*: String  
*Allowed values*: `API | AUTHORIZER | MODEL | RESOURCE | METHOD | PATH_PARAMETER | QUERY_PARAMETER | REQUEST_HEADER | REQUEST_BODY | RESPONSE | RESPONSE_HEADER | RESPONSE_BODY`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## See also
<a name="aws-properties-apigateway-documentationpart-location--seealso"></a>
+ [DocumentationPart](https://docs.aws.amazon.com/apigateway/latest/api/API_DocumentationPartLocation.html) in the *Amazon API Gateway REST API Reference*



# AWS::ApiGateway::DocumentationVersion
<a name="aws-resource-apigateway-documentationversion"></a>

The `AWS::ApiGateway::DocumentationVersion` resource creates a snapshot of the documentation for an API. For more information, see [Representation of API Documentation in API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-documenting-api-content-representation.html) in the *API Gateway Developer Guide*.

## Syntax
<a name="aws-resource-apigateway-documentationversion-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-apigateway-documentationversion-syntax.json"></a>

```
{
  "Type" : "AWS::ApiGateway::DocumentationVersion",
  "Properties" : {
      "[Description](#cfn-apigateway-documentationversion-description)" : String,
      "[DocumentationVersion](#cfn-apigateway-documentationversion-documentationversion)" : String,
      "[RestApiId](#cfn-apigateway-documentationversion-restapiid)" : String
    }
}
```

### YAML
<a name="aws-resource-apigateway-documentationversion-syntax.yaml"></a>

```
Type: AWS::ApiGateway::DocumentationVersion
Properties:
  [Description](#cfn-apigateway-documentationversion-description): String
  [DocumentationVersion](#cfn-apigateway-documentationversion-documentationversion): String
  [RestApiId](#cfn-apigateway-documentationversion-restapiid): String
```

## Properties
<a name="aws-resource-apigateway-documentationversion-properties"></a>

`Description`  <a name="cfn-apigateway-documentationversion-description"></a>
A description about the new documentation snapshot.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DocumentationVersion`  <a name="cfn-apigateway-documentationversion-documentationversion"></a>
The version identifier of the to-be-updated documentation version.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`RestApiId`  <a name="cfn-apigateway-documentationversion-restapiid"></a>
The string identifier of the associated RestApi.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Examples
<a name="aws-resource-apigateway-documentationversion--examples"></a>



### Associate documentation version with stage
<a name="aws-resource-apigateway-documentationversion--examples--Associate_documentation_version_with_stage"></a>

The following example associates a documentation version with an API stage.

#### JSON
<a name="aws-resource-apigateway-documentationversion--examples--Associate_documentation_version_with_stage--json"></a>

```
{
    "Parameters": {
        "apiName": {
            "Type": "String"
        },
        "description": {
            "Type": "String"
        },
        "property": {
            "Type": "String"
        },
        "stageName": {
            "Type": "String"
        },
        "type": {
            "Type": "String"
        },
        "version": {
            "Type": "String"
        }
    },
    "Resources": {
        "Deployment": {
            "Type": "AWS::ApiGateway::Deployment",
            "Properties": {
                "RestApiId": {
                    "Ref": "RestApi"
                }
            },
            "DependsOn": [
                "Method"
            ]
        },
        "DocumentationPart": {
            "Type": "AWS::ApiGateway::DocumentationPart",
            "Properties": {
                "Location": {
                    "Type": {
                        "Ref": "type"
                    }
                },
                "RestApiId": {
                    "Ref": "RestApi"
                },
                "Property": {
                    "Ref": "property"
                }
            }
        },
        "DocumentationVersion": {
            "Type": "AWS::ApiGateway::DocumentationVersion",
            "Properties": {
                "Description": {
                    "Ref": "description"
                },
                "DocumentationVersion": {
                    "Ref": "version"
                },
                "RestApiId": {
                    "Ref": "RestApi"
                }
            },
            "DependsOn": "DocumentationPart"
        },
        "Method": {
            "Type": "AWS::ApiGateway::Method",
            "Properties": {
                "AuthorizationType": "NONE",
                "HttpMethod": "POST",
                "ResourceId": {
                    "Fn::GetAtt": [
                        "RestApi",
                        "RootResourceId"
                    ]
                },
                "RestApiId": {
                    "Ref": "RestApi"
                },
                "Integration": {
                    "Type": "MOCK"
                }
            }
        },
        "RestApi": {
            "Type": "AWS::ApiGateway::RestApi",
            "Properties": {
                "Name": {
                    "Ref": "apiName"
                }
            }
        },
        "Stage": {
            "Type": "AWS::ApiGateway::Stage",
            "Properties": {
                "DeploymentId": {
                    "Ref": "Deployment"
                },
                "DocumentationVersion": {
                    "Ref": "version"
                },
                "RestApiId": {
                    "Ref": "RestApi"
                },
                "StageName": {
                    "Ref": "stageName"
                }
            },
            "DependsOn": "DocumentationVersion"
        }
    }
}
```

#### YAML
<a name="aws-resource-apigateway-documentationversion--examples--Associate_documentation_version_with_stage--yaml"></a>

```
Parameters:
  apiName:
    Type: String
  description:
    Type: String
  property:
    Type: String
  stageName:
    Type: String
  type:
    Type: String
  version:
    Type: String
Resources:
  Deployment:
    Type: AWS::ApiGateway::Deployment
    Properties:
      RestApiId: !Ref RestApi
    DependsOn:
      - Method
  DocumentationPart:
    Type: AWS::ApiGateway::DocumentationPart
    Properties:
      Location:
        Type: !Ref type
      RestApiId: !Ref RestApi
      Property: !Ref property
  DocumentationVersion:
    Type: AWS::ApiGateway::DocumentationVersion
    Properties:
      Description: !Ref description
      DocumentationVersion: !Ref version
      RestApiId: !Ref RestApi
    DependsOn: DocumentationPart
  Method:
    Type: AWS::ApiGateway::Method
    Properties:
      AuthorizationType: NONE
      HttpMethod: POST
      ResourceId: !GetAtt 
        - RestApi
        - RootResourceId
      RestApiId: !Ref RestApi
      Integration:
        Type: MOCK
  RestApi:
    Type: AWS::ApiGateway::RestApi
    Properties:
      Name: !Ref apiName
  Stage:
    Type: AWS::ApiGateway::Stage
    Properties:
      DeploymentId: !Ref Deployment
      DocumentationVersion: !Ref version
      RestApiId: !Ref RestApi
      StageName: !Ref stageName
    DependsOn: DocumentationVersion
```

## See also
<a name="aws-resource-apigateway-documentationversion--seealso"></a>
+ [documentationpart:create](https://docs.aws.amazon.com/apigateway/latest/api/API_CreateDocumentationPart.html) in the *Amazon API Gateway REST API Reference*



# AWS::ApiGateway::DomainName
<a name="aws-resource-apigateway-domainname"></a>

The `AWS::ApiGateway::DomainName` resource specifies a public custom domain name for your API in API Gateway.

To create a custom domain name for private APIs, use [AWS::ApiGateway::DomainNameV2](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-domainnamev2.html).

You can use a custom domain name to provide a URL that's more intuitive and easier to recall. For more information about using custom domain names, see [Set up Custom Domain Name for an API in API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html) in the *API Gateway Developer Guide*.

## Syntax
<a name="aws-resource-apigateway-domainname-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-apigateway-domainname-syntax.json"></a>

```
{
  "Type" : "AWS::ApiGateway::DomainName",
  "Properties" : {
      "[CertificateArn](#cfn-apigateway-domainname-certificatearn)" : String,
      "[DomainName](#cfn-apigateway-domainname-domainname)" : String,
      "[EndpointAccessMode](#cfn-apigateway-domainname-endpointaccessmode)" : String,
      "[EndpointConfiguration](#cfn-apigateway-domainname-endpointconfiguration)" : EndpointConfiguration,
      "[MutualTlsAuthentication](#cfn-apigateway-domainname-mutualtlsauthentication)" : MutualTlsAuthentication,
      "[OwnershipVerificationCertificateArn](#cfn-apigateway-domainname-ownershipverificationcertificatearn)" : String,
      "[RegionalCertificateArn](#cfn-apigateway-domainname-regionalcertificatearn)" : String,
      "[RoutingMode](#cfn-apigateway-domainname-routingmode)" : String,
      "[SecurityPolicy](#cfn-apigateway-domainname-securitypolicy)" : String,
      "[Tags](#cfn-apigateway-domainname-tags)" : [ Tag, ... ]
    }
}
```

### YAML
<a name="aws-resource-apigateway-domainname-syntax.yaml"></a>

```
Type: AWS::ApiGateway::DomainName
Properties:
  [CertificateArn](#cfn-apigateway-domainname-certificatearn): String
  [DomainName](#cfn-apigateway-domainname-domainname): String
  [EndpointAccessMode](#cfn-apigateway-domainname-endpointaccessmode): String
  [EndpointConfiguration](#cfn-apigateway-domainname-endpointconfiguration): 
    EndpointConfiguration
  [MutualTlsAuthentication](#cfn-apigateway-domainname-mutualtlsauthentication): 
    MutualTlsAuthentication
  [OwnershipVerificationCertificateArn](#cfn-apigateway-domainname-ownershipverificationcertificatearn): String
  [RegionalCertificateArn](#cfn-apigateway-domainname-regionalcertificatearn): String
  [RoutingMode](#cfn-apigateway-domainname-routingmode): String
  [SecurityPolicy](#cfn-apigateway-domainname-securitypolicy): String
  [Tags](#cfn-apigateway-domainname-tags): 
    - Tag
```

## Properties
<a name="aws-resource-apigateway-domainname-properties"></a>

`CertificateArn`  <a name="cfn-apigateway-domainname-certificatearn"></a>
The reference to an AWS-managed certificate that will be used by edge-optimized endpoint or private endpoint for this domain name. AWS Certificate Manager is the only supported source.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DomainName`  <a name="cfn-apigateway-domainname-domainname"></a>
The custom domain name as an API host name, for example, `my-api.example.com`.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`EndpointAccessMode`  <a name="cfn-apigateway-domainname-endpointaccessmode"></a>
The endpoint access mode for your DomainName.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EndpointConfiguration`  <a name="cfn-apigateway-domainname-endpointconfiguration"></a>
The endpoint configuration of this DomainName showing the endpoint types and IP address types of the domain name.   
*Required*: No  
*Type*: [EndpointConfiguration](aws-properties-apigateway-domainname-endpointconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MutualTlsAuthentication`  <a name="cfn-apigateway-domainname-mutualtlsauthentication"></a>
The mutual TLS authentication configuration for a custom domain name. If specified, API Gateway performs two-way authentication between the client and the server. Clients must present a trusted certificate to access your API.  
*Required*: No  
*Type*: [MutualTlsAuthentication](aws-properties-apigateway-domainname-mutualtlsauthentication.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`OwnershipVerificationCertificateArn`  <a name="cfn-apigateway-domainname-ownershipverificationcertificatearn"></a>
The ARN of the public certificate issued by ACM to validate ownership of your custom domain. Only required when configuring mutual TLS and using an ACM imported or private CA certificate ARN as the RegionalCertificateArn.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RegionalCertificateArn`  <a name="cfn-apigateway-domainname-regionalcertificatearn"></a>
The reference to an AWS-managed certificate that will be used for validating the regional domain name. AWS Certificate Manager is the only supported source.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RoutingMode`  <a name="cfn-apigateway-domainname-routingmode"></a>
The routing mode for this domain name. The routing mode determines how API Gateway sends traffic from your custom domain name to your public APIs.  
*Required*: No  
*Type*: String  
*Allowed values*: `BASE_PATH_MAPPING_ONLY | ROUTING_RULE_THEN_BASE_PATH_MAPPING | ROUTING_RULE_ONLY`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SecurityPolicy`  <a name="cfn-apigateway-domainname-securitypolicy"></a>
The Transport Layer Security (TLS) version \$1 cipher suite for this DomainName.  
*Required*: No  
*Type*: String  
*Allowed values*: `TLS_1_0 | TLS_1_2 | SecurityPolicy_TLS13_1_3_2025_09 | SecurityPolicy_TLS13_1_3_FIPS_2025_09 | SecurityPolicy_TLS13_1_2_PFS_PQ_2025_09 | SecurityPolicy_TLS13_1_2_FIPS_PQ_2025_09 | SecurityPolicy_TLS13_1_2_PQ_2025_09 | SecurityPolicy_TLS13_1_2_2021_06 | SecurityPolicy_TLS13_2025_EDGE | SecurityPolicy_TLS12_PFS_2025_EDGE | SecurityPolicy_TLS12_2018_EDGE`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Tags`  <a name="cfn-apigateway-domainname-tags"></a>
The collection of tags. Each tag element is associated with a given resource.  
*Required*: No  
*Type*: Array of [Tag](aws-properties-apigateway-domainname-tag.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-apigateway-domainname-return-values"></a>

### Ref
<a name="aws-resource-apigateway-domainname-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the domain name.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-apigateway-domainname-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-apigateway-domainname-return-values-fn--getatt-fn--getatt"></a>

`DistributionDomainName`  <a name="DistributionDomainName-fn::getatt"></a>
The Amazon CloudFront distribution domain name that's mapped to the custom domain name. This is only applicable for endpoints whose type is `EDGE`.  
Example: `d111111abcdef8.cloudfront.net`

`DistributionHostedZoneId`  <a name="DistributionHostedZoneId-fn::getatt"></a>
The region-agnostic Amazon Route 53 Hosted Zone ID of the edge-optimized endpoint. The only valid value is `Z2FDTNDATAQYW2` for all regions.

`DomainNameArn`  <a name="DomainNameArn-fn::getatt"></a>
The ARN of the domain name. 

`RegionalDomainName`  <a name="RegionalDomainName-fn::getatt"></a>
The domain name associated with the regional endpoint for this custom domain name. You set up this association by adding a DNS record that points the custom domain name to this regional domain name.

`RegionalHostedZoneId`  <a name="RegionalHostedZoneId-fn::getatt"></a>
The region-specific Amazon Route 53 Hosted Zone ID of the regional endpoint.

## Examples
<a name="aws-resource-apigateway-domainname--examples"></a>



**Topics**
+ [Create Custom Domain](#aws-resource-apigateway-domainname--examples--Create_Custom_Domain)
+ [Create Custom Domain from Parameters](#aws-resource-apigateway-domainname--examples--Create_Custom_Domain_from_Parameters)
+ [Create domain name with EndpointConfiguration](#aws-resource-apigateway-domainname--examples--Create_domain_name_with_EndpointConfiguration)
+ [Create Domain Names and Zone IDs as Outputs](#aws-resource-apigateway-domainname--examples--Create_Domain_Names_and_Zone_IDs_as_Outputs)
+ [Create Domain Name with routing mode ROUTING\$1RULE\$1ONLY](#aws-resource-apigateway-domainname--examples--Create_Domain_Name_with_routing_mode_ROUTING_RULE_ONLY)

### Create Custom Domain
<a name="aws-resource-apigateway-domainname--examples--Create_Custom_Domain"></a>

The following example creates a custom domain name of `api.mydomain.com`.

#### JSON
<a name="aws-resource-apigateway-domainname--examples--Create_Custom_Domain--json"></a>

```
{
    "MyDomainName": {
        "Type": "AWS::ApiGateway::DomainName",
        "Properties": {
            "DomainName": "api.mydomain.com",
            "CertificateArn": "arn:aws:acm:us-east-1:111122223333:certificate/fb1b9770-a305-495d-aefb-27e5e101ff3"
        }
    }
}
```

#### YAML
<a name="aws-resource-apigateway-domainname--examples--Create_Custom_Domain--yaml"></a>

```
MyDomainName:
  Type: 'AWS::ApiGateway::DomainName'
  Properties:
    DomainName: api.mydomain.com
    CertificateArn: >-
      arn:aws:acm:us-east-1:111122223333:certificate/fb1b9770-a305-495d-aefb-27e5e101ff3
```

### Create Custom Domain from Parameters
<a name="aws-resource-apigateway-domainname--examples--Create_Custom_Domain_from_Parameters"></a>

The following example creates a custom domain name of `example.mydomain.com`.

#### JSON
<a name="aws-resource-apigateway-domainname--examples--Create_Custom_Domain_from_Parameters--json"></a>

```
{
    "Parameters": {
        "basePath": {
            "Type": "String",
            "Default": "examplepath"
        },
        "domainName": {
            "Type": "String",
            "Default": "example.mydomain.com"
        },
        "restApiName": {
            "Type": "String",
            "Default": "exampleapi"
        }
    },
    "Resources": {
        "myCertificate": {
            "Type": "AWS::CertificateManager::Certificate",
            "Properties": {
                "DomainName": {
                    "Ref": "domainName"
                }
            }
        },
        "myDomainName": {
            "Type": "AWS::ApiGateway::DomainName",
            "Properties": {
                "CertificateArn": {
                    "Ref": "myCertificate"
                },
                "DomainName": {
                    "Ref": "domainName"
                }
            }
        },
        "myMapping": {
            "Type": "AWS::ApiGateway::BasePathMapping",
            "Properties": {
                "BasePath": {
                    "Ref": "basePath"
                },
                "DomainName": {
                    "Ref": "myDomainName"
                },
                "RestApiId": {
                    "Ref": "myRestApi"
                }
            }
        },
        "myRestApi": {
            "Type": "AWS::ApiGateway::RestApi",
            "Properties": {
                "Name": {
                    "Ref": "restApiName"
                }
            }
        }
    },
    "Outputs": {
        "domainName": {
            "Value": {
                "Fn::GetAtt": [
                    "myDomainName",
                    "DistributionDomainName"
                ]
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-apigateway-domainname--examples--Create_Custom_Domain_from_Parameters--yaml"></a>

```
Parameters:
  basePath:
    Type: String
    Default: examplepath
  domainName:
    Type: String
    Default: example.mydomain.com
  restApiName:
    Type: String
    Default: exampleapi
Resources:
  myCertificate:
    Type: 'AWS::CertificateManager::Certificate'
    Properties:
      DomainName: !Ref domainName
  myDomainName:
    Type: 'AWS::ApiGateway::DomainName'
    Properties:
      CertificateArn: !Ref myCertificate
      DomainName: !Ref domainName
  myMapping:
    Type: 'AWS::ApiGateway::BasePathMapping'
    Properties:
      BasePath: !Ref basePath
      DomainName: !Ref myDomainName
      RestApiId: !Ref myRestApi
  myRestApi:
    Type: 'AWS::ApiGateway::RestApi'
    Properties:
      Name: !Ref restApiName
Outputs:
  domainName:
    Value: !GetAtt 
      - myDomainName
      - DistributionDomainName
```

### Create domain name with EndpointConfiguration
<a name="aws-resource-apigateway-domainname--examples--Create_domain_name_with_EndpointConfiguration"></a>

The following example creates a custom domain name that specifies a regional certificate ARN and an endpoint type.

#### JSON
<a name="aws-resource-apigateway-domainname--examples--Create_domain_name_with_EndpointConfiguration--json"></a>

```
{
  "Parameters": {
    "cfnDomainName": {
      "Type": "String"
    },
    "certificateArn": {
      "Type": "String"
    },
    "type": {
      "Type": "String"
    }
  },
  "Resources": {
    "myDomainName": {
      "Type": "AWS::ApiGateway::DomainName",
      "Properties": {
        "CertificateArn": {
          "Ref": "certificateArn"
        },
        "DomainName": {
          "Ref": "cfnDomainName"
        },
        "EndpointConfiguration": {
          "Types": [
            {
              "Ref": "type"
            }
          ]
        },
        "RegionalCertificateArn": {
          "Ref": "certificateArn"
        }
      }
    }
  },
  "Outputs": {  
    "DomainName": {
      "Value": {
        "Ref": "myDomainName"
      }
    }
  }
}
```

#### YAML
<a name="aws-resource-apigateway-domainname--examples--Create_domain_name_with_EndpointConfiguration--yaml"></a>

```
Parameters:
  cfnDomainName:
    Type: String
  certificateArn:
    Type: String
  type:
    Type: String
Resources:
  myDomainName:
    Type: AWS::ApiGateway::DomainName
    Properties:
      CertificateArn: !Ref certificateArn
      DomainName: !Ref cfnDomainName
      EndpointConfiguration:
        Types:
          - !Ref type
      RegionalCertificateArn: !Ref certificateArn
Outputs:  
  DomainName:
    Value: !Ref myDomainName
```

### Create Domain Names and Zone IDs as Outputs
<a name="aws-resource-apigateway-domainname--examples--Create_Domain_Names_and_Zone_IDs_as_Outputs"></a>

The following example defines the distribution and regional domain names, as well as the distribution and regional hosted zone IDs, as outputs from the stack.

#### JSON
<a name="aws-resource-apigateway-domainname--examples--Create_Domain_Names_and_Zone_IDs_as_Outputs--json"></a>

```
{
    "Resources": {
        "myDomainName": {
            "Type": "AWS::ApiGateway::DomainName",
            "Properties": {
                "CertificateArn": {
                    "Ref": "certificateArn"
                },
                "DomainName": {
                    "Ref": "cfnDomainName"
                },
                "EndpointConfiguration": {
                    "Types": [
                        {
                            "Ref": "type"
                        }
                    ]
                },
                "RegionalCertificateArn": {
                    "Ref": "certificateArn"
                }
            }
        }
    },
    "Outputs": {
        "DistributionDomainName": {
            "Value": {
                "Fn::GetAtt": [
                    "myDomainName",
                    "DistributionDomainName"
                ]
            }
        },
        "DistributionHostedZoneId": {
            "Value": {
                "Fn::GetAtt": [
                    "myDomainName",
                    "DistributionHostedZoneId"
                ]
            }
        },
        "RegionalDomainName": {
            "Value": {
                "Fn::GetAtt": [
                    "myDomainName",
                    "RegionalDomainName"
                ]
            }
        },
        "RegionalHostedZoneId": {
            "Value": {
                "Fn::GetAtt": [
                    "myDomainName",
                    "RegionalHostedZoneId"
                ]
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-apigateway-domainname--examples--Create_Domain_Names_and_Zone_IDs_as_Outputs--yaml"></a>

```
Resources:
  myDomainName:
    Type: 'AWS::ApiGateway::DomainName'
    Properties:
      CertificateArn: !Ref certificateArn
      DomainName: !Ref cfnDomainName
      EndpointConfiguration:
        Types:
          - !Ref type
      RegionalCertificateArn: !Ref certificateArn
Outputs:
  DistributionDomainName:
    Value: !GetAtt 
      - myDomainName
      - DistributionDomainName
  DistributionHostedZoneId:
    Value: !GetAtt 
      - myDomainName
      - DistributionHostedZoneId
  RegionalDomainName:
    Value: !GetAtt 
      - myDomainName
      - RegionalDomainName
  RegionalHostedZoneId:
    Value: !GetAtt 
      - myDomainName
      - RegionalHostedZoneId
```

### Create Domain Name with routing mode ROUTING\$1RULE\$1ONLY
<a name="aws-resource-apigateway-domainname--examples--Create_Domain_Name_with_routing_mode_ROUTING_RULE_ONLY"></a>

The following example creates a domain name with a routing mode of `ROUTING_RULE_ONLY`.

#### JSON
<a name="aws-resource-apigateway-domainname--examples--Create_Domain_Name_with_routing_mode_ROUTING_RULE_ONLY--json"></a>

```
{
  "MyDomainName": {
    "Type": "AWS::ApiGateway::DomainName",
    "Properties": {
      "DomainName": "api.mydomain.com",
      "EndpointConfiguration": {
        "Types": [
          "REGIONAL"
        ]
      },
      "SecurityPolicy": "TLS_1_2",
      "RegionalCertificateArn": "arn:aws:acm:us-east-1:111122223333:certificate/fb1b9770-a305-495d-aefb-27e5e101ff3",
      "RoutingMode": "ROUTING_RULE_ONLY"
    }
  }
}
```

#### YAML
<a name="aws-resource-apigateway-domainname--examples--Create_Domain_Name_with_routing_mode_ROUTING_RULE_ONLY--yaml"></a>

```
MyDomainName:
    Type: AWS::ApiGateway::DomainName
    Properties:
      DomainName: api.mydomain.com
      EndpointConfiguration:
        Types:
          - REGIONAL
      SecurityPolicy: TLS_1_2
      RegionalCertificateArn: arn:aws:acm:us-east-1:111122223333:certificate/fb1b9770-a305-495d-aefb-27e5e101ff3
      RoutingMode: ROUTING_RULE_ONLY
```

## See also
<a name="aws-resource-apigateway-domainname--seealso"></a>
+ [domainname:create](https://docs.aws.amazon.com/apigateway/latest/api/API_CreateDomainName.html) in the *Amazon API Gateway REST API Reference*



# AWS::ApiGateway::DomainName EndpointConfiguration
<a name="aws-properties-apigateway-domainname-endpointconfiguration"></a>

The `EndpointConfiguration` property type specifies the endpoint types and IP address types of an Amazon API Gateway domain name.

`EndpointConfiguration` is a property of the [AWS::ApiGateway::DomainName](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-domainname.html) resource.

## Syntax
<a name="aws-properties-apigateway-domainname-endpointconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-apigateway-domainname-endpointconfiguration-syntax.json"></a>

```
{
  "[IpAddressType](#cfn-apigateway-domainname-endpointconfiguration-ipaddresstype)" : String,
  "[Types](#cfn-apigateway-domainname-endpointconfiguration-types)" : [ String, ... ]
}
```

### YAML
<a name="aws-properties-apigateway-domainname-endpointconfiguration-syntax.yaml"></a>

```
  [IpAddressType](#cfn-apigateway-domainname-endpointconfiguration-ipaddresstype): String
  [Types](#cfn-apigateway-domainname-endpointconfiguration-types): 
    - String
```

## Properties
<a name="aws-properties-apigateway-domainname-endpointconfiguration-properties"></a>

`IpAddressType`  <a name="cfn-apigateway-domainname-endpointconfiguration-ipaddresstype"></a>
The IP address types that can invoke this DomainName. Use `ipv4` to allow only IPv4 addresses to invoke this DomainName, or use `dualstack` to allow both IPv4 and IPv6 addresses to invoke this DomainName. For the `PRIVATE` endpoint type, only `dualstack` is supported.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Types`  <a name="cfn-apigateway-domainname-endpointconfiguration-types"></a>
A list of endpoint types of an API (RestApi) or its custom domain name (DomainName). For an edge-optimized API and its custom domain name, the endpoint type is `"EDGE"`. For a regional API and its custom domain name, the endpoint type is `REGIONAL`. For a private API, the endpoint type is `PRIVATE`.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-apigateway-domainname-endpointconfiguration--seealso"></a>
+ [DomainName](https://docs.aws.amazon.com/apigateway/latest/api/API_DomainName.html) in the *Amazon API Gateway REST API Reference*



# AWS::ApiGateway::DomainName MutualTlsAuthentication
<a name="aws-properties-apigateway-domainname-mutualtlsauthentication"></a>

The mutual TLS authentication configuration for a custom domain name. If specified, API Gateway performs two-way authentication between the client and the server. Clients must present a trusted certificate to access your API.

## Syntax
<a name="aws-properties-apigateway-domainname-mutualtlsauthentication-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-apigateway-domainname-mutualtlsauthentication-syntax.json"></a>

```
{
  "[TruststoreUri](#cfn-apigateway-domainname-mutualtlsauthentication-truststoreuri)" : String,
  "[TruststoreVersion](#cfn-apigateway-domainname-mutualtlsauthentication-truststoreversion)" : String
}
```

### YAML
<a name="aws-properties-apigateway-domainname-mutualtlsauthentication-syntax.yaml"></a>

```
  [TruststoreUri](#cfn-apigateway-domainname-mutualtlsauthentication-truststoreuri): String
  [TruststoreVersion](#cfn-apigateway-domainname-mutualtlsauthentication-truststoreversion): String
```

## Properties
<a name="aws-properties-apigateway-domainname-mutualtlsauthentication-properties"></a>

`TruststoreUri`  <a name="cfn-apigateway-domainname-mutualtlsauthentication-truststoreuri"></a>
An Amazon S3 URL that specifies the truststore for mutual TLS authentication, for example `s3://bucket-name/key-name`. The truststore can contain certificates from public or private certificate authorities. To update the truststore, upload a new version to S3, and then update your custom domain name to use the new version. To update the truststore, you must have permissions to access the S3 object.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TruststoreVersion`  <a name="cfn-apigateway-domainname-mutualtlsauthentication-truststoreversion"></a>
The version of the S3 object that contains your truststore. To specify a version, you must have versioning enabled for the S3 bucket.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ApiGateway::DomainName Tag
<a name="aws-properties-apigateway-domainname-tag"></a>

An array of key-value pairs to apply to this resource.

For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).

## Syntax
<a name="aws-properties-apigateway-domainname-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-apigateway-domainname-tag-syntax.json"></a>

```
{
  "[Key](#cfn-apigateway-domainname-tag-key)" : String,
  "[Value](#cfn-apigateway-domainname-tag-value)" : String
}
```

### YAML
<a name="aws-properties-apigateway-domainname-tag-syntax.yaml"></a>

```
  [Key](#cfn-apigateway-domainname-tag-key): String
  [Value](#cfn-apigateway-domainname-tag-value): String
```

## Properties
<a name="aws-properties-apigateway-domainname-tag-properties"></a>

`Key`  <a name="cfn-apigateway-domainname-tag-key"></a>
A string you can use to assign a value. The combination of tag keys and values can help you organize and categorize your resources.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-apigateway-domainname-tag-value"></a>
The value for the specified tag key.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ApiGateway::DomainNameAccessAssociation
<a name="aws-resource-apigateway-domainnameaccessassociation"></a>

The `AWS::ApiGateway::DomainNameAccessAssociation` resource creates a domain name access association between an access association source and a private custom domain name.

Use a domain name access association to invoke a private custom domain name while isolated from the public internet.

You can only create or delete a DomainNameAccessAssociation using CloudFormation. To reject a domain name access association, use the AWS CLI.

## Syntax
<a name="aws-resource-apigateway-domainnameaccessassociation-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-apigateway-domainnameaccessassociation-syntax.json"></a>

```
{
  "Type" : "AWS::ApiGateway::DomainNameAccessAssociation",
  "Properties" : {
      "[AccessAssociationSource](#cfn-apigateway-domainnameaccessassociation-accessassociationsource)" : String,
      "[AccessAssociationSourceType](#cfn-apigateway-domainnameaccessassociation-accessassociationsourcetype)" : String,
      "[DomainNameArn](#cfn-apigateway-domainnameaccessassociation-domainnamearn)" : String,
      "[Tags](#cfn-apigateway-domainnameaccessassociation-tags)" : [ Tag, ... ]
    }
}
```

### YAML
<a name="aws-resource-apigateway-domainnameaccessassociation-syntax.yaml"></a>

```
Type: AWS::ApiGateway::DomainNameAccessAssociation
Properties:
  [AccessAssociationSource](#cfn-apigateway-domainnameaccessassociation-accessassociationsource): String
  [AccessAssociationSourceType](#cfn-apigateway-domainnameaccessassociation-accessassociationsourcetype): String
  [DomainNameArn](#cfn-apigateway-domainnameaccessassociation-domainnamearn): String
  [Tags](#cfn-apigateway-domainnameaccessassociation-tags): 
    - Tag
```

## Properties
<a name="aws-resource-apigateway-domainnameaccessassociation-properties"></a>

`AccessAssociationSource`  <a name="cfn-apigateway-domainnameaccessassociation-accessassociationsource"></a>
The identifier of the domain name access association source. For a `VPCE`, the value is the VPC endpoint ID.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`AccessAssociationSourceType`  <a name="cfn-apigateway-domainnameaccessassociation-accessassociationsourcetype"></a>
The type of the domain name access association source. Only `VPCE` is currently supported.  
*Required*: Yes  
*Type*: String  
*Allowed values*: `VPCE`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DomainNameArn`  <a name="cfn-apigateway-domainnameaccessassociation-domainnamearn"></a>
The ARN of the domain name.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Tags`  <a name="cfn-apigateway-domainnameaccessassociation-tags"></a>
The collection of tags. Each tag element is associated with a given resource.  
*Required*: No  
*Type*: Array of [Tag](aws-properties-apigateway-domainnameaccessassociation-tag.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-apigateway-domainnameaccessassociation-return-values"></a>

### Ref
<a name="aws-resource-apigateway-domainnameaccessassociation-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the domain name access association ARN.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-apigateway-domainnameaccessassociation-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-apigateway-domainnameaccessassociation-return-values-fn--getatt-fn--getatt"></a>

`DomainNameAccessAssociationArn`  <a name="DomainNameAccessAssociationArn-fn::getatt"></a>
The access association ARN. For example: `arn:aws:apigateway:us-west-2:111122223333:/accessassociations/domainname/private.example.com+abcd1234/vpcesource/vpce-abcd1234efg`.

## Examples
<a name="aws-resource-apigateway-domainnameaccessassociation--examples"></a>



### Domain name access association example
<a name="aws-resource-apigateway-domainnameaccessassociation--examples--Domain_name_access_association_example"></a>

The following example creates a `DomainNameAccessAssociation` resource named `MyDomainNameAccessAssociation`. 

#### JSON
<a name="aws-resource-apigateway-domainnameaccessassociation--examples--Domain_name_access_association_example--json"></a>

```
{
    "MyDomainNameAccessAssociation": {
        "Type": "AWS::ApiGateway::DomainNameAccessAssociation",
        "Properties": {
            "DomainNameArn": {
                "Fn::GetAtt": [
                    "MyDomainName",
                    "DomainNameArn"
                ]
            },
            "AccessAssociationSource": "vpce-abcd123456",
            "AccessAssociationSourceType": "VPCE"
        }
    }
}
```

#### YAML
<a name="aws-resource-apigateway-domainnameaccessassociation--examples--Domain_name_access_association_example--yaml"></a>

```
MyDomainNameAccessAssociation:
  Type: AWS::ApiGateway::DomainNameAccessAssociation
  Properties:
    DomainNameArn: !GetAtt MyDomainName.DomainNameArn
    AccessAssociationSource: vpce-abcd123456
    AccessAssociationSourceType: VPCE
```

# AWS::ApiGateway::DomainNameAccessAssociation Tag
<a name="aws-properties-apigateway-domainnameaccessassociation-tag"></a>

An array of key-value pairs to apply to this resource.

For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).

## Syntax
<a name="aws-properties-apigateway-domainnameaccessassociation-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-apigateway-domainnameaccessassociation-tag-syntax.json"></a>

```
{
  "[Key](#cfn-apigateway-domainnameaccessassociation-tag-key)" : String,
  "[Value](#cfn-apigateway-domainnameaccessassociation-tag-value)" : String
}
```

### YAML
<a name="aws-properties-apigateway-domainnameaccessassociation-tag-syntax.yaml"></a>

```
  [Key](#cfn-apigateway-domainnameaccessassociation-tag-key): String
  [Value](#cfn-apigateway-domainnameaccessassociation-tag-value): String
```

## Properties
<a name="aws-properties-apigateway-domainnameaccessassociation-tag-properties"></a>

`Key`  <a name="cfn-apigateway-domainnameaccessassociation-tag-key"></a>
A string you can use to assign a value. The combination of tag keys and values can help you organize and categorize your resources.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Value`  <a name="cfn-apigateway-domainnameaccessassociation-tag-value"></a>
The value for the specified tag key.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ApiGateway::DomainNameV2
<a name="aws-resource-apigateway-domainnamev2"></a>

The `AWS::ApiGateway::DomainNameV2` resource specifies a custom domain name for your private APIs in API Gateway. You can use a private custom domain name to provide a URL for your private API that's more intuitive and easier to recall.

## Syntax
<a name="aws-resource-apigateway-domainnamev2-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-apigateway-domainnamev2-syntax.json"></a>

```
{
  "Type" : "AWS::ApiGateway::DomainNameV2",
  "Properties" : {
      "[CertificateArn](#cfn-apigateway-domainnamev2-certificatearn)" : String,
      "[DomainName](#cfn-apigateway-domainnamev2-domainname)" : String,
      "[EndpointAccessMode](#cfn-apigateway-domainnamev2-endpointaccessmode)" : String,
      "[EndpointConfiguration](#cfn-apigateway-domainnamev2-endpointconfiguration)" : EndpointConfiguration,
      "[Policy](#cfn-apigateway-domainnamev2-policy)" : Json,
      "[RoutingMode](#cfn-apigateway-domainnamev2-routingmode)" : String,
      "[SecurityPolicy](#cfn-apigateway-domainnamev2-securitypolicy)" : String,
      "[Tags](#cfn-apigateway-domainnamev2-tags)" : [ Tag, ... ]
    }
}
```

### YAML
<a name="aws-resource-apigateway-domainnamev2-syntax.yaml"></a>

```
Type: AWS::ApiGateway::DomainNameV2
Properties:
  [CertificateArn](#cfn-apigateway-domainnamev2-certificatearn): String
  [DomainName](#cfn-apigateway-domainnamev2-domainname): String
  [EndpointAccessMode](#cfn-apigateway-domainnamev2-endpointaccessmode): String
  [EndpointConfiguration](#cfn-apigateway-domainnamev2-endpointconfiguration): 
    EndpointConfiguration
  [Policy](#cfn-apigateway-domainnamev2-policy): Json
  [RoutingMode](#cfn-apigateway-domainnamev2-routingmode): String
  [SecurityPolicy](#cfn-apigateway-domainnamev2-securitypolicy): String
  [Tags](#cfn-apigateway-domainnamev2-tags): 
    - Tag
```

## Properties
<a name="aws-resource-apigateway-domainnamev2-properties"></a>

`CertificateArn`  <a name="cfn-apigateway-domainnamev2-certificatearn"></a>
 The reference to an AWS-managed certificate that will be used by the private endpoint for this domain name. AWS Certificate Manager is the only supported source.   
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DomainName`  <a name="cfn-apigateway-domainnamev2-domainname"></a>
Represents a custom domain name as a user-friendly host name of an API (RestApi).  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`EndpointAccessMode`  <a name="cfn-apigateway-domainnamev2-endpointaccessmode"></a>
The endpoint access mode for your DomainName.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EndpointConfiguration`  <a name="cfn-apigateway-domainnamev2-endpointconfiguration"></a>
The endpoint configuration to indicate the types of endpoints an API (RestApi) or its custom domain name (DomainName) has and the IP address types that can invoke it.   
*Required*: No  
*Type*: [EndpointConfiguration](aws-properties-apigateway-domainnamev2-endpointconfiguration.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Policy`  <a name="cfn-apigateway-domainnamev2-policy"></a>
 A stringified JSON policy document that applies to the `execute-api` service for this DomainName regardless of the caller and Method configuration. You can use `Fn::ToJsonString` to enter your `policy`. For more information, see [Fn::ToJsonString](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ToJsonString.html).  
*Required*: No  
*Type*: Json  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RoutingMode`  <a name="cfn-apigateway-domainnamev2-routingmode"></a>
The routing mode for this domain name. The routing mode determines how API Gateway sends traffic from your custom domain name to your private APIs.  
*Required*: No  
*Type*: String  
*Allowed values*: `BASE_PATH_MAPPING_ONLY | ROUTING_RULE_THEN_BASE_PATH_MAPPING | ROUTING_RULE_ONLY`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SecurityPolicy`  <a name="cfn-apigateway-domainnamev2-securitypolicy"></a>
The Transport Layer Security (TLS) version \$1 cipher suite for this DomainName.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Tags`  <a name="cfn-apigateway-domainnamev2-tags"></a>
The collection of tags. Each tag element is associated with a given resource.  
*Required*: No  
*Type*: Array of [Tag](aws-properties-apigateway-domainnamev2-tag.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-apigateway-domainnamev2-return-values"></a>

### Ref
<a name="aws-resource-apigateway-domainnamev2-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the domain name ARN.

### Fn::GetAtt
<a name="aws-resource-apigateway-domainnamev2-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-apigateway-domainnamev2-return-values-fn--getatt-fn--getatt"></a>

`DomainNameArn`  <a name="DomainNameArn-fn::getatt"></a>
The ARN of the domain name.

`DomainNameId`  <a name="DomainNameId-fn::getatt"></a>
The domain name ID.

## Examples
<a name="aws-resource-apigateway-domainnamev2--examples"></a>



**Topics**
+ [Private custom domain name example](#aws-resource-apigateway-domainnamev2--examples--Private_custom_domain_name_example)
+ [Private custom domain name example with routing mode](#aws-resource-apigateway-domainnamev2--examples--Private_custom_domain_name_example_with_routing_mode)

### Private custom domain name example
<a name="aws-resource-apigateway-domainnamev2--examples--Private_custom_domain_name_example"></a>

The following example creates a `DomainNameV2` resource named `MyDomainName`.

#### JSON
<a name="aws-resource-apigateway-domainnamev2--examples--Private_custom_domain_name_example--json"></a>

```
{
    "MyDomainName": {
        "Type": "AWS::ApiGateway::DomainNameV2",
        "Properties": {
            "DomainName": "private.example.com",
            "CertificateArn": "arn:aws:acm:us-west-2:123456789:certificate/abcd-000-1234-0000-000000abcd",
            "EndpointConfiguration": {
                "Types": [
                    "PRIVATE"
                ]
            },
            "SecurityPolicy": "TLS_1_2",
            "Policy": "{\n\"Version\": \"2012-10-17\",		 	 	 \n\"Statement\": [\n{\n\"Effect\": \"Allow\",\n\"Principal\": \"*\",\n\"Action\": \"execute-api:Invoke\",\n\"Resource\": [\n\"execute-api:/*\"\n]\n},\n {\n\"Effect\": \"Deny\",\n\"Principal\": \"*\",\n\"Action\": \"execute-api:Invoke\",\n\"Resource\": [\n\"execute-api:/*\"\n],\n\"Condition\" : {\n\"StringNotEquals\": {\n\"aws:SourceVpce\": \"vpce-abcd1234efg\"\n}\n}\n}\n]\n}"
        }
    }
}
```

#### YAML
<a name="aws-resource-apigateway-domainnamev2--examples--Private_custom_domain_name_example--yaml"></a>

```
MyDomainName:
  Type: AWS::ApiGateway::DomainNameV2
  Properties:
    DomainName: private.example.com
    CertificateArn: arn:aws:acm:us-west-2:123456789:certificate/abcd-000-1234-0000-000000abcd
    EndpointConfiguration:
      Types:
        - PRIVATE
    SecurityPolicy: TLS_1_2
    Policy:
        Statement:
            - Action: 'execute-api:Invoke'
              Effect: Allow
              Principal: '*'
              Resource: 'execute-api:/*'
            - Action: 'execute-api:Invoke'
              Condition:
                StringNotEquals:
                  'aws:SourceVpce': !Ref EndpointID
              Effect: Deny
              Principal: '*'
              Resource: 'execute-api:/*'
        Version: 2012-10-17
```

### Private custom domain name example with routing mode
<a name="aws-resource-apigateway-domainnamev2--examples--Private_custom_domain_name_example_with_routing_mode"></a>

The following example creates a `DomainNameV2` resource named `MyDomainName` with a RoutingMode of `ROUTING_RULE_ONLY`.

#### JSON
<a name="aws-resource-apigateway-domainnamev2--examples--Private_custom_domain_name_example_with_routing_mode--json"></a>

```
{
  "MyDomainName": {
    "Type": "AWS::ApiGateway::DomainNameV2",
    "Properties": {
      "DomainName": "private.example.com",
      "CertificateArn": "arn:aws:acm:us-west-2:123456789:certificate/abcd-000-1234-0000-000000abcd",
      "EndpointConfiguration": {
        "Types": [
          "PRIVATE"
        ]
      },
      "SecurityPolicy": "TLS_1_2",
      "Policy": "{\n\"Version\": \"2012-10-17\",		 	 	 \n\"Statement\": [\n{\n\"Effect\": \"Allow\",\n\"Principal\": \"*\",\n\"Action\": \"execute-api:Invoke\",\n\"Resource\": [\n\"execute-api:/*\"\n]\n},\n {\n\"Effect\": \"Deny\",\n\"Principal\": \"*\",\n\"Action\": \"execute-api:Invoke\",\n\"Resource\": [\n\"execute-api:/*\"\n],\n\"Condition\" : {\n\"StringNotEquals\": {\n\"aws:SourceVpce\": \"vpce-abcd1234efg\"\n}\n}\n}\n]\n}",
      "RoutingMode": "ROUTING_RULE_ONLY"
    }
  }
}
```

#### YAML
<a name="aws-resource-apigateway-domainnamev2--examples--Private_custom_domain_name_example_with_routing_mode--yaml"></a>

```
MyDomainName:
    Type: AWS::ApiGateway::DomainNameV2
    Properties:
      DomainName: private.example.com
      CertificateArn: arn:aws:acm:us-west-2:123456789:certificate/abcd-000-1234-0000-000000abcd
      EndpointConfiguration:
        Types:
          - PRIVATE
      SecurityPolicy: "TLS_1_2"
      Policy:
        Statement:
            - Action: 'execute-api:Invoke'
              Effect: Allow
              Principal: '*'
              Resource: 'execute-api:/*'
            - Action: 'execute-api:Invoke'
              Condition:
                StringNotEquals:
                  'aws:SourceVpce': !Ref EndpointID
              Effect: Deny
              Principal: '*'
              Resource: 'execute-api:/*'
        Version: 2012-10-17		 	 	 
      RoutingMode: ROUTING_RULE_ONLY
```

# AWS::ApiGateway::DomainNameV2 EndpointConfiguration
<a name="aws-properties-apigateway-domainnamev2-endpointconfiguration"></a>

The endpoint configuration to indicate the types of endpoints an API (RestApi) or its custom domain name (DomainName) has and the IP address types that can invoke it. 

## Syntax
<a name="aws-properties-apigateway-domainnamev2-endpointconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-apigateway-domainnamev2-endpointconfiguration-syntax.json"></a>

```
{
  "[IpAddressType](#cfn-apigateway-domainnamev2-endpointconfiguration-ipaddresstype)" : String,
  "[Types](#cfn-apigateway-domainnamev2-endpointconfiguration-types)" : [ String, ... ]
}
```

### YAML
<a name="aws-properties-apigateway-domainnamev2-endpointconfiguration-syntax.yaml"></a>

```
  [IpAddressType](#cfn-apigateway-domainnamev2-endpointconfiguration-ipaddresstype): String
  [Types](#cfn-apigateway-domainnamev2-endpointconfiguration-types): 
    - String
```

## Properties
<a name="aws-properties-apigateway-domainnamev2-endpointconfiguration-properties"></a>

`IpAddressType`  <a name="cfn-apigateway-domainnamev2-endpointconfiguration-ipaddresstype"></a>
The IP address types that can invoke an API (RestApi) or a DomainName. Use `ipv4` to allow only IPv4 addresses to invoke an API or DomainName, or use `dualstack` to allow both IPv4 and IPv6 addresses to invoke an API or a DomainName. For the `PRIVATE` endpoint type, only `dualstack` is supported.  
*Required*: No  
*Type*: String  
*Allowed values*: `ipv4 | dualstack`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Types`  <a name="cfn-apigateway-domainnamev2-endpointconfiguration-types"></a>
A list of endpoint types of an API (RestApi) or its custom domain name (DomainName). For an edge-optimized API and its custom domain name, the endpoint type is `"EDGE"`. For a regional API and its custom domain name, the endpoint type is `REGIONAL`. For a private API, the endpoint type is `PRIVATE`.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ApiGateway::DomainNameV2 Tag
<a name="aws-properties-apigateway-domainnamev2-tag"></a>

An array of key-value pairs to apply to this resource.

For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).

## Syntax
<a name="aws-properties-apigateway-domainnamev2-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-apigateway-domainnamev2-tag-syntax.json"></a>

```
{
  "[Key](#cfn-apigateway-domainnamev2-tag-key)" : String,
  "[Value](#cfn-apigateway-domainnamev2-tag-value)" : String
}
```

### YAML
<a name="aws-properties-apigateway-domainnamev2-tag-syntax.yaml"></a>

```
  [Key](#cfn-apigateway-domainnamev2-tag-key): String
  [Value](#cfn-apigateway-domainnamev2-tag-value): String
```

## Properties
<a name="aws-properties-apigateway-domainnamev2-tag-properties"></a>

`Key`  <a name="cfn-apigateway-domainnamev2-tag-key"></a>
A string you can use to assign a value. The combination of tag keys and values can help you organize and categorize your resources.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-apigateway-domainnamev2-tag-value"></a>
The value for the specified tag key.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ApiGateway::GatewayResponse
<a name="aws-resource-apigateway-gatewayresponse"></a>

The `AWS::ApiGateway::GatewayResponse` resource creates a gateway response for your API. When you delete a stack containing this resource, your custom gateway responses are reset. For more information, see [API Gateway Responses](https://docs.aws.amazon.com/apigateway/latest/developerguide/customize-gateway-responses.html#api-gateway-gatewayResponse-definition) in the *API Gateway Developer Guide*.

## Syntax
<a name="aws-resource-apigateway-gatewayresponse-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-apigateway-gatewayresponse-syntax.json"></a>

```
{
  "Type" : "AWS::ApiGateway::GatewayResponse",
  "Properties" : {
      "[ResponseParameters](#cfn-apigateway-gatewayresponse-responseparameters)" : {Key: Value, ...},
      "[ResponseTemplates](#cfn-apigateway-gatewayresponse-responsetemplates)" : {Key: Value, ...},
      "[ResponseType](#cfn-apigateway-gatewayresponse-responsetype)" : String,
      "[RestApiId](#cfn-apigateway-gatewayresponse-restapiid)" : String,
      "[StatusCode](#cfn-apigateway-gatewayresponse-statuscode)" : String
    }
}
```

### YAML
<a name="aws-resource-apigateway-gatewayresponse-syntax.yaml"></a>

```
Type: AWS::ApiGateway::GatewayResponse
Properties:
  [ResponseParameters](#cfn-apigateway-gatewayresponse-responseparameters): 
    Key: Value
  [ResponseTemplates](#cfn-apigateway-gatewayresponse-responsetemplates): 
    Key: Value
  [ResponseType](#cfn-apigateway-gatewayresponse-responsetype): String
  [RestApiId](#cfn-apigateway-gatewayresponse-restapiid): String
  [StatusCode](#cfn-apigateway-gatewayresponse-statuscode): String
```

## Properties
<a name="aws-resource-apigateway-gatewayresponse-properties"></a>

`ResponseParameters`  <a name="cfn-apigateway-gatewayresponse-responseparameters"></a>
Response parameters (paths, query strings and headers) of the GatewayResponse as a string-to-string map of key-value pairs.  
*Required*: No  
*Type*: Object of String  
*Pattern*: `[a-zA-Z0-9]+`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ResponseTemplates`  <a name="cfn-apigateway-gatewayresponse-responsetemplates"></a>
Response templates of the GatewayResponse as a string-to-string map of key-value pairs.  
*Required*: No  
*Type*: Object of String  
*Pattern*: `[a-zA-Z0-9]+`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ResponseType`  <a name="cfn-apigateway-gatewayresponse-responsetype"></a>
The response type of the associated GatewayResponse.  
*Required*: Yes  
*Type*: String  
*Allowed values*: `DEFAULT_4XX | DEFAULT_5XX | RESOURCE_NOT_FOUND | UNAUTHORIZED | INVALID_API_KEY | ACCESS_DENIED | AUTHORIZER_FAILURE | AUTHORIZER_CONFIGURATION_ERROR | INVALID_SIGNATURE | EXPIRED_TOKEN | MISSING_AUTHENTICATION_TOKEN | INTEGRATION_FAILURE | INTEGRATION_TIMEOUT | API_CONFIGURATION_ERROR | UNSUPPORTED_MEDIA_TYPE | BAD_REQUEST_PARAMETERS | BAD_REQUEST_BODY | REQUEST_TOO_LARGE | THROTTLED | QUOTA_EXCEEDED | WAF_FILTERED`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`RestApiId`  <a name="cfn-apigateway-gatewayresponse-restapiid"></a>
The string identifier of the associated RestApi.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`StatusCode`  <a name="cfn-apigateway-gatewayresponse-statuscode"></a>
The HTTP status code for this GatewayResponse.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-apigateway-gatewayresponse-return-values"></a>

### Fn::GetAtt
<a name="aws-resource-apigateway-gatewayresponse-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-apigateway-gatewayresponse-return-values-fn--getatt-fn--getatt"></a>

`Id`  <a name="Id-fn::getatt"></a>
The ID for the gateway response. For example: `abc123`.

## Examples
<a name="aws-resource-apigateway-gatewayresponse--examples"></a>



**Topics**
+ [404 Response](#aws-resource-apigateway-gatewayresponse--examples--404_Response)
+ [Parameterized Response](#aws-resource-apigateway-gatewayresponse--examples--Parameterized_Response)

### 404 Response
<a name="aws-resource-apigateway-gatewayresponse--examples--404_Response"></a>

The following example returns a 404 status code for resource not found instead of missing authentication token for a CORS request (applicable to unsecured/unrestricted APIs).

#### JSON
<a name="aws-resource-apigateway-gatewayresponse--examples--404_Response--json"></a>

```
{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Resources": {
        "RestApi": {
            "Type": "AWS::ApiGateway::RestApi",
            "Properties": {
                "Name": "myRestApi"
            }
        },
        "GatewayResponse": {
            "Type": "AWS::ApiGateway::GatewayResponse",
            "Properties": {
                "ResponseParameters": {
                    "gatewayresponse.header.Access-Control-Allow-Origin": "'*'",
                    "gatewayresponse.header.Access-Control-Allow-Headers": "'*'"
                },
                "ResponseType": "MISSING_AUTHENTICATION_TOKEN",
                "RestApiId": {
                    "Ref": "RestApi"
                },
                "StatusCode": "404"
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-apigateway-gatewayresponse--examples--404_Response--yaml"></a>

```
AWSTemplateFormatVersion: 2010-09-09
Resources:
  RestApi:
    Type: AWS::ApiGateway::RestApi
    Properties:
      Name: myRestApi
  GatewayResponse:
    Type: AWS::ApiGateway::GatewayResponse
    Properties:
      ResponseParameters:
        gatewayresponse.header.Access-Control-Allow-Origin: "'*'"
        gatewayresponse.header.Access-Control-Allow-Headers: "'*'"
      ResponseType: MISSING_AUTHENTICATION_TOKEN
      RestApiId: !Ref RestApi
      StatusCode: '404'
```

### Parameterized Response
<a name="aws-resource-apigateway-gatewayresponse--examples--Parameterized_Response"></a>

The following example creates a response for an API based on the supplied parameters.

#### JSON
<a name="aws-resource-apigateway-gatewayresponse--examples--Parameterized_Response--json"></a>

```
{
    "Parameters": {
        "apiName": {
            "Type": "String"
        },
        "responseParameter1": {
            "Type": "String"
        },
        "responseParameter2": {
            "Type": "String"
        },
        "responseType": {
            "Type": "String"
        },
        "statusCode": {
            "Type": "String"
        }
    },
    "Resources": {
        "RestApi": {
            "Type": "AWS::ApiGateway::RestApi",
            "Properties": {
                "Name": {
                    "Ref": "apiName"
                }
            }
        },
        "GatewayResponse": {
            "Type": "AWS::ApiGateway::GatewayResponse",
            "Properties": {
                "ResponseParameters": {
                    "gatewayresponse.header.k1": {
                        "Ref": "responseParameter1"
                    },
                    "gatewayresponse.header.k2": {
                        "Ref": "responseParameter2"
                    }
                },
                "ResponseType": {
                    "Ref": "responseType"
                },
                "RestApiId": {
                    "Ref": "RestApi"
                },
                "StatusCode": {
                    "Ref": "statusCode"
                }
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-apigateway-gatewayresponse--examples--Parameterized_Response--yaml"></a>

```
Parameters:
    apiName :
        Type : String
    responseParameter1:
        Type : String
    responseParameter2:
        Type : String
    responseType:
        Type : String
    statusCode:
        Type : String
Resources :
    RestApi:
        Type: AWS::ApiGateway::RestApi
        Properties:
            Name: !Ref apiName
    GatewayResponse:
        Type: AWS::ApiGateway::GatewayResponse
        Properties:
            ResponseParameters:
                gatewayresponse.header.k1 : !Ref responseParameter1
                gatewayresponse.header.k2 : !Ref responseParameter2
            ResponseType: !Ref responseType
            RestApiId: !Ref RestApi
            StatusCode: !Ref statusCode
```

## See also
<a name="aws-resource-apigateway-gatewayresponse--seealso"></a>
+ [gatewayresponse:put](https://docs.aws.amazon.com/apigateway/latest/api/API_PutGatewayResponse.html) in the *Amazon API Gateway REST API Reference*



# AWS::ApiGateway::Method
<a name="aws-resource-apigateway-method"></a>

The `AWS::ApiGateway::Method` resource creates API Gateway methods that define the parameters and body that clients must send in their requests.

## Syntax
<a name="aws-resource-apigateway-method-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-apigateway-method-syntax.json"></a>

```
{
  "Type" : "AWS::ApiGateway::Method",
  "Properties" : {
      "[ApiKeyRequired](#cfn-apigateway-method-apikeyrequired)" : Boolean,
      "[AuthorizationScopes](#cfn-apigateway-method-authorizationscopes)" : [ String, ... ],
      "[AuthorizationType](#cfn-apigateway-method-authorizationtype)" : String,
      "[AuthorizerId](#cfn-apigateway-method-authorizerid)" : String,
      "[HttpMethod](#cfn-apigateway-method-httpmethod)" : String,
      "[Integration](#cfn-apigateway-method-integration)" : Integration,
      "[MethodResponses](#cfn-apigateway-method-methodresponses)" : [ MethodResponse, ... ],
      "[OperationName](#cfn-apigateway-method-operationname)" : String,
      "[RequestModels](#cfn-apigateway-method-requestmodels)" : {Key: Value, ...},
      "[RequestParameters](#cfn-apigateway-method-requestparameters)" : {Key: Value, ...},
      "[RequestValidatorId](#cfn-apigateway-method-requestvalidatorid)" : String,
      "[ResourceId](#cfn-apigateway-method-resourceid)" : String,
      "[RestApiId](#cfn-apigateway-method-restapiid)" : String
    }
}
```

### YAML
<a name="aws-resource-apigateway-method-syntax.yaml"></a>

```
Type: AWS::ApiGateway::Method
Properties:
  [ApiKeyRequired](#cfn-apigateway-method-apikeyrequired): Boolean
  [AuthorizationScopes](#cfn-apigateway-method-authorizationscopes): 
    - String
  [AuthorizationType](#cfn-apigateway-method-authorizationtype): String
  [AuthorizerId](#cfn-apigateway-method-authorizerid): String
  [HttpMethod](#cfn-apigateway-method-httpmethod): String
  [Integration](#cfn-apigateway-method-integration): 
    Integration
  [MethodResponses](#cfn-apigateway-method-methodresponses): 
    - MethodResponse
  [OperationName](#cfn-apigateway-method-operationname): String
  [RequestModels](#cfn-apigateway-method-requestmodels): 
    Key: Value
  [RequestParameters](#cfn-apigateway-method-requestparameters): 
    Key: Value
  [RequestValidatorId](#cfn-apigateway-method-requestvalidatorid): String
  [ResourceId](#cfn-apigateway-method-resourceid): String
  [RestApiId](#cfn-apigateway-method-restapiid): String
```

## Properties
<a name="aws-resource-apigateway-method-properties"></a>

`ApiKeyRequired`  <a name="cfn-apigateway-method-apikeyrequired"></a>
A boolean flag specifying whether a valid ApiKey is required to invoke this method.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AuthorizationScopes`  <a name="cfn-apigateway-method-authorizationscopes"></a>
A list of authorization scopes configured on the method. The scopes are used with a `COGNITO_USER_POOLS` authorizer to authorize the method invocation. The authorization works by matching the method scopes against the scopes parsed from the access token in the incoming request. The method invocation is authorized if any method scopes matches a claimed scope in the access token. Otherwise, the invocation is not authorized. When the method scope is configured, the client must provide an access token instead of an identity token for authorization purposes.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AuthorizationType`  <a name="cfn-apigateway-method-authorizationtype"></a>
The method's authorization type. This parameter is required. For valid values, see [Method](https://docs.aws.amazon.com/apigateway/latest/api/API_Method.html) in the *API Gateway API Reference*.  
If you specify the `AuthorizerId` property, specify `CUSTOM` or `COGNITO_USER_POOLS` for this property.
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AuthorizerId`  <a name="cfn-apigateway-method-authorizerid"></a>
The identifier of an authorizer to use on this method. The method's authorization type must be `CUSTOM` or `COGNITO_USER_POOLS`.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`HttpMethod`  <a name="cfn-apigateway-method-httpmethod"></a>
The method's HTTP verb.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Integration`  <a name="cfn-apigateway-method-integration"></a>
Represents an `HTTP`, `HTTP_PROXY`, `AWS`, `AWS_PROXY`, or Mock integration.  
*Required*: No  
*Type*: [Integration](aws-properties-apigateway-method-integration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MethodResponses`  <a name="cfn-apigateway-method-methodresponses"></a>
Gets a method response associated with a given HTTP status code.   
*Required*: No  
*Type*: Array of [MethodResponse](aws-properties-apigateway-method-methodresponse.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`OperationName`  <a name="cfn-apigateway-method-operationname"></a>
A human-friendly operation identifier for the method. For example, you can assign the `operationName` of `ListPets` for the `GET /pets` method in the `PetStore` example.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RequestModels`  <a name="cfn-apigateway-method-requestmodels"></a>
A key-value map specifying data schemas, represented by Model resources, (as the mapped value) of the request payloads of given content types (as the mapping key).  
*Required*: No  
*Type*: Object of String  
*Pattern*: `[a-zA-Z0-9]+`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RequestParameters`  <a name="cfn-apigateway-method-requestparameters"></a>
A key-value map defining required or optional method request parameters that can be accepted by API Gateway. A key is a method request parameter name matching the pattern of `method.request.{location}.{name}`, where `location` is `querystring`, `path`, or `header` and `name` is a valid and unique parameter name. The value associated with the key is a Boolean flag indicating whether the parameter is required (`true`) or optional (`false`). The method request parameter names defined here are available in Integration to be mapped to integration request parameters or templates.  
*Required*: No  
*Type*: Object of String  
*Pattern*: `[a-zA-Z0-9]+`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RequestValidatorId`  <a name="cfn-apigateway-method-requestvalidatorid"></a>
The identifier of a RequestValidator for request validation.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ResourceId`  <a name="cfn-apigateway-method-resourceid"></a>
The Resource identifier for the MethodResponse resource.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`RestApiId`  <a name="cfn-apigateway-method-restapiid"></a>
The string identifier of the associated RestApi.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-apigateway-method-return-values"></a>

### Ref
<a name="aws-resource-apigateway-method-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the method ID, such as `mysta-metho-01234b567890example`.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

## Examples
<a name="aws-resource-apigateway-method--examples"></a>



**Topics**
+ [Mock Method](#aws-resource-apigateway-method--examples--Mock_Method)
+ [Lambda Proxy](#aws-resource-apigateway-method--examples--Lambda_Proxy)
+ [Associated Request Validator](#aws-resource-apigateway-method--examples--Associated_Request_Validator)

### Mock Method
<a name="aws-resource-apigateway-method--examples--Mock_Method"></a>

The following example creates a mock GET method for the `MyApi` API.

#### JSON
<a name="aws-resource-apigateway-method--examples--Mock_Method--json"></a>

```
{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Resources": {
        "Api": {
            "Type": "AWS::ApiGateway::RestApi",
            "Properties": {
                "Name": "myAPI"
            }
        },
        "MockMethod": {
            "Type": "AWS::ApiGateway::Method",
            "Properties": {
                "RestApiId": {
                    "Ref": "Api"
                },
                "ResourceId": {
                    "Fn::GetAtt": [
                        "Api",
                        "RootResourceId"
                    ]
                },
                "HttpMethod": "GET",
                "AuthorizationType": "NONE",
                "RequestParameters": {
                    "method.request.header.myheader": false
                },
                "Integration": {
                    "Type": "MOCK",
                    "RequestParameters": {
                        "integration.request.header.header1": "method.request.header.myheader"
                    },
                    "RequestTemplates": {
                        "application/json": "{\"statusCode\": 200}"
                    },
                    "IntegrationResponses": [
                        {
                            "StatusCode": "200",
                            "ResponseParameters": {
                                "method.response.header.header1": "integration.response.header.header1",
                                "method.response.header.header2": "'staticvalue'"
                            }
                        }
                    ]
                },
                "MethodResponses": [
                    {
                        "StatusCode": "200",
                        "ResponseParameters": {
                            "method.response.header.header1": true,
                            "method.response.header.header2": true
                        }
                    }
                ]
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-apigateway-method--examples--Mock_Method--yaml"></a>

```
AWSTemplateFormatVersion: '2010-09-09'
Resources:
  Api:
    Type: AWS::ApiGateway::RestApi
    Properties:
      Name: myAPI
  MockMethod:
    Type: AWS::ApiGateway::Method
    Properties:
      RestApiId: !Ref Api
      ResourceId: !GetAtt Api.RootResourceId
      HttpMethod: GET
      AuthorizationType: NONE
      RequestParameters:
        method.request.header.myheader: false
      Integration:
        Type: MOCK
        RequestTemplates:
          application/json: "{\"statusCode\": 200}"
        RequestParameters:
          integration.request.header.header1: method.request.header.myheader
        IntegrationResponses:
          - StatusCode: '200'
            ResponseParameters:
              method.response.header.header1: integration.response.header.header1
              method.response.header.header2: '''staticvalue'''
      MethodResponses:
        - StatusCode: '200'
          ResponseParameters:
            method.response.header.header1: true
            method.response.header.header2: true
```

### Lambda Proxy
<a name="aws-resource-apigateway-method--examples--Lambda_Proxy"></a>

The following example creates a proxy resource to enable clients to call a Lambda function with a single integration setup on a catch-all ANY method. The `Uri` property specifies the Lambda function. For more information about Lambda proxy integration and a sample Lambda function, see [Create an API with Lambda Proxy Integration through a Proxy Resource](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-create-api-as-simple-proxy-for-lambda.html) in the *API Gateway Developer Guide*.

**Note**  
Use the [AWS::Lambda::Permission](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-permission.html) resource to grant API Gateway permission to invoke your Lambda function.

#### JSON
<a name="aws-resource-apigateway-method--examples--Lambda_Proxy--json"></a>

```
{
    "ProxyResource": {
        "Type": "AWS::ApiGateway::Resource",
        "Properties": {
            "RestApiId": {
                "Ref": "LambdaSimpleProxy"
            },
            "ParentId": {
                "Fn::GetAtt": [
                    "LambdaSimpleProxy",
                    "RootResourceId"
                ]
            },
            "PathPart": "{proxy+}"
        }
    },
    "ProxyResourceANY": {
        "Type": "AWS::ApiGateway::Method",
        "Properties": {
            "RestApiId": {
                "Ref": "LambdaSimpleProxy"
            },
            "ResourceId": {
                "Ref": "ProxyResource"
            },
            "HttpMethod": "ANY",
            "AuthorizationType": "NONE",
            "Integration": {
                "Type": "AWS_PROXY",
                "IntegrationHttpMethod": "POST",
                "Uri": {
                    "Fn::Sub": "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${LambdaForSimpleProxy.Arn}/invocations"
                }
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-apigateway-method--examples--Lambda_Proxy--yaml"></a>

```
ProxyResource:
  Type: 'AWS::ApiGateway::Resource'
  Properties:
    RestApiId: !Ref LambdaSimpleProxy
    ParentId: !GetAtt 
      - LambdaSimpleProxy
      - RootResourceId
    PathPart: '{proxy+}'
ProxyResourceANY:
  Type: 'AWS::ApiGateway::Method'
  Properties:
    RestApiId: !Ref LambdaSimpleProxy
    ResourceId: !Ref ProxyResource
    HttpMethod: ANY
    AuthorizationType: NONE
    Integration:
      Type: AWS_PROXY
      IntegrationHttpMethod: POST
      Uri: !Sub >-
        arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${LambdaForSimpleProxy.Arn}/invocations
```

### Associated Request Validator
<a name="aws-resource-apigateway-method--examples--Associated_Request_Validator"></a>

The following example creates a REST API, method, and request validator, and associates the request validator with the method. It also lets you specify how to convert the request payload.

#### JSON
<a name="aws-resource-apigateway-method--examples--Associated_Request_Validator--json"></a>

```
{
  "Parameters": {
    "contentHandling": {
      "Type": "String"
    },
    "operationName": {
      "Type": "String",
      "Default": "testoperationName"
    },
    "restApiName": {
      "Type": "String",
      "Default": "testrestApiName"
    },
    "validatorName": {
      "Type": "String",
      "Default": "testvalidatorName"
    },
    "validateRequestBody": {
      "Type": "String",
      "Default": "testvalidateRequestBody"
    },
    "validateRequestParameters": {
      "Type": "String",
      "Default": true
    }
  },
  "Resources": {
    "RestApi": {
      "Type": "AWS::ApiGateway::RestApi",
      "Properties": {
        "Name": {
          "Ref": "restApiName"
        }
      }
    },
    "Method": {
      "Type": "AWS::ApiGateway::Method",
      "Properties": {
        "HttpMethod": "POST",
        "ResourceId": {
          "Fn::GetAtt": [
            "RestApi",
            "RootResourceId"
          ]
        },
        "RestApiId": {
          "Ref": "RestApi"
        },
        "AuthorizationType": "NONE",
        "Integration": {
          "Type": "MOCK",
          "ContentHandling": {
            "Ref": "contentHandling"
          },
          "IntegrationResponses": [
            {
              "ContentHandling": {
                "Ref": "contentHandling"
              },
              "StatusCode": 400
            }
          ]
        },
        "RequestValidatorId": {
          "Ref": "RequestValidator"
        },
        "OperationName": {
          "Ref": "operationName"
        }
      }
    },
    "RequestValidator": {
      "Type": "AWS::ApiGateway::RequestValidator",
      "Properties": {
        "Name": {
          "Ref": "validatorName"
        },
        "RestApiId": {
          "Ref": "RestApi"
        },
        "ValidateRequestBody": {
          "Ref": "validateRequestBody"
        },
        "ValidateRequestParameters": {
          "Ref": "validateRequestParameters"
        }
      }
    }
  },
  "Outputs": {
    "RootResourceId": {
      "Value": {
        "Fn::GetAtt": [
          "RestApi",
          "RootResourceId"
        ]
      }
    }
  }
}
```

#### YAML
<a name="aws-resource-apigateway-method--examples--Associated_Request_Validator--yaml"></a>

```
Parameters:
  contentHandling:
    Type: String
  operationName:
    Type: String
    Default: testoperationName
  restApiName:
    Type: String
    Default: testrestApiName
  validatorName:
    Type: String
    Default: testvalidatorName
  validateRequestBody:
    Type: String
    Default: testvalidateRequestBody
  validateRequestParameters:
    Type: String
    Default: true
Resources:
  RestApi:
    Type: AWS::ApiGateway::RestApi
    Properties:
      Name: !Ref restApiName
  Method:
    Type: AWS::ApiGateway::Method
    Properties:
      HttpMethod: POST
      ResourceId: !GetAtt RestApi.RootResourceId
      RestApiId: !Ref RestApi
      AuthorizationType: NONE
      Integration:
        Type: MOCK
        ContentHandling: !Ref contentHandling
        IntegrationResponses:
          - ContentHandling: !Ref contentHandling
            StatusCode: 400
      RequestValidatorId: !Ref RequestValidator
      OperationName: !Ref operationName
  RequestValidator:
    Type: AWS::ApiGateway::RequestValidator
    Properties:
      Name: !Ref validatorName
      RestApiId: !Ref RestApi
      ValidateRequestBody: !Ref validateRequestBody
      ValidateRequestParameters: !Ref validateRequestParameters
Outputs:
  RootResourceId:
    Value: !GetAtt RestApi.RootResourceId
```

## See also
<a name="aws-resource-apigateway-method--seealso"></a>
+ [method:put](https://docs.aws.amazon.com/apigateway/latest/api/API_PutMethod.html) in the *Amazon API Gateway REST API Reference*



# AWS::ApiGateway::Method Integration
<a name="aws-properties-apigateway-method-integration"></a>

`Integration` is a property of the [AWS::ApiGateway::Method](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-method.html) resource that specifies information about the target backend that a method calls.

## Syntax
<a name="aws-properties-apigateway-method-integration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-apigateway-method-integration-syntax.json"></a>

```
{
  "[CacheKeyParameters](#cfn-apigateway-method-integration-cachekeyparameters)" : [ String, ... ],
  "[CacheNamespace](#cfn-apigateway-method-integration-cachenamespace)" : String,
  "[ConnectionId](#cfn-apigateway-method-integration-connectionid)" : String,
  "[ConnectionType](#cfn-apigateway-method-integration-connectiontype)" : String,
  "[ContentHandling](#cfn-apigateway-method-integration-contenthandling)" : String,
  "[Credentials](#cfn-apigateway-method-integration-credentials)" : String,
  "[IntegrationHttpMethod](#cfn-apigateway-method-integration-integrationhttpmethod)" : String,
  "[IntegrationResponses](#cfn-apigateway-method-integration-integrationresponses)" : [ IntegrationResponse, ... ],
  "[IntegrationTarget](#cfn-apigateway-method-integration-integrationtarget)" : String,
  "[PassthroughBehavior](#cfn-apigateway-method-integration-passthroughbehavior)" : String,
  "[RequestParameters](#cfn-apigateway-method-integration-requestparameters)" : {Key: Value, ...},
  "[RequestTemplates](#cfn-apigateway-method-integration-requesttemplates)" : {Key: Value, ...},
  "[ResponseTransferMode](#cfn-apigateway-method-integration-responsetransfermode)" : String,
  "[TimeoutInMillis](#cfn-apigateway-method-integration-timeoutinmillis)" : Integer,
  "[Type](#cfn-apigateway-method-integration-type)" : String,
  "[Uri](#cfn-apigateway-method-integration-uri)" : String
}
```

### YAML
<a name="aws-properties-apigateway-method-integration-syntax.yaml"></a>

```
  [CacheKeyParameters](#cfn-apigateway-method-integration-cachekeyparameters): 
    - String
  [CacheNamespace](#cfn-apigateway-method-integration-cachenamespace): String
  [ConnectionId](#cfn-apigateway-method-integration-connectionid): String
  [ConnectionType](#cfn-apigateway-method-integration-connectiontype): String
  [ContentHandling](#cfn-apigateway-method-integration-contenthandling): String
  [Credentials](#cfn-apigateway-method-integration-credentials): String
  [IntegrationHttpMethod](#cfn-apigateway-method-integration-integrationhttpmethod): String
  [IntegrationResponses](#cfn-apigateway-method-integration-integrationresponses): 
    - IntegrationResponse
  [IntegrationTarget](#cfn-apigateway-method-integration-integrationtarget): String
  [PassthroughBehavior](#cfn-apigateway-method-integration-passthroughbehavior): String
  [RequestParameters](#cfn-apigateway-method-integration-requestparameters): 
    Key: Value
  [RequestTemplates](#cfn-apigateway-method-integration-requesttemplates): 
    Key: Value
  [ResponseTransferMode](#cfn-apigateway-method-integration-responsetransfermode): String
  [TimeoutInMillis](#cfn-apigateway-method-integration-timeoutinmillis): Integer
  [Type](#cfn-apigateway-method-integration-type): String
  [Uri](#cfn-apigateway-method-integration-uri): String
```

## Properties
<a name="aws-properties-apigateway-method-integration-properties"></a>

`CacheKeyParameters`  <a name="cfn-apigateway-method-integration-cachekeyparameters"></a>
A list of request parameters whose values API Gateway caches. To be valid values for `cacheKeyParameters`, these parameters must also be specified for Method `requestParameters`.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CacheNamespace`  <a name="cfn-apigateway-method-integration-cachenamespace"></a>
Specifies a group of related cached parameters. By default, API Gateway uses the resource ID as the `cacheNamespace`. You can specify the same `cacheNamespace` across resources to return the same cached data for requests to different resources.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ConnectionId`  <a name="cfn-apigateway-method-integration-connectionid"></a>
The ID of the VpcLink used for the integration when `connectionType=VPC_LINK` and undefined, otherwise.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ConnectionType`  <a name="cfn-apigateway-method-integration-connectiontype"></a>
The type of the network connection to the integration endpoint. The valid value is `INTERNET` for connections through the public routable internet or `VPC_LINK` for private connections between API Gateway and a network load balancer in a VPC. The default value is `INTERNET`.  
*Required*: No  
*Type*: String  
*Allowed values*: `INTERNET | VPC_LINK`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ContentHandling`  <a name="cfn-apigateway-method-integration-contenthandling"></a>
Specifies how to handle request payload content type conversions. Supported values are `CONVERT_TO_BINARY` and `CONVERT_TO_TEXT`, with the following behaviors:  
If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the `passthroughBehavior` is configured to support payload pass-through.  
*Required*: No  
*Type*: String  
*Allowed values*: `CONVERT_TO_BINARY | CONVERT_TO_TEXT`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Credentials`  <a name="cfn-apigateway-method-integration-credentials"></a>
Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify the string `arn:aws:iam::\*:user/\*`. To use resource-based permissions on supported AWS services, specify null.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`IntegrationHttpMethod`  <a name="cfn-apigateway-method-integration-integrationhttpmethod"></a>
Specifies the integration's HTTP method type. For the Type property, if you specify `MOCK`, this property is optional. For Lambda integrations, you must set the integration method to `POST`. For all other types, you must specify this property.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`IntegrationResponses`  <a name="cfn-apigateway-method-integration-integrationresponses"></a>
Specifies the integration's responses.  
*Required*: No  
*Type*: Array of [IntegrationResponse](aws-properties-apigateway-method-integrationresponse.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`IntegrationTarget`  <a name="cfn-apigateway-method-integration-integrationtarget"></a>
The ALB or NLB listener to send the request to. Only supported for private integrations that use VPC links V2.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PassthroughBehavior`  <a name="cfn-apigateway-method-integration-passthroughbehavior"></a>
Specifies how the method request body of an unmapped content type will be passed through the integration request to the back end without transformation. A content type is unmapped if no mapping template is defined in the integration or the content type does not match any of the mapped content types, as specified in `requestTemplates`. The valid value is one of the following: `WHEN_NO_MATCH`: passes the method request body through the integration request to the back end without transformation when the method request content type does not match any content type associated with the mapping templates defined in the integration request. `WHEN_NO_TEMPLATES`: passes the method request body through the integration request to the back end without transformation when no mapping template is defined in the integration request. If a template is defined when this option is selected, the method request of an unmapped content-type will be rejected with an HTTP 415 Unsupported Media Type response. `NEVER`: rejects the method request with an HTTP 415 Unsupported Media Type response when either the method request content type does not match any content type associated with the mapping templates defined in the integration request or no mapping template is defined in the integration request.  
*Required*: No  
*Type*: String  
*Allowed values*: `WHEN_NO_MATCH | WHEN_NO_TEMPLATES | NEVER`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RequestParameters`  <a name="cfn-apigateway-method-integration-requestparameters"></a>
A key-value map specifying request parameters that are passed from the method request to the back end. The key is an integration request parameter name and the associated value is a method request parameter value or static value that must be enclosed within single quotes and pre-encoded as required by the back end. The method request parameter value must match the pattern of `method.request.{location}.{name}`, where `location` is `querystring`, `path`, or `header` and `name` must be a valid and unique method request parameter name.  
*Required*: No  
*Type*: Object of String  
*Pattern*: `[a-zA-Z0-9]+`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RequestTemplates`  <a name="cfn-apigateway-method-integration-requesttemplates"></a>
Represents a map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client. The content type value is the key in this map, and the template (as a String) is the value.  
*Required*: No  
*Type*: Object of String  
*Pattern*: `[a-zA-Z0-9]+`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ResponseTransferMode`  <a name="cfn-apigateway-method-integration-responsetransfermode"></a>
The response transfer mode of the integration. Use `STREAM` to have API Gateway stream response your back to you or use `BUFFERED` to have API Gateway wait to receive the complete response before beginning transmission.  
*Required*: No  
*Type*: String  
*Allowed values*: `BUFFERED | STREAM`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TimeoutInMillis`  <a name="cfn-apigateway-method-integration-timeoutinmillis"></a>
Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 seconds. You can increase the default value to longer than 29 seconds for Regional or private APIs only.  
*Required*: No  
*Type*: Integer  
*Minimum*: `50`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Type`  <a name="cfn-apigateway-method-integration-type"></a>
Specifies an API method integration type. The valid value is one of the following:  
For the HTTP and HTTP proxy integrations, each integration can specify a protocol (`http/https`), port and path. Standard 80 and 443 ports are supported as well as custom ports above 1024. An HTTP or HTTP proxy integration with a `connectionType` of `VPC_LINK` is referred to as a private integration and uses a VpcLink to connect API Gateway to a network load balancer of a VPC.  
*Required*: Yes  
*Type*: String  
*Allowed values*: `AWS | AWS_PROXY | HTTP | HTTP_PROXY | MOCK`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Uri`  <a name="cfn-apigateway-method-integration-uri"></a>
Specifies Uniform Resource Identifier (URI) of the integration endpoint.  
For `HTTP` or `HTTP_PROXY` integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification for standard integrations. If `connectionType` is `VPC_LINK` specify the Network Load Balancer DNS name. For `AWS` or `AWS_PROXY` integrations, the URI is of the form `arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api}`. Here, \$1Region\$1 is the API Gateway region (e.g., us-east-1); \$1service\$1 is the name of the integrated AWS service (e.g., s3); and \$1subdomain\$1 is a designated subdomain supported by certain AWS service for fast host-name lookup. action can be used for an AWS service action-based API, using an Action=\$1name\$1&\$1p1\$1=\$1v1\$1&p2=\$1v2\$1... query string. The ensuing \$1service\$1api\$1 refers to a supported action \$1name\$1 plus any required input parameters. Alternatively, path can be used for an AWS service path-based API. The ensuing service\$1api refers to the path to an AWS service resource, including the region of the integrated AWS service, if applicable. For example, for integration with the S3 API of GetObject, the uri can be either `arn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key}` or `arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key}`  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-apigateway-method-integration--seealso"></a>
+ [Method](https://docs.aws.amazon.com/apigateway/latest/api/API_Method.html) in the *Amazon API Gateway REST API Reference*



# AWS::ApiGateway::Method IntegrationResponse
<a name="aws-properties-apigateway-method-integrationresponse"></a>

`IntegrationResponse` is a property of the [Amazon API Gateway Method Integration](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apitgateway-method-integration.html) property type that specifies the response that API Gateway sends after a method's backend finishes processing a request.

## Syntax
<a name="aws-properties-apigateway-method-integrationresponse-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-apigateway-method-integrationresponse-syntax.json"></a>

```
{
  "[ContentHandling](#cfn-apigateway-method-integrationresponse-contenthandling)" : String,
  "[ResponseParameters](#cfn-apigateway-method-integrationresponse-responseparameters)" : {Key: Value, ...},
  "[ResponseTemplates](#cfn-apigateway-method-integrationresponse-responsetemplates)" : {Key: Value, ...},
  "[SelectionPattern](#cfn-apigateway-method-integrationresponse-selectionpattern)" : String,
  "[StatusCode](#cfn-apigateway-method-integrationresponse-statuscode)" : String
}
```

### YAML
<a name="aws-properties-apigateway-method-integrationresponse-syntax.yaml"></a>

```
  [ContentHandling](#cfn-apigateway-method-integrationresponse-contenthandling): String
  [ResponseParameters](#cfn-apigateway-method-integrationresponse-responseparameters): 
    Key: Value
  [ResponseTemplates](#cfn-apigateway-method-integrationresponse-responsetemplates): 
    Key: Value
  [SelectionPattern](#cfn-apigateway-method-integrationresponse-selectionpattern): String
  [StatusCode](#cfn-apigateway-method-integrationresponse-statuscode): String
```

## Properties
<a name="aws-properties-apigateway-method-integrationresponse-properties"></a>

`ContentHandling`  <a name="cfn-apigateway-method-integrationresponse-contenthandling"></a>
Specifies how to handle response payload content type conversions. Supported values are `CONVERT_TO_BINARY` and `CONVERT_TO_TEXT`, with the following behaviors:  
If this property is not defined, the response payload will be passed through from the integration response to the method response without modification.  
*Required*: No  
*Type*: String  
*Allowed values*: `CONVERT_TO_BINARY | CONVERT_TO_TEXT`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ResponseParameters`  <a name="cfn-apigateway-method-integrationresponse-responseparameters"></a>
A key-value map specifying response parameters that are passed to the method response from the back end. The key is a method response header parameter name and the mapped value is an integration response header value, a static value enclosed within a pair of single quotes, or a JSON expression from the integration response body. The mapping key must match the pattern of `method.response.header.{name}`, where `name` is a valid and unique header name. The mapped non-static value must match the pattern of `integration.response.header.{name}` or `integration.response.body.{JSON-expression}`, where `name` is a valid and unique response header name and `JSON-expression` is a valid JSON expression without the `$` prefix.  
*Required*: No  
*Type*: Object of String  
*Pattern*: `[a-zA-Z0-9]+`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ResponseTemplates`  <a name="cfn-apigateway-method-integrationresponse-responsetemplates"></a>
Specifies the templates used to transform the integration response body. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.  
*Required*: No  
*Type*: Object of String  
*Pattern*: `[a-zA-Z0-9]+`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SelectionPattern`  <a name="cfn-apigateway-method-integrationresponse-selectionpattern"></a>
Specifies the regular expression (regex) pattern used to choose an integration response based on the response from the back end. For example, if the success response returns nothing and the error response returns some string, you could use the `.+` regex to match error response. However, make sure that the error response does not contain any newline (`\n`) character in such cases. If the back end is an AWS Lambda function, the AWS Lambda function error header is matched. For all other HTTP and AWS back ends, the HTTP status code is matched.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`StatusCode`  <a name="cfn-apigateway-method-integrationresponse-statuscode"></a>
Specifies the status code that is used to map the integration response to an existing MethodResponse.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-apigateway-method-integrationresponse--seealso"></a>
+ [Method](https://docs.aws.amazon.com/apigateway/latest/api/API_Method.html) in the *Amazon API Gateway REST API Reference*



# AWS::ApiGateway::Method MethodResponse
<a name="aws-properties-apigateway-method-methodresponse"></a>

Represents a method response of a given HTTP status code returned to the client. The method response is passed from the back end through the associated integration response that can be transformed using a mapping template. 

## Syntax
<a name="aws-properties-apigateway-method-methodresponse-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-apigateway-method-methodresponse-syntax.json"></a>

```
{
  "[ResponseModels](#cfn-apigateway-method-methodresponse-responsemodels)" : {Key: Value, ...},
  "[ResponseParameters](#cfn-apigateway-method-methodresponse-responseparameters)" : {Key: Value, ...},
  "[StatusCode](#cfn-apigateway-method-methodresponse-statuscode)" : String
}
```

### YAML
<a name="aws-properties-apigateway-method-methodresponse-syntax.yaml"></a>

```
  [ResponseModels](#cfn-apigateway-method-methodresponse-responsemodels): 
    Key: Value
  [ResponseParameters](#cfn-apigateway-method-methodresponse-responseparameters): 
    Key: Value
  [StatusCode](#cfn-apigateway-method-methodresponse-statuscode): String
```

## Properties
<a name="aws-properties-apigateway-method-methodresponse-properties"></a>

`ResponseModels`  <a name="cfn-apigateway-method-methodresponse-responsemodels"></a>
Specifies the Model resources used for the response's content-type. Response models are represented as a key/value map, with a content-type as the key and a Model name as the value.  
*Required*: No  
*Type*: Object of String  
*Pattern*: `[a-zA-Z0-9]+`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ResponseParameters`  <a name="cfn-apigateway-method-methodresponse-responseparameters"></a>
A key-value map specifying required or optional response parameters that API Gateway can send back to the caller. A key defines a method response header and the value specifies whether the associated method response header is required or not. The expression of the key must match the pattern `method.response.header.{name}`, where `name` is a valid and unique header name. API Gateway passes certain integration response data to the method response headers specified here according to the mapping you prescribe in the API's IntegrationResponse. The integration response data that can be mapped include an integration response header expressed in `integration.response.header.{name}`, a static value enclosed within a pair of single quotes (e.g., `'application/json'`), or a JSON expression from the back-end response payload in the form of `integration.response.body.{JSON-expression}`, where `JSON-expression` is a valid JSON expression without the `$` prefix.)  
*Required*: No  
*Type*: Object of String  
*Pattern*: `[a-zA-Z0-9]+`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`StatusCode`  <a name="cfn-apigateway-method-methodresponse-statuscode"></a>
The method response's status code.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-apigateway-method-methodresponse--seealso"></a>
+ [Method](https://docs.aws.amazon.com/apigateway/latest/api/API_Method.html) in the *Amazon API Gateway REST API Reference*



# AWS::ApiGateway::Model
<a name="aws-resource-apigateway-model"></a>

The `AWS::ApiGateway::Model` resource defines the structure of a request or response payload for an API method.

## Syntax
<a name="aws-resource-apigateway-model-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-apigateway-model-syntax.json"></a>

```
{
  "Type" : "AWS::ApiGateway::Model",
  "Properties" : {
      "[ContentType](#cfn-apigateway-model-contenttype)" : String,
      "[Description](#cfn-apigateway-model-description)" : String,
      "[Name](#cfn-apigateway-model-name)" : String,
      "[RestApiId](#cfn-apigateway-model-restapiid)" : String,
      "[Schema](#cfn-apigateway-model-schema)" : Json
    }
}
```

### YAML
<a name="aws-resource-apigateway-model-syntax.yaml"></a>

```
Type: AWS::ApiGateway::Model
Properties:
  [ContentType](#cfn-apigateway-model-contenttype): String
  [Description](#cfn-apigateway-model-description): String
  [Name](#cfn-apigateway-model-name): String
  [RestApiId](#cfn-apigateway-model-restapiid): String
  [Schema](#cfn-apigateway-model-schema): Json
```

## Properties
<a name="aws-resource-apigateway-model-properties"></a>

`ContentType`  <a name="cfn-apigateway-model-contenttype"></a>
The content-type for the model.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Description`  <a name="cfn-apigateway-model-description"></a>
The description of the model.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Name`  <a name="cfn-apigateway-model-name"></a>
A name for the model. If you don't specify a name, CloudFormation generates a unique physical ID and uses that ID for the model name. For more information, see [Name Type](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-name.html).  
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. 
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`RestApiId`  <a name="cfn-apigateway-model-restapiid"></a>
The string identifier of the associated RestApi.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Schema`  <a name="cfn-apigateway-model-schema"></a>
The schema for the model. For `application/json` models, this should be JSON schema draft 4 model. Do not include "\$1\$1/" characters in the description of any properties because such "\$1\$1/" characters may be interpreted as the closing marker for comments in some languages, such as Java or JavaScript, causing the installation of your API's SDK generated by API Gateway to fail.  
*Required*: No  
*Type*: Json  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-apigateway-model-return-values"></a>

### Ref
<a name="aws-resource-apigateway-model-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the model name, such as `myModel`.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

## Examples
<a name="aws-resource-apigateway-model--examples"></a>



### Create model
<a name="aws-resource-apigateway-model--examples--Create_model"></a>

The following example creates a model that transforms input data into the described schema.

#### JSON
<a name="aws-resource-apigateway-model--examples--Create_model--json"></a>

```
{
    "PetsModelNoFlatten": {
        "Type": "AWS::ApiGateway::Model",
        "Properties": {
            "RestApiId": {
                "Ref": "RestApi"
            },
            "ContentType": "application/json",
            "Description": "Schema for Pets example",
            "Name": "PetsModelNoFlatten",
            "Schema": {
                "$schema": "http://json-schema.org/draft-04/schema#",
                "title": "PetsModelNoFlatten",
                "type": "array",
                "items": {
                    "type": "object",
                    "properties": {
                        "number": {
                            "type": "integer"
                        },
                        "class": {
                            "type": "string"
                        },
                        "salesPrice": {
                            "type": "number"
                        }
                    }
                }
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-apigateway-model--examples--Create_model--yaml"></a>

```
PetsModelNoFlatten:
  Type: 'AWS::ApiGateway::Model'
  Properties:
    RestApiId: !Ref RestApi
    ContentType: application/json
    Description: Schema for Pets example
    Name: PetsModelNoFlatten
    Schema:
      $schema: 'http://json-schema.org/draft-04/schema#'
      title: PetsModelNoFlatten
      type: array
      items:
        type: object
        properties:
          number:
            type: integer
          class:
            type: string
          salesPrice:
            type: number
```

## See also
<a name="aws-resource-apigateway-model--seealso"></a>
+ [model:create](https://docs.aws.amazon.com/apigateway/latest/api/API_CreateModel.html) in the *Amazon API Gateway REST API Reference*



# AWS::ApiGateway::RequestValidator
<a name="aws-resource-apigateway-requestvalidator"></a>

The `AWS::ApiGateway::RequestValidator` resource sets up basic validation rules for incoming requests to your API. For more information, see [Enable Basic Request Validation for an API in API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-method-request-validation.html) in the *API Gateway Developer Guide*.

## Syntax
<a name="aws-resource-apigateway-requestvalidator-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-apigateway-requestvalidator-syntax.json"></a>

```
{
  "Type" : "AWS::ApiGateway::RequestValidator",
  "Properties" : {
      "[Name](#cfn-apigateway-requestvalidator-name)" : String,
      "[RestApiId](#cfn-apigateway-requestvalidator-restapiid)" : String,
      "[ValidateRequestBody](#cfn-apigateway-requestvalidator-validaterequestbody)" : Boolean,
      "[ValidateRequestParameters](#cfn-apigateway-requestvalidator-validaterequestparameters)" : Boolean
    }
}
```

### YAML
<a name="aws-resource-apigateway-requestvalidator-syntax.yaml"></a>

```
Type: AWS::ApiGateway::RequestValidator
Properties:
  [Name](#cfn-apigateway-requestvalidator-name): String
  [RestApiId](#cfn-apigateway-requestvalidator-restapiid): String
  [ValidateRequestBody](#cfn-apigateway-requestvalidator-validaterequestbody): Boolean
  [ValidateRequestParameters](#cfn-apigateway-requestvalidator-validaterequestparameters): Boolean
```

## Properties
<a name="aws-resource-apigateway-requestvalidator-properties"></a>

`Name`  <a name="cfn-apigateway-requestvalidator-name"></a>
The name of this RequestValidator  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`RestApiId`  <a name="cfn-apigateway-requestvalidator-restapiid"></a>
The string identifier of the associated RestApi.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ValidateRequestBody`  <a name="cfn-apigateway-requestvalidator-validaterequestbody"></a>
A Boolean flag to indicate whether to validate a request body according to the configured Model schema.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ValidateRequestParameters`  <a name="cfn-apigateway-requestvalidator-validaterequestparameters"></a>
A Boolean flag to indicate whether to validate request parameters (`true`) or not (`false`).  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-apigateway-requestvalidator-return-values"></a>

### Ref
<a name="aws-resource-apigateway-requestvalidator-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the ID of the request validator, such as `abc123`.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-apigateway-requestvalidator-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-apigateway-requestvalidator-return-values-fn--getatt-fn--getatt"></a>

`RequestValidatorId`  <a name="RequestValidatorId-fn::getatt"></a>
The ID for the request validator. For example: `abc123`.

## Examples
<a name="aws-resource-apigateway-requestvalidator--examples"></a>



### Create request validator
<a name="aws-resource-apigateway-requestvalidator--examples--Create_request_validator"></a>

The following example creates an API Gateway API with an associated request validator, based on the supplied parameters.

#### JSON
<a name="aws-resource-apigateway-requestvalidator--examples--Create_request_validator--json"></a>

```
{
    "Parameters": {
        "apiName": {
            "Type": "String"
        },
        "validatorName": {
            "Type": "String"
        },
        "validateRequestBody": {
            "Type": "String"
        },
        "validateRequestParameters": {
            "Type": "String"
        }
    },
    "Resources": {
        "RestApi": {
            "Type": "AWS::ApiGateway::RestApi",
            "Properties": {
                "Name": {
                    "Ref": "apiName"
                }
            }
        },
        "RequestValidator": {
            "Type": "AWS::ApiGateway::RequestValidator",
            "Properties": {
                "Name": {
                    "Ref": "validatorName"
                },
                "RestApiId": {
                    "Ref": "RestApi"
                },
                "ValidateRequestBody": {
                    "Ref": "validateRequestBody"
                },
                "ValidateRequestParameters": {
                    "Ref": "validateRequestParameters"
                }
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-apigateway-requestvalidator--examples--Create_request_validator--yaml"></a>

```
Parameters:
  apiName:
    Type: String
  validatorName:
    Type: String
  validateRequestBody:
    Type: String
  validateRequestParameters:
    Type: String
Resources:
  RestApi:
    Type: AWS::ApiGateway::RestApi
    Properties:
      Name: !Ref apiName
  RequestValidator:
    Type: AWS::ApiGateway::RequestValidator
    Properties:
      Name: !Ref validatorName
      RestApiId: !Ref RestApi
      ValidateRequestBody: !Ref validateRequestBody
      ValidateRequestParameters: !Ref validateRequestParameters
```

## See also
<a name="aws-resource-apigateway-requestvalidator--seealso"></a>
+ [requestvalidator:create](https://docs.aws.amazon.com/apigateway/latest/api/API_CreateRequestValidator.html) in the *Amazon API Gateway REST API Reference*



# AWS::ApiGateway::Resource
<a name="aws-resource-apigateway-resource"></a>

The `AWS::ApiGateway::Resource` resource creates a resource in an API.

## Syntax
<a name="aws-resource-apigateway-resource-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-apigateway-resource-syntax.json"></a>

```
{
  "Type" : "AWS::ApiGateway::Resource",
  "Properties" : {
      "[ParentId](#cfn-apigateway-resource-parentid)" : String,
      "[PathPart](#cfn-apigateway-resource-pathpart)" : String,
      "[RestApiId](#cfn-apigateway-resource-restapiid)" : String
    }
}
```

### YAML
<a name="aws-resource-apigateway-resource-syntax.yaml"></a>

```
Type: AWS::ApiGateway::Resource
Properties:
  [ParentId](#cfn-apigateway-resource-parentid): String
  [PathPart](#cfn-apigateway-resource-pathpart): String
  [RestApiId](#cfn-apigateway-resource-restapiid): String
```

## Properties
<a name="aws-resource-apigateway-resource-properties"></a>

`ParentId`  <a name="cfn-apigateway-resource-parentid"></a>
The parent resource's identifier.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`PathPart`  <a name="cfn-apigateway-resource-pathpart"></a>
The last path segment for this resource.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`RestApiId`  <a name="cfn-apigateway-resource-restapiid"></a>
The string identifier of the associated RestApi.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-apigateway-resource-return-values"></a>

### Ref
<a name="aws-resource-apigateway-resource-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the resource ID, such as `abc123`.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-apigateway-resource-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-apigateway-resource-return-values-fn--getatt-fn--getatt"></a>

`ResourceId`  <a name="ResourceId-fn::getatt"></a>
The ID for the resource. For example: `abc123`.

## Examples
<a name="aws-resource-apigateway-resource--examples"></a>



### Create resource
<a name="aws-resource-apigateway-resource--examples--Create_resource"></a>

The following example creates a `stack` resource for the `MyApi` API.

#### JSON
<a name="aws-resource-apigateway-resource--examples--Create_resource--json"></a>

```
{
    "Stack": {
        "Type": "AWS::ApiGateway::Resource",
        "Properties": {
            "RestApiId": {
                "Ref": "MyApi"
            },
            "ParentId": {
                "Fn::GetAtt": [
                    "MyApi",
                    "RootResourceId"
                ]
            },
            "PathPart": "stack"
        }
    }
}
```

#### YAML
<a name="aws-resource-apigateway-resource--examples--Create_resource--yaml"></a>

```
Stack:
  Type: 'AWS::ApiGateway::Resource'
  Properties:
    RestApiId: !Ref MyApi
    ParentId: !GetAtt 
      - MyApi
      - RootResourceId
    PathPart: stack
```

## See also
<a name="aws-resource-apigateway-resource--seealso"></a>
+ [resource:create](https://docs.aws.amazon.com/apigateway/latest/api/API_CreateResource.html) in the *Amazon API Gateway REST API Reference*



# AWS::ApiGateway::RestApi
<a name="aws-resource-apigateway-restapi"></a>

The `AWS::ApiGateway::RestApi` resource creates a REST API. For more information, see [restapi:create](https://docs.aws.amazon.com/apigateway/latest/api/API_CreateRestApi.html) in the *Amazon API Gateway REST API Reference*.

**Note**  
On January 1, 2016, the Swagger Specification was donated to the [OpenAPI initiative](https://www.openapis.org/), becoming the foundation of the OpenAPI Specification.

## Syntax
<a name="aws-resource-apigateway-restapi-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-apigateway-restapi-syntax.json"></a>

```
{
  "Type" : "AWS::ApiGateway::RestApi",
  "Properties" : {
      "[ApiKeySourceType](#cfn-apigateway-restapi-apikeysourcetype)" : String,
      "[BinaryMediaTypes](#cfn-apigateway-restapi-binarymediatypes)" : [ String, ... ],
      "[Body](#cfn-apigateway-restapi-body)" : Json,
      "[BodyS3Location](#cfn-apigateway-restapi-bodys3location)" : S3Location,
      "[CloneFrom](#cfn-apigateway-restapi-clonefrom)" : String,
      "[Description](#cfn-apigateway-restapi-description)" : String,
      "[DisableExecuteApiEndpoint](#cfn-apigateway-restapi-disableexecuteapiendpoint)" : Boolean,
      "[EndpointAccessMode](#cfn-apigateway-restapi-endpointaccessmode)" : String,
      "[EndpointConfiguration](#cfn-apigateway-restapi-endpointconfiguration)" : EndpointConfiguration,
      "[FailOnWarnings](#cfn-apigateway-restapi-failonwarnings)" : Boolean,
      "[MinimumCompressionSize](#cfn-apigateway-restapi-minimumcompressionsize)" : Integer,
      "[Mode](#cfn-apigateway-restapi-mode)" : String,
      "[Name](#cfn-apigateway-restapi-name)" : String,
      "[Parameters](#cfn-apigateway-restapi-parameters)" : {Key: Value, ...},
      "[Policy](#cfn-apigateway-restapi-policy)" : Json,
      "[SecurityPolicy](#cfn-apigateway-restapi-securitypolicy)" : String,
      "[Tags](#cfn-apigateway-restapi-tags)" : [ Tag, ... ]
    }
}
```

### YAML
<a name="aws-resource-apigateway-restapi-syntax.yaml"></a>

```
Type: AWS::ApiGateway::RestApi
Properties:
  [ApiKeySourceType](#cfn-apigateway-restapi-apikeysourcetype): String
  [BinaryMediaTypes](#cfn-apigateway-restapi-binarymediatypes): 
    - String
  [Body](#cfn-apigateway-restapi-body): Json
  [BodyS3Location](#cfn-apigateway-restapi-bodys3location): 
    S3Location
  [CloneFrom](#cfn-apigateway-restapi-clonefrom): String
  [Description](#cfn-apigateway-restapi-description): String
  [DisableExecuteApiEndpoint](#cfn-apigateway-restapi-disableexecuteapiendpoint): Boolean
  [EndpointAccessMode](#cfn-apigateway-restapi-endpointaccessmode): String
  [EndpointConfiguration](#cfn-apigateway-restapi-endpointconfiguration): 
    EndpointConfiguration
  [FailOnWarnings](#cfn-apigateway-restapi-failonwarnings): Boolean
  [MinimumCompressionSize](#cfn-apigateway-restapi-minimumcompressionsize): Integer
  [Mode](#cfn-apigateway-restapi-mode): String
  [Name](#cfn-apigateway-restapi-name): String
  [Parameters](#cfn-apigateway-restapi-parameters): 
    Key: Value
  [Policy](#cfn-apigateway-restapi-policy): Json
  [SecurityPolicy](#cfn-apigateway-restapi-securitypolicy): String
  [Tags](#cfn-apigateway-restapi-tags): 
    - Tag
```

## Properties
<a name="aws-resource-apigateway-restapi-properties"></a>

`ApiKeySourceType`  <a name="cfn-apigateway-restapi-apikeysourcetype"></a>
The source of the API key for metering requests according to a usage plan. Valid values are: `HEADER` to read the API key from the `X-API-Key` header of a request. `AUTHORIZER` to read the API key from the `UsageIdentifierKey` from a custom authorizer.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`BinaryMediaTypes`  <a name="cfn-apigateway-restapi-binarymediatypes"></a>
The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Body`  <a name="cfn-apigateway-restapi-body"></a>
An OpenAPI specification that defines a set of RESTful APIs in JSON format. For YAML templates, you can also provide the specification in YAML format.  
*Required*: No  
*Type*: Json  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`BodyS3Location`  <a name="cfn-apigateway-restapi-bodys3location"></a>
The Amazon Simple Storage Service (Amazon S3) location that points to an OpenAPI file, which defines a set of RESTful APIs in JSON or YAML format.  
*Required*: No  
*Type*: [S3Location](aws-properties-apigateway-restapi-s3location.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CloneFrom`  <a name="cfn-apigateway-restapi-clonefrom"></a>
The ID of the RestApi that you want to clone from.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Description`  <a name="cfn-apigateway-restapi-description"></a>
The description of the RestApi.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DisableExecuteApiEndpoint`  <a name="cfn-apigateway-restapi-disableexecuteapiendpoint"></a>
Specifies whether clients can invoke your API by using the default `execute-api` endpoint. By default, clients can invoke your API with the default `https://{api_id}.execute-api.{region}.amazonaws.com` endpoint. To require that clients use a custom domain name to invoke your API, disable the default endpoint  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EndpointAccessMode`  <a name="cfn-apigateway-restapi-endpointaccessmode"></a>
The endpoint access mode for your RestApi.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EndpointConfiguration`  <a name="cfn-apigateway-restapi-endpointconfiguration"></a>
A list of the endpoint types and IP address types of the API. Use this property when creating an API. When importing an existing API, specify the endpoint configuration types using the `Parameters` property.  
*Required*: No  
*Type*: [EndpointConfiguration](aws-properties-apigateway-restapi-endpointconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`FailOnWarnings`  <a name="cfn-apigateway-restapi-failonwarnings"></a>
A query parameter to indicate whether to rollback the API update (`true`) or not (`false`) when a warning is encountered. The default value is `false`.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MinimumCompressionSize`  <a name="cfn-apigateway-restapi-minimumcompressionsize"></a>
A nullable integer that is used to enable compression (with non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable compression (with a null value) on an API. When compression is enabled, compression or decompression is not applied on the payload if the payload size is smaller than this value. Setting it to zero allows compression for any payload size.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Mode`  <a name="cfn-apigateway-restapi-mode"></a>
This property applies only when you use OpenAPI to define your REST API. The `Mode` determines how API Gateway handles resource updates.  
Valid values are `overwrite` or `merge`.   
For `overwrite`, the new API definition replaces the existing one. The existing API identifier remains unchanged.  
 For `merge`, the new API definition is merged with the existing API.  
If you don't specify this property, a default value is chosen. For REST APIs created before March 29, 2021, the default is `overwrite`. For REST APIs created after March 29, 2021, the new API definition takes precedence, but any container types such as endpoint configurations and binary media types are merged with the existing API.   
Use the default mode to define top-level `RestApi` properties in addition to using OpenAPI. Generally, it's preferred to use API Gateway's OpenAPI extensions to model these properties.   
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Name`  <a name="cfn-apigateway-restapi-name"></a>
The name of the RestApi. A name is required if the REST API is not based on an OpenAPI specification.  
*Required*: Conditional  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Parameters`  <a name="cfn-apigateway-restapi-parameters"></a>
Custom header parameters as part of the request. For example, to exclude DocumentationParts from an imported API, set `ignore=documentation` as a `parameters` value, as in the AWS CLI command of `aws apigateway import-rest-api --parameters ignore=documentation --body 'file:///path/to/imported-api-body.json'`.  
*Required*: No  
*Type*: Object of String  
*Pattern*: `[a-zA-Z0-9]+`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Policy`  <a name="cfn-apigateway-restapi-policy"></a>
A policy document that contains the permissions for the `RestApi` resource. To set the ARN for the policy, use the `!Join` intrinsic function with `""` as delimiter and values of `"execute-api:/"` and `"*"`.  
*Required*: No  
*Type*: Json  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SecurityPolicy`  <a name="cfn-apigateway-restapi-securitypolicy"></a>
The Transport Layer Security (TLS) version \$1 cipher suite for this RestApi.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Tags`  <a name="cfn-apigateway-restapi-tags"></a>
The key-value map of strings. The valid character set is [a-zA-Z\$1-=.\$1:/]. The tag key can be up to 128 characters and must not start with `aws:`. The tag value can be up to 256 characters.  
*Required*: No  
*Type*: Array of [Tag](aws-properties-apigateway-restapi-tag.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-apigateway-restapi-return-values"></a>

### Ref
<a name="aws-resource-apigateway-restapi-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the `RestApi` ID, such as `a1bcdef2gh`.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-apigateway-restapi-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-apigateway-restapi-return-values-fn--getatt-fn--getatt"></a>

`RestApiId`  <a name="RestApiId-fn::getatt"></a>
The string identifier of the associated RestApi.

`RootResourceId`  <a name="RootResourceId-fn::getatt"></a>
The root resource ID for a `RestApi` resource, such as `a0bc123d4e`.

## Examples
<a name="aws-resource-apigateway-restapi--examples"></a>



**Topics**
+ [Based on OpenAPI specification](#aws-resource-apigateway-restapi--examples--Based_on_OpenAPI_specification)
+ [With endpoint type](#aws-resource-apigateway-restapi--examples--With_endpoint_type)
+ [With REGIONAL endpoint type](#aws-resource-apigateway-restapi--examples--With_REGIONAL_endpoint_type)
+ [With ApiKeySourceType](#aws-resource-apigateway-restapi--examples--With_ApiKeySourceType)

### Based on OpenAPI specification
<a name="aws-resource-apigateway-restapi--examples--Based_on_OpenAPI_specification"></a>

The following example creates an API Gateway RestApi resource based on an OpenAPI specification.

#### JSON
<a name="aws-resource-apigateway-restapi--examples--Based_on_OpenAPI_specification--json"></a>

```
{
    "MyRestApi": {
        "Type": "AWS::ApiGateway::RestApi",
        "Properties": {
            "Body": {
                "OpenAPI specification": null
            },
            "Description": "A test API",
            "Name": "MyRestAPI"
        }
    }
}
```

#### YAML
<a name="aws-resource-apigateway-restapi--examples--Based_on_OpenAPI_specification--yaml"></a>

```
MyRestApi:
  Type: 'AWS::ApiGateway::RestApi'
  Properties:
    Body:
      OpenAPI specification: null
    Description: A test API
    Name: MyRestAPI
```

### With endpoint type
<a name="aws-resource-apigateway-restapi--examples--With_endpoint_type"></a>

The following example creates an API Gateway RestApi resource with an endpoint type.

#### JSON
<a name="aws-resource-apigateway-restapi--examples--With_endpoint_type--json"></a>

```
{
  "Parameters": {
    "apiName": {
      "Type": "String"
    },
    "type": {
      "Type": "String"
    }
  },
  "Resources": {
    "MyRestApi": {
      "Type": "AWS::ApiGateway::RestApi",
      "Properties": {
        "EndpointConfiguration": {
          "Types": [
            {
              "Ref": "type"
            }
          ]
        },
        "Name": {
          "Ref": "apiName"
        }
      }
    }
  }
}
```

#### YAML
<a name="aws-resource-apigateway-restapi--examples--With_endpoint_type--yaml"></a>

```
Parameters:
  apiName:
    Type: String
  type:
    Type: String
Resources:
  MyRestApi:
    Type: AWS::ApiGateway::RestApi
    Properties:
      EndpointConfiguration:
        Types:
          - !Ref type
      Name: !Ref apiName
```

### With REGIONAL endpoint type
<a name="aws-resource-apigateway-restapi--examples--With_REGIONAL_endpoint_type"></a>

The following example imports an API Gateway RestApi resource with an endpoint type of REGIONAL.

#### JSON
<a name="aws-resource-apigateway-restapi--examples--With_REGIONAL_endpoint_type--json"></a>

```
{
    "Resources": {
        "RestApi": {
            "Type": "AWS::ApiGateway::RestApi",
            "Properties": {
                "Body": {
                    "swagger": 2,
                    "info": {
                        "version": "0.0.1",
                        "title": "test"
                    },
                    "basePath": "/pete",
                    "schemes": [
                        "https"
                    ],
                    "definitions": {
                        "Empty": {
                            "type": "object"
                        }
                    }
                },
                "Name": "myApi",
                "Parameters": {
                    "endpointConfigurationTypes": "REGIONAL"
                }
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-apigateway-restapi--examples--With_REGIONAL_endpoint_type--yaml"></a>

```
Resources :
    RestApi :
        Type : AWS::ApiGateway::RestApi
        Properties :
            Body :
                swagger : 2.0
                info :
                    version : 0.0.1
                    title : test
                basePath : /pete
                schemes :
                    - https
                definitions:
                    Empty :
                        type : object
            Name : myApi
            Parameters:
                endpointConfigurationTypes: REGIONAL
```

### With ApiKeySourceType
<a name="aws-resource-apigateway-restapi--examples--With_ApiKeySourceType"></a>

The following example creates an API Gateway RestApi resource with ApiKeySourceType, BinaryMediaTypes and MinimumCompressionSize.

#### JSON
<a name="aws-resource-apigateway-restapi--examples--With_ApiKeySourceType--json"></a>

```
{
    "Parameters": {
        "apiKeySourceType": {
            "Type": "String"
        },
        "apiName": {
            "Type": "String"
        },
        "binaryMediaType1": {
            "Type": "String"
        },
        "binaryMediaType2": {
            "Type": "String"
        },
        "minimumCompressionSize": {
            "Type": "String"
        }
    },
    "Resources": {
        "MyRestApi": {
            "Type": "AWS::ApiGateway::RestApi",
            "Properties": {
                "ApiKeySourceType": {
                    "Ref": "apiKeySourceType"
                },
                "BinaryMediaTypes": [
                    {
                        "Ref": "binaryMediaType1"
                    },
                    {
                        "Ref": "binaryMediaType2"
                    }
                ],
                "MinimumCompressionSize": {
                    "Ref": "minimumCompressionSize"
                },
                "Name": {
                    "Ref": "apiName"
                }
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-apigateway-restapi--examples--With_ApiKeySourceType--yaml"></a>

```
Parameters:
    apiKeySourceType:
        Type: String
    apiName:
        Type: String
    binaryMediaType1:
        Type: String
    binaryMediaType2:
        Type: String
    minimumCompressionSize:
        Type: String
Resources:
    MyRestApi:
        Type: AWS::ApiGateway::RestApi
        Properties:
            ApiKeySourceType: !Ref apiKeySourceType
            BinaryMediaTypes:
                - !Ref binaryMediaType1
                - !Ref binaryMediaType2
            MinimumCompressionSize: !Ref minimumCompressionSize
            Name: !Ref apiName
```

## See also
<a name="aws-resource-apigateway-restapi--seealso"></a>
+ [restapi:create](https://docs.aws.amazon.com/apigateway/latest/api/API_CreateRestApi.html) in the *Amazon API Gateway REST API Reference*
+ [Tutorial: Building a private REST API](https://docs.aws.amazon.com/apigateway/latest/developerguide/private-api-tutorial.html) in the *API Gateway Developer Guide*



# AWS::ApiGateway::RestApi EndpointConfiguration
<a name="aws-properties-apigateway-restapi-endpointconfiguration"></a>

The `EndpointConfiguration` property type specifies the endpoint types and IP address types of a REST API.

`EndpointConfiguration` is a property of the [AWS::ApiGateway::RestApi](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-restapi.html) resource.

## Syntax
<a name="aws-properties-apigateway-restapi-endpointconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-apigateway-restapi-endpointconfiguration-syntax.json"></a>

```
{
  "[IpAddressType](#cfn-apigateway-restapi-endpointconfiguration-ipaddresstype)" : String,
  "[Types](#cfn-apigateway-restapi-endpointconfiguration-types)" : [ String, ... ],
  "[VpcEndpointIds](#cfn-apigateway-restapi-endpointconfiguration-vpcendpointids)" : [ String, ... ]
}
```

### YAML
<a name="aws-properties-apigateway-restapi-endpointconfiguration-syntax.yaml"></a>

```
  [IpAddressType](#cfn-apigateway-restapi-endpointconfiguration-ipaddresstype): String
  [Types](#cfn-apigateway-restapi-endpointconfiguration-types): 
    - String
  [VpcEndpointIds](#cfn-apigateway-restapi-endpointconfiguration-vpcendpointids): 
    - String
```

## Properties
<a name="aws-properties-apigateway-restapi-endpointconfiguration-properties"></a>

`IpAddressType`  <a name="cfn-apigateway-restapi-endpointconfiguration-ipaddresstype"></a>
The IP address types that can invoke an API (RestApi). Use `ipv4` to allow only IPv4 addresses to invoke an API, or use `dualstack` to allow both IPv4 and IPv6 addresses to invoke an API. For the `PRIVATE` endpoint type, only `dualstack` is supported.  
*Required*: No  
*Type*: String  
*Allowed values*: `ipv4 | dualstack`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Types`  <a name="cfn-apigateway-restapi-endpointconfiguration-types"></a>
A list of endpoint types of an API (RestApi) or its custom domain name (DomainName). For an edge-optimized API and its custom domain name, the endpoint type is `"EDGE"`. For a regional API and its custom domain name, the endpoint type is `REGIONAL`. For a private API, the endpoint type is `PRIVATE`.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`VpcEndpointIds`  <a name="cfn-apigateway-restapi-endpointconfiguration-vpcendpointids"></a>
A list of VpcEndpointIds of an API (RestApi) against which to create Route53 ALIASes. It is only supported for `PRIVATE` endpoint type.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-apigateway-restapi-endpointconfiguration--seealso"></a>
+ [RestApi](https://docs.aws.amazon.com/apigateway/latest/api/API_RestApi.html) in the *Amazon API Gateway REST API Reference*



# AWS::ApiGateway::RestApi S3Location
<a name="aws-properties-apigateway-restapi-s3location"></a>

`S3Location` is a property of the [AWS::ApiGateway::RestApi](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-restapi.html) resource that specifies the Amazon S3 location of a OpenAPI (formerly Swagger) file that defines a set of RESTful APIs in JSON or YAML.

**Note**  
On January 1, 2016, the Swagger Specification was donated to the [OpenAPI initiative](https://www.openapis.org/), becoming the foundation of the OpenAPI Specification.

## Syntax
<a name="aws-properties-apigateway-restapi-s3location-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-apigateway-restapi-s3location-syntax.json"></a>

```
{
  "[Bucket](#cfn-apigateway-restapi-s3location-bucket)" : String,
  "[ETag](#cfn-apigateway-restapi-s3location-etag)" : String,
  "[Key](#cfn-apigateway-restapi-s3location-key)" : String,
  "[Version](#cfn-apigateway-restapi-s3location-version)" : String
}
```

### YAML
<a name="aws-properties-apigateway-restapi-s3location-syntax.yaml"></a>

```
  [Bucket](#cfn-apigateway-restapi-s3location-bucket): String
  [ETag](#cfn-apigateway-restapi-s3location-etag): String
  [Key](#cfn-apigateway-restapi-s3location-key): String
  [Version](#cfn-apigateway-restapi-s3location-version): String
```

## Properties
<a name="aws-properties-apigateway-restapi-s3location-properties"></a>

`Bucket`  <a name="cfn-apigateway-restapi-s3location-bucket"></a>
The name of the S3 bucket where the OpenAPI file is stored.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ETag`  <a name="cfn-apigateway-restapi-s3location-etag"></a>
The Amazon S3 ETag (a file checksum) of the OpenAPI file. If you don't specify a value, API Gateway skips ETag validation of your OpenAPI file.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Key`  <a name="cfn-apigateway-restapi-s3location-key"></a>
The file name of the OpenAPI file (Amazon S3 object name).  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Version`  <a name="cfn-apigateway-restapi-s3location-version"></a>
For versioning-enabled buckets, a specific version of the OpenAPI file.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-apigateway-restapi-s3location--seealso"></a>
+ [RestApi](https://docs.aws.amazon.com/apigateway/latest/api/API_RestApi.html) in the *Amazon API Gateway REST API Reference*



# AWS::ApiGateway::RestApi Tag
<a name="aws-properties-apigateway-restapi-tag"></a>

An array of key-value pairs to apply to this resource.

For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).

## Syntax
<a name="aws-properties-apigateway-restapi-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-apigateway-restapi-tag-syntax.json"></a>

```
{
  "[Key](#cfn-apigateway-restapi-tag-key)" : String,
  "[Value](#cfn-apigateway-restapi-tag-value)" : String
}
```

### YAML
<a name="aws-properties-apigateway-restapi-tag-syntax.yaml"></a>

```
  [Key](#cfn-apigateway-restapi-tag-key): String
  [Value](#cfn-apigateway-restapi-tag-value): String
```

## Properties
<a name="aws-properties-apigateway-restapi-tag-properties"></a>

`Key`  <a name="cfn-apigateway-restapi-tag-key"></a>
A string you can use to assign a value. The combination of tag keys and values can help you organize and categorize your resources.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-apigateway-restapi-tag-value"></a>
The value for the specified tag key.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ApiGateway::Stage
<a name="aws-resource-apigateway-stage"></a>

The `AWS::ApiGateway::Stage` resource creates a stage for a deployment.

## Syntax
<a name="aws-resource-apigateway-stage-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-apigateway-stage-syntax.json"></a>

```
{
  "Type" : "AWS::ApiGateway::Stage",
  "Properties" : {
      "[AccessLogSetting](#cfn-apigateway-stage-accesslogsetting)" : AccessLogSetting,
      "[CacheClusterEnabled](#cfn-apigateway-stage-cacheclusterenabled)" : Boolean,
      "[CacheClusterSize](#cfn-apigateway-stage-cacheclustersize)" : String,
      "[CanarySetting](#cfn-apigateway-stage-canarysetting)" : CanarySetting,
      "[ClientCertificateId](#cfn-apigateway-stage-clientcertificateid)" : String,
      "[DeploymentId](#cfn-apigateway-stage-deploymentid)" : String,
      "[Description](#cfn-apigateway-stage-description)" : String,
      "[DocumentationVersion](#cfn-apigateway-stage-documentationversion)" : String,
      "[MethodSettings](#cfn-apigateway-stage-methodsettings)" : [ MethodSetting, ... ],
      "[RestApiId](#cfn-apigateway-stage-restapiid)" : String,
      "[StageName](#cfn-apigateway-stage-stagename)" : String,
      "[Tags](#cfn-apigateway-stage-tags)" : [ Tag, ... ],
      "[TracingEnabled](#cfn-apigateway-stage-tracingenabled)" : Boolean,
      "[Variables](#cfn-apigateway-stage-variables)" : {Key: Value, ...}
    }
}
```

### YAML
<a name="aws-resource-apigateway-stage-syntax.yaml"></a>

```
Type: AWS::ApiGateway::Stage
Properties:
  [AccessLogSetting](#cfn-apigateway-stage-accesslogsetting): 
    AccessLogSetting
  [CacheClusterEnabled](#cfn-apigateway-stage-cacheclusterenabled): Boolean
  [CacheClusterSize](#cfn-apigateway-stage-cacheclustersize): String
  [CanarySetting](#cfn-apigateway-stage-canarysetting): 
    CanarySetting
  [ClientCertificateId](#cfn-apigateway-stage-clientcertificateid): String
  [DeploymentId](#cfn-apigateway-stage-deploymentid): String
  [Description](#cfn-apigateway-stage-description): String
  [DocumentationVersion](#cfn-apigateway-stage-documentationversion): String
  [MethodSettings](#cfn-apigateway-stage-methodsettings): 
    - MethodSetting
  [RestApiId](#cfn-apigateway-stage-restapiid): String
  [StageName](#cfn-apigateway-stage-stagename): String
  [Tags](#cfn-apigateway-stage-tags): 
    - Tag
  [TracingEnabled](#cfn-apigateway-stage-tracingenabled): Boolean
  [Variables](#cfn-apigateway-stage-variables): 
    Key: Value
```

## Properties
<a name="aws-resource-apigateway-stage-properties"></a>

`AccessLogSetting`  <a name="cfn-apigateway-stage-accesslogsetting"></a>
Access log settings, including the access log format and access log destination ARN.  
*Required*: No  
*Type*: [AccessLogSetting](aws-properties-apigateway-stage-accesslogsetting.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CacheClusterEnabled`  <a name="cfn-apigateway-stage-cacheclusterenabled"></a>
Specifies whether a cache cluster is enabled for the stage. To activate a method-level cache, set `CachingEnabled` to `true` for a method.   
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CacheClusterSize`  <a name="cfn-apigateway-stage-cacheclustersize"></a>
The stage's cache capacity in GB. For more information about choosing a cache size, see [Enabling API caching to enhance responsiveness](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-caching.html).  
*Required*: No  
*Type*: String  
*Allowed values*: `0.5 | 1.6 | 6.1 | 13.5 | 28.4 | 58.2 | 118 | 237`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CanarySetting`  <a name="cfn-apigateway-stage-canarysetting"></a>
Settings for the canary deployment in this stage.  
*Required*: No  
*Type*: [CanarySetting](aws-properties-apigateway-stage-canarysetting.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ClientCertificateId`  <a name="cfn-apigateway-stage-clientcertificateid"></a>
The identifier of a client certificate for an API stage.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DeploymentId`  <a name="cfn-apigateway-stage-deploymentid"></a>
The identifier of the Deployment that the stage points to.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Description`  <a name="cfn-apigateway-stage-description"></a>
The stage's description.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DocumentationVersion`  <a name="cfn-apigateway-stage-documentationversion"></a>
The version of the associated API documentation.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MethodSettings`  <a name="cfn-apigateway-stage-methodsettings"></a>
A map that defines the method settings for a Stage resource. Keys (designated as `/{method_setting_key` below) are method paths defined as `{resource_path}/{http_method}` for an individual method override, or `/\*/\*` for overriding all methods in the stage.   
*Required*: No  
*Type*: Array of [MethodSetting](aws-properties-apigateway-stage-methodsetting.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RestApiId`  <a name="cfn-apigateway-stage-restapiid"></a>
The string identifier of the associated RestApi.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`StageName`  <a name="cfn-apigateway-stage-stagename"></a>
The name of the stage is the first path segment in the Uniform Resource Identifier (URI) of a call to API Gateway. Stage names can only contain alphanumeric characters, hyphens, and underscores. Maximum length is 128 characters.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Tags`  <a name="cfn-apigateway-stage-tags"></a>
The collection of tags. Each tag element is associated with a given resource.  
*Required*: No  
*Type*: Array of [Tag](aws-properties-apigateway-stage-tag.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TracingEnabled`  <a name="cfn-apigateway-stage-tracingenabled"></a>
Specifies whether active tracing with X-ray is enabled for the Stage.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Variables`  <a name="cfn-apigateway-stage-variables"></a>
A map (string-to-string map) that defines the stage variables, where the variable name is the key and the variable value is the value. Variable names are limited to alphanumeric characters. Values must match the following regular expression: `[A-Za-z0-9-._~:/?#&=,]+`.  
*Required*: No  
*Type*: Object of String  
*Pattern*: `[a-zA-Z0-9]+`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-apigateway-stage-return-values"></a>

### Ref
<a name="aws-resource-apigateway-stage-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the name of the stage, such as `MyTestStage`.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

## Examples
<a name="aws-resource-apigateway-stage--examples"></a>



### Create stage
<a name="aws-resource-apigateway-stage--examples--Create_stage"></a>

The following example creates a stage for the `TestDeployment` deployment. The stage also specifies method settings for the `MyRestApi` API.

#### JSON
<a name="aws-resource-apigateway-stage--examples--Create_stage--json"></a>

```
{
    "Resources": {
        "Prod": {
            "Type": "AWS::ApiGateway::Stage",
            "Properties": {
                "StageName": "Prod",
                "Description": "Prod Stage",
                "RestApiId": {
                    "Ref": "MyRestApi"
                },
                "DeploymentId": {
                    "Ref": "TestDeployment"
                },
                "DocumentationVersion": {
                    "Ref": "MyDocumentationVersion"
                },
                "ClientCertificateId": {
                    "Ref": "ClientCertificate"
                },
                "Variables": {
                    "Stack": "Prod"
                },
                "MethodSettings": [
                    {
                        "ResourcePath": "/",
                        "HttpMethod": "GET",
                        "MetricsEnabled": "true",
                        "DataTraceEnabled": "false"
                    },
                    {
                        "ResourcePath": "/stack",
                        "HttpMethod": "POST",
                        "MetricsEnabled": "true",
                        "DataTraceEnabled": "false",
                        "ThrottlingBurstLimit": "999"
                    },
                    {
                        "ResourcePath": "/stack",
                        "HttpMethod": "GET",
                        "MetricsEnabled": "true",
                        "DataTraceEnabled": "false",
                        "ThrottlingBurstLimit": "555"
                    }
                ]
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-apigateway-stage--examples--Create_stage--yaml"></a>

```
Resources:
  Prod:
    Type: AWS::ApiGateway::Stage
    Properties:
      StageName: Prod
      Description: Prod Stage
      RestApiId: !Ref MyRestApi
      DeploymentId: !Ref TestDeployment
      DocumentationVersion: !Ref MyDocumentationVersion
      ClientCertificateId: !Ref ClientCertificate
      Variables:
        Stack: Prod
      MethodSettings:
        - ResourcePath: /
          HttpMethod: GET
          MetricsEnabled: 'true'
          DataTraceEnabled: 'false'
        - ResourcePath: /stack
          HttpMethod: POST
          MetricsEnabled: 'true'
          DataTraceEnabled: 'false'
          ThrottlingBurstLimit: '999'
        - ResourcePath: /stack
          HttpMethod: GET
          MetricsEnabled: 'true'
          DataTraceEnabled: 'false'
          ThrottlingBurstLimit: '555'
```

## See also
<a name="aws-resource-apigateway-stage--seealso"></a>
+ [stage:create](https://docs.aws.amazon.com/apigateway/latest/api/API_CreateStage.html) in the *Amazon API Gateway REST API Reference*



# AWS::ApiGateway::Stage AccessLogSetting
<a name="aws-properties-apigateway-stage-accesslogsetting"></a>

The `AccessLogSetting` property type specifies settings for logging access in this stage.

`AccessLogSetting` is a property of the [AWS::ApiGateway::Stage](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-stage.html) resource.

## Syntax
<a name="aws-properties-apigateway-stage-accesslogsetting-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-apigateway-stage-accesslogsetting-syntax.json"></a>

```
{
  "[DestinationArn](#cfn-apigateway-stage-accesslogsetting-destinationarn)" : String,
  "[Format](#cfn-apigateway-stage-accesslogsetting-format)" : String
}
```

### YAML
<a name="aws-properties-apigateway-stage-accesslogsetting-syntax.yaml"></a>

```
  [DestinationArn](#cfn-apigateway-stage-accesslogsetting-destinationarn): String
  [Format](#cfn-apigateway-stage-accesslogsetting-format): String
```

## Properties
<a name="aws-properties-apigateway-stage-accesslogsetting-properties"></a>

`DestinationArn`  <a name="cfn-apigateway-stage-accesslogsetting-destinationarn"></a>
The Amazon Resource Name (ARN) of the CloudWatch Logs log group or Kinesis Data Firehose delivery stream to receive access logs. If you specify a Kinesis Data Firehose delivery stream, the stream name must begin with `amazon-apigateway-`. This parameter is required to enable access logging.  
*Required*: Conditional  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Format`  <a name="cfn-apigateway-stage-accesslogsetting-format"></a>
A single line format of the access logs of data, as specified by selected [\$1context variables](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html#context-variable-reference). The format must include at least `$context.requestId`. This parameter is required to enable access logging.  
*Required*: Conditional  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-apigateway-stage-accesslogsetting--seealso"></a>
+ [Stage](https://docs.aws.amazon.com/apigateway/latest/api/API_Stage.html) in the *Amazon API Gateway REST API Reference*



# AWS::ApiGateway::Stage CanarySetting
<a name="aws-properties-apigateway-stage-canarysetting"></a>

Configuration settings of a canary deployment.

## Syntax
<a name="aws-properties-apigateway-stage-canarysetting-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-apigateway-stage-canarysetting-syntax.json"></a>

```
{
  "[DeploymentId](#cfn-apigateway-stage-canarysetting-deploymentid)" : String,
  "[PercentTraffic](#cfn-apigateway-stage-canarysetting-percenttraffic)" : Number,
  "[StageVariableOverrides](#cfn-apigateway-stage-canarysetting-stagevariableoverrides)" : {Key: Value, ...},
  "[UseStageCache](#cfn-apigateway-stage-canarysetting-usestagecache)" : Boolean
}
```

### YAML
<a name="aws-properties-apigateway-stage-canarysetting-syntax.yaml"></a>

```
  [DeploymentId](#cfn-apigateway-stage-canarysetting-deploymentid): String
  [PercentTraffic](#cfn-apigateway-stage-canarysetting-percenttraffic): Number
  [StageVariableOverrides](#cfn-apigateway-stage-canarysetting-stagevariableoverrides): 
    Key: Value
  [UseStageCache](#cfn-apigateway-stage-canarysetting-usestagecache): Boolean
```

## Properties
<a name="aws-properties-apigateway-stage-canarysetting-properties"></a>

`DeploymentId`  <a name="cfn-apigateway-stage-canarysetting-deploymentid"></a>
The ID of the canary deployment.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PercentTraffic`  <a name="cfn-apigateway-stage-canarysetting-percenttraffic"></a>
The percent (0-100) of traffic diverted to a canary deployment.  
*Required*: No  
*Type*: Number  
*Minimum*: `0`  
*Maximum*: `100`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`StageVariableOverrides`  <a name="cfn-apigateway-stage-canarysetting-stagevariableoverrides"></a>
Stage variables overridden for a canary release deployment, including new stage variables introduced in the canary. These stage variables are represented as a string-to-string map between stage variable names and their values.  
*Required*: No  
*Type*: Object of String  
*Pattern*: `[a-zA-Z0-9]+`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`UseStageCache`  <a name="cfn-apigateway-stage-canarysetting-usestagecache"></a>
A Boolean flag to indicate whether the canary deployment uses the stage cache or not.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-apigateway-stage-canarysetting--seealso"></a>
+ [Stage](https://docs.aws.amazon.com/apigateway/latest/api/API_Stage.html) in the *Amazon API Gateway REST API Reference*



# AWS::ApiGateway::Stage MethodSetting
<a name="aws-properties-apigateway-stage-methodsetting"></a>

The `MethodSetting` property type configures settings for all methods in a stage.

The `MethodSettings` property of the `AWS::ApiGateway::Stage` resource contains a list of `MethodSetting` property types.

## Syntax
<a name="aws-properties-apigateway-stage-methodsetting-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-apigateway-stage-methodsetting-syntax.json"></a>

```
{
  "[CacheDataEncrypted](#cfn-apigateway-stage-methodsetting-cachedataencrypted)" : Boolean,
  "[CacheTtlInSeconds](#cfn-apigateway-stage-methodsetting-cachettlinseconds)" : Integer,
  "[CachingEnabled](#cfn-apigateway-stage-methodsetting-cachingenabled)" : Boolean,
  "[DataTraceEnabled](#cfn-apigateway-stage-methodsetting-datatraceenabled)" : Boolean,
  "[HttpMethod](#cfn-apigateway-stage-methodsetting-httpmethod)" : String,
  "[LoggingLevel](#cfn-apigateway-stage-methodsetting-logginglevel)" : String,
  "[MetricsEnabled](#cfn-apigateway-stage-methodsetting-metricsenabled)" : Boolean,
  "[ResourcePath](#cfn-apigateway-stage-methodsetting-resourcepath)" : String,
  "[ThrottlingBurstLimit](#cfn-apigateway-stage-methodsetting-throttlingburstlimit)" : Integer,
  "[ThrottlingRateLimit](#cfn-apigateway-stage-methodsetting-throttlingratelimit)" : Number
}
```

### YAML
<a name="aws-properties-apigateway-stage-methodsetting-syntax.yaml"></a>

```
  [CacheDataEncrypted](#cfn-apigateway-stage-methodsetting-cachedataencrypted): Boolean
  [CacheTtlInSeconds](#cfn-apigateway-stage-methodsetting-cachettlinseconds): Integer
  [CachingEnabled](#cfn-apigateway-stage-methodsetting-cachingenabled): Boolean
  [DataTraceEnabled](#cfn-apigateway-stage-methodsetting-datatraceenabled): Boolean
  [HttpMethod](#cfn-apigateway-stage-methodsetting-httpmethod): String
  [LoggingLevel](#cfn-apigateway-stage-methodsetting-logginglevel): String
  [MetricsEnabled](#cfn-apigateway-stage-methodsetting-metricsenabled): Boolean
  [ResourcePath](#cfn-apigateway-stage-methodsetting-resourcepath): String
  [ThrottlingBurstLimit](#cfn-apigateway-stage-methodsetting-throttlingburstlimit): Integer
  [ThrottlingRateLimit](#cfn-apigateway-stage-methodsetting-throttlingratelimit): Number
```

## Properties
<a name="aws-properties-apigateway-stage-methodsetting-properties"></a>

`CacheDataEncrypted`  <a name="cfn-apigateway-stage-methodsetting-cachedataencrypted"></a>
Specifies whether the cached responses are encrypted.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CacheTtlInSeconds`  <a name="cfn-apigateway-stage-methodsetting-cachettlinseconds"></a>
Specifies the time to live (TTL), in seconds, for cached responses. The higher the TTL, the longer the response will be cached.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CachingEnabled`  <a name="cfn-apigateway-stage-methodsetting-cachingenabled"></a>
Specifies whether responses should be cached and returned for requests. A cache cluster must be enabled on the stage for responses to be cached.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DataTraceEnabled`  <a name="cfn-apigateway-stage-methodsetting-datatraceenabled"></a>
Specifies whether data trace logging is enabled for this method, which affects the log entries pushed to Amazon CloudWatch Logs. This can be useful to troubleshoot APIs, but can result in logging sensitive data. We recommend that you don't enable this option for production APIs.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`HttpMethod`  <a name="cfn-apigateway-stage-methodsetting-httpmethod"></a>
The HTTP method. To apply settings to multiple resources and methods, specify an asterisk (`*`) for the `HttpMethod` and `/*` for the `ResourcePath`. This parameter is required when you specify a `MethodSetting`.  
*Required*: Conditional  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LoggingLevel`  <a name="cfn-apigateway-stage-methodsetting-logginglevel"></a>
Specifies the logging level for this method, which affects the log entries pushed to Amazon CloudWatch Logs. Valid values are `OFF`, `ERROR`, and `INFO`. Choose `ERROR` to write only error-level entries to CloudWatch Logs, or choose `INFO` to include all `ERROR` events as well as extra informational events.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MetricsEnabled`  <a name="cfn-apigateway-stage-methodsetting-metricsenabled"></a>
Specifies whether Amazon CloudWatch metrics are enabled for this method.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ResourcePath`  <a name="cfn-apigateway-stage-methodsetting-resourcepath"></a>
The resource path for this method. Forward slashes (`/`) are encoded as `~1` and the initial slash must include a forward slash. For example, the path value `/resource/subresource` must be encoded as `/~1resource~1subresource`. To specify the root path, use only a slash (`/`). To apply settings to multiple resources and methods, specify an asterisk (`*`) for the `HttpMethod` and `/*` for the `ResourcePath`. This parameter is required when you specify a `MethodSetting`.  
*Required*: Conditional  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ThrottlingBurstLimit`  <a name="cfn-apigateway-stage-methodsetting-throttlingburstlimit"></a>
Specifies the throttling burst limit.  
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ThrottlingRateLimit`  <a name="cfn-apigateway-stage-methodsetting-throttlingratelimit"></a>
Specifies the throttling rate limit.  
*Required*: No  
*Type*: Number  
*Minimum*: `0`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-apigateway-stage-methodsetting--seealso"></a>
+ [Stage](https://docs.aws.amazon.com/apigateway/latest/api/API_Stage.html) in the *Amazon API Gateway REST API Reference*



# AWS::ApiGateway::Stage Tag
<a name="aws-properties-apigateway-stage-tag"></a>

An array of key-value pairs to apply to this resource.

For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).

## Syntax
<a name="aws-properties-apigateway-stage-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-apigateway-stage-tag-syntax.json"></a>

```
{
  "[Key](#cfn-apigateway-stage-tag-key)" : String,
  "[Value](#cfn-apigateway-stage-tag-value)" : String
}
```

### YAML
<a name="aws-properties-apigateway-stage-tag-syntax.yaml"></a>

```
  [Key](#cfn-apigateway-stage-tag-key): String
  [Value](#cfn-apigateway-stage-tag-value): String
```

## Properties
<a name="aws-properties-apigateway-stage-tag-properties"></a>

`Key`  <a name="cfn-apigateway-stage-tag-key"></a>
A string you can use to assign a value. The combination of tag keys and values can help you organize and categorize your resources.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-apigateway-stage-tag-value"></a>
The value for the specified tag key.  
*Required*: Yes  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ApiGateway::UsagePlan
<a name="aws-resource-apigateway-usageplan"></a>

The `AWS::ApiGateway::UsagePlan` resource creates a usage plan for deployed APIs. A usage plan sets a target for the throttling and quota limits on individual client API keys. For more information, see [Creating and Using API Usage Plans in Amazon API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html) in the *API Gateway Developer Guide*.

In some cases clients can exceed the targets that you set. Don’t rely on usage plans to control costs. Consider using [AWS Budgets](https://docs.aws.amazon.com/cost-management/latest/userguide/budgets-managing-costs.html) to monitor costs and [AWS WAF](https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) to manage API requests.

## Syntax
<a name="aws-resource-apigateway-usageplan-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-apigateway-usageplan-syntax.json"></a>

```
{
  "Type" : "AWS::ApiGateway::UsagePlan",
  "Properties" : {
      "[ApiStages](#cfn-apigateway-usageplan-apistages)" : [ ApiStage, ... ],
      "[Description](#cfn-apigateway-usageplan-description)" : String,
      "[Quota](#cfn-apigateway-usageplan-quota)" : QuotaSettings,
      "[Tags](#cfn-apigateway-usageplan-tags)" : [ Tag, ... ],
      "[Throttle](#cfn-apigateway-usageplan-throttle)" : ThrottleSettings,
      "[UsagePlanName](#cfn-apigateway-usageplan-usageplanname)" : String
    }
}
```

### YAML
<a name="aws-resource-apigateway-usageplan-syntax.yaml"></a>

```
Type: AWS::ApiGateway::UsagePlan
Properties:
  [ApiStages](#cfn-apigateway-usageplan-apistages): 
    - ApiStage
  [Description](#cfn-apigateway-usageplan-description): String
  [Quota](#cfn-apigateway-usageplan-quota): 
    QuotaSettings
  [Tags](#cfn-apigateway-usageplan-tags): 
    - Tag
  [Throttle](#cfn-apigateway-usageplan-throttle): 
    ThrottleSettings
  [UsagePlanName](#cfn-apigateway-usageplan-usageplanname): String
```

## Properties
<a name="aws-resource-apigateway-usageplan-properties"></a>

`ApiStages`  <a name="cfn-apigateway-usageplan-apistages"></a>
The associated API stages of a usage plan.  
*Required*: No  
*Type*: Array of [ApiStage](aws-properties-apigateway-usageplan-apistage.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Description`  <a name="cfn-apigateway-usageplan-description"></a>
The description of a usage plan.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Quota`  <a name="cfn-apigateway-usageplan-quota"></a>
The target maximum number of permitted requests per a given unit time interval.  
*Required*: No  
*Type*: [QuotaSettings](aws-properties-apigateway-usageplan-quotasettings.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Tags`  <a name="cfn-apigateway-usageplan-tags"></a>
The collection of tags. Each tag element is associated with a given resource.  
*Required*: No  
*Type*: Array of [Tag](aws-properties-apigateway-usageplan-tag.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Throttle`  <a name="cfn-apigateway-usageplan-throttle"></a>
A map containing method level throttling information for API stage in a usage plan.  
*Required*: No  
*Type*: [ThrottleSettings](aws-properties-apigateway-usageplan-throttlesettings.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`UsagePlanName`  <a name="cfn-apigateway-usageplan-usageplanname"></a>
The name of a usage plan.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-apigateway-usageplan-return-values"></a>

### Ref
<a name="aws-resource-apigateway-usageplan-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the usage plan ID, such as `abc123`.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-apigateway-usageplan-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-apigateway-usageplan-return-values-fn--getatt-fn--getatt"></a>

`Id`  <a name="Id-fn::getatt"></a>
The ID for the usage plan. For example: `abc123`.

## Examples
<a name="aws-resource-apigateway-usageplan--examples"></a>



### Create usage plan
<a name="aws-resource-apigateway-usageplan--examples--Create_usage_plan"></a>

The following examples create a usage plan for the Prod API stage, with a quota of 5000 requests per month and a rate limit of 100 requests per second.

#### JSON
<a name="aws-resource-apigateway-usageplan--examples--Create_usage_plan--json"></a>

```
{
    "usagePlan": {
        "Type": "AWS::ApiGateway::UsagePlan",
        "Properties": {
            "ApiStages": [
                {
                    "ApiId": {
                        "Ref": "MyRestApi"
                    },
                    "Stage": {
                        "Ref": "Prod"
                    }
                }
            ],
            "Description": "Customer ABC's usage plan",
            "Quota": {
                "Limit": 5000,
                "Period": "MONTH"
            },
            "Throttle": {
                "BurstLimit": 200,
                "RateLimit": 100
            },
            "UsagePlanName": "Plan_ABC"
        }
    }
}
```

#### YAML
<a name="aws-resource-apigateway-usageplan--examples--Create_usage_plan--yaml"></a>

```
usagePlan:
  Type: 'AWS::ApiGateway::UsagePlan'
  Properties:
    ApiStages:
      - ApiId: !Ref MyRestApi
        Stage: !Ref Prod
    Description: Customer ABC's usage plan
    Quota:
      Limit: 5000
      Period: MONTH
    Throttle:
      BurstLimit: 200
      RateLimit: 100
    UsagePlanName: Plan_ABC
```

## See also
<a name="aws-resource-apigateway-usageplan--seealso"></a>
+ [usageplan:create](https://docs.aws.amazon.com/apigateway/latest/api/API_CreateUsagePlan.html) in the *Amazon API Gateway REST API Reference*



# AWS::ApiGateway::UsagePlan ApiStage
<a name="aws-properties-apigateway-usageplan-apistage"></a>

API stage name of the associated API stage in a usage plan.

## Syntax
<a name="aws-properties-apigateway-usageplan-apistage-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-apigateway-usageplan-apistage-syntax.json"></a>

```
{
  "[ApiId](#cfn-apigateway-usageplan-apistage-apiid)" : String,
  "[Stage](#cfn-apigateway-usageplan-apistage-stage)" : String,
  "[Throttle](#cfn-apigateway-usageplan-apistage-throttle)" : {Key: Value, ...}
}
```

### YAML
<a name="aws-properties-apigateway-usageplan-apistage-syntax.yaml"></a>

```
  [ApiId](#cfn-apigateway-usageplan-apistage-apiid): String
  [Stage](#cfn-apigateway-usageplan-apistage-stage): String
  [Throttle](#cfn-apigateway-usageplan-apistage-throttle): 
    Key: Value
```

## Properties
<a name="aws-properties-apigateway-usageplan-apistage-properties"></a>

`ApiId`  <a name="cfn-apigateway-usageplan-apistage-apiid"></a>
API Id of the associated API stage in a usage plan.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Stage`  <a name="cfn-apigateway-usageplan-apistage-stage"></a>
API stage name of the associated API stage in a usage plan.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Throttle`  <a name="cfn-apigateway-usageplan-apistage-throttle"></a>
Map containing method level throttling information for API stage in a usage plan.  
*Required*: No  
*Type*: Object of [ThrottleSettings](aws-properties-apigateway-usageplan-throttlesettings.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-apigateway-usageplan-apistage--seealso"></a>
+ [UsagePlan](https://docs.aws.amazon.com/apigateway/latest/api/API_UsagePlan.html) in the *Amazon API Gateway REST API Reference*



# AWS::ApiGateway::UsagePlan QuotaSettings
<a name="aws-properties-apigateway-usageplan-quotasettings"></a>

`QuotaSettings` is a property of the [AWS::ApiGateway::UsagePlan](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-usageplan.html) resource that specifies a target for the maximum number of requests users can make to your REST APIs.

In some cases clients can exceed the targets that you set. Don’t rely on usage plans to control costs. Consider using [AWS Budgets](https://docs.aws.amazon.com/cost-management/latest/userguide/budgets-managing-costs.html) to monitor costs and [AWS WAF](https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) to manage API requests.

## Syntax
<a name="aws-properties-apigateway-usageplan-quotasettings-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-apigateway-usageplan-quotasettings-syntax.json"></a>

```
{
  "[Limit](#cfn-apigateway-usageplan-quotasettings-limit)" : Integer,
  "[Offset](#cfn-apigateway-usageplan-quotasettings-offset)" : Integer,
  "[Period](#cfn-apigateway-usageplan-quotasettings-period)" : String
}
```

### YAML
<a name="aws-properties-apigateway-usageplan-quotasettings-syntax.yaml"></a>

```
  [Limit](#cfn-apigateway-usageplan-quotasettings-limit): Integer
  [Offset](#cfn-apigateway-usageplan-quotasettings-offset): Integer
  [Period](#cfn-apigateway-usageplan-quotasettings-period): String
```

## Properties
<a name="aws-properties-apigateway-usageplan-quotasettings-properties"></a>

`Limit`  <a name="cfn-apigateway-usageplan-quotasettings-limit"></a>
The target maximum number of requests that can be made in a given time period.  
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Offset`  <a name="cfn-apigateway-usageplan-quotasettings-offset"></a>
The number of requests subtracted from the given limit in the initial time period.  
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Period`  <a name="cfn-apigateway-usageplan-quotasettings-period"></a>
The time period in which the limit applies. Valid values are "DAY", "WEEK" or "MONTH".  
*Required*: No  
*Type*: String  
*Allowed values*: `DAY | WEEK | MONTH`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-apigateway-usageplan-quotasettings--seealso"></a>
+ [UsagePlan](https://docs.aws.amazon.com/apigateway/latest/api/API_UsagePlan.html) in the *Amazon API Gateway REST API Reference*



# AWS::ApiGateway::UsagePlan Tag
<a name="aws-properties-apigateway-usageplan-tag"></a>

An array of key-value pairs to apply to this resource.

For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).

## Syntax
<a name="aws-properties-apigateway-usageplan-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-apigateway-usageplan-tag-syntax.json"></a>

```
{
  "[Key](#cfn-apigateway-usageplan-tag-key)" : String,
  "[Value](#cfn-apigateway-usageplan-tag-value)" : String
}
```

### YAML
<a name="aws-properties-apigateway-usageplan-tag-syntax.yaml"></a>

```
  [Key](#cfn-apigateway-usageplan-tag-key): String
  [Value](#cfn-apigateway-usageplan-tag-value): String
```

## Properties
<a name="aws-properties-apigateway-usageplan-tag-properties"></a>

`Key`  <a name="cfn-apigateway-usageplan-tag-key"></a>
A string you can use to assign a value. The combination of tag keys and values can help you organize and categorize your resources.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-apigateway-usageplan-tag-value"></a>
The value for the specified tag key.  
*Required*: Yes  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ApiGateway::UsagePlan ThrottleSettings
<a name="aws-properties-apigateway-usageplan-throttlesettings"></a>

`ThrottleSettings` is a property of the [AWS::ApiGateway::UsagePlan](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-usageplan.html) resource that specifies the overall request rate (average requests per second) and burst capacity when users call your REST APIs.

## Syntax
<a name="aws-properties-apigateway-usageplan-throttlesettings-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-apigateway-usageplan-throttlesettings-syntax.json"></a>

```
{
  "[BurstLimit](#cfn-apigateway-usageplan-throttlesettings-burstlimit)" : Integer,
  "[RateLimit](#cfn-apigateway-usageplan-throttlesettings-ratelimit)" : Number
}
```

### YAML
<a name="aws-properties-apigateway-usageplan-throttlesettings-syntax.yaml"></a>

```
  [BurstLimit](#cfn-apigateway-usageplan-throttlesettings-burstlimit): Integer
  [RateLimit](#cfn-apigateway-usageplan-throttlesettings-ratelimit): Number
```

## Properties
<a name="aws-properties-apigateway-usageplan-throttlesettings-properties"></a>

`BurstLimit`  <a name="cfn-apigateway-usageplan-throttlesettings-burstlimit"></a>
The API target request burst rate limit. This allows more requests through for a period of time than the target rate limit.  
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RateLimit`  <a name="cfn-apigateway-usageplan-throttlesettings-ratelimit"></a>
The API target request rate limit.  
*Required*: No  
*Type*: Number  
*Minimum*: `0`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-apigateway-usageplan-throttlesettings--seealso"></a>
+ [UsagePlan](https://docs.aws.amazon.com/apigateway/latest/api/API_UsagePlan.html) in the *Amazon API Gateway REST API Reference*



# AWS::ApiGateway::UsagePlanKey
<a name="aws-resource-apigateway-usageplankey"></a>

The `AWS::ApiGateway::UsagePlanKey` resource associates an API key with a usage plan. This association determines which users the usage plan is applied to.

## Syntax
<a name="aws-resource-apigateway-usageplankey-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-apigateway-usageplankey-syntax.json"></a>

```
{
  "Type" : "AWS::ApiGateway::UsagePlanKey",
  "Properties" : {
      "[KeyId](#cfn-apigateway-usageplankey-keyid)" : String,
      "[KeyType](#cfn-apigateway-usageplankey-keytype)" : String,
      "[UsagePlanId](#cfn-apigateway-usageplankey-usageplanid)" : String
    }
}
```

### YAML
<a name="aws-resource-apigateway-usageplankey-syntax.yaml"></a>

```
Type: AWS::ApiGateway::UsagePlanKey
Properties:
  [KeyId](#cfn-apigateway-usageplankey-keyid): String
  [KeyType](#cfn-apigateway-usageplankey-keytype): String
  [UsagePlanId](#cfn-apigateway-usageplankey-usageplanid): String
```

## Properties
<a name="aws-resource-apigateway-usageplankey-properties"></a>

`KeyId`  <a name="cfn-apigateway-usageplankey-keyid"></a>
The Id of the UsagePlanKey resource.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`KeyType`  <a name="cfn-apigateway-usageplankey-keytype"></a>
The type of a UsagePlanKey resource for a plan customer.  
*Required*: Yes  
*Type*: String  
*Allowed values*: `API_KEY`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`UsagePlanId`  <a name="cfn-apigateway-usageplankey-usageplanid"></a>
The Id of the UsagePlan resource representing the usage plan containing the UsagePlanKey resource representing a plan customer.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-apigateway-usageplankey-return-values"></a>

### Ref
<a name="aws-resource-apigateway-usageplankey-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the ID of the key and ID of the usage plan combined with a ":", such as `123abcdef:abc123`.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-apigateway-usageplankey-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-apigateway-usageplankey-return-values-fn--getatt-fn--getatt"></a>

`Id`  <a name="Id-fn::getatt"></a>
The ID for the usage plan key. For example: `abc123`.

## Examples
<a name="aws-resource-apigateway-usageplankey--examples"></a>



### Create usage plan key
<a name="aws-resource-apigateway-usageplankey--examples--Create_usage_plan_key"></a>



#### JSON
<a name="aws-resource-apigateway-usageplankey--examples--Create_usage_plan_key--json"></a>

```
{
    "usagePlanKey": {
        "Type": "AWS::ApiGateway::UsagePlanKey",
        "Properties": {
            "KeyId": {
                "Ref": "myApiKey"
            },
            "KeyType": "API_KEY",
            "UsagePlanId": {
                "Ref": "myUsagePlan"
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-apigateway-usageplankey--examples--Create_usage_plan_key--yaml"></a>

```
usagePlanKey:
  Type: 'AWS::ApiGateway::UsagePlanKey'
  Properties:
    KeyId: !Ref myApiKey
    KeyType: API_KEY
    UsagePlanId: !Ref myUsagePlan
```

## See also
<a name="aws-resource-apigateway-usageplankey--seealso"></a>
+ [usageplankey:create](https://docs.aws.amazon.com/apigateway/latest/api/API_CreateUsagePlanKey.html) in the *Amazon API Gateway REST API Reference*



# AWS::ApiGateway::VpcLink
<a name="aws-resource-apigateway-vpclink"></a>

The `AWS::ApiGateway::VpcLink` resource creates an API Gateway VPC link for a REST API to access resources in an Amazon Virtual Private Cloud (VPC). For more information, see [vpclink:create](https://docs.aws.amazon.com/apigateway/latest/api/API_CreateVpcLink.html) in the `Amazon API Gateway REST API Reference`.

## Syntax
<a name="aws-resource-apigateway-vpclink-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-apigateway-vpclink-syntax.json"></a>

```
{
  "Type" : "AWS::ApiGateway::VpcLink",
  "Properties" : {
      "[Description](#cfn-apigateway-vpclink-description)" : String,
      "[Name](#cfn-apigateway-vpclink-name)" : String,
      "[Tags](#cfn-apigateway-vpclink-tags)" : [ Tag, ... ],
      "[TargetArns](#cfn-apigateway-vpclink-targetarns)" : [ String, ... ]
    }
}
```

### YAML
<a name="aws-resource-apigateway-vpclink-syntax.yaml"></a>

```
Type: AWS::ApiGateway::VpcLink
Properties:
  [Description](#cfn-apigateway-vpclink-description): String
  [Name](#cfn-apigateway-vpclink-name): String
  [Tags](#cfn-apigateway-vpclink-tags): 
    - Tag
  [TargetArns](#cfn-apigateway-vpclink-targetarns): 
    - String
```

## Properties
<a name="aws-resource-apigateway-vpclink-properties"></a>

`Description`  <a name="cfn-apigateway-vpclink-description"></a>
The description of the VPC link.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Name`  <a name="cfn-apigateway-vpclink-name"></a>
The name used to label and identify the VPC link.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Tags`  <a name="cfn-apigateway-vpclink-tags"></a>
An array of arbitrary tags (key-value pairs) to associate with the VPC link.  
*Required*: No  
*Type*: Array of [Tag](aws-properties-apigateway-vpclink-tag.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TargetArns`  <a name="cfn-apigateway-vpclink-targetarns"></a>
The ARN of the network load balancer of the VPC targeted by the VPC link. The network load balancer must be owned by the same AWS account of the API owner.  
*Required*: Yes  
*Type*: Array of String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-apigateway-vpclink-return-values"></a>

### Ref
<a name="aws-resource-apigateway-vpclink-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the ID of the `VpcLink`.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-apigateway-vpclink-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-apigateway-vpclink-return-values-fn--getatt-fn--getatt"></a>

`VpcLinkId`  <a name="VpcLinkId-fn::getatt"></a>
The ID for the VPC link. For example: `abc123`.

## Examples
<a name="aws-resource-apigateway-vpclink--examples"></a>



### Create VPC link
<a name="aws-resource-apigateway-vpclink--examples--Create_VPC_link"></a>



#### JSON
<a name="aws-resource-apigateway-vpclink--examples--Create_VPC_link--json"></a>

```
{
    "Parameters": {
        "description": {
            "Type": "String"
        },
        "name": {
            "Type": "String"
        }
    },
    "Resources": {
        "MyVpcLink": {
            "Type": "AWS::ApiGateway::VpcLink",
            "Properties": {
                "Description": {
                    "Ref": "description"
                },
                "Name": {
                    "Ref": "name"
                },
                "TargetArns": [
                    {
                        "Ref": "MyLoadBalancer"
                    }
                ]
            }
        },
        "MyLoadBalancer": {
            "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer",
            "Properties": {
                "Type": "network",
                "Subnets": [
                    {
                        "Ref": "MySubnet"
                    }
                ]
            }
        },
        "MySubnet": {
            "Type": "AWS::EC2::Subnet",
            "Properties": {
                "VpcId": {
                    "Ref": "MyVPC"
                },
                "CidrBlock": "10.0.0.0/24"
            }
        },
        "MyVPC": {
            "Type": "AWS::EC2::VPC",
            "Properties": {
                "CidrBlock": "10.0.0.0/16"
            }
        },
        "MyInternetGateway": {
            "Type": "AWS::EC2::InternetGateway"
        },
        "MyInternetGatewayAttachment": {
            "Type": "AWS::EC2::VPCGatewayAttachment",
            "Properties": {
                "VpcId": {
                    "Ref": "MyVPC"
                },
                "InternetGatewayId": {
                    "Ref": "MyInternetGateway"
                }
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-apigateway-vpclink--examples--Create_VPC_link--yaml"></a>

```
Parameters:
    description:
        Type: String
    name:
        Type: String
Resources:
    MyVpcLink:
        Type: AWS::ApiGateway::VpcLink
        Properties:
            Description: !Ref description
            Name: !Ref name
            TargetArns:
               - !Ref MyLoadBalancer
    MyLoadBalancer:
            Type: AWS::ElasticLoadBalancingV2::LoadBalancer
            Properties:
                Type: network
                Subnets:
                   - !Ref MySubnet
    MySubnet:
        Type: AWS::EC2::Subnet
        Properties:
            VpcId: !Ref MyVPC
            CidrBlock: 10.0.0.0/24
    MyVPC:
        Type: AWS::EC2::VPC
        Properties:
            CidrBlock: 10.0.0.0/16
    MyInternetGateway:
        Type: AWS::EC2::InternetGateway
    MyInternetGatewayAttachment:
        Type: AWS::EC2::VPCGatewayAttachment
        Properties:
            VpcId: !Ref MyVPC
            InternetGatewayId: !Ref MyInternetGateway
```

## See also
<a name="aws-resource-apigateway-vpclink--seealso"></a>
+ [vpclink:create](https://docs.aws.amazon.com/apigateway/latest/api/API_CreateVpcLink.html) in the *Amazon API Gateway REST API Reference*



# AWS::ApiGateway::VpcLink Tag
<a name="aws-properties-apigateway-vpclink-tag"></a>

An array of key-value pairs to apply to this resource.

For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).

## Syntax
<a name="aws-properties-apigateway-vpclink-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-apigateway-vpclink-tag-syntax.json"></a>

```
{
  "[Key](#cfn-apigateway-vpclink-tag-key)" : String,
  "[Value](#cfn-apigateway-vpclink-tag-value)" : String
}
```

### YAML
<a name="aws-properties-apigateway-vpclink-tag-syntax.yaml"></a>

```
  [Key](#cfn-apigateway-vpclink-tag-key): String
  [Value](#cfn-apigateway-vpclink-tag-value): String
```

## Properties
<a name="aws-properties-apigateway-vpclink-tag-properties"></a>

`Key`  <a name="cfn-apigateway-vpclink-tag-key"></a>
A string you can use to assign a value. The combination of tag keys and values can help you organize and categorize your resources.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-apigateway-vpclink-tag-value"></a>
The value for the specified tag key.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)