ShareFile

class ShareFile : KotlinCustomResource

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

Properties

Link copied to clipboard

Sets the file’s Content-Disposition header.

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

Specifies which content encodings have been applied to the file.

Link copied to clipboard
val contentLength: Output<Int>

The length in bytes of the file content

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

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

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

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

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

A mapping of metadata to assign to this file.

Link copied to clipboard
val name: Output<String>

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>?

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 pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val source: Output<String>?

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>

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

Link copied to clipboard
val urn: Output<String>