Class CacheBlobTarget
Manages a Blob Target within a HPC Cache.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
using AzureAD = Pulumi.AzureAD;
class MyStack : Stack
{
public MyStack()
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
{
Location = "West Europe",
});
var exampleVirtualNetwork = new Azure.Network.VirtualNetwork("exampleVirtualNetwork", new Azure.Network.VirtualNetworkArgs
{
AddressSpaces =
{
"10.0.0.0/16",
},
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
});
var exampleSubnet = new Azure.Network.Subnet("exampleSubnet", new Azure.Network.SubnetArgs
{
ResourceGroupName = exampleResourceGroup.Name,
VirtualNetworkName = exampleVirtualNetwork.Name,
AddressPrefix = "10.0.1.0/24",
});
var exampleCache = new Azure.Hpc.Cache("exampleCache", new Azure.Hpc.CacheArgs
{
ResourceGroupName = exampleResourceGroup.Name,
Location = exampleResourceGroup.Location,
CacheSizeInGb = 3072,
SubnetId = exampleSubnet.Id,
SkuName = "Standard_2G",
});
var exampleAccount = new Azure.Storage.Account("exampleAccount", new Azure.Storage.AccountArgs
{
ResourceGroupName = exampleResourceGroup.Name,
Location = exampleResourceGroup.Location,
AccountTier = "Standard",
AccountReplicationType = "LRS",
});
var exampleContainer = new Azure.Storage.Container("exampleContainer", new Azure.Storage.ContainerArgs
{
StorageAccountName = exampleAccount.Name,
});
var exampleServicePrincipal = Output.Create(AzureAD.GetServicePrincipal.InvokeAsync(new AzureAD.GetServicePrincipalArgs
{
DisplayName = "HPC Cache Resource Provider",
}));
var exampleStorageAccountContrib = new Azure.Authorization.Assignment("exampleStorageAccountContrib", new Azure.Authorization.AssignmentArgs
{
Scope = exampleAccount.Id,
RoleDefinitionName = "Storage Account Contributor",
PrincipalId = exampleServicePrincipal.Apply(exampleServicePrincipal => exampleServicePrincipal.ObjectId),
});
var exampleStorageBlobDataContrib = new Azure.Authorization.Assignment("exampleStorageBlobDataContrib", new Azure.Authorization.AssignmentArgs
{
Scope = exampleAccount.Id,
RoleDefinitionName = "Storage Blob Data Contributor",
PrincipalId = exampleServicePrincipal.Apply(exampleServicePrincipal => exampleServicePrincipal.ObjectId),
});
var exampleCacheBlobTarget = new Azure.Hpc.CacheBlobTarget("exampleCacheBlobTarget", new Azure.Hpc.CacheBlobTargetArgs
{
ResourceGroupName = exampleResourceGroup.Name,
CacheName = exampleCache.Name,
StorageContainerId = exampleContainer.ResourceManagerId,
NamespacePath = "/blob_storage",
});
}
}
Inherited Members
Namespace: Pulumi.Azure.Hpc
Assembly: Pulumi.Azure.dll
Syntax
public class CacheBlobTarget : CustomResource
Constructors
View SourceCacheBlobTarget(String, CacheBlobTargetArgs, CustomResourceOptions)
Create a CacheBlobTarget resource with the given unique name, arguments, and options.
Declaration
public CacheBlobTarget(string name, CacheBlobTargetArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| CacheBlobTargetArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceCacheName
The name HPC Cache, which the HPC Cache Blob Target will be added to. Changing this forces a new resource to be created.
Declaration
public Output<string> CacheName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
The name of the HPC Cache Blob Target. Changing this forces a new resource to be created.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
NamespacePath
The client-facing file path of the HPC Cache Blob Target.
Declaration
public Output<string> NamespacePath { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ResourceGroupName
The name of the Resource Group in which to create the HPC Cache Blob Target. Changing this forces a new resource to be created.
Declaration
public Output<string> ResourceGroupName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
StorageContainerId
The Resource Manager ID of the Storage Container used as the HPC Cache Blob Target. Changing this forces a new resource to be created.
Declaration
public Output<string> StorageContainerId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, CacheBlobTargetState, CustomResourceOptions)
Get an existing CacheBlobTarget resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static CacheBlobTarget Get(string name, Input<string> id, CacheBlobTargetState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| CacheBlobTargetState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| CacheBlobTarget |