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

com.pulumi.alicloud.cen.TransitRouterVpcAttachment 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.TransitRouterVpcAttachmentArgs;
import com.pulumi.alicloud.cen.inputs.TransitRouterVpcAttachmentState;
import com.pulumi.alicloud.cen.outputs.TransitRouterVpcAttachmentZoneMapping;
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.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Provides a CEN Transit Router VPC Attachment resource that associate the VPC with the CEN instance. [What is Cen Transit Router VPC Attachment](https://www.alibabacloud.com/help/en/cen/developer-reference/api-cbn-2017-09-12-createtransitroutervpcattachment)
 * 
 * > **NOTE:** Available since v1.126.0.
 * 
 * ## 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.cen.CenFunctions;
 * import com.pulumi.alicloud.cen.inputs.GetTransitRouterAvailableResourcesArgs;
 * import com.pulumi.alicloud.vpc.Network;
 * import com.pulumi.alicloud.vpc.NetworkArgs;
 * import com.pulumi.alicloud.vpc.Switch;
 * import com.pulumi.alicloud.vpc.SwitchArgs;
 * import com.pulumi.alicloud.cen.Instance;
 * import com.pulumi.alicloud.cen.InstanceArgs;
 * import com.pulumi.alicloud.cen.TransitRouter;
 * import com.pulumi.alicloud.cen.TransitRouterArgs;
 * import com.pulumi.alicloud.cen.TransitRouterVpcAttachment;
 * import com.pulumi.alicloud.cen.TransitRouterVpcAttachmentArgs;
 * import com.pulumi.alicloud.cen.inputs.TransitRouterVpcAttachmentZoneMappingArgs;
 * 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 config = ctx.config();
 *         final var name = config.get("name").orElse("terraform-example");
 *         final var default = CenFunctions.getTransitRouterAvailableResources();
 * 
 *         final var masterZone = default_.resources()[0].masterZones()[0];
 * 
 *         final var slaveZone = default_.resources()[0].slaveZones()[1];
 * 
 *         var example = new Network("example", NetworkArgs.builder()
 *             .vpcName(name)
 *             .cidrBlock("192.168.0.0/16")
 *             .build());
 * 
 *         var exampleMaster = new Switch("exampleMaster", SwitchArgs.builder()
 *             .vswitchName(name)
 *             .cidrBlock("192.168.1.0/24")
 *             .vpcId(example.id())
 *             .zoneId(masterZone)
 *             .build());
 * 
 *         var exampleSlave = new Switch("exampleSlave", SwitchArgs.builder()
 *             .vswitchName(name)
 *             .cidrBlock("192.168.2.0/24")
 *             .vpcId(example.id())
 *             .zoneId(slaveZone)
 *             .build());
 * 
 *         var exampleInstance = new Instance("exampleInstance", InstanceArgs.builder()
 *             .cenInstanceName(name)
 *             .protectionLevel("REDUCED")
 *             .build());
 * 
 *         var exampleTransitRouter = new TransitRouter("exampleTransitRouter", TransitRouterArgs.builder()
 *             .transitRouterName(name)
 *             .cenId(exampleInstance.id())
 *             .build());
 * 
 *         var exampleTransitRouterVpcAttachment = new TransitRouterVpcAttachment("exampleTransitRouterVpcAttachment", TransitRouterVpcAttachmentArgs.builder()
 *             .cenId(exampleInstance.id())
 *             .transitRouterId(exampleTransitRouter.transitRouterId())
 *             .vpcId(example.id())
 *             .zoneMappings(            
 *                 TransitRouterVpcAttachmentZoneMappingArgs.builder()
 *                     .zoneId(masterZone)
 *                     .vswitchId(exampleMaster.id())
 *                     .build(),
 *                 TransitRouterVpcAttachmentZoneMappingArgs.builder()
 *                     .zoneId(slaveZone)
 *                     .vswitchId(exampleSlave.id())
 *                     .build())
 *             .transitRouterAttachmentName(name)
 *             .transitRouterAttachmentDescription(name)
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * CEN Transit Router Vpc Attachment can be imported using the id, e.g. * * ```sh * $ pulumi import alicloud:cen/transitRouterVpcAttachment:TransitRouterVpcAttachment example <id> * ``` * */ @ResourceType(type="alicloud:cen/transitRouterVpcAttachment:TransitRouterVpcAttachment") public class TransitRouterVpcAttachment extends com.pulumi.resources.CustomResource { /** * Specifies whether to enable the Enterprise Edition transit router to automatically advertise routes to VPCs. Valid values: * - **false:** (default) * */ @Export(name="autoPublishRouteEnabled", refs={Boolean.class}, tree="[0]") private Output autoPublishRouteEnabled; /** * @return Specifies whether to enable the Enterprise Edition transit router to automatically advertise routes to VPCs. Valid values: * - **false:** (default) * */ public Output> autoPublishRouteEnabled() { return Codegen.optional(this.autoPublishRouteEnabled); } /** * The ID of the Cloud Enterprise Network (CEN) instance. * */ @Export(name="cenId", refs={String.class}, tree="[0]") private Output cenId; /** * @return The ID of the Cloud Enterprise Network (CEN) instance. * */ public Output> cenId() { return Codegen.optional(this.cenId); } /** * The creation time of the resource * */ @Export(name="createTime", refs={String.class}, tree="[0]") private Output createTime; /** * @return The creation time of the resource * */ public Output createTime() { return this.createTime; } /** * Whether to perform PreCheck on this request, including permissions and instance status verification. Value: * */ @Export(name="dryRun", refs={Boolean.class}, tree="[0]") private Output dryRun; /** * @return Whether to perform PreCheck on this request, including permissions and instance status verification. Value: * */ public Output> dryRun() { return Codegen.optional(this.dryRun); } /** * Whether to forcibly delete the VPC connection. The value is: * */ @Export(name="forceDelete", refs={Boolean.class}, tree="[0]") private Output forceDelete; /** * @return Whether to forcibly delete the VPC connection. The value is: * */ public Output> forceDelete() { return Codegen.optional(this.forceDelete); } /** * The billing method. The default value is `PayAsYouGo`, which specifies the pay-as-you-go billing method. * */ @Export(name="paymentType", refs={String.class}, tree="[0]") private Output paymentType; /** * @return The billing method. The default value is `PayAsYouGo`, which specifies the pay-as-you-go billing method. * */ public Output paymentType() { return this.paymentType; } /** * The resource type of the transit router vpc attachment. Default value: `VPC`. Valid values: `VPC`. * */ @Export(name="resourceType", refs={String.class}, tree="[0]") private Output resourceType; /** * @return The resource type of the transit router vpc attachment. Default value: `VPC`. Valid values: `VPC`. * */ public Output resourceType() { return this.resourceType; } /** * Whether to enabled route table association. **NOTE:** "Field `route_table_association_enabled` has been deprecated from provider version 1.192.0. Please use the resource `alicloud.cen.TransitRouterRouteTableAssociation` instead, how to use alicloud_cen_transit_router_route_table_association." * * @deprecated * Field `route_table_association_enabled` has been deprecated from provider version 1.192.0. Please use the resource `alicloud.cen.TransitRouterRouteTableAssociation` instead. * */ @Deprecated /* Field `route_table_association_enabled` has been deprecated from provider version 1.192.0. Please use the resource `alicloud.cen.TransitRouterRouteTableAssociation` instead. */ @Export(name="routeTableAssociationEnabled", refs={Boolean.class}, tree="[0]") private Output routeTableAssociationEnabled; /** * @return Whether to enabled route table association. **NOTE:** "Field `route_table_association_enabled` has been deprecated from provider version 1.192.0. Please use the resource `alicloud.cen.TransitRouterRouteTableAssociation` instead, how to use alicloud_cen_transit_router_route_table_association." * */ public Output> routeTableAssociationEnabled() { return Codegen.optional(this.routeTableAssociationEnabled); } /** * Whether to enabled route table propagation. **NOTE:** "Field `route_table_propagation_enabled` has been deprecated from provider version 1.192.0. Please use the resource `alicloud.cen.TransitRouterRouteTablePropagation` instead, how to use alicloud_cen_transit_router_route_table_propagation." * * @deprecated * Field `route_table_propagation_enabled` has been deprecated from provider version 1.192.0. Please use the resource `alicloud.cen.TransitRouterRouteTablePropagation` instead. * */ @Deprecated /* Field `route_table_propagation_enabled` has been deprecated from provider version 1.192.0. Please use the resource `alicloud.cen.TransitRouterRouteTablePropagation` instead. */ @Export(name="routeTablePropagationEnabled", refs={Boolean.class}, tree="[0]") private Output routeTablePropagationEnabled; /** * @return Whether to enabled route table propagation. **NOTE:** "Field `route_table_propagation_enabled` has been deprecated from provider version 1.192.0. Please use the resource `alicloud.cen.TransitRouterRouteTablePropagation` instead, how to use alicloud_cen_transit_router_route_table_propagation." * */ public Output> routeTablePropagationEnabled() { return Codegen.optional(this.routeTablePropagationEnabled); } /** * Status * */ @Export(name="status", refs={String.class}, tree="[0]") private Output status; /** * @return Status * */ public Output status() { return this.status; } /** * The tag of the resource * */ @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tags; /** * @return The tag of the resource * */ public Output>> tags() { return Codegen.optional(this.tags); } /** * The description of the VPC connection. * * The description must be 2 to 256 characters in length. The description must start with a letter but cannot start with `http://` or `https://`. * */ @Export(name="transitRouterAttachmentDescription", refs={String.class}, tree="[0]") private Output transitRouterAttachmentDescription; /** * @return The description of the VPC connection. * * The description must be 2 to 256 characters in length. The description must start with a letter but cannot start with `http://` or `https://`. * */ public Output> transitRouterAttachmentDescription() { return Codegen.optional(this.transitRouterAttachmentDescription); } /** * The ID of the Transit Router Attachment. * */ @Export(name="transitRouterAttachmentId", refs={String.class}, tree="[0]") private Output transitRouterAttachmentId; /** * @return The ID of the Transit Router Attachment. * */ public Output transitRouterAttachmentId() { return this.transitRouterAttachmentId; } /** * . Field 'transit_router_attachment_name' has been deprecated from provider version 1.230.1. New field 'transit_router_vpc_attachment_name' instead. * * @deprecated * Field 'transit_router_attachment_name' has been deprecated since provider version 1.230.1. New field 'transit_router_vpc_attachment_name' instead. * */ @Deprecated /* Field 'transit_router_attachment_name' has been deprecated since provider version 1.230.1. New field 'transit_router_vpc_attachment_name' instead. */ @Export(name="transitRouterAttachmentName", refs={String.class}, tree="[0]") private Output transitRouterAttachmentName; /** * @return . Field 'transit_router_attachment_name' has been deprecated from provider version 1.230.1. New field 'transit_router_vpc_attachment_name' instead. * */ public Output transitRouterAttachmentName() { return this.transitRouterAttachmentName; } /** * The ID of the Enterprise Edition transit router. * */ @Export(name="transitRouterId", refs={String.class}, tree="[0]") private Output transitRouterId; /** * @return The ID of the Enterprise Edition transit router. * */ public Output transitRouterId() { return this.transitRouterId; } /** * The name of the VPC connection. * * The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (\_), and hyphens (-). It must start with a letter. * */ @Export(name="transitRouterVpcAttachmentName", refs={String.class}, tree="[0]") private Output transitRouterVpcAttachmentName; /** * @return The name of the VPC connection. * * The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (\_), and hyphens (-). It must start with a letter. * */ public Output transitRouterVpcAttachmentName() { return this.transitRouterVpcAttachmentName; } /** * TransitRouterVpcAttachmentOptions * */ @Export(name="transitRouterVpcAttachmentOptions", refs={Map.class,String.class}, tree="[0,1,1]") private Output> transitRouterVpcAttachmentOptions; /** * @return TransitRouterVpcAttachmentOptions * */ public Output> transitRouterVpcAttachmentOptions() { return this.transitRouterVpcAttachmentOptions; } /** * The VPC ID. * */ @Export(name="vpcId", refs={String.class}, tree="[0]") private Output vpcId; /** * @return The VPC ID. * */ public Output vpcId() { return this.vpcId; } /** * VpcOwnerId * */ @Export(name="vpcOwnerId", refs={Integer.class}, tree="[0]") private Output vpcOwnerId; /** * @return VpcOwnerId * */ public Output vpcOwnerId() { return this.vpcOwnerId; } /** * ZoneMappingss See `zone_mappings` below. * * The following arguments will be discarded. Please use new fields as soon as possible: * */ @Export(name="zoneMappings", refs={List.class,TransitRouterVpcAttachmentZoneMapping.class}, tree="[0,1]") private Output> zoneMappings; /** * @return ZoneMappingss See `zone_mappings` below. * * The following arguments will be discarded. Please use new fields as soon as possible: * */ public Output> zoneMappings() { return this.zoneMappings; } /** * * @param name The _unique_ name of the resulting resource. */ public TransitRouterVpcAttachment(java.lang.String name) { this(name, TransitRouterVpcAttachmentArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public TransitRouterVpcAttachment(java.lang.String name, TransitRouterVpcAttachmentArgs 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 TransitRouterVpcAttachment(java.lang.String name, TransitRouterVpcAttachmentArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("alicloud:cen/transitRouterVpcAttachment:TransitRouterVpcAttachment", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private TransitRouterVpcAttachment(java.lang.String name, Output id, @Nullable TransitRouterVpcAttachmentState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("alicloud:cen/transitRouterVpcAttachment:TransitRouterVpcAttachment", name, state, makeResourceOptions(options, id), false); } private static TransitRouterVpcAttachmentArgs makeArgs(TransitRouterVpcAttachmentArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? TransitRouterVpcAttachmentArgs.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 TransitRouterVpcAttachment get(java.lang.String name, Output id, @Nullable TransitRouterVpcAttachmentState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new TransitRouterVpcAttachment(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy