CacheBlobTargetArgs

data class CacheBlobTargetArgs(val accessPolicyName: Output<String>? = null, val cacheName: Output<String>? = null, val name: Output<String>? = null, val namespacePath: Output<String>? = null, val resourceGroupName: Output<String>? = null, val storageContainerId: Output<String>? = null) : ConvertibleToJava<CacheBlobTargetArgs>

Manages a Blob Target within a HPC Cache.

NOTE:: By request of the service team the provider no longer automatically registering the Microsoft.StorageCache Resource Provider for this resource. To register it you can run az provider register --namespace 'Microsoft.StorageCache'.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.network.VirtualNetwork;
import com.pulumi.azure.network.VirtualNetworkArgs;
import com.pulumi.azure.network.Subnet;
import com.pulumi.azure.network.SubnetArgs;
import com.pulumi.azure.hpc.Cache;
import com.pulumi.azure.hpc.CacheArgs;
import com.pulumi.azure.storage.Account;
import com.pulumi.azure.storage.AccountArgs;
import com.pulumi.azure.storage.Container;
import com.pulumi.azure.storage.ContainerArgs;
import com.pulumi.azuread.AzureadFunctions;
import com.pulumi.azuread.inputs.GetServicePrincipalArgs;
import com.pulumi.azure.authorization.Assignment;
import com.pulumi.azure.authorization.AssignmentArgs;
import com.pulumi.azure.hpc.CacheBlobTarget;
import com.pulumi.azure.hpc.CacheBlobTargetArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
.addressSpaces("10.0.0.0/16")
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.build());
var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.virtualNetworkName(exampleVirtualNetwork.name())
.addressPrefixes("10.0.1.0/24")
.build());
var exampleCache = new Cache("exampleCache", CacheArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.cacheSizeInGb(3072)
.subnetId(exampleSubnet.id())
.skuName("Standard_2G")
.build());
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.accountTier("Standard")
.accountReplicationType("LRS")
.build());
var exampleContainer = new Container("exampleContainer", ContainerArgs.builder()
.storageAccountName(exampleAccount.name())
.build());
final var exampleServicePrincipal = AzureadFunctions.getServicePrincipal(GetServicePrincipalArgs.builder()
.displayName("HPC Cache Resource Provider")
.build());
var exampleStorageAccountContrib = new Assignment("exampleStorageAccountContrib", AssignmentArgs.builder()
.scope(exampleAccount.id())
.roleDefinitionName("Storage Account Contributor")
.principalId(exampleServicePrincipal.applyValue(getServicePrincipalResult -> getServicePrincipalResult.objectId()))
.build());
var exampleStorageBlobDataContrib = new Assignment("exampleStorageBlobDataContrib", AssignmentArgs.builder()
.scope(exampleAccount.id())
.roleDefinitionName("Storage Blob Data Contributor")
.principalId(exampleServicePrincipal.applyValue(getServicePrincipalResult -> getServicePrincipalResult.objectId()))
.build());
var exampleCacheBlobTarget = new CacheBlobTarget("exampleCacheBlobTarget", CacheBlobTargetArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.cacheName(exampleCache.name())
.storageContainerId(exampleContainer.resourceManagerId())
.namespacePath("/blob_storage")
.build());
}
}

Import

Blob Targets within an HPC Cache can be imported using the resource id, e.g.

$ pulumi import azure:hpc/cacheBlobTarget:CacheBlobTarget example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StorageCache/caches/cache1/storageTargets/target1

Constructors

Link copied to clipboard
fun CacheBlobTargetArgs(accessPolicyName: Output<String>? = null, cacheName: Output<String>? = null, name: Output<String>? = null, namespacePath: Output<String>? = null, resourceGroupName: Output<String>? = null, storageContainerId: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): CacheBlobTargetArgs

Properties

Link copied to clipboard
val accessPolicyName: Output<String>? = null

The name of the access policy applied to this target. Defaults to default.

Link copied to clipboard
val cacheName: Output<String>? = null

The name HPC Cache, which the HPC Cache Blob Target will be added to. Changing this forces a new resource to be created.

Link copied to clipboard
val name: Output<String>? = null

The name of the HPC Cache Blob Target. Changing this forces a new resource to be created.

Link copied to clipboard
val namespacePath: Output<String>? = null

The client-facing file path of the HPC Cache Blob Target.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the Resource Group in which to create the HPC Cache Blob Target. Changing this forces a new resource to be created.

Link copied to clipboard
val storageContainerId: Output<String>? = null

The Resource Manager ID of the Storage Container used as the HPC Cache Blob Target. Changing this forces a new resource to be created.