api_gateway
Create, configure and delete AWS API Gateway REST APIs
Collection: community.aws
Full Name: community.aws.api_gateway
Synopsis
Create, configure and delete AWS API Gateway REST APIs
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| access_key | str | |||
| api_id | str | |||
| aws_ca_bundle | path | |||
| aws_config | dict | |||
| cache_enabled | bool | false | ||
| cache_size | str | 0.5 | ||
| debug_botocore_endpoint_logs | bool | false | ||
| deploy_desc | str | Automatic deployment by Ansible. | ||
| endpoint_type | str | EDGE | ||
| endpoint_url | str | |||
| lookup | str | tag | ||
| name | str | |||
| profile | str | |||
| purge_tags | bool | true | ||
| region | str | |||
| secret_key | str | |||
| session_token | str | |||
| stage | str | |||
| stage_canary_settings | dict | map[] | ||
| stage_variables | dict | map[] | ||
| state | str | present | ||
| swagger_dict | json | |||
| swagger_file | path | |||
| swagger_text | str | |||
| tags | dict | |||
| tracing_enabled | bool | false | ||
| validate_certs | bool | true |
Example
yaml
- name: Setup AWS API Gateway setup on AWS and deploy API definition
community.aws.api_gateway:
swagger_file: my_api.yml
stage: production
cache_enabled: true
cache_size: '1.6'
tracing_enabled: true
endpoint_type: EDGE
state: present
- name: Update API definition to deploy new version
community.aws.api_gateway:
api_id: 'abc123321cba'
swagger_file: my_api.yml
deploy_desc: Make auth fix available.
cache_enabled: true
cache_size: '1.6'
endpoint_type: EDGE
state: present
- name: Update API definitions and settings and deploy as canary
community.aws.api_gateway:
api_id: 'abc123321cba'
swagger_file: my_api.yml
cache_enabled: true
cache_size: '6.1'
canary_settings:
percentTraffic: 50.0
deploymentId: '123'
useStageCache: true
state: present
- name: Delete API gateway
community.aws.api_gateway:
name: ansible-rest-api
tags:
automation: ansible
lookup: tags
state: absent