comprehendHTTP {aws.comprehend}R Documentation

Execute AWS Comprehend API Request

Description

This is the workhorse function to execute calls to the Comprehend API.

Usage

comprehendHTTP(
  action,
  query = list(),
  headers = list(),
  body = NULL,
  verbose = getOption("verbose", FALSE),
  region = Sys.getenv("AWS_DEFAULT_REGION", "us-east-1"),
  key = NULL,
  secret = NULL,
  session_token = NULL,
  service = c("comprehend", "comprehendmedical"),
  ...
)

Arguments

action

A character string specifying the API action to take

query

An optional named list containing query string parameters and their character values.

headers

A list of headers to pass to the HTTP request.

body

A request body

verbose

A logical indicating whether to be verbose. Default is given by options("verbose").

region

A character string containing the AWS region. If missing, defaults to “us-east-1”.

key

A character string containing an AWS Access Key ID. See locate_credentials.

secret

A character string containing an AWS Secret Access Key. See locate_credentials.

session_token

A character string containing an AWS Session Token. See locate_credentials.

service

the Comprehend service to use. Currently either 'comprehend' for the base service or 'comprehendmedical' for the Comprehend Medical service.

...

Additional arguments passed to GET.

Details

This function constructs and signs an Polly API request and returns the results thereof, or relevant debugging information in the case of error.

Value

If successful, a named list. Otherwise, a data structure of class “aws-error” containing any error message(s) from AWS and information about the request attempt.

Author(s)

Thomas J. Leeper


[Package aws.comprehend version 0.2.1 Index]