table_endpoint: Table storage endpoint

Description Usage Arguments Value See Also Examples

View source: R/table_endpoint.R

Description

Table storage endpoint object, and method to call it.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
table_endpoint(
  endpoint,
  key = NULL,
  token = NULL,
  sas = NULL,
  api_version = getOption("azure_storage_api_version")
)

call_table_endpoint(
  endpoint,
  path,
  options = list(),
  headers = list(),
  body = NULL,
  ...,
  http_verb = c("GET", "DELETE", "PUT", "POST", "HEAD", "PATCH"),
  http_status_handler = c("stop", "warn", "message", "pass"),
  return_headers = (http_verb == "HEAD"),
  metadata = c("none", "minimal", "full"),
  num_retries = 10
)

Arguments

endpoint

For table_endpoint, the URL of the table service endpoint. This will be of the form https://{account-name}.table.core.windows.net if the service is provided by a storage account in the Azure public cloud, while for a CosmosDB database, it will be of the form https://{account-name}.table.cosmos.azure.com:443. For call_table_endpoint, an object of class table_endpoint.

key

The access key for the storage account.

token

An Azure Active Directory (AAD) authentication token. For compatibility with AzureStor; not used for table storage.

sas

A shared access signature (SAS) for the account. At least one of key or sas should be provided.

api_version

The storage API version to use when interacting with the host. Defaults to "2019-07-07".

path

For call_table_endpoint, the path component of the endpoint call.

options

For call_table_endpoint, a named list giving the query parameters for the operation.

headers

For call_table_endpoint, a named list giving any additional HTTP headers to send to the host. AzureCosmosR will handle authentication details, so you don't have to specify these here.

body

For call_table_endpoint, the request body for a PUT/POST/PATCH call.

...

For call_table_endpoint, further arguments passed to AzureStor::call_storage_endpoint and httr::VERB.

http_verb

For call_table_endpoint, the HTTP verb (method) of the operation.

http_status_handler

For call_table_endpoint, the R handler for the HTTP status code of the response. "stop", "warn" or "message" will call the corresponding handlers in httr, while "pass" ignores the status code. The latter is primarily useful for debugging purposes.

return_headers

For call_table_endpoint, whether to return the (parsed) response headers instead of the body. Ignored if http_status_handler="pass".

metadata

For call_table_endpoint, the level of ODATA metadata to include in the response.

num_retries

The number of times to retry the call, if the response is a HTTP error 429 (too many requests). The Cosmos DB endpoint tends to be aggressive at rate-limiting requests, to maintain the desired level of latency. This will generally not affect calls to an endpoint provided by a storage account.

Value

table_endpoint returns an object of class table_endpoint, inheriting from storage_endpoint. This is the analogue of the blob_endpoint, file_endpoint and adls_endpoint classes provided by the AzureStor package.

call_table_endpoint returns the body of the response by default, or the headers if return_headers=TRUE. If http_status_handler="pass", it returns the entire response object without modification.

See Also

storage_table, table_entity, AzureStor::call_storage_endpoint

Table service REST API reference

Authorizing requests to Azure storage services

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 

# storage account table endpoint
table_endpoint("https://mystorageacct.table.core.windows.net", key="mykey")

# Cosmos DB table endpoint
table_endpoint("https://mycosmosdb.table.cosmos.azure.com:443", key="mykey")


## End(Not run)

cloudyr/AzureTableStor documentation built on Jan. 19, 2021, 9:26 p.m.