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

com.pulumi.azurenative.kubernetesconfiguration.Extension Maven / Gradle / Ivy

There is a newer version: 2.78.0
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.azurenative.kubernetesconfiguration;

import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.kubernetesconfiguration.ExtensionArgs;
import com.pulumi.azurenative.kubernetesconfiguration.outputs.ErrorDetailResponse;
import com.pulumi.azurenative.kubernetesconfiguration.outputs.ExtensionResponseAksAssignedIdentity;
import com.pulumi.azurenative.kubernetesconfiguration.outputs.ExtensionStatusResponse;
import com.pulumi.azurenative.kubernetesconfiguration.outputs.IdentityResponse;
import com.pulumi.azurenative.kubernetesconfiguration.outputs.PlanResponse;
import com.pulumi.azurenative.kubernetesconfiguration.outputs.ScopeResponse;
import com.pulumi.azurenative.kubernetesconfiguration.outputs.SystemDataResponse;
import com.pulumi.core.Alias;
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.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * The Extension object.
 * Azure REST API version: 2023-05-01. Prior API version in Azure Native 1.x: 2020-07-01-preview.
 * 
 * Other available API versions: 2020-07-01-preview, 2022-04-02-preview, 2022-07-01.
 * 
 * ## Example Usage
 * ### Create Extension
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.kubernetesconfiguration.Extension;
 * import com.pulumi.azurenative.kubernetesconfiguration.ExtensionArgs;
 * import com.pulumi.azurenative.kubernetesconfiguration.inputs.ScopeArgs;
 * import com.pulumi.azurenative.kubernetesconfiguration.inputs.ScopeClusterArgs;
 * 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) {
 *         var extension = new Extension("extension", ExtensionArgs.builder()
 *             .autoUpgradeMinorVersion(true)
 *             .clusterName("clusterName1")
 *             .clusterResourceName("connectedClusters")
 *             .clusterRp("Microsoft.Kubernetes")
 *             .configurationProtectedSettings(Map.of("omsagent.secret.key", "secretKeyValue01"))
 *             .configurationSettings(Map.ofEntries(
 *                 Map.entry("omsagent.env.clusterName", "clusterName1"),
 *                 Map.entry("omsagent.secret.wsid", "fakeTokenPlaceholder")
 *             ))
 *             .extensionName("ClusterMonitor")
 *             .extensionType("azuremonitor-containers")
 *             .releaseTrain("Preview")
 *             .resourceGroupName("rg1")
 *             .scope(ScopeArgs.builder()
 *                 .cluster(ScopeClusterArgs.builder()
 *                     .releaseNamespace("kube-system")
 *                     .build())
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### Create Extension with Plan * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.kubernetesconfiguration.Extension;
 * import com.pulumi.azurenative.kubernetesconfiguration.ExtensionArgs;
 * import com.pulumi.azurenative.kubernetesconfiguration.inputs.PlanArgs;
 * 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) {
 *         var extension = new Extension("extension", ExtensionArgs.builder()
 *             .autoUpgradeMinorVersion(true)
 *             .clusterName("clusterName1")
 *             .clusterResourceName("connectedClusters")
 *             .clusterRp("Microsoft.Kubernetes")
 *             .extensionName("azureVote")
 *             .extensionType("azure-vote")
 *             .plan(PlanArgs.builder()
 *                 .name("azure-vote-standard")
 *                 .product("azure-vote-standard-offer-id")
 *                 .publisher("Microsoft")
 *                 .build())
 *             .releaseTrain("Preview")
 *             .resourceGroupName("rg1")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:kubernetesconfiguration:Extension azureVote /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName} * ``` * */ @ResourceType(type="azure-native:kubernetesconfiguration:Extension") public class Extension extends com.pulumi.resources.CustomResource { /** * Identity of the Extension resource in an AKS cluster * */ @Export(name="aksAssignedIdentity", refs={ExtensionResponseAksAssignedIdentity.class}, tree="[0]") private Output aksAssignedIdentity; /** * @return Identity of the Extension resource in an AKS cluster * */ public Output> aksAssignedIdentity() { return Codegen.optional(this.aksAssignedIdentity); } /** * Flag to note if this extension participates in auto upgrade of minor version, or not. * */ @Export(name="autoUpgradeMinorVersion", refs={Boolean.class}, tree="[0]") private Output autoUpgradeMinorVersion; /** * @return Flag to note if this extension participates in auto upgrade of minor version, or not. * */ public Output> autoUpgradeMinorVersion() { return Codegen.optional(this.autoUpgradeMinorVersion); } /** * Configuration settings that are sensitive, as name-value pairs for configuring this extension. * */ @Export(name="configurationProtectedSettings", refs={Map.class,String.class}, tree="[0,1,1]") private Output> configurationProtectedSettings; /** * @return Configuration settings that are sensitive, as name-value pairs for configuring this extension. * */ public Output>> configurationProtectedSettings() { return Codegen.optional(this.configurationProtectedSettings); } /** * Configuration settings, as name-value pairs for configuring this extension. * */ @Export(name="configurationSettings", refs={Map.class,String.class}, tree="[0,1,1]") private Output> configurationSettings; /** * @return Configuration settings, as name-value pairs for configuring this extension. * */ public Output>> configurationSettings() { return Codegen.optional(this.configurationSettings); } /** * Currently installed version of the extension. * */ @Export(name="currentVersion", refs={String.class}, tree="[0]") private Output currentVersion; /** * @return Currently installed version of the extension. * */ public Output currentVersion() { return this.currentVersion; } /** * Custom Location settings properties. * */ @Export(name="customLocationSettings", refs={Map.class,String.class}, tree="[0,1,1]") private Output> customLocationSettings; /** * @return Custom Location settings properties. * */ public Output> customLocationSettings() { return this.customLocationSettings; } /** * Error information from the Agent - e.g. errors during installation. * */ @Export(name="errorInfo", refs={ErrorDetailResponse.class}, tree="[0]") private Output errorInfo; /** * @return Error information from the Agent - e.g. errors during installation. * */ public Output errorInfo() { return this.errorInfo; } /** * Type of the Extension, of which this resource is an instance of. It must be one of the Extension Types registered with Microsoft.KubernetesConfiguration by the Extension publisher. * */ @Export(name="extensionType", refs={String.class}, tree="[0]") private Output extensionType; /** * @return Type of the Extension, of which this resource is an instance of. It must be one of the Extension Types registered with Microsoft.KubernetesConfiguration by the Extension publisher. * */ public Output> extensionType() { return Codegen.optional(this.extensionType); } /** * Identity of the Extension resource * */ @Export(name="identity", refs={IdentityResponse.class}, tree="[0]") private Output identity; /** * @return Identity of the Extension resource * */ public Output> identity() { return Codegen.optional(this.identity); } /** * Flag to note if this extension is a system extension * */ @Export(name="isSystemExtension", refs={Boolean.class}, tree="[0]") private Output isSystemExtension; /** * @return Flag to note if this extension is a system extension * */ public Output isSystemExtension() { return this.isSystemExtension; } /** * The name of the resource * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return The name of the resource * */ public Output name() { return this.name; } /** * Uri of the Helm package * */ @Export(name="packageUri", refs={String.class}, tree="[0]") private Output packageUri; /** * @return Uri of the Helm package * */ public Output packageUri() { return this.packageUri; } /** * The plan information. * */ @Export(name="plan", refs={PlanResponse.class}, tree="[0]") private Output plan; /** * @return The plan information. * */ public Output> plan() { return Codegen.optional(this.plan); } /** * Status of installation of this extension. * */ @Export(name="provisioningState", refs={String.class}, tree="[0]") private Output provisioningState; /** * @return Status of installation of this extension. * */ public Output provisioningState() { return this.provisioningState; } /** * ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - only if autoUpgradeMinorVersion is 'true'. * */ @Export(name="releaseTrain", refs={String.class}, tree="[0]") private Output releaseTrain; /** * @return ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - only if autoUpgradeMinorVersion is 'true'. * */ public Output> releaseTrain() { return Codegen.optional(this.releaseTrain); } /** * Scope at which the extension is installed. * */ @Export(name="scope", refs={ScopeResponse.class}, tree="[0]") private Output scope; /** * @return Scope at which the extension is installed. * */ public Output> scope() { return Codegen.optional(this.scope); } /** * Status from this extension. * */ @Export(name="statuses", refs={List.class,ExtensionStatusResponse.class}, tree="[0,1]") private Output> statuses; /** * @return Status from this extension. * */ public Output>> statuses() { return Codegen.optional(this.statuses); } /** * Top level metadata https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-contracts.md#system-metadata-for-all-azure-resources * */ @Export(name="systemData", refs={SystemDataResponse.class}, tree="[0]") private Output systemData; /** * @return Top level metadata https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-contracts.md#system-metadata-for-all-azure-resources * */ public Output systemData() { return this.systemData; } /** * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" * */ public Output type() { return this.type; } /** * User-specified version of the extension for this extension to 'pin'. To use 'version', autoUpgradeMinorVersion must be 'false'. * */ @Export(name="version", refs={String.class}, tree="[0]") private Output version; /** * @return User-specified version of the extension for this extension to 'pin'. To use 'version', autoUpgradeMinorVersion must be 'false'. * */ public Output> version() { return Codegen.optional(this.version); } /** * * @param name The _unique_ name of the resulting resource. */ public Extension(java.lang.String name) { this(name, ExtensionArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public Extension(java.lang.String name, ExtensionArgs 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 Extension(java.lang.String name, ExtensionArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:kubernetesconfiguration:Extension", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private Extension(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:kubernetesconfiguration:Extension", name, null, makeResourceOptions(options, id), false); } private static ExtensionArgs makeArgs(ExtensionArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? ExtensionArgs.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()) .aliases(List.of( Output.of(Alias.builder().type("azure-native:kubernetesconfiguration/v20200701preview:Extension").build()), Output.of(Alias.builder().type("azure-native:kubernetesconfiguration/v20210501preview:Extension").build()), Output.of(Alias.builder().type("azure-native:kubernetesconfiguration/v20210901:Extension").build()), Output.of(Alias.builder().type("azure-native:kubernetesconfiguration/v20211101preview:Extension").build()), Output.of(Alias.builder().type("azure-native:kubernetesconfiguration/v20220101preview:Extension").build()), Output.of(Alias.builder().type("azure-native:kubernetesconfiguration/v20220301:Extension").build()), Output.of(Alias.builder().type("azure-native:kubernetesconfiguration/v20220402preview:Extension").build()), Output.of(Alias.builder().type("azure-native:kubernetesconfiguration/v20220701:Extension").build()), Output.of(Alias.builder().type("azure-native:kubernetesconfiguration/v20221101:Extension").build()), Output.of(Alias.builder().type("azure-native:kubernetesconfiguration/v20230501:Extension").build()) )) .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 options Optional settings to control the behavior of the CustomResource. */ public static Extension get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Extension(name, id, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy