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

com.pulumi.alicloud.ga.CustomRoutingEndpoint 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.ga;

import com.pulumi.alicloud.Utilities;
import com.pulumi.alicloud.ga.CustomRoutingEndpointArgs;
import com.pulumi.alicloud.ga.inputs.CustomRoutingEndpointState;
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 javax.annotation.Nullable;

/**
 * Provides a Global Accelerator (GA) Custom Routing Endpoint resource.
 * 
 * For information about Global Accelerator (GA) Custom Routing Endpoint and how to use it, see [What is Custom Routing Endpoint](https://www.alibabacloud.com/help/en/global-accelerator/latest/api-ga-2019-11-20-createcustomroutingendpoints).
 * 
 * > **NOTE:** Available since v1.197.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.AlicloudFunctions;
 * import com.pulumi.alicloud.inputs.GetZonesArgs;
 * 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.ga.Accelerator;
 * import com.pulumi.alicloud.ga.AcceleratorArgs;
 * import com.pulumi.alicloud.ga.BandwidthPackage;
 * import com.pulumi.alicloud.ga.BandwidthPackageArgs;
 * import com.pulumi.alicloud.ga.BandwidthPackageAttachment;
 * import com.pulumi.alicloud.ga.BandwidthPackageAttachmentArgs;
 * import com.pulumi.alicloud.ga.Listener;
 * import com.pulumi.alicloud.ga.ListenerArgs;
 * import com.pulumi.alicloud.ga.inputs.ListenerPortRangeArgs;
 * import com.pulumi.alicloud.ga.CustomRoutingEndpointGroup;
 * import com.pulumi.alicloud.ga.CustomRoutingEndpointGroupArgs;
 * import com.pulumi.alicloud.ga.CustomRoutingEndpoint;
 * import com.pulumi.alicloud.ga.CustomRoutingEndpointArgs;
 * 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 region = config.get("region").orElse("cn-hangzhou");
 *         final var default = AlicloudFunctions.getZones(GetZonesArgs.builder()
 *             .availableResourceCreation("VSwitch")
 *             .build());
 * 
 *         var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
 *             .vpcName("terraform-example")
 *             .cidrBlock("172.17.3.0/24")
 *             .build());
 * 
 *         var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
 *             .vswitchName("terraform-example")
 *             .cidrBlock("172.17.3.0/24")
 *             .vpcId(defaultNetwork.id())
 *             .zoneId(default_.zones()[0].id())
 *             .build());
 * 
 *         var defaultAccelerator = new Accelerator("defaultAccelerator", AcceleratorArgs.builder()
 *             .duration(1)
 *             .autoUseCoupon(true)
 *             .spec("1")
 *             .build());
 * 
 *         var defaultBandwidthPackage = new BandwidthPackage("defaultBandwidthPackage", BandwidthPackageArgs.builder()
 *             .bandwidth(100)
 *             .type("Basic")
 *             .bandwidthType("Basic")
 *             .paymentType("PayAsYouGo")
 *             .billingType("PayBy95")
 *             .ratio(30)
 *             .build());
 * 
 *         var defaultBandwidthPackageAttachment = new BandwidthPackageAttachment("defaultBandwidthPackageAttachment", BandwidthPackageAttachmentArgs.builder()
 *             .acceleratorId(defaultAccelerator.id())
 *             .bandwidthPackageId(defaultBandwidthPackage.id())
 *             .build());
 * 
 *         var defaultListener = new Listener("defaultListener", ListenerArgs.builder()
 *             .acceleratorId(defaultBandwidthPackageAttachment.acceleratorId())
 *             .listenerType("CustomRouting")
 *             .portRanges(ListenerPortRangeArgs.builder()
 *                 .fromPort(10000)
 *                 .toPort(16000)
 *                 .build())
 *             .build());
 * 
 *         var defaultCustomRoutingEndpointGroup = new CustomRoutingEndpointGroup("defaultCustomRoutingEndpointGroup", CustomRoutingEndpointGroupArgs.builder()
 *             .acceleratorId(defaultListener.acceleratorId())
 *             .listenerId(defaultListener.id())
 *             .endpointGroupRegion(region)
 *             .customRoutingEndpointGroupName("terraform-example")
 *             .description("terraform-example")
 *             .build());
 * 
 *         var defaultCustomRoutingEndpoint = new CustomRoutingEndpoint("defaultCustomRoutingEndpoint", CustomRoutingEndpointArgs.builder()
 *             .endpointGroupId(defaultCustomRoutingEndpointGroup.id())
 *             .endpoint(defaultSwitch.id())
 *             .type("PrivateSubNet")
 *             .trafficToEndpointPolicy("DenyAll")
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * Global Accelerator (GA) Custom Routing Endpoint can be imported using the id, e.g. * * ```sh * $ pulumi import alicloud:ga/customRoutingEndpoint:CustomRoutingEndpoint example <endpoint_group_id>:<custom_routing_endpoint_id> * ``` * */ @ResourceType(type="alicloud:ga/customRoutingEndpoint:CustomRoutingEndpoint") public class CustomRoutingEndpoint extends com.pulumi.resources.CustomResource { /** * The ID of the GA instance with which the endpoint is associated. * */ @Export(name="acceleratorId", refs={String.class}, tree="[0]") private Output acceleratorId; /** * @return The ID of the GA instance with which the endpoint is associated. * */ public Output acceleratorId() { return this.acceleratorId; } /** * The ID of the Custom Routing Endpoint. * */ @Export(name="customRoutingEndpointId", refs={String.class}, tree="[0]") private Output customRoutingEndpointId; /** * @return The ID of the Custom Routing Endpoint. * */ public Output customRoutingEndpointId() { return this.customRoutingEndpointId; } /** * The ID of the endpoint (vSwitch). * */ @Export(name="endpoint", refs={String.class}, tree="[0]") private Output endpoint; /** * @return The ID of the endpoint (vSwitch). * */ public Output endpoint() { return this.endpoint; } /** * The ID of the endpoint group in which to create endpoints. * */ @Export(name="endpointGroupId", refs={String.class}, tree="[0]") private Output endpointGroupId; /** * @return The ID of the endpoint group in which to create endpoints. * */ public Output endpointGroupId() { return this.endpointGroupId; } /** * The ID of the listener with which the endpoint is associated. * */ @Export(name="listenerId", refs={String.class}, tree="[0]") private Output listenerId; /** * @return The ID of the listener with which the endpoint is associated. * */ public Output listenerId() { return this.listenerId; } /** * The status of the Custom Routing Endpoint. * */ @Export(name="status", refs={String.class}, tree="[0]") private Output status; /** * @return The status of the Custom Routing Endpoint. * */ public Output status() { return this.status; } /** * The access policy of traffic to the endpoint. Default value: `DenyAll`. Valid values: * - `DenyAll`: denies all traffic to the endpoint. * - `AllowAll`: allows all traffic to the endpoint. * - `AllowCustom`: allows traffic only to specified destinations in the endpoint. * */ @Export(name="trafficToEndpointPolicy", refs={String.class}, tree="[0]") private Output trafficToEndpointPolicy; /** * @return The access policy of traffic to the endpoint. Default value: `DenyAll`. Valid values: * - `DenyAll`: denies all traffic to the endpoint. * - `AllowAll`: allows all traffic to the endpoint. * - `AllowCustom`: allows traffic only to specified destinations in the endpoint. * */ public Output trafficToEndpointPolicy() { return this.trafficToEndpointPolicy; } /** * The backend service type of the endpoint. Valid values: `PrivateSubNet`. * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return The backend service type of the endpoint. Valid values: `PrivateSubNet`. * */ public Output type() { return this.type; } /** * * @param name The _unique_ name of the resulting resource. */ public CustomRoutingEndpoint(java.lang.String name) { this(name, CustomRoutingEndpointArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public CustomRoutingEndpoint(java.lang.String name, CustomRoutingEndpointArgs 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 CustomRoutingEndpoint(java.lang.String name, CustomRoutingEndpointArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("alicloud:ga/customRoutingEndpoint:CustomRoutingEndpoint", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private CustomRoutingEndpoint(java.lang.String name, Output id, @Nullable CustomRoutingEndpointState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("alicloud:ga/customRoutingEndpoint:CustomRoutingEndpoint", name, state, makeResourceOptions(options, id), false); } private static CustomRoutingEndpointArgs makeArgs(CustomRoutingEndpointArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? CustomRoutingEndpointArgs.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 CustomRoutingEndpoint get(java.lang.String name, Output id, @Nullable CustomRoutingEndpointState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new CustomRoutingEndpoint(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy