Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resurrect the Package #48

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ knitreadme.sh
^.*\.Rproj$
^\.Rproj\.user$
^\.github.?
^LICENSE\.md$
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,3 @@
.Ruserdata
.Renviron
aws.ec2.Rproj
revdep/
^revdep/.?$
9 changes: 3 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@ matrix:
dist: trusty
sudo: required
env: DRAT_DEPLOY=true
- os: osx
osx_image: xcode9.2
- os: osx
osx_image: xcode7.3
r_build_args: "--no-build-vignettes"
r_check_args: "--ignore-vignettes --no-examples"
# Travis is currently broken for macos R so disable
# - os: osx
# osx_image: xcode9.2
r_packages:
- covr
- drat
Expand Down
26 changes: 15 additions & 11 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,28 +1,32 @@
Package: aws.ec2
Type: Package
Title: Amazon Web Services EC2 Client Package
Version: 0.1.17
Date: 2018-07-27
Authors@R: c(person("Thomas J.", "Leeper", role = c("aut"),
Version: 0.1.17.9000
Authors@R: c(
person("Thomas J.", "Leeper", role = c("aut"),
email = "[email protected]",
comment = c(ORCID = "0000-0003-4097-6326")),
person("Andrie", "de Vries", role = "ctb"))
Maintainer: ORPHANED
person("Jon", "Harmon", role = c("ctb", "cre"),
email = "[email protected]",
comment = c(ORCID = "0000-0003-4781-4346")),
person("Andrie", "de Vries", role = "ctb")
)
Description: A simple client package for the Amazon Web Services ('AWS') Elastic
Cloud Compute ('EC2') <https://aws.amazon.com/ec2/> 'API'.
License: GPL (>= 2)
Encoding: UTF-8
LazyData: true
Depends: R (>= 3.4)
License: GPL-3
Imports:
utils,
aws.signature (>= 0.4.0),
aws.signature (>= 0.5.2),
httr,
xml2,
base64enc
Suggests:
testthat,
aws.ec2metadata,
aws.iam,
ssh
aws.iam
URL: https://github.com/cloudyr/aws.ec2
BugReports: https://github.com/cloudyr/aws.ec2/issues
RoxygenNote: 6.0.1
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.0
595 changes: 595 additions & 0 deletions LICENSE.md

Large diffs are not rendered by default.

89 changes: 1 addition & 88 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,102 +1,15 @@
# Generated by roxygen2: do not edit by hand

S3method(print,ec2_keypair)
export(account_attrs)
export(allocate_ip)
export(associate_ip)
export(associate_netacl)
export(attach_gateway)
export(attach_volume)
export(authorize_egress)
export(authorize_ingress)
export(copy_image)
export(create_gateway)
export(create_image)
export(create_keypair)
export(create_netacl)
export(create_netacl_rule)
export(create_placement)
export(create_sgroup)
export(create_snapshot)
export(create_subnet)
export(create_tags)
export(create_volume)
export(create_vpc)
export(delete_gateway)
export(delete_keypair)
export(delete_netacl)
export(delete_netacl_rule)
export(delete_placement)
export(delete_sgroup)
export(delete_snapshot)
export(delete_subnet)
export(delete_tags)
export(delete_volume)
export(delete_vpc)
export(deregister_image)
export(describe_gateways)
export(describe_images)
export(describe_instances)
export(describe_ips)
export(describe_keypairs)
export(describe_netacls)
export(describe_placements)
export(describe_regions)
export(describe_sgroups)
export(describe_subnets)
export(describe_tags)
export(describe_volumes)
export(describe_vpcs)
export(describe_zones)
export(detach_gateway)
export(detach_volume)
export(disassociate_ip)
export(describe_account_attributes)
export(ec2HTTP)
export(enable_volume_io)
export(get_console_output)
export(get_image_attr)
export(get_instance_attr)
export(get_instance_private_ip)
export(get_instance_public_ip)
export(get_password_data)
export(get_volume_attr)
export(get_vpc_attr)
export(import_keypair)
export(instance_status)
export(make_ip_classic)
export(make_ip_vpc)
export(modify_volume)
export(monitor_instances)
export(my_ip)
export(reboot_instances)
export(release_ip)
export(replace_netacl_rule)
export(reset_image_attr)
export(reset_instance_attr)
export(revoke_egress)
export(revoke_ingress)
export(run_instances)
export(set_image_attr)
export(set_instance_attr)
export(set_volume_attr)
export(set_vpc_attr)
export(start_instances)
export(stop_instances)
export(terminate_instances)
export(unmonitor_instances)
export(volume_status)
importFrom(aws.signature,locate_credentials)
importFrom(aws.signature,signature_v4_auth)
importFrom(base64enc,base64decode)
importFrom(base64enc,base64encode)
importFrom(httr,GET)
importFrom(httr,add_headers)
importFrom(httr,content)
importFrom(httr,headers)
importFrom(httr,http_error)
importFrom(httr,http_status)
importFrom(httr,warn_for_status)
importFrom(utils,head)
importFrom(utils,tail)
importFrom(xml2,as_list)
importFrom(xml2,read_xml)
24 changes: 0 additions & 24 deletions R/account_attrs.R

This file was deleted.

97 changes: 0 additions & 97 deletions R/associate_ip.R

This file was deleted.

54 changes: 54 additions & 0 deletions R/describe_account_attributes.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#' @title Describe Account Attributes
#' @description Retrieve Account Attributes
#' @param attribute_names A character vector specifying the attributes to
#' include. One or more of \code{supported_platforms}, \code{default_vpc},
#' \code{vpc_max_security_groups_per_interface}, \code{max_elastic_ips}, or
#' \code{vpc_max_elastic_ips}.
#' @template dots
#' @return A list of the requested attributes.
#' @references
#' \href{https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeAccountAttributes.html}{API
#' Reference: DescribeAccountAttributes}
#' @examples
#' \dontrun{
#' describe_account_attributes()
#' }
#' @export
describe_account_attributes <- function(attribute_names = c(
"supported_platforms",
"default_vpc",
"vpc_max_security_groups_per_interface",
"max_elastic_ips",
"vpc_max_elastic_ips"), ...) {
query <- list(Action = "DescribeAccountAttributes")

# For argument matching, we want the "_" form.
attribute_names <- .make_syntactic(attribute_names)
if ("max_instances" %in% attribute_names) {
alert_func <- ifelse(
length(attribute_names) > 1,
warning,
stop
)
alert_func("max_instances is no longer supported")
attribute_names <- setdiff(attribute_names, "max_instances")
}
attribute_names <- match.arg(attribute_names, several.ok = TRUE)

# For the call, we need the "-" form.
attribute_names <- .match_api_parameters(attribute_names)
attribute_names <- as.list(attribute_names)
names(attribute_names) <- paste0("AttributeName.", 1:length(attribute_names))
query <- c(query, attribute_names)

r <- ec2HTTP(query = query, ...)
out <- lapply(r$accountAttributeSet, function(z) {
unname(unlist(z$attributeValueSet))
})
names(out) <- lapply(
r$accountAttributeSet,
function(z) z[["attributeName"]][[1]]
)
names(out) <- .make_syntactic(names(out))
return(out)
}
Loading