Created
December 4, 2020 21:12
-
-
Save sergueyarellano/6c2d998ef39697636260783ad00f2924 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ApiGatewayResourceItem: | |
Type: AWS::ApiGateway::Resource | |
Properties: | |
ParentId: | |
Fn::GetAtt: [ApiGatewayRestApi, RootResourceId] | |
PathPart: '{item}' | |
RestApiId: !Ref ApiGatewayRestApi | |
ApiGatewayMethodGetItem: | |
Type: AWS::ApiGateway::Method | |
Description: Located at {item} resource to get items from S3 bucket | |
Properties: | |
HttpMethod: GET | |
ResourceId: !Ref ApiGatewayResourceItem | |
RestApiId: !Ref ApiGatewayRestApi | |
ApiKeyRequired: false | |
AuthorizationType: NONE | |
RequestParameters: | |
method.request.path.item: true | |
method.request.header.Content-Disposition: false | |
method.request.header.Content-Type: false | |
MethodResponses: | |
- ResponseParameters: | |
method.response.header.Content-Disposition: true | |
method.response.header.Content-Type: true | |
StatusCode: 200 | |
Integration: | |
RequestParameters: | |
integration.request.path.item: method.request.path.item | |
integration.request.header.Content-Disposition: method.request.header.Content-Disposition | |
integration.request.header.Content-Type: method.request.header.Content-Type | |
IntegrationHttpMethod: GET | |
Type: AWS | |
Uri: | |
Fn::Join: ['',['arn:aws:apigateway:us-east-1:s3:', 'path/', !Ref SwaggerSite, '/{item}']] | |
Credentials: | |
Fn::GetAtt: [GatewayRole, Arn] | |
IntegrationResponses: | |
- StatusCode: 200 | |
SelectionPattern: 200 | |
ResponseParameters: | |
method.response.header.Content-Disposition: integration.response.header.Content-Disposition | |
method.response.header.Content-Type: integration.response.header.Content-Type |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment