notifications;
+
/*
* Azure resource etag.
*/
@JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
private String etag;
+ /*
+ * Metadata pertaining to creation and last modification of the resource.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
/**
* Get the addOnFeatures property: The list of add-on features to enable in the cluster.
*
@@ -660,10 +730,6 @@ public ClusterInner withUpgradeDescription(ClusterUpgradePolicy upgradeDescripti
* Get the upgradeMode property: The upgrade mode of the cluster when new Service Fabric runtime version is
* available.
*
- * - Automatic - The cluster will be automatically upgraded to the latest Service Fabric runtime version as soon
- * as it is available. - Manual - The cluster will not be automatically upgraded to the latest Service Fabric
- * runtime version. The cluster is upgraded by setting the **clusterCodeVersion** property in the cluster resource.
- *
* @return the upgradeMode value.
*/
public UpgradeMode upgradeMode() {
@@ -674,10 +740,6 @@ public UpgradeMode upgradeMode() {
* Set the upgradeMode property: The upgrade mode of the cluster when new Service Fabric runtime version is
* available.
*
- *
- Automatic - The cluster will be automatically upgraded to the latest Service Fabric runtime version as soon
- * as it is available. - Manual - The cluster will not be automatically upgraded to the latest Service Fabric
- * runtime version. The cluster is upgraded by setting the **clusterCodeVersion** property in the cluster resource.
- *
* @param upgradeMode the upgradeMode value to set.
* @return the ClusterInner object itself.
*/
@@ -686,6 +748,27 @@ public ClusterInner withUpgradeMode(UpgradeMode upgradeMode) {
return this;
}
+ /**
+ * Get the applicationTypeVersionsCleanupPolicy property: The policy used to clean up unused versions.
+ *
+ * @return the applicationTypeVersionsCleanupPolicy value.
+ */
+ public ApplicationTypeVersionsCleanupPolicy applicationTypeVersionsCleanupPolicy() {
+ return this.applicationTypeVersionsCleanupPolicy;
+ }
+
+ /**
+ * Set the applicationTypeVersionsCleanupPolicy property: The policy used to clean up unused versions.
+ *
+ * @param applicationTypeVersionsCleanupPolicy the applicationTypeVersionsCleanupPolicy value to set.
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withApplicationTypeVersionsCleanupPolicy(
+ ApplicationTypeVersionsCleanupPolicy applicationTypeVersionsCleanupPolicy) {
+ this.applicationTypeVersionsCleanupPolicy = applicationTypeVersionsCleanupPolicy;
+ return this;
+ }
+
/**
* Get the vmImage property: The VM image VMSS has been configured with. Generic names such as Windows or Linux can
* be used.
@@ -708,6 +791,178 @@ public ClusterInner withVmImage(String vmImage) {
return this;
}
+ /**
+ * Get the sfZonalUpgradeMode property: This property controls the logical grouping of VMs in upgrade domains (UDs).
+ * This property can't be modified if a node type with multiple Availability Zones is already present in the
+ * cluster.
+ *
+ * @return the sfZonalUpgradeMode value.
+ */
+ public SfZonalUpgradeMode sfZonalUpgradeMode() {
+ return this.sfZonalUpgradeMode;
+ }
+
+ /**
+ * Set the sfZonalUpgradeMode property: This property controls the logical grouping of VMs in upgrade domains (UDs).
+ * This property can't be modified if a node type with multiple Availability Zones is already present in the
+ * cluster.
+ *
+ * @param sfZonalUpgradeMode the sfZonalUpgradeMode value to set.
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withSfZonalUpgradeMode(SfZonalUpgradeMode sfZonalUpgradeMode) {
+ this.sfZonalUpgradeMode = sfZonalUpgradeMode;
+ return this;
+ }
+
+ /**
+ * Get the vmssZonalUpgradeMode property: This property defines the upgrade mode for the virtual machine scale set,
+ * it is mandatory if a node type with multiple Availability Zones is added.
+ *
+ * @return the vmssZonalUpgradeMode value.
+ */
+ public VmssZonalUpgradeMode vmssZonalUpgradeMode() {
+ return this.vmssZonalUpgradeMode;
+ }
+
+ /**
+ * Set the vmssZonalUpgradeMode property: This property defines the upgrade mode for the virtual machine scale set,
+ * it is mandatory if a node type with multiple Availability Zones is added.
+ *
+ * @param vmssZonalUpgradeMode the vmssZonalUpgradeMode value to set.
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withVmssZonalUpgradeMode(VmssZonalUpgradeMode vmssZonalUpgradeMode) {
+ this.vmssZonalUpgradeMode = vmssZonalUpgradeMode;
+ return this;
+ }
+
+ /**
+ * Get the infrastructureServiceManager property: Indicates if infrastructure service manager is enabled.
+ *
+ * @return the infrastructureServiceManager value.
+ */
+ public Boolean infrastructureServiceManager() {
+ return this.infrastructureServiceManager;
+ }
+
+ /**
+ * Set the infrastructureServiceManager property: Indicates if infrastructure service manager is enabled.
+ *
+ * @param infrastructureServiceManager the infrastructureServiceManager value to set.
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withInfrastructureServiceManager(Boolean infrastructureServiceManager) {
+ this.infrastructureServiceManager = infrastructureServiceManager;
+ return this;
+ }
+
+ /**
+ * Get the upgradeWave property: Indicates when new cluster runtime version upgrades will be applied after they are
+ * released. By default is Wave0. Only applies when **upgradeMode** is set to 'Automatic'.
+ *
+ * @return the upgradeWave value.
+ */
+ public ClusterUpgradeCadence upgradeWave() {
+ return this.upgradeWave;
+ }
+
+ /**
+ * Set the upgradeWave property: Indicates when new cluster runtime version upgrades will be applied after they are
+ * released. By default is Wave0. Only applies when **upgradeMode** is set to 'Automatic'.
+ *
+ * @param upgradeWave the upgradeWave value to set.
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withUpgradeWave(ClusterUpgradeCadence upgradeWave) {
+ this.upgradeWave = upgradeWave;
+ return this;
+ }
+
+ /**
+ * Get the upgradePauseStartTimestampUtc property: Indicates the start date and time to pause automatic runtime
+ * version upgrades on the cluster for an specific period of time on the cluster (UTC).
+ *
+ * @return the upgradePauseStartTimestampUtc value.
+ */
+ public OffsetDateTime upgradePauseStartTimestampUtc() {
+ return this.upgradePauseStartTimestampUtc;
+ }
+
+ /**
+ * Set the upgradePauseStartTimestampUtc property: Indicates the start date and time to pause automatic runtime
+ * version upgrades on the cluster for an specific period of time on the cluster (UTC).
+ *
+ * @param upgradePauseStartTimestampUtc the upgradePauseStartTimestampUtc value to set.
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withUpgradePauseStartTimestampUtc(OffsetDateTime upgradePauseStartTimestampUtc) {
+ this.upgradePauseStartTimestampUtc = upgradePauseStartTimestampUtc;
+ return this;
+ }
+
+ /**
+ * Get the upgradePauseEndTimestampUtc property: Indicates the end date and time to pause automatic runtime version
+ * upgrades on the cluster for an specific period of time on the cluster (UTC).
+ *
+ * @return the upgradePauseEndTimestampUtc value.
+ */
+ public OffsetDateTime upgradePauseEndTimestampUtc() {
+ return this.upgradePauseEndTimestampUtc;
+ }
+
+ /**
+ * Set the upgradePauseEndTimestampUtc property: Indicates the end date and time to pause automatic runtime version
+ * upgrades on the cluster for an specific period of time on the cluster (UTC).
+ *
+ * @param upgradePauseEndTimestampUtc the upgradePauseEndTimestampUtc value to set.
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withUpgradePauseEndTimestampUtc(OffsetDateTime upgradePauseEndTimestampUtc) {
+ this.upgradePauseEndTimestampUtc = upgradePauseEndTimestampUtc;
+ return this;
+ }
+
+ /**
+ * Get the waveUpgradePaused property: Boolean to pause automatic runtime version upgrades to the cluster.
+ *
+ * @return the waveUpgradePaused value.
+ */
+ public Boolean waveUpgradePaused() {
+ return this.waveUpgradePaused;
+ }
+
+ /**
+ * Set the waveUpgradePaused property: Boolean to pause automatic runtime version upgrades to the cluster.
+ *
+ * @param waveUpgradePaused the waveUpgradePaused value to set.
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withWaveUpgradePaused(Boolean waveUpgradePaused) {
+ this.waveUpgradePaused = waveUpgradePaused;
+ return this;
+ }
+
+ /**
+ * Get the notifications property: Indicates a list of notification channels for cluster events.
+ *
+ * @return the notifications value.
+ */
+ public List notifications() {
+ return this.notifications;
+ }
+
+ /**
+ * Set the notifications property: Indicates a list of notification channels for cluster events.
+ *
+ * @param notifications the notifications value to set.
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withNotifications(List notifications) {
+ this.notifications = notifications;
+ return this;
+ }
+
/**
* Get the etag property: Azure resource etag.
*
@@ -717,6 +972,15 @@ public String etag() {
return this.etag;
}
+ /**
+ * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
/** {@inheritDoc} */
@Override
public ClusterInner withLocation(String location) {
@@ -773,5 +1037,11 @@ public void validate() {
if (upgradeDescription() != null) {
upgradeDescription().validate();
}
+ if (applicationTypeVersionsCleanupPolicy() != null) {
+ applicationTypeVersionsCleanupPolicy().validate();
+ }
+ if (notifications() != null) {
+ notifications().forEach(e -> e.validate());
+ }
}
}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/OperationResultInner.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/OperationResultInner.java
index 0fded240ded8..47088fc77591 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/OperationResultInner.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/OperationResultInner.java
@@ -21,6 +21,12 @@ public final class OperationResultInner {
@JsonProperty(value = "name")
private String name;
+ /*
+ * Indicates whether the operation is a data action
+ */
+ @JsonProperty(value = "isDataAction")
+ private Boolean isDataAction;
+
/*
* The object that represents the operation.
*/
@@ -59,6 +65,26 @@ public OperationResultInner withName(String name) {
return this;
}
+ /**
+ * Get the isDataAction property: Indicates whether the operation is a data action.
+ *
+ * @return the isDataAction value.
+ */
+ public Boolean isDataAction() {
+ return this.isDataAction;
+ }
+
+ /**
+ * Set the isDataAction property: Indicates whether the operation is a data action.
+ *
+ * @param isDataAction the isDataAction value to set.
+ * @return the OperationResultInner object itself.
+ */
+ public OperationResultInner withIsDataAction(Boolean isDataAction) {
+ this.isDataAction = isDataAction;
+ return this;
+ }
+
/**
* Get the display property: The object that represents the operation.
*
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ServiceResourceInner.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ServiceResourceInner.java
index 6dc7ea0935b6..c5295edb7011 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ServiceResourceInner.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ServiceResourceInner.java
@@ -7,6 +7,7 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.servicefabric.models.ArmServicePackageActivationMode;
import com.azure.resourcemanager.servicefabric.models.MoveCost;
@@ -87,6 +88,13 @@ public class ServiceResourceInner extends ProxyResource {
@JsonProperty(value = "properties.servicePackageActivationMode")
private ArmServicePackageActivationMode servicePackageActivationMode;
+ /*
+ * Dns name used for the service. If this is specified, then the service
+ * can be accessed via its DNS name instead of service name.
+ */
+ @JsonProperty(value = "properties.serviceDnsName")
+ private String serviceDnsName;
+
/*
* It will be deprecated in New API, resource location depends on the
* parent resource.
@@ -106,6 +114,12 @@ public class ServiceResourceInner extends ProxyResource {
@JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
private String etag;
+ /*
+ * Metadata pertaining to creation and last modification of the resource.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
/**
* Get the placementConstraints property: The placement constraints as a string. Placement constraints are boolean
* expressions on node properties and allow for restricting a service to particular nodes based on the service
@@ -288,6 +302,28 @@ public ServiceResourceInner withServicePackageActivationMode(
return this;
}
+ /**
+ * Get the serviceDnsName property: Dns name used for the service. If this is specified, then the service can be
+ * accessed via its DNS name instead of service name.
+ *
+ * @return the serviceDnsName value.
+ */
+ public String serviceDnsName() {
+ return this.serviceDnsName;
+ }
+
+ /**
+ * Set the serviceDnsName property: Dns name used for the service. If this is specified, then the service can be
+ * accessed via its DNS name instead of service name.
+ *
+ * @param serviceDnsName the serviceDnsName value to set.
+ * @return the ServiceResourceInner object itself.
+ */
+ public ServiceResourceInner withServiceDnsName(String serviceDnsName) {
+ this.serviceDnsName = serviceDnsName;
+ return this;
+ }
+
/**
* Get the location property: It will be deprecated in New API, resource location depends on the parent resource.
*
@@ -337,6 +373,15 @@ public String etag() {
return this.etag;
}
+ /**
+ * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
/**
* Validates the instance.
*
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/UpgradableVersionPathResultInner.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/UpgradableVersionPathResultInner.java
new file mode 100644
index 000000000000..6dcdfd5f1df1
--- /dev/null
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/UpgradableVersionPathResultInner.java
@@ -0,0 +1,54 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.servicefabric.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/**
+ * The list of intermediate cluster code versions for an upgrade or downgrade. Or minimum and maximum upgradable version
+ * if no target was given.
+ */
+@Fluent
+public final class UpgradableVersionPathResultInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(UpgradableVersionPathResultInner.class);
+
+ /*
+ * The supportedPath property.
+ */
+ @JsonProperty(value = "supportedPath")
+ private List supportedPath;
+
+ /**
+ * Get the supportedPath property: The supportedPath property.
+ *
+ * @return the supportedPath value.
+ */
+ public List supportedPath() {
+ return this.supportedPath;
+ }
+
+ /**
+ * Set the supportedPath property: The supportedPath property.
+ *
+ * @param supportedPath the supportedPath value to set.
+ * @return the UpgradableVersionPathResultInner object itself.
+ */
+ public UpgradableVersionPathResultInner withSupportedPath(List supportedPath) {
+ this.supportedPath = supportedPath;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationResourceImpl.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationResourceImpl.java
index 72beea3d6ad1..c5afdb61e630 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationResourceImpl.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationResourceImpl.java
@@ -5,12 +5,15 @@
package com.azure.resourcemanager.servicefabric.implementation;
import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.servicefabric.fluent.models.ApplicationResourceInner;
import com.azure.resourcemanager.servicefabric.models.ApplicationMetricDescription;
import com.azure.resourcemanager.servicefabric.models.ApplicationResource;
import com.azure.resourcemanager.servicefabric.models.ApplicationResourceUpdate;
import com.azure.resourcemanager.servicefabric.models.ApplicationUpgradePolicy;
+import com.azure.resourcemanager.servicefabric.models.ApplicationUserAssignedIdentity;
+import com.azure.resourcemanager.servicefabric.models.ManagedIdentity;
import java.util.Collections;
import java.util.List;
import java.util.Map;
@@ -33,6 +36,10 @@ public String type() {
return this.innerModel().type();
}
+ public ManagedIdentity identity() {
+ return this.innerModel().identity();
+ }
+
public String typeVersion() {
return this.innerModel().typeVersion();
}
@@ -71,6 +78,15 @@ public List metrics() {
}
}
+ public List managedIdentities() {
+ List inner = this.innerModel().managedIdentities();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
public String provisioningState() {
return this.innerModel().provisioningState();
}
@@ -96,6 +112,10 @@ public String etag() {
return this.innerModel().etag();
}
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
public Region region() {
return Region.fromName(this.regionName());
}
@@ -223,6 +243,11 @@ public ApplicationResourceImpl withTags(Map tags) {
}
}
+ public ApplicationResourceImpl withIdentity(ManagedIdentity identity) {
+ this.innerModel().withIdentity(identity);
+ return this;
+ }
+
public ApplicationResourceImpl withTypeVersion(String typeVersion) {
if (isInCreateMode()) {
this.innerModel().withTypeVersion(typeVersion);
@@ -293,6 +318,16 @@ public ApplicationResourceImpl withMetrics(List me
}
}
+ public ApplicationResourceImpl withManagedIdentities(List managedIdentities) {
+ if (isInCreateMode()) {
+ this.innerModel().withManagedIdentities(managedIdentities);
+ return this;
+ } else {
+ this.updateParameters.withManagedIdentities(managedIdentities);
+ return this;
+ }
+ }
+
public ApplicationResourceImpl withTypeName(String typeName) {
this.innerModel().withTypeName(typeName);
return this;
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypeResourceImpl.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypeResourceImpl.java
index 7de9e457acaf..d2391bc1a44c 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypeResourceImpl.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypeResourceImpl.java
@@ -5,6 +5,7 @@
package com.azure.resourcemanager.servicefabric.implementation;
import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.servicefabric.fluent.models.ApplicationTypeResourceInner;
import com.azure.resourcemanager.servicefabric.models.ApplicationTypeResource;
@@ -50,6 +51,10 @@ public String etag() {
return this.innerModel().etag();
}
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
public Region region() {
return Region.fromName(this.regionName());
}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypeVersionResourceImpl.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypeVersionResourceImpl.java
index c87d36cdc8c1..c519c79452ac 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypeVersionResourceImpl.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypeVersionResourceImpl.java
@@ -5,6 +5,7 @@
package com.azure.resourcemanager.servicefabric.implementation;
import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.servicefabric.fluent.models.ApplicationTypeVersionResourceInner;
import com.azure.resourcemanager.servicefabric.models.ApplicationTypeVersionResource;
@@ -65,6 +66,10 @@ public String etag() {
return this.innerModel().etag();
}
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
public Region region() {
return Region.fromName(this.regionName());
}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClusterImpl.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClusterImpl.java
index bde35239511b..07d8f8ce6064 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClusterImpl.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClusterImpl.java
@@ -4,10 +4,13 @@
package com.azure.resourcemanager.servicefabric.implementation;
+import com.azure.core.http.rest.Response;
import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.servicefabric.fluent.models.ClusterInner;
import com.azure.resourcemanager.servicefabric.models.AddOnFeatures;
+import com.azure.resourcemanager.servicefabric.models.ApplicationTypeVersionsCleanupPolicy;
import com.azure.resourcemanager.servicefabric.models.AzureActiveDirectory;
import com.azure.resourcemanager.servicefabric.models.CertificateDescription;
import com.azure.resourcemanager.servicefabric.models.ClientCertificateCommonName;
@@ -15,15 +18,22 @@
import com.azure.resourcemanager.servicefabric.models.Cluster;
import com.azure.resourcemanager.servicefabric.models.ClusterState;
import com.azure.resourcemanager.servicefabric.models.ClusterUpdateParameters;
+import com.azure.resourcemanager.servicefabric.models.ClusterUpgradeCadence;
import com.azure.resourcemanager.servicefabric.models.ClusterUpgradePolicy;
import com.azure.resourcemanager.servicefabric.models.ClusterVersionDetails;
import com.azure.resourcemanager.servicefabric.models.DiagnosticsStorageAccountConfig;
import com.azure.resourcemanager.servicefabric.models.NodeTypeDescription;
+import com.azure.resourcemanager.servicefabric.models.Notification;
import com.azure.resourcemanager.servicefabric.models.ProvisioningState;
import com.azure.resourcemanager.servicefabric.models.ReliabilityLevel;
import com.azure.resourcemanager.servicefabric.models.ServerCertificateCommonNames;
import com.azure.resourcemanager.servicefabric.models.SettingsSectionDescription;
+import com.azure.resourcemanager.servicefabric.models.SfZonalUpgradeMode;
+import com.azure.resourcemanager.servicefabric.models.UpgradableVersionPathResult;
+import com.azure.resourcemanager.servicefabric.models.UpgradableVersionsDescription;
import com.azure.resourcemanager.servicefabric.models.UpgradeMode;
+import com.azure.resourcemanager.servicefabric.models.VmssZonalUpgradeMode;
+import java.time.OffsetDateTime;
import java.util.Collections;
import java.util.List;
import java.util.Map;
@@ -176,14 +186,59 @@ public UpgradeMode upgradeMode() {
return this.innerModel().upgradeMode();
}
+ public ApplicationTypeVersionsCleanupPolicy applicationTypeVersionsCleanupPolicy() {
+ return this.innerModel().applicationTypeVersionsCleanupPolicy();
+ }
+
public String vmImage() {
return this.innerModel().vmImage();
}
+ public SfZonalUpgradeMode sfZonalUpgradeMode() {
+ return this.innerModel().sfZonalUpgradeMode();
+ }
+
+ public VmssZonalUpgradeMode vmssZonalUpgradeMode() {
+ return this.innerModel().vmssZonalUpgradeMode();
+ }
+
+ public Boolean infrastructureServiceManager() {
+ return this.innerModel().infrastructureServiceManager();
+ }
+
+ public ClusterUpgradeCadence upgradeWave() {
+ return this.innerModel().upgradeWave();
+ }
+
+ public OffsetDateTime upgradePauseStartTimestampUtc() {
+ return this.innerModel().upgradePauseStartTimestampUtc();
+ }
+
+ public OffsetDateTime upgradePauseEndTimestampUtc() {
+ return this.innerModel().upgradePauseEndTimestampUtc();
+ }
+
+ public Boolean waveUpgradePaused() {
+ return this.innerModel().waveUpgradePaused();
+ }
+
+ public List notifications() {
+ List inner = this.innerModel().notifications();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
public String etag() {
return this.innerModel().etag();
}
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
public Region region() {
return Region.fromName(this.regionName());
}
@@ -285,6 +340,17 @@ public Cluster refresh(Context context) {
return this;
}
+ public UpgradableVersionPathResult listUpgradableVersions() {
+ return serviceManager.clusters().listUpgradableVersions(resourceGroupName, clusterName);
+ }
+
+ public Response listUpgradableVersionsWithResponse(
+ UpgradableVersionsDescription versionsDescription, Context context) {
+ return serviceManager
+ .clusters()
+ .listUpgradableVersionsWithResponse(resourceGroupName, clusterName, versionsDescription, context);
+ }
+
public ClusterImpl withRegion(Region location) {
this.innerModel().withLocation(location.toString());
return this;
@@ -459,11 +525,102 @@ public ClusterImpl withUpgradeMode(UpgradeMode upgradeMode) {
}
}
+ public ClusterImpl withApplicationTypeVersionsCleanupPolicy(
+ ApplicationTypeVersionsCleanupPolicy applicationTypeVersionsCleanupPolicy) {
+ if (isInCreateMode()) {
+ this.innerModel().withApplicationTypeVersionsCleanupPolicy(applicationTypeVersionsCleanupPolicy);
+ return this;
+ } else {
+ this.updateParameters.withApplicationTypeVersionsCleanupPolicy(applicationTypeVersionsCleanupPolicy);
+ return this;
+ }
+ }
+
public ClusterImpl withVmImage(String vmImage) {
this.innerModel().withVmImage(vmImage);
return this;
}
+ public ClusterImpl withSfZonalUpgradeMode(SfZonalUpgradeMode sfZonalUpgradeMode) {
+ if (isInCreateMode()) {
+ this.innerModel().withSfZonalUpgradeMode(sfZonalUpgradeMode);
+ return this;
+ } else {
+ this.updateParameters.withSfZonalUpgradeMode(sfZonalUpgradeMode);
+ return this;
+ }
+ }
+
+ public ClusterImpl withVmssZonalUpgradeMode(VmssZonalUpgradeMode vmssZonalUpgradeMode) {
+ if (isInCreateMode()) {
+ this.innerModel().withVmssZonalUpgradeMode(vmssZonalUpgradeMode);
+ return this;
+ } else {
+ this.updateParameters.withVmssZonalUpgradeMode(vmssZonalUpgradeMode);
+ return this;
+ }
+ }
+
+ public ClusterImpl withInfrastructureServiceManager(Boolean infrastructureServiceManager) {
+ if (isInCreateMode()) {
+ this.innerModel().withInfrastructureServiceManager(infrastructureServiceManager);
+ return this;
+ } else {
+ this.updateParameters.withInfrastructureServiceManager(infrastructureServiceManager);
+ return this;
+ }
+ }
+
+ public ClusterImpl withUpgradeWave(ClusterUpgradeCadence upgradeWave) {
+ if (isInCreateMode()) {
+ this.innerModel().withUpgradeWave(upgradeWave);
+ return this;
+ } else {
+ this.updateParameters.withUpgradeWave(upgradeWave);
+ return this;
+ }
+ }
+
+ public ClusterImpl withUpgradePauseStartTimestampUtc(OffsetDateTime upgradePauseStartTimestampUtc) {
+ if (isInCreateMode()) {
+ this.innerModel().withUpgradePauseStartTimestampUtc(upgradePauseStartTimestampUtc);
+ return this;
+ } else {
+ this.updateParameters.withUpgradePauseStartTimestampUtc(upgradePauseStartTimestampUtc);
+ return this;
+ }
+ }
+
+ public ClusterImpl withUpgradePauseEndTimestampUtc(OffsetDateTime upgradePauseEndTimestampUtc) {
+ if (isInCreateMode()) {
+ this.innerModel().withUpgradePauseEndTimestampUtc(upgradePauseEndTimestampUtc);
+ return this;
+ } else {
+ this.updateParameters.withUpgradePauseEndTimestampUtc(upgradePauseEndTimestampUtc);
+ return this;
+ }
+ }
+
+ public ClusterImpl withWaveUpgradePaused(Boolean waveUpgradePaused) {
+ if (isInCreateMode()) {
+ this.innerModel().withWaveUpgradePaused(waveUpgradePaused);
+ return this;
+ } else {
+ this.updateParameters.withWaveUpgradePaused(waveUpgradePaused);
+ return this;
+ }
+ }
+
+ public ClusterImpl withNotifications(List notifications) {
+ if (isInCreateMode()) {
+ this.innerModel().withNotifications(notifications);
+ return this;
+ } else {
+ this.updateParameters.withNotifications(notifications);
+ return this;
+ }
+ }
+
private boolean isInCreateMode() {
return this.innerModel().id() == null;
}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClustersClientImpl.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClustersClientImpl.java
index aae99c10be1b..993c0e356f67 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClustersClientImpl.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClustersClientImpl.java
@@ -14,6 +14,7 @@
import com.azure.core.annotation.HostParam;
import com.azure.core.annotation.Patch;
import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
import com.azure.core.annotation.Put;
import com.azure.core.annotation.QueryParam;
import com.azure.core.annotation.ReturnType;
@@ -32,7 +33,9 @@
import com.azure.resourcemanager.servicefabric.fluent.ClustersClient;
import com.azure.resourcemanager.servicefabric.fluent.models.ClusterInner;
import com.azure.resourcemanager.servicefabric.fluent.models.ClusterListResultInner;
+import com.azure.resourcemanager.servicefabric.fluent.models.UpgradableVersionPathResultInner;
import com.azure.resourcemanager.servicefabric.models.ClusterUpdateParameters;
+import com.azure.resourcemanager.servicefabric.models.UpgradableVersionsDescription;
import java.nio.ByteBuffer;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
@@ -150,6 +153,22 @@ Mono> list(
@PathParam("subscriptionId") String subscriptionId,
@HeaderParam("Accept") String accept,
Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric"
+ + "/clusters/{clusterName}/listUpgradableVersions")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listUpgradableVersions(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") UpgradableVersionsDescription versionsDescription,
+ @HeaderParam("Accept") String accept,
+ Context context);
}
/**
@@ -315,7 +334,7 @@ public Response getByResourceGroupWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the cluster resource properties.
+ * @return the cluster resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> createOrUpdateWithResponseAsync(
@@ -371,7 +390,7 @@ private Mono>> createOrUpdateWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the cluster resource properties.
+ * @return the cluster resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> createOrUpdateWithResponseAsync(
@@ -423,7 +442,7 @@ private Mono>> createOrUpdateWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the cluster resource properties.
+ * @return the cluster resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private PollerFlux, ClusterInner> beginCreateOrUpdateAsync(
@@ -446,7 +465,7 @@ private PollerFlux, ClusterInner> beginCreateOrUpdateAs
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the cluster resource properties.
+ * @return the cluster resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private PollerFlux, ClusterInner> beginCreateOrUpdateAsync(
@@ -469,7 +488,7 @@ private PollerFlux, ClusterInner> beginCreateOrUpdateAs
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the cluster resource properties.
+ * @return the cluster resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public SyncPoller, ClusterInner> beginCreateOrUpdate(
@@ -487,7 +506,7 @@ public SyncPoller, ClusterInner> beginCreateOrUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the cluster resource properties.
+ * @return the cluster resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public SyncPoller, ClusterInner> beginCreateOrUpdate(
@@ -504,7 +523,7 @@ public SyncPoller, ClusterInner> beginCreateOrUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the cluster resource properties.
+ * @return the cluster resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createOrUpdateAsync(
@@ -524,7 +543,7 @@ private Mono createOrUpdateAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the cluster resource properties.
+ * @return the cluster resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createOrUpdateAsync(
@@ -543,7 +562,7 @@ private Mono createOrUpdateAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the cluster resource properties.
+ * @return the cluster resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public ClusterInner createOrUpdate(String resourceGroupName, String clusterName, ClusterInner parameters) {
@@ -560,7 +579,7 @@ public ClusterInner createOrUpdate(String resourceGroupName, String clusterName,
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the cluster resource properties.
+ * @return the cluster resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public ClusterInner createOrUpdate(
@@ -578,7 +597,7 @@ public ClusterInner createOrUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the cluster resource properties.
+ * @return the cluster resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> updateWithResponseAsync(
@@ -635,7 +654,7 @@ private Mono>> updateWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the cluster resource properties.
+ * @return the cluster resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> updateWithResponseAsync(
@@ -688,7 +707,7 @@ private Mono>> updateWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the cluster resource properties.
+ * @return the cluster resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private PollerFlux, ClusterInner> beginUpdateAsync(
@@ -711,7 +730,7 @@ private PollerFlux, ClusterInner> beginUpdateAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the cluster resource properties.
+ * @return the cluster resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private PollerFlux, ClusterInner> beginUpdateAsync(
@@ -735,7 +754,7 @@ private PollerFlux, ClusterInner> beginUpdateAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the cluster resource properties.
+ * @return the cluster resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public SyncPoller, ClusterInner> beginUpdate(
@@ -754,7 +773,7 @@ public SyncPoller, ClusterInner> beginUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the cluster resource properties.
+ * @return the cluster resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public SyncPoller, ClusterInner> beginUpdate(
@@ -772,7 +791,7 @@ public SyncPoller, ClusterInner> beginUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the cluster resource properties.
+ * @return the cluster resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono updateAsync(
@@ -793,7 +812,7 @@ private Mono updateAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the cluster resource properties.
+ * @return the cluster resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono updateAsync(
@@ -813,7 +832,7 @@ private Mono updateAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the cluster resource properties.
+ * @return the cluster resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public ClusterInner update(String resourceGroupName, String clusterName, ClusterUpdateParameters parameters) {
@@ -831,7 +850,7 @@ public ClusterInner update(String resourceGroupName, String clusterName, Cluster
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the cluster resource properties.
+ * @return the cluster resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public ClusterInner update(
@@ -1225,4 +1244,211 @@ public ClusterListResultInner list() {
public Response listWithResponse(Context context) {
return listWithResponseAsync(context).block();
}
+
+ /**
+ * 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.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param clusterName The name of the cluster resource.
+ * @param versionsDescription The upgrade path description with target version.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of intermediate cluster code versions for an upgrade or downgrade.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listUpgradableVersionsWithResponseAsync(
+ String resourceGroupName, String clusterName, UpgradableVersionsDescription versionsDescription) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (versionsDescription != null) {
+ versionsDescription.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listUpgradableVersions(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ this.client.getApiVersion(),
+ versionsDescription,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * 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.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param clusterName The name of the cluster resource.
+ * @param versionsDescription The upgrade path description with target version.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of intermediate cluster code versions for an upgrade or downgrade.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listUpgradableVersionsWithResponseAsync(
+ String resourceGroupName,
+ String clusterName,
+ UpgradableVersionsDescription versionsDescription,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (versionsDescription != null) {
+ versionsDescription.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listUpgradableVersions(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ this.client.getApiVersion(),
+ versionsDescription,
+ accept,
+ context);
+ }
+
+ /**
+ * 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.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param clusterName The name of the cluster resource.
+ * @param versionsDescription The upgrade path description with target version.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of intermediate cluster code versions for an upgrade or downgrade.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono listUpgradableVersionsAsync(
+ String resourceGroupName, String clusterName, UpgradableVersionsDescription versionsDescription) {
+ return listUpgradableVersionsWithResponseAsync(resourceGroupName, clusterName, versionsDescription)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * 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.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param clusterName The name of the cluster resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of intermediate cluster code versions for an upgrade or downgrade.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono listUpgradableVersionsAsync(
+ String resourceGroupName, String clusterName) {
+ final UpgradableVersionsDescription versionsDescription = null;
+ return listUpgradableVersionsWithResponseAsync(resourceGroupName, clusterName, versionsDescription)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * 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.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param clusterName The name of the cluster resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of intermediate cluster code versions for an upgrade or downgrade.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public UpgradableVersionPathResultInner listUpgradableVersions(String resourceGroupName, String clusterName) {
+ final UpgradableVersionsDescription versionsDescription = null;
+ return listUpgradableVersionsAsync(resourceGroupName, clusterName, versionsDescription).block();
+ }
+
+ /**
+ * 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.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param clusterName The name of the cluster resource.
+ * @param versionsDescription The upgrade path description with target version.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of intermediate cluster code versions for an upgrade or downgrade.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response listUpgradableVersionsWithResponse(
+ String resourceGroupName,
+ String clusterName,
+ UpgradableVersionsDescription versionsDescription,
+ Context context) {
+ return listUpgradableVersionsWithResponseAsync(resourceGroupName, clusterName, versionsDescription, context)
+ .block();
+ }
}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClustersImpl.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClustersImpl.java
index 8d3f2a9bc3c4..c402ca8028e0 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClustersImpl.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClustersImpl.java
@@ -11,9 +11,12 @@
import com.azure.resourcemanager.servicefabric.fluent.ClustersClient;
import com.azure.resourcemanager.servicefabric.fluent.models.ClusterInner;
import com.azure.resourcemanager.servicefabric.fluent.models.ClusterListResultInner;
+import com.azure.resourcemanager.servicefabric.fluent.models.UpgradableVersionPathResultInner;
import com.azure.resourcemanager.servicefabric.models.Cluster;
import com.azure.resourcemanager.servicefabric.models.ClusterListResult;
import com.azure.resourcemanager.servicefabric.models.Clusters;
+import com.azure.resourcemanager.servicefabric.models.UpgradableVersionPathResult;
+import com.azure.resourcemanager.servicefabric.models.UpgradableVersionsDescription;
import com.fasterxml.jackson.annotation.JsonIgnore;
public final class ClustersImpl implements Clusters {
@@ -106,6 +109,36 @@ public Response listWithResponse(Context context) {
}
}
+ public UpgradableVersionPathResult listUpgradableVersions(String resourceGroupName, String clusterName) {
+ UpgradableVersionPathResultInner inner =
+ this.serviceClient().listUpgradableVersions(resourceGroupName, clusterName);
+ if (inner != null) {
+ return new UpgradableVersionPathResultImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response listUpgradableVersionsWithResponse(
+ String resourceGroupName,
+ String clusterName,
+ UpgradableVersionsDescription versionsDescription,
+ Context context) {
+ Response inner =
+ this
+ .serviceClient()
+ .listUpgradableVersionsWithResponse(resourceGroupName, clusterName, versionsDescription, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new UpgradableVersionPathResultImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
public Cluster getById(String id) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/OperationResultImpl.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/OperationResultImpl.java
index b6e2617713e1..97d5e7a96fa1 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/OperationResultImpl.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/OperationResultImpl.java
@@ -23,6 +23,10 @@ public String name() {
return this.innerModel().name();
}
+ public Boolean isDataAction() {
+ return this.innerModel().isDataAction();
+ }
+
public AvailableOperationDisplay display() {
return this.innerModel().display();
}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ServiceFabricManagementClientImpl.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ServiceFabricManagementClientImpl.java
index 67ba2bb540f2..ff234968cbf7 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ServiceFabricManagementClientImpl.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ServiceFabricManagementClientImpl.java
@@ -222,7 +222,7 @@ public ServicesClient getServices() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2019-03-01";
+ this.apiVersion = "2021-06-01";
this.clusters = new ClustersClientImpl(this);
this.clusterVersions = new ClusterVersionsClientImpl(this);
this.operations = new OperationsClientImpl(this);
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ServiceResourceImpl.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ServiceResourceImpl.java
index d9b6ab0da5b4..db3c88cf4970 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ServiceResourceImpl.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ServiceResourceImpl.java
@@ -5,6 +5,7 @@
package com.azure.resourcemanager.servicefabric.implementation;
import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.servicefabric.fluent.models.ServiceResourceInner;
import com.azure.resourcemanager.servicefabric.models.ArmServicePackageActivationMode;
@@ -87,6 +88,10 @@ public ArmServicePackageActivationMode servicePackageActivationMode() {
return this.innerModel().servicePackageActivationMode();
}
+ public String serviceDnsName() {
+ return this.innerModel().serviceDnsName();
+ }
+
public String location() {
return this.innerModel().location();
}
@@ -104,6 +109,10 @@ public String etag() {
return this.innerModel().etag();
}
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
public Region region() {
return Region.fromName(this.regionName());
}
@@ -304,6 +313,11 @@ public ServiceResourceImpl withServicePackageActivationMode(
return this;
}
+ public ServiceResourceImpl withServiceDnsName(String serviceDnsName) {
+ this.innerModel().withServiceDnsName(serviceDnsName);
+ return this;
+ }
+
private boolean isInCreateMode() {
return this.innerModel().id() == null;
}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/UpgradableVersionPathResultImpl.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/UpgradableVersionPathResultImpl.java
new file mode 100644
index 000000000000..e9eee77527f3
--- /dev/null
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/UpgradableVersionPathResultImpl.java
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.servicefabric.implementation;
+
+import com.azure.resourcemanager.servicefabric.fluent.models.UpgradableVersionPathResultInner;
+import com.azure.resourcemanager.servicefabric.models.UpgradableVersionPathResult;
+import java.util.Collections;
+import java.util.List;
+
+public final class UpgradableVersionPathResultImpl implements UpgradableVersionPathResult {
+ private UpgradableVersionPathResultInner innerObject;
+
+ private final com.azure.resourcemanager.servicefabric.ServiceFabricManager serviceManager;
+
+ UpgradableVersionPathResultImpl(
+ UpgradableVersionPathResultInner innerObject,
+ com.azure.resourcemanager.servicefabric.ServiceFabricManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public List supportedPath() {
+ List inner = this.innerModel().supportedPath();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public UpgradableVersionPathResultInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.servicefabric.ServiceFabricManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationResource.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationResource.java
index 109c1fe8e0d9..9ca5a6f8df5e 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationResource.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationResource.java
@@ -5,6 +5,7 @@
package com.azure.resourcemanager.servicefabric.models;
import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.servicefabric.fluent.models.ApplicationResourceInner;
import java.util.List;
@@ -33,6 +34,13 @@ public interface ApplicationResource {
*/
String type();
+ /**
+ * Gets the identity property: Describes the managed identities for an Azure resource.
+ *
+ * @return the identity value.
+ */
+ ManagedIdentity identity();
+
/**
* Gets the typeVersion property: The version of the application type as defined in the application manifest.
*
@@ -88,6 +96,14 @@ public interface ApplicationResource {
*/
List metrics();
+ /**
+ * Gets the managedIdentities property: List of user assigned identities for the application, each mapped to a
+ * friendly name.
+ *
+ * @return the managedIdentities value.
+ */
+ List managedIdentities();
+
/**
* Gets the provisioningState property: The current deployment or provisioning state, which only appears in the
* response.
@@ -124,6 +140,13 @@ public interface ApplicationResource {
*/
String etag();
+ /**
+ * Gets the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ SystemData systemData();
+
/**
* Gets the region of the resource.
*
@@ -172,6 +195,7 @@ interface WithParentResource {
interface WithCreate
extends DefinitionStages.WithLocation,
DefinitionStages.WithTags,
+ DefinitionStages.WithIdentity,
DefinitionStages.WithTypeVersion,
DefinitionStages.WithParameters,
DefinitionStages.WithUpgradePolicy,
@@ -179,6 +203,7 @@ interface WithCreate
DefinitionStages.WithMaximumNodes,
DefinitionStages.WithRemoveApplicationCapacity,
DefinitionStages.WithMetrics,
+ DefinitionStages.WithManagedIdentities,
DefinitionStages.WithTypeName {
/**
* Executes the create request.
@@ -223,6 +248,16 @@ interface WithTags {
*/
WithCreate withTags(Map tags);
}
+ /** The stage of the ApplicationResource definition allowing to specify identity. */
+ interface WithIdentity {
+ /**
+ * Specifies the identity property: Describes the managed identities for an Azure resource..
+ *
+ * @param identity Describes the managed identities for an Azure resource.
+ * @return the next definition stage.
+ */
+ WithCreate withIdentity(ManagedIdentity identity);
+ }
/** The stage of the ApplicationResource definition allowing to specify typeVersion. */
interface WithTypeVersion {
/**
@@ -308,6 +343,18 @@ interface WithMetrics {
*/
WithCreate withMetrics(List metrics);
}
+ /** The stage of the ApplicationResource definition allowing to specify managedIdentities. */
+ interface WithManagedIdentities {
+ /**
+ * Specifies the managedIdentities property: List of user assigned identities for the application, each
+ * mapped to a friendly name..
+ *
+ * @param managedIdentities List of user assigned identities for the application, each mapped to a friendly
+ * name.
+ * @return the next definition stage.
+ */
+ WithCreate withManagedIdentities(List managedIdentities);
+ }
/** The stage of the ApplicationResource definition allowing to specify typeName. */
interface WithTypeName {
/**
@@ -335,7 +382,8 @@ interface Update
UpdateStages.WithMinimumNodes,
UpdateStages.WithMaximumNodes,
UpdateStages.WithRemoveApplicationCapacity,
- UpdateStages.WithMetrics {
+ UpdateStages.WithMetrics,
+ UpdateStages.WithManagedIdentities {
/**
* Executes the update request.
*
@@ -448,6 +496,18 @@ interface WithMetrics {
*/
Update withMetrics(List metrics);
}
+ /** The stage of the ApplicationResource update allowing to specify managedIdentities. */
+ interface WithManagedIdentities {
+ /**
+ * Specifies the managedIdentities property: List of user assigned identities for the application, each
+ * mapped to a friendly name..
+ *
+ * @param managedIdentities List of user assigned identities for the application, each mapped to a friendly
+ * name.
+ * @return the next definition stage.
+ */
+ Update withManagedIdentities(List managedIdentities);
+ }
}
/**
* Refreshes the resource to sync with Azure.
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationResourceProperties.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationResourceProperties.java
index 4c34a62e66fb..55ead786f04b 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationResourceProperties.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationResourceProperties.java
@@ -108,6 +108,14 @@ public ApplicationResourceProperties withMetrics(List managedIdentities) {
+ super.withManagedIdentities(managedIdentities);
+ return this;
+ }
+
/**
* Validates the instance.
*
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationResourceUpdate.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationResourceUpdate.java
index 8e5df48d9858..6c737f5f155f 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationResourceUpdate.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationResourceUpdate.java
@@ -7,6 +7,7 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -71,6 +72,13 @@ public class ApplicationResourceUpdate extends ProxyResource {
@JsonProperty(value = "properties.metrics")
private List metrics;
+ /*
+ * List of user assigned identities for the application, each mapped to a
+ * friendly name.
+ */
+ @JsonProperty(value = "properties.managedIdentities")
+ private List managedIdentities;
+
/*
* It will be deprecated in New API, resource location depends on the
* parent resource.
@@ -90,6 +98,12 @@ public class ApplicationResourceUpdate extends ProxyResource {
@JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
private String etag;
+ /*
+ * Metadata pertaining to creation and last modification of the resource.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
/**
* Get the typeVersion property: The version of the application type as defined in the application manifest.
*
@@ -242,6 +256,28 @@ public ApplicationResourceUpdate withMetrics(List
return this;
}
+ /**
+ * Get the managedIdentities property: List of user assigned identities for the application, each mapped to a
+ * friendly name.
+ *
+ * @return the managedIdentities value.
+ */
+ public List managedIdentities() {
+ return this.managedIdentities;
+ }
+
+ /**
+ * Set the managedIdentities property: List of user assigned identities for the application, each mapped to a
+ * friendly name.
+ *
+ * @param managedIdentities the managedIdentities value to set.
+ * @return the ApplicationResourceUpdate object itself.
+ */
+ public ApplicationResourceUpdate withManagedIdentities(List managedIdentities) {
+ this.managedIdentities = managedIdentities;
+ return this;
+ }
+
/**
* Get the location property: It will be deprecated in New API, resource location depends on the parent resource.
*
@@ -291,6 +327,15 @@ public String etag() {
return this.etag;
}
+ /**
+ * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
/**
* Validates the instance.
*
@@ -303,5 +348,8 @@ public void validate() {
if (metrics() != null) {
metrics().forEach(e -> e.validate());
}
+ if (managedIdentities() != null) {
+ managedIdentities().forEach(e -> e.validate());
+ }
}
}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationResourceUpdateProperties.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationResourceUpdateProperties.java
index f384e5873151..c4267e3b03f1 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationResourceUpdateProperties.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationResourceUpdateProperties.java
@@ -68,6 +68,13 @@ public class ApplicationResourceUpdateProperties {
@JsonProperty(value = "metrics")
private List metrics;
+ /*
+ * List of user assigned identities for the application, each mapped to a
+ * friendly name.
+ */
+ @JsonProperty(value = "managedIdentities")
+ private List managedIdentities;
+
/**
* Get the typeVersion property: The version of the application type as defined in the application manifest.
*
@@ -220,6 +227,29 @@ public ApplicationResourceUpdateProperties withMetrics(List managedIdentities() {
+ return this.managedIdentities;
+ }
+
+ /**
+ * Set the managedIdentities property: List of user assigned identities for the application, each mapped to a
+ * friendly name.
+ *
+ * @param managedIdentities the managedIdentities value to set.
+ * @return the ApplicationResourceUpdateProperties object itself.
+ */
+ public ApplicationResourceUpdateProperties withManagedIdentities(
+ List managedIdentities) {
+ this.managedIdentities = managedIdentities;
+ return this;
+ }
+
/**
* Validates the instance.
*
@@ -232,5 +262,8 @@ public void validate() {
if (metrics() != null) {
metrics().forEach(e -> e.validate());
}
+ if (managedIdentities() != null) {
+ managedIdentities().forEach(e -> e.validate());
+ }
}
}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationTypeResource.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationTypeResource.java
index 61f1c262448e..0935b4581206 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationTypeResource.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationTypeResource.java
@@ -5,6 +5,7 @@
package com.azure.resourcemanager.servicefabric.models;
import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.servicefabric.fluent.models.ApplicationTypeResourceInner;
import java.util.Map;
@@ -61,6 +62,13 @@ public interface ApplicationTypeResource {
*/
String etag();
+ /**
+ * Gets the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ SystemData systemData();
+
/**
* Gets the region of the resource.
*
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationTypeVersionResource.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationTypeVersionResource.java
index fa0c73196a3e..7beda480aa76 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationTypeVersionResource.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationTypeVersionResource.java
@@ -5,6 +5,7 @@
package com.azure.resourcemanager.servicefabric.models;
import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.servicefabric.fluent.models.ApplicationTypeVersionResourceInner;
import java.util.Map;
@@ -76,6 +77,13 @@ public interface ApplicationTypeVersionResource {
*/
String etag();
+ /**
+ * Gets the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ SystemData systemData();
+
/**
* Gets the region of the resource.
*
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationTypeVersionsCleanupPolicy.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationTypeVersionsCleanupPolicy.java
new file mode 100644
index 000000000000..5327b321c3fe
--- /dev/null
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationTypeVersionsCleanupPolicy.java
@@ -0,0 +1,50 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.servicefabric.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The ApplicationTypeVersionsCleanupPolicy model. */
+@Fluent
+public final class ApplicationTypeVersionsCleanupPolicy {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationTypeVersionsCleanupPolicy.class);
+
+ /*
+ * Number of unused versions per application type to keep.
+ */
+ @JsonProperty(value = "maxUnusedVersionsToKeep", required = true)
+ private long maxUnusedVersionsToKeep;
+
+ /**
+ * Get the maxUnusedVersionsToKeep property: Number of unused versions per application type to keep.
+ *
+ * @return the maxUnusedVersionsToKeep value.
+ */
+ public long maxUnusedVersionsToKeep() {
+ return this.maxUnusedVersionsToKeep;
+ }
+
+ /**
+ * Set the maxUnusedVersionsToKeep property: Number of unused versions per application type to keep.
+ *
+ * @param maxUnusedVersionsToKeep the maxUnusedVersionsToKeep value to set.
+ * @return the ApplicationTypeVersionsCleanupPolicy object itself.
+ */
+ public ApplicationTypeVersionsCleanupPolicy withMaxUnusedVersionsToKeep(long maxUnusedVersionsToKeep) {
+ this.maxUnusedVersionsToKeep = maxUnusedVersionsToKeep;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationUpgradePolicy.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationUpgradePolicy.java
index 8a2df582cc1f..c4bd4b28deb1 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationUpgradePolicy.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationUpgradePolicy.java
@@ -47,6 +47,13 @@ public final class ApplicationUpgradePolicy {
@JsonProperty(value = "applicationHealthPolicy")
private ArmApplicationHealthPolicy applicationHealthPolicy;
+ /*
+ * The mode used to monitor health during a rolling upgrade. The values are
+ * UnmonitoredAuto, UnmonitoredManual, and Monitored.
+ */
+ @JsonProperty(value = "upgradeMode")
+ private RollingUpgradeMode upgradeMode;
+
/**
* Get the upgradeReplicaSetCheckTimeout property: The maximum amount of time to block processing of an upgrade
* domain and prevent loss of availability when there are unexpected issues. When this timeout expires, processing
@@ -138,6 +145,28 @@ public ApplicationUpgradePolicy withApplicationHealthPolicy(ArmApplicationHealth
return this;
}
+ /**
+ * Get the upgradeMode property: The mode used to monitor health during a rolling upgrade. The values are
+ * UnmonitoredAuto, UnmonitoredManual, and Monitored.
+ *
+ * @return the upgradeMode value.
+ */
+ public RollingUpgradeMode upgradeMode() {
+ return this.upgradeMode;
+ }
+
+ /**
+ * Set the upgradeMode property: The mode used to monitor health during a rolling upgrade. The values are
+ * UnmonitoredAuto, UnmonitoredManual, and Monitored.
+ *
+ * @param upgradeMode the upgradeMode value to set.
+ * @return the ApplicationUpgradePolicy object itself.
+ */
+ public ApplicationUpgradePolicy withUpgradeMode(RollingUpgradeMode upgradeMode) {
+ this.upgradeMode = upgradeMode;
+ return this;
+ }
+
/**
* Validates the instance.
*
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationUserAssignedIdentity.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationUserAssignedIdentity.java
new file mode 100644
index 000000000000..fe7dddc496e0
--- /dev/null
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationUserAssignedIdentity.java
@@ -0,0 +1,88 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.servicefabric.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The ApplicationUserAssignedIdentity model. */
+@Fluent
+public class ApplicationUserAssignedIdentity {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationUserAssignedIdentity.class);
+
+ /*
+ * The friendly name of user assigned identity.
+ */
+ @JsonProperty(value = "name", required = true)
+ private String name;
+
+ /*
+ * The principal id of user assigned identity.
+ */
+ @JsonProperty(value = "principalId", required = true)
+ private String principalId;
+
+ /**
+ * Get the name property: The friendly name of user assigned identity.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: The friendly name of user assigned identity.
+ *
+ * @param name the name value to set.
+ * @return the ApplicationUserAssignedIdentity object itself.
+ */
+ public ApplicationUserAssignedIdentity withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the principalId property: The principal id of user assigned identity.
+ *
+ * @return the principalId value.
+ */
+ public String principalId() {
+ return this.principalId;
+ }
+
+ /**
+ * Set the principalId property: The principal id of user assigned identity.
+ *
+ * @param principalId the principalId value to set.
+ * @return the ApplicationUserAssignedIdentity object itself.
+ */
+ public ApplicationUserAssignedIdentity withPrincipalId(String principalId) {
+ this.principalId = principalId;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (name() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property name in model ApplicationUserAssignedIdentity"));
+ }
+ if (principalId() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property principalId in model ApplicationUserAssignedIdentity"));
+ }
+ }
+}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/Cluster.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/Cluster.java
index 7907f04e57dd..8bc651c6b312 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/Cluster.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/Cluster.java
@@ -4,9 +4,12 @@
package com.azure.resourcemanager.servicefabric.models;
+import com.azure.core.http.rest.Response;
import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.servicefabric.fluent.models.ClusterInner;
+import java.time.OffsetDateTime;
import java.util.List;
import java.util.Map;
@@ -230,14 +233,17 @@ public interface Cluster {
* Gets the upgradeMode property: The upgrade mode of the cluster when new Service Fabric runtime version is
* available.
*
- * - Automatic - The cluster will be automatically upgraded to the latest Service Fabric runtime version as soon
- * as it is available. - Manual - The cluster will not be automatically upgraded to the latest Service Fabric
- * runtime version. The cluster is upgraded by setting the **clusterCodeVersion** property in the cluster resource.
- *
* @return the upgradeMode value.
*/
UpgradeMode upgradeMode();
+ /**
+ * Gets the applicationTypeVersionsCleanupPolicy property: The policy used to clean up unused versions.
+ *
+ * @return the applicationTypeVersionsCleanupPolicy value.
+ */
+ ApplicationTypeVersionsCleanupPolicy applicationTypeVersionsCleanupPolicy();
+
/**
* Gets the vmImage property: The VM image VMSS has been configured with. Generic names such as Windows or Linux can
* be used.
@@ -246,6 +252,68 @@ public interface Cluster {
*/
String vmImage();
+ /**
+ * Gets the sfZonalUpgradeMode property: This property controls the logical grouping of VMs in upgrade domains
+ * (UDs). This property can't be modified if a node type with multiple Availability Zones is already present in the
+ * cluster.
+ *
+ * @return the sfZonalUpgradeMode value.
+ */
+ SfZonalUpgradeMode sfZonalUpgradeMode();
+
+ /**
+ * Gets the vmssZonalUpgradeMode property: This property defines the upgrade mode for the virtual machine scale set,
+ * it is mandatory if a node type with multiple Availability Zones is added.
+ *
+ * @return the vmssZonalUpgradeMode value.
+ */
+ VmssZonalUpgradeMode vmssZonalUpgradeMode();
+
+ /**
+ * Gets the infrastructureServiceManager property: Indicates if infrastructure service manager is enabled.
+ *
+ * @return the infrastructureServiceManager value.
+ */
+ Boolean infrastructureServiceManager();
+
+ /**
+ * Gets the upgradeWave property: Indicates when new cluster runtime version upgrades will be applied after they are
+ * released. By default is Wave0. Only applies when **upgradeMode** is set to 'Automatic'.
+ *
+ * @return the upgradeWave value.
+ */
+ ClusterUpgradeCadence upgradeWave();
+
+ /**
+ * Gets the upgradePauseStartTimestampUtc property: Indicates the start date and time to pause automatic runtime
+ * version upgrades on the cluster for an specific period of time on the cluster (UTC).
+ *
+ * @return the upgradePauseStartTimestampUtc value.
+ */
+ OffsetDateTime upgradePauseStartTimestampUtc();
+
+ /**
+ * Gets the upgradePauseEndTimestampUtc property: Indicates the end date and time to pause automatic runtime version
+ * upgrades on the cluster for an specific period of time on the cluster (UTC).
+ *
+ * @return the upgradePauseEndTimestampUtc value.
+ */
+ OffsetDateTime upgradePauseEndTimestampUtc();
+
+ /**
+ * Gets the waveUpgradePaused property: Boolean to pause automatic runtime version upgrades to the cluster.
+ *
+ * @return the waveUpgradePaused value.
+ */
+ Boolean waveUpgradePaused();
+
+ /**
+ * Gets the notifications property: Indicates a list of notification channels for cluster events.
+ *
+ * @return the notifications value.
+ */
+ List notifications();
+
/**
* Gets the etag property: Azure resource etag.
*
@@ -253,6 +321,13 @@ public interface Cluster {
*/
String etag();
+ /**
+ * Gets the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ SystemData systemData();
+
/**
* Gets the region of the resource.
*
@@ -337,7 +412,16 @@ interface WithCreate
DefinitionStages.WithReverseProxyCertificateCommonNames,
DefinitionStages.WithUpgradeDescription,
DefinitionStages.WithUpgradeMode,
- DefinitionStages.WithVmImage {
+ DefinitionStages.WithApplicationTypeVersionsCleanupPolicy,
+ DefinitionStages.WithVmImage,
+ DefinitionStages.WithSfZonalUpgradeMode,
+ DefinitionStages.WithVmssZonalUpgradeMode,
+ DefinitionStages.WithInfrastructureServiceManager,
+ DefinitionStages.WithUpgradeWave,
+ DefinitionStages.WithUpgradePauseStartTimestampUtc,
+ DefinitionStages.WithUpgradePauseEndTimestampUtc,
+ DefinitionStages.WithWaveUpgradePaused,
+ DefinitionStages.WithNotifications {
/**
* Executes the create request.
*
@@ -563,22 +647,25 @@ interface WithUpgradeDescription {
interface WithUpgradeMode {
/**
* Specifies the upgradeMode property: The upgrade mode of the cluster when new Service Fabric runtime
- * version is available.
- *
- * - Automatic - The cluster will be automatically upgraded to the latest Service Fabric runtime version
- * as soon as it is available. - Manual - The cluster will not be automatically upgraded to the latest
- * Service Fabric runtime version. The cluster is upgraded by setting the **clusterCodeVersion** property in
- * the cluster resource. .
+ * version is available..
*
* @param upgradeMode The upgrade mode of the cluster when new Service Fabric runtime version is available.
- *
- Automatic - The cluster will be automatically upgraded to the latest Service Fabric runtime
- * version as soon as it is available. - Manual - The cluster will not be automatically upgraded to the
- * latest Service Fabric runtime version. The cluster is upgraded by setting the **clusterCodeVersion**
- * property in the cluster resource.
* @return the next definition stage.
*/
WithCreate withUpgradeMode(UpgradeMode upgradeMode);
}
+ /** The stage of the Cluster definition allowing to specify applicationTypeVersionsCleanupPolicy. */
+ interface WithApplicationTypeVersionsCleanupPolicy {
+ /**
+ * Specifies the applicationTypeVersionsCleanupPolicy property: The policy used to clean up unused
+ * versions..
+ *
+ * @param applicationTypeVersionsCleanupPolicy The policy used to clean up unused versions.
+ * @return the next definition stage.
+ */
+ WithCreate withApplicationTypeVersionsCleanupPolicy(
+ ApplicationTypeVersionsCleanupPolicy applicationTypeVersionsCleanupPolicy);
+ }
/** The stage of the Cluster definition allowing to specify vmImage. */
interface WithVmImage {
/**
@@ -591,6 +678,100 @@ interface WithVmImage {
*/
WithCreate withVmImage(String vmImage);
}
+ /** The stage of the Cluster definition allowing to specify sfZonalUpgradeMode. */
+ interface WithSfZonalUpgradeMode {
+ /**
+ * Specifies the sfZonalUpgradeMode property: This property controls the logical grouping of VMs in upgrade
+ * domains (UDs). This property can't be modified if a node type with multiple Availability Zones is already
+ * present in the cluster..
+ *
+ * @param sfZonalUpgradeMode This property controls the logical grouping of VMs in upgrade domains (UDs).
+ * This property can't be modified if a node type with multiple Availability Zones is already present in
+ * the cluster.
+ * @return the next definition stage.
+ */
+ WithCreate withSfZonalUpgradeMode(SfZonalUpgradeMode sfZonalUpgradeMode);
+ }
+ /** The stage of the Cluster definition allowing to specify vmssZonalUpgradeMode. */
+ interface WithVmssZonalUpgradeMode {
+ /**
+ * Specifies the vmssZonalUpgradeMode property: This property defines the upgrade mode for the virtual
+ * machine scale set, it is mandatory if a node type with multiple Availability Zones is added..
+ *
+ * @param vmssZonalUpgradeMode This property defines the upgrade mode for the virtual machine scale set, it
+ * is mandatory if a node type with multiple Availability Zones is added.
+ * @return the next definition stage.
+ */
+ WithCreate withVmssZonalUpgradeMode(VmssZonalUpgradeMode vmssZonalUpgradeMode);
+ }
+ /** The stage of the Cluster definition allowing to specify infrastructureServiceManager. */
+ interface WithInfrastructureServiceManager {
+ /**
+ * Specifies the infrastructureServiceManager property: Indicates if infrastructure service manager is
+ * enabled..
+ *
+ * @param infrastructureServiceManager Indicates if infrastructure service manager is enabled.
+ * @return the next definition stage.
+ */
+ WithCreate withInfrastructureServiceManager(Boolean infrastructureServiceManager);
+ }
+ /** The stage of the Cluster definition allowing to specify upgradeWave. */
+ interface WithUpgradeWave {
+ /**
+ * Specifies the upgradeWave property: Indicates when new cluster runtime version upgrades will be applied
+ * after they are released. By default is Wave0. Only applies when **upgradeMode** is set to 'Automatic'..
+ *
+ * @param upgradeWave Indicates when new cluster runtime version upgrades will be applied after they are
+ * released. By default is Wave0. Only applies when **upgradeMode** is set to 'Automatic'.
+ * @return the next definition stage.
+ */
+ WithCreate withUpgradeWave(ClusterUpgradeCadence upgradeWave);
+ }
+ /** The stage of the Cluster definition allowing to specify upgradePauseStartTimestampUtc. */
+ interface WithUpgradePauseStartTimestampUtc {
+ /**
+ * Specifies the upgradePauseStartTimestampUtc property: Indicates the start date and time to pause
+ * automatic runtime version upgrades on the cluster for an specific period of time on the cluster (UTC)..
+ *
+ * @param upgradePauseStartTimestampUtc Indicates the start date and time to pause automatic runtime version
+ * upgrades on the cluster for an specific period of time on the cluster (UTC).
+ * @return the next definition stage.
+ */
+ WithCreate withUpgradePauseStartTimestampUtc(OffsetDateTime upgradePauseStartTimestampUtc);
+ }
+ /** The stage of the Cluster definition allowing to specify upgradePauseEndTimestampUtc. */
+ interface WithUpgradePauseEndTimestampUtc {
+ /**
+ * Specifies the upgradePauseEndTimestampUtc property: Indicates the end date and time to pause automatic
+ * runtime version upgrades on the cluster for an specific period of time on the cluster (UTC)..
+ *
+ * @param upgradePauseEndTimestampUtc Indicates the end date and time to pause automatic runtime version
+ * upgrades on the cluster for an specific period of time on the cluster (UTC).
+ * @return the next definition stage.
+ */
+ WithCreate withUpgradePauseEndTimestampUtc(OffsetDateTime upgradePauseEndTimestampUtc);
+ }
+ /** The stage of the Cluster definition allowing to specify waveUpgradePaused. */
+ interface WithWaveUpgradePaused {
+ /**
+ * Specifies the waveUpgradePaused property: Boolean to pause automatic runtime version upgrades to the
+ * cluster..
+ *
+ * @param waveUpgradePaused Boolean to pause automatic runtime version upgrades to the cluster.
+ * @return the next definition stage.
+ */
+ WithCreate withWaveUpgradePaused(Boolean waveUpgradePaused);
+ }
+ /** The stage of the Cluster definition allowing to specify notifications. */
+ interface WithNotifications {
+ /**
+ * Specifies the notifications property: Indicates a list of notification channels for cluster events..
+ *
+ * @param notifications Indicates a list of notification channels for cluster events.
+ * @return the next definition stage.
+ */
+ WithCreate withNotifications(List notifications);
+ }
}
/**
* Begins update for the Cluster resource.
@@ -614,7 +795,16 @@ interface Update
UpdateStages.WithReliabilityLevel,
UpdateStages.WithReverseProxyCertificate,
UpdateStages.WithUpgradeDescription,
- UpdateStages.WithUpgradeMode {
+ UpdateStages.WithApplicationTypeVersionsCleanupPolicy,
+ UpdateStages.WithUpgradeMode,
+ UpdateStages.WithSfZonalUpgradeMode,
+ UpdateStages.WithVmssZonalUpgradeMode,
+ UpdateStages.WithInfrastructureServiceManager,
+ UpdateStages.WithUpgradeWave,
+ UpdateStages.WithUpgradePauseStartTimestampUtc,
+ UpdateStages.WithUpgradePauseEndTimestampUtc,
+ UpdateStages.WithWaveUpgradePaused,
+ UpdateStages.WithNotifications {
/**
* Executes the update request.
*
@@ -795,26 +985,123 @@ interface WithUpgradeDescription {
*/
Update withUpgradeDescription(ClusterUpgradePolicy upgradeDescription);
}
+ /** The stage of the Cluster update allowing to specify applicationTypeVersionsCleanupPolicy. */
+ interface WithApplicationTypeVersionsCleanupPolicy {
+ /**
+ * Specifies the applicationTypeVersionsCleanupPolicy property: The policy used to clean up unused
+ * versions..
+ *
+ * @param applicationTypeVersionsCleanupPolicy The policy used to clean up unused versions.
+ * @return the next definition stage.
+ */
+ Update withApplicationTypeVersionsCleanupPolicy(
+ ApplicationTypeVersionsCleanupPolicy applicationTypeVersionsCleanupPolicy);
+ }
/** The stage of the Cluster update allowing to specify upgradeMode. */
interface WithUpgradeMode {
/**
* Specifies the upgradeMode property: The upgrade mode of the cluster when new Service Fabric runtime
- * version is available.
- *
- * - Automatic - The cluster will be automatically upgraded to the latest Service Fabric runtime version
- * as soon as it is available. - Manual - The cluster will not be automatically upgraded to the latest
- * Service Fabric runtime version. The cluster is upgraded by setting the **clusterCodeVersion** property in
- * the cluster resource. .
+ * version is available..
*
* @param upgradeMode The upgrade mode of the cluster when new Service Fabric runtime version is available.
- *
- Automatic - The cluster will be automatically upgraded to the latest Service Fabric runtime
- * version as soon as it is available. - Manual - The cluster will not be automatically upgraded to the
- * latest Service Fabric runtime version. The cluster is upgraded by setting the **clusterCodeVersion**
- * property in the cluster resource.
* @return the next definition stage.
*/
Update withUpgradeMode(UpgradeMode upgradeMode);
}
+ /** The stage of the Cluster update allowing to specify sfZonalUpgradeMode. */
+ interface WithSfZonalUpgradeMode {
+ /**
+ * Specifies the sfZonalUpgradeMode property: This property controls the logical grouping of VMs in upgrade
+ * domains (UDs). This property can't be modified if a node type with multiple Availability Zones is already
+ * present in the cluster..
+ *
+ * @param sfZonalUpgradeMode This property controls the logical grouping of VMs in upgrade domains (UDs).
+ * This property can't be modified if a node type with multiple Availability Zones is already present in
+ * the cluster.
+ * @return the next definition stage.
+ */
+ Update withSfZonalUpgradeMode(SfZonalUpgradeMode sfZonalUpgradeMode);
+ }
+ /** The stage of the Cluster update allowing to specify vmssZonalUpgradeMode. */
+ interface WithVmssZonalUpgradeMode {
+ /**
+ * Specifies the vmssZonalUpgradeMode property: This property defines the upgrade mode for the virtual
+ * machine scale set, it is mandatory if a node type with multiple Availability Zones is added..
+ *
+ * @param vmssZonalUpgradeMode This property defines the upgrade mode for the virtual machine scale set, it
+ * is mandatory if a node type with multiple Availability Zones is added.
+ * @return the next definition stage.
+ */
+ Update withVmssZonalUpgradeMode(VmssZonalUpgradeMode vmssZonalUpgradeMode);
+ }
+ /** The stage of the Cluster update allowing to specify infrastructureServiceManager. */
+ interface WithInfrastructureServiceManager {
+ /**
+ * Specifies the infrastructureServiceManager property: Indicates if infrastructure service manager is
+ * enabled..
+ *
+ * @param infrastructureServiceManager Indicates if infrastructure service manager is enabled.
+ * @return the next definition stage.
+ */
+ Update withInfrastructureServiceManager(Boolean infrastructureServiceManager);
+ }
+ /** The stage of the Cluster update allowing to specify upgradeWave. */
+ interface WithUpgradeWave {
+ /**
+ * Specifies the upgradeWave property: Indicates when new cluster runtime version upgrades will be applied
+ * after they are released. By default is Wave0. Only applies when **upgradeMode** is set to 'Automatic'..
+ *
+ * @param upgradeWave Indicates when new cluster runtime version upgrades will be applied after they are
+ * released. By default is Wave0. Only applies when **upgradeMode** is set to 'Automatic'.
+ * @return the next definition stage.
+ */
+ Update withUpgradeWave(ClusterUpgradeCadence upgradeWave);
+ }
+ /** The stage of the Cluster update allowing to specify upgradePauseStartTimestampUtc. */
+ interface WithUpgradePauseStartTimestampUtc {
+ /**
+ * Specifies the upgradePauseStartTimestampUtc property: The start timestamp to pause runtime version
+ * upgrades on the cluster (UTC)..
+ *
+ * @param upgradePauseStartTimestampUtc The start timestamp to pause runtime version upgrades on the cluster
+ * (UTC).
+ * @return the next definition stage.
+ */
+ Update withUpgradePauseStartTimestampUtc(OffsetDateTime upgradePauseStartTimestampUtc);
+ }
+ /** The stage of the Cluster update allowing to specify upgradePauseEndTimestampUtc. */
+ interface WithUpgradePauseEndTimestampUtc {
+ /**
+ * Specifies the upgradePauseEndTimestampUtc property: The end timestamp of pause runtime version upgrades
+ * on the cluster (UTC)..
+ *
+ * @param upgradePauseEndTimestampUtc The end timestamp of pause runtime version upgrades on the cluster
+ * (UTC).
+ * @return the next definition stage.
+ */
+ Update withUpgradePauseEndTimestampUtc(OffsetDateTime upgradePauseEndTimestampUtc);
+ }
+ /** The stage of the Cluster update allowing to specify waveUpgradePaused. */
+ interface WithWaveUpgradePaused {
+ /**
+ * Specifies the waveUpgradePaused property: Boolean to pause automatic runtime version upgrades to the
+ * cluster..
+ *
+ * @param waveUpgradePaused Boolean to pause automatic runtime version upgrades to the cluster.
+ * @return the next definition stage.
+ */
+ Update withWaveUpgradePaused(Boolean waveUpgradePaused);
+ }
+ /** The stage of the Cluster update allowing to specify notifications. */
+ interface WithNotifications {
+ /**
+ * Specifies the notifications property: Indicates a list of notification channels for cluster events..
+ *
+ * @param notifications Indicates a list of notification channels for cluster events.
+ * @return the next definition stage.
+ */
+ Update withNotifications(List notifications);
+ }
}
/**
* Refreshes the resource to sync with Azure.
@@ -830,4 +1117,30 @@ interface WithUpgradeMode {
* @return the refreshed resource.
*/
Cluster refresh(Context context);
+
+ /**
+ * 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.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of intermediate cluster code versions for an upgrade or downgrade.
+ */
+ UpgradableVersionPathResult listUpgradableVersions();
+
+ /**
+ * 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.
+ *
+ * @param versionsDescription The upgrade path description with target version.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of intermediate cluster code versions for an upgrade or downgrade.
+ */
+ Response listUpgradableVersionsWithResponse(
+ UpgradableVersionsDescription versionsDescription, Context context);
}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterUpdateParameters.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterUpdateParameters.java
index 967954b43dd9..9633f3e2c78b 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterUpdateParameters.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterUpdateParameters.java
@@ -9,6 +9,7 @@
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
import java.util.List;
import java.util.Map;
@@ -119,20 +120,75 @@ public class ClusterUpdateParameters {
@JsonProperty(value = "properties.upgradeDescription")
private ClusterUpgradePolicy upgradeDescription;
+ /*
+ * The policy used to clean up unused versions.
+ */
+ @JsonProperty(value = "properties.applicationTypeVersionsCleanupPolicy")
+ private ApplicationTypeVersionsCleanupPolicy applicationTypeVersionsCleanupPolicy;
+
/*
* The upgrade mode of the cluster when new Service Fabric runtime version
* is available.
- *
- * - Automatic - The cluster will be automatically upgraded to the latest
- * Service Fabric runtime version as soon as it is available.
- * - Manual - The cluster will not be automatically upgraded to the latest
- * Service Fabric runtime version. The cluster is upgraded by setting the
- * **clusterCodeVersion** property in the cluster resource.
- *
*/
@JsonProperty(value = "properties.upgradeMode")
private UpgradeMode upgradeMode;
+ /*
+ * This property controls the logical grouping of VMs in upgrade domains
+ * (UDs). This property can't be modified if a node type with multiple
+ * Availability Zones is already present in the cluster.
+ */
+ @JsonProperty(value = "properties.sfZonalUpgradeMode")
+ private SfZonalUpgradeMode sfZonalUpgradeMode;
+
+ /*
+ * This property defines the upgrade mode for the virtual machine scale
+ * set, it is mandatory if a node type with multiple Availability Zones is
+ * added.
+ */
+ @JsonProperty(value = "properties.vmssZonalUpgradeMode")
+ private VmssZonalUpgradeMode vmssZonalUpgradeMode;
+
+ /*
+ * Indicates if infrastructure service manager is enabled.
+ */
+ @JsonProperty(value = "properties.infrastructureServiceManager")
+ private Boolean infrastructureServiceManager;
+
+ /*
+ * Indicates when new cluster runtime version upgrades will be applied
+ * after they are released. By default is Wave0. Only applies when
+ * **upgradeMode** is set to 'Automatic'.
+ */
+ @JsonProperty(value = "properties.upgradeWave")
+ private ClusterUpgradeCadence upgradeWave;
+
+ /*
+ * The start timestamp to pause runtime version upgrades on the cluster
+ * (UTC).
+ */
+ @JsonProperty(value = "properties.upgradePauseStartTimestampUtc")
+ private OffsetDateTime upgradePauseStartTimestampUtc;
+
+ /*
+ * The end timestamp of pause runtime version upgrades on the cluster
+ * (UTC).
+ */
+ @JsonProperty(value = "properties.upgradePauseEndTimestampUtc")
+ private OffsetDateTime upgradePauseEndTimestampUtc;
+
+ /*
+ * Boolean to pause automatic runtime version upgrades to the cluster.
+ */
+ @JsonProperty(value = "properties.waveUpgradePaused")
+ private Boolean waveUpgradePaused;
+
+ /*
+ * Indicates a list of notification channels for cluster events.
+ */
+ @JsonProperty(value = "properties.notifications")
+ private List notifications;
+
/**
* Get the tags property: Cluster update parameters.
*
@@ -427,14 +483,31 @@ public ClusterUpdateParameters withUpgradeDescription(ClusterUpgradePolicy upgra
return this;
}
+ /**
+ * Get the applicationTypeVersionsCleanupPolicy property: The policy used to clean up unused versions.
+ *
+ * @return the applicationTypeVersionsCleanupPolicy value.
+ */
+ public ApplicationTypeVersionsCleanupPolicy applicationTypeVersionsCleanupPolicy() {
+ return this.applicationTypeVersionsCleanupPolicy;
+ }
+
+ /**
+ * Set the applicationTypeVersionsCleanupPolicy property: The policy used to clean up unused versions.
+ *
+ * @param applicationTypeVersionsCleanupPolicy the applicationTypeVersionsCleanupPolicy value to set.
+ * @return the ClusterUpdateParameters object itself.
+ */
+ public ClusterUpdateParameters withApplicationTypeVersionsCleanupPolicy(
+ ApplicationTypeVersionsCleanupPolicy applicationTypeVersionsCleanupPolicy) {
+ this.applicationTypeVersionsCleanupPolicy = applicationTypeVersionsCleanupPolicy;
+ return this;
+ }
+
/**
* Get the upgradeMode property: The upgrade mode of the cluster when new Service Fabric runtime version is
* available.
*
- * - Automatic - The cluster will be automatically upgraded to the latest Service Fabric runtime version as soon
- * as it is available. - Manual - The cluster will not be automatically upgraded to the latest Service Fabric
- * runtime version. The cluster is upgraded by setting the **clusterCodeVersion** property in the cluster resource.
- *
* @return the upgradeMode value.
*/
public UpgradeMode upgradeMode() {
@@ -445,10 +518,6 @@ public UpgradeMode upgradeMode() {
* Set the upgradeMode property: The upgrade mode of the cluster when new Service Fabric runtime version is
* available.
*
- *
- Automatic - The cluster will be automatically upgraded to the latest Service Fabric runtime version as soon
- * as it is available. - Manual - The cluster will not be automatically upgraded to the latest Service Fabric
- * runtime version. The cluster is upgraded by setting the **clusterCodeVersion** property in the cluster resource.
- *
* @param upgradeMode the upgradeMode value to set.
* @return the ClusterUpdateParameters object itself.
*/
@@ -457,6 +526,178 @@ public ClusterUpdateParameters withUpgradeMode(UpgradeMode upgradeMode) {
return this;
}
+ /**
+ * Get the sfZonalUpgradeMode property: This property controls the logical grouping of VMs in upgrade domains (UDs).
+ * This property can't be modified if a node type with multiple Availability Zones is already present in the
+ * cluster.
+ *
+ * @return the sfZonalUpgradeMode value.
+ */
+ public SfZonalUpgradeMode sfZonalUpgradeMode() {
+ return this.sfZonalUpgradeMode;
+ }
+
+ /**
+ * Set the sfZonalUpgradeMode property: This property controls the logical grouping of VMs in upgrade domains (UDs).
+ * This property can't be modified if a node type with multiple Availability Zones is already present in the
+ * cluster.
+ *
+ * @param sfZonalUpgradeMode the sfZonalUpgradeMode value to set.
+ * @return the ClusterUpdateParameters object itself.
+ */
+ public ClusterUpdateParameters withSfZonalUpgradeMode(SfZonalUpgradeMode sfZonalUpgradeMode) {
+ this.sfZonalUpgradeMode = sfZonalUpgradeMode;
+ return this;
+ }
+
+ /**
+ * Get the vmssZonalUpgradeMode property: This property defines the upgrade mode for the virtual machine scale set,
+ * it is mandatory if a node type with multiple Availability Zones is added.
+ *
+ * @return the vmssZonalUpgradeMode value.
+ */
+ public VmssZonalUpgradeMode vmssZonalUpgradeMode() {
+ return this.vmssZonalUpgradeMode;
+ }
+
+ /**
+ * Set the vmssZonalUpgradeMode property: This property defines the upgrade mode for the virtual machine scale set,
+ * it is mandatory if a node type with multiple Availability Zones is added.
+ *
+ * @param vmssZonalUpgradeMode the vmssZonalUpgradeMode value to set.
+ * @return the ClusterUpdateParameters object itself.
+ */
+ public ClusterUpdateParameters withVmssZonalUpgradeMode(VmssZonalUpgradeMode vmssZonalUpgradeMode) {
+ this.vmssZonalUpgradeMode = vmssZonalUpgradeMode;
+ return this;
+ }
+
+ /**
+ * Get the infrastructureServiceManager property: Indicates if infrastructure service manager is enabled.
+ *
+ * @return the infrastructureServiceManager value.
+ */
+ public Boolean infrastructureServiceManager() {
+ return this.infrastructureServiceManager;
+ }
+
+ /**
+ * Set the infrastructureServiceManager property: Indicates if infrastructure service manager is enabled.
+ *
+ * @param infrastructureServiceManager the infrastructureServiceManager value to set.
+ * @return the ClusterUpdateParameters object itself.
+ */
+ public ClusterUpdateParameters withInfrastructureServiceManager(Boolean infrastructureServiceManager) {
+ this.infrastructureServiceManager = infrastructureServiceManager;
+ return this;
+ }
+
+ /**
+ * Get the upgradeWave property: Indicates when new cluster runtime version upgrades will be applied after they are
+ * released. By default is Wave0. Only applies when **upgradeMode** is set to 'Automatic'.
+ *
+ * @return the upgradeWave value.
+ */
+ public ClusterUpgradeCadence upgradeWave() {
+ return this.upgradeWave;
+ }
+
+ /**
+ * Set the upgradeWave property: Indicates when new cluster runtime version upgrades will be applied after they are
+ * released. By default is Wave0. Only applies when **upgradeMode** is set to 'Automatic'.
+ *
+ * @param upgradeWave the upgradeWave value to set.
+ * @return the ClusterUpdateParameters object itself.
+ */
+ public ClusterUpdateParameters withUpgradeWave(ClusterUpgradeCadence upgradeWave) {
+ this.upgradeWave = upgradeWave;
+ return this;
+ }
+
+ /**
+ * Get the upgradePauseStartTimestampUtc property: The start timestamp to pause runtime version upgrades on the
+ * cluster (UTC).
+ *
+ * @return the upgradePauseStartTimestampUtc value.
+ */
+ public OffsetDateTime upgradePauseStartTimestampUtc() {
+ return this.upgradePauseStartTimestampUtc;
+ }
+
+ /**
+ * Set the upgradePauseStartTimestampUtc property: The start timestamp to pause runtime version upgrades on the
+ * cluster (UTC).
+ *
+ * @param upgradePauseStartTimestampUtc the upgradePauseStartTimestampUtc value to set.
+ * @return the ClusterUpdateParameters object itself.
+ */
+ public ClusterUpdateParameters withUpgradePauseStartTimestampUtc(OffsetDateTime upgradePauseStartTimestampUtc) {
+ this.upgradePauseStartTimestampUtc = upgradePauseStartTimestampUtc;
+ return this;
+ }
+
+ /**
+ * Get the upgradePauseEndTimestampUtc property: The end timestamp of pause runtime version upgrades on the cluster
+ * (UTC).
+ *
+ * @return the upgradePauseEndTimestampUtc value.
+ */
+ public OffsetDateTime upgradePauseEndTimestampUtc() {
+ return this.upgradePauseEndTimestampUtc;
+ }
+
+ /**
+ * Set the upgradePauseEndTimestampUtc property: The end timestamp of pause runtime version upgrades on the cluster
+ * (UTC).
+ *
+ * @param upgradePauseEndTimestampUtc the upgradePauseEndTimestampUtc value to set.
+ * @return the ClusterUpdateParameters object itself.
+ */
+ public ClusterUpdateParameters withUpgradePauseEndTimestampUtc(OffsetDateTime upgradePauseEndTimestampUtc) {
+ this.upgradePauseEndTimestampUtc = upgradePauseEndTimestampUtc;
+ return this;
+ }
+
+ /**
+ * Get the waveUpgradePaused property: Boolean to pause automatic runtime version upgrades to the cluster.
+ *
+ * @return the waveUpgradePaused value.
+ */
+ public Boolean waveUpgradePaused() {
+ return this.waveUpgradePaused;
+ }
+
+ /**
+ * Set the waveUpgradePaused property: Boolean to pause automatic runtime version upgrades to the cluster.
+ *
+ * @param waveUpgradePaused the waveUpgradePaused value to set.
+ * @return the ClusterUpdateParameters object itself.
+ */
+ public ClusterUpdateParameters withWaveUpgradePaused(Boolean waveUpgradePaused) {
+ this.waveUpgradePaused = waveUpgradePaused;
+ return this;
+ }
+
+ /**
+ * Get the notifications property: Indicates a list of notification channels for cluster events.
+ *
+ * @return the notifications value.
+ */
+ public List notifications() {
+ return this.notifications;
+ }
+
+ /**
+ * Set the notifications property: Indicates a list of notification channels for cluster events.
+ *
+ * @param notifications the notifications value to set.
+ * @return the ClusterUpdateParameters object itself.
+ */
+ public ClusterUpdateParameters withNotifications(List notifications) {
+ this.notifications = notifications;
+ return this;
+ }
+
/**
* Validates the instance.
*
@@ -487,5 +728,11 @@ public void validate() {
if (upgradeDescription() != null) {
upgradeDescription().validate();
}
+ if (applicationTypeVersionsCleanupPolicy() != null) {
+ applicationTypeVersionsCleanupPolicy().validate();
+ }
+ if (notifications() != null) {
+ notifications().forEach(e -> e.validate());
+ }
}
}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterUpgradeCadence.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterUpgradeCadence.java
new file mode 100644
index 000000000000..e74aa60f83a8
--- /dev/null
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterUpgradeCadence.java
@@ -0,0 +1,37 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.servicefabric.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Defines values for ClusterUpgradeCadence. */
+public final class ClusterUpgradeCadence extends ExpandableStringEnum {
+ /** Static value Wave0 for ClusterUpgradeCadence. */
+ public static final ClusterUpgradeCadence WAVE0 = fromString("Wave0");
+
+ /** Static value Wave1 for ClusterUpgradeCadence. */
+ public static final ClusterUpgradeCadence WAVE1 = fromString("Wave1");
+
+ /** Static value Wave2 for ClusterUpgradeCadence. */
+ public static final ClusterUpgradeCadence WAVE2 = fromString("Wave2");
+
+ /**
+ * Creates or finds a ClusterUpgradeCadence from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding ClusterUpgradeCadence.
+ */
+ @JsonCreator
+ public static ClusterUpgradeCadence fromString(String name) {
+ return fromString(name, ClusterUpgradeCadence.class);
+ }
+
+ /** @return known ClusterUpgradeCadence values. */
+ public static Collection values() {
+ return values(ClusterUpgradeCadence.class);
+ }
+}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/Clusters.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/Clusters.java
index 602215724d71..58f7b87f76cb 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/Clusters.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/Clusters.java
@@ -103,6 +103,40 @@ public interface Clusters {
*/
Response listWithResponse(Context context);
+ /**
+ * 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.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param clusterName The name of the cluster resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of intermediate cluster code versions for an upgrade or downgrade.
+ */
+ UpgradableVersionPathResult listUpgradableVersions(String resourceGroupName, String clusterName);
+
+ /**
+ * 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.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param clusterName The name of the cluster resource.
+ * @param versionsDescription The upgrade path description with target version.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of intermediate cluster code versions for an upgrade or downgrade.
+ */
+ Response listUpgradableVersionsWithResponse(
+ String resourceGroupName,
+ String clusterName,
+ UpgradableVersionsDescription versionsDescription,
+ Context context);
+
/**
* Get a Service Fabric cluster resource created or in the process of being created in the specified resource group.
*
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/DiagnosticsStorageAccountConfig.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/DiagnosticsStorageAccountConfig.java
index bedf02bd66a1..74761b8526a0 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/DiagnosticsStorageAccountConfig.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/DiagnosticsStorageAccountConfig.java
@@ -26,6 +26,14 @@ public final class DiagnosticsStorageAccountConfig {
@JsonProperty(value = "protectedAccountKeyName", required = true)
private String protectedAccountKeyName;
+ /*
+ * The secondary protected diagnostics storage key name. If one of the
+ * storage account keys is rotated the cluster will fallback to using the
+ * other.
+ */
+ @JsonProperty(value = "protectedAccountKeyName2")
+ private String protectedAccountKeyName2;
+
/*
* The blob endpoint of the azure storage account.
*/
@@ -84,6 +92,28 @@ public DiagnosticsStorageAccountConfig withProtectedAccountKeyName(String protec
return this;
}
+ /**
+ * Get the protectedAccountKeyName2 property: The secondary protected diagnostics storage key name. If one of the
+ * storage account keys is rotated the cluster will fallback to using the other.
+ *
+ * @return the protectedAccountKeyName2 value.
+ */
+ public String protectedAccountKeyName2() {
+ return this.protectedAccountKeyName2;
+ }
+
+ /**
+ * Set the protectedAccountKeyName2 property: The secondary protected diagnostics storage key name. If one of the
+ * storage account keys is rotated the cluster will fallback to using the other.
+ *
+ * @param protectedAccountKeyName2 the protectedAccountKeyName2 value to set.
+ * @return the DiagnosticsStorageAccountConfig object itself.
+ */
+ public DiagnosticsStorageAccountConfig withProtectedAccountKeyName2(String protectedAccountKeyName2) {
+ this.protectedAccountKeyName2 = protectedAccountKeyName2;
+ return this;
+ }
+
/**
* Get the blobEndpoint property: The blob endpoint of the azure storage account.
*
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ManagedIdentity.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ManagedIdentity.java
new file mode 100644
index 000000000000..2e3efce7eab6
--- /dev/null
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ManagedIdentity.java
@@ -0,0 +1,128 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.servicefabric.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** Describes the managed identities for an Azure resource. */
+@Fluent
+public class ManagedIdentity {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedIdentity.class);
+
+ /*
+ * The principal id of the managed identity. This property will only be
+ * provided for a system assigned identity.
+ */
+ @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY)
+ private String principalId;
+
+ /*
+ * The tenant id of the managed identity. This property will only be
+ * provided for a system assigned identity.
+ */
+ @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY)
+ private String tenantId;
+
+ /*
+ * The type of managed identity for the resource.
+ */
+ @JsonProperty(value = "type")
+ private ManagedIdentityType type;
+
+ /*
+ * The list of user identities associated with the resource. The user
+ * identity dictionary key references will be ARM resource ids in the form:
+ * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
+ *
+ */
+ @JsonProperty(value = "userAssignedIdentities")
+ private Map userAssignedIdentities;
+
+ /**
+ * Get the principalId property: The principal id of the managed identity. This property will only be provided for a
+ * system assigned identity.
+ *
+ * @return the principalId value.
+ */
+ public String principalId() {
+ return this.principalId;
+ }
+
+ /**
+ * Get the tenantId property: The tenant id of the managed identity. This property will only be provided for a
+ * system assigned identity.
+ *
+ * @return the tenantId value.
+ */
+ public String tenantId() {
+ return this.tenantId;
+ }
+
+ /**
+ * Get the type property: The type of managed identity for the resource.
+ *
+ * @return the type value.
+ */
+ public ManagedIdentityType type() {
+ return this.type;
+ }
+
+ /**
+ * Set the type property: The type of managed identity for the resource.
+ *
+ * @param type the type value to set.
+ * @return the ManagedIdentity object itself.
+ */
+ public ManagedIdentity withType(ManagedIdentityType type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Get the userAssignedIdentities property: The list of user identities associated with the resource. The user
+ * identity dictionary key references will be ARM resource ids in the form:
+ * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
+ *
+ * @return the userAssignedIdentities value.
+ */
+ public Map userAssignedIdentities() {
+ return this.userAssignedIdentities;
+ }
+
+ /**
+ * Set the userAssignedIdentities property: The list of user identities associated with the resource. The user
+ * identity dictionary key references will be ARM resource ids in the form:
+ * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
+ *
+ * @param userAssignedIdentities the userAssignedIdentities value to set.
+ * @return the ManagedIdentity object itself.
+ */
+ public ManagedIdentity withUserAssignedIdentities(Map userAssignedIdentities) {
+ this.userAssignedIdentities = userAssignedIdentities;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (userAssignedIdentities() != null) {
+ userAssignedIdentities()
+ .values()
+ .forEach(
+ e -> {
+ if (e != null) {
+ e.validate();
+ }
+ });
+ }
+ }
+}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ManagedIdentityType.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ManagedIdentityType.java
new file mode 100644
index 000000000000..4e259f7a33df
--- /dev/null
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ManagedIdentityType.java
@@ -0,0 +1,53 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.servicefabric.models;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/** Defines values for ManagedIdentityType. */
+public enum ManagedIdentityType {
+ /** Enum value SystemAssigned. */
+ SYSTEM_ASSIGNED("SystemAssigned"),
+
+ /** Enum value UserAssigned. */
+ USER_ASSIGNED("UserAssigned"),
+
+ /** Enum value SystemAssigned, UserAssigned. */
+ SYSTEM_ASSIGNED_USER_ASSIGNED("SystemAssigned, UserAssigned"),
+
+ /** Enum value None. */
+ NONE("None");
+
+ /** The actual serialized value for a ManagedIdentityType instance. */
+ private final String value;
+
+ ManagedIdentityType(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a ManagedIdentityType instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed ManagedIdentityType object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static ManagedIdentityType fromString(String value) {
+ ManagedIdentityType[] items = ManagedIdentityType.values();
+ for (ManagedIdentityType item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/NamedPartitionSchemeDescription.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/NamedPartitionSchemeDescription.java
index b3bd2311c65e..e714831b55d7 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/NamedPartitionSchemeDescription.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/NamedPartitionSchemeDescription.java
@@ -22,14 +22,14 @@ public final class NamedPartitionSchemeDescription extends PartitionSchemeDescri
/*
* The number of partitions.
*/
- @JsonProperty(value = "Count", required = true)
+ @JsonProperty(value = "count", required = true)
private int count;
/*
- * Array of size specified by the ‘Count’ parameter, for the names of the
+ * Array of size specified by the ‘count’ parameter, for the names of the
* partitions.
*/
- @JsonProperty(value = "Names", required = true)
+ @JsonProperty(value = "names", required = true)
private List names;
/**
@@ -53,7 +53,7 @@ public NamedPartitionSchemeDescription withCount(int count) {
}
/**
- * Get the names property: Array of size specified by the ‘Count’ parameter, for the names of the partitions.
+ * Get the names property: Array of size specified by the ‘count’ parameter, for the names of the partitions.
*
* @return the names value.
*/
@@ -62,7 +62,7 @@ public List names() {
}
/**
- * Set the names property: Array of size specified by the ‘Count’ parameter, for the names of the partitions.
+ * Set the names property: Array of size specified by the ‘count’ parameter, for the names of the partitions.
*
* @param names the names value to set.
* @return the NamedPartitionSchemeDescription object itself.
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/NodeTypeDescription.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/NodeTypeDescription.java
index fe112aaedd4f..63a6c1415d78 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/NodeTypeDescription.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/NodeTypeDescription.java
@@ -86,8 +86,13 @@ public final class NodeTypeDescription {
private boolean isPrimary;
/*
- * The number of nodes in the node type. This count should match the
- * capacity property in the corresponding VirtualMachineScaleSet resource.
+ * VMInstanceCount should be 1 to n, where n indicates the number of VM
+ * instances corresponding to this nodeType. VMInstanceCount = 0 can be
+ * done only in these scenarios: NodeType is a secondary nodeType.
+ * Durability = Bronze or Durability >= Bronze and
+ * InfrastructureServiceManager = true. If VMInstanceCount = 0, implies the
+ * VMs for this nodeType will not be used for the initial cluster size
+ * computation.
*/
@JsonProperty(value = "vmInstanceCount", required = true)
private int vmInstanceCount;
@@ -98,6 +103,18 @@ public final class NodeTypeDescription {
@JsonProperty(value = "reverseProxyEndpointPort")
private Integer reverseProxyEndpointPort;
+ /*
+ * Indicates if the node type can only host Stateless workloads.
+ */
+ @JsonProperty(value = "isStateless")
+ private Boolean isStateless;
+
+ /*
+ * Indicates if the node type is enabled to support multiple zones.
+ */
+ @JsonProperty(value = "multipleAvailabilityZones")
+ private Boolean multipleAvailabilityZones;
+
/**
* Get the name property: The name of the node type.
*
@@ -299,8 +316,10 @@ public NodeTypeDescription withIsPrimary(boolean isPrimary) {
}
/**
- * Get the vmInstanceCount property: The number of nodes in the node type. This count should match the capacity
- * property in the corresponding VirtualMachineScaleSet resource.
+ * Get the vmInstanceCount property: VMInstanceCount should be 1 to n, where n indicates the number of VM instances
+ * corresponding to this nodeType. VMInstanceCount = 0 can be done only in these scenarios: NodeType is a secondary
+ * nodeType. Durability = Bronze or Durability >= Bronze and InfrastructureServiceManager = true. If
+ * VMInstanceCount = 0, implies the VMs for this nodeType will not be used for the initial cluster size computation.
*
* @return the vmInstanceCount value.
*/
@@ -309,8 +328,10 @@ public int vmInstanceCount() {
}
/**
- * Set the vmInstanceCount property: The number of nodes in the node type. This count should match the capacity
- * property in the corresponding VirtualMachineScaleSet resource.
+ * Set the vmInstanceCount property: VMInstanceCount should be 1 to n, where n indicates the number of VM instances
+ * corresponding to this nodeType. VMInstanceCount = 0 can be done only in these scenarios: NodeType is a secondary
+ * nodeType. Durability = Bronze or Durability >= Bronze and InfrastructureServiceManager = true. If
+ * VMInstanceCount = 0, implies the VMs for this nodeType will not be used for the initial cluster size computation.
*
* @param vmInstanceCount the vmInstanceCount value to set.
* @return the NodeTypeDescription object itself.
@@ -340,6 +361,46 @@ public NodeTypeDescription withReverseProxyEndpointPort(Integer reverseProxyEndp
return this;
}
+ /**
+ * Get the isStateless property: Indicates if the node type can only host Stateless workloads.
+ *
+ * @return the isStateless value.
+ */
+ public Boolean isStateless() {
+ return this.isStateless;
+ }
+
+ /**
+ * Set the isStateless property: Indicates if the node type can only host Stateless workloads.
+ *
+ * @param isStateless the isStateless value to set.
+ * @return the NodeTypeDescription object itself.
+ */
+ public NodeTypeDescription withIsStateless(Boolean isStateless) {
+ this.isStateless = isStateless;
+ return this;
+ }
+
+ /**
+ * Get the multipleAvailabilityZones property: Indicates if the node type is enabled to support multiple zones.
+ *
+ * @return the multipleAvailabilityZones value.
+ */
+ public Boolean multipleAvailabilityZones() {
+ return this.multipleAvailabilityZones;
+ }
+
+ /**
+ * Set the multipleAvailabilityZones property: Indicates if the node type is enabled to support multiple zones.
+ *
+ * @param multipleAvailabilityZones the multipleAvailabilityZones value to set.
+ * @return the NodeTypeDescription object itself.
+ */
+ public NodeTypeDescription withMultipleAvailabilityZones(Boolean multipleAvailabilityZones) {
+ this.multipleAvailabilityZones = multipleAvailabilityZones;
+ return this;
+ }
+
/**
* Validates the instance.
*
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/Notification.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/Notification.java
new file mode 100644
index 000000000000..3eb5bcca6af1
--- /dev/null
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/Notification.java
@@ -0,0 +1,148 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.servicefabric.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Describes the notification channel for cluster events. */
+@Fluent
+public final class Notification {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(Notification.class);
+
+ /*
+ * Indicates if the notification is enabled.
+ */
+ @JsonProperty(value = "isEnabled", required = true)
+ private boolean isEnabled;
+
+ /*
+ * The category of notification.
+ */
+ @JsonProperty(value = "notificationCategory", required = true)
+ private NotificationCategory notificationCategory;
+
+ /*
+ * The level of notification.
+ */
+ @JsonProperty(value = "notificationLevel", required = true)
+ private NotificationLevel notificationLevel;
+
+ /*
+ * List of targets that subscribe to the notification.
+ */
+ @JsonProperty(value = "notificationTargets", required = true)
+ private List notificationTargets;
+
+ /**
+ * Get the isEnabled property: Indicates if the notification is enabled.
+ *
+ * @return the isEnabled value.
+ */
+ public boolean isEnabled() {
+ return this.isEnabled;
+ }
+
+ /**
+ * Set the isEnabled property: Indicates if the notification is enabled.
+ *
+ * @param isEnabled the isEnabled value to set.
+ * @return the Notification object itself.
+ */
+ public Notification withIsEnabled(boolean isEnabled) {
+ this.isEnabled = isEnabled;
+ return this;
+ }
+
+ /**
+ * Get the notificationCategory property: The category of notification.
+ *
+ * @return the notificationCategory value.
+ */
+ public NotificationCategory notificationCategory() {
+ return this.notificationCategory;
+ }
+
+ /**
+ * Set the notificationCategory property: The category of notification.
+ *
+ * @param notificationCategory the notificationCategory value to set.
+ * @return the Notification object itself.
+ */
+ public Notification withNotificationCategory(NotificationCategory notificationCategory) {
+ this.notificationCategory = notificationCategory;
+ return this;
+ }
+
+ /**
+ * Get the notificationLevel property: The level of notification.
+ *
+ * @return the notificationLevel value.
+ */
+ public NotificationLevel notificationLevel() {
+ return this.notificationLevel;
+ }
+
+ /**
+ * Set the notificationLevel property: The level of notification.
+ *
+ * @param notificationLevel the notificationLevel value to set.
+ * @return the Notification object itself.
+ */
+ public Notification withNotificationLevel(NotificationLevel notificationLevel) {
+ this.notificationLevel = notificationLevel;
+ return this;
+ }
+
+ /**
+ * Get the notificationTargets property: List of targets that subscribe to the notification.
+ *
+ * @return the notificationTargets value.
+ */
+ public List notificationTargets() {
+ return this.notificationTargets;
+ }
+
+ /**
+ * Set the notificationTargets property: List of targets that subscribe to the notification.
+ *
+ * @param notificationTargets the notificationTargets value to set.
+ * @return the Notification object itself.
+ */
+ public Notification withNotificationTargets(List notificationTargets) {
+ this.notificationTargets = notificationTargets;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (notificationCategory() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property notificationCategory in model Notification"));
+ }
+ if (notificationLevel() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property notificationLevel in model Notification"));
+ }
+ if (notificationTargets() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property notificationTargets in model Notification"));
+ } else {
+ notificationTargets().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/NotificationCategory.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/NotificationCategory.java
new file mode 100644
index 000000000000..9bf373a37deb
--- /dev/null
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/NotificationCategory.java
@@ -0,0 +1,31 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.servicefabric.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Defines values for NotificationCategory. */
+public final class NotificationCategory extends ExpandableStringEnum {
+ /** Static value WaveProgress for NotificationCategory. */
+ public static final NotificationCategory WAVE_PROGRESS = fromString("WaveProgress");
+
+ /**
+ * Creates or finds a NotificationCategory from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding NotificationCategory.
+ */
+ @JsonCreator
+ public static NotificationCategory fromString(String name) {
+ return fromString(name, NotificationCategory.class);
+ }
+
+ /** @return known NotificationCategory values. */
+ public static Collection values() {
+ return values(NotificationCategory.class);
+ }
+}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/NotificationChannel.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/NotificationChannel.java
new file mode 100644
index 000000000000..ab01032ba4f7
--- /dev/null
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/NotificationChannel.java
@@ -0,0 +1,34 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.servicefabric.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Defines values for NotificationChannel. */
+public final class NotificationChannel extends ExpandableStringEnum {
+ /** Static value EmailUser for NotificationChannel. */
+ public static final NotificationChannel EMAIL_USER = fromString("EmailUser");
+
+ /** Static value EmailSubscription for NotificationChannel. */
+ public static final NotificationChannel EMAIL_SUBSCRIPTION = fromString("EmailSubscription");
+
+ /**
+ * Creates or finds a NotificationChannel from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding NotificationChannel.
+ */
+ @JsonCreator
+ public static NotificationChannel fromString(String name) {
+ return fromString(name, NotificationChannel.class);
+ }
+
+ /** @return known NotificationChannel values. */
+ public static Collection values() {
+ return values(NotificationChannel.class);
+ }
+}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/NotificationLevel.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/NotificationLevel.java
new file mode 100644
index 000000000000..572f9df60d34
--- /dev/null
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/NotificationLevel.java
@@ -0,0 +1,34 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.servicefabric.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Defines values for NotificationLevel. */
+public final class NotificationLevel extends ExpandableStringEnum {
+ /** Static value Critical for NotificationLevel. */
+ public static final NotificationLevel CRITICAL = fromString("Critical");
+
+ /** Static value All for NotificationLevel. */
+ public static final NotificationLevel ALL = fromString("All");
+
+ /**
+ * Creates or finds a NotificationLevel from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding NotificationLevel.
+ */
+ @JsonCreator
+ public static NotificationLevel fromString(String name) {
+ return fromString(name, NotificationLevel.class);
+ }
+
+ /** @return known NotificationLevel values. */
+ public static Collection values() {
+ return values(NotificationLevel.class);
+ }
+}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/NotificationTarget.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/NotificationTarget.java
new file mode 100644
index 000000000000..99cd5840f317
--- /dev/null
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/NotificationTarget.java
@@ -0,0 +1,91 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.servicefabric.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Describes the notification target properties. */
+@Fluent
+public final class NotificationTarget {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(NotificationTarget.class);
+
+ /*
+ * The notification channel indicates the type of receivers subscribed to
+ * the notification, either user or subscription.
+ */
+ @JsonProperty(value = "notificationChannel", required = true)
+ private NotificationChannel notificationChannel;
+
+ /*
+ * List of targets that subscribe to the notification.
+ */
+ @JsonProperty(value = "receivers", required = true)
+ private List receivers;
+
+ /**
+ * Get the notificationChannel property: The notification channel indicates the type of receivers subscribed to the
+ * notification, either user or subscription.
+ *
+ * @return the notificationChannel value.
+ */
+ public NotificationChannel notificationChannel() {
+ return this.notificationChannel;
+ }
+
+ /**
+ * Set the notificationChannel property: The notification channel indicates the type of receivers subscribed to the
+ * notification, either user or subscription.
+ *
+ * @param notificationChannel the notificationChannel value to set.
+ * @return the NotificationTarget object itself.
+ */
+ public NotificationTarget withNotificationChannel(NotificationChannel notificationChannel) {
+ this.notificationChannel = notificationChannel;
+ return this;
+ }
+
+ /**
+ * Get the receivers property: List of targets that subscribe to the notification.
+ *
+ * @return the receivers value.
+ */
+ public List receivers() {
+ return this.receivers;
+ }
+
+ /**
+ * Set the receivers property: List of targets that subscribe to the notification.
+ *
+ * @param receivers the receivers value to set.
+ * @return the NotificationTarget object itself.
+ */
+ public NotificationTarget withReceivers(List receivers) {
+ this.receivers = receivers;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (notificationChannel() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property notificationChannel in model NotificationTarget"));
+ }
+ if (receivers() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property receivers in model NotificationTarget"));
+ }
+ }
+}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/OperationResult.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/OperationResult.java
index 86e4dc0b56cc..fcfe2d748cb0 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/OperationResult.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/OperationResult.java
@@ -15,6 +15,13 @@ public interface OperationResult {
*/
String name();
+ /**
+ * Gets the isDataAction property: Indicates whether the operation is a data action.
+ *
+ * @return the isDataAction value.
+ */
+ Boolean isDataAction();
+
/**
* Gets the display property: The object that represents the operation.
*
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/RollingUpgradeMode.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/RollingUpgradeMode.java
new file mode 100644
index 000000000000..c45522f90277
--- /dev/null
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/RollingUpgradeMode.java
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.servicefabric.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Defines values for RollingUpgradeMode. */
+public final class RollingUpgradeMode extends ExpandableStringEnum {
+ /** Static value Invalid for RollingUpgradeMode. */
+ public static final RollingUpgradeMode INVALID = fromString("Invalid");
+
+ /** Static value UnmonitoredAuto for RollingUpgradeMode. */
+ public static final RollingUpgradeMode UNMONITORED_AUTO = fromString("UnmonitoredAuto");
+
+ /** Static value UnmonitoredManual for RollingUpgradeMode. */
+ public static final RollingUpgradeMode UNMONITORED_MANUAL = fromString("UnmonitoredManual");
+
+ /** Static value Monitored for RollingUpgradeMode. */
+ public static final RollingUpgradeMode MONITORED = fromString("Monitored");
+
+ /**
+ * Creates or finds a RollingUpgradeMode from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding RollingUpgradeMode.
+ */
+ @JsonCreator
+ public static RollingUpgradeMode fromString(String name) {
+ return fromString(name, RollingUpgradeMode.class);
+ }
+
+ /** @return known RollingUpgradeMode values. */
+ public static Collection values() {
+ return values(RollingUpgradeMode.class);
+ }
+}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServicePlacementPolicyDescription.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServicePlacementPolicyDescription.java
index c6651df24b07..fa522f32f55e 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServicePlacementPolicyDescription.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServicePlacementPolicyDescription.java
@@ -11,7 +11,7 @@
import com.fasterxml.jackson.annotation.JsonTypeName;
/** Describes the policy to be used for placement of a Service Fabric service. */
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "Type")
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
@JsonTypeName("ServicePlacementPolicyDescription")
@Immutable
public final class ServicePlacementPolicyDescription {
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceResource.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceResource.java
index 733bfd4957b1..e3e3c32af4af 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceResource.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceResource.java
@@ -5,6 +5,7 @@
package com.azure.resourcemanager.servicefabric.models;
import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.servicefabric.fluent.models.ServiceResourceInner;
import java.util.List;
@@ -102,6 +103,14 @@ public interface ServiceResource {
*/
ArmServicePackageActivationMode servicePackageActivationMode();
+ /**
+ * Gets the serviceDnsName property: Dns name used for the service. If this is specified, then the service can be
+ * accessed via its DNS name instead of service name.
+ *
+ * @return the serviceDnsName value.
+ */
+ String serviceDnsName();
+
/**
* Gets the location property: It will be deprecated in New API, resource location depends on the parent resource.
*
@@ -123,6 +132,13 @@ public interface ServiceResource {
*/
String etag();
+ /**
+ * Gets the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ SystemData systemData();
+
/**
* Gets the region of the resource.
*
@@ -179,7 +195,8 @@ interface WithCreate
DefinitionStages.WithDefaultMoveCost,
DefinitionStages.WithServiceTypeName,
DefinitionStages.WithPartitionDescription,
- DefinitionStages.WithServicePackageActivationMode {
+ DefinitionStages.WithServicePackageActivationMode,
+ DefinitionStages.WithServiceDnsName {
/**
* Executes the create request.
*
@@ -313,6 +330,18 @@ interface WithServicePackageActivationMode {
*/
WithCreate withServicePackageActivationMode(ArmServicePackageActivationMode servicePackageActivationMode);
}
+ /** The stage of the ServiceResource definition allowing to specify serviceDnsName. */
+ interface WithServiceDnsName {
+ /**
+ * Specifies the serviceDnsName property: Dns name used for the service. If this is specified, then the
+ * service can be accessed via its DNS name instead of service name..
+ *
+ * @param serviceDnsName Dns name used for the service. If this is specified, then the service can be
+ * accessed via its DNS name instead of service name.
+ * @return the next definition stage.
+ */
+ WithCreate withServiceDnsName(String serviceDnsName);
+ }
}
/**
* Begins update for the ServiceResource resource.
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceResourceProperties.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceResourceProperties.java
index a7a9c8cec811..d08555971434 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceResourceProperties.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceResourceProperties.java
@@ -53,6 +53,13 @@ public class ServiceResourceProperties extends ServiceResourcePropertiesBase {
@JsonProperty(value = "servicePackageActivationMode")
private ArmServicePackageActivationMode servicePackageActivationMode;
+ /*
+ * Dns name used for the service. If this is specified, then the service
+ * can be accessed via its DNS name instead of service name.
+ */
+ @JsonProperty(value = "serviceDnsName")
+ private String serviceDnsName;
+
/**
* Get the provisioningState property: The current deployment or provisioning state, which only appears in the
* response.
@@ -124,6 +131,28 @@ public ServiceResourceProperties withServicePackageActivationMode(
return this;
}
+ /**
+ * Get the serviceDnsName property: Dns name used for the service. If this is specified, then the service can be
+ * accessed via its DNS name instead of service name.
+ *
+ * @return the serviceDnsName value.
+ */
+ public String serviceDnsName() {
+ return this.serviceDnsName;
+ }
+
+ /**
+ * Set the serviceDnsName property: Dns name used for the service. If this is specified, then the service can be
+ * accessed via its DNS name instead of service name.
+ *
+ * @param serviceDnsName the serviceDnsName value to set.
+ * @return the ServiceResourceProperties object itself.
+ */
+ public ServiceResourceProperties withServiceDnsName(String serviceDnsName) {
+ this.serviceDnsName = serviceDnsName;
+ return this;
+ }
+
/** {@inheritDoc} */
@Override
public ServiceResourceProperties withPlacementConstraints(String placementConstraints) {
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceResourceUpdate.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceResourceUpdate.java
index c42f44325d62..9959020973b1 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceResourceUpdate.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceResourceUpdate.java
@@ -7,6 +7,7 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -75,6 +76,12 @@ public class ServiceResourceUpdate extends ProxyResource {
@JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
private String etag;
+ /*
+ * Metadata pertaining to creation and last modification of the resource.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
/**
* Get the placementConstraints property: The placement constraints as a string. Placement constraints are boolean
* expressions on node properties and allow for restricting a service to particular nodes based on the service
@@ -235,6 +242,15 @@ public String etag() {
return this.etag;
}
+ /**
+ * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
/**
* Validates the instance.
*
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/SfZonalUpgradeMode.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/SfZonalUpgradeMode.java
new file mode 100644
index 000000000000..1546cd5f44a4
--- /dev/null
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/SfZonalUpgradeMode.java
@@ -0,0 +1,34 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.servicefabric.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Defines values for SfZonalUpgradeMode. */
+public final class SfZonalUpgradeMode extends ExpandableStringEnum {
+ /** Static value Parallel for SfZonalUpgradeMode. */
+ public static final SfZonalUpgradeMode PARALLEL = fromString("Parallel");
+
+ /** Static value Hierarchical for SfZonalUpgradeMode. */
+ public static final SfZonalUpgradeMode HIERARCHICAL = fromString("Hierarchical");
+
+ /**
+ * Creates or finds a SfZonalUpgradeMode from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding SfZonalUpgradeMode.
+ */
+ @JsonCreator
+ public static SfZonalUpgradeMode fromString(String name) {
+ return fromString(name, SfZonalUpgradeMode.class);
+ }
+
+ /** @return known SfZonalUpgradeMode values. */
+ public static Collection values() {
+ return values(SfZonalUpgradeMode.class);
+ }
+}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StatefulServiceProperties.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StatefulServiceProperties.java
index f4ec6a1f89ba..49485be3f6ce 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StatefulServiceProperties.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StatefulServiceProperties.java
@@ -211,6 +211,13 @@ public StatefulServiceProperties withServicePackageActivationMode(
return this;
}
+ /** {@inheritDoc} */
+ @Override
+ public StatefulServiceProperties withServiceDnsName(String serviceDnsName) {
+ super.withServiceDnsName(serviceDnsName);
+ return this;
+ }
+
/** {@inheritDoc} */
@Override
public StatefulServiceProperties withPlacementConstraints(String placementConstraints) {
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StatelessServiceProperties.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StatelessServiceProperties.java
index c8a5d39e4006..d77b9c1e9a2c 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StatelessServiceProperties.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StatelessServiceProperties.java
@@ -25,6 +25,19 @@ public final class StatelessServiceProperties extends ServiceResourceProperties
@JsonProperty(value = "instanceCount")
private Integer instanceCount;
+ /*
+ * Delay duration for RequestDrain feature to ensures that the endpoint
+ * advertised by the stateless instance is removed before the delay starts
+ * prior to closing the instance. This delay enables existing requests to
+ * drain gracefully before the instance actually goes down
+ * (https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-application-upgrade-advanced#avoid-connection-drops-during-stateless-service-planned-downtime-preview).
+ * It is first interpreted as a string representing an ISO 8601 duration.
+ * If that fails, then it is interpreted as a number representing the total
+ * number of milliseconds.
+ */
+ @JsonProperty(value = "instanceCloseDelayDuration")
+ private String instanceCloseDelayDuration;
+
/**
* Get the instanceCount property: The instance count.
*
@@ -45,6 +58,36 @@ public StatelessServiceProperties withInstanceCount(Integer instanceCount) {
return this;
}
+ /**
+ * Get the instanceCloseDelayDuration property: Delay duration for RequestDrain feature to ensures that the endpoint
+ * advertised by the stateless instance is removed before the delay starts prior to closing the instance. This delay
+ * enables existing requests to drain gracefully before the instance actually goes down
+ * (https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-application-upgrade-advanced#avoid-connection-drops-during-stateless-service-planned-downtime-preview).
+ * It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a
+ * number representing the total number of milliseconds.
+ *
+ * @return the instanceCloseDelayDuration value.
+ */
+ public String instanceCloseDelayDuration() {
+ return this.instanceCloseDelayDuration;
+ }
+
+ /**
+ * Set the instanceCloseDelayDuration property: Delay duration for RequestDrain feature to ensures that the endpoint
+ * advertised by the stateless instance is removed before the delay starts prior to closing the instance. This delay
+ * enables existing requests to drain gracefully before the instance actually goes down
+ * (https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-application-upgrade-advanced#avoid-connection-drops-during-stateless-service-planned-downtime-preview).
+ * It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a
+ * number representing the total number of milliseconds.
+ *
+ * @param instanceCloseDelayDuration the instanceCloseDelayDuration value to set.
+ * @return the StatelessServiceProperties object itself.
+ */
+ public StatelessServiceProperties withInstanceCloseDelayDuration(String instanceCloseDelayDuration) {
+ this.instanceCloseDelayDuration = instanceCloseDelayDuration;
+ return this;
+ }
+
/** {@inheritDoc} */
@Override
public StatelessServiceProperties withServiceTypeName(String serviceTypeName) {
@@ -67,6 +110,13 @@ public StatelessServiceProperties withServicePackageActivationMode(
return this;
}
+ /** {@inheritDoc} */
+ @Override
+ public StatelessServiceProperties withServiceDnsName(String serviceDnsName) {
+ super.withServiceDnsName(serviceDnsName);
+ return this;
+ }
+
/** {@inheritDoc} */
@Override
public StatelessServiceProperties withPlacementConstraints(String placementConstraints) {
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StatelessServiceUpdateProperties.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StatelessServiceUpdateProperties.java
index c54d04c4b9e8..9fb2274308d0 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StatelessServiceUpdateProperties.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StatelessServiceUpdateProperties.java
@@ -25,6 +25,19 @@ public final class StatelessServiceUpdateProperties extends ServiceResourceUpdat
@JsonProperty(value = "instanceCount")
private Integer instanceCount;
+ /*
+ * Delay duration for RequestDrain feature to ensures that the endpoint
+ * advertised by the stateless instance is removed before the delay starts
+ * prior to closing the instance. This delay enables existing requests to
+ * drain gracefully before the instance actually goes down
+ * (https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-application-upgrade-advanced#avoid-connection-drops-during-stateless-service-planned-downtime-preview).
+ * It is first interpreted as a string representing an ISO 8601 duration.
+ * If that fails, then it is interpreted as a number representing the total
+ * number of milliseconds.
+ */
+ @JsonProperty(value = "instanceCloseDelayDuration")
+ private String instanceCloseDelayDuration;
+
/**
* Get the instanceCount property: The instance count.
*
@@ -45,6 +58,36 @@ public StatelessServiceUpdateProperties withInstanceCount(Integer instanceCount)
return this;
}
+ /**
+ * Get the instanceCloseDelayDuration property: Delay duration for RequestDrain feature to ensures that the endpoint
+ * advertised by the stateless instance is removed before the delay starts prior to closing the instance. This delay
+ * enables existing requests to drain gracefully before the instance actually goes down
+ * (https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-application-upgrade-advanced#avoid-connection-drops-during-stateless-service-planned-downtime-preview).
+ * It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a
+ * number representing the total number of milliseconds.
+ *
+ * @return the instanceCloseDelayDuration value.
+ */
+ public String instanceCloseDelayDuration() {
+ return this.instanceCloseDelayDuration;
+ }
+
+ /**
+ * Set the instanceCloseDelayDuration property: Delay duration for RequestDrain feature to ensures that the endpoint
+ * advertised by the stateless instance is removed before the delay starts prior to closing the instance. This delay
+ * enables existing requests to drain gracefully before the instance actually goes down
+ * (https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-application-upgrade-advanced#avoid-connection-drops-during-stateless-service-planned-downtime-preview).
+ * It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a
+ * number representing the total number of milliseconds.
+ *
+ * @param instanceCloseDelayDuration the instanceCloseDelayDuration value to set.
+ * @return the StatelessServiceUpdateProperties object itself.
+ */
+ public StatelessServiceUpdateProperties withInstanceCloseDelayDuration(String instanceCloseDelayDuration) {
+ this.instanceCloseDelayDuration = instanceCloseDelayDuration;
+ return this;
+ }
+
/** {@inheritDoc} */
@Override
public StatelessServiceUpdateProperties withPlacementConstraints(String placementConstraints) {
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/UniformInt64RangePartitionSchemeDescription.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/UniformInt64RangePartitionSchemeDescription.java
index ed5d185f6842..2ac85fc5ae8f 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/UniformInt64RangePartitionSchemeDescription.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/UniformInt64RangePartitionSchemeDescription.java
@@ -21,23 +21,23 @@ public final class UniformInt64RangePartitionSchemeDescription extends Partition
/*
* The number of partitions.
*/
- @JsonProperty(value = "Count", required = true)
+ @JsonProperty(value = "count", required = true)
private int count;
/*
* String indicating the lower bound of the partition key range that
- * should be split between the partition ‘Count’
+ * should be split between the partition ‘count’
*
*/
- @JsonProperty(value = "LowKey", required = true)
+ @JsonProperty(value = "lowKey", required = true)
private String lowKey;
/*
* String indicating the upper bound of the partition key range that
- * should be split between the partition ‘Count’
+ * should be split between the partition ‘count’
*
*/
- @JsonProperty(value = "HighKey", required = true)
+ @JsonProperty(value = "highKey", required = true)
private String highKey;
/**
@@ -62,7 +62,7 @@ public UniformInt64RangePartitionSchemeDescription withCount(int count) {
/**
* Get the lowKey property: String indicating the lower bound of the partition key range that should be split
- * between the partition ‘Count’.
+ * between the partition ‘count’.
*
* @return the lowKey value.
*/
@@ -72,7 +72,7 @@ public String lowKey() {
/**
* Set the lowKey property: String indicating the lower bound of the partition key range that should be split
- * between the partition ‘Count’.
+ * between the partition ‘count’.
*
* @param lowKey the lowKey value to set.
* @return the UniformInt64RangePartitionSchemeDescription object itself.
@@ -84,7 +84,7 @@ public UniformInt64RangePartitionSchemeDescription withLowKey(String lowKey) {
/**
* Get the highKey property: String indicating the upper bound of the partition key range that should be split
- * between the partition ‘Count’.
+ * between the partition ‘count’.
*
* @return the highKey value.
*/
@@ -94,7 +94,7 @@ public String highKey() {
/**
* Set the highKey property: String indicating the upper bound of the partition key range that should be split
- * between the partition ‘Count’.
+ * between the partition ‘count’.
*
* @param highKey the highKey value to set.
* @return the UniformInt64RangePartitionSchemeDescription object itself.
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/UpgradableVersionPathResult.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/UpgradableVersionPathResult.java
new file mode 100644
index 000000000000..9a757ea82406
--- /dev/null
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/UpgradableVersionPathResult.java
@@ -0,0 +1,25 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.servicefabric.models;
+
+import com.azure.resourcemanager.servicefabric.fluent.models.UpgradableVersionPathResultInner;
+import java.util.List;
+
+/** An immutable client-side representation of UpgradableVersionPathResult. */
+public interface UpgradableVersionPathResult {
+ /**
+ * Gets the supportedPath property: The supportedPath property.
+ *
+ * @return the supportedPath value.
+ */
+ List supportedPath();
+
+ /**
+ * Gets the inner com.azure.resourcemanager.servicefabric.fluent.models.UpgradableVersionPathResultInner object.
+ *
+ * @return the inner object.
+ */
+ UpgradableVersionPathResultInner innerModel();
+}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/UpgradableVersionsDescription.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/UpgradableVersionsDescription.java
new file mode 100644
index 000000000000..1ca9e8dfef6c
--- /dev/null
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/UpgradableVersionsDescription.java
@@ -0,0 +1,56 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.servicefabric.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The UpgradableVersionsDescription model. */
+@Fluent
+public final class UpgradableVersionsDescription {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(UpgradableVersionsDescription.class);
+
+ /*
+ * The target code version.
+ */
+ @JsonProperty(value = "targetVersion", required = true)
+ private String targetVersion;
+
+ /**
+ * Get the targetVersion property: The target code version.
+ *
+ * @return the targetVersion value.
+ */
+ public String targetVersion() {
+ return this.targetVersion;
+ }
+
+ /**
+ * Set the targetVersion property: The target code version.
+ *
+ * @param targetVersion the targetVersion value to set.
+ * @return the UpgradableVersionsDescription object itself.
+ */
+ public UpgradableVersionsDescription withTargetVersion(String targetVersion) {
+ this.targetVersion = targetVersion;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (targetVersion() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property targetVersion in model UpgradableVersionsDescription"));
+ }
+ }
+}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/UserAssignedIdentity.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/UserAssignedIdentity.java
new file mode 100644
index 000000000000..9495684bf410
--- /dev/null
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/UserAssignedIdentity.java
@@ -0,0 +1,54 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.servicefabric.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The UserAssignedIdentity model. */
+@Immutable
+public class UserAssignedIdentity {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(UserAssignedIdentity.class);
+
+ /*
+ * The principal id of user assigned identity.
+ */
+ @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY)
+ private String principalId;
+
+ /*
+ * The client id of user assigned identity.
+ */
+ @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY)
+ private String clientId;
+
+ /**
+ * Get the principalId property: The principal id of user assigned identity.
+ *
+ * @return the principalId value.
+ */
+ public String principalId() {
+ return this.principalId;
+ }
+
+ /**
+ * Get the clientId property: The client id of user assigned identity.
+ *
+ * @return the clientId value.
+ */
+ public String clientId() {
+ return this.clientId;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/VmssZonalUpgradeMode.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/VmssZonalUpgradeMode.java
new file mode 100644
index 000000000000..70e62ea0b1c8
--- /dev/null
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/VmssZonalUpgradeMode.java
@@ -0,0 +1,34 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.servicefabric.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Defines values for VmssZonalUpgradeMode. */
+public final class VmssZonalUpgradeMode extends ExpandableStringEnum {
+ /** Static value Parallel for VmssZonalUpgradeMode. */
+ public static final VmssZonalUpgradeMode PARALLEL = fromString("Parallel");
+
+ /** Static value Hierarchical for VmssZonalUpgradeMode. */
+ public static final VmssZonalUpgradeMode HIERARCHICAL = fromString("Hierarchical");
+
+ /**
+ * Creates or finds a VmssZonalUpgradeMode from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding VmssZonalUpgradeMode.
+ */
+ @JsonCreator
+ public static VmssZonalUpgradeMode fromString(String name) {
+ return fromString(name, VmssZonalUpgradeMode.class);
+ }
+
+ /** @return known VmssZonalUpgradeMode values. */
+ public static Collection values() {
+ return values(VmssZonalUpgradeMode.class);
+ }
+}