1. Packages
  2. Netlify Provider
  3. API Docs
  4. getSites
netlify 0.2.2 published on Friday, Mar 7, 2025 by netlify

netlify.getSites

Explore with Pulumi AI

netlify logo
netlify 0.2.2 published on Friday, Mar 7, 2025 by netlify

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as netlify from "@pulumi/netlify";
    
    const team = netlify.getSites({
        teamSlug: "my-team-slug",
    });
    
    import pulumi
    import pulumi_netlify as netlify
    
    team = netlify.get_sites(team_slug="my-team-slug")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/netlify/netlify"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := netlify.GetSites(ctx, &netlify.GetSitesArgs{
    			TeamSlug: pulumi.StringRef("my-team-slug"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Netlify = Pulumi.Netlify;
    
    return await Deployment.RunAsync(() => 
    {
        var team = Netlify.GetSites.Invoke(new()
        {
            TeamSlug = "my-team-slug",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.netlify.NetlifyFunctions;
    import com.pulumi.netlify.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 team = NetlifyFunctions.getSites(GetSitesArgs.builder()
                .teamSlug("my-team-slug")
                .build());
    
        }
    }
    
    variables:
      team:
        fn::invoke:
          function: netlify:getSites
          arguments:
            teamSlug: my-team-slug
    

    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(team_slug: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetSitesResult
    def get_sites_output(team_slug: Optional[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: netlify:index/getSites:getSites
      arguments:
        # arguments dictionary

    The following arguments are supported:

    TeamSlug string
    Required if a default team was not configured in the provider configuration.
    TeamSlug string
    Required if a default team was not configured in the provider configuration.
    teamSlug String
    Required if a default team was not configured in the provider configuration.
    teamSlug string
    Required if a default team was not configured in the provider configuration.
    team_slug str
    Required if a default team was not configured in the provider configuration.
    teamSlug String
    Required if a default team was not configured in the provider configuration.

    getSites Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Sites List<GetSitesSite>
    TeamSlug string
    Required if a default team was not configured in the provider configuration.
    Id string
    The provider-assigned unique ID for this managed resource.
    Sites []GetSitesSite
    TeamSlug string
    Required if a default team was not configured in the provider configuration.
    id String
    The provider-assigned unique ID for this managed resource.
    sites List<GetSitesSite>
    teamSlug String
    Required if a default team was not configured in the provider configuration.
    id string
    The provider-assigned unique ID for this managed resource.
    sites GetSitesSite[]
    teamSlug string
    Required if a default team was not configured in the provider configuration.
    id str
    The provider-assigned unique ID for this managed resource.
    sites Sequence[GetSitesSite]
    team_slug str
    Required if a default team was not configured in the provider configuration.
    id String
    The provider-assigned unique ID for this managed resource.
    sites List<Property Map>
    teamSlug String
    Required if a default team was not configured in the provider configuration.

    Supporting Types

    GetSitesSite

    CustomDomain string
    DomainAliases List<string>
    Id string
    Name string
    TeamSlug string
    CustomDomain string
    DomainAliases []string
    Id string
    Name string
    TeamSlug string
    customDomain String
    domainAliases List<String>
    id String
    name String
    teamSlug String
    customDomain string
    domainAliases string[]
    id string
    name string
    teamSlug string
    custom_domain str
    domain_aliases Sequence[str]
    id str
    name str
    team_slug str
    customDomain String
    domainAliases List<String>
    id String
    name String
    teamSlug String

    Package Details

    Repository
    netlify netlify/terraform-provider-netlify
    License
    Notes
    This Pulumi package is based on the netlify Terraform Provider.
    netlify logo
    netlify 0.2.2 published on Friday, Mar 7, 2025 by netlify