1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. cen
  5. getPrivateZones
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.cen.getPrivateZones

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

    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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:cen/getPrivateZones:getPrivateZones
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CenId string
    The ID of the CEN instance.
    HostRegionId string
    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 as access_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, Active and Deleting.
    CenId string
    The ID of the CEN instance.
    HostRegionId string
    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 as access_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, Active and Deleting.
    cenId String
    The ID of the CEN instance.
    hostRegionId String
    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 as access_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, Active and Deleting.
    cenId string
    The ID of the CEN instance.
    hostRegionId string
    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 as access_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, Active and Deleting.
    cen_id str
    The ID of the CEN instance.
    host_region_id str
    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 as access_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, Active and Deleting.
    cenId String
    The ID of the CEN instance.
    hostRegionId String
    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 as access_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, Active and Deleting.

    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 as access_region_id.
    Zones List<Pulumi.AliCloud.Cen.Outputs.GetPrivateZonesZone>
    A list of CEN private zones. Each element contains the following attributes:
    HostRegionId string
    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 as access_region_id.
    Zones []GetPrivateZonesZone
    A list of CEN private zones. Each element contains the following attributes:
    HostRegionId string
    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 as access_region_id.
    zones List<GetPrivateZonesZone>
    A list of CEN private zones. Each element contains the following attributes:
    hostRegionId String
    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 as access_region_id.
    zones GetPrivateZonesZone[]
    A list of CEN private zones. Each element contains the following attributes:
    hostRegionId string
    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 as access_region_id.
    zones Sequence[GetPrivateZonesZone]
    A list of CEN private zones. Each element contains the following attributes:
    host_region_id str
    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 as access_region_id.
    zones List<Property Map>
    A list of CEN private zones. Each element contains the following attributes:
    hostRegionId String
    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

    AccessRegionId string
    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.
    HostRegionId string
    The service region. The service region is the target region of the PrivateZone service accessed through CEN.
    HostVpcId string
    The VPC that belongs to the service region.
    Id string
    The ID of the private zone. It formats as <cen_id>:<access_region_id>.
    PrivateZoneDnsServers string
    The DNS IP addresses of the PrivateZone service.
    Status string
    The status of the PrivateZone service, including Creating, Active and Deleting.
    AccessRegionId string
    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.
    HostRegionId string
    The service region. The service region is the target region of the PrivateZone service accessed through CEN.
    HostVpcId string
    The VPC that belongs to the service region.
    Id string
    The ID of the private zone. It formats as <cen_id>:<access_region_id>.
    PrivateZoneDnsServers string
    The DNS IP addresses of the PrivateZone service.
    Status string
    The status of the PrivateZone service, including Creating, Active and Deleting.
    accessRegionId String
    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.
    hostRegionId String
    The service region. The service region is the target region of the PrivateZone service accessed through CEN.
    hostVpcId String
    The VPC that belongs to the service region.
    id String
    The ID of the private zone. It formats as <cen_id>:<access_region_id>.
    privateZoneDnsServers String
    The DNS IP addresses of the PrivateZone service.
    status String
    The status of the PrivateZone service, including Creating, Active and Deleting.
    accessRegionId string
    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.
    hostRegionId string
    The service region. The service region is the target region of the PrivateZone service accessed through CEN.
    hostVpcId string
    The VPC that belongs to the service region.
    id string
    The ID of the private zone. It formats as <cen_id>:<access_region_id>.
    privateZoneDnsServers string
    The DNS IP addresses of the PrivateZone service.
    status string
    The status of the PrivateZone service, including Creating, Active and Deleting.
    access_region_id str
    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_id str
    The service region. The service region is the target region of the PrivateZone service accessed through CEN.
    host_vpc_id str
    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_dns_servers str
    The DNS IP addresses of the PrivateZone service.
    status str
    The status of the PrivateZone service, including Creating, Active and Deleting.
    accessRegionId String
    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.
    hostRegionId String
    The service region. The service region is the target region of the PrivateZone service accessed through CEN.
    hostVpcId String
    The VPC that belongs to the service region.
    id String
    The ID of the private zone. It formats as <cen_id>:<access_region_id>.
    privateZoneDnsServers String
    The DNS IP addresses of the PrivateZone service.
    status String
    The status of the PrivateZone service, including Creating, Active and Deleting.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi