Skip to content

Commit f5353cb

Browse files
authored
docs: document support for HTTP API Access Log Settings (#1448)
1 parent ac5b064 commit f5353cb

File tree

5 files changed

+20
-4
lines changed

5 files changed

+20
-4
lines changed

tests/translator/input/http_api_explicit_stage.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,7 @@ Resources:
1313
MyApi:
1414
Type: AWS::Serverless::HttpApi
1515
Properties:
16-
StageName: Prod
16+
StageName: Prod
17+
AccessLogSettings:
18+
DestinationArn: arn:aws:logs:us-east-1:123456789012:log-group:LogGroupName
19+
Format: $context.requestId

tests/translator/output/aws-cn/http_api_explicit_stage.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@
5151
"Ref": "MyApi"
5252
},
5353
"AutoDeploy": true,
54-
"StageName": "Prod"
54+
"StageName": "Prod",
55+
"AccessLogSettings": {
56+
"DestinationArn": "arn:aws:logs:us-east-1:123456789012:log-group:LogGroupName",
57+
"Format": "$context.requestId"
58+
}
5559
}
5660
},
5761
"HttpApiFunctionRole": {

tests/translator/output/aws-us-gov/http_api_explicit_stage.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@
5151
"Ref": "MyApi"
5252
},
5353
"AutoDeploy": true,
54-
"StageName": "Prod"
54+
"StageName": "Prod",
55+
"AccessLogSettings": {
56+
"DestinationArn": "arn:aws:logs:us-east-1:123456789012:log-group:LogGroupName",
57+
"Format": "$context.requestId"
58+
}
5559
}
5660
},
5761
"HttpApiFunctionRole": {

tests/translator/output/http_api_explicit_stage.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@
5151
"Ref": "MyApi"
5252
},
5353
"AutoDeploy": true,
54-
"StageName": "Prod"
54+
"StageName": "Prod",
55+
"AccessLogSettings": {
56+
"DestinationArn": "arn:aws:logs:us-east-1:123456789012:log-group:LogGroupName",
57+
"Format": "$context.requestId"
58+
}
5559
}
5660
},
5761
"HttpApiFunctionRole": {

versions/2016-10-31.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ StageName | `string` | The name of the API stage. If a name is not given, SAM wi
278278
DefinitionUri | `string` <span>&#124;</span> [S3 Location Object](#s3-location-object) | S3 URI or location to the Swagger document describing the API. If neither `DefinitionUri` nor `DefinitionBody` are specified, SAM will generate a `DefinitionBody` for you based on your template configuration. **Note** Intrinsic functions are not supported in external OpenApi files, instead use DefinitionBody to define OpenApi definition.
279279
DefinitionBody | `JSON or YAML Object` | OpenApi specification that describes your API. If neither `DefinitionUri` nor `DefinitionBody` are specified, SAM will generate a `DefinitionBody` for you based on your template configuration.
280280
Auth | [HTTP API Auth Object](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-property-httpapi-httpapiauth.html) | Configure authorization to control access to your API Gateway API.
281+
AccessLogSettings | [AccessLogSettings](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-stage-accesslogsettings.html) | Settings for logging access in a stage.
281282

282283
##### Return values
283284

0 commit comments

Comments
 (0)