1. Packages
  2. AWS
  3. API Docs
  4. networkmanager
  5. Site
AWS v6.55.0 published on Monday, Oct 7, 2024 by Pulumi

aws.networkmanager.Site

Explore with Pulumi AI

aws logo
AWS v6.55.0 published on Monday, Oct 7, 2024 by Pulumi

    Creates a site in a global network.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.networkmanager.GlobalNetwork("example", {});
    const exampleSite = new aws.networkmanager.Site("example", {globalNetworkId: example.id});
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.networkmanager.GlobalNetwork("example")
    example_site = aws.networkmanager.Site("example", global_network_id=example.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/networkmanager"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := networkmanager.NewGlobalNetwork(ctx, "example", nil)
    		if err != nil {
    			return err
    		}
    		_, err = networkmanager.NewSite(ctx, "example", &networkmanager.SiteArgs{
    			GlobalNetworkId: example.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.NetworkManager.GlobalNetwork("example");
    
        var exampleSite = new Aws.NetworkManager.Site("example", new()
        {
            GlobalNetworkId = example.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.networkmanager.GlobalNetwork;
    import com.pulumi.aws.networkmanager.Site;
    import com.pulumi.aws.networkmanager.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 example = new GlobalNetwork("example");
    
            var exampleSite = new Site("exampleSite", SiteArgs.builder()
                .globalNetworkId(example.id())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:networkmanager:GlobalNetwork
      exampleSite:
        type: aws:networkmanager:Site
        name: example
        properties:
          globalNetworkId: ${example.id}
    

    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,
             global_network_id: Optional[str] = None,
             description: Optional[str] = None,
             location: Optional[SiteLocationArgs] = None,
             tags: Optional[Mapping[str, 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: aws:networkmanager: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.

    Constructor example

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

    var siteResource = new Aws.NetworkManager.Site("siteResource", new()
    {
        GlobalNetworkId = "string",
        Description = "string",
        Location = new Aws.NetworkManager.Inputs.SiteLocationArgs
        {
            Address = "string",
            Latitude = "string",
            Longitude = "string",
        },
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := networkmanager.NewSite(ctx, "siteResource", &networkmanager.SiteArgs{
    	GlobalNetworkId: pulumi.String("string"),
    	Description:     pulumi.String("string"),
    	Location: &networkmanager.SiteLocationArgs{
    		Address:   pulumi.String("string"),
    		Latitude:  pulumi.String("string"),
    		Longitude: pulumi.String("string"),
    	},
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var siteResource = new Site("siteResource", SiteArgs.builder()
        .globalNetworkId("string")
        .description("string")
        .location(SiteLocationArgs.builder()
            .address("string")
            .latitude("string")
            .longitude("string")
            .build())
        .tags(Map.of("string", "string"))
        .build());
    
    site_resource = aws.networkmanager.Site("siteResource",
        global_network_id="string",
        description="string",
        location={
            "address": "string",
            "latitude": "string",
            "longitude": "string",
        },
        tags={
            "string": "string",
        })
    
    const siteResource = new aws.networkmanager.Site("siteResource", {
        globalNetworkId: "string",
        description: "string",
        location: {
            address: "string",
            latitude: "string",
            longitude: "string",
        },
        tags: {
            string: "string",
        },
    });
    
    type: aws:networkmanager:Site
    properties:
        description: string
        globalNetworkId: string
        location:
            address: string
            latitude: string
            longitude: string
        tags:
            string: 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:

    GlobalNetworkId string
    The ID of the Global Network to create the site in.
    Description string
    Description of the Site.
    Location SiteLocation
    The site location as documented below.
    Tags Dictionary<string, string>
    Key-value tags for the Site. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    GlobalNetworkId string
    The ID of the Global Network to create the site in.
    Description string
    Description of the Site.
    Location SiteLocationArgs
    The site location as documented below.
    Tags map[string]string
    Key-value tags for the Site. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    globalNetworkId String
    The ID of the Global Network to create the site in.
    description String
    Description of the Site.
    location SiteLocation
    The site location as documented below.
    tags Map<String,String>
    Key-value tags for the Site. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    globalNetworkId string
    The ID of the Global Network to create the site in.
    description string
    Description of the Site.
    location SiteLocation
    The site location as documented below.
    tags {[key: string]: string}
    Key-value tags for the Site. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    global_network_id str
    The ID of the Global Network to create the site in.
    description str
    Description of the Site.
    location SiteLocationArgs
    The site location as documented below.
    tags Mapping[str, str]
    Key-value tags for the Site. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    globalNetworkId String
    The ID of the Global Network to create the site in.
    description String
    Description of the Site.
    location Property Map
    The site location as documented below.
    tags Map<String>
    Key-value tags for the Site. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    Outputs

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

    Arn string
    Site Amazon Resource Name (ARN)
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Arn string
    Site Amazon Resource Name (ARN)
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    Site Amazon Resource Name (ARN)
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn string
    Site Amazon Resource Name (ARN)
    id string
    The provider-assigned unique ID for this managed resource.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn str
    Site Amazon Resource Name (ARN)
    id str
    The provider-assigned unique ID for this managed resource.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    Site Amazon Resource Name (ARN)
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    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,
            arn: Optional[str] = None,
            description: Optional[str] = None,
            global_network_id: Optional[str] = None,
            location: Optional[SiteLocationArgs] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, 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:
    Arn string
    Site Amazon Resource Name (ARN)
    Description string
    Description of the Site.
    GlobalNetworkId string
    The ID of the Global Network to create the site in.
    Location SiteLocation
    The site location as documented below.
    Tags Dictionary<string, string>
    Key-value tags for the Site. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Arn string
    Site Amazon Resource Name (ARN)
    Description string
    Description of the Site.
    GlobalNetworkId string
    The ID of the Global Network to create the site in.
    Location SiteLocationArgs
    The site location as documented below.
    Tags map[string]string
    Key-value tags for the Site. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    Site Amazon Resource Name (ARN)
    description String
    Description of the Site.
    globalNetworkId String
    The ID of the Global Network to create the site in.
    location SiteLocation
    The site location as documented below.
    tags Map<String,String>
    Key-value tags for the Site. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn string
    Site Amazon Resource Name (ARN)
    description string
    Description of the Site.
    globalNetworkId string
    The ID of the Global Network to create the site in.
    location SiteLocation
    The site location as documented below.
    tags {[key: string]: string}
    Key-value tags for the Site. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn str
    Site Amazon Resource Name (ARN)
    description str
    Description of the Site.
    global_network_id str
    The ID of the Global Network to create the site in.
    location SiteLocationArgs
    The site location as documented below.
    tags Mapping[str, str]
    Key-value tags for the Site. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    Site Amazon Resource Name (ARN)
    description String
    Description of the Site.
    globalNetworkId String
    The ID of the Global Network to create the site in.
    location Property Map
    The site location as documented below.
    tags Map<String>
    Key-value tags for the Site. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Supporting Types

    SiteLocation, SiteLocationArgs

    Address string
    Address of the location.
    Latitude string
    Latitude of the location.
    Longitude string
    Longitude of the location.
    Address string
    Address of the location.
    Latitude string
    Latitude of the location.
    Longitude string
    Longitude of the location.
    address String
    Address of the location.
    latitude String
    Latitude of the location.
    longitude String
    Longitude of the location.
    address string
    Address of the location.
    latitude string
    Latitude of the location.
    longitude string
    Longitude of the location.
    address str
    Address of the location.
    latitude str
    Latitude of the location.
    longitude str
    Longitude of the location.
    address String
    Address of the location.
    latitude String
    Latitude of the location.
    longitude String
    Longitude of the location.

    Import

    Using pulumi import, import aws_networkmanager_site using the site ARN. For example:

    $ pulumi import aws:networkmanager/site:Site example arn:aws:networkmanager::123456789012:site/global-network-0d47f6t230mz46dy4/site-444555aaabbb11223
    

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

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.55.0 published on Monday, Oct 7, 2024 by Pulumi