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

com.pulumi.alicloud.cs.KubernetesAddon 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.cs;

import com.pulumi.alicloud.Utilities;
import com.pulumi.alicloud.cs.KubernetesAddonArgs;
import com.pulumi.alicloud.cs.inputs.KubernetesAddonState;
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.String;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * ## Example Usage
 * 
 * Basic Usage
 * 
 * ## Import
 * 
 * Cluster addon can be imported by cluster id and addon name. Then write the addon.tf file according to the result of `pulumi preview`.
 * 
 * ```sh
 * $ pulumi import alicloud:cs/kubernetesAddon:KubernetesAddon my_addon <cluster_id>:<addon_name>
 * ```
 * 
 */
@ResourceType(type="alicloud:cs/kubernetesAddon:KubernetesAddon")
public class KubernetesAddon extends com.pulumi.resources.CustomResource {
    /**
     * Is the addon ready for upgrade.
     * 
     */
    @Export(name="canUpgrade", refs={Boolean.class}, tree="[0]")
    private Output canUpgrade;

    /**
     * @return Is the addon ready for upgrade.
     * 
     */
    public Output canUpgrade() {
        return this.canUpgrade;
    }
    /**
     * Whether to clean up cloud resources when deleting. Currently only works for addon `ack-virtual-node` and you must specify it when uninstall addon `ack-virtual-node`. Valid values: `true`: clean up, `false`: do not clean up.
     * 
     */
    @Export(name="cleanupCloudResources", refs={Boolean.class}, tree="[0]")
    private Output cleanupCloudResources;

    /**
     * @return Whether to clean up cloud resources when deleting. Currently only works for addon `ack-virtual-node` and you must specify it when uninstall addon `ack-virtual-node`. Valid values: `true`: clean up, `false`: do not clean up.
     * 
     */
    public Output> cleanupCloudResources() {
        return Codegen.optional(this.cleanupCloudResources);
    }
    /**
     * The id of kubernetes cluster.
     * 
     */
    @Export(name="clusterId", refs={String.class}, tree="[0]")
    private Output clusterId;

    /**
     * @return The id of kubernetes cluster.
     * 
     */
    public Output clusterId() {
        return this.clusterId;
    }
    /**
     * The customized configuration of addon. Your customized configuration will be merged to existed configuration stored in server. If you want to clean one configuration, you must set the configuration to empty value, removing from code cannot make effect. You can checkout the customized configuration of the addon through datasource `alicloud.cs.getKubernetesAddonMetadata`, the returned format is the standard json schema. If return empty, it means that the addon does not support custom configuration yet. You can also checkout the current custom configuration through the data source `alicloud.cs.getKubernetesAddons`.
     * 
     */
    @Export(name="config", refs={String.class}, tree="[0]")
    private Output config;

    /**
     * @return The customized configuration of addon. Your customized configuration will be merged to existed configuration stored in server. If you want to clean one configuration, you must set the configuration to empty value, removing from code cannot make effect. You can checkout the customized configuration of the addon through datasource `alicloud.cs.getKubernetesAddonMetadata`, the returned format is the standard json schema. If return empty, it means that the addon does not support custom configuration yet. You can also checkout the current custom configuration through the data source `alicloud.cs.getKubernetesAddons`.
     * 
     */
    public Output config() {
        return this.config;
    }
    /**
     * The name of addon.
     * 
     */
    @Export(name="name", refs={String.class}, tree="[0]")
    private Output name;

    /**
     * @return The name of addon.
     * 
     */
    public Output name() {
        return this.name;
    }
    /**
     * The version which addon can be upgraded to.
     * 
     */
    @Export(name="nextVersion", refs={String.class}, tree="[0]")
    private Output nextVersion;

    /**
     * @return The version which addon can be upgraded to.
     * 
     */
    public Output nextVersion() {
        return this.nextVersion;
    }
    /**
     * Is it a mandatory addon to be installed.
     * 
     */
    @Export(name="required", refs={Boolean.class}, tree="[0]")
    private Output required;

    /**
     * @return Is it a mandatory addon to be installed.
     * 
     */
    public Output required() {
        return this.required;
    }
    /**
     * The current version of addon.
     * 
     */
    @Export(name="version", refs={String.class}, tree="[0]")
    private Output version;

    /**
     * @return The current version of addon.
     * 
     */
    public Output version() {
        return this.version;
    }

    /**
     *
     * @param name The _unique_ name of the resulting resource.
     */
    public KubernetesAddon(java.lang.String name) {
        this(name, KubernetesAddonArgs.Empty);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     */
    public KubernetesAddon(java.lang.String name, KubernetesAddonArgs 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 KubernetesAddon(java.lang.String name, KubernetesAddonArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("alicloud:cs/kubernetesAddon:KubernetesAddon", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
    }

    private KubernetesAddon(java.lang.String name, Output id, @Nullable KubernetesAddonState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("alicloud:cs/kubernetesAddon:KubernetesAddon", name, state, makeResourceOptions(options, id), false);
    }

    private static KubernetesAddonArgs makeArgs(KubernetesAddonArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        if (options != null && options.getUrn().isPresent()) {
            return null;
        }
        return args == null ? KubernetesAddonArgs.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 KubernetesAddon get(java.lang.String name, Output id, @Nullable KubernetesAddonState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        return new KubernetesAddon(name, id, state, options);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy