PARALLAX

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

NameTypeRequiredDefaultDescription
access_keystr
api_idstr
aws_ca_bundlepath
aws_configdict
cache_enabledboolfalse
cache_sizestr0.5
debug_botocore_endpoint_logsboolfalse
deploy_descstrAutomatic deployment by Ansible.
endpoint_typestrEDGE
endpoint_urlstr
lookupstrtag
namestr
profilestr
purge_tagsbooltrue
regionstr
secret_keystr
session_tokenstr
stagestr
stage_canary_settingsdictmap[]
stage_variablesdictmap[]
statestrpresent
swagger_dictjson
swagger_filepath
swagger_textstr
tagsdict
tracing_enabledboolfalse
validate_certsbooltrue

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
Search
    ↑ ↓ move↵ openesc close