1. Packages
  2. AWS
  3. API Docs
  4. networkmanager
  5. getSites
AWS v7.11.0 published on Wednesday, Nov 5, 2025 by Pulumi

aws.networkmanager.getSites

Start a Neo task
Explain and create an aws.networkmanager.getSites resource
aws logo
AWS v7.11.0 published on Wednesday, Nov 5, 2025 by Pulumi

    Provides details about existing Network Manager sites.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = aws.networkmanager.getSites({
        globalNetworkId: globalNetworkId,
        tags: {
            Env: "test",
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.networkmanager.get_sites(global_network_id=global_network_id,
        tags={
            "Env": "test",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/networkmanager"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := networkmanager.GetSites(ctx, &networkmanager.GetSitesArgs{
    			GlobalNetworkId: globalNetworkId,
    			Tags: map[string]interface{}{
    				"Env": "test",
    			},
    		}, nil)
    		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 = Aws.NetworkManager.GetSites.Invoke(new()
        {
            GlobalNetworkId = globalNetworkId,
            Tags = 
            {
                { "Env", "test" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.networkmanager.NetworkmanagerFunctions;
    import com.pulumi.aws.networkmanager.inputs.GetSitesArgs;
    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) {
            final var example = NetworkmanagerFunctions.getSites(GetSitesArgs.builder()
                .globalNetworkId(globalNetworkId)
                .tags(Map.of("Env", "test"))
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: aws:networkmanager:getSites
          arguments:
            globalNetworkId: ${globalNetworkId}
            tags:
              Env: test
    

    Using getSites

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getSites(args: GetSitesArgs, opts?: InvokeOptions): Promise<GetSitesResult>
    function getSitesOutput(args: GetSitesOutputArgs, opts?: InvokeOptions): Output<GetSitesResult>
    def get_sites(global_network_id: Optional[str] = None,
                  tags: Optional[Mapping[str, str]] = None,
                  opts: Optional[InvokeOptions] = None) -> GetSitesResult
    def get_sites_output(global_network_id: Optional[pulumi.Input[str]] = None,
                  tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetSitesResult]
    func GetSites(ctx *Context, args *GetSitesArgs, opts ...InvokeOption) (*GetSitesResult, error)
    func GetSitesOutput(ctx *Context, args *GetSitesOutputArgs, opts ...InvokeOption) GetSitesResultOutput

    > Note: This function is named GetSites in the Go SDK.

    public static class GetSites 
    {
        public static Task<GetSitesResult> InvokeAsync(GetSitesArgs args, InvokeOptions? opts = null)
        public static Output<GetSitesResult> Invoke(GetSitesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSitesResult> getSites(GetSitesArgs args, InvokeOptions options)
    public static Output<GetSitesResult> getSites(GetSitesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: aws:networkmanager/getSites:getSites
      arguments:
        # arguments dictionary

    The following arguments are supported:

    GlobalNetworkId string
    ID of the Global Network of the sites to retrieve.
    Tags Dictionary<string, string>
    Restricts the list to the sites with these tags.
    GlobalNetworkId string
    ID of the Global Network of the sites to retrieve.
    Tags map[string]string
    Restricts the list to the sites with these tags.
    globalNetworkId String
    ID of the Global Network of the sites to retrieve.
    tags Map<String,String>
    Restricts the list to the sites with these tags.
    globalNetworkId string
    ID of the Global Network of the sites to retrieve.
    tags {[key: string]: string}
    Restricts the list to the sites with these tags.
    global_network_id str
    ID of the Global Network of the sites to retrieve.
    tags Mapping[str, str]
    Restricts the list to the sites with these tags.
    globalNetworkId String
    ID of the Global Network of the sites to retrieve.
    tags Map<String>
    Restricts the list to the sites with these tags.

    getSites Result

    The following output properties are available:

    GlobalNetworkId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    IDs of the sites.
    Tags Dictionary<string, string>
    GlobalNetworkId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    IDs of the sites.
    Tags map[string]string
    globalNetworkId String
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    IDs of the sites.
    tags Map<String,String>
    globalNetworkId string
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    IDs of the sites.
    tags {[key: string]: string}
    global_network_id str
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    IDs of the sites.
    tags Mapping[str, str]
    globalNetworkId String
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    IDs of the sites.
    tags Map<String>

    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 v7.11.0 published on Wednesday, Nov 5, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate