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

netlify.getSite

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 blog = netlify.getSite({
        id: "12345667-0000-0000-0000-abcdef012345",
    });
    
    import pulumi
    import pulumi_netlify as netlify
    
    blog = netlify.get_site(id="12345667-0000-0000-0000-abcdef012345")
    
    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.GetSite(ctx, &netlify.GetSiteArgs{
    			Id: pulumi.StringRef("12345667-0000-0000-0000-abcdef012345"),
    		}, 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 blog = Netlify.GetSite.Invoke(new()
        {
            Id = "12345667-0000-0000-0000-abcdef012345",
        });
    
    });
    
    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.GetSiteArgs;
    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 blog = NetlifyFunctions.getSite(GetSiteArgs.builder()
                .id("12345667-0000-0000-0000-abcdef012345")
                .build());
    
        }
    }
    
    variables:
      blog:
        fn::invoke:
          function: netlify:getSite
          arguments:
            id: 12345667-0000-0000-0000-abcdef012345
    

    Using getSite

    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 getSite(args: GetSiteArgs, opts?: InvokeOptions): Promise<GetSiteResult>
    function getSiteOutput(args: GetSiteOutputArgs, opts?: InvokeOptions): Output<GetSiteResult>
    def get_site(id: Optional[str] = None,
                 name: Optional[str] = None,
                 team_slug: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetSiteResult
    def get_site_output(id: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 team_slug: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetSiteResult]
    func GetSite(ctx *Context, args *GetSiteArgs, opts ...InvokeOption) (*GetSiteResult, error)
    func GetSiteOutput(ctx *Context, args *GetSiteOutputArgs, opts ...InvokeOption) GetSiteResultOutput

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

    public static class GetSite 
    {
        public static Task<GetSiteResult> InvokeAsync(GetSiteArgs args, InvokeOptions? opts = null)
        public static Output<GetSiteResult> Invoke(GetSiteInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSiteResult> getSite(GetSiteArgs args, InvokeOptions options)
    public static Output<GetSiteResult> getSite(GetSiteArgs args, InvokeOptions options)
    
    fn::invoke:
      function: netlify:index/getSite:getSite
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    The ID of this resource.
    Name string
    TeamSlug string
    Required if name is specified and a default team was not configured in the provider configuration.
    Id string
    The ID of this resource.
    Name string
    TeamSlug string
    Required if name is specified and a default team was not configured in the provider configuration.
    id String
    The ID of this resource.
    name String
    teamSlug String
    Required if name is specified and a default team was not configured in the provider configuration.
    id string
    The ID of this resource.
    name string
    teamSlug string
    Required if name is specified and a default team was not configured in the provider configuration.
    id str
    The ID of this resource.
    name str
    team_slug str
    Required if name is specified and a default team was not configured in the provider configuration.
    id String
    The ID of this resource.
    name String
    teamSlug String
    Required if name is specified and a default team was not configured in the provider configuration.

    getSite Result

    The following output properties are available:

    CustomDomain string
    DomainAliases List<string>
    GitDeployKey string
    Id string
    The ID of this resource.
    Name string
    TeamSlug string
    Required if name is specified and a default team was not configured in the provider configuration.
    CustomDomain string
    DomainAliases []string
    GitDeployKey string
    Id string
    The ID of this resource.
    Name string
    TeamSlug string
    Required if name is specified and a default team was not configured in the provider configuration.
    customDomain String
    domainAliases List<String>
    gitDeployKey String
    id String
    The ID of this resource.
    name String
    teamSlug String
    Required if name is specified and a default team was not configured in the provider configuration.
    customDomain string
    domainAliases string[]
    gitDeployKey string
    id string
    The ID of this resource.
    name string
    teamSlug string
    Required if name is specified and a default team was not configured in the provider configuration.
    custom_domain str
    domain_aliases Sequence[str]
    git_deploy_key str
    id str
    The ID of this resource.
    name str
    team_slug str
    Required if name is specified and a default team was not configured in the provider configuration.
    customDomain String
    domainAliases List<String>
    gitDeployKey String
    id String
    The ID of this resource.
    name String
    teamSlug String
    Required if name is specified and a default team was not configured in the provider configuration.

    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