Skip to content
Merged
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 @@ -9,3 +9,4 @@ CONTRIBUTING.md
drat.sh
^LICENSE\.md$
^\.github$
^SECURITY\.md$
14 changes: 7 additions & 7 deletions .github/workflows/check-standard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ jobs:
config:
- {os: windows-latest, r: 'release'}
- {os: macOS-latest, r: 'release'}
- {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-24.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0 # required for mirroring, see https://stackoverflow.com/a/64272409/474349

- name: Copy to Cloudyr
if: runner.os == 'Linux' && github.ref == 'refs/heads/master' && github.repository_owner == 'Azure'
if: github.repository_owner == 'Azure' && runner.os == 'Linux' && github.ref == 'refs/heads/master'
env:
token: "${{ secrets.ghPat }}"
# git config hack required, see https://stackoverflow.com/q/64270867/474349
Expand All @@ -54,11 +54,11 @@ jobs:

- name: Cache R packages
if: runner.os != 'Windows'
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
# restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-5-

- name: Install system dependencies
if: runner.os == 'Linux'
Expand All @@ -85,13 +85,13 @@ jobs:

- name: Upload check results
if: failure()
uses: actions/upload-artifact@main
uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check

- name: Update Cloudyr drat
if: success() && runner.os == 'Linux' && github.ref == 'refs/heads/master' && github.repository_owner == 'Azure'
if: success() && github.repository_owner == 'Azure' && runner.os == 'Linux' && github.ref == 'refs/heads/master'
env:
token: "${{ secrets.ghPat }}"
run: |
Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: AzureRMR
Title: Interface to 'Azure Resource Manager'
Version: 2.4.4
Version: 2.4.5
Authors@R: c(
person("Hong", "Ooi", , "hongooi73@gmail.com", role = c("aut", "cre")),
person("Microsoft", role="cph")
Expand Down Expand Up @@ -28,4 +28,4 @@ Suggests:
httpuv,
AzureStor
Roxygen: list(markdown=TRUE, r6=FALSE, old_usage=TRUE)
RoxygenNote: 7.2.1
RoxygenNote: 7.3.1
12 changes: 12 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,16 @@ export(pool_sapply)
export(pool_size)
import(AzureAuth)
import(AzureGraph)
importFrom(AzureAuth,AzureR_dir)
importFrom(AzureAuth,clean_token_directory)
importFrom(AzureAuth,delete_azure_token)
importFrom(AzureAuth,get_azure_token)
importFrom(AzureAuth,is_azure_token)
importFrom(AzureAuth,is_azure_v1_token)
importFrom(AzureAuth,is_guid)
importFrom(AzureAuth,list_azure_tokens)
importFrom(AzureGraph,format_public_fields)
importFrom(AzureGraph,format_public_methods)
importFrom(AzureGraph,is_empty)
importFrom(AzureGraph,named_list)
importFrom(utils,modifyList)
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# AzureRMR 2.4.5

- Update documentation links for CRAN

# AzureRMR 2.4.4

- Fix broken `list_azure_logins` function. Thanks to Pedro Z (@pedrobtz).
Expand Down
4 changes: 2 additions & 2 deletions R/az_login.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#' @param version The Azure Active Directory version to use for authenticating.
#' @param scopes The Azure Service Management scopes (permissions) to obtain for this login. Only for `version=2`.
#' @param config_file Optionally, a JSON file containing any of the arguments listed above. Arguments supplied in this file take priority over those supplied on the command line. You can also use the output from the Azure CLI `az ad sp create-for-rbac` command.
#' @param token Optionally, an OAuth 2.0 token, of class [AzureToken]. This allows you to reuse the authentication details for an existing session. If supplied, the other arguments above to `create_azure_login` will be ignored.
#' @param token Optionally, an OAuth 2.0 token, of class [AzureAuth::AzureToken]. This allows you to reuse the authentication details for an existing session. If supplied, the other arguments above to `create_azure_login` will be ignored.
#' @param graph_host The Microsoft Graph endpoint. See 'Microsoft Graph integration' below.
#' @param refresh For `get_azure_login`, whether to refresh the authentication token on loading the client.
#' @param selection For `get_azure_login`, if you have multiple logins for a given tenant, which one to use. This can be a number, or the input MD5 hash of the token used for the login. If not supplied, `get_azure_login` will print a menu and ask you to choose a login.
Expand All @@ -31,7 +31,7 @@
#' If the AzureGraph package is installed and the `graph_host` argument is not `NULL`, `create_azure_login` will also create a login client for Microsoft Graph with the same credentials. This is to facilitate working with registered apps and service principals, eg when managing roles and permissions. Some Azure services also require creating service principals as part of creating a resource (eg Azure Kubernetes Service), and keeping the Graph credentials consistent with ARM helps ensure nothing breaks.
#'
#' @section Linux DSVM note:
#' If you are using a Linux [Data Science Virtual Machine](https://azure.microsoft.com/en-us/services/virtual-machines/data-science-virtual-machines/) in Azure, you may have problems running `create_azure_login()` (ie, without any arguments). In this case, try `create_azure_login(auth_type="device_code")`.
#' If you are using a Linux [Data Science Virtual Machine](https://azure.microsoft.com/en-us/products/virtual-machines/data-science-virtual-machines/) in Azure, you may have problems running `create_azure_login()` (ie, without any arguments). In this case, try `create_azure_login(auth_type="device_code")`.
#'
#' @return
#' For `get_azure_login` and `create_azure_login`, an object of class `az_rm`, representing the ARM login client. For `list_azure_logins`, a (possibly nested) list of such objects.
Expand Down
5 changes: 2 additions & 3 deletions R/az_resgroup.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#' @section Initialization:
#' Initializing a new object of this class can either retrieve an existing resource group, or create a new resource group on the host. Generally, the easiest way to create a resource group object is via the `get_resource_group`, `create_resource_group` or `list_resource_groups` methods of the [az_subscription] class, which handle this automatically.
#'
#' To create a resource group object in isolation, supply (at least) an Oauth 2.0 token of class [AzureToken], the subscription ID, and the resource group name. If this object refers to a _new_ resource group, supply the location as well (use the `list_locations` method of the `az_subscription class` for possible locations). You can also pass any optional parameters for the resource group as named arguments to `new()`.
#' To create a resource group object in isolation, supply (at least) an Oauth 2.0 token of class [AzureAuth::AzureToken], the subscription ID, and the resource group name. If this object refers to a _new_ resource group, supply the location as well (use the `list_locations` method of the `az_subscription class` for possible locations). You can also pass any optional parameters for the resource group as named arguments to `new()`.
#'
#' @section Templates:
#' To deploy a new template, pass the following arguments to `deploy_template()`:
Expand Down Expand Up @@ -75,8 +75,7 @@
#' @seealso
#' [az_subscription], [az_template], [az_resource],
#' [Azure resource group overview](https://learn.microsoft.com/en-us/azure/azure-resource-manager/resource-group-overview#resource-groups),
#' [Resources API reference](https://learn.microsoft.com/en-us/rest/api/resources/resources),
#' [Template API reference](https://learn.microsoft.com/en-us/rest/api/resources/deployments)
#' [Resources API reference](https://learn.microsoft.com/en-us/rest/api/resources/resources)
#'
#' For role-based access control methods, see [rbac]
#'
Expand Down
2 changes: 1 addition & 1 deletion R/az_rm.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#' - `aad_host`: Azure Active Directory host for authentication. Defaults to `https://login.microsoftonline.com/`. Change this if you are using a government or private cloud.
#' - `...`: Further arguments to pass to `get_azure_token`.
#' - `scopes`: The Azure Service Management scopes (permissions) to obtain for this login. Only for `version=2`.
#' - `token`: Optionally, an OAuth 2.0 token, of class [AzureToken]. This allows you to reuse the authentication details for an existing session. If supplied, all other arguments will be ignored.
#' - `token`: Optionally, an OAuth 2.0 token, of class [AzureAuth::AzureToken]. This allows you to reuse the authentication details for an existing session. If supplied, all other arguments will be ignored.
#'
#' @section Operations:
#' The `do_operation()` method allows you to carry out arbitrary operations on the Resource Manager endpoint. It takes the following arguments:
Expand Down
4 changes: 2 additions & 2 deletions R/az_subscription.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#' - `get_tags()` Get the tags on this subscription.
#'
#' @section Details:
#' Generally, the easiest way to create a subscription object is via the `get_subscription` or `list_subscriptions` methods of the [az_rm] class. To create a subscription object in isolation, call the `new()` method and supply an Oauth 2.0 token of class [AzureToken], along with the ID of the subscription.
#' Generally, the easiest way to create a subscription object is via the `get_subscription` or `list_subscriptions` methods of the [az_rm] class. To create a subscription object in isolation, call the `new()` method and supply an Oauth 2.0 token of class [AzureAuth::AzureToken], along with the ID of the subscription.
#'
#' @section Operations:
#' The `do_operation()` method allows you to carry out arbitrary operations on the subscription. It takes the following arguments:
Expand Down Expand Up @@ -158,7 +158,7 @@ public=list(
else sapply(apis, select_version)
}
},

get_tags=function()
{
if(is.null(self$tags))
Expand Down
3 changes: 1 addition & 2 deletions R/az_template.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@
#'
#' @seealso
#' [az_resource_group], [az_resource], [build_template_definition], [build_template_parameters]
#' [Template overview](https://learn.microsoft.com/en-us/azure/templates/),
#' [Template API reference](https://learn.microsoft.com/en-us/rest/api/resources/deployments)
#' [Template overview](https://learn.microsoft.com/en-us/azure/templates/)
#'
#' @examples
#' \dontrun{
Expand Down
2 changes: 1 addition & 1 deletion R/call_azure_rm.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' Call the Azure Resource Manager REST API
#'
#' @param token An Azure OAuth token, of class [AzureToken].
#' @param token An Azure OAuth token, of class [AzureAuth::AzureToken].
#' @param subscription For `call_azure_rm`, a subscription ID.
#' @param operation The operation to perform, which will form part of the URL path.
#' @param options A named list giving the URL query parameters.
Expand Down
2 changes: 1 addition & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#' @param lst A named list of objects.
#' @param x For `is_url`, An R object.
#' @param https_only For `is_url`, whether to allow only HTTPS URLs.
#' @param token For `get_paged_list`, an Azure OAuth token, of class [AzureToken].
#' @param token For `get_paged_list`, an Azure OAuth token, of class [AzureAuth::AzureToken].
#' @param next_link_name,value_name For `get_paged_list`, the names of the next link and value components in the `lst` argument. The default values are correct for Resource Manager.
#'
#' @details
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ stor2$add_role_assignment("041ff2be-4eb0-11e9-8f38-394fbcd0b29d", "Storage blob

## Extending

AzureRMR is meant to be a generic mechanism for working with Resource Manager. You can extend it to provide support for service-specific features; examples of packages that do this include [AzureVM](https://github.com/Azure/AzureVM) for [virtual machines](https://azure.microsoft.com/en-us/services/virtual-machines/), and [AzureStor](https://github.com/Azure/AzureStor) for [storage accounts](https://azure.microsoft.com/en-us/product-categories/storage/). For more information, see the ["Extending AzureRMR" vignette](vignettes/extend.Rmd).
AzureRMR is meant to be a generic mechanism for working with Resource Manager. You can extend it to provide support for service-specific features; examples of packages that do this include [AzureVM](https://github.com/Azure/AzureVM) for [virtual machines](https://azure.microsoft.com/en-us/products/virtual-machines/), and [AzureStor](https://github.com/Azure/AzureStor) for [storage accounts](https://azure.microsoft.com/en-us/products/category/storage/). For more information, see the ["Extending AzureRMR" vignette](vignettes/extend.Rmd).

## Acknowledgements

Expand Down
5 changes: 2 additions & 3 deletions man/az_resource_group.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/az_rm.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/az_subscription.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions man/az_template.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/azure_login.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/call_azure.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/utils.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading