get Private Zones
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)
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 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());
}
}
variables:
this:
fn::invoke:
function: alicloud:cen:getPrivateZones
arguments:
cenId: cen-o40h17ll9w********
ids:
- cn-hangzhou
status: Active
outputs:
firstCenPrivateZonesId: ${this.zones[0].id}
Return
A collection of values returned by getPrivateZones.
Parameters
A collection of arguments for invoking getPrivateZones.
Return
A collection of values returned by getPrivateZones.
Parameters
The ID of the CEN instance.
The service region. The service region is the target region of the PrivateZone service accessed through CEN.
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.
File name where to save data source results (after running pulumi preview
).
The status of the PrivateZone service, including Creating
, Active
and Deleting
.
See also
Return
A collection of values returned by getPrivateZones.
Parameters
Builder for com.pulumi.alicloud.cen.kotlin.inputs.GetPrivateZonesPlainArgs.