Package com.pulumi.alicloud.cen
Class PrivateZone
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.alicloud.cen.PrivateZone
-
public class PrivateZone extends com.pulumi.resources.CustomResource
This topic describes how to configure PrivateZone access. PrivateZone is a VPC-based resolution and management service for private domain names. After you set a PrivateZone access, the Cloud Connect Network (CCN) and Virtual Border Router (VBR) attached to a CEN instance can access the PrivateZone service through CEN. For information about CEN Private Zone and how to use it, see [Manage CEN Private Zone](https://www.alibabacloud.com/help/en/cloud-enterprise-network/latest/api-cbn-2017-09-12-routeprivatezoneincentovpc). > **NOTE:** Available since v1.83.0. ## Example Usage Basic Usage ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.alicloud.AlicloudFunctions; import com.pulumi.alicloud.inputs.GetRegionsArgs; import com.pulumi.alicloud.vpc.Network; import com.pulumi.alicloud.vpc.NetworkArgs; import com.pulumi.alicloud.cen.Instance; import com.pulumi.alicloud.cen.InstanceArgs; import com.pulumi.alicloud.cen.InstanceAttachment; import com.pulumi.alicloud.cen.InstanceAttachmentArgs; import com.pulumi.alicloud.cen.PrivateZone; import com.pulumi.alicloud.cen.PrivateZoneArgs; 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 defaultRegions = AlicloudFunctions.getRegions(GetRegionsArgs.builder() .current(true) .build()); var exampleNetwork = new Network("exampleNetwork", NetworkArgs.builder() .vpcName("tf_example") .cidrBlock("172.17.3.0/24") .build()); var exampleInstance = new Instance("exampleInstance", InstanceArgs.builder() .cenInstanceName("tf_example") .description("an example for cen") .build()); var exampleInstanceAttachment = new InstanceAttachment("exampleInstanceAttachment", InstanceAttachmentArgs.builder() .instanceId(exampleInstance.id()) .childInstanceId(exampleNetwork.id()) .childInstanceType("VPC") .childInstanceRegionId(defaultRegions.applyValue(getRegionsResult -> getRegionsResult.regions()[0].id())) .build()); var defaultPrivateZone = new PrivateZone("defaultPrivateZone", PrivateZoneArgs.builder() .accessRegionId(defaultRegions.applyValue(getRegionsResult -> getRegionsResult.regions()[0].id())) .cenId(exampleInstanceAttachment.instanceId()) .hostRegionId(defaultRegions.applyValue(getRegionsResult -> getRegionsResult.regions()[0].id())) .hostVpcId(exampleNetwork.id()) .build()); } } ``` ## Import CEN Private Zone can be imported using the id, e.g. ```sh $ pulumi import alicloud:cen/privateZone:PrivateZone example cen-abc123456:cn-hangzhou ```
-
-
Constructor Summary
Constructors Constructor Description PrivateZone(java.lang.String name)
PrivateZone(java.lang.String name, PrivateZoneArgs args)
PrivateZone(java.lang.String name, PrivateZoneArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>
accessRegionId()
com.pulumi.core.Output<java.lang.String>
cenId()
static PrivateZone
get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, PrivateZoneState state, com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>
hostRegionId()
com.pulumi.core.Output<java.lang.String>
hostVpcId()
com.pulumi.core.Output<java.lang.String>
status()
-
-
-
Constructor Detail
-
PrivateZone
public PrivateZone(java.lang.String name)
- Parameters:
name
- The _unique_ name of the resulting resource.
-
PrivateZone
public PrivateZone(java.lang.String name, PrivateZoneArgs args)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.
-
PrivateZone
public PrivateZone(java.lang.String name, PrivateZoneArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.options
- A bag of options that control this resource's behavior.
-
-
Method Detail
-
accessRegionId
public com.pulumi.core.Output<java.lang.String> accessRegionId()
- Returns:
- The access region. The access region is the region of the cloud resource that accesses the PrivateZone service through CEN.
-
cenId
public com.pulumi.core.Output<java.lang.String> cenId()
- Returns:
- The ID of the CEN instance.
-
hostRegionId
public com.pulumi.core.Output<java.lang.String> hostRegionId()
- Returns:
- The service region. The service region is the target region of the PrivateZone service to be accessed through CEN.
-
hostVpcId
public com.pulumi.core.Output<java.lang.String> hostVpcId()
- Returns:
- The VPC that belongs to the service region. ->**NOTE:** The "alicloud.cen.PrivateZone" resource depends on the related "alicloud.cen.InstanceAttachment" resource.
-
status
public com.pulumi.core.Output<java.lang.String> status()
- Returns:
- The status of the PrivateZone service. Valid values: ["Creating", "Active", "Deleting"].
-
get
public static PrivateZone get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable PrivateZoneState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name
- The _unique_ name of the resulting resource.id
- The _unique_ provider ID of the resource to lookup.state
-options
- Optional settings to control the behavior of the CustomResource.
-
-