R/glacier_service.R

Defines functions service glacier

Documented in glacier

# This file is generated by make.paws. Please do not edit here.
#' @importFrom paws.common new_handlers new_service set_config merge_config
NULL

#' Amazon Glacier
#'
#' @description
#' Amazon S3 Glacier (Glacier) is a storage solution for "cold data."
#' 
#' Glacier is an extremely low-cost storage service that provides secure,
#' durable, and easy-to-use storage for data backup and archival. With
#' Glacier, customers can store their data cost effectively for months,
#' years, or decades. Glacier also enables customers to offload the
#' administrative burdens of operating and scaling storage to AWS, so they
#' don't have to worry about capacity planning, hardware provisioning, data
#' replication, hardware failure and recovery, or time-consuming hardware
#' migrations.
#' 
#' Glacier is a great storage choice when low storage cost is paramount and
#' your data is rarely retrieved. If your application requires fast or
#' frequent access to your data, consider using Amazon S3. For more
#' information, see [Amazon Simple Storage Service (Amazon
#' S3)](https://aws.amazon.com/s3/).
#' 
#' You can store any kind of data in any format. There is no maximum limit
#' on the total amount of data you can store in Glacier.
#' 
#' If you are a first-time user of Glacier, we recommend that you begin by
#' reading the following sections in the *Amazon S3 Glacier Developer
#' Guide*:
#' 
#' -   [What is Amazon S3
#'     Glacier](https://docs.aws.amazon.com/amazonglacier/latest/dev/introduction.html) -
#'     This section of the Developer Guide describes the underlying data
#'     model, the operations it supports, and the AWS SDKs that you can use
#'     to interact with the service.
#' 
#' -   [Getting Started with Amazon S3
#'     Glacier](https://docs.aws.amazon.com/amazonglacier/latest/dev/amazon-glacier-getting-started.html) -
#'     The Getting Started section walks you through the process of
#'     creating a vault, uploading archives, creating jobs to download
#'     archives, retrieving the job output, and deleting archives.
#'
#' @param
#' config
#' Optional configuration of credentials, endpoint, and/or region.
#' \itemize{
#' \item{\strong{credentials}: \itemize{
#' \item{\strong{creds}: \itemize{
#' \item{\strong{access_key_id}: AWS access key ID}
#' \item{\strong{secret_access_key}: AWS secret access key}
#' \item{\strong{session_token}: AWS temporary session token}
#' }}
#' \item{\strong{profile}: The name of a profile to use. If not given, then the default profile is used.}
#' \item{\strong{anonymous}: Set anonymous credentials.}
#' }}
#' \item{\strong{endpoint}: The complete URL to use for the constructed client.}
#' \item{\strong{region}: The AWS Region used in instantiating the client.}
#' \item{\strong{close_connection}: Immediately close all HTTP connections.}
#' \item{\strong{timeout}: The time in seconds till a timeout exception is thrown when attempting to make a connection. The default is 60 seconds.}
#' \item{\strong{s3_force_path_style}: Set this to `true` to force the request to use path-style addressing, i.e. `http://s3.amazonaws.com/BUCKET/KEY`.}
#' \item{\strong{sts_regional_endpoint}: Set sts regional endpoint resolver to regional or legacy \url{https://docs.aws.amazon.com/sdkref/latest/guide/feature-sts-regionalized-endpoints.html}}
#' }
#' @param
#' credentials
#' Optional credentials shorthand for the config parameter
#' \itemize{
#' \item{\strong{creds}: \itemize{
#' \item{\strong{access_key_id}: AWS access key ID}
#' \item{\strong{secret_access_key}: AWS secret access key}
#' \item{\strong{session_token}: AWS temporary session token}
#' }}
#' \item{\strong{profile}: The name of a profile to use. If not given, then the default profile is used.}
#' \item{\strong{anonymous}: Set anonymous credentials.}
#' }
#' @param
#' endpoint
#' Optional shorthand for complete URL to use for the constructed client.
#' @param
#' region
#' Optional shorthand for AWS Region used in instantiating the client.
#'
#' @section Service syntax:
#' ```
#' svc <- glacier(
#'   config = list(
#'     credentials = list(
#'       creds = list(
#'         access_key_id = "string",
#'         secret_access_key = "string",
#'         session_token = "string"
#'       ),
#'       profile = "string",
#'       anonymous = "logical"
#'     ),
#'     endpoint = "string",
#'     region = "string",
#'     close_connection = "logical",
#'     timeout = "numeric",
#'     s3_force_path_style = "logical",
#'     sts_regional_endpoint = "string"
#'   ),
#'   credentials = list(
#'     creds = list(
#'       access_key_id = "string",
#'       secret_access_key = "string",
#'       session_token = "string"
#'     ),
#'     profile = "string",
#'     anonymous = "logical"
#'   ),
#'   endpoint = "string",
#'   region = "string"
#' )
#' ```
#'
#' @examples
#' \dontrun{
#' svc <- glacier()
#' # The example deletes an in-progress multipart upload to a vault named
#' # my-vault:
#' svc$abort_multipart_upload(
#'   accountId = "-",
#'   uploadId = "19gaRezEXAMPLES6Ry5YYdqthHOC_kGRCT03L9yetr220UmPtBYKk-OssZtLq...",
#'   vaultName = "my-vault"
#' )
#' }
#'
#' @section Operations:
#' \tabular{ll}{
#'  \link[=glacier_abort_multipart_upload]{abort_multipart_upload} \tab This operation aborts a multipart upload identified by the upload ID\cr
#'  \link[=glacier_abort_vault_lock]{abort_vault_lock} \tab This operation aborts the vault locking process if the vault lock is not in the Locked state\cr
#'  \link[=glacier_add_tags_to_vault]{add_tags_to_vault} \tab This operation adds the specified tags to a vault\cr
#'  \link[=glacier_complete_multipart_upload]{complete_multipart_upload} \tab You call this operation to inform Amazon S3 Glacier (Glacier) that all the archive parts have been uploaded and that Glacier can now assemble the archive from the uploaded parts\cr
#'  \link[=glacier_complete_vault_lock]{complete_vault_lock} \tab This operation completes the vault locking process by transitioning the vault lock from the InProgress state to the Locked state, which causes the vault lock policy to become unchangeable\cr
#'  \link[=glacier_create_vault]{create_vault} \tab This operation creates a new vault with the specified name\cr
#'  \link[=glacier_delete_archive]{delete_archive} \tab This operation deletes an archive from a vault\cr
#'  \link[=glacier_delete_vault]{delete_vault} \tab This operation deletes a vault\cr
#'  \link[=glacier_delete_vault_access_policy]{delete_vault_access_policy} \tab This operation deletes the access policy associated with the specified vault\cr
#'  \link[=glacier_delete_vault_notifications]{delete_vault_notifications} \tab This operation deletes the notification configuration set for a vault\cr
#'  \link[=glacier_describe_job]{describe_job} \tab This operation returns information about a job you previously initiated, including the job initiation date, the user who initiated the job, the job status code/message and the Amazon SNS topic to notify after Amazon S3 Glacier (Glacier) completes the job\cr
#'  \link[=glacier_describe_vault]{describe_vault} \tab This operation returns information about a vault, including the vault's Amazon Resource Name (ARN), the date the vault was created, the number of archives it contains, and the total size of all the archives in the vault\cr
#'  \link[=glacier_get_data_retrieval_policy]{get_data_retrieval_policy} \tab This operation returns the current data retrieval policy for the account and region specified in the GET request\cr
#'  \link[=glacier_get_job_output]{get_job_output} \tab This operation downloads the output of the job you initiated using InitiateJob\cr
#'  \link[=glacier_get_vault_access_policy]{get_vault_access_policy} \tab This operation retrieves the access-policy subresource set on the vault; for more information on setting this subresource, see Set Vault Access Policy (PUT access-policy)\cr
#'  \link[=glacier_get_vault_lock]{get_vault_lock} \tab This operation retrieves the following attributes from the lock-policy subresource set on the specified vault:\cr
#'  \link[=glacier_get_vault_notifications]{get_vault_notifications} \tab This operation retrieves the notification-configuration subresource of the specified vault\cr
#'  \link[=glacier_initiate_job]{initiate_job} \tab This operation initiates a job of the specified type, which can be a select, an archival retrieval, or a vault retrieval\cr
#'  \link[=glacier_initiate_multipart_upload]{initiate_multipart_upload} \tab This operation initiates a multipart upload\cr
#'  \link[=glacier_initiate_vault_lock]{initiate_vault_lock} \tab This operation initiates the vault locking process by doing the following:\cr
#'  \link[=glacier_list_jobs]{list_jobs} \tab This operation lists jobs for a vault, including jobs that are in-progress and jobs that have recently finished\cr
#'  \link[=glacier_list_multipart_uploads]{list_multipart_uploads} \tab This operation lists in-progress multipart uploads for the specified vault\cr
#'  \link[=glacier_list_parts]{list_parts} \tab This operation lists the parts of an archive that have been uploaded in a specific multipart upload\cr
#'  \link[=glacier_list_provisioned_capacity]{list_provisioned_capacity} \tab This operation lists the provisioned capacity units for the specified AWS account\cr
#'  \link[=glacier_list_tags_for_vault]{list_tags_for_vault} \tab This operation lists all the tags attached to a vault\cr
#'  \link[=glacier_list_vaults]{list_vaults} \tab This operation lists all vaults owned by the calling user's account\cr
#'  \link[=glacier_purchase_provisioned_capacity]{purchase_provisioned_capacity} \tab This operation purchases a provisioned capacity unit for an AWS account\cr
#'  \link[=glacier_remove_tags_from_vault]{remove_tags_from_vault} \tab This operation removes one or more tags from the set of tags attached to a vault\cr
#'  \link[=glacier_set_data_retrieval_policy]{set_data_retrieval_policy} \tab This operation sets and then enacts a data retrieval policy in the region specified in the PUT request\cr
#'  \link[=glacier_set_vault_access_policy]{set_vault_access_policy} \tab This operation configures an access policy for a vault and will overwrite an existing policy\cr
#'  \link[=glacier_set_vault_notifications]{set_vault_notifications} \tab This operation configures notifications that will be sent when specific events happen to a vault\cr
#'  \link[=glacier_upload_archive]{upload_archive} \tab This operation adds an archive to a vault\cr
#'  \link[=glacier_upload_multipart_part]{upload_multipart_part} \tab This operation uploads a part of an archive
#' }
#'
#' @return
#' A client for the service. You can call the service's operations using
#' syntax like `svc$operation(...)`, where `svc` is the name you've assigned
#' to the client. The available operations are listed in the
#' Operations section.
#'
#' @rdname glacier
#' @export
glacier <- function(config = list(), credentials = list(), endpoint = NULL, region = NULL) {
  config <- merge_config(
    config,
    list(
      credentials = credentials,
      endpoint = endpoint,
      region = region
    )
  )
  svc <- .glacier$operations
  svc <- set_config(svc, config)
  return(svc)
}

# Private API objects: metadata, handlers, interfaces, etc.
.glacier <- list()

.glacier$operations <- list()

.glacier$metadata <- list(
  service_name = "glacier",
  endpoints = list("*" = list(endpoint = "glacier.{region}.amazonaws.com", global = FALSE), "cn-*" = list(endpoint = "glacier.{region}.amazonaws.com.cn", global = FALSE), "eu-isoe-*" = list(endpoint = "glacier.{region}.cloud.adc-e.uk", global = FALSE), "us-iso-*" = list(endpoint = "glacier.{region}.c2s.ic.gov", global = FALSE), "us-isob-*" = list(endpoint = "glacier.{region}.sc2s.sgov.gov", global = FALSE), "us-isof-*" = list(endpoint = "glacier.{region}.csp.hci.ic.gov", global = FALSE)),
  service_id = "Glacier",
  api_version = "2012-06-01",
  signing_name = "glacier",
  json_version = "",
  target_prefix = ""
)

.glacier$service <- function(config = list(), op = NULL) {
  handlers <- new_handlers("restjson", "v4")
  new_service(.glacier$metadata, handlers, config, op)
}

Try the paws.storage package in your browser

Any scripts or data that you put into this service are public.

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