steampipe plugin install aws

Table: aws_api_gateway_method - Query AWS API Gateway Methods using SQL

Represents a client-facing interface by which the client calls the API to access back-end resources. A Method resource is integrated with an Integration resource. Both consist of a request and one or more responses. The method request takes the client input that is passed to the back end through the integration request. A method response returns the output from the back end to the client through an integration response. A method request is embodied in a Method resource, whereas an integration request is embodied in an Integration resource. On the other hand, a method response is represented by a MethodResponse resource, whereas an integration response is represented by an IntegrationResponse resource.

Table Usage Guide

The aws_api_gateway_method table in Steampipe allows users to query information about AWS API Gateway Methods. These methods represent client-facing interfaces for accessing back-end resources. Users can retrieve details such as the REST API ID, resource ID, HTTP method, path, and whether API key authorization is required. Additionally, users can query methods with specific criteria, such as HTTP method type or authorization type.

Examples

Basic info

Retrieve basic information about AWS API Gateway Methods, including the REST API ID, resource ID, HTTP method, path, and whether API key authorization is required. This query provides an overview of the methods in your AWS API Gateway.

select
rest_api_id,
resource_id,
http_method,
path,
api_key_required
from
aws_api_gateway_method;
select
rest_api_id,
resource_id,
http_method,
path,
api_key_required
from
aws_api_gateway_method;

List API Gateway GET methods

Identify AWS API Gateway Methods that use the HTTP GET method. This query helps you filter and view specific types of methods in your API Gateway.

select
rest_api_id,
resource_id,
http_method,
operation_name
from
aws_api_gateway_method
where
http_method = 'GET';
select
rest_api_id,
resource_id,
http_method,
operation_name
from
aws_api_gateway_method
where
http_method = 'GET';

List methods with open access

Retrieve AWS API Gateway Methods that do not require any authorization. This query helps you identify methods with open access settings.

select
rest_api_id,
resource_id,
http_method,
path,
authorization_type,
authorizer_id
from
aws_api_gateway_method
where
authorization_type = 'none';
select
rest_api_id,
resource_id,
http_method,
path,
authorization_type,
authorizer_id
from
aws_api_gateway_method
where
authorization_type = 'none';

Get integration details of methods

Retrieve detailed integration configuration information for AWS API Gateway Methods. This query includes information such as cache key parameters, cache namespace, connection ID, connection type, content handling, credentials, HTTP method, passthrough behavior, request parameters, request templates, timeout in milliseconds, TLS configuration, integration type, URI, and integration responses.

select
rest_api_id,
resource_id,
http_method,
method_integration -> 'CacheKeyParameters' as cache_key_parameters,
method_integration ->> 'CacheNamespace' as cache_namespace,
method_integration ->> 'ConnectionId' as connection_id,
method_integration ->> 'ConnectionType' as connection_type,
method_integration ->> 'ContentHandling' as content_handling,
method_integration ->> 'Credentials' as credentials,
method_integration ->> 'HttpMethod' as http_method,
method_integration ->> 'PassthroughBehavior' as passthrough_behavior,
method_integration ->> 'RequestParameters' as request_parameters,
method_integration -> 'RequestTemplates' as request_templates,
method_integration ->> 'TimeoutInMillis' as timeout_in_millis,
method_integration ->> 'tls_config' as tls_config,
method_integration ->> 'Type' as type,
method_integration ->> 'Uri' as uri,
method_integration -> 'IntegrationResponses' as integration_responses
from
aws_api_gateway_method;
select
rest_api_id,
resource_id,
http_method,
json_extract(method_integration, '$.CacheKeyParameters') as cache_key_parameters,
json_extract(method_integration, '$.CacheNamespace') as cache_namespace,
json_extract(method_integration, '$.ConnectionId') as connection_id,
json_extract(method_integration, '$.ConnectionType') as connection_type,
json_extract(method_integration, '$.ContentHandling') as content_handling,
json_extract(method_integration, '$.Credentials') as credentials,
json_extract(method_integration, '$.HttpMethod') as http_method,
json_extract(method_integration, '$.PassthroughBehavior') as passthrough_behavior,
json_extract(method_integration, '$.RequestParameters') as request_parameters,
json_extract(method_integration, '$.RequestTemplates') as request_templates,
json_extract(method_integration, '$.TimeoutInMillis') as timeout_in_millis,
json_extract(method_integration, '$.tls_config') as tls_config,
json_extract(method_integration, '$.Type') as type,
json_extract(method_integration, '$.Uri') as uri,
json_extract(method_integration, '$.IntegrationResponses') as integration_responses
from
aws_api_gateway_method;

Schema for aws_api_gateway_method

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
account_idtext=, !=, ~~, ~~*, !~~, !~~*The AWS Account ID in which the resource is located.
api_key_requiredbooleanA boolean flag specifying whether a valid ApiKey is required to invoke this method.
authorization_scopesjsonbA list of authorization scopes configured on the method. The scopes are used with a COGNITO_USER_POOLS authorizer to authorize the method invocation.
authorization_typetextThe method's authorization type. Valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, CUSTOM for using a custom authorizer, or COGNITO_USER_POOLS for using a Cognito user pool.
authorizer_idtextThe identifier of an Authorizer to use on this method. The authorizationType must be CUSTOM.
http_methodtext=The method's HTTP verb.
method_integrationjsonbGets the method's integration responsible for passing the client-submitted request to the back end and performing necessary transformations.
method_responsesjsonbGets a method response associated with a given HTTP status code.
operation_nametextA human-friendly operation identifier for the method. For example, you can assign the operationName of ListPets for the GET /pets method in the PetStore example.
partitiontextThe AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov).
pathtextThe full path for this resource.
path_parttextThe last path segment for this resource.
regiontextThe AWS Region in which the resource is located.
request_modelsjsonbA key-value map specifying data schemas, represented by Model resources, of the request payloads of given content types.
request_parametersjsonbA key-value map defining required or optional method request parameters that can be accepted by API Gateway.
request_validator_idtextThe identifier of a RequestValidator for request validation.
resource_idtext=The Resource identifier for the Method resource.
rest_api_idtext=The string identifier of the associated RestApi.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
titletextTitle of the resource.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- aws

You can pass the configuration to the command with the --config argument:

steampipe_export_aws --config '<your_config>' aws_api_gateway_method