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

com.pulumi.alicloud.ga.BasicEndpointGroup 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.BasicEndpointGroupArgs;
import com.pulumi.alicloud.ga.inputs.BasicEndpointGroupState;
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 Global Accelerator (GA) Basic Endpoint Group resource.
 * 
 * For information about Global Accelerator (GA) Basic Endpoint Group and how to use it, see [What is Basic Endpoint Group](https://www.alibabacloud.com/help/en/global-accelerator/latest/api-ga-2019-11-20-createbasicendpointgroup).
 * 
 * > **NOTE:** Available since v1.194.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.slb.ApplicationLoadBalancer;
 * import com.pulumi.alicloud.slb.ApplicationLoadBalancerArgs;
 * import com.pulumi.alicloud.ga.BasicAccelerator;
 * import com.pulumi.alicloud.ga.BasicAcceleratorArgs;
 * import com.pulumi.alicloud.ga.BasicEndpointGroup;
 * import com.pulumi.alicloud.ga.BasicEndpointGroupArgs;
 * 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 endpointGroupRegion = config.get("endpointGroupRegion").orElse("cn-beijing");
 *         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 defaultApplicationLoadBalancer = new ApplicationLoadBalancer("defaultApplicationLoadBalancer", ApplicationLoadBalancerArgs.builder()
 *             .loadBalancerName("terraform-example")
 *             .vswitchId(defaultSwitch.id())
 *             .loadBalancerSpec("slb.s2.small")
 *             .addressType("intranet")
 *             .build());
 * 
 *         var defaultBasicAccelerator = new BasicAccelerator("defaultBasicAccelerator", BasicAcceleratorArgs.builder()
 *             .duration(1)
 *             .basicAcceleratorName("terraform-example")
 *             .description("terraform-example")
 *             .bandwidthBillingType("CDT")
 *             .autoUseCoupon("true")
 *             .autoPay(true)
 *             .build());
 * 
 *         var defaultBasicEndpointGroup = new BasicEndpointGroup("defaultBasicEndpointGroup", BasicEndpointGroupArgs.builder()
 *             .acceleratorId(defaultBasicAccelerator.id())
 *             .endpointGroupRegion(endpointGroupRegion)
 *             .endpointType("SLB")
 *             .endpointAddress(defaultApplicationLoadBalancer.id())
 *             .endpointSubAddress("192.168.0.1")
 *             .basicEndpointGroupName("terraform-example")
 *             .description("terraform-example")
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * Global Accelerator (GA) Basic Endpoint Group can be imported using the id, e.g. * * ```sh * $ pulumi import alicloud:ga/basicEndpointGroup:BasicEndpointGroup example <id> * ``` * */ @ResourceType(type="alicloud:ga/basicEndpointGroup:BasicEndpointGroup") public class BasicEndpointGroup extends com.pulumi.resources.CustomResource { /** * The ID of the basic GA instance. * */ @Export(name="acceleratorId", refs={String.class}, tree="[0]") private Output acceleratorId; /** * @return The ID of the basic GA instance. * */ public Output acceleratorId() { return this.acceleratorId; } /** * The name of the endpoint group. The `basic_endpoint_group_name` must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter. * */ @Export(name="basicEndpointGroupName", refs={String.class}, tree="[0]") private Output basicEndpointGroupName; /** * @return The name of the endpoint group. The `basic_endpoint_group_name` must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter. * */ public Output> basicEndpointGroupName() { return Codegen.optional(this.basicEndpointGroupName); } /** * The description of the endpoint group. The `description` cannot exceed 256 characters in length and cannot contain http:// or https://. * */ @Export(name="description", refs={String.class}, tree="[0]") private Output description; /** * @return The description of the endpoint group. The `description` cannot exceed 256 characters in length and cannot contain http:// or https://. * */ public Output> description() { return Codegen.optional(this.description); } /** * The address of the endpoint. * */ @Export(name="endpointAddress", refs={String.class}, tree="[0]") private Output endpointAddress; /** * @return The address of the endpoint. * */ public Output endpointAddress() { return this.endpointAddress; } /** * The ID of the region where you want to create the endpoint group. * */ @Export(name="endpointGroupRegion", refs={String.class}, tree="[0]") private Output endpointGroupRegion; /** * @return The ID of the region where you want to create the endpoint group. * */ public Output endpointGroupRegion() { return this.endpointGroupRegion; } /** * The sub address of the endpoint. * */ @Export(name="endpointSubAddress", refs={String.class}, tree="[0]") private Output endpointSubAddress; /** * @return The sub address of the endpoint. * */ public Output endpointSubAddress() { return this.endpointSubAddress; } /** * The type of the endpoint. Valid values: `ENI`, `SLB` and `ECS`. * */ @Export(name="endpointType", refs={String.class}, tree="[0]") private Output endpointType; /** * @return The type of the endpoint. Valid values: `ENI`, `SLB` and `ECS`. * */ public Output endpointType() { return this.endpointType; } /** * The status of the Basic Endpoint Group. * */ @Export(name="status", refs={String.class}, tree="[0]") private Output status; /** * @return The status of the Basic Endpoint Group. * */ public Output status() { return this.status; } /** * * @param name The _unique_ name of the resulting resource. */ public BasicEndpointGroup(java.lang.String name) { this(name, BasicEndpointGroupArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public BasicEndpointGroup(java.lang.String name, BasicEndpointGroupArgs 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 BasicEndpointGroup(java.lang.String name, BasicEndpointGroupArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("alicloud:ga/basicEndpointGroup:BasicEndpointGroup", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private BasicEndpointGroup(java.lang.String name, Output id, @Nullable BasicEndpointGroupState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("alicloud:ga/basicEndpointGroup:BasicEndpointGroup", name, state, makeResourceOptions(options, id), false); } private static BasicEndpointGroupArgs makeArgs(BasicEndpointGroupArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? BasicEndpointGroupArgs.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 BasicEndpointGroup get(java.lang.String name, Output id, @Nullable BasicEndpointGroupState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new BasicEndpointGroup(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy