Alibaba Cloud v3.75.0 published on Friday, Mar 7, 2025 by Pulumi
alicloud.cen.getPrivateZones
Explore with Pulumi AI
This data source provides CEN Private Zones available to the user.
NOTE: Available in v1.88.0+.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const _this = alicloud.cen.getPrivateZones({
    cenId: "cen-o40h17ll9w********",
    ids: ["cn-hangzhou"],
    status: "Active",
});
export const firstCenPrivateZonesId = _this.then(_this => _this.zones?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
this = alicloud.cen.get_private_zones(cen_id="cen-o40h17ll9w********",
    ids=["cn-hangzhou"],
    status="Active")
pulumi.export("firstCenPrivateZonesId", this.zones[0].id)
package main
import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cen"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		this, err := cen.GetPrivateZones(ctx, &cen.GetPrivateZonesArgs{
			CenId: "cen-o40h17ll9w********",
			Ids: []string{
				"cn-hangzhou",
			},
			Status: pulumi.StringRef("Active"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstCenPrivateZonesId", this.Zones[0].Id)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() => 
{
    var @this = AliCloud.Cen.GetPrivateZones.Invoke(new()
    {
        CenId = "cen-o40h17ll9w********",
        Ids = new[]
        {
            "cn-hangzhou",
        },
        Status = "Active",
    });
    return new Dictionary<string, object?>
    {
        ["firstCenPrivateZonesId"] = @this.Apply(@this => @this.Apply(getPrivateZonesResult => getPrivateZonesResult.Zones[0]?.Id)),
    };
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cen.CenFunctions;
import com.pulumi.alicloud.cen.inputs.GetPrivateZonesArgs;
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 this = CenFunctions.getPrivateZones(GetPrivateZonesArgs.builder()
            .cenId("cen-o40h17ll9w********")
            .ids("cn-hangzhou")
            .status("Active")
            .build());
        ctx.export("firstCenPrivateZonesId", this_.zones()[0].id());
    }
}
variables:
  this:
    fn::invoke:
      function: alicloud:cen:getPrivateZones
      arguments:
        cenId: cen-o40h17ll9w********
        ids:
          - cn-hangzhou
        status: Active
outputs:
  firstCenPrivateZonesId: ${this.zones[0].id}
Using getPrivateZones
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 getPrivateZones(args: GetPrivateZonesArgs, opts?: InvokeOptions): Promise<GetPrivateZonesResult>
function getPrivateZonesOutput(args: GetPrivateZonesOutputArgs, opts?: InvokeOptions): Output<GetPrivateZonesResult>def get_private_zones(cen_id: Optional[str] = None,
                      host_region_id: Optional[str] = None,
                      ids: Optional[Sequence[str]] = None,
                      output_file: Optional[str] = None,
                      status: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetPrivateZonesResult
def get_private_zones_output(cen_id: Optional[pulumi.Input[str]] = None,
                      host_region_id: Optional[pulumi.Input[str]] = None,
                      ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                      output_file: Optional[pulumi.Input[str]] = None,
                      status: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetPrivateZonesResult]func GetPrivateZones(ctx *Context, args *GetPrivateZonesArgs, opts ...InvokeOption) (*GetPrivateZonesResult, error)
func GetPrivateZonesOutput(ctx *Context, args *GetPrivateZonesOutputArgs, opts ...InvokeOption) GetPrivateZonesResultOutput> Note: This function is named GetPrivateZones in the Go SDK.
public static class GetPrivateZones 
{
    public static Task<GetPrivateZonesResult> InvokeAsync(GetPrivateZonesArgs args, InvokeOptions? opts = null)
    public static Output<GetPrivateZonesResult> Invoke(GetPrivateZonesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetPrivateZonesResult> getPrivateZones(GetPrivateZonesArgs args, InvokeOptions options)
public static Output<GetPrivateZonesResult> getPrivateZones(GetPrivateZonesArgs args, InvokeOptions options)
fn::invoke:
  function: alicloud:cen/getPrivateZones:getPrivateZones
  arguments:
    # arguments dictionaryThe following arguments are supported:
- CenId string
- The ID of the CEN instance.
- HostRegion stringId 
- The service region. The service region is the target region of the PrivateZone service accessed through CEN.
- Ids List<string>
- A list of CEN private zone IDs. Each element format as <cen_id>:<access_region_id>. NOTE: Before 1.162.0, each element same asaccess_region_id.- host_region_id- (Optional) The service region is the target region of the PrivateZone service accessed through CEN.
 
- OutputFile string
- File name where to save data source results (after running pulumi preview).
- Status string
- The status of the PrivateZone service, including Creating,ActiveandDeleting.
- CenId string
- The ID of the CEN instance.
- HostRegion stringId 
- The service region. The service region is the target region of the PrivateZone service accessed through CEN.
- Ids []string
- A list of CEN private zone IDs. Each element format as <cen_id>:<access_region_id>. NOTE: Before 1.162.0, each element same asaccess_region_id.- host_region_id- (Optional) The service region is the target region of the PrivateZone service accessed through CEN.
 
- OutputFile string
- File name where to save data source results (after running pulumi preview).
- Status string
- The status of the PrivateZone service, including Creating,ActiveandDeleting.
- cenId String
- The ID of the CEN instance.
- hostRegion StringId 
- The service region. The service region is the target region of the PrivateZone service accessed through CEN.
- ids List<String>
- A list of CEN private zone IDs. Each element format as <cen_id>:<access_region_id>. NOTE: Before 1.162.0, each element same asaccess_region_id.- host_region_id- (Optional) The service region is the target region of the PrivateZone service accessed through CEN.
 
- outputFile String
- File name where to save data source results (after running pulumi preview).
- status String
- The status of the PrivateZone service, including Creating,ActiveandDeleting.
- cenId string
- The ID of the CEN instance.
- hostRegion stringId 
- The service region. The service region is the target region of the PrivateZone service accessed through CEN.
- ids string[]
- A list of CEN private zone IDs. Each element format as <cen_id>:<access_region_id>. NOTE: Before 1.162.0, each element same asaccess_region_id.- host_region_id- (Optional) The service region is the target region of the PrivateZone service accessed through CEN.
 
- outputFile string
- File name where to save data source results (after running pulumi preview).
- status string
- The status of the PrivateZone service, including Creating,ActiveandDeleting.
- cen_id str
- The ID of the CEN instance.
- host_region_ strid 
- The service region. The service region is the target region of the PrivateZone service accessed through CEN.
- ids Sequence[str]
- A list of CEN private zone IDs. Each element format as <cen_id>:<access_region_id>. NOTE: Before 1.162.0, each element same asaccess_region_id.- host_region_id- (Optional) The service region is the target region of the PrivateZone service accessed through CEN.
 
- output_file str
- File name where to save data source results (after running pulumi preview).
- status str
- The status of the PrivateZone service, including Creating,ActiveandDeleting.
- cenId String
- The ID of the CEN instance.
- hostRegion StringId 
- The service region. The service region is the target region of the PrivateZone service accessed through CEN.
- ids List<String>
- A list of CEN private zone IDs. Each element format as <cen_id>:<access_region_id>. NOTE: Before 1.162.0, each element same asaccess_region_id.- host_region_id- (Optional) The service region is the target region of the PrivateZone service accessed through CEN.
 
- outputFile String
- File name where to save data source results (after running pulumi preview).
- status String
- The status of the PrivateZone service, including Creating,ActiveandDeleting.
getPrivateZones Result
The following output properties are available:
- CenId string
- The ID of the CEN instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- A list of CEN private zone IDs. Each element format as <cen_id>:<access_region_id>. NOTE: Before 1.162.0, each element same asaccess_region_id.
- Zones
List<Pulumi.Ali Cloud. Cen. Outputs. Get Private Zones Zone> 
- A list of CEN private zones. Each element contains the following attributes:
- HostRegion stringId 
- The service region. The service region is the target region of the PrivateZone service accessed through CEN.
- OutputFile string
- Status string
- The status of the PrivateZone service.
- CenId string
- The ID of the CEN instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- A list of CEN private zone IDs. Each element format as <cen_id>:<access_region_id>. NOTE: Before 1.162.0, each element same asaccess_region_id.
- Zones
[]GetPrivate Zones Zone 
- A list of CEN private zones. Each element contains the following attributes:
- HostRegion stringId 
- The service region. The service region is the target region of the PrivateZone service accessed through CEN.
- OutputFile string
- Status string
- The status of the PrivateZone service.
- cenId String
- The ID of the CEN instance.
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of CEN private zone IDs. Each element format as <cen_id>:<access_region_id>. NOTE: Before 1.162.0, each element same asaccess_region_id.
- zones
List<GetPrivate Zones Zone> 
- A list of CEN private zones. Each element contains the following attributes:
- hostRegion StringId 
- The service region. The service region is the target region of the PrivateZone service accessed through CEN.
- outputFile String
- status String
- The status of the PrivateZone service.
- cenId string
- The ID of the CEN instance.
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- A list of CEN private zone IDs. Each element format as <cen_id>:<access_region_id>. NOTE: Before 1.162.0, each element same asaccess_region_id.
- zones
GetPrivate Zones Zone[] 
- A list of CEN private zones. Each element contains the following attributes:
- hostRegion stringId 
- The service region. The service region is the target region of the PrivateZone service accessed through CEN.
- outputFile string
- status string
- The status of the PrivateZone service.
- cen_id str
- The ID of the CEN instance.
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- A list of CEN private zone IDs. Each element format as <cen_id>:<access_region_id>. NOTE: Before 1.162.0, each element same asaccess_region_id.
- zones
Sequence[GetPrivate Zones Zone] 
- A list of CEN private zones. Each element contains the following attributes:
- host_region_ strid 
- The service region. The service region is the target region of the PrivateZone service accessed through CEN.
- output_file str
- status str
- The status of the PrivateZone service.
- cenId String
- The ID of the CEN instance.
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of CEN private zone IDs. Each element format as <cen_id>:<access_region_id>. NOTE: Before 1.162.0, each element same asaccess_region_id.
- zones List<Property Map>
- A list of CEN private zones. Each element contains the following attributes:
- hostRegion StringId 
- The service region. The service region is the target region of the PrivateZone service accessed through CEN.
- outputFile String
- status String
- The status of the PrivateZone service.
Supporting Types
GetPrivateZonesZone   
- AccessRegion stringId 
- The access region. The access region is the region of the cloud resource that accesses the PrivateZone service through CEN.
- CenId string
- The ID of the CEN instance.
- HostRegion stringId 
- The service region. The service region is the target region of the PrivateZone service accessed through CEN.
- HostVpc stringId 
- The VPC that belongs to the service region.
- Id string
- The ID of the private zone. It formats as <cen_id>:<access_region_id>.
- PrivateZone stringDns Servers 
- The DNS IP addresses of the PrivateZone service.
- Status string
- The status of the PrivateZone service, including Creating,ActiveandDeleting.
- AccessRegion stringId 
- The access region. The access region is the region of the cloud resource that accesses the PrivateZone service through CEN.
- CenId string
- The ID of the CEN instance.
- HostRegion stringId 
- The service region. The service region is the target region of the PrivateZone service accessed through CEN.
- HostVpc stringId 
- The VPC that belongs to the service region.
- Id string
- The ID of the private zone. It formats as <cen_id>:<access_region_id>.
- PrivateZone stringDns Servers 
- The DNS IP addresses of the PrivateZone service.
- Status string
- The status of the PrivateZone service, including Creating,ActiveandDeleting.
- accessRegion StringId 
- The access region. The access region is the region of the cloud resource that accesses the PrivateZone service through CEN.
- cenId String
- The ID of the CEN instance.
- hostRegion StringId 
- The service region. The service region is the target region of the PrivateZone service accessed through CEN.
- hostVpc StringId 
- The VPC that belongs to the service region.
- id String
- The ID of the private zone. It formats as <cen_id>:<access_region_id>.
- privateZone StringDns Servers 
- The DNS IP addresses of the PrivateZone service.
- status String
- The status of the PrivateZone service, including Creating,ActiveandDeleting.
- accessRegion stringId 
- The access region. The access region is the region of the cloud resource that accesses the PrivateZone service through CEN.
- cenId string
- The ID of the CEN instance.
- hostRegion stringId 
- The service region. The service region is the target region of the PrivateZone service accessed through CEN.
- hostVpc stringId 
- The VPC that belongs to the service region.
- id string
- The ID of the private zone. It formats as <cen_id>:<access_region_id>.
- privateZone stringDns Servers 
- The DNS IP addresses of the PrivateZone service.
- status string
- The status of the PrivateZone service, including Creating,ActiveandDeleting.
- access_region_ strid 
- The access region. The access region is the region of the cloud resource that accesses the PrivateZone service through CEN.
- cen_id str
- The ID of the CEN instance.
- host_region_ strid 
- The service region. The service region is the target region of the PrivateZone service accessed through CEN.
- host_vpc_ strid 
- The VPC that belongs to the service region.
- id str
- The ID of the private zone. It formats as <cen_id>:<access_region_id>.
- private_zone_ strdns_ servers 
- The DNS IP addresses of the PrivateZone service.
- status str
- The status of the PrivateZone service, including Creating,ActiveandDeleting.
- accessRegion StringId 
- The access region. The access region is the region of the cloud resource that accesses the PrivateZone service through CEN.
- cenId String
- The ID of the CEN instance.
- hostRegion StringId 
- The service region. The service region is the target region of the PrivateZone service accessed through CEN.
- hostVpc StringId 
- The VPC that belongs to the service region.
- id String
- The ID of the private zone. It formats as <cen_id>:<access_region_id>.
- privateZone StringDns Servers 
- The DNS IP addresses of the PrivateZone service.
- status String
- The status of the PrivateZone service, including Creating,ActiveandDeleting.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the alicloudTerraform Provider.