зеркало из https://github.com/Azure/AzureGraph.git
doc update and fixing
This commit is contained in:
Родитель
cad672c1d6
Коммит
6e1e292c2e
22
R/az_app.r
22
R/az_app.r
|
@ -3,6 +3,11 @@
|
|||
#' Base class representing an AAD app.
|
||||
#'
|
||||
#' @docType class
|
||||
#' @section Fields:
|
||||
#' - `token`: The token used to authenticate with the Graph host.
|
||||
#' - `tenant`: The Azure Active Directory tenant for this app.
|
||||
#' - `properties`: The app properties.
|
||||
#' - `password`: The app password. Note that the Graph API does not return passwords, so this will be NULL for an app retrieved via `az_graph$get_app()`.
|
||||
#' @section Methods:
|
||||
#' - `new(...)`: Initialize a new app object. Do not call this directly; see 'Initialization' below.
|
||||
#' - `delete(confirm=TRUE)`: Delete an app. By default, ask for confirmation first.
|
||||
|
@ -32,7 +37,20 @@
|
|||
#' app$update_password()
|
||||
#'
|
||||
#' # set a redirect URI
|
||||
#' app$update(replyUrls=I("http://localhost:1410"))
|
||||
#' app$update(publicClient=list(redirectUris=I("http://localhost:1410")))
|
||||
#'
|
||||
#' # add API permission (access Azure Storage as user)
|
||||
#' app$update(requiredResourceAccess=list(
|
||||
#' list(
|
||||
#' resourceAppId="e406a681-f3d4-42a8-90b6-c2b029497af1",
|
||||
#' resourceAccess=list(
|
||||
#' list(
|
||||
#' id="03e0da56-190b-40ad-a80c-ea378c433f7f",
|
||||
#' type="Scope"
|
||||
#' )
|
||||
#' )
|
||||
#' )
|
||||
#' ))
|
||||
#'
|
||||
#' # change the app name
|
||||
#' app$update(displayName="MyRenamedApp")
|
||||
|
@ -135,7 +153,7 @@ public=list(
|
|||
az_service_principal$new(
|
||||
self$token,
|
||||
self$tenant,
|
||||
private$graph_op(op)
|
||||
private$graph_op(op)$value[[1]]
|
||||
)
|
||||
},
|
||||
|
||||
|
|
|
@ -57,8 +57,6 @@
|
|||
#' # create a new app and associated service principal, set password duration to 10 years
|
||||
#' app <- gr$create_app("mynewapp", password_duration=10)
|
||||
#'
|
||||
#' svc <- gr$get_service_principal(app_id=app$properties$appId)
|
||||
#'
|
||||
#' # delete the app
|
||||
#' gr$delete_app(app_id=app$properties$appId)
|
||||
#' # ... but better to call the object's delete method directly
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
#' Base class representing an AAD group.
|
||||
#'
|
||||
#' @docType class
|
||||
#' @section Fields:
|
||||
#' - `token`: The token used to authenticate with the Graph host.
|
||||
#' - `tenant`: The Azure Active Directory tenant for this group.
|
||||
#' - `properties`: The group properties.
|
||||
#' @section Methods:
|
||||
#' - `new(...)`: Initialize a new group object. Do not call this directly; see 'Initialization' below.
|
||||
#' - `delete(confirm=TRUE)`: Delete a group. By default, ask for confirmation first.
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
#' Base class representing an AAD service principal.
|
||||
#'
|
||||
#' @docType class
|
||||
#' @section Fields:
|
||||
#' - `token`: The token used to authenticate with the Graph host.
|
||||
#' - `tenant`: The Azure Active Directory tenant for this service principal.
|
||||
#' - `properties`: The service principal properties.
|
||||
#' @section Methods:
|
||||
#' - `new(...)`: Initialize a new service principal object. Do not call this directly; see 'Initialization' below.
|
||||
#' - `delete(confirm=TRUE)`: Delete a service principal. By default, ask for confirmation first.
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
#' Base class representing an AAD user account.
|
||||
#'
|
||||
#' @docType class
|
||||
#' @section Fields:
|
||||
#' - `token`: The token used to authenticate with the Graph host.
|
||||
#' - `tenant`: The Azure Active Directory tenant for this user.
|
||||
#' - `properties`: The user properties.
|
||||
#' @section Methods:
|
||||
#' - `new(...)`: Initialize a new user object. Do not call this directly; see 'Initialization' below.
|
||||
#' - `delete(confirm=TRUE)`: Delete a user account. By default, ask for confirmation first.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/az_app.R
|
||||
% Please edit documentation in R/az_app.r
|
||||
\docType{class}
|
||||
\name{az_app}
|
||||
\alias{az_app}
|
||||
|
@ -11,6 +11,16 @@ az_app
|
|||
\description{
|
||||
Base class representing an AAD app.
|
||||
}
|
||||
\section{Fields}{
|
||||
|
||||
\itemize{
|
||||
\item \code{token}: The token used to authenticate with the Graph host.
|
||||
\item \code{tenant}: The Azure Active Directory tenant for this app.
|
||||
\item \code{properties}: The app properties.
|
||||
\item \code{password}: The app password. Note that the Graph API does not return passwords, so this will be NULL for an app retrieved via \code{az_graph$get_app()}.
|
||||
}
|
||||
}
|
||||
|
||||
\section{Methods}{
|
||||
|
||||
\itemize{
|
||||
|
@ -43,7 +53,20 @@ app <- gr$create_app("MyNewApp")
|
|||
app$update_password()
|
||||
|
||||
# set a redirect URI
|
||||
app$update(replyUrls=I("http://localhost:1410"))
|
||||
app$update(publicClient=list(redirectUris=I("http://localhost:1410")))
|
||||
|
||||
# add API permission (access Azure Storage as user)
|
||||
app$update(requiredResourceAccess=list(
|
||||
list(
|
||||
resourceAppId="e406a681-f3d4-42a8-90b6-c2b029497af1",
|
||||
resourceAccess=list(
|
||||
list(
|
||||
id="03e0da56-190b-40ad-a80c-ea378c433f7f",
|
||||
type="Scope"
|
||||
)
|
||||
)
|
||||
)
|
||||
))
|
||||
|
||||
# change the app name
|
||||
app$update(displayName="MyRenamedApp")
|
||||
|
|
|
@ -67,8 +67,6 @@ gr$get_app(app_id="myappid")
|
|||
# create a new app and associated service principal, set password duration to 10 years
|
||||
app <- gr$create_app("mynewapp", password_duration=10)
|
||||
|
||||
svc <- gr$get_service_principal(app_id=app$properties$appId)
|
||||
|
||||
# delete the app
|
||||
gr$delete_app(app_id=app$properties$appId)
|
||||
# ... but better to call the object's delete method directly
|
||||
|
|
|
@ -11,6 +11,15 @@ az_group
|
|||
\description{
|
||||
Base class representing an AAD group.
|
||||
}
|
||||
\section{Fields}{
|
||||
|
||||
\itemize{
|
||||
\item \code{token}: The token used to authenticate with the Graph host.
|
||||
\item \code{tenant}: The Azure Active Directory tenant for this group.
|
||||
\item \code{properties}: The group properties.
|
||||
}
|
||||
}
|
||||
|
||||
\section{Methods}{
|
||||
|
||||
\itemize{
|
||||
|
|
|
@ -11,6 +11,15 @@ az_service_principal
|
|||
\description{
|
||||
Base class representing an AAD service principal.
|
||||
}
|
||||
\section{Fields}{
|
||||
|
||||
\itemize{
|
||||
\item \code{token}: The token used to authenticate with the Graph host.
|
||||
\item \code{tenant}: The Azure Active Directory tenant for this service principal.
|
||||
\item \code{properties}: The service principal properties.
|
||||
}
|
||||
}
|
||||
|
||||
\section{Methods}{
|
||||
|
||||
\itemize{
|
||||
|
|
|
@ -11,6 +11,15 @@ az_user
|
|||
\description{
|
||||
Base class representing an AAD user account.
|
||||
}
|
||||
\section{Fields}{
|
||||
|
||||
\itemize{
|
||||
\item \code{token}: The token used to authenticate with the Graph host.
|
||||
\item \code{tenant}: The Azure Active Directory tenant for this user.
|
||||
\item \code{properties}: The user properties.
|
||||
}
|
||||
}
|
||||
|
||||
\section{Methods}{
|
||||
|
||||
\itemize{
|
||||
|
|
Загрузка…
Ссылка в новой задаче