ManagedClusterServiceArgs

data class ManagedClusterServiceArgs(val applicationName: Output<String>? = null, val clusterName: Output<String>? = null, val location: Output<String>? = null, val properties: Output<Either<StatefulServicePropertiesArgs, StatelessServicePropertiesArgs>>? = null, val resourceGroupName: Output<String>? = null, val serviceName: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<ManagedClusterServiceArgs>

The service resource. Uses Azure REST API version 2024-04-01. In version 2.x of the Azure Native provider, it used API version 2023-03-01-preview. Other available API versions: 2023-03-01-preview, 2023-07-01-preview, 2023-09-01-preview, 2023-11-01-preview, 2023-12-01-preview, 2024-02-01-preview, 2024-06-01-preview, 2024-09-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native servicefabric [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

Example Usage

Put a service with maximum parameters

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" },
},
});
});
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
})
}
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

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",
});
});
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
})
}
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.

$ pulumi import azure-native:servicefabric:ManagedClusterService myService /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName}

Constructors

Link copied to clipboard
constructor(applicationName: Output<String>? = null, clusterName: Output<String>? = null, location: Output<String>? = null, properties: Output<Either<StatefulServicePropertiesArgs, StatelessServicePropertiesArgs>>? = null, resourceGroupName: Output<String>? = null, serviceName: Output<String>? = null, tags: Output<Map<String, String>>? = null)

Properties

Link copied to clipboard
val applicationName: Output<String>? = null

The name of the application resource.

Link copied to clipboard
val clusterName: Output<String>? = null

The name of the cluster resource.

Link copied to clipboard
val location: Output<String>? = null

Resource location depends on the parent resource.

Link copied to clipboard

The service resource properties.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group.

Link copied to clipboard
val serviceName: Output<String>? = null

The name of the service resource in the format of {applicationName}~{serviceName}.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Azure resource tags.

Functions

Link copied to clipboard
open override fun toJava(): ManagedClusterServiceArgs