com.pulumi.alicloud.cen.TransitRouterVpcAttachment Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of alicloud Show documentation
Show all versions of alicloud Show documentation
A Pulumi package for creating and managing AliCloud resources.
// *** 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* @Nullable */ Boolean> 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* @Nullable */ String> 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* @Nullable */ Boolean> 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* @Nullable */ Boolean> 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* @Nullable */ Boolean> 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* @Nullable */ Boolean> 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* @Nullable */ Map> 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* @Nullable */ String> 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