DatasetBlobStorage

class DatasetBlobStorage : KotlinCustomResource

Manages a Data Share Blob Storage Dataset.

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.datashare.Account;
import com.pulumi.azure.datashare.AccountArgs;
import com.pulumi.azure.datashare.inputs.AccountIdentityArgs;
import com.pulumi.azure.datashare.Share;
import com.pulumi.azure.datashare.ShareArgs;
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.datashare.DatasetBlobStorage;
import com.pulumi.azure.datashare.DatasetBlobStorageArgs;
import com.pulumi.azure.datashare.inputs.DatasetBlobStorageStorageAccountArgs;
import com.pulumi.resources.CustomResourceOptions;
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 exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.identity(AccountIdentityArgs.builder()
.type("SystemAssigned")
.build())
.build());
var exampleShare = new Share("exampleShare", ShareArgs.builder()
.accountId(exampleAccount.id())
.kind("CopyBased")
.build());
var exampleStorage_accountAccount = new Account("exampleStorage/accountAccount", AccountArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.accountTier("Standard")
.accountReplicationType("RAGRS")
.build());
var exampleContainer = new Container("exampleContainer", ContainerArgs.builder()
.storageAccountName(exampleStorage / accountAccount.name())
.containerAccessType("container")
.build());
final var exampleServicePrincipal = AzureadFunctions.getServicePrincipal(GetServicePrincipalArgs.builder()
.displayName(exampleAccount.name())
.build());
var exampleAssignment = new Assignment("exampleAssignment", AssignmentArgs.builder()
.scope(exampleStorage / accountAccount.id())
.roleDefinitionName("Storage Blob Data Reader")
.principalId(exampleServicePrincipal.applyValue(getServicePrincipalResult -> getServicePrincipalResult).applyValue(exampleServicePrincipal -> exampleServicePrincipal.applyValue(getServicePrincipalResult -> getServicePrincipalResult.objectId())))
.build());
var exampleDatasetBlobStorage = new DatasetBlobStorage("exampleDatasetBlobStorage", DatasetBlobStorageArgs.builder()
.dataShareId(exampleShare.id())
.containerName(exampleContainer.name())
.storageAccount(DatasetBlobStorageStorageAccountArgs.builder()
.name(exampleStorage / accountAccount.name())
.resourceGroupName(exampleStorage / accountAccount.resourceGroupName())
.subscriptionId("00000000-0000-0000-0000-000000000000")
.build())
.filePath("myfile.txt")
.build(), CustomResourceOptions.builder()
.dependsOn(exampleAssignment)
.build());
}
}

Import

Data Share Blob Storage Datasets can be imported using the resource id, e.g.

$ pulumi import azure:datashare/datasetBlobStorage:DatasetBlobStorage example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DataShare/accounts/account1/shares/share1/dataSets/dataSet1

Properties

Link copied to clipboard
val containerName: Output<String>

The name of the storage account container to be shared with the receiver. Changing this forces a new Data Share Blob Storage Dataset to be created.

Link copied to clipboard
val dataShareId: Output<String>

The ID of the Data Share in which this Data Share Blob Storage Dataset should be created. Changing this forces a new Data Share Blob Storage Dataset to be created.

Link copied to clipboard
val displayName: Output<String>

The name of the Data Share Dataset.

Link copied to clipboard
val filePath: Output<String>?

The path of the file in the storage container to be shared with the receiver. Changing this forces a new Data Share Blob Storage Dataset to be created.

Link copied to clipboard
val folderPath: Output<String>?

The path of the folder in the storage container to be shared with the receiver. Changing this forces a new Data Share Blob Storage Dataset to be created.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

The name which should be used for this Data Share Blob Storage Dataset. Changing this forces a new Data Share Blob Storage Dataset to be created.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

A storage_account block as defined below. Changing this forces a new resource to be created.

Link copied to clipboard
val urn: Output<String>