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

com.pulumi.azurenative.servicefabric.ManagedClusterService Maven / Gradle / Ivy

There is a newer version: 2.82.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.servicefabric;

import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.servicefabric.ManagedClusterServiceArgs;
import com.pulumi.azurenative.servicefabric.outputs.StatefulServicePropertiesResponse;
import com.pulumi.azurenative.servicefabric.outputs.StatelessServicePropertiesResponse;
import com.pulumi.azurenative.servicefabric.outputs.SystemDataResponse;
import com.pulumi.core.Alias;
import com.pulumi.core.Either;
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.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * The service resource.
 * Azure REST API version: 2023-03-01-preview.
 * 
 * Other available API versions: 2023-07-01-preview, 2023-09-01-preview, 2023-11-01-preview, 2023-12-01-preview, 2024-02-01-preview, 2024-04-01, 2024-06-01-preview.
 * 
 * ## Example Usage
 * ### Put a service with maximum parameters
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.servicefabric.ManagedClusterService;
 * import com.pulumi.azurenative.servicefabric.ManagedClusterServiceArgs;
 * 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 managedClusterService = new ManagedClusterService("managedClusterService", ManagedClusterServiceArgs.builder()
 *             .applicationName("myApp")
 *             .clusterName("myCluster")
 *             .location("eastus")
 *             .properties(StatelessServicePropertiesArgs.builder()
 *                 .correlationScheme(ServiceCorrelationArgs.builder()
 *                     .scheme("AlignedAffinity")
 *                     .serviceName("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp/services/myService1")
 *                     .build())
 *                 .defaultMoveCost("Medium")
 *                 .instanceCount(5)
 *                 .minInstanceCount(3)
 *                 .minInstancePercentage(30)
 *                 .partitionDescription(SingletonPartitionSchemeArgs.builder()
 *                     .partitionScheme("Singleton")
 *                     .build())
 *                 .placementConstraints("NodeType==frontend")
 *                 .scalingPolicies(ScalingPolicyArgs.builder()
 *                     .scalingMechanism(AddRemoveIncrementalNamedPartitionScalingMechanismArgs.builder()
 *                         .kind("ScalePartitionInstanceCount")
 *                         .maxInstanceCount(9)
 *                         .minInstanceCount(3)
 *                         .scaleIncrement(2)
 *                         .build())
 *                     .scalingTrigger(AveragePartitionLoadScalingTriggerArgs.builder()
 *                         .kind("AveragePartitionLoadTrigger")
 *                         .lowerLoadThreshold(2)
 *                         .metricName("metricName")
 *                         .scaleInterval("00:01:00")
 *                         .upperLoadThreshold(8)
 *                         .build())
 *                     .build())
 *                 .serviceDnsName("myservicednsname.myApp")
 *                 .serviceKind("Stateless")
 *                 .serviceLoadMetrics(ServiceLoadMetricArgs.builder()
 *                     .defaultLoad(3)
 *                     .name("metric1")
 *                     .weight("Low")
 *                     .build())
 *                 .servicePackageActivationMode("SharedProcess")
 *                 .servicePlacementPolicies(ServicePlacementNonPartiallyPlaceServicePolicyArgs.builder()
 *                     .type("NonPartiallyPlaceService")
 *                     .build())
 *                 .serviceTypeName("myServiceType")
 *                 .build())
 *             .resourceGroupName("resRg")
 *             .serviceName("myService")
 *             .tags(Map.of("a", "b"))
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### Put a service with minimum parameters * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.servicefabric.ManagedClusterService;
 * import com.pulumi.azurenative.servicefabric.ManagedClusterServiceArgs;
 * 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 managedClusterService = new ManagedClusterService("managedClusterService", ManagedClusterServiceArgs.builder()
 *             .applicationName("myApp")
 *             .clusterName("myCluster")
 *             .location("eastus")
 *             .properties(StatelessServicePropertiesArgs.builder()
 *                 .instanceCount(1)
 *                 .partitionDescription(SingletonPartitionSchemeArgs.builder()
 *                     .partitionScheme("Singleton")
 *                     .build())
 *                 .serviceKind("Stateless")
 *                 .serviceTypeName("myServiceType")
 *                 .build())
 *             .resourceGroupName("resRg")
 *             .serviceName("myService")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:servicefabric:ManagedClusterService myService /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} * ``` * */ @ResourceType(type="azure-native:servicefabric:ManagedClusterService") public class ManagedClusterService extends com.pulumi.resources.CustomResource { /** * Resource location depends on the parent resource. * */ @Export(name="location", refs={String.class}, tree="[0]") private Output location; /** * @return Resource location depends on the parent resource. * */ public Output> location() { return Codegen.optional(this.location); } /** * Azure resource name. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return Azure resource name. * */ public Output name() { return this.name; } /** * The service resource properties. * */ @Export(name="properties", refs={Either.class,StatefulServicePropertiesResponse.class,StatelessServicePropertiesResponse.class}, tree="[0,1,2]") private Output> properties; /** * @return The service resource properties. * */ public Output> properties() { return this.properties; } /** * Metadata pertaining to creation and last modification of the resource. * */ @Export(name="systemData", refs={SystemDataResponse.class}, tree="[0]") private Output systemData; /** * @return Metadata pertaining to creation and last modification of the resource. * */ public Output systemData() { return this.systemData; } /** * Azure resource tags. * */ @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tags; /** * @return Azure resource tags. * */ public Output>> tags() { return Codegen.optional(this.tags); } /** * Azure resource type. * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return Azure resource type. * */ public Output type() { return this.type; } /** * * @param name The _unique_ name of the resulting resource. */ public ManagedClusterService(java.lang.String name) { this(name, ManagedClusterServiceArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public ManagedClusterService(java.lang.String name, ManagedClusterServiceArgs 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 ManagedClusterService(java.lang.String name, ManagedClusterServiceArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:servicefabric:ManagedClusterService", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private ManagedClusterService(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:servicefabric:ManagedClusterService", name, null, makeResourceOptions(options, id), false); } private static ManagedClusterServiceArgs makeArgs(ManagedClusterServiceArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? ManagedClusterServiceArgs.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:servicefabric/v20210101preview:ManagedClusterService").build()), Output.of(Alias.builder().type("azure-native:servicefabric/v20210501:ManagedClusterService").build()), Output.of(Alias.builder().type("azure-native:servicefabric/v20210701preview:ManagedClusterService").build()), Output.of(Alias.builder().type("azure-native:servicefabric/v20210901privatepreview:ManagedClusterService").build()), Output.of(Alias.builder().type("azure-native:servicefabric/v20211101preview:ManagedClusterService").build()), Output.of(Alias.builder().type("azure-native:servicefabric/v20220101:ManagedClusterService").build()), Output.of(Alias.builder().type("azure-native:servicefabric/v20220201preview:ManagedClusterService").build()), Output.of(Alias.builder().type("azure-native:servicefabric/v20220601preview:ManagedClusterService").build()), Output.of(Alias.builder().type("azure-native:servicefabric/v20220801preview:ManagedClusterService").build()), Output.of(Alias.builder().type("azure-native:servicefabric/v20221001preview:ManagedClusterService").build()), Output.of(Alias.builder().type("azure-native:servicefabric/v20230201preview:ManagedClusterService").build()), Output.of(Alias.builder().type("azure-native:servicefabric/v20230301preview:ManagedClusterService").build()), Output.of(Alias.builder().type("azure-native:servicefabric/v20230701preview:ManagedClusterService").build()), Output.of(Alias.builder().type("azure-native:servicefabric/v20230901preview:ManagedClusterService").build()), Output.of(Alias.builder().type("azure-native:servicefabric/v20231101preview:ManagedClusterService").build()), Output.of(Alias.builder().type("azure-native:servicefabric/v20231201preview:ManagedClusterService").build()), Output.of(Alias.builder().type("azure-native:servicefabric/v20240201preview:ManagedClusterService").build()), Output.of(Alias.builder().type("azure-native:servicefabric/v20240401:ManagedClusterService").build()), Output.of(Alias.builder().type("azure-native:servicefabric/v20240601preview:ManagedClusterService").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 ManagedClusterService get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new ManagedClusterService(name, id, options); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy