com.pulumi.alicloud.ga.CustomRoutingEndpointGroupDestination 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.ga;
import com.pulumi.alicloud.Utilities;
import com.pulumi.alicloud.ga.CustomRoutingEndpointGroupDestinationArgs;
import com.pulumi.alicloud.ga.inputs.CustomRoutingEndpointGroupDestinationState;
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.Integer;
import java.lang.String;
import java.util.List;
import javax.annotation.Nullable;
/**
* Provides a Global Accelerator (GA) Custom Routing Endpoint Group Destination resource.
*
* For information about Global Accelerator (GA) Custom Routing Endpoint Group Destination and how to use it, see [What is Custom Routing Endpoint Group Destination](https://www.alibabacloud.com/help/en/global-accelerator/latest/api-ga-2019-11-20-createcustomroutingendpointgroupdestinations).
*
* > **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.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.CustomRoutingEndpointGroupDestination;
* import com.pulumi.alicloud.ga.CustomRoutingEndpointGroupDestinationArgs;
* 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");
* var default_ = new Accelerator("default", 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(default_.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 defaultCustomRoutingEndpointGroupDestination = new CustomRoutingEndpointGroupDestination("defaultCustomRoutingEndpointGroupDestination", CustomRoutingEndpointGroupDestinationArgs.builder()
* .endpointGroupId(defaultCustomRoutingEndpointGroup.id())
* .protocols("TCP")
* .fromPort(1)
* .toPort(2)
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* Global Accelerator (GA) Custom Routing Endpoint Group Destination can be imported using the id, e.g.
*
* ```sh
* $ pulumi import alicloud:ga/customRoutingEndpointGroupDestination:CustomRoutingEndpointGroupDestination example <endpoint_group_id>:<custom_routing_endpoint_group_destination_id>
* ```
*
*/
@ResourceType(type="alicloud:ga/customRoutingEndpointGroupDestination:CustomRoutingEndpointGroupDestination")
public class CustomRoutingEndpointGroupDestination extends com.pulumi.resources.CustomResource {
/**
* The ID of the GA instance.
*
*/
@Export(name="acceleratorId", refs={String.class}, tree="[0]")
private Output acceleratorId;
/**
* @return The ID of the GA instance.
*
*/
public Output acceleratorId() {
return this.acceleratorId;
}
/**
* The ID of the Custom Routing Endpoint Group Destination.
*
*/
@Export(name="customRoutingEndpointGroupDestinationId", refs={String.class}, tree="[0]")
private Output customRoutingEndpointGroupDestinationId;
/**
* @return The ID of the Custom Routing Endpoint Group Destination.
*
*/
public Output customRoutingEndpointGroupDestinationId() {
return this.customRoutingEndpointGroupDestinationId;
}
/**
* The ID of the endpoint group.
*
*/
@Export(name="endpointGroupId", refs={String.class}, tree="[0]")
private Output endpointGroupId;
/**
* @return The ID of the endpoint group.
*
*/
public Output endpointGroupId() {
return this.endpointGroupId;
}
/**
* The start port of the backend service port range of the endpoint group. The `from_port` value must be smaller than or equal to the `to_port` value. Valid values: `1` to `65499`.
*
*/
@Export(name="fromPort", refs={Integer.class}, tree="[0]")
private Output fromPort;
/**
* @return The start port of the backend service port range of the endpoint group. The `from_port` value must be smaller than or equal to the `to_port` value. Valid values: `1` to `65499`.
*
*/
public Output fromPort() {
return this.fromPort;
}
/**
* The ID of the listener.
*
*/
@Export(name="listenerId", refs={String.class}, tree="[0]")
private Output listenerId;
/**
* @return The ID of the listener.
*
*/
public Output listenerId() {
return this.listenerId;
}
/**
* The backend service protocol of the endpoint group. Valid values: `TCP`, `UDP`, `TCP, UDP`.
*
*/
@Export(name="protocols", refs={List.class,String.class}, tree="[0,1]")
private Output> protocols;
/**
* @return The backend service protocol of the endpoint group. Valid values: `TCP`, `UDP`, `TCP, UDP`.
*
*/
public Output> protocols() {
return this.protocols;
}
/**
* The status of the Custom Routing Endpoint Group Destination.
*
*/
@Export(name="status", refs={String.class}, tree="[0]")
private Output status;
/**
* @return The status of the Custom Routing Endpoint Group Destination.
*
*/
public Output status() {
return this.status;
}
/**
* The end port of the backend service port range of the endpoint group. The `from_port` value must be smaller than or equal to the `to_port` value. Valid values: `1` to `65499`.
*
*/
@Export(name="toPort", refs={Integer.class}, tree="[0]")
private Output toPort;
/**
* @return The end port of the backend service port range of the endpoint group. The `from_port` value must be smaller than or equal to the `to_port` value. Valid values: `1` to `65499`.
*
*/
public Output toPort() {
return this.toPort;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public CustomRoutingEndpointGroupDestination(String name) {
this(name, CustomRoutingEndpointGroupDestinationArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public CustomRoutingEndpointGroupDestination(String name, CustomRoutingEndpointGroupDestinationArgs 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 CustomRoutingEndpointGroupDestination(String name, CustomRoutingEndpointGroupDestinationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("alicloud:ga/customRoutingEndpointGroupDestination:CustomRoutingEndpointGroupDestination", name, args == null ? CustomRoutingEndpointGroupDestinationArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
}
private CustomRoutingEndpointGroupDestination(String name, Output id, @Nullable CustomRoutingEndpointGroupDestinationState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("alicloud:ga/customRoutingEndpointGroupDestination:CustomRoutingEndpointGroupDestination", name, state, makeResourceOptions(options, id));
}
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 CustomRoutingEndpointGroupDestination get(String name, Output id, @Nullable CustomRoutingEndpointGroupDestinationState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new CustomRoutingEndpointGroupDestination(name, id, state, options);
}
}