1. Packages
  2. Avi Provider
  3. API Docs
  4. Fileservice
avi 31.1.1 published on Monday, Apr 14, 2025 by vmware

avi.Fileservice

Explore with Pulumi AI

avi logo
avi 31.1.1 published on Monday, Apr 14, 2025 by vmware

    The Fileservice resource allows the download and upload of files

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as avi from "@pulumi/avi";
    
    const foo = new avi.Fileservice("foo", {
        uri: "/uploads",
        localFile: "/file/path",
        upload: True,
    });
    
    import pulumi
    import pulumi_avi as avi
    
    foo = avi.Fileservice("foo",
        uri="/uploads",
        local_file="/file/path",
        upload=true)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/avi/v31/avi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := avi.NewFileservice(ctx, "foo", &avi.FileserviceArgs{
    			Uri:       pulumi.String("/uploads"),
    			LocalFile: pulumi.String("/file/path"),
    			Upload:    pulumi.Any(True),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Avi = Pulumi.Avi;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = new Avi.Fileservice("foo", new()
        {
            Uri = "/uploads",
            LocalFile = "/file/path",
            Upload = True,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.avi.Fileservice;
    import com.pulumi.avi.FileserviceArgs;
    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 foo = new Fileservice("foo", FileserviceArgs.builder()
                .uri("/uploads")
                .localFile("/file/path")
                .upload(True)
                .build());
    
        }
    }
    
    resources:
      foo:
        type: avi:Fileservice
        properties:
          uri: /uploads
          localFile: /file/path
          upload: ${True}
    

    Create Fileservice Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Fileservice(name: string, args: FileserviceArgs, opts?: CustomResourceOptions);
    @overload
    def Fileservice(resource_name: str,
                    args: FileserviceArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def Fileservice(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    local_file: Optional[str] = None,
                    uri: Optional[str] = None,
                    fileservice_id: Optional[str] = None,
                    upload: Optional[bool] = None)
    func NewFileservice(ctx *Context, name string, args FileserviceArgs, opts ...ResourceOption) (*Fileservice, error)
    public Fileservice(string name, FileserviceArgs args, CustomResourceOptions? opts = null)
    public Fileservice(String name, FileserviceArgs args)
    public Fileservice(String name, FileserviceArgs args, CustomResourceOptions options)
    
    type: avi:Fileservice
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args FileserviceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args FileserviceArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args FileserviceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args FileserviceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args FileserviceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var fileserviceResource = new Avi.Fileservice("fileserviceResource", new()
    {
        LocalFile = "string",
        Uri = "string",
        FileserviceId = "string",
        Upload = false,
    });
    
    example, err := avi.NewFileservice(ctx, "fileserviceResource", &avi.FileserviceArgs{
    	LocalFile:     pulumi.String("string"),
    	Uri:           pulumi.String("string"),
    	FileserviceId: pulumi.String("string"),
    	Upload:        pulumi.Bool(false),
    })
    
    var fileserviceResource = new Fileservice("fileserviceResource", FileserviceArgs.builder()
        .localFile("string")
        .uri("string")
        .fileserviceId("string")
        .upload(false)
        .build());
    
    fileservice_resource = avi.Fileservice("fileserviceResource",
        local_file="string",
        uri="string",
        fileservice_id="string",
        upload=False)
    
    const fileserviceResource = new avi.Fileservice("fileserviceResource", {
        localFile: "string",
        uri: "string",
        fileserviceId: "string",
        upload: false,
    });
    
    type: avi:Fileservice
    properties:
        fileserviceId: string
        localFile: string
        upload: false
        uri: string
    

    Fileservice Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Fileservice resource accepts the following input properties:

    LocalFile string
    argument_description.
    Uri string
    argument_description.
    FileserviceId string
    Upload bool
    argument_description.
    LocalFile string
    argument_description.
    Uri string
    argument_description.
    FileserviceId string
    Upload bool
    argument_description.
    localFile String
    argument_description.
    uri String
    argument_description.
    fileserviceId String
    upload Boolean
    argument_description.
    localFile string
    argument_description.
    uri string
    argument_description.
    fileserviceId string
    upload boolean
    argument_description.
    local_file str
    argument_description.
    uri str
    argument_description.
    fileservice_id str
    upload bool
    argument_description.
    localFile String
    argument_description.
    uri String
    argument_description.
    fileserviceId String
    upload Boolean
    argument_description.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Fileservice resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Fileservice Resource

    Get an existing Fileservice resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: FileserviceState, opts?: CustomResourceOptions): Fileservice
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            fileservice_id: Optional[str] = None,
            local_file: Optional[str] = None,
            upload: Optional[bool] = None,
            uri: Optional[str] = None) -> Fileservice
    func GetFileservice(ctx *Context, name string, id IDInput, state *FileserviceState, opts ...ResourceOption) (*Fileservice, error)
    public static Fileservice Get(string name, Input<string> id, FileserviceState? state, CustomResourceOptions? opts = null)
    public static Fileservice get(String name, Output<String> id, FileserviceState state, CustomResourceOptions options)
    resources:  _:    type: avi:Fileservice    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    FileserviceId string
    LocalFile string
    argument_description.
    Upload bool
    argument_description.
    Uri string
    argument_description.
    FileserviceId string
    LocalFile string
    argument_description.
    Upload bool
    argument_description.
    Uri string
    argument_description.
    fileserviceId String
    localFile String
    argument_description.
    upload Boolean
    argument_description.
    uri String
    argument_description.
    fileserviceId string
    localFile string
    argument_description.
    upload boolean
    argument_description.
    uri string
    argument_description.
    fileservice_id str
    local_file str
    argument_description.
    upload bool
    argument_description.
    uri str
    argument_description.
    fileserviceId String
    localFile String
    argument_description.
    upload Boolean
    argument_description.
    uri String
    argument_description.

    Package Details

    Repository
    avi vmware/terraform-provider-avi
    License
    Notes
    This Pulumi package is based on the avi Terraform Provider.
    avi logo
    avi 31.1.1 published on Monday, Apr 14, 2025 by vmware