Class ClusterResource | Azure SDK for .NET
Michael Gray
Published Feb 16, 2026
A Class representing a Cluster along with the instance operations that can be performed on it. If you have a Azure.Core.ResourceIdentifier you can construct a ClusterResourcefrom an instance of Azure.ResourceManager.ArmClient using the GetClusterResource method. Otherwise you can get one from its parent resource Azure.ResourceManager.Resources.ResourceGroupResource using the GetCluster method.
Inheritance
Azure.ResourceManager.ArmResource
ClusterResource
Namespace: System.Dynamic.ExpandoObject
Assembly: Azure.ResourceManager.ServiceFabric.dll
Syntax
public class ClusterResource : Azure.ResourceManager.ArmResource Constructors
ClusterResource()
Declaration
protected ClusterResource (); Fields
ResourceType
Gets the resource type for the operations.
Declaration
public static readonly Azure.Core.ResourceType ResourceType; Field Value
| Azure.Core.ResourceType |
Properties
Data
Gets the data representing this Feature.
Declaration
public virtual Azure.ResourceManager.ServiceFabric.ClusterData Data { get; } Property Value
Exceptions
| System.InvalidOperationException Throws if there is no data loaded in the current instance. |
HasData
Gets whether or not the current instance has data.
Declaration
public virtual bool HasData { get; } Property Value
| System.Boolean |
Methods
AddTag(String, String, CancellationToken)
Add a tag to the current resource. Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ Operation Id: Clusters_Get
Declaration
public virtual Azure.Response<Azure.ResourceManager.ServiceFabric.ClusterResource> AddTag (string key, string value, System.Threading.CancellationToken cancellationToken = null); Parameters
| System.String key The key for the tag. |
| System.String value The value for the tag. |
| System.Threading.CancellationToken cancellationToken The cancellation token to use. |
Returns
Exceptions
| System.ArgumentNullException
|
AddTagAsync(String, String, CancellationToken)
Add a tag to the current resource. Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ Operation Id: Clusters_Get
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.ServiceFabric.ClusterResource>> AddTagAsync (string key, string value, System.Threading.CancellationToken cancellationToken = null); Parameters
| System.String key The key for the tag. |
| System.String value The value for the tag. |
| System.Threading.CancellationToken cancellationToken The cancellation token to use. |
Returns
Exceptions
| System.ArgumentNullException
|
CreateResourceIdentifier(String, String, String)
Declaration
public static Azure.Core.ResourceIdentifier CreateResourceIdentifier (string subscriptionId, string resourceGroupName, string clusterName); Parameters
| System.String subscriptionId |
| System.String resourceGroupName |
| System.String clusterName |
Returns
| Azure.Core.ResourceIdentifier |
Delete(WaitUntil, CancellationToken)
Delete a Service Fabric cluster resource with the specified name. Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ Operation Id: Clusters_Delete
Declaration
public virtual Azure.ResourceManager.ArmOperation Delete (Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = null); Parameters
| Azure.WaitUntil waitUntil Azure.WaitUntil.Completed if the method should wait to return until the long-running operation has completed on the service; Azure.WaitUntil.Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. |
| System.Threading.CancellationToken cancellationToken The cancellation token to use. |
Returns
| Azure.ResourceManager.ArmOperation |
DeleteAsync(WaitUntil, CancellationToken)
Delete a Service Fabric cluster resource with the specified name. Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ Operation Id: Clusters_Delete
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation> DeleteAsync (Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = null); Parameters
| Azure.WaitUntil waitUntil Azure.WaitUntil.Completed if the method should wait to return until the long-running operation has completed on the service; Azure.WaitUntil.Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. |
| System.Threading.CancellationToken cancellationToken The cancellation token to use. |
Returns
| System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation> |
Get(CancellationToken)
Get a Service Fabric cluster resource created or in the process of being created in the specified resource group. Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ Operation Id: Clusters_Get
Declaration
public virtual Azure.Response<Azure.ResourceManager.ServiceFabric.ClusterResource> Get (System.Threading.CancellationToken cancellationToken = null); Parameters
| System.Threading.CancellationToken cancellationToken The cancellation token to use. |
Returns
GetApplicationResource(String, CancellationToken)
Get a Service Fabric application resource created or in the process of being created in the Service Fabric cluster resource. Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ Operation Id: Applications_Get
Declaration
public virtual Azure.Response<Azure.ResourceManager.ServiceFabric.ApplicationResource> GetApplicationResource (string applicationName, System.Threading.CancellationToken cancellationToken = null); Parameters
| System.String applicationName The name of the application resource. |
| System.Threading.CancellationToken cancellationToken The cancellation token to use. |
Returns
Exceptions
| System.ArgumentException
|
| System.ArgumentNullException
|
GetApplicationResourceAsync(String, CancellationToken)
Get a Service Fabric application resource created or in the process of being created in the Service Fabric cluster resource. Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ Operation Id: Applications_Get
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.ServiceFabric.ApplicationResource>> GetApplicationResourceAsync (string applicationName, System.Threading.CancellationToken cancellationToken = null); Parameters
| System.String applicationName The name of the application resource. |
| System.Threading.CancellationToken cancellationToken The cancellation token to use. |
Returns
Exceptions
| System.ArgumentException
|
| System.ArgumentNullException
|
GetApplicationResources()
Gets a collection of ApplicationResources in the Cluster.
Declaration
public virtual Azure.ResourceManager.ServiceFabric.ApplicationResourceCollection GetApplicationResources (); Returns
GetApplicationTypeResource(String, CancellationToken)
Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric cluster resource. Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ Operation Id: ApplicationTypes_Get
Declaration
public virtual Azure.Response<Azure.ResourceManager.ServiceFabric.ApplicationTypeResource> GetApplicationTypeResource (string applicationTypeName, System.Threading.CancellationToken cancellationToken = null); Parameters
| System.String applicationTypeName The name of the application type name resource. |
| System.Threading.CancellationToken cancellationToken The cancellation token to use. |
Returns
Exceptions
| System.ArgumentException
|
| System.ArgumentNullException
|
GetApplicationTypeResourceAsync(String, CancellationToken)
Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric cluster resource. Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ Operation Id: ApplicationTypes_Get
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.ServiceFabric.ApplicationTypeResource>> GetApplicationTypeResourceAsync (string applicationTypeName, System.Threading.CancellationToken cancellationToken = null); Parameters
| System.String applicationTypeName The name of the application type name resource. |
| System.Threading.CancellationToken cancellationToken The cancellation token to use. |
Returns
Exceptions
| System.ArgumentException
|
| System.ArgumentNullException
|
GetApplicationTypeResources()
Gets a collection of ApplicationTypeResources in the Cluster.
Declaration
public virtual Azure.ResourceManager.ServiceFabric.ApplicationTypeResourceCollection GetApplicationTypeResources (); Returns
GetAsync(CancellationToken)
Get a Service Fabric cluster resource created or in the process of being created in the specified resource group. Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ Operation Id: Clusters_Get
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.ServiceFabric.ClusterResource>> GetAsync (System.Threading.CancellationToken cancellationToken = null); Parameters
| System.Threading.CancellationToken cancellationToken The cancellation token to use. |
Returns
GetUpgradableVersions(UpgradableVersionsDescription, CancellationToken)
If a target is not provided, it will get the minimum and maximum versions available from the current cluster version. If a target is given, it will provide the required path to get from the current cluster version to the target version. Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ Operation Id: Clusters_ListUpgradableVersions
Declaration
public virtual Azure.Response<Azure.ResourceManager.ServiceFabric.Models.UpgradableVersionPathResult> GetUpgradableVersions (Azure.ResourceManager.ServiceFabric.Models.UpgradableVersionsDescription versionsDescription = null, System.Threading.CancellationToken cancellationToken = null); Parameters
| UpgradableVersionsDescription versionsDescription The upgrade path description with target version. |
| System.Threading.CancellationToken cancellationToken The cancellation token to use. |
Returns
GetUpgradableVersionsAsync(UpgradableVersionsDescription, CancellationToken)
If a target is not provided, it will get the minimum and maximum versions available from the current cluster version. If a target is given, it will provide the required path to get from the current cluster version to the target version. Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ Operation Id: Clusters_ListUpgradableVersions
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.ServiceFabric.Models.UpgradableVersionPathResult>> GetUpgradableVersionsAsync (Azure.ResourceManager.ServiceFabric.Models.UpgradableVersionsDescription versionsDescription = null, System.Threading.CancellationToken cancellationToken = null); Parameters
| UpgradableVersionsDescription versionsDescription The upgrade path description with target version. |
| System.Threading.CancellationToken cancellationToken The cancellation token to use. |
Returns
RemoveTag(String, CancellationToken)
Removes a tag by key from the resource. Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ Operation Id: Clusters_Get
Declaration
public virtual Azure.Response<Azure.ResourceManager.ServiceFabric.ClusterResource> RemoveTag (string key, System.Threading.CancellationToken cancellationToken = null); Parameters
| System.String key The key for the tag. |
| System.Threading.CancellationToken cancellationToken The cancellation token to use. |
Returns
Exceptions
| System.ArgumentNullException
|
RemoveTagAsync(String, CancellationToken)
Removes a tag by key from the resource. Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ Operation Id: Clusters_Get
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.ServiceFabric.ClusterResource>> RemoveTagAsync (string key, System.Threading.CancellationToken cancellationToken = null); Parameters
| System.String key The key for the tag. |
| System.Threading.CancellationToken cancellationToken The cancellation token to use. |
Returns
Exceptions
| System.ArgumentNullException
|
SetTags(IDictionary<String,String>, CancellationToken)
SetTagsAsync(IDictionary<String,String>, CancellationToken)
Update(WaitUntil, ClusterPatch, CancellationToken)
Update the configuration of a Service Fabric cluster resource with the specified name. Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ Operation Id: Clusters_Update
Declaration
public virtual Azure.ResourceManager.ArmOperation<Azure.ResourceManager.ServiceFabric.ClusterResource> Update (Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabric.Models.ClusterPatch patch, System.Threading.CancellationToken cancellationToken = null); Parameters
| Azure.WaitUntil waitUntil Azure.WaitUntil.Completed if the method should wait to return until the long-running operation has completed on the service; Azure.WaitUntil.Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. |
| ClusterPatch patch The parameters which contains the property value and property name which used to update the cluster configuration. |
| System.Threading.CancellationToken cancellationToken The cancellation token to use. |
Returns
Exceptions
| System.ArgumentNullException
|
UpdateAsync(WaitUntil, ClusterPatch, CancellationToken)
Update the configuration of a Service Fabric cluster resource with the specified name. Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ Operation Id: Clusters_Update
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.ServiceFabric.ClusterResource>> UpdateAsync (Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabric.Models.ClusterPatch patch, System.Threading.CancellationToken cancellationToken = null); Parameters
| Azure.WaitUntil waitUntil Azure.WaitUntil.Completed if the method should wait to return until the long-running operation has completed on the service; Azure.WaitUntil.Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. |
| ClusterPatch patch The parameters which contains the property value and property name which used to update the cluster configuration. |
| System.Threading.CancellationToken cancellationToken The cancellation token to use. |
Returns
| System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<ClusterResource>> |
Exceptions
| System.ArgumentNullException
|