1. Packages
  2. Unifi
  3. API Docs
  4. setting
  5. Country
Viewing docs for Unifi v0.2.0
published on Tuesday, Feb 17, 2026 by Pulumiverse
unifi logo
Viewing docs for Unifi v0.2.0
published on Tuesday, Feb 17, 2026 by Pulumiverse

    The unifi.setting.Country resource allows you to configure the country settings for your UniFi network.

    Example Usage

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

    Create Country Resource

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

    Constructor syntax

    new Country(name: string, args: CountryArgs, opts?: CustomResourceOptions);
    @overload
    def Country(resource_name: str,
                args: CountryArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Country(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                code: Optional[str] = None,
                site: Optional[str] = None)
    func NewCountry(ctx *Context, name string, args CountryArgs, opts ...ResourceOption) (*Country, error)
    public Country(string name, CountryArgs args, CustomResourceOptions? opts = null)
    public Country(String name, CountryArgs args)
    public Country(String name, CountryArgs args, CustomResourceOptions options)
    
    type: unifi:setting:Country
    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 CountryArgs
    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 CountryArgs
    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 CountryArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CountryArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CountryArgs
    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 countryResource = new Unifi.Setting.Country("countryResource", new()
    {
        Code = "string",
        Site = "string",
    });
    
    example, err := setting.NewCountry(ctx, "countryResource", &setting.CountryArgs{
    	Code: pulumi.String("string"),
    	Site: pulumi.String("string"),
    })
    
    var countryResource = new Country("countryResource", CountryArgs.builder()
        .code("string")
        .site("string")
        .build());
    
    country_resource = unifi.setting.Country("countryResource",
        code="string",
        site="string")
    
    const countryResource = new unifi.setting.Country("countryResource", {
        code: "string",
        site: "string",
    });
    
    type: unifi:setting:Country
    properties:
        code: string
        site: string
    

    Country 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 Country resource accepts the following input properties:

    Code string
    The country code to set for the UniFi site. The country code must be a valid ISO 3166-1 alpha-2 code.
    Site string
    The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
    Code string
    The country code to set for the UniFi site. The country code must be a valid ISO 3166-1 alpha-2 code.
    Site string
    The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
    code String
    The country code to set for the UniFi site. The country code must be a valid ISO 3166-1 alpha-2 code.
    site String
    The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
    code string
    The country code to set for the UniFi site. The country code must be a valid ISO 3166-1 alpha-2 code.
    site string
    The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
    code str
    The country code to set for the UniFi site. The country code must be a valid ISO 3166-1 alpha-2 code.
    site str
    The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
    code String
    The country code to set for the UniFi site. The country code must be a valid ISO 3166-1 alpha-2 code.
    site String
    The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.

    Outputs

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

    CodeNumeric int
    The numeric representation in ISO 3166-1 of the country code.
    Id string
    The provider-assigned unique ID for this managed resource.
    CodeNumeric int
    The numeric representation in ISO 3166-1 of the country code.
    Id string
    The provider-assigned unique ID for this managed resource.
    codeNumeric Integer
    The numeric representation in ISO 3166-1 of the country code.
    id String
    The provider-assigned unique ID for this managed resource.
    codeNumeric number
    The numeric representation in ISO 3166-1 of the country code.
    id string
    The provider-assigned unique ID for this managed resource.
    code_numeric int
    The numeric representation in ISO 3166-1 of the country code.
    id str
    The provider-assigned unique ID for this managed resource.
    codeNumeric Number
    The numeric representation in ISO 3166-1 of the country code.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Country Resource

    Get an existing Country 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?: CountryState, opts?: CustomResourceOptions): Country
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            code: Optional[str] = None,
            code_numeric: Optional[int] = None,
            site: Optional[str] = None) -> Country
    func GetCountry(ctx *Context, name string, id IDInput, state *CountryState, opts ...ResourceOption) (*Country, error)
    public static Country Get(string name, Input<string> id, CountryState? state, CustomResourceOptions? opts = null)
    public static Country get(String name, Output<String> id, CountryState state, CustomResourceOptions options)
    resources:  _:    type: unifi:setting:Country    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:
    Code string
    The country code to set for the UniFi site. The country code must be a valid ISO 3166-1 alpha-2 code.
    CodeNumeric int
    The numeric representation in ISO 3166-1 of the country code.
    Site string
    The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
    Code string
    The country code to set for the UniFi site. The country code must be a valid ISO 3166-1 alpha-2 code.
    CodeNumeric int
    The numeric representation in ISO 3166-1 of the country code.
    Site string
    The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
    code String
    The country code to set for the UniFi site. The country code must be a valid ISO 3166-1 alpha-2 code.
    codeNumeric Integer
    The numeric representation in ISO 3166-1 of the country code.
    site String
    The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
    code string
    The country code to set for the UniFi site. The country code must be a valid ISO 3166-1 alpha-2 code.
    codeNumeric number
    The numeric representation in ISO 3166-1 of the country code.
    site string
    The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
    code str
    The country code to set for the UniFi site. The country code must be a valid ISO 3166-1 alpha-2 code.
    code_numeric int
    The numeric representation in ISO 3166-1 of the country code.
    site str
    The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
    code String
    The country code to set for the UniFi site. The country code must be a valid ISO 3166-1 alpha-2 code.
    codeNumeric Number
    The numeric representation in ISO 3166-1 of the country code.
    site String
    The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.

    Package Details

    Repository
    unifi pulumiverse/pulumi-unifi
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the unifi Terraform Provider.
    unifi logo
    Viewing docs for Unifi v0.2.0
    published on Tuesday, Feb 17, 2026 by Pulumiverse
      Try Pulumi Cloud free. Your team will thank you.