AzureStor (version 2.0.1)

create_storage_account: Create Azure storage account

Description

Method for the AzureRMR::az_resource_group class.

Value

An object of class az_storage representing the created storage account.

Usage

create_storage_account(name, location, kind = "StorageV2", replication = "Standard_LRS",
                       access_tier = "hot"), https_only = TRUE, 
                       hierarchical_namespace_enabled = FALSE, properties = list(), ...)

Arguments

  • name: The name of the storage account.

  • location: The location/region in which to create the account. Defaults to the resource group location.

  • kind: The type of account, either "StorageV2" (the default), "FileStorage" or "BlobStorage".

  • replication: The replication strategy for the account. The default is locally-redundant storage (LRS).

  • access_tier: The access tier, either "hot" or "cool", for blobs.

  • https_only: Whether a HTTPS connection is required to access the storage.

  • hierarchical_namespace_enabled: Whether to enable hierarchical namespaces, which are a feature of Azure Data Lake Storage Gen 2 and provide more a efficient way to manage storage. See 'Details' below.

  • properties: A list of other properties for the storage account.

  • ... Other named arguments to pass to the az_storage initialization function.

Details

This method deploys a new storage account resource, with parameters given by the arguments. A storage account can host multiple types of storage:

  • blob storage

  • file storage

  • table storage

  • queue storage

  • Azure Data Lake Storage Gen2

Accounts created with kind = "BlobStorage" can only host blob storage, while those with kind = "FileStorage" can only host file storage. Accounts with kind = "StorageV2" can host all types of storage. Currently, AzureStor provides an R interface to ADLSgen2, blob and file storage.

Currently (as of February 2019), if hierarchical namespaces are enabled, the blob API for the account is disabled. The blob endpoint is still accessible, but blob operations on the endpoint will fail. Full interoperability between blobs and ADLSgen2 is planned for later in 2019.

See Also

get_storage_account, delete_storage_account, az_storage

Azure Storage documentation, Azure Storage Provider API reference, Azure Data Lake Storage hierarchical namespaces

Examples

Run this code
# NOT RUN {
rg <- AzureRMR::az_rm$
    new(tenant="myaadtenant.onmicrosoft.com", app="app_id", password="password")$
    get_subscription("subscription_id")$
    get_resource_group("rgname")

# create a new storage account
rg$create_storage_account("mystorage", kind="StorageV2")

# create a blob storage account in a different region
rg$create_storage_account("myblobstorage",
    location="australiasoutheast",
    kind="BlobStorage")

# }

Run the code above in your browser using DataCamp Workspace