![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.azurenative.servicefabric.kotlin.ManagedClusterServiceArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-native-kotlin Show documentation
Show all versions of pulumi-azure-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.servicefabric.kotlin
import com.pulumi.azurenative.servicefabric.ManagedClusterServiceArgs.builder
import com.pulumi.azurenative.servicefabric.kotlin.inputs.StatefulServicePropertiesArgs
import com.pulumi.azurenative.servicefabric.kotlin.inputs.StatelessServicePropertiesArgs
import com.pulumi.core.Either
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* 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
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var managedClusterService = new AzureNative.ServiceFabric.ManagedClusterService("managedClusterService", new()
* {
* ApplicationName = "myApp",
* ClusterName = "myCluster",
* Location = "eastus",
* Properties = new AzureNative.ServiceFabric.Inputs.StatelessServicePropertiesArgs
* {
* CorrelationScheme = new[]
* {
* new AzureNative.ServiceFabric.Inputs.ServiceCorrelationArgs
* {
* Scheme = AzureNative.ServiceFabric.ServiceCorrelationScheme.AlignedAffinity,
* ServiceName = "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp/services/myService1",
* },
* },
* DefaultMoveCost = AzureNative.ServiceFabric.MoveCost.Medium,
* InstanceCount = 5,
* MinInstanceCount = 3,
* MinInstancePercentage = 30,
* PartitionDescription = new AzureNative.ServiceFabric.Inputs.SingletonPartitionSchemeArgs
* {
* PartitionScheme = "Singleton",
* },
* PlacementConstraints = "NodeType==frontend",
* ScalingPolicies = new[]
* {
* new AzureNative.ServiceFabric.Inputs.ScalingPolicyArgs
* {
* ScalingMechanism = new AzureNative.ServiceFabric.Inputs.PartitionInstanceCountScaleMechanismArgs
* {
* Kind = "ScalePartitionInstanceCount",
* MaxInstanceCount = 9,
* MinInstanceCount = 3,
* ScaleIncrement = 2,
* },
* ScalingTrigger = new AzureNative.ServiceFabric.Inputs.AveragePartitionLoadScalingTriggerArgs
* {
* Kind = "AveragePartitionLoadTrigger",
* LowerLoadThreshold = 2,
* MetricName = "metricName",
* ScaleInterval = "00:01:00",
* UpperLoadThreshold = 8,
* },
* },
* },
* ServiceDnsName = "myservicednsname.myApp",
* ServiceKind = "Stateless",
* ServiceLoadMetrics = new[]
* {
* new AzureNative.ServiceFabric.Inputs.ServiceLoadMetricArgs
* {
* DefaultLoad = 3,
* Name = "metric1",
* Weight = AzureNative.ServiceFabric.ServiceLoadMetricWeight.Low,
* },
* },
* ServicePackageActivationMode = AzureNative.ServiceFabric.ServicePackageActivationMode.SharedProcess,
* ServicePlacementPolicies = new[]
* {
* new AzureNative.ServiceFabric.Inputs.ServicePlacementNonPartiallyPlaceServicePolicyArgs
* {
* Type = "NonPartiallyPlaceService",
* },
* },
* ServiceTypeName = "myServiceType",
* },
* ResourceGroupName = "resRg",
* ServiceName = "myService",
* Tags =
* {
* { "a", "b" },
* },
* });
* });
* ```
* ```go
* package main
* import (
* servicefabric "github.com/pulumi/pulumi-azure-native-sdk/servicefabric/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := servicefabric.NewManagedClusterService(ctx, "managedClusterService", &servicefabric.ManagedClusterServiceArgs{
* ApplicationName: pulumi.String("myApp"),
* ClusterName: pulumi.String("myCluster"),
* Location: pulumi.String("eastus"),
* Properties: &servicefabric.StatelessServicePropertiesArgs{
* CorrelationScheme: servicefabric.ServiceCorrelationArray{
* &servicefabric.ServiceCorrelationArgs{
* Scheme: pulumi.String(servicefabric.ServiceCorrelationSchemeAlignedAffinity),
* ServiceName: pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp/services/myService1"),
* },
* },
* DefaultMoveCost: pulumi.String(servicefabric.MoveCostMedium),
* InstanceCount: pulumi.Int(5),
* MinInstanceCount: pulumi.Int(3),
* MinInstancePercentage: pulumi.Int(30),
* PartitionDescription: servicefabric.SingletonPartitionScheme{
* PartitionScheme: "Singleton",
* },
* PlacementConstraints: pulumi.String("NodeType==frontend"),
* ScalingPolicies: servicefabric.ScalingPolicyArray{
* &servicefabric.ScalingPolicyArgs{
* ScalingMechanism: servicefabric.PartitionInstanceCountScaleMechanism{
* Kind: "ScalePartitionInstanceCount",
* MaxInstanceCount: 9,
* MinInstanceCount: 3,
* ScaleIncrement: 2,
* },
* ScalingTrigger: servicefabric.AveragePartitionLoadScalingTrigger{
* Kind: "AveragePartitionLoadTrigger",
* LowerLoadThreshold: 2,
* MetricName: "metricName",
* ScaleInterval: "00:01:00",
* UpperLoadThreshold: 8,
* },
* },
* },
* ServiceDnsName: pulumi.String("myservicednsname.myApp"),
* ServiceKind: pulumi.String("Stateless"),
* ServiceLoadMetrics: servicefabric.ServiceLoadMetricArray{
* &servicefabric.ServiceLoadMetricArgs{
* DefaultLoad: pulumi.Int(3),
* Name: pulumi.String("metric1"),
* Weight: pulumi.String(servicefabric.ServiceLoadMetricWeightLow),
* },
* },
* ServicePackageActivationMode: pulumi.String(servicefabric.ServicePackageActivationModeSharedProcess),
* ServicePlacementPolicies: pulumi.Array{
* servicefabric.ServicePlacementNonPartiallyPlaceServicePolicy{
* Type: "NonPartiallyPlaceService",
* },
* },
* ServiceTypeName: pulumi.String("myServiceType"),
* },
* ResourceGroupName: pulumi.String("resRg"),
* ServiceName: pulumi.String("myService"),
* Tags: pulumi.StringMap{
* "a": pulumi.String("b"),
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* 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
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var managedClusterService = new AzureNative.ServiceFabric.ManagedClusterService("managedClusterService", new()
* {
* ApplicationName = "myApp",
* ClusterName = "myCluster",
* Location = "eastus",
* Properties = new AzureNative.ServiceFabric.Inputs.StatelessServicePropertiesArgs
* {
* InstanceCount = 1,
* PartitionDescription = new AzureNative.ServiceFabric.Inputs.SingletonPartitionSchemeArgs
* {
* PartitionScheme = "Singleton",
* },
* ServiceKind = "Stateless",
* ServiceTypeName = "myServiceType",
* },
* ResourceGroupName = "resRg",
* ServiceName = "myService",
* });
* });
* ```
* ```go
* package main
* import (
* servicefabric "github.com/pulumi/pulumi-azure-native-sdk/servicefabric/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := servicefabric.NewManagedClusterService(ctx, "managedClusterService", &servicefabric.ManagedClusterServiceArgs{
* ApplicationName: pulumi.String("myApp"),
* ClusterName: pulumi.String("myCluster"),
* Location: pulumi.String("eastus"),
* Properties: &servicefabric.StatelessServicePropertiesArgs{
* InstanceCount: pulumi.Int(1),
* PartitionDescription: servicefabric.SingletonPartitionScheme{
* PartitionScheme: "Singleton",
* },
* ServiceKind: pulumi.String("Stateless"),
* ServiceTypeName: pulumi.String("myServiceType"),
* },
* ResourceGroupName: pulumi.String("resRg"),
* ServiceName: pulumi.String("myService"),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* 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}
* ```
* @property applicationName The name of the application resource.
* @property clusterName The name of the cluster resource.
* @property location Resource location depends on the parent resource.
* @property properties The service resource properties.
* @property resourceGroupName The name of the resource group.
* @property serviceName The name of the service resource in the format of {applicationName}~{serviceName}.
* @property tags Azure resource tags.
*/
public data class ManagedClusterServiceArgs(
public val applicationName: Output? = null,
public val clusterName: Output? = null,
public val location: Output? = null,
public val properties: Output>? = null,
public val resourceGroupName: Output? = null,
public val serviceName: Output? = null,
public val tags: Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy