
com.pulumi.azurenative.containerservice.AutoUpgradeProfile Maven / Gradle / Ivy
// *** 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.containerservice;
import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.containerservice.AutoUpgradeProfileArgs;
import com.pulumi.azurenative.containerservice.outputs.AutoUpgradeNodeImageSelectionResponse;
import com.pulumi.azurenative.containerservice.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.Optional;
import javax.annotation.Nullable;
/**
* The AutoUpgradeProfile resource.
* Azure REST API version: 2024-05-02-preview.
*
* ## Example Usage
* ### Create an AutoUpgradeProfile.
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.containerservice.AutoUpgradeProfile;
* import com.pulumi.azurenative.containerservice.AutoUpgradeProfileArgs;
* 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 autoUpgradeProfile = new AutoUpgradeProfile("autoUpgradeProfile", AutoUpgradeProfileArgs.builder()
* .autoUpgradeProfileName("autoupgradeprofile1")
* .channel("Stable")
* .fleetName("fleet1")
* .resourceGroupName("rg1")
* .build());
*
* }
* }
*
* }
*
*
* ## Import
*
* An existing resource can be imported using its type token, name, and identifier, e.g.
*
* ```sh
* $ pulumi import azure-native:containerservice:AutoUpgradeProfile autoupgradeprofile1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/autoUpgradeProfiles/{autoUpgradeProfileName}
* ```
*
*/
@ResourceType(type="azure-native:containerservice:AutoUpgradeProfile")
public class AutoUpgradeProfile extends com.pulumi.resources.CustomResource {
/**
* Configures how auto-upgrade will be run.
*
*/
@Export(name="channel", refs={String.class}, tree="[0]")
private Output channel;
/**
* @return Configures how auto-upgrade will be run.
*
*/
public Output channel() {
return this.channel;
}
/**
* If set to False: the auto upgrade has effect - target managed clusters will be upgraded on schedule.
* If set to True: the auto upgrade has no effect - no upgrade will be run on the target managed clusters.
* This is a boolean and not an enum because enabled/disabled are all available states of the auto upgrade profile.
* By default, this is set to False.
*
*/
@Export(name="disabled", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> disabled;
/**
* @return If set to False: the auto upgrade has effect - target managed clusters will be upgraded on schedule.
* If set to True: the auto upgrade has no effect - no upgrade will be run on the target managed clusters.
* This is a boolean and not an enum because enabled/disabled are all available states of the auto upgrade profile.
* By default, this is set to False.
*
*/
public Output> disabled() {
return Codegen.optional(this.disabled);
}
/**
* If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
*
*/
@Export(name="eTag", refs={String.class}, tree="[0]")
private Output eTag;
/**
* @return If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
*
*/
public Output eTag() {
return this.eTag;
}
/**
* 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;
}
/**
* The node image upgrade to be applied to the target clusters in auto upgrade.
*
*/
@Export(name="nodeImageSelection", refs={AutoUpgradeNodeImageSelectionResponse.class}, tree="[0]")
private Output* @Nullable */ AutoUpgradeNodeImageSelectionResponse> nodeImageSelection;
/**
* @return The node image upgrade to be applied to the target clusters in auto upgrade.
*
*/
public Output> nodeImageSelection() {
return Codegen.optional(this.nodeImageSelection);
}
/**
* The provisioning state of the AutoUpgradeProfile resource.
*
*/
@Export(name="provisioningState", refs={String.class}, tree="[0]")
private Output provisioningState;
/**
* @return The provisioning state of the AutoUpgradeProfile resource.
*
*/
public Output provisioningState() {
return this.provisioningState;
}
/**
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
*/
@Export(name="systemData", refs={SystemDataResponse.class}, tree="[0]")
private Output systemData;
/**
* @return Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
*/
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;
}
/**
* The resource id of the UpdateStrategy resource to reference. If not specified, the auto upgrade will run on all clusters which are members of the fleet.
*
*/
@Export(name="updateStrategyId", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> updateStrategyId;
/**
* @return The resource id of the UpdateStrategy resource to reference. If not specified, the auto upgrade will run on all clusters which are members of the fleet.
*
*/
public Output> updateStrategyId() {
return Codegen.optional(this.updateStrategyId);
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public AutoUpgradeProfile(java.lang.String name) {
this(name, AutoUpgradeProfileArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public AutoUpgradeProfile(java.lang.String name, AutoUpgradeProfileArgs 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 AutoUpgradeProfile(java.lang.String name, AutoUpgradeProfileArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:containerservice:AutoUpgradeProfile", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private AutoUpgradeProfile(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:containerservice:AutoUpgradeProfile", name, null, makeResourceOptions(options, id), false);
}
private static AutoUpgradeProfileArgs makeArgs(AutoUpgradeProfileArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? AutoUpgradeProfileArgs.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:containerservice/v20240502preview:AutoUpgradeProfile").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 AutoUpgradeProfile get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new AutoUpgradeProfile(name, id, options);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy