/// <summary> /// Update CLFS storage target parameters. /// </summary> /// <returns>CLFS storage target parameters.</returns> private StorageTarget CreateClfsStorageTargetParameters(StorageTarget storageT) { ClfsTarget clfsTarget = new ClfsTarget() { Target = storageT.Clfs.Target, }; StorageTarget storageTargetParameters = new StorageTarget { TargetType = "clfs", Clfs = clfsTarget, }; return(storageTargetParameters); }
/// <summary> /// Create CLFS storage target parameters. /// </summary> /// <returns>CLFS storage target parameters.</returns> private StorageTarget CreateClfsStorageTargetParameters() { ClfsTarget clfsTarget = new ClfsTarget() { Target = this.StorageContainerID, }; StorageTarget storageTargetParameters = new StorageTarget { TargetType = "clfs", Clfs = clfsTarget, }; return(storageTargetParameters); }
/// <summary> /// Create CLFS storage target parameters. /// </summary> /// <param name="storageAccountName">Storage account name.</param> /// <param name="containerName"> Storage container name.</param> /// <param name="namespacePath"> namepace path.</param> /// <param name="subscriptionId">Subscription id.</param> /// <param name="resourceGroupName">Resource group name.</param> /// <returns>CLFS storage target parameters.</returns> public StorageTarget CreateClfsStorageTargetParameters( string storageAccountName, string containerName, string namespacePath, string subscriptionId = null, string resourceGroupName = null) { var subscriptionID = string.IsNullOrEmpty(subscriptionId) ? this.subscriptionId : subscriptionId; var resourceGroup = string.IsNullOrEmpty(resourceGroupName) ? this.resourceGroup.Name : resourceGroupName; ClfsTarget clfsTarget = new ClfsTarget() { Target = $"/subscriptions/{subscriptionID}/" + $"resourceGroups/{resourceGroup}/" + $"providers/Microsoft.Storage/storageAccounts/{storageAccountName}/" + $"blobServices/default/containers/{containerName}", }; NamespaceJunction namespaceJunction = new NamespaceJunction() { NamespacePath = namespacePath, TargetPath = "/", }; StorageTarget storageTargetParameters = new StorageTarget { TargetType = "clfs", Clfs = clfsTarget, Junctions = new List <NamespaceJunction>() { namespaceJunction }, }; return(storageTargetParameters); }