s3_generate_presigned_url: Generate a presigned url given a client, its method, and...

View source: R/s3_custom.R

s3_generate_presigned_urlR Documentation

Generate a presigned url given a client, its method, and arguments

Description

Generate a presigned url given a client, its method, and arguments

Usage

s3_generate_presigned_url(client_method, params=list(), expires_in=3600,
http_method = NULL)

Arguments

client_method

(character): The client method to presign for

params

(list): The parameters normally passed to client_method.

expires_in

(numeric): The number of seconds the presigned url is valid for. By default it expires in an hour (3600 seconds)

http_method

(character) The http method to use on the generated url. By default, the http method is whatever is used in the method's model.

Value

The presigned url character

Request syntax

svc$generate_signed_url(
  client_method = "string",
  params = "list",
  expires_in = "numeric",
  http_method = "string"
)

Examples

## Not run: 
# The following example generates a presigned URL that you
# can give to others so that they can retrieve an object from an S3 bucket.
svc$generate_signed_url(
  client_method = "get_object",
  Params = list(Bucket = "BUCKET_NAME", Key = "OBJECT_KEY"),
  ExpiresIn = 3600
)

## End(Not run)

paws.storage documentation built on Sept. 12, 2024, 6:16 a.m.