netlify 0.2.2 published on Friday, Mar 7, 2025 by netlify
netlify.getSite
Explore with Pulumi AI
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:
getSite Result
The following output properties are available:
- Custom
Domain string - Domain
Aliases List<string> - Git
Deploy stringKey - Id string
- The ID of this resource.
- Name string
- Team
Slug string - Required if name is specified and a default team was not configured in the provider configuration.
- Custom
Domain string - Domain
Aliases []string - Git
Deploy stringKey - Id string
- The ID of this resource.
- Name string
- Team
Slug string - Required if name is specified and a default team was not configured in the provider configuration.
- custom
Domain String - domain
Aliases List<String> - git
Deploy StringKey - id String
- The ID of this resource.
- name String
- team
Slug String - Required if name is specified and a default team was not configured in the provider configuration.
- custom
Domain string - domain
Aliases string[] - git
Deploy stringKey - id string
- The ID of this resource.
- name string
- team
Slug 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_ strkey - 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.
- custom
Domain String - domain
Aliases List<String> - git
Deploy StringKey - id String
- The ID of this resource.
- name String
- team
Slug 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.