Alibaba Cloud v3.88.1 published on Saturday, Nov 8, 2025 by Pulumi
Alibaba Cloud v3.88.1 published on Saturday, Nov 8, 2025 by Pulumi
This data source provides Esa Site available to the user.What is Site
NOTE: Available since v1.244.0.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const defaultIEoDfU = new alicloud.esa.RatePlanInstance("defaultIEoDfU", {
type: "NS",
autoRenew: true,
period: 1,
paymentType: "Subscription",
coverage: "overseas",
autoPay: true,
planName: "basic",
});
const defaultSite = new alicloud.esa.Site("default", {
siteName: "bcd.com",
coverage: "overseas",
accessType: "NS",
instanceId: defaultIEoDfU.id,
});
const _default = alicloud.esa.getSitesOutput({
ids: [defaultSite.id],
nameRegex: defaultSite.siteName,
siteName: "bcd.com",
});
export const alicloudEsaSiteExampleId = _default.apply(_default => _default.sites?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
default_i_eo_df_u = alicloud.esa.RatePlanInstance("defaultIEoDfU",
type="NS",
auto_renew=True,
period=1,
payment_type="Subscription",
coverage="overseas",
auto_pay=True,
plan_name="basic")
default_site = alicloud.esa.Site("default",
site_name="bcd.com",
coverage="overseas",
access_type="NS",
instance_id=default_i_eo_df_u.id)
default = alicloud.esa.get_sites_output(ids=[default_site.id],
name_regex=default_site.site_name,
site_name="bcd.com")
pulumi.export("alicloudEsaSiteExampleId", default.sites[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/esa"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "terraform-example";
if param := cfg.Get("name"); param != ""{
name = param
}
defaultIEoDfU, err := esa.NewRatePlanInstance(ctx, "defaultIEoDfU", &esa.RatePlanInstanceArgs{
Type: pulumi.String("NS"),
AutoRenew: pulumi.Bool(true),
Period: pulumi.Int(1),
PaymentType: pulumi.String("Subscription"),
Coverage: pulumi.String("overseas"),
AutoPay: pulumi.Bool(true),
PlanName: pulumi.String("basic"),
})
if err != nil {
return err
}
defaultSite, err := esa.NewSite(ctx, "default", &esa.SiteArgs{
SiteName: pulumi.String("bcd.com"),
Coverage: pulumi.String("overseas"),
AccessType: pulumi.String("NS"),
InstanceId: defaultIEoDfU.ID(),
})
if err != nil {
return err
}
_default := esa.GetSitesOutput(ctx, esa.GetSitesOutputArgs{
Ids: pulumi.StringArray{
defaultSite.ID(),
},
NameRegex: defaultSite.SiteName,
SiteName: pulumi.String("bcd.com"),
}, nil);
ctx.Export("alicloudEsaSiteExampleId", _default.ApplyT(func(_default esa.GetSitesResult) (*int, error) {
return &default.Sites[0].Id, nil
}).(pulumi.IntPtrOutput))
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var defaultIEoDfU = new AliCloud.Esa.RatePlanInstance("defaultIEoDfU", new()
{
Type = "NS",
AutoRenew = true,
Period = 1,
PaymentType = "Subscription",
Coverage = "overseas",
AutoPay = true,
PlanName = "basic",
});
var defaultSite = new AliCloud.Esa.Site("default", new()
{
SiteName = "bcd.com",
Coverage = "overseas",
AccessType = "NS",
InstanceId = defaultIEoDfU.Id,
});
var @default = AliCloud.Esa.GetSites.Invoke(new()
{
Ids = new[]
{
defaultSite.Id,
},
NameRegex = defaultSite.SiteName,
SiteName = "bcd.com",
});
return new Dictionary<string, object?>
{
["alicloudEsaSiteExampleId"] = @default.Apply(@default => @default.Apply(getSitesResult => getSitesResult.Sites[0]?.Id)),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.esa.RatePlanInstance;
import com.pulumi.alicloud.esa.RatePlanInstanceArgs;
import com.pulumi.alicloud.esa.Site;
import com.pulumi.alicloud.esa.SiteArgs;
import com.pulumi.alicloud.esa.EsaFunctions;
import com.pulumi.alicloud.esa.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 config = ctx.config();
final var name = config.get("name").orElse("terraform-example");
var defaultIEoDfU = new RatePlanInstance("defaultIEoDfU", RatePlanInstanceArgs.builder()
.type("NS")
.autoRenew(true)
.period(1)
.paymentType("Subscription")
.coverage("overseas")
.autoPay(true)
.planName("basic")
.build());
var defaultSite = new Site("defaultSite", SiteArgs.builder()
.siteName("bcd.com")
.coverage("overseas")
.accessType("NS")
.instanceId(defaultIEoDfU.id())
.build());
final var default = EsaFunctions.getSites(GetSitesArgs.builder()
.ids(defaultSite.id())
.nameRegex(defaultSite.siteName())
.siteName("bcd.com")
.build());
ctx.export("alicloudEsaSiteExampleId", default_.applyValue(_default_ -> _default_.sites()[0].id()));
}
}
configuration:
name:
type: string
default: terraform-example
resources:
defaultIEoDfU:
type: alicloud:esa:RatePlanInstance
properties:
type: NS
autoRenew: true
period: '1'
paymentType: Subscription
coverage: overseas
autoPay: true
planName: basic
defaultSite:
type: alicloud:esa:Site
name: default
properties:
siteName: bcd.com
coverage: overseas
accessType: NS
instanceId: ${defaultIEoDfU.id}
variables:
default:
fn::invoke:
function: alicloud:esa:getSites
arguments:
ids:
- ${defaultSite.id}
nameRegex: ${defaultSite.siteName}
siteName: bcd.com
outputs:
alicloudEsaSiteExampleId: ${default.sites[0].id}
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(access_type: Optional[str] = None,
coverage: Optional[str] = None,
ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
only_enterprise: Optional[bool] = None,
output_file: Optional[str] = None,
page_number: Optional[int] = None,
page_size: Optional[int] = None,
plan_subscribe_type: Optional[str] = None,
resource_group_id: Optional[str] = None,
site_name: Optional[str] = None,
site_search_type: Optional[str] = None,
status: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
opts: Optional[InvokeOptions] = None) -> GetSitesResult
def get_sites_output(access_type: Optional[pulumi.Input[str]] = None,
coverage: Optional[pulumi.Input[str]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
only_enterprise: Optional[pulumi.Input[bool]] = None,
output_file: Optional[pulumi.Input[str]] = None,
page_number: Optional[pulumi.Input[int]] = None,
page_size: Optional[pulumi.Input[int]] = None,
plan_subscribe_type: Optional[pulumi.Input[str]] = None,
resource_group_id: Optional[pulumi.Input[str]] = None,
site_name: Optional[pulumi.Input[str]] = None,
site_search_type: Optional[pulumi.Input[str]] = None,
status: 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: alicloud:esa/getSites:getSites
arguments:
# arguments dictionaryThe following arguments are supported:
- Access
Type string - Access type. Value:-NS: Managed access via NS.-CNAME: access through CNAME.
- Coverage string
- Acceleration area
- Ids List<string>
- A list of Site IDs.
- Name
Regex string - A regex string to filter results by Group Metric Rule name.
- Only
Enterprise bool - Only the Enterprise version, pass true when the table only queries the enterprise version of the site.
- Output
File string - File name where to save data source results (after running
pulumi preview). - Page
Number int - Current page number.
- Page
Size int - Number of records per page.
- Plan
Subscribe stringType - Package subscription type. Value:-basicplan: Basic version.-standardplan: Standard version.-advancedplan: Advanced version.-enterpriseplan: Enterprise Edition.
- Resource
Group stringId - The ID of the resource group
- Site
Name string - Site Name
- Site
Search stringType - The search match pattern for the site name. The default value is exact match. Valid values:-prefix: matches the prefix.-suffix: The suffix matches.-exact: exact match.-fuzzy: fuzzy match.
- Status string
- The status of the resource
- Dictionary<string, string>
- Resource tags
- Access
Type string - Access type. Value:-NS: Managed access via NS.-CNAME: access through CNAME.
- Coverage string
- Acceleration area
- Ids []string
- A list of Site IDs.
- Name
Regex string - A regex string to filter results by Group Metric Rule name.
- Only
Enterprise bool - Only the Enterprise version, pass true when the table only queries the enterprise version of the site.
- Output
File string - File name where to save data source results (after running
pulumi preview). - Page
Number int - Current page number.
- Page
Size int - Number of records per page.
- Plan
Subscribe stringType - Package subscription type. Value:-basicplan: Basic version.-standardplan: Standard version.-advancedplan: Advanced version.-enterpriseplan: Enterprise Edition.
- Resource
Group stringId - The ID of the resource group
- Site
Name string - Site Name
- Site
Search stringType - The search match pattern for the site name. The default value is exact match. Valid values:-prefix: matches the prefix.-suffix: The suffix matches.-exact: exact match.-fuzzy: fuzzy match.
- Status string
- The status of the resource
- map[string]string
- Resource tags
- access
Type String - Access type. Value:-NS: Managed access via NS.-CNAME: access through CNAME.
- coverage String
- Acceleration area
- ids List<String>
- A list of Site IDs.
- name
Regex String - A regex string to filter results by Group Metric Rule name.
- only
Enterprise Boolean - Only the Enterprise version, pass true when the table only queries the enterprise version of the site.
- output
File String - File name where to save data source results (after running
pulumi preview). - page
Number Integer - Current page number.
- page
Size Integer - Number of records per page.
- plan
Subscribe StringType - Package subscription type. Value:-basicplan: Basic version.-standardplan: Standard version.-advancedplan: Advanced version.-enterpriseplan: Enterprise Edition.
- resource
Group StringId - The ID of the resource group
- site
Name String - Site Name
- site
Search StringType - The search match pattern for the site name. The default value is exact match. Valid values:-prefix: matches the prefix.-suffix: The suffix matches.-exact: exact match.-fuzzy: fuzzy match.
- status String
- The status of the resource
- Map<String,String>
- Resource tags
- access
Type string - Access type. Value:-NS: Managed access via NS.-CNAME: access through CNAME.
- coverage string
- Acceleration area
- ids string[]
- A list of Site IDs.
- name
Regex string - A regex string to filter results by Group Metric Rule name.
- only
Enterprise boolean - Only the Enterprise version, pass true when the table only queries the enterprise version of the site.
- output
File string - File name where to save data source results (after running
pulumi preview). - page
Number number - Current page number.
- page
Size number - Number of records per page.
- plan
Subscribe stringType - Package subscription type. Value:-basicplan: Basic version.-standardplan: Standard version.-advancedplan: Advanced version.-enterpriseplan: Enterprise Edition.
- resource
Group stringId - The ID of the resource group
- site
Name string - Site Name
- site
Search stringType - The search match pattern for the site name. The default value is exact match. Valid values:-prefix: matches the prefix.-suffix: The suffix matches.-exact: exact match.-fuzzy: fuzzy match.
- status string
- The status of the resource
- {[key: string]: string}
- Resource tags
- access_
type str - Access type. Value:-NS: Managed access via NS.-CNAME: access through CNAME.
- coverage str
- Acceleration area
- ids Sequence[str]
- A list of Site IDs.
- name_
regex str - A regex string to filter results by Group Metric Rule name.
- only_
enterprise bool - Only the Enterprise version, pass true when the table only queries the enterprise version of the site.
- output_
file str - File name where to save data source results (after running
pulumi preview). - page_
number int - Current page number.
- page_
size int - Number of records per page.
- plan_
subscribe_ strtype - Package subscription type. Value:-basicplan: Basic version.-standardplan: Standard version.-advancedplan: Advanced version.-enterpriseplan: Enterprise Edition.
- resource_
group_ strid - The ID of the resource group
- site_
name str - Site Name
- site_
search_ strtype - The search match pattern for the site name. The default value is exact match. Valid values:-prefix: matches the prefix.-suffix: The suffix matches.-exact: exact match.-fuzzy: fuzzy match.
- status str
- The status of the resource
- Mapping[str, str]
- Resource tags
- access
Type String - Access type. Value:-NS: Managed access via NS.-CNAME: access through CNAME.
- coverage String
- Acceleration area
- ids List<String>
- A list of Site IDs.
- name
Regex String - A regex string to filter results by Group Metric Rule name.
- only
Enterprise Boolean - Only the Enterprise version, pass true when the table only queries the enterprise version of the site.
- output
File String - File name where to save data source results (after running
pulumi preview). - page
Number Number - Current page number.
- page
Size Number - Number of records per page.
- plan
Subscribe StringType - Package subscription type. Value:-basicplan: Basic version.-standardplan: Standard version.-advancedplan: Advanced version.-enterpriseplan: Enterprise Edition.
- resource
Group StringId - The ID of the resource group
- site
Name String - Site Name
- site
Search StringType - The search match pattern for the site name. The default value is exact match. Valid values:-prefix: matches the prefix.-suffix: The suffix matches.-exact: exact match.-fuzzy: fuzzy match.
- status String
- The status of the resource
- Map<String>
- Resource tags
getSites Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- A list of Site IDs.
- Names List<string>
- A list of name of Sites.
- Sites
List<Pulumi.
Ali Cloud. Esa. Outputs. Get Sites Site> - A list of Site Entries. Each element contains the following attributes:
- Access
Type string - Access type. Value:-NS: Managed access via NS.-CNAME: access through CNAME.
- Coverage string
- Acceleration area
- Name
Regex string - Only
Enterprise bool - Output
File string - Page
Number int - Page
Size int - Plan
Subscribe stringType - Resource
Group stringId - The ID of the resource group
- Site
Name string - Site Name
- Site
Search stringType - Status string
- The status of the resource
- Dictionary<string, string>
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- A list of Site IDs.
- Names []string
- A list of name of Sites.
- Sites
[]Get
Sites Site - A list of Site Entries. Each element contains the following attributes:
- Access
Type string - Access type. Value:-NS: Managed access via NS.-CNAME: access through CNAME.
- Coverage string
- Acceleration area
- Name
Regex string - Only
Enterprise bool - Output
File string - Page
Number int - Page
Size int - Plan
Subscribe stringType - Resource
Group stringId - The ID of the resource group
- Site
Name string - Site Name
- Site
Search stringType - Status string
- The status of the resource
- map[string]string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of Site IDs.
- names List<String>
- A list of name of Sites.
- sites
List<Get
Sites Site> - A list of Site Entries. Each element contains the following attributes:
- access
Type String - Access type. Value:-NS: Managed access via NS.-CNAME: access through CNAME.
- coverage String
- Acceleration area
- name
Regex String - only
Enterprise Boolean - output
File String - page
Number Integer - page
Size Integer - plan
Subscribe StringType - resource
Group StringId - The ID of the resource group
- site
Name String - Site Name
- site
Search StringType - status String
- The status of the resource
- Map<String,String>
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- A list of Site IDs.
- names string[]
- A list of name of Sites.
- sites
Get
Sites Site[] - A list of Site Entries. Each element contains the following attributes:
- access
Type string - Access type. Value:-NS: Managed access via NS.-CNAME: access through CNAME.
- coverage string
- Acceleration area
- name
Regex string - only
Enterprise boolean - output
File string - page
Number number - page
Size number - plan
Subscribe stringType - resource
Group stringId - The ID of the resource group
- site
Name string - Site Name
- site
Search stringType - status string
- The status of the resource
- {[key: string]: string}
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- A list of Site IDs.
- names Sequence[str]
- A list of name of Sites.
- sites
Sequence[Get
Sites Site] - A list of Site Entries. Each element contains the following attributes:
- access_
type str - Access type. Value:-NS: Managed access via NS.-CNAME: access through CNAME.
- coverage str
- Acceleration area
- name_
regex str - only_
enterprise bool - output_
file str - page_
number int - page_
size int - plan_
subscribe_ strtype - resource_
group_ strid - The ID of the resource group
- site_
name str - Site Name
- site_
search_ strtype - status str
- The status of the resource
- Mapping[str, str]
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of Site IDs.
- names List<String>
- A list of name of Sites.
- sites List<Property Map>
- A list of Site Entries. Each element contains the following attributes:
- access
Type String - Access type. Value:-NS: Managed access via NS.-CNAME: access through CNAME.
- coverage String
- Acceleration area
- name
Regex String - only
Enterprise Boolean - output
File String - page
Number Number - page
Size Number - plan
Subscribe StringType - resource
Group StringId - The ID of the resource group
- site
Name String - Site Name
- site
Search StringType - status String
- The status of the resource
- Map<String>
Supporting Types
GetSitesSite
- Access
Type string - Access type. Value:-NS: Managed access via NS.-CNAME: access through CNAME.
- Coverage string
- Acceleration area
- Create
Time string - Creation time
- Id int
- The ID of the resource supplied above.
- Instance
Id string - The ID of the associated package instance.
- Modify
Time string - Modification time
- Name
Server stringList - Site Resolution Name Server List
- Resource
Group stringId - The ID of the resource group
- Site
Id int - Site ID
- Site
Name string - Site Name
- Status string
- The status of the resource
- Access
Type string - Access type. Value:-NS: Managed access via NS.-CNAME: access through CNAME.
- Coverage string
- Acceleration area
- Create
Time string - Creation time
- Id int
- The ID of the resource supplied above.
- Instance
Id string - The ID of the associated package instance.
- Modify
Time string - Modification time
- Name
Server stringList - Site Resolution Name Server List
- Resource
Group stringId - The ID of the resource group
- Site
Id int - Site ID
- Site
Name string - Site Name
- Status string
- The status of the resource
- access
Type String - Access type. Value:-NS: Managed access via NS.-CNAME: access through CNAME.
- coverage String
- Acceleration area
- create
Time String - Creation time
- id Integer
- The ID of the resource supplied above.
- instance
Id String - The ID of the associated package instance.
- modify
Time String - Modification time
- name
Server StringList - Site Resolution Name Server List
- resource
Group StringId - The ID of the resource group
- site
Id Integer - Site ID
- site
Name String - Site Name
- status String
- The status of the resource
- access
Type string - Access type. Value:-NS: Managed access via NS.-CNAME: access through CNAME.
- coverage string
- Acceleration area
- create
Time string - Creation time
- id number
- The ID of the resource supplied above.
- instance
Id string - The ID of the associated package instance.
- modify
Time string - Modification time
- name
Server stringList - Site Resolution Name Server List
- resource
Group stringId - The ID of the resource group
- site
Id number - Site ID
- site
Name string - Site Name
- status string
- The status of the resource
- access_
type str - Access type. Value:-NS: Managed access via NS.-CNAME: access through CNAME.
- coverage str
- Acceleration area
- create_
time str - Creation time
- id int
- The ID of the resource supplied above.
- instance_
id str - The ID of the associated package instance.
- modify_
time str - Modification time
- name_
server_ strlist - Site Resolution Name Server List
- resource_
group_ strid - The ID of the resource group
- site_
id int - Site ID
- site_
name str - Site Name
- status str
- The status of the resource
- access
Type String - Access type. Value:-NS: Managed access via NS.-CNAME: access through CNAME.
- coverage String
- Acceleration area
- create
Time String - Creation time
- id Number
- The ID of the resource supplied above.
- instance
Id String - The ID of the associated package instance.
- modify
Time String - Modification time
- name
Server StringList - Site Resolution Name Server List
- resource
Group StringId - The ID of the resource group
- site
Id Number - Site ID
- site
Name String - Site Name
- status String
- The status of the resource
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.
Alibaba Cloud v3.88.1 published on Saturday, Nov 8, 2025 by Pulumi
