1. Packages
  2. Unifi
  3. API Docs
  4. Site
Unifi v0.0.3 published on Monday, Dec 5, 2022 by Pulumiverse

unifi.Site

Explore with Pulumi AI

unifi logo
Unifi v0.0.3 published on Monday, Dec 5, 2022 by Pulumiverse

    unifi.Site manages Unifi sites

    Example Usage

    using System.Collections.Generic;
    using Pulumi;
    using Unifi = Pulumiverse.Unifi;
    
    return await Deployment.RunAsync(() => 
    {
        var mysite = new Unifi.Site("mysite", new()
        {
            Description = "mysite",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-unifi/sdk/go/unifi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := unifi.NewSite(ctx, "mysite", &unifi.SiteArgs{
    			Description: pulumi.String("mysite"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.unifi.Site;
    import com.pulumi.unifi.SiteArgs;
    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 mysite = new Site("mysite", SiteArgs.builder()        
                .description("mysite")
                .build());
    
        }
    }
    
    import pulumi
    import pulumiverse_unifi as unifi
    
    mysite = unifi.Site("mysite", description="mysite")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as unifi from "@pulumiverse/unifi";
    
    const mysite = new unifi.Site("mysite", {description: "mysite"});
    
    resources:
      mysite:
        type: unifi:Site
        properties:
          description: mysite
    

    Create Site Resource

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

    Constructor syntax

    new Site(name: string, args: SiteArgs, opts?: CustomResourceOptions);
    @overload
    def Site(resource_name: str,
             args: SiteArgs,
             opts: Optional[ResourceOptions] = None)
    
    @overload
    def Site(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             description: Optional[str] = None)
    func NewSite(ctx *Context, name string, args SiteArgs, opts ...ResourceOption) (*Site, error)
    public Site(string name, SiteArgs args, CustomResourceOptions? opts = null)
    public Site(String name, SiteArgs args)
    public Site(String name, SiteArgs args, CustomResourceOptions options)
    
    type: unifi:Site
    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 SiteArgs
    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 SiteArgs
    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 SiteArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SiteArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SiteArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

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

    var siteResource = new Unifi.Site("siteResource", new()
    {
        Description = "string",
    });
    
    example, err := unifi.NewSite(ctx, "siteResource", &unifi.SiteArgs{
    	Description: pulumi.String("string"),
    })
    
    var siteResource = new Site("siteResource", SiteArgs.builder()        
        .description("string")
        .build());
    
    site_resource = unifi.Site("siteResource", description="string")
    
    const siteResource = new unifi.Site("siteResource", {description: "string"});
    
    type: unifi:Site
    properties:
        description: string
    

    Site Resource Properties

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

    Inputs

    The Site resource accepts the following input properties:

    Description string
    The description of the site.
    Description string
    The description of the site.
    description String
    The description of the site.
    description string
    The description of the site.
    description str
    The description of the site.
    description String
    The description of the site.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the site.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the site.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the site.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The name of the site.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The name of the site.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the site.

    Look up Existing Site Resource

    Get an existing Site 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?: SiteState, opts?: CustomResourceOptions): Site
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            name: Optional[str] = None) -> Site
    func GetSite(ctx *Context, name string, id IDInput, state *SiteState, opts ...ResourceOption) (*Site, error)
    public static Site Get(string name, Input<string> id, SiteState? state, CustomResourceOptions? opts = null)
    public static Site get(String name, Output<String> id, SiteState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    Description string
    The description of the site.
    Name string
    The name of the site.
    Description string
    The description of the site.
    Name string
    The name of the site.
    description String
    The description of the site.
    name String
    The name of the site.
    description string
    The description of the site.
    name string
    The name of the site.
    description str
    The description of the site.
    name str
    The name of the site.
    description String
    The description of the site.
    name String
    The name of the site.

    Import

    import using the API/UI ID

     $ pulumi import unifi:index/site:Site mysite 5fe6261995fe130013456a36
    

    import using the name (short ID)

     $ pulumi import unifi:index/site:Site mysite vq98kwez
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    unifi pulumiverse/pulumi-unifi
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the unifi Terraform Provider.
    unifi logo
    Unifi v0.0.3 published on Monday, Dec 5, 2022 by Pulumiverse