All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azure.datashare.DatasetBlobStorage Maven / Gradle / Ivy

// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azure.datashare;

import com.pulumi.azure.Utilities;
import com.pulumi.azure.datashare.DatasetBlobStorageArgs;
import com.pulumi.azure.datashare.inputs.DatasetBlobStorageState;
import com.pulumi.azure.datashare.outputs.DatasetBlobStorageStorageAccount;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Manages a Data Share Blob Storage Dataset.
 * 
 * ## Example Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * 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()
 *             .name("example-resources")
 *             .location("West Europe")
 *             .build());
 * 
 *         var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
 *             .name("example-dsa")
 *             .location(exampleResourceGroup.location())
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .identity(AccountIdentityArgs.builder()
 *                 .type("SystemAssigned")
 *                 .build())
 *             .build());
 * 
 *         var exampleShare = new Share("exampleShare", ShareArgs.builder()
 *             .name("example_ds")
 *             .accountId(exampleAccount.id())
 *             .kind("CopyBased")
 *             .build());
 * 
 *         var exampleAccount2 = new Account("exampleAccount2", AccountArgs.builder()
 *             .name("examplestr")
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .location(exampleResourceGroup.location())
 *             .accountTier("Standard")
 *             .accountReplicationType("RAGRS")
 *             .build());
 * 
 *         var exampleContainer = new Container("exampleContainer", ContainerArgs.builder()
 *             .name("example-sc")
 *             .storageAccountName(exampleAccount2.name())
 *             .containerAccessType("container")
 *             .build());
 * 
 *         final var example = AzureadFunctions.getServicePrincipal(GetServicePrincipalArgs.builder()
 *             .displayName(exampleAccount.name())
 *             .build());
 * 
 *         var exampleAssignment = new Assignment("exampleAssignment", AssignmentArgs.builder()
 *             .scope(exampleAccount2.id())
 *             .roleDefinitionName("Storage Blob Data Reader")
 *             .principalId(example.applyValue(getServicePrincipalResult -> getServicePrincipalResult).applyValue(example -> example.applyValue(getServicePrincipalResult -> getServicePrincipalResult.objectId())))
 *             .build());
 * 
 *         var exampleDatasetBlobStorage = new DatasetBlobStorage("exampleDatasetBlobStorage", DatasetBlobStorageArgs.builder()
 *             .name("example-dsbsds-file")
 *             .dataShareId(exampleShare.id())
 *             .containerName(exampleContainer.name())
 *             .storageAccount(DatasetBlobStorageStorageAccountArgs.builder()
 *                 .name(exampleAccount2.name())
 *                 .resourceGroupName(exampleAccount2.resourceGroupName())
 *                 .subscriptionId("00000000-0000-0000-0000-000000000000")
 *                 .build())
 *             .filePath("myfile.txt")
 *             .build(), CustomResourceOptions.builder()
 *                 .dependsOn(exampleAssignment)
 *                 .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * Data Share Blob Storage Datasets can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:datashare/datasetBlobStorage:DatasetBlobStorage example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DataShare/accounts/account1/shares/share1/dataSets/dataSet1 * ``` * */ @ResourceType(type="azure:datashare/datasetBlobStorage:DatasetBlobStorage") public class DatasetBlobStorage extends com.pulumi.resources.CustomResource { /** * 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. * */ @Export(name="containerName", refs={String.class}, tree="[0]") private Output containerName; /** * @return 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. * */ public Output containerName() { return this.containerName; } /** * 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. * */ @Export(name="dataShareId", refs={String.class}, tree="[0]") private Output dataShareId; /** * @return 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. * */ public Output dataShareId() { return this.dataShareId; } /** * The name of the Data Share Dataset. * */ @Export(name="displayName", refs={String.class}, tree="[0]") private Output displayName; /** * @return The name of the Data Share Dataset. * */ public Output displayName() { return this.displayName; } /** * 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. * */ @Export(name="filePath", refs={String.class}, tree="[0]") private Output filePath; /** * @return 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. * */ public Output> filePath() { return Codegen.optional(this.filePath); } /** * 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. * */ @Export(name="folderPath", refs={String.class}, tree="[0]") private Output folderPath; /** * @return 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. * */ public Output> folderPath() { return Codegen.optional(this.folderPath); } /** * 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. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return 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. * */ public Output name() { return this.name; } /** * A `storage_account` block as defined below. Changing this forces a new resource to be created. * */ @Export(name="storageAccount", refs={DatasetBlobStorageStorageAccount.class}, tree="[0]") private Output storageAccount; /** * @return A `storage_account` block as defined below. Changing this forces a new resource to be created. * */ public Output storageAccount() { return this.storageAccount; } /** * * @param name The _unique_ name of the resulting resource. */ public DatasetBlobStorage(java.lang.String name) { this(name, DatasetBlobStorageArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public DatasetBlobStorage(java.lang.String name, DatasetBlobStorageArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public DatasetBlobStorage(java.lang.String name, DatasetBlobStorageArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:datashare/datasetBlobStorage:DatasetBlobStorage", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private DatasetBlobStorage(java.lang.String name, Output id, @Nullable DatasetBlobStorageState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:datashare/datasetBlobStorage:DatasetBlobStorage", name, state, makeResourceOptions(options, id), false); } private static DatasetBlobStorageArgs makeArgs(DatasetBlobStorageArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? DatasetBlobStorageArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state * @param options Optional settings to control the behavior of the CustomResource. */ public static DatasetBlobStorage get(java.lang.String name, Output id, @Nullable DatasetBlobStorageState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new DatasetBlobStorage(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy