aws.networkmanager.Site
Explore with Pulumi AI
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)
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:
- Global
Network stringId - The ID of the Global Network to create the site in.
- Description string
- Description of the Site.
- Location
Site
Location - The site location as documented below.
- 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.
- Global
Network stringId - The ID of the Global Network to create the site in.
- Description string
- Description of the Site.
- Location
Site
Location Args - The site location as documented below.
- 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.
- global
Network StringId - The ID of the Global Network to create the site in.
- description String
- Description of the Site.
- location
Site
Location - The site location as documented below.
- 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.
- global
Network stringId - The ID of the Global Network to create the site in.
- description string
- Description of the Site.
- location
Site
Location - The site location as documented below.
- {[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_ strid - The ID of the Global Network to create the site in.
- description str
- Description of the Site.
- location
Site
Location Args - The site location as documented below.
- 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.
- global
Network StringId - 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.
- 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:
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.
- Arn string
- Site Amazon Resource Name (ARN)
- Description string
- Description of the Site.
- Global
Network stringId - The ID of the Global Network to create the site in.
- Location
Site
Location - The site location as documented below.
- 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. - Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- Arn string
- Site Amazon Resource Name (ARN)
- Description string
- Description of the Site.
- Global
Network stringId - The ID of the Global Network to create the site in.
- Location
Site
Location Args - The site location as documented below.
- 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. - map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- Site Amazon Resource Name (ARN)
- description String
- Description of the Site.
- global
Network StringId - The ID of the Global Network to create the site in.
- location
Site
Location - The site location as documented below.
- 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. - Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn string
- Site Amazon Resource Name (ARN)
- description string
- Description of the Site.
- global
Network stringId - The ID of the Global Network to create the site in.
- location
Site
Location - The site location as documented below.
- {[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. - {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn str
- Site Amazon Resource Name (ARN)
- description str
- Description of the Site.
- global_
network_ strid - The ID of the Global Network to create the site in.
- location
Site
Location Args - The site location as documented below.
- 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. - Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- Site Amazon Resource Name (ARN)
- description String
- Description of the Site.
- global
Network StringId - The ID of the Global Network to create the site in.
- location Property Map
- The site location as documented below.
- 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. - Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
Supporting Types
SiteLocation, SiteLocationArgs
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.