Comments (8)
Curious, why do you need to update after creating it? There is a
deploy flag to create/deploy or update/deploy.
On Monday, 28 September 2015, AndreyStrib [email protected] wrote:
How can I get identitfier of API created by importer, in a way that can be
reused by following update/deploy commands?
Is it possible to update aws-api-import to return the identifier?—
Reply to this email directly or view it on GitHub
#47.
from aws-apigateway-importer.
In my project api gateway is built around lambdas. I've made few scripts that simplify developing/deployment and defining inputs and outputs of lambdas, also I've automated api swagger file generation based on lambdas in my project, which is used by another script to update api in aws, using importer. To make this update without necessity to provide api id manually, I need to get api id from importer on api creation.
Currently, in my fork I changed importer to output api id and than script tries to catch it.
from aws-apigateway-importer.
I also need this functionality to automate the gateway creation since there is no cloudformation solution available. Each time I run the importer a new API is created. I would like to update any existing APIs that have the same name (If one does not exist, create it).
Is this possible with this importer?
from aws-apigateway-importer.
You could use the CLI tool for that:
aws apigateway get-rest-apis --query 'items[?name == `API_NAME`] | [0].{id: id}'
if the value is null create else update the returned id
from aws-apigateway-importer.
Thanks that's very helpful. Where is the --query syntax documentation?
Im trying to get the id string from the json
{
"id": "cdw66dzmk7"
}
from aws-apigateway-importer.
I figured it out:
--output text
from aws-apigateway-importer.
If you have jq available you could use the following as well:
aws apigateway get-rest-apis --query 'items[?name == `API_NAME`] | [0].{id: id}' --output json | jq -r '.id'
Could come in handy in some situations.
The --query syntax is JMESPath, see http://jmespath.org
from aws-apigateway-importer.
Swagger/OpenAPI import is now generally available in the API Gateway REST API, the AWS CLI and all AWS SDKs. You can also import and export Swagger definitions using the API Gateway console. This release addresses many of the open issues and feedback in this repository.
I would encourage you to migrate your workflow to the standard AWS tools. aws-apigateway-importer will receive minimal support from the API Gateway team going forward.
Any feedback or issues with the new importer should be directed to the official API Gateway forums.
Thanks,
Ryan
from aws-apigateway-importer.
Related Issues (20)
- Duplicate Model In Swagger File Because Of Same RequestBody variable Name HOT 1
- import Swagger failed - Parameter type formData not supported HOT 7
- com.amazonaws.util.json.JSONObject No Longer Available HOT 1
- Unable to import api definition from aws console? HOT 19
- Custom Authorizers wont' send CORS headers HOT 5
- "Invalid Mapping Expression Parameter" Error Thrown on method.request.path when Importing RAML with Nested uriParameters
- Support for ANY method with http proxy? HOT 1
- Polymorphism not supported? HOT 1
- Unable to create resource at path '/user/{userId}/fans': A sibling ({bizId}) of this resource already has a variable path part -- only one is allowed HOT 3
- A Linux AMI aws configuration HOT 1
- Root security definition HOT 2
- What's the relationship between Swagger definition and header returned by Lambda function? HOT 2
- Lambda invocation definition, does SAM respect ApiGateway section or Lambda section? HOT 2
- Importer does not create UserPoolAuthorizer. HOT 1
- Swagger import failing (created via app.swaggerhub.com, validated on http://editor.swagger.io/) HOT 3
- Error importing Swagger
- Explicit error message + support `example` swagger key
- base path issues with open banking API specifications
- Default value of properties
- Invalid model specified: Validation Result: warnings : [], errors : [Invalid model schema specified]
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-apigateway-importer.