paws.common (version 0.2.4)

new_request: Return an API request object

Description

Return an API request object with everything needed to make a request.

Usage

new_request(client, operation, params, data)

Arguments

client

A service client, e.g. from new_service.

operation

An operation, e.g. from new_operation.

params

A populated input object.

data

An empty output object.

See Also

Other API request functions: new_handlers, new_operation, new_service, send_request

Examples

Run this code
# NOT RUN {
# Make a request object for the S3 ListBuckets operation.
# }
# NOT RUN {
metadata <- list(
  endpoints = list("*" = list(endpoint = "s3.{region}.amazonaws.com", global = FALSE)),
  service_name = "s3"
)
client <- new_service(metadata, new_handlers("restxml", "s3"))
op <- new_operation("ListBuckets", "GET", "/", list())
params <- list()
data <- tag_add(list(Buckets = list()), list(type = "structure"))
req <- new_request(client, op, params, data)
# }
# NOT RUN {
# }

Run the code above in your browser using DataCamp Workspace