All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.alicloud.cen.RouteService Maven / Gradle / Ivy

There is a newer version: 3.63.0-alpha.1727424957
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.alicloud.cen;

import com.pulumi.alicloud.Utilities;
import com.pulumi.alicloud.cen.RouteServiceArgs;
import com.pulumi.alicloud.cen.inputs.RouteServiceState;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Provides a CEN Route Service resource. The virtual border routers (VBRs) and Cloud Connect Network (CCN) instances attached to Cloud Enterprise Network (CEN) instances can access the cloud services deployed in VPCs through the CEN instances.
 * 
 * For information about CEN Route Service and how to use it, see [What is Route Service](https://www.alibabacloud.com/help/en/cen/developer-reference/api-cbn-2017-09-12-resolveandrouteserviceincen).
 * 
 * > **NOTE:** Available since v1.99.0.
 * 
 * > **NOTE:** Ensure that at least one VPC in the selected region is attached to the CEN instance.
 * 
 * ## Example Usage
 * 
 * Basic Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * 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.RouteService;
 * import com.pulumi.alicloud.cen.RouteServiceArgs;
 * 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 default = AlicloudFunctions.getRegions(GetRegionsArgs.builder()
 *             .current(true)
 *             .build());
 * 
 *         var example = new Network("example", 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(example.id())
 *             .childInstanceType("VPC")
 *             .childInstanceRegionId(default_.regions()[0].id())
 *             .build());
 * 
 *         var exampleRouteService = new RouteService("exampleRouteService", RouteServiceArgs.builder()
 *             .accessRegionId(default_.regions()[0].id())
 *             .hostRegionId(default_.regions()[0].id())
 *             .hostVpcId(example.id())
 *             .cenId(exampleInstanceAttachment.instanceId())
 *             .host("100.118.28.52/32")
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * CEN Route Service can be imported using the id, e.g. * * ```sh * $ pulumi import alicloud:cen/routeService:RouteService example cen-ahixm0efqh********:cn-shanghai:100.118.28.52/32:cn-shanghai * ``` * */ @ResourceType(type="alicloud:cen/routeService:RouteService") public class RouteService extends com.pulumi.resources.CustomResource { /** * The region of the network instances that access the cloud services. * */ @Export(name="accessRegionId", refs={String.class}, tree="[0]") private Output accessRegionId; /** * @return The region of the network instances that access the cloud services. * */ public Output accessRegionId() { return this.accessRegionId; } /** * The ID of the CEN instance. * */ @Export(name="cenId", refs={String.class}, tree="[0]") private Output cenId; /** * @return The ID of the CEN instance. * */ public Output cenId() { return this.cenId; } /** * The description of the cloud service. * */ @Export(name="description", refs={String.class}, tree="[0]") private Output description; /** * @return The description of the cloud service. * */ public Output> description() { return Codegen.optional(this.description); } /** * The domain name or IP address of the cloud service. * */ @Export(name="host", refs={String.class}, tree="[0]") private Output host; /** * @return The domain name or IP address of the cloud service. * */ public Output host() { return this.host; } /** * The region of the cloud service. * */ @Export(name="hostRegionId", refs={String.class}, tree="[0]") private Output hostRegionId; /** * @return The region of the cloud service. * */ public Output hostRegionId() { return this.hostRegionId; } /** * The VPC associated with the cloud service. * * > **NOTE:** The values of `host_region_id` and `access_region_id` must be consistent. * */ @Export(name="hostVpcId", refs={String.class}, tree="[0]") private Output hostVpcId; /** * @return The VPC associated with the cloud service. * * > **NOTE:** The values of `host_region_id` and `access_region_id` must be consistent. * */ public Output hostVpcId() { return this.hostVpcId; } /** * The status of the cloud service. * */ @Export(name="status", refs={String.class}, tree="[0]") private Output status; /** * @return The status of the cloud service. * */ public Output status() { return this.status; } /** * * @param name The _unique_ name of the resulting resource. */ public RouteService(java.lang.String name) { this(name, RouteServiceArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public RouteService(java.lang.String name, RouteServiceArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public RouteService(java.lang.String name, RouteServiceArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("alicloud:cen/routeService:RouteService", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private RouteService(java.lang.String name, Output id, @Nullable RouteServiceState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("alicloud:cen/routeService:RouteService", name, state, makeResourceOptions(options, id), false); } private static RouteServiceArgs makeArgs(RouteServiceArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? RouteServiceArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state * @param options Optional settings to control the behavior of the CustomResource. */ public static RouteService get(java.lang.String name, Output id, @Nullable RouteServiceState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new RouteService(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy