Alibaba Cloud

Pulumi Official
Package maintained by Pulumi
v3.28.0 published on Tuesday, Aug 16, 2022 by Pulumi

getPrivateZones

This data source provides CEN Private Zones available to the user.

NOTE: Available in v1.88.0+.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var @this = Output.Create(AliCloud.Cen.GetPrivateZones.InvokeAsync(new AliCloud.Cen.GetPrivateZonesArgs
        {
            CenId = "cen-o40h17ll9w********",
            Ids = 
            {
                "cn-hangzhou",
            },
            Status = "Active",
        }));
        this.FirstCenPrivateZonesId = @this.Apply(@this => @this.Zones?[0]?.Id);
    }

    [Output("firstCenPrivateZonesId")]
    public Output<string> FirstCenPrivateZonesId { get; set; }
}
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
	})
}
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());
    }
}
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)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const thisPrivateZones = pulumi.output(alicloud.cen.getPrivateZones({
    cenId: "cen-o40h17ll9w********",
    ids: ["cn-hangzhou"],
    status: "Active",
}));

export const firstCenPrivateZonesId = thisPrivateZones.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
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
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
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
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
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
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
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.