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

com.pulumi.alicloud.ackone.Cluster 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.ackone;

import com.pulumi.alicloud.Utilities;
import com.pulumi.alicloud.ackone.ClusterArgs;
import com.pulumi.alicloud.ackone.inputs.ClusterState;
import com.pulumi.alicloud.ackone.outputs.ClusterNetwork;
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 Ack One Cluster resource. Fleet Manager Cluster.
 * 
 * For information about Ack One Cluster and how to use it, see [What is Cluster](https://www.alibabacloud.com/help/en/ack/distributed-cloud-container-platform-for-kubernetes/developer-reference/api-adcp-2022-01-01-createhubcluster).
 * 
 * > **NOTE:** Available since v1.212.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.ackone.Cluster;
 * import com.pulumi.alicloud.ackone.ClusterArgs;
 * import com.pulumi.alicloud.ackone.inputs.ClusterNetworkArgs;
 * 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 = AlicloudFunctions.getZones(GetZonesArgs.builder()
 *             .availableResourceCreation("VSwitch")
 *             .build());
 * 
 *         var defaultVpc = new Network("defaultVpc", NetworkArgs.builder()
 *             .cidrBlock("172.16.0.0/12")
 *             .vpcName(name)
 *             .build());
 * 
 *         var defaultyVSwitch = new Switch("defaultyVSwitch", SwitchArgs.builder()
 *             .vpcId(defaultVpc.id())
 *             .cidrBlock("172.16.2.0/24")
 *             .zoneId(default_.zones()[0].id())
 *             .vswitchName(name)
 *             .build());
 * 
 *         var defaultCluster = new Cluster("defaultCluster", ClusterArgs.builder()
 *             .network(ClusterNetworkArgs.builder()
 *                 .vpcId(defaultVpc.id())
 *                 .vswitches(defaultyVSwitch.id())
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * Ack One Cluster can be imported using the id, e.g. * * ```sh * $ pulumi import alicloud:ackone/cluster:Cluster example <id> * ``` * */ @ResourceType(type="alicloud:ackone/cluster:Cluster") public class Cluster extends com.pulumi.resources.CustomResource { /** * Cluster name. * */ @Export(name="clusterName", refs={String.class}, tree="[0]") private Output clusterName; /** * @return Cluster name. * */ public Output clusterName() { return this.clusterName; } /** * Cluster creation time. * */ @Export(name="createTime", refs={String.class}, tree="[0]") private Output createTime; /** * @return Cluster creation time. * */ public Output createTime() { return this.createTime; } /** * Cluster network information. See `network` below. * */ @Export(name="network", refs={ClusterNetwork.class}, tree="[0]") private Output network; /** * @return Cluster network information. See `network` below. * */ public Output network() { return this.network; } /** * Cluster attributes. Valid values: 'Default', 'XFlow'. * */ @Export(name="profile", refs={String.class}, tree="[0]") private Output profile; /** * @return Cluster attributes. Valid values: 'Default', 'XFlow'. * */ public Output profile() { return this.profile; } /** * The status of the resource. * */ @Export(name="status", refs={String.class}, tree="[0]") private Output status; /** * @return The status of the resource. * */ public Output status() { return this.status; } /** * * @param name The _unique_ name of the resulting resource. */ public Cluster(java.lang.String name) { this(name, ClusterArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public Cluster(java.lang.String name, ClusterArgs 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 Cluster(java.lang.String name, ClusterArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("alicloud:ackone/cluster:Cluster", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private Cluster(java.lang.String name, Output id, @Nullable ClusterState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("alicloud:ackone/cluster:Cluster", name, state, makeResourceOptions(options, id), false); } private static ClusterArgs makeArgs(ClusterArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? ClusterArgs.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 Cluster get(java.lang.String name, Output id, @Nullable ClusterState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Cluster(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy