Share File Args
data class ShareFileArgs(val contentDisposition: Output<String>? = null, val contentEncoding: Output<String>? = null, val contentMd5: Output<String>? = null, val contentType: Output<String>? = null, val metadata: Output<Map<String, String>>? = null, val name: Output<String>? = null, val path: Output<String>? = null, val source: Output<String>? = null, val storageShareId: Output<String>? = null) : ConvertibleToJava<ShareFileArgs>
Manages a File within an Azure Storage File Share.
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.storage.Account;
import com.pulumi.azure.storage.AccountArgs;
import com.pulumi.azure.storage.Share;
import com.pulumi.azure.storage.ShareArgs;
import com.pulumi.azure.storage.ShareFile;
import com.pulumi.azure.storage.ShareFileArgs;
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()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.accountTier("Standard")
.accountReplicationType("LRS")
.build());
var exampleShare = new Share("exampleShare", ShareArgs.builder()
.storageAccountName(exampleAccount.name())
.quota(50)
.build());
var exampleShareFile = new ShareFile("exampleShareFile", ShareFileArgs.builder()
.storageShareId(exampleShare.id())
.source("some-local-file.zip")
.build());
}
}
Content copied to clipboard
Import
Directories within an Azure Storage File Share can be imported using the resource id
, e.g.
$ pulumi import azure:storage/shareFile:ShareFile example https://account1.file.core.windows.net/share1/file1
Content copied to clipboard
Constructors
Link copied to clipboard
fun ShareFileArgs(contentDisposition: Output<String>? = null, contentEncoding: Output<String>? = null, contentMd5: Output<String>? = null, contentType: Output<String>? = null, metadata: Output<Map<String, String>>? = null, name: Output<String>? = null, path: Output<String>? = null, source: Output<String>? = null, storageShareId: Output<String>? = null)