ShareFileArgs

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());
}
}

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

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)

Functions

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

Properties

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

Sets the file’s Content-Disposition header.

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

Specifies which content encodings have been applied to the file.

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

The MD5 sum of the file contents. Changing this forces a new resource to be created.

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

The content type of the share file. Defaults to application/octet-stream.

Link copied to clipboard
val metadata: Output<Map<String, String>>? = null

A mapping of metadata to assign to this file.

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

The name (or path) of the File that should be created within this File Share. Changing this forces a new resource to be created.

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

The storage share directory that you would like the file placed into. Changing this forces a new resource to be created. Defaults to "".

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

An absolute path to a file on the local system. Changing this forces a new resource to be created.

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

The Storage Share ID in which this file will be placed into. Changing this forces a new resource to be created.