, UpdateRunInner> beginStop(
* @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 an UpdateRun is a multi-stage process to perform update operations across members of a Fleet.
+ * @return a multi-stage process to perform update operations across members of a Fleet.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
UpdateRunInner stop(
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetInner.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetInner.java
index eb33abb3b654..9ae7c731c534 100644
--- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetInner.java
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetInner.java
@@ -9,6 +9,7 @@
import com.azure.core.management.SystemData;
import com.azure.resourcemanager.containerservicefleet.models.FleetHubProfile;
import com.azure.resourcemanager.containerservicefleet.models.FleetProvisioningState;
+import com.azure.resourcemanager.containerservicefleet.models.ManagedServiceIdentity;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
@@ -30,6 +31,12 @@ public final class FleetInner extends Resource {
@JsonProperty(value = "eTag", access = JsonProperty.Access.WRITE_ONLY)
private String etag;
+ /*
+ * Managed identity.
+ */
+ @JsonProperty(value = "identity")
+ private ManagedServiceIdentity identity;
+
/*
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
@@ -61,6 +68,26 @@ public String etag() {
return this.etag;
}
+ /**
+ * Get the identity property: Managed identity.
+ *
+ * @return the identity value.
+ */
+ public ManagedServiceIdentity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: Managed identity.
+ *
+ * @param identity the identity value to set.
+ * @return the FleetInner object itself.
+ */
+ public FleetInner withIdentity(ManagedServiceIdentity identity) {
+ this.identity = identity;
+ return this;
+ }
+
/**
* Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
@@ -125,5 +152,8 @@ public void validate() {
if (innerProperties() != null) {
innerProperties().validate();
}
+ if (identity() != null) {
+ identity().validate();
+ }
}
}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetUpdateStrategyInner.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetUpdateStrategyInner.java
new file mode 100644
index 000000000000..1735c187bbe1
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetUpdateStrategyInner.java
@@ -0,0 +1,98 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.containerservicefleet.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.resourcemanager.containerservicefleet.models.FleetUpdateStrategyProvisioningState;
+import com.azure.resourcemanager.containerservicefleet.models.UpdateRunStrategy;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Defines a multi-stage process to perform update operations across members of a Fleet. */
+@Fluent
+public final class FleetUpdateStrategyInner extends ProxyResource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ @JsonProperty(value = "properties")
+ private FleetUpdateStrategyProperties innerProperties;
+
+ /*
+ * If eTag is provided in the response body, it may also be provided as a header per the normal etag convention.
+ * Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity
+ * tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section
+ * 14.27) header fields.
+ */
+ @JsonProperty(value = "eTag", access = JsonProperty.Access.WRITE_ONLY)
+ private String etag;
+
+ /** Creates an instance of FleetUpdateStrategyInner class. */
+ public FleetUpdateStrategyInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The resource-specific properties for this resource.
+ *
+ * @return the innerProperties value.
+ */
+ private FleetUpdateStrategyProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the etag property: If eTag is provided in the response body, it may also be provided as a header per the
+ * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource.
+ * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26),
+ * and If-Range (section 14.27) header fields.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of the UpdateStrategy resource.
+ *
+ * @return the provisioningState value.
+ */
+ public FleetUpdateStrategyProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Get the strategy property: Defines the update sequence of the clusters.
+ *
+ * @return the strategy value.
+ */
+ public UpdateRunStrategy strategy() {
+ return this.innerProperties() == null ? null : this.innerProperties().strategy();
+ }
+
+ /**
+ * Set the strategy property: Defines the update sequence of the clusters.
+ *
+ * @param strategy the strategy value to set.
+ * @return the FleetUpdateStrategyInner object itself.
+ */
+ public FleetUpdateStrategyInner withStrategy(UpdateRunStrategy strategy) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new FleetUpdateStrategyProperties();
+ }
+ this.innerProperties().withStrategy(strategy);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetUpdateStrategyProperties.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetUpdateStrategyProperties.java
new file mode 100644
index 000000000000..d96273b33975
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetUpdateStrategyProperties.java
@@ -0,0 +1,78 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.containerservicefleet.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.containerservicefleet.models.FleetUpdateStrategyProvisioningState;
+import com.azure.resourcemanager.containerservicefleet.models.UpdateRunStrategy;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The properties of the UpdateStrategy. */
+@Fluent
+public final class FleetUpdateStrategyProperties {
+ /*
+ * The provisioning state of the UpdateStrategy resource.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private FleetUpdateStrategyProvisioningState provisioningState;
+
+ /*
+ * Defines the update sequence of the clusters.
+ */
+ @JsonProperty(value = "strategy", required = true)
+ private UpdateRunStrategy strategy;
+
+ /** Creates an instance of FleetUpdateStrategyProperties class. */
+ public FleetUpdateStrategyProperties() {
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of the UpdateStrategy resource.
+ *
+ * @return the provisioningState value.
+ */
+ public FleetUpdateStrategyProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the strategy property: Defines the update sequence of the clusters.
+ *
+ * @return the strategy value.
+ */
+ public UpdateRunStrategy strategy() {
+ return this.strategy;
+ }
+
+ /**
+ * Set the strategy property: Defines the update sequence of the clusters.
+ *
+ * @param strategy the strategy value to set.
+ * @return the FleetUpdateStrategyProperties object itself.
+ */
+ public FleetUpdateStrategyProperties withStrategy(UpdateRunStrategy strategy) {
+ this.strategy = strategy;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (strategy() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property strategy in model FleetUpdateStrategyProperties"));
+ } else {
+ strategy().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(FleetUpdateStrategyProperties.class);
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/UpdateRunInner.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/UpdateRunInner.java
index d38284fb3d31..a8f8052fabb9 100644
--- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/UpdateRunInner.java
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/UpdateRunInner.java
@@ -6,14 +6,13 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
-import com.azure.core.management.SystemData;
import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpdate;
import com.azure.resourcemanager.containerservicefleet.models.UpdateRunProvisioningState;
import com.azure.resourcemanager.containerservicefleet.models.UpdateRunStatus;
import com.azure.resourcemanager.containerservicefleet.models.UpdateRunStrategy;
import com.fasterxml.jackson.annotation.JsonProperty;
-/** An UpdateRun is a multi-stage process to perform update operations across members of a Fleet. */
+/** A multi-stage process to perform update operations across members of a Fleet. */
@Fluent
public final class UpdateRunInner extends ProxyResource {
/*
@@ -31,12 +30,6 @@ public final class UpdateRunInner extends ProxyResource {
@JsonProperty(value = "eTag", access = JsonProperty.Access.WRITE_ONLY)
private String etag;
- /*
- * Azure Resource Manager metadata containing createdBy and modifiedBy information.
- */
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
- private SystemData systemData;
-
/** Creates an instance of UpdateRunInner class. */
public UpdateRunInner() {
}
@@ -63,21 +56,57 @@ public String etag() {
}
/**
- * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ * Get the provisioningState property: The provisioning state of the UpdateRun resource.
*
- * @return the systemData value.
+ * @return the provisioningState value.
*/
- public SystemData systemData() {
- return this.systemData;
+ public UpdateRunProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
}
/**
- * Get the provisioningState property: The provisioning state of the UpdateRun resource.
+ * Get the updateStrategyId property: The resource id of the FleetUpdateStrategy resource to reference.
*
- * @return the provisioningState value.
+ * When creating a new run, there are three ways to define a strategy for the run: 1. Define a new strategy in
+ * place: Set the "strategy" field. 2. Use an existing strategy: Set the "updateStrategyId" field. (since
+ * 2023-08-15-preview) 3. Use the default strategy to update all the members one by one: Leave both
+ * "updateStrategyId" and "strategy" unset. (since 2023-08-15-preview)
+ *
+ *
Setting both "updateStrategyId" and "strategy" is invalid.
+ *
+ *
UpdateRuns created by "updateStrategyId" snapshot the referenced UpdateStrategy at the time of creation and
+ * store it in the "strategy" field. Subsequent changes to the referenced FleetUpdateStrategy resource do not
+ * propagate. UpdateRunStrategy changes can be made directly on the "strategy" field before launching the UpdateRun.
+ *
+ * @return the updateStrategyId value.
*/
- public UpdateRunProvisioningState provisioningState() {
- return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ public String updateStrategyId() {
+ return this.innerProperties() == null ? null : this.innerProperties().updateStrategyId();
+ }
+
+ /**
+ * Set the updateStrategyId property: The resource id of the FleetUpdateStrategy resource to reference.
+ *
+ *
When creating a new run, there are three ways to define a strategy for the run: 1. Define a new strategy in
+ * place: Set the "strategy" field. 2. Use an existing strategy: Set the "updateStrategyId" field. (since
+ * 2023-08-15-preview) 3. Use the default strategy to update all the members one by one: Leave both
+ * "updateStrategyId" and "strategy" unset. (since 2023-08-15-preview)
+ *
+ *
Setting both "updateStrategyId" and "strategy" is invalid.
+ *
+ *
UpdateRuns created by "updateStrategyId" snapshot the referenced UpdateStrategy at the time of creation and
+ * store it in the "strategy" field. Subsequent changes to the referenced FleetUpdateStrategy resource do not
+ * propagate. UpdateRunStrategy changes can be made directly on the "strategy" field before launching the UpdateRun.
+ *
+ * @param updateStrategyId the updateStrategyId value to set.
+ * @return the UpdateRunInner object itself.
+ */
+ public UpdateRunInner withUpdateStrategyId(String updateStrategyId) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new UpdateRunProperties();
+ }
+ this.innerProperties().withUpdateStrategyId(updateStrategyId);
+ return this;
}
/**
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/UpdateRunProperties.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/UpdateRunProperties.java
index 4bf52c56a42f..bdafc6dc98b6 100644
--- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/UpdateRunProperties.java
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/UpdateRunProperties.java
@@ -21,6 +21,25 @@ public final class UpdateRunProperties {
@JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
private UpdateRunProvisioningState provisioningState;
+ /*
+ * The resource id of the FleetUpdateStrategy resource to reference.
+ *
+ * When creating a new run, there are three ways to define a strategy for the run:
+ * 1. Define a new strategy in place: Set the "strategy" field.
+ * 2. Use an existing strategy: Set the "updateStrategyId" field. (since 2023-08-15-preview)
+ * 3. Use the default strategy to update all the members one by one: Leave both "updateStrategyId" and "strategy"
+ * unset. (since 2023-08-15-preview)
+ *
+ * Setting both "updateStrategyId" and "strategy" is invalid.
+ *
+ * UpdateRuns created by "updateStrategyId" snapshot the referenced UpdateStrategy at the time of creation and
+ * store it in the "strategy" field.
+ * Subsequent changes to the referenced FleetUpdateStrategy resource do not propagate.
+ * UpdateRunStrategy changes can be made directly on the "strategy" field before launching the UpdateRun.
+ */
+ @JsonProperty(value = "updateStrategyId")
+ private String updateStrategyId;
+
/*
* The strategy defines the order in which the clusters will be updated.
* If not set, all members will be updated sequentially. The UpdateRun status will show a single UpdateStage and a
@@ -56,6 +75,48 @@ public UpdateRunProvisioningState provisioningState() {
return this.provisioningState;
}
+ /**
+ * Get the updateStrategyId property: The resource id of the FleetUpdateStrategy resource to reference.
+ *
+ *
When creating a new run, there are three ways to define a strategy for the run: 1. Define a new strategy in
+ * place: Set the "strategy" field. 2. Use an existing strategy: Set the "updateStrategyId" field. (since
+ * 2023-08-15-preview) 3. Use the default strategy to update all the members one by one: Leave both
+ * "updateStrategyId" and "strategy" unset. (since 2023-08-15-preview)
+ *
+ *
Setting both "updateStrategyId" and "strategy" is invalid.
+ *
+ *
UpdateRuns created by "updateStrategyId" snapshot the referenced UpdateStrategy at the time of creation and
+ * store it in the "strategy" field. Subsequent changes to the referenced FleetUpdateStrategy resource do not
+ * propagate. UpdateRunStrategy changes can be made directly on the "strategy" field before launching the UpdateRun.
+ *
+ * @return the updateStrategyId value.
+ */
+ public String updateStrategyId() {
+ return this.updateStrategyId;
+ }
+
+ /**
+ * Set the updateStrategyId property: The resource id of the FleetUpdateStrategy resource to reference.
+ *
+ *
When creating a new run, there are three ways to define a strategy for the run: 1. Define a new strategy in
+ * place: Set the "strategy" field. 2. Use an existing strategy: Set the "updateStrategyId" field. (since
+ * 2023-08-15-preview) 3. Use the default strategy to update all the members one by one: Leave both
+ * "updateStrategyId" and "strategy" unset. (since 2023-08-15-preview)
+ *
+ *
Setting both "updateStrategyId" and "strategy" is invalid.
+ *
+ *
UpdateRuns created by "updateStrategyId" snapshot the referenced UpdateStrategy at the time of creation and
+ * store it in the "strategy" field. Subsequent changes to the referenced FleetUpdateStrategy resource do not
+ * propagate. UpdateRunStrategy changes can be made directly on the "strategy" field before launching the UpdateRun.
+ *
+ * @param updateStrategyId the updateStrategyId value to set.
+ * @return the UpdateRunProperties object itself.
+ */
+ public UpdateRunProperties withUpdateStrategyId(String updateStrategyId) {
+ this.updateStrategyId = updateStrategyId;
+ return this;
+ }
+
/**
* Get the strategy property: The strategy defines the order in which the clusters will be updated. If not set, all
* members will be updated sequentially. The UpdateRun status will show a single UpdateStage and a single
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/ContainerServiceFleetManagementClientBuilder.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/ContainerServiceFleetManagementClientBuilder.java
index acfe1c1ad16f..c6c133263ee1 100644
--- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/ContainerServiceFleetManagementClientBuilder.java
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/ContainerServiceFleetManagementClientBuilder.java
@@ -137,7 +137,7 @@ public ContainerServiceFleetManagementClientImpl buildClient() {
localSerializerAdapter,
localDefaultPollInterval,
localEnvironment,
- subscriptionId,
+ this.subscriptionId,
localEndpoint);
return client;
}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/ContainerServiceFleetManagementClientImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/ContainerServiceFleetManagementClientImpl.java
index c935723c3379..4b034c6d669b 100644
--- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/ContainerServiceFleetManagementClientImpl.java
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/ContainerServiceFleetManagementClientImpl.java
@@ -24,6 +24,7 @@
import com.azure.core.util.serializer.SerializerEncoding;
import com.azure.resourcemanager.containerservicefleet.fluent.ContainerServiceFleetManagementClient;
import com.azure.resourcemanager.containerservicefleet.fluent.FleetMembersClient;
+import com.azure.resourcemanager.containerservicefleet.fluent.FleetUpdateStrategiesClient;
import com.azure.resourcemanager.containerservicefleet.fluent.FleetsClient;
import com.azure.resourcemanager.containerservicefleet.fluent.OperationsClient;
import com.azure.resourcemanager.containerservicefleet.fluent.UpdateRunsClient;
@@ -159,6 +160,18 @@ public UpdateRunsClient getUpdateRuns() {
return this.updateRuns;
}
+ /** The FleetUpdateStrategiesClient object to access its operations. */
+ private final FleetUpdateStrategiesClient fleetUpdateStrategies;
+
+ /**
+ * Gets the FleetUpdateStrategiesClient object to access its operations.
+ *
+ * @return the FleetUpdateStrategiesClient object.
+ */
+ public FleetUpdateStrategiesClient getFleetUpdateStrategies() {
+ return this.fleetUpdateStrategies;
+ }
+
/**
* Initializes an instance of ContainerServiceFleetManagementClient client.
*
@@ -181,11 +194,12 @@ public UpdateRunsClient getUpdateRuns() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2023-03-15-preview";
+ this.apiVersion = "2023-08-15-preview";
this.operations = new OperationsClientImpl(this);
this.fleets = new FleetsClientImpl(this);
this.fleetMembers = new FleetMembersClientImpl(this);
this.updateRuns = new UpdateRunsClientImpl(this);
+ this.fleetUpdateStrategies = new FleetUpdateStrategiesClientImpl(this);
}
/**
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetImpl.java
index faec43979470..ec42ed7e9ad0 100644
--- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetImpl.java
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetImpl.java
@@ -14,6 +14,7 @@
import com.azure.resourcemanager.containerservicefleet.models.FleetHubProfile;
import com.azure.resourcemanager.containerservicefleet.models.FleetPatch;
import com.azure.resourcemanager.containerservicefleet.models.FleetProvisioningState;
+import com.azure.resourcemanager.containerservicefleet.models.ManagedServiceIdentity;
import java.util.Collections;
import java.util.Map;
@@ -51,6 +52,10 @@ public String etag() {
return this.innerModel().etag();
}
+ public ManagedServiceIdentity identity() {
+ return this.innerModel().identity();
+ }
+
public SystemData systemData() {
return this.innerModel().systemData();
}
@@ -140,8 +145,7 @@ public Fleet apply() {
serviceManager
.serviceClient()
.getFleets()
- .updateWithResponse(resourceGroupName, fleetName, updateProperties, updateIfMatch, Context.NONE)
- .getValue();
+ .update(resourceGroupName, fleetName, updateProperties, updateIfMatch, Context.NONE);
return this;
}
@@ -150,8 +154,7 @@ public Fleet apply(Context context) {
serviceManager
.serviceClient()
.getFleets()
- .updateWithResponse(resourceGroupName, fleetName, updateProperties, updateIfMatch, context)
- .getValue();
+ .update(resourceGroupName, fleetName, updateProperties, updateIfMatch, context);
return this;
}
@@ -212,6 +215,16 @@ public FleetImpl withTags(Map tags) {
}
}
+ public FleetImpl withIdentity(ManagedServiceIdentity identity) {
+ if (isInCreateMode()) {
+ this.innerModel().withIdentity(identity);
+ return this;
+ } else {
+ this.updateProperties.withIdentity(identity);
+ return this;
+ }
+ }
+
public FleetImpl withHubProfile(FleetHubProfile hubProfile) {
this.innerModel().withHubProfile(hubProfile);
return this;
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMemberImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMemberImpl.java
index 56c962e867b9..e0af292a07ba 100644
--- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMemberImpl.java
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMemberImpl.java
@@ -132,9 +132,7 @@ public FleetMember apply() {
serviceManager
.serviceClient()
.getFleetMembers()
- .updateWithResponse(
- resourceGroupName, fleetName, fleetMemberName, updateProperties, updateIfMatch, Context.NONE)
- .getValue();
+ .update(resourceGroupName, fleetName, fleetMemberName, updateProperties, updateIfMatch, Context.NONE);
return this;
}
@@ -143,9 +141,7 @@ public FleetMember apply(Context context) {
serviceManager
.serviceClient()
.getFleetMembers()
- .updateWithResponse(
- resourceGroupName, fleetName, fleetMemberName, updateProperties, updateIfMatch, context)
- .getValue();
+ .update(resourceGroupName, fleetName, fleetMemberName, updateProperties, updateIfMatch, context);
return this;
}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMembersClientImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMembersClientImpl.java
index 90c28879b844..6761e079572c 100644
--- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMembersClientImpl.java
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMembersClientImpl.java
@@ -116,9 +116,9 @@ Mono>> create(
@Headers({"Content-Type: application/json"})
@Patch(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}")
- @ExpectedResponses({200})
+ @ExpectedResponses({200, 202})
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> update(
+ Mono>> update(
@HostParam("$host") String endpoint,
@QueryParam("api-version") String apiVersion,
@PathParam("subscriptionId") String subscriptionId,
@@ -921,7 +921,7 @@ public FleetMemberInner create(
* @return a member of the Fleet along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> updateWithResponseAsync(
+ private Mono>> updateWithResponseAsync(
String resourceGroupName,
String fleetName,
String fleetMemberName,
@@ -989,7 +989,7 @@ private Mono> updateWithResponseAsync(
* @return a member of the Fleet along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> updateWithResponseAsync(
+ private Mono>> updateWithResponseAsync(
String resourceGroupName,
String fleetName,
String fleetMemberName,
@@ -1040,6 +1040,170 @@ private Mono> updateWithResponseAsync(
context);
}
+ /**
+ * Update a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @param properties The resource properties to be updated.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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 {@link PollerFlux} for polling of a member of the Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, FleetMemberInner> beginUpdateAsync(
+ String resourceGroupName,
+ String fleetName,
+ String fleetMemberName,
+ FleetMemberUpdate properties,
+ String ifMatch) {
+ Mono>> mono =
+ updateWithResponseAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ FleetMemberInner.class,
+ FleetMemberInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Update a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @param properties The resource properties to be updated.
+ * @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 {@link PollerFlux} for polling of a member of the Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, FleetMemberInner> beginUpdateAsync(
+ String resourceGroupName, String fleetName, String fleetMemberName, FleetMemberUpdate properties) {
+ final String ifMatch = null;
+ Mono>> mono =
+ updateWithResponseAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ FleetMemberInner.class,
+ FleetMemberInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Update a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @param properties The resource properties to be updated.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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 {@link PollerFlux} for polling of a member of the Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, FleetMemberInner> beginUpdateAsync(
+ String resourceGroupName,
+ String fleetName,
+ String fleetMemberName,
+ FleetMemberUpdate properties,
+ String ifMatch,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ updateWithResponseAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), FleetMemberInner.class, FleetMemberInner.class, context);
+ }
+
+ /**
+ * Update a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @param properties The resource properties to be updated.
+ * @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 {@link SyncPoller} for polling of a member of the Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, FleetMemberInner> beginUpdate(
+ String resourceGroupName, String fleetName, String fleetMemberName, FleetMemberUpdate properties) {
+ final String ifMatch = null;
+ return this
+ .beginUpdateAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch)
+ .getSyncPoller();
+ }
+
+ /**
+ * Update a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @param properties The resource properties to be updated.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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 {@link SyncPoller} for polling of a member of the Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, FleetMemberInner> beginUpdate(
+ String resourceGroupName,
+ String fleetName,
+ String fleetMemberName,
+ FleetMemberUpdate properties,
+ String ifMatch,
+ Context context) {
+ return this
+ .beginUpdateAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Update a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @param properties The resource properties to be updated.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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 a member of the Fleet on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(
+ String resourceGroupName,
+ String fleetName,
+ String fleetMemberName,
+ FleetMemberUpdate properties,
+ String ifMatch) {
+ return beginUpdateAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
/**
* Update a FleetMember.
*
@@ -1056,8 +1220,9 @@ private Mono> updateWithResponseAsync(
private Mono updateAsync(
String resourceGroupName, String fleetName, String fleetMemberName, FleetMemberUpdate properties) {
final String ifMatch = null;
- return updateWithResponseAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ return beginUpdateAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
}
/**
@@ -1072,18 +1237,19 @@ 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 a member of the Fleet along with {@link Response}.
+ * @return a member of the Fleet on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response updateWithResponse(
+ private Mono updateAsync(
String resourceGroupName,
String fleetName,
String fleetMemberName,
FleetMemberUpdate properties,
String ifMatch,
Context context) {
- return updateWithResponseAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch, context)
- .block();
+ return beginUpdateAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
}
/**
@@ -1102,8 +1268,32 @@ public Response updateWithResponse(
public FleetMemberInner update(
String resourceGroupName, String fleetName, String fleetMemberName, FleetMemberUpdate properties) {
final String ifMatch = null;
- return updateWithResponse(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch, Context.NONE)
- .getValue();
+ return updateAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch).block();
+ }
+
+ /**
+ * Update a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @param properties The resource properties to be updated.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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 a member of the Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public FleetMemberInner update(
+ String resourceGroupName,
+ String fleetName,
+ String fleetMemberName,
+ FleetMemberUpdate properties,
+ String ifMatch,
+ Context context) {
+ return updateAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch, context).block();
}
/**
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetUpdateStrategiesClientImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetUpdateStrategiesClientImpl.java
new file mode 100644
index 000000000000..6fa960d9abfc
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetUpdateStrategiesClientImpl.java
@@ -0,0 +1,1305 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.containerservicefleet.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.containerservicefleet.fluent.FleetUpdateStrategiesClient;
+import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetUpdateStrategyInner;
+import com.azure.resourcemanager.containerservicefleet.models.FleetUpdateStrategyListResult;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in FleetUpdateStrategiesClient. */
+public final class FleetUpdateStrategiesClientImpl implements FleetUpdateStrategiesClient {
+ /** The proxy service used to perform REST calls. */
+ private final FleetUpdateStrategiesService service;
+
+ /** The service client containing this operation class. */
+ private final ContainerServiceFleetManagementClientImpl client;
+
+ /**
+ * Initializes an instance of FleetUpdateStrategiesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ FleetUpdateStrategiesClientImpl(ContainerServiceFleetManagementClientImpl client) {
+ this.service =
+ RestProxy
+ .create(FleetUpdateStrategiesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ContainerServiceFleetManagementClientFleetUpdateStrategies to be used
+ * by the proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "ContainerServiceFlee")
+ public interface FleetUpdateStrategiesService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateStrategies")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByFleet(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("fleetName") String fleetName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateStrategies/{updateStrategyName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("fleetName") String fleetName,
+ @PathParam("updateStrategyName") String updateStrategyName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateStrategies/{updateStrategyName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @HeaderParam("If-Match") String ifMatch,
+ @HeaderParam("If-None-Match") String ifNoneMatch,
+ @PathParam("fleetName") String fleetName,
+ @PathParam("updateStrategyName") String updateStrategyName,
+ @BodyParam("application/json") FleetUpdateStrategyInner resource,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateStrategies/{updateStrategyName}")
+ @ExpectedResponses({200, 202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @HeaderParam("If-Match") String ifMatch,
+ @PathParam("fleetName") String fleetName,
+ @PathParam("updateStrategyName") String updateStrategyName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByFleetNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * List FleetUpdateStrategy resources by Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet 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 response of a FleetUpdateStrategy list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByFleetSinglePageAsync(
+ String resourceGroupName, String fleetName) {
+ 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 (fleetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listByFleet(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ fleetName,
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List FleetUpdateStrategy resources by Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @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 response of a FleetUpdateStrategy list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByFleetSinglePageAsync(
+ String resourceGroupName, String fleetName, 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 (fleetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByFleet(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ fleetName,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * List FleetUpdateStrategy resources by Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet 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 response of a FleetUpdateStrategy list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByFleetAsync(String resourceGroupName, String fleetName) {
+ return new PagedFlux<>(
+ () -> listByFleetSinglePageAsync(resourceGroupName, fleetName),
+ nextLink -> listByFleetNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List FleetUpdateStrategy resources by Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @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 response of a FleetUpdateStrategy list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByFleetAsync(
+ String resourceGroupName, String fleetName, Context context) {
+ return new PagedFlux<>(
+ () -> listByFleetSinglePageAsync(resourceGroupName, fleetName, context),
+ nextLink -> listByFleetNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List FleetUpdateStrategy resources by Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet 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 response of a FleetUpdateStrategy list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByFleet(String resourceGroupName, String fleetName) {
+ return new PagedIterable<>(listByFleetAsync(resourceGroupName, fleetName));
+ }
+
+ /**
+ * List FleetUpdateStrategy resources by Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @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 response of a FleetUpdateStrategy list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByFleet(
+ String resourceGroupName, String fleetName, Context context) {
+ return new PagedIterable<>(listByFleetAsync(resourceGroupName, fleetName, context));
+ }
+
+ /**
+ * Get a FleetUpdateStrategy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateStrategyName The name of the UpdateStrategy 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 a FleetUpdateStrategy along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String fleetName, String updateStrategyName) {
+ 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 (fleetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null."));
+ }
+ if (updateStrategyName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter updateStrategyName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ fleetName,
+ updateStrategyName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a FleetUpdateStrategy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateStrategyName The name of the UpdateStrategy resource.
+ * @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 a FleetUpdateStrategy along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String fleetName, String updateStrategyName, 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 (fleetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null."));
+ }
+ if (updateStrategyName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter updateStrategyName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ fleetName,
+ updateStrategyName,
+ accept,
+ context);
+ }
+
+ /**
+ * Get a FleetUpdateStrategy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateStrategyName The name of the UpdateStrategy 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 a FleetUpdateStrategy on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(
+ String resourceGroupName, String fleetName, String updateStrategyName) {
+ return getWithResponseAsync(resourceGroupName, fleetName, updateStrategyName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get a FleetUpdateStrategy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateStrategyName The name of the UpdateStrategy resource.
+ * @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 a FleetUpdateStrategy along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String resourceGroupName, String fleetName, String updateStrategyName, Context context) {
+ return getWithResponseAsync(resourceGroupName, fleetName, updateStrategyName, context).block();
+ }
+
+ /**
+ * Get a FleetUpdateStrategy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateStrategyName The name of the UpdateStrategy 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 a FleetUpdateStrategy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public FleetUpdateStrategyInner get(String resourceGroupName, String fleetName, String updateStrategyName) {
+ return getWithResponse(resourceGroupName, fleetName, updateStrategyName, Context.NONE).getValue();
+ }
+
+ /**
+ * Create a FleetUpdateStrategy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateStrategyName The name of the UpdateStrategy resource.
+ * @param resource Resource create parameters.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @param ifNoneMatch The request should only proceed if no entity matches this string.
+ * @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 defines a multi-stage process to perform update operations across members of a Fleet along with {@link
+ * Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName,
+ String fleetName,
+ String updateStrategyName,
+ FleetUpdateStrategyInner resource,
+ String ifMatch,
+ String ifNoneMatch) {
+ 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 (fleetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null."));
+ }
+ if (updateStrategyName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter updateStrategyName is required and cannot be null."));
+ }
+ if (resource == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null."));
+ } else {
+ resource.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ ifMatch,
+ ifNoneMatch,
+ fleetName,
+ updateStrategyName,
+ resource,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create a FleetUpdateStrategy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateStrategyName The name of the UpdateStrategy resource.
+ * @param resource Resource create parameters.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @param ifNoneMatch The request should only proceed if no entity matches this string.
+ * @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 defines a multi-stage process to perform update operations across members of a Fleet along with {@link
+ * Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName,
+ String fleetName,
+ String updateStrategyName,
+ FleetUpdateStrategyInner resource,
+ String ifMatch,
+ String ifNoneMatch,
+ 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 (fleetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null."));
+ }
+ if (updateStrategyName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter updateStrategyName is required and cannot be null."));
+ }
+ if (resource == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null."));
+ } else {
+ resource.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ ifMatch,
+ ifNoneMatch,
+ fleetName,
+ updateStrategyName,
+ resource,
+ accept,
+ context);
+ }
+
+ /**
+ * Create a FleetUpdateStrategy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateStrategyName The name of the UpdateStrategy resource.
+ * @param resource Resource create parameters.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @param ifNoneMatch The request should only proceed if no entity matches this string.
+ * @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 {@link PollerFlux} for polling of defines a multi-stage process to perform update operations across
+ * members of a Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, FleetUpdateStrategyInner> beginCreateOrUpdateAsync(
+ String resourceGroupName,
+ String fleetName,
+ String updateStrategyName,
+ FleetUpdateStrategyInner resource,
+ String ifMatch,
+ String ifNoneMatch) {
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(
+ resourceGroupName, fleetName, updateStrategyName, resource, ifMatch, ifNoneMatch);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ FleetUpdateStrategyInner.class,
+ FleetUpdateStrategyInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Create a FleetUpdateStrategy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateStrategyName The name of the UpdateStrategy resource.
+ * @param resource Resource create parameters.
+ * @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 {@link PollerFlux} for polling of defines a multi-stage process to perform update operations across
+ * members of a Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, FleetUpdateStrategyInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String fleetName, String updateStrategyName, FleetUpdateStrategyInner resource) {
+ final String ifMatch = null;
+ final String ifNoneMatch = null;
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(
+ resourceGroupName, fleetName, updateStrategyName, resource, ifMatch, ifNoneMatch);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ FleetUpdateStrategyInner.class,
+ FleetUpdateStrategyInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Create a FleetUpdateStrategy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateStrategyName The name of the UpdateStrategy resource.
+ * @param resource Resource create parameters.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @param ifNoneMatch The request should only proceed if no entity matches this string.
+ * @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 {@link PollerFlux} for polling of defines a multi-stage process to perform update operations across
+ * members of a Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, FleetUpdateStrategyInner> beginCreateOrUpdateAsync(
+ String resourceGroupName,
+ String fleetName,
+ String updateStrategyName,
+ FleetUpdateStrategyInner resource,
+ String ifMatch,
+ String ifNoneMatch,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(
+ resourceGroupName, fleetName, updateStrategyName, resource, ifMatch, ifNoneMatch, context);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ FleetUpdateStrategyInner.class,
+ FleetUpdateStrategyInner.class,
+ context);
+ }
+
+ /**
+ * Create a FleetUpdateStrategy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateStrategyName The name of the UpdateStrategy resource.
+ * @param resource Resource create parameters.
+ * @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 {@link SyncPoller} for polling of defines a multi-stage process to perform update operations across
+ * members of a Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, FleetUpdateStrategyInner> beginCreateOrUpdate(
+ String resourceGroupName, String fleetName, String updateStrategyName, FleetUpdateStrategyInner resource) {
+ final String ifMatch = null;
+ final String ifNoneMatch = null;
+ return this
+ .beginCreateOrUpdateAsync(resourceGroupName, fleetName, updateStrategyName, resource, ifMatch, ifNoneMatch)
+ .getSyncPoller();
+ }
+
+ /**
+ * Create a FleetUpdateStrategy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateStrategyName The name of the UpdateStrategy resource.
+ * @param resource Resource create parameters.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @param ifNoneMatch The request should only proceed if no entity matches this string.
+ * @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 {@link SyncPoller} for polling of defines a multi-stage process to perform update operations across
+ * members of a Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, FleetUpdateStrategyInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String fleetName,
+ String updateStrategyName,
+ FleetUpdateStrategyInner resource,
+ String ifMatch,
+ String ifNoneMatch,
+ Context context) {
+ return this
+ .beginCreateOrUpdateAsync(
+ resourceGroupName, fleetName, updateStrategyName, resource, ifMatch, ifNoneMatch, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Create a FleetUpdateStrategy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateStrategyName The name of the UpdateStrategy resource.
+ * @param resource Resource create parameters.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @param ifNoneMatch The request should only proceed if no entity matches this string.
+ * @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 defines a multi-stage process to perform update operations across members of a Fleet on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName,
+ String fleetName,
+ String updateStrategyName,
+ FleetUpdateStrategyInner resource,
+ String ifMatch,
+ String ifNoneMatch) {
+ return beginCreateOrUpdateAsync(
+ resourceGroupName, fleetName, updateStrategyName, resource, ifMatch, ifNoneMatch)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create a FleetUpdateStrategy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateStrategyName The name of the UpdateStrategy resource.
+ * @param resource Resource create parameters.
+ * @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 defines a multi-stage process to perform update operations across members of a Fleet on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName, String fleetName, String updateStrategyName, FleetUpdateStrategyInner resource) {
+ final String ifMatch = null;
+ final String ifNoneMatch = null;
+ return beginCreateOrUpdateAsync(
+ resourceGroupName, fleetName, updateStrategyName, resource, ifMatch, ifNoneMatch)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create a FleetUpdateStrategy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateStrategyName The name of the UpdateStrategy resource.
+ * @param resource Resource create parameters.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @param ifNoneMatch The request should only proceed if no entity matches this string.
+ * @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 defines a multi-stage process to perform update operations across members of a Fleet on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName,
+ String fleetName,
+ String updateStrategyName,
+ FleetUpdateStrategyInner resource,
+ String ifMatch,
+ String ifNoneMatch,
+ Context context) {
+ return beginCreateOrUpdateAsync(
+ resourceGroupName, fleetName, updateStrategyName, resource, ifMatch, ifNoneMatch, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create a FleetUpdateStrategy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateStrategyName The name of the UpdateStrategy resource.
+ * @param resource Resource create parameters.
+ * @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 defines a multi-stage process to perform update operations across members of a Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public FleetUpdateStrategyInner createOrUpdate(
+ String resourceGroupName, String fleetName, String updateStrategyName, FleetUpdateStrategyInner resource) {
+ final String ifMatch = null;
+ final String ifNoneMatch = null;
+ return createOrUpdateAsync(resourceGroupName, fleetName, updateStrategyName, resource, ifMatch, ifNoneMatch)
+ .block();
+ }
+
+ /**
+ * Create a FleetUpdateStrategy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateStrategyName The name of the UpdateStrategy resource.
+ * @param resource Resource create parameters.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @param ifNoneMatch The request should only proceed if no entity matches this string.
+ * @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 defines a multi-stage process to perform update operations across members of a Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public FleetUpdateStrategyInner createOrUpdate(
+ String resourceGroupName,
+ String fleetName,
+ String updateStrategyName,
+ FleetUpdateStrategyInner resource,
+ String ifMatch,
+ String ifNoneMatch,
+ Context context) {
+ return createOrUpdateAsync(
+ resourceGroupName, fleetName, updateStrategyName, resource, ifMatch, ifNoneMatch, context)
+ .block();
+ }
+
+ /**
+ * Delete a FleetUpdateStrategy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateStrategyName The name of the UpdateStrategy resource.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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 {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String fleetName, String updateStrategyName, String ifMatch) {
+ 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 (fleetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null."));
+ }
+ if (updateStrategyName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter updateStrategyName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ ifMatch,
+ fleetName,
+ updateStrategyName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Delete a FleetUpdateStrategy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateStrategyName The name of the UpdateStrategy resource.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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 {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String fleetName, String updateStrategyName, String ifMatch, 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 (fleetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null."));
+ }
+ if (updateStrategyName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter updateStrategyName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ ifMatch,
+ fleetName,
+ updateStrategyName,
+ accept,
+ context);
+ }
+
+ /**
+ * Delete a FleetUpdateStrategy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateStrategyName The name of the UpdateStrategy resource.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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 {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String fleetName, String updateStrategyName, String ifMatch) {
+ Mono>> mono =
+ deleteWithResponseAsync(resourceGroupName, fleetName, updateStrategyName, ifMatch);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Delete a FleetUpdateStrategy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateStrategyName The name of the UpdateStrategy 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 {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String fleetName, String updateStrategyName) {
+ final String ifMatch = null;
+ Mono>> mono =
+ deleteWithResponseAsync(resourceGroupName, fleetName, updateStrategyName, ifMatch);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Delete a FleetUpdateStrategy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateStrategyName The name of the UpdateStrategy resource.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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 {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String fleetName, String updateStrategyName, String ifMatch, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ deleteWithResponseAsync(resourceGroupName, fleetName, updateStrategyName, ifMatch, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Delete a FleetUpdateStrategy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateStrategyName The name of the UpdateStrategy 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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(
+ String resourceGroupName, String fleetName, String updateStrategyName) {
+ final String ifMatch = null;
+ return this.beginDeleteAsync(resourceGroupName, fleetName, updateStrategyName, ifMatch).getSyncPoller();
+ }
+
+ /**
+ * Delete a FleetUpdateStrategy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateStrategyName The name of the UpdateStrategy resource.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(
+ String resourceGroupName, String fleetName, String updateStrategyName, String ifMatch, Context context) {
+ return this
+ .beginDeleteAsync(resourceGroupName, fleetName, updateStrategyName, ifMatch, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Delete a FleetUpdateStrategy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateStrategyName The name of the UpdateStrategy resource.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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 A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(
+ String resourceGroupName, String fleetName, String updateStrategyName, String ifMatch) {
+ return beginDeleteAsync(resourceGroupName, fleetName, updateStrategyName, ifMatch)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete a FleetUpdateStrategy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateStrategyName The name of the UpdateStrategy 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 A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String fleetName, String updateStrategyName) {
+ final String ifMatch = null;
+ return beginDeleteAsync(resourceGroupName, fleetName, updateStrategyName, ifMatch)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete a FleetUpdateStrategy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateStrategyName The name of the UpdateStrategy resource.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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 A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(
+ String resourceGroupName, String fleetName, String updateStrategyName, String ifMatch, Context context) {
+ return beginDeleteAsync(resourceGroupName, fleetName, updateStrategyName, ifMatch, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete a FleetUpdateStrategy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateStrategyName The name of the UpdateStrategy 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String fleetName, String updateStrategyName) {
+ final String ifMatch = null;
+ deleteAsync(resourceGroupName, fleetName, updateStrategyName, ifMatch).block();
+ }
+
+ /**
+ * Delete a FleetUpdateStrategy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateStrategyName The name of the UpdateStrategy resource.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(
+ String resourceGroupName, String fleetName, String updateStrategyName, String ifMatch, Context context) {
+ deleteAsync(resourceGroupName, fleetName, updateStrategyName, ifMatch, context).block();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
+ * @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 response of a FleetUpdateStrategy list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByFleetNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listByFleetNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
+ * @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 response of a FleetUpdateStrategy list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByFleetNextSinglePageAsync(
+ String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByFleetNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetUpdateStrategiesImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetUpdateStrategiesImpl.java
new file mode 100644
index 000000000000..6d04b6b9e826
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetUpdateStrategiesImpl.java
@@ -0,0 +1,199 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.containerservicefleet.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.containerservicefleet.fluent.FleetUpdateStrategiesClient;
+import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetUpdateStrategyInner;
+import com.azure.resourcemanager.containerservicefleet.models.FleetUpdateStrategies;
+import com.azure.resourcemanager.containerservicefleet.models.FleetUpdateStrategy;
+
+public final class FleetUpdateStrategiesImpl implements FleetUpdateStrategies {
+ private static final ClientLogger LOGGER = new ClientLogger(FleetUpdateStrategiesImpl.class);
+
+ private final FleetUpdateStrategiesClient innerClient;
+
+ private final com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager;
+
+ public FleetUpdateStrategiesImpl(
+ FleetUpdateStrategiesClient innerClient,
+ com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable listByFleet(String resourceGroupName, String fleetName) {
+ PagedIterable inner = this.serviceClient().listByFleet(resourceGroupName, fleetName);
+ return Utils.mapPage(inner, inner1 -> new FleetUpdateStrategyImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByFleet(String resourceGroupName, String fleetName, Context context) {
+ PagedIterable inner =
+ this.serviceClient().listByFleet(resourceGroupName, fleetName, context);
+ return Utils.mapPage(inner, inner1 -> new FleetUpdateStrategyImpl(inner1, this.manager()));
+ }
+
+ public Response getWithResponse(
+ String resourceGroupName, String fleetName, String updateStrategyName, Context context) {
+ Response inner =
+ this.serviceClient().getWithResponse(resourceGroupName, fleetName, updateStrategyName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new FleetUpdateStrategyImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public FleetUpdateStrategy get(String resourceGroupName, String fleetName, String updateStrategyName) {
+ FleetUpdateStrategyInner inner = this.serviceClient().get(resourceGroupName, fleetName, updateStrategyName);
+ if (inner != null) {
+ return new FleetUpdateStrategyImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public void delete(String resourceGroupName, String fleetName, String updateStrategyName) {
+ this.serviceClient().delete(resourceGroupName, fleetName, updateStrategyName);
+ }
+
+ public void delete(
+ String resourceGroupName, String fleetName, String updateStrategyName, String ifMatch, Context context) {
+ this.serviceClient().delete(resourceGroupName, fleetName, updateStrategyName, ifMatch, context);
+ }
+
+ public FleetUpdateStrategy getById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String fleetName = Utils.getValueFromIdByName(id, "fleets");
+ if (fleetName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id)));
+ }
+ String updateStrategyName = Utils.getValueFromIdByName(id, "updateStrategies");
+ if (updateStrategyName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'updateStrategies'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, fleetName, updateStrategyName, Context.NONE).getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String fleetName = Utils.getValueFromIdByName(id, "fleets");
+ if (fleetName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id)));
+ }
+ String updateStrategyName = Utils.getValueFromIdByName(id, "updateStrategies");
+ if (updateStrategyName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'updateStrategies'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, fleetName, updateStrategyName, context);
+ }
+
+ public void deleteById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String fleetName = Utils.getValueFromIdByName(id, "fleets");
+ if (fleetName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id)));
+ }
+ String updateStrategyName = Utils.getValueFromIdByName(id, "updateStrategies");
+ if (updateStrategyName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'updateStrategies'.", id)));
+ }
+ String localIfMatch = null;
+ this.delete(resourceGroupName, fleetName, updateStrategyName, localIfMatch, Context.NONE);
+ }
+
+ public void deleteByIdWithResponse(String id, String ifMatch, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String fleetName = Utils.getValueFromIdByName(id, "fleets");
+ if (fleetName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id)));
+ }
+ String updateStrategyName = Utils.getValueFromIdByName(id, "updateStrategies");
+ if (updateStrategyName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'updateStrategies'.", id)));
+ }
+ this.delete(resourceGroupName, fleetName, updateStrategyName, ifMatch, context);
+ }
+
+ private FleetUpdateStrategiesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager() {
+ return this.serviceManager;
+ }
+
+ public FleetUpdateStrategyImpl define(String name) {
+ return new FleetUpdateStrategyImpl(name, this.manager());
+ }
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetUpdateStrategyImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetUpdateStrategyImpl.java
new file mode 100644
index 000000000000..dafc58d28c51
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetUpdateStrategyImpl.java
@@ -0,0 +1,212 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.containerservicefleet.implementation;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetUpdateStrategyInner;
+import com.azure.resourcemanager.containerservicefleet.models.FleetUpdateStrategy;
+import com.azure.resourcemanager.containerservicefleet.models.FleetUpdateStrategyProvisioningState;
+import com.azure.resourcemanager.containerservicefleet.models.UpdateRunStrategy;
+
+public final class FleetUpdateStrategyImpl
+ implements FleetUpdateStrategy, FleetUpdateStrategy.Definition, FleetUpdateStrategy.Update {
+ private FleetUpdateStrategyInner innerObject;
+
+ private final com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String etag() {
+ return this.innerModel().etag();
+ }
+
+ public FleetUpdateStrategyProvisioningState provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public UpdateRunStrategy strategy() {
+ return this.innerModel().strategy();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public FleetUpdateStrategyInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String fleetName;
+
+ private String updateStrategyName;
+
+ private String createIfMatch;
+
+ private String createIfNoneMatch;
+
+ private String updateIfMatch;
+
+ private String updateIfNoneMatch;
+
+ public FleetUpdateStrategyImpl withExistingFleet(String resourceGroupName, String fleetName) {
+ this.resourceGroupName = resourceGroupName;
+ this.fleetName = fleetName;
+ return this;
+ }
+
+ public FleetUpdateStrategy create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getFleetUpdateStrategies()
+ .createOrUpdate(
+ resourceGroupName,
+ fleetName,
+ updateStrategyName,
+ this.innerModel(),
+ createIfMatch,
+ createIfNoneMatch,
+ Context.NONE);
+ return this;
+ }
+
+ public FleetUpdateStrategy create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getFleetUpdateStrategies()
+ .createOrUpdate(
+ resourceGroupName,
+ fleetName,
+ updateStrategyName,
+ this.innerModel(),
+ createIfMatch,
+ createIfNoneMatch,
+ context);
+ return this;
+ }
+
+ FleetUpdateStrategyImpl(
+ String name, com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager) {
+ this.innerObject = new FleetUpdateStrategyInner();
+ this.serviceManager = serviceManager;
+ this.updateStrategyName = name;
+ this.createIfMatch = null;
+ this.createIfNoneMatch = null;
+ }
+
+ public FleetUpdateStrategyImpl update() {
+ this.updateIfMatch = null;
+ this.updateIfNoneMatch = null;
+ return this;
+ }
+
+ public FleetUpdateStrategy apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getFleetUpdateStrategies()
+ .createOrUpdate(
+ resourceGroupName,
+ fleetName,
+ updateStrategyName,
+ this.innerModel(),
+ updateIfMatch,
+ updateIfNoneMatch,
+ Context.NONE);
+ return this;
+ }
+
+ public FleetUpdateStrategy apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getFleetUpdateStrategies()
+ .createOrUpdate(
+ resourceGroupName,
+ fleetName,
+ updateStrategyName,
+ this.innerModel(),
+ updateIfMatch,
+ updateIfNoneMatch,
+ context);
+ return this;
+ }
+
+ FleetUpdateStrategyImpl(
+ FleetUpdateStrategyInner innerObject,
+ com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.fleetName = Utils.getValueFromIdByName(innerObject.id(), "fleets");
+ this.updateStrategyName = Utils.getValueFromIdByName(innerObject.id(), "updateStrategies");
+ }
+
+ public FleetUpdateStrategy refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getFleetUpdateStrategies()
+ .getWithResponse(resourceGroupName, fleetName, updateStrategyName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public FleetUpdateStrategy refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getFleetUpdateStrategies()
+ .getWithResponse(resourceGroupName, fleetName, updateStrategyName, context)
+ .getValue();
+ return this;
+ }
+
+ public FleetUpdateStrategyImpl withStrategy(UpdateRunStrategy strategy) {
+ this.innerModel().withStrategy(strategy);
+ return this;
+ }
+
+ public FleetUpdateStrategyImpl withIfMatch(String ifMatch) {
+ if (isInCreateMode()) {
+ this.createIfMatch = ifMatch;
+ return this;
+ } else {
+ this.updateIfMatch = ifMatch;
+ return this;
+ }
+ }
+
+ public FleetUpdateStrategyImpl withIfNoneMatch(String ifNoneMatch) {
+ if (isInCreateMode()) {
+ this.createIfNoneMatch = ifNoneMatch;
+ return this;
+ } else {
+ this.updateIfNoneMatch = ifNoneMatch;
+ return this;
+ }
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetsClientImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetsClientImpl.java
index 4f4b74c66b7f..f2cf5e21992c 100644
--- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetsClientImpl.java
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetsClientImpl.java
@@ -125,9 +125,9 @@ Mono>> createOrUpdate(
@Headers({"Content-Type: application/json"})
@Patch(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}")
- @ExpectedResponses({200})
+ @ExpectedResponses({200, 202})
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> update(
+ Mono>> update(
@HostParam("$host") String endpoint,
@QueryParam("api-version") String apiVersion,
@PathParam("subscriptionId") String subscriptionId,
@@ -1009,7 +1009,7 @@ public FleetInner createOrUpdate(
* @return the Fleet resource along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> updateWithResponseAsync(
+ private Mono>> updateWithResponseAsync(
String resourceGroupName, String fleetName, FleetPatch properties, String ifMatch) {
if (this.client.getEndpoint() == null) {
return Mono
@@ -1067,7 +1067,7 @@ private Mono> updateWithResponseAsync(
* @return the Fleet resource along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> updateWithResponseAsync(
+ private Mono>> updateWithResponseAsync(
String resourceGroupName, String fleetName, FleetPatch properties, String ifMatch, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
@@ -1108,6 +1108,134 @@ private Mono> updateWithResponseAsync(
context);
}
+ /**
+ * Update a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param properties The resource properties to be updated.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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 {@link PollerFlux} for polling of the Fleet resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, FleetInner> beginUpdateAsync(
+ String resourceGroupName, String fleetName, FleetPatch properties, String ifMatch) {
+ Mono>> mono =
+ updateWithResponseAsync(resourceGroupName, fleetName, properties, ifMatch);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), FleetInner.class, FleetInner.class, this.client.getContext());
+ }
+
+ /**
+ * Update a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param properties The resource properties to be updated.
+ * @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 {@link PollerFlux} for polling of the Fleet resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, FleetInner> beginUpdateAsync(
+ String resourceGroupName, String fleetName, FleetPatch properties) {
+ final String ifMatch = null;
+ Mono>> mono =
+ updateWithResponseAsync(resourceGroupName, fleetName, properties, ifMatch);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), FleetInner.class, FleetInner.class, this.client.getContext());
+ }
+
+ /**
+ * Update a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param properties The resource properties to be updated.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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 {@link PollerFlux} for polling of the Fleet resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, FleetInner> beginUpdateAsync(
+ String resourceGroupName, String fleetName, FleetPatch properties, String ifMatch, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ updateWithResponseAsync(resourceGroupName, fleetName, properties, ifMatch, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), FleetInner.class, FleetInner.class, context);
+ }
+
+ /**
+ * Update a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param properties The resource properties to be updated.
+ * @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 {@link SyncPoller} for polling of the Fleet resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, FleetInner> beginUpdate(
+ String resourceGroupName, String fleetName, FleetPatch properties) {
+ final String ifMatch = null;
+ return this.beginUpdateAsync(resourceGroupName, fleetName, properties, ifMatch).getSyncPoller();
+ }
+
+ /**
+ * Update a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param properties The resource properties to be updated.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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 {@link SyncPoller} for polling of the Fleet resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, FleetInner> beginUpdate(
+ String resourceGroupName, String fleetName, FleetPatch properties, String ifMatch, Context context) {
+ return this.beginUpdateAsync(resourceGroupName, fleetName, properties, ifMatch, context).getSyncPoller();
+ }
+
+ /**
+ * Update a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param properties The resource properties to be updated.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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 Fleet resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(
+ String resourceGroupName, String fleetName, FleetPatch properties, String ifMatch) {
+ return beginUpdateAsync(resourceGroupName, fleetName, properties, ifMatch)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
/**
* Update a Fleet.
*
@@ -1122,8 +1250,9 @@ private Mono> updateWithResponseAsync(
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono updateAsync(String resourceGroupName, String fleetName, FleetPatch properties) {
final String ifMatch = null;
- return updateWithResponseAsync(resourceGroupName, fleetName, properties, ifMatch)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ return beginUpdateAsync(resourceGroupName, fleetName, properties, ifMatch)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
}
/**
@@ -1137,12 +1266,14 @@ private Mono updateAsync(String resourceGroupName, String fleetName,
* @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 Fleet resource along with {@link Response}.
+ * @return the Fleet resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response updateWithResponse(
+ private Mono updateAsync(
String resourceGroupName, String fleetName, FleetPatch properties, String ifMatch, Context context) {
- return updateWithResponseAsync(resourceGroupName, fleetName, properties, ifMatch, context).block();
+ return beginUpdateAsync(resourceGroupName, fleetName, properties, ifMatch, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
}
/**
@@ -1159,7 +1290,26 @@ public Response updateWithResponse(
@ServiceMethod(returns = ReturnType.SINGLE)
public FleetInner update(String resourceGroupName, String fleetName, FleetPatch properties) {
final String ifMatch = null;
- return updateWithResponse(resourceGroupName, fleetName, properties, ifMatch, Context.NONE).getValue();
+ return updateAsync(resourceGroupName, fleetName, properties, ifMatch).block();
+ }
+
+ /**
+ * Update a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param properties The resource properties to be updated.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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 Fleet resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public FleetInner update(
+ String resourceGroupName, String fleetName, FleetPatch properties, String ifMatch, Context context) {
+ return updateAsync(resourceGroupName, fleetName, properties, ifMatch, context).block();
}
/**
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/UpdateRunImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/UpdateRunImpl.java
index 881a14875ab3..3abbfce778ad 100644
--- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/UpdateRunImpl.java
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/UpdateRunImpl.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.containerservicefleet.implementation;
-import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.containerservicefleet.fluent.models.UpdateRunInner;
import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpdate;
@@ -34,14 +33,14 @@ public String etag() {
return this.innerModel().etag();
}
- public SystemData systemData() {
- return this.innerModel().systemData();
- }
-
public UpdateRunProvisioningState provisioningState() {
return this.innerModel().provisioningState();
}
+ public String updateStrategyId() {
+ return this.innerModel().updateStrategyId();
+ }
+
public UpdateRunStrategy strategy() {
return this.innerModel().strategy();
}
@@ -211,6 +210,11 @@ public UpdateRun stop(String ifMatch, Context context) {
return serviceManager.updateRuns().stop(resourceGroupName, fleetName, updateRunName, ifMatch, context);
}
+ public UpdateRunImpl withUpdateStrategyId(String updateStrategyId) {
+ this.innerModel().withUpdateStrategyId(updateStrategyId);
+ return this;
+ }
+
public UpdateRunImpl withStrategy(UpdateRunStrategy strategy) {
this.innerModel().withStrategy(strategy);
return this;
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/UpdateRunsClientImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/UpdateRunsClientImpl.java
index 8aaaa8dc520e..4bcf8f12d0da 100644
--- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/UpdateRunsClientImpl.java
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/UpdateRunsClientImpl.java
@@ -517,8 +517,8 @@ public UpdateRunInner get(String resourceGroupName, String fleetName, String upd
* @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 an UpdateRun is a multi-stage process to perform update operations across members of a Fleet along with
- * {@link Response} on successful completion of {@link Mono}.
+ * @return a multi-stage process to perform update operations across members of a Fleet along with {@link Response}
+ * on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> createOrUpdateWithResponseAsync(
@@ -588,8 +588,8 @@ 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 an UpdateRun is a multi-stage process to perform update operations across members of a Fleet along with
- * {@link Response} on successful completion of {@link Mono}.
+ * @return a multi-stage process to perform update operations across members of a Fleet along with {@link Response}
+ * on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> createOrUpdateWithResponseAsync(
@@ -656,8 +656,8 @@ 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 {@link PollerFlux} for polling of an UpdateRun is a multi-stage process to perform update operations
- * across members of a Fleet.
+ * @return the {@link PollerFlux} for polling of a multi-stage process to perform update operations across members
+ * of a Fleet.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, UpdateRunInner> beginCreateOrUpdateAsync(
@@ -690,8 +690,8 @@ private PollerFlux, UpdateRunInner> beginCreateOrUpda
* @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 {@link PollerFlux} for polling of an UpdateRun is a multi-stage process to perform update operations
- * across members of a Fleet.
+ * @return the {@link PollerFlux} for polling of a multi-stage process to perform update operations across members
+ * of a Fleet.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, UpdateRunInner> beginCreateOrUpdateAsync(
@@ -724,8 +724,8 @@ private PollerFlux, UpdateRunInner> beginCreateOrUpda
* @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 {@link PollerFlux} for polling of an UpdateRun is a multi-stage process to perform update operations
- * across members of a Fleet.
+ * @return the {@link PollerFlux} for polling of a multi-stage process to perform update operations across members
+ * of a Fleet.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, UpdateRunInner> beginCreateOrUpdateAsync(
@@ -756,8 +756,8 @@ private PollerFlux, UpdateRunInner> beginCreateOrUpda
* @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 {@link SyncPoller} for polling of an UpdateRun is a multi-stage process to perform update operations
- * across members of a Fleet.
+ * @return the {@link SyncPoller} for polling of a multi-stage process to perform update operations across members
+ * of a Fleet.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, UpdateRunInner> beginCreateOrUpdate(
@@ -782,8 +782,8 @@ public SyncPoller, UpdateRunInner> beginCreateOrUpdat
* @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 {@link SyncPoller} for polling of an UpdateRun is a multi-stage process to perform update operations
- * across members of a Fleet.
+ * @return the {@link SyncPoller} for polling of a multi-stage process to perform update operations across members
+ * of a Fleet.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, UpdateRunInner> beginCreateOrUpdate(
@@ -812,8 +812,8 @@ public SyncPoller, UpdateRunInner> beginCreateOrUpdat
* @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 an UpdateRun is a multi-stage process to perform update operations across members of a Fleet on
- * successful completion of {@link Mono}.
+ * @return a multi-stage process to perform update operations across members of a Fleet on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createOrUpdateAsync(
@@ -838,8 +838,8 @@ 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 an UpdateRun is a multi-stage process to perform update operations across members of a Fleet on
- * successful completion of {@link Mono}.
+ * @return a multi-stage process to perform update operations across members of a Fleet on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createOrUpdateAsync(
@@ -864,8 +864,8 @@ 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 an UpdateRun is a multi-stage process to perform update operations across members of a Fleet on
- * successful completion of {@link Mono}.
+ * @return a multi-stage process to perform update operations across members of a Fleet on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createOrUpdateAsync(
@@ -892,7 +892,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 an UpdateRun is a multi-stage process to perform update operations across members of a Fleet.
+ * @return a multi-stage process to perform update operations across members of a Fleet.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public UpdateRunInner createOrUpdate(
@@ -915,7 +915,7 @@ public UpdateRunInner 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 an UpdateRun is a multi-stage process to perform update operations across members of a Fleet.
+ * @return a multi-stage process to perform update operations across members of a Fleet.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public UpdateRunInner createOrUpdate(
@@ -1248,8 +1248,8 @@ public void delete(
* @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 an UpdateRun is a multi-stage process to perform update operations across members of a Fleet along with
- * {@link Response} on successful completion of {@link Mono}.
+ * @return a multi-stage process to perform update operations across members of a Fleet along with {@link Response}
+ * on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> startWithResponseAsync(
@@ -1305,8 +1305,8 @@ private Mono>> startWithResponseAsync(
* @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 an UpdateRun is a multi-stage process to perform update operations across members of a Fleet along with
- * {@link Response} on successful completion of {@link Mono}.
+ * @return a multi-stage process to perform update operations across members of a Fleet along with {@link Response}
+ * on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> startWithResponseAsync(
@@ -1358,8 +1358,8 @@ private Mono>> startWithResponseAsync(
* @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 {@link PollerFlux} for polling of an UpdateRun is a multi-stage process to perform update operations
- * across members of a Fleet.
+ * @return the {@link PollerFlux} for polling of a multi-stage process to perform update operations across members
+ * of a Fleet.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, UpdateRunInner> beginStartAsync(
@@ -1385,8 +1385,8 @@ private PollerFlux, UpdateRunInner> beginStartAsync(
* @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 {@link PollerFlux} for polling of an UpdateRun is a multi-stage process to perform update operations
- * across members of a Fleet.
+ * @return the {@link PollerFlux} for polling of a multi-stage process to perform update operations across members
+ * of a Fleet.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, UpdateRunInner> beginStartAsync(
@@ -1415,8 +1415,8 @@ private PollerFlux, UpdateRunInner> beginStartAsync(
* @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 {@link PollerFlux} for polling of an UpdateRun is a multi-stage process to perform update operations
- * across members of a Fleet.
+ * @return the {@link PollerFlux} for polling of a multi-stage process to perform update operations across members
+ * of a Fleet.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, UpdateRunInner> beginStartAsync(
@@ -1439,8 +1439,8 @@ private PollerFlux, UpdateRunInner> beginStartAsync(
* @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 {@link SyncPoller} for polling of an UpdateRun is a multi-stage process to perform update operations
- * across members of a Fleet.
+ * @return the {@link SyncPoller} for polling of a multi-stage process to perform update operations across members
+ * of a Fleet.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, UpdateRunInner> beginStart(
@@ -1460,8 +1460,8 @@ public SyncPoller, UpdateRunInner> beginStart(
* @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 {@link SyncPoller} for polling of an UpdateRun is a multi-stage process to perform update operations
- * across members of a Fleet.
+ * @return the {@link SyncPoller} for polling of a multi-stage process to perform update operations across members
+ * of a Fleet.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, UpdateRunInner> beginStart(
@@ -1479,8 +1479,8 @@ public SyncPoller, UpdateRunInner> beginStart(
* @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 an UpdateRun is a multi-stage process to perform update operations across members of a Fleet on
- * successful completion of {@link Mono}.
+ * @return a multi-stage process to perform update operations across members of a Fleet on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono startAsync(
@@ -1499,8 +1499,8 @@ private Mono startAsync(
* @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 an UpdateRun is a multi-stage process to perform update operations across members of a Fleet on
- * successful completion of {@link Mono}.
+ * @return a multi-stage process to perform update operations across members of a Fleet on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono startAsync(String resourceGroupName, String fleetName, String updateRunName) {
@@ -1521,8 +1521,8 @@ private Mono startAsync(String resourceGroupName, String fleetNa
* @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 an UpdateRun is a multi-stage process to perform update operations across members of a Fleet on
- * successful completion of {@link Mono}.
+ * @return a multi-stage process to perform update operations across members of a Fleet on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono startAsync(
@@ -1541,7 +1541,7 @@ private Mono startAsync(
* @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 an UpdateRun is a multi-stage process to perform update operations across members of a Fleet.
+ * @return a multi-stage process to perform update operations across members of a Fleet.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public UpdateRunInner start(String resourceGroupName, String fleetName, String updateRunName) {
@@ -1560,7 +1560,7 @@ public UpdateRunInner start(String resourceGroupName, String fleetName, String u
* @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 an UpdateRun is a multi-stage process to perform update operations across members of a Fleet.
+ * @return a multi-stage process to perform update operations across members of a Fleet.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public UpdateRunInner start(
@@ -1578,8 +1578,8 @@ public UpdateRunInner start(
* @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 an UpdateRun is a multi-stage process to perform update operations across members of a Fleet along with
- * {@link Response} on successful completion of {@link Mono}.
+ * @return a multi-stage process to perform update operations across members of a Fleet along with {@link Response}
+ * on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> stopWithResponseAsync(
@@ -1635,8 +1635,8 @@ private Mono>> stopWithResponseAsync(
* @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 an UpdateRun is a multi-stage process to perform update operations across members of a Fleet along with
- * {@link Response} on successful completion of {@link Mono}.
+ * @return a multi-stage process to perform update operations across members of a Fleet along with {@link Response}
+ * on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> stopWithResponseAsync(
@@ -1688,8 +1688,8 @@ private Mono>> stopWithResponseAsync(
* @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 {@link PollerFlux} for polling of an UpdateRun is a multi-stage process to perform update operations
- * across members of a Fleet.
+ * @return the {@link PollerFlux} for polling of a multi-stage process to perform update operations across members
+ * of a Fleet.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, UpdateRunInner> beginStopAsync(
@@ -1715,8 +1715,8 @@ private PollerFlux, UpdateRunInner> beginStopAsync(
* @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 {@link PollerFlux} for polling of an UpdateRun is a multi-stage process to perform update operations
- * across members of a Fleet.
+ * @return the {@link PollerFlux} for polling of a multi-stage process to perform update operations across members
+ * of a Fleet.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, UpdateRunInner> beginStopAsync(
@@ -1745,8 +1745,8 @@ private PollerFlux, UpdateRunInner> beginStopAsync(
* @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 {@link PollerFlux} for polling of an UpdateRun is a multi-stage process to perform update operations
- * across members of a Fleet.
+ * @return the {@link PollerFlux} for polling of a multi-stage process to perform update operations across members
+ * of a Fleet.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, UpdateRunInner> beginStopAsync(
@@ -1769,8 +1769,8 @@ private PollerFlux, UpdateRunInner> beginStopAsync(
* @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 {@link SyncPoller} for polling of an UpdateRun is a multi-stage process to perform update operations
- * across members of a Fleet.
+ * @return the {@link SyncPoller} for polling of a multi-stage process to perform update operations across members
+ * of a Fleet.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, UpdateRunInner> beginStop(
@@ -1790,8 +1790,8 @@ public SyncPoller, UpdateRunInner> beginStop(
* @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 {@link SyncPoller} for polling of an UpdateRun is a multi-stage process to perform update operations
- * across members of a Fleet.
+ * @return the {@link SyncPoller} for polling of a multi-stage process to perform update operations across members
+ * of a Fleet.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, UpdateRunInner> beginStop(
@@ -1809,8 +1809,8 @@ public SyncPoller, UpdateRunInner> beginStop(
* @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 an UpdateRun is a multi-stage process to perform update operations across members of a Fleet on
- * successful completion of {@link Mono}.
+ * @return a multi-stage process to perform update operations across members of a Fleet on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono stopAsync(
@@ -1829,8 +1829,8 @@ private Mono stopAsync(
* @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 an UpdateRun is a multi-stage process to perform update operations across members of a Fleet on
- * successful completion of {@link Mono}.
+ * @return a multi-stage process to perform update operations across members of a Fleet on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono stopAsync(String resourceGroupName, String fleetName, String updateRunName) {
@@ -1851,8 +1851,8 @@ private Mono stopAsync(String resourceGroupName, String fleetNam
* @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 an UpdateRun is a multi-stage process to perform update operations across members of a Fleet on
- * successful completion of {@link Mono}.
+ * @return a multi-stage process to perform update operations across members of a Fleet on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono stopAsync(
@@ -1871,7 +1871,7 @@ private Mono stopAsync(
* @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 an UpdateRun is a multi-stage process to perform update operations across members of a Fleet.
+ * @return a multi-stage process to perform update operations across members of a Fleet.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public UpdateRunInner stop(String resourceGroupName, String fleetName, String updateRunName) {
@@ -1890,7 +1890,7 @@ public UpdateRunInner stop(String resourceGroupName, String fleetName, String up
* @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 an UpdateRun is a multi-stage process to perform update operations across members of a Fleet.
+ * @return a multi-stage process to perform update operations across members of a Fleet.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public UpdateRunInner stop(
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/AgentProfile.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/AgentProfile.java
new file mode 100644
index 000000000000..43397ae41c43
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/AgentProfile.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.containerservicefleet.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Agent profile for the Fleet hub. */
+@Fluent
+public final class AgentProfile {
+ /*
+ * The ID of the subnet which the Fleet hub node will join on startup. If this is not specified, a vnet and subnet
+ * will be generated and used.
+ */
+ @JsonProperty(value = "subnetId")
+ private String subnetId;
+
+ /** Creates an instance of AgentProfile class. */
+ public AgentProfile() {
+ }
+
+ /**
+ * Get the subnetId property: The ID of the subnet which the Fleet hub node will join on startup. If this is not
+ * specified, a vnet and subnet will be generated and used.
+ *
+ * @return the subnetId value.
+ */
+ public String subnetId() {
+ return this.subnetId;
+ }
+
+ /**
+ * Set the subnetId property: The ID of the subnet which the Fleet hub node will join on startup. If this is not
+ * specified, a vnet and subnet will be generated and used.
+ *
+ * @param subnetId the subnetId value to set.
+ * @return the AgentProfile object itself.
+ */
+ public AgentProfile withSubnetId(String subnetId) {
+ this.subnetId = subnetId;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ApiServerAccessProfile.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ApiServerAccessProfile.java
new file mode 100644
index 000000000000..3f2b6771dd07
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ApiServerAccessProfile.java
@@ -0,0 +1,105 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.containerservicefleet.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Access profile for the Fleet hub API server. */
+@Fluent
+public final class ApiServerAccessProfile {
+ /*
+ * Whether to create the Fleet hub as a private cluster or not.
+ */
+ @JsonProperty(value = "enablePrivateCluster")
+ private Boolean enablePrivateCluster;
+
+ /*
+ * Whether to enable apiserver vnet integration for the Fleet hub or not.
+ */
+ @JsonProperty(value = "enableVnetIntegration")
+ private Boolean enableVnetIntegration;
+
+ /*
+ * The subnet to be used when apiserver vnet integration is enabled. It is required when creating a new Fleet with
+ * BYO vnet.
+ */
+ @JsonProperty(value = "subnetId")
+ private String subnetId;
+
+ /** Creates an instance of ApiServerAccessProfile class. */
+ public ApiServerAccessProfile() {
+ }
+
+ /**
+ * Get the enablePrivateCluster property: Whether to create the Fleet hub as a private cluster or not.
+ *
+ * @return the enablePrivateCluster value.
+ */
+ public Boolean enablePrivateCluster() {
+ return this.enablePrivateCluster;
+ }
+
+ /**
+ * Set the enablePrivateCluster property: Whether to create the Fleet hub as a private cluster or not.
+ *
+ * @param enablePrivateCluster the enablePrivateCluster value to set.
+ * @return the ApiServerAccessProfile object itself.
+ */
+ public ApiServerAccessProfile withEnablePrivateCluster(Boolean enablePrivateCluster) {
+ this.enablePrivateCluster = enablePrivateCluster;
+ return this;
+ }
+
+ /**
+ * Get the enableVnetIntegration property: Whether to enable apiserver vnet integration for the Fleet hub or not.
+ *
+ * @return the enableVnetIntegration value.
+ */
+ public Boolean enableVnetIntegration() {
+ return this.enableVnetIntegration;
+ }
+
+ /**
+ * Set the enableVnetIntegration property: Whether to enable apiserver vnet integration for the Fleet hub or not.
+ *
+ * @param enableVnetIntegration the enableVnetIntegration value to set.
+ * @return the ApiServerAccessProfile object itself.
+ */
+ public ApiServerAccessProfile withEnableVnetIntegration(Boolean enableVnetIntegration) {
+ this.enableVnetIntegration = enableVnetIntegration;
+ return this;
+ }
+
+ /**
+ * Get the subnetId property: The subnet to be used when apiserver vnet integration is enabled. It is required when
+ * creating a new Fleet with BYO vnet.
+ *
+ * @return the subnetId value.
+ */
+ public String subnetId() {
+ return this.subnetId;
+ }
+
+ /**
+ * Set the subnetId property: The subnet to be used when apiserver vnet integration is enabled. It is required when
+ * creating a new Fleet with BYO vnet.
+ *
+ * @param subnetId the subnetId value to set.
+ * @return the ApiServerAccessProfile object itself.
+ */
+ public ApiServerAccessProfile withSubnetId(String subnetId) {
+ this.subnetId = subnetId;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/Fleet.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/Fleet.java
index 5992bbf9d6c4..063c11164564 100644
--- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/Fleet.java
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/Fleet.java
@@ -58,6 +58,13 @@ public interface Fleet {
*/
String etag();
+ /**
+ * Gets the identity property: Managed identity.
+ *
+ * @return the identity value.
+ */
+ ManagedServiceIdentity identity();
+
/**
* Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
@@ -114,11 +121,13 @@ interface Definition
DefinitionStages.WithResourceGroup,
DefinitionStages.WithCreate {
}
+
/** The Fleet definition stages. */
interface DefinitionStages {
/** The first stage of the Fleet definition. */
interface Blank extends WithLocation {
}
+
/** The stage of the Fleet definition allowing to specify location. */
interface WithLocation {
/**
@@ -137,6 +146,7 @@ interface WithLocation {
*/
WithResourceGroup withRegion(String location);
}
+
/** The stage of the Fleet definition allowing to specify parent resource. */
interface WithResourceGroup {
/**
@@ -147,12 +157,14 @@ interface WithResourceGroup {
*/
WithCreate withExistingResourceGroup(String resourceGroupName);
}
+
/**
* The stage of the Fleet definition which contains all the minimum required properties for the resource to be
* created, but also allows for any other optional properties to be specified.
*/
interface WithCreate
extends DefinitionStages.WithTags,
+ DefinitionStages.WithIdentity,
DefinitionStages.WithHubProfile,
DefinitionStages.WithIfMatch,
DefinitionStages.WithIfNoneMatch {
@@ -171,6 +183,7 @@ interface WithCreate
*/
Fleet create(Context context);
}
+
/** The stage of the Fleet definition allowing to specify tags. */
interface WithTags {
/**
@@ -181,6 +194,18 @@ interface WithTags {
*/
WithCreate withTags(Map tags);
}
+
+ /** The stage of the Fleet definition allowing to specify identity. */
+ interface WithIdentity {
+ /**
+ * Specifies the identity property: Managed identity..
+ *
+ * @param identity Managed identity.
+ * @return the next definition stage.
+ */
+ WithCreate withIdentity(ManagedServiceIdentity identity);
+ }
+
/** The stage of the Fleet definition allowing to specify hubProfile. */
interface WithHubProfile {
/**
@@ -191,6 +216,7 @@ interface WithHubProfile {
*/
WithCreate withHubProfile(FleetHubProfile hubProfile);
}
+
/** The stage of the Fleet definition allowing to specify ifMatch. */
interface WithIfMatch {
/**
@@ -201,6 +227,7 @@ interface WithIfMatch {
*/
WithCreate withIfMatch(String ifMatch);
}
+
/** The stage of the Fleet definition allowing to specify ifNoneMatch. */
interface WithIfNoneMatch {
/**
@@ -212,6 +239,7 @@ interface WithIfNoneMatch {
WithCreate withIfNoneMatch(String ifNoneMatch);
}
}
+
/**
* Begins update for the Fleet resource.
*
@@ -220,7 +248,7 @@ interface WithIfNoneMatch {
Fleet.Update update();
/** The template for Fleet update. */
- interface Update extends UpdateStages.WithTags, UpdateStages.WithIfMatch {
+ interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithIfMatch {
/**
* Executes the update request.
*
@@ -236,6 +264,7 @@ interface Update extends UpdateStages.WithTags, UpdateStages.WithIfMatch {
*/
Fleet apply(Context context);
}
+
/** The Fleet update stages. */
interface UpdateStages {
/** The stage of the Fleet update allowing to specify tags. */
@@ -248,6 +277,18 @@ interface WithTags {
*/
Update withTags(Map tags);
}
+
+ /** The stage of the Fleet update allowing to specify identity. */
+ interface WithIdentity {
+ /**
+ * Specifies the identity property: Managed identity..
+ *
+ * @param identity Managed identity.
+ * @return the next definition stage.
+ */
+ Update withIdentity(ManagedServiceIdentity identity);
+ }
+
/** The stage of the Fleet update allowing to specify ifMatch. */
interface WithIfMatch {
/**
@@ -259,6 +300,7 @@ interface WithIfMatch {
Update withIfMatch(String ifMatch);
}
}
+
/**
* Refreshes the resource to sync with Azure.
*
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetHubProfile.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetHubProfile.java
index 9c9d80bdfba5..ad871aca8ba8 100644
--- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetHubProfile.java
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetHubProfile.java
@@ -16,6 +16,18 @@ public final class FleetHubProfile {
@JsonProperty(value = "dnsPrefix")
private String dnsPrefix;
+ /*
+ * The access profile for the Fleet hub API server.
+ */
+ @JsonProperty(value = "apiServerAccessProfile")
+ private ApiServerAccessProfile apiServerAccessProfile;
+
+ /*
+ * The agent profile for the Fleet hub.
+ */
+ @JsonProperty(value = "agentProfile")
+ private AgentProfile agentProfile;
+
/*
* The FQDN of the Fleet hub.
*/
@@ -52,6 +64,46 @@ public FleetHubProfile withDnsPrefix(String dnsPrefix) {
return this;
}
+ /**
+ * Get the apiServerAccessProfile property: The access profile for the Fleet hub API server.
+ *
+ * @return the apiServerAccessProfile value.
+ */
+ public ApiServerAccessProfile apiServerAccessProfile() {
+ return this.apiServerAccessProfile;
+ }
+
+ /**
+ * Set the apiServerAccessProfile property: The access profile for the Fleet hub API server.
+ *
+ * @param apiServerAccessProfile the apiServerAccessProfile value to set.
+ * @return the FleetHubProfile object itself.
+ */
+ public FleetHubProfile withApiServerAccessProfile(ApiServerAccessProfile apiServerAccessProfile) {
+ this.apiServerAccessProfile = apiServerAccessProfile;
+ return this;
+ }
+
+ /**
+ * Get the agentProfile property: The agent profile for the Fleet hub.
+ *
+ * @return the agentProfile value.
+ */
+ public AgentProfile agentProfile() {
+ return this.agentProfile;
+ }
+
+ /**
+ * Set the agentProfile property: The agent profile for the Fleet hub.
+ *
+ * @param agentProfile the agentProfile value to set.
+ * @return the FleetHubProfile object itself.
+ */
+ public FleetHubProfile withAgentProfile(AgentProfile agentProfile) {
+ this.agentProfile = agentProfile;
+ return this;
+ }
+
/**
* Get the fqdn property: The FQDN of the Fleet hub.
*
@@ -76,5 +128,11 @@ public String kubernetesVersion() {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
+ if (apiServerAccessProfile() != null) {
+ apiServerAccessProfile().validate();
+ }
+ if (agentProfile() != null) {
+ agentProfile().validate();
+ }
}
}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMember.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMember.java
index c8c2be0c107c..fcd78346cce8 100644
--- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMember.java
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMember.java
@@ -89,11 +89,13 @@ public interface FleetMember {
interface Definition
extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate {
}
+
/** The FleetMember definition stages. */
interface DefinitionStages {
/** The first stage of the FleetMember definition. */
interface Blank extends WithParentResource {
}
+
/** The stage of the FleetMember definition allowing to specify parent resource. */
interface WithParentResource {
/**
@@ -105,6 +107,7 @@ interface WithParentResource {
*/
WithCreate withExistingFleet(String resourceGroupName, String fleetName);
}
+
/**
* The stage of the FleetMember definition which contains all the minimum required properties for the resource
* to be created, but also allows for any other optional properties to be specified.
@@ -129,6 +132,7 @@ interface WithCreate
*/
FleetMember create(Context context);
}
+
/** The stage of the FleetMember definition allowing to specify clusterResourceId. */
interface WithClusterResourceId {
/**
@@ -143,6 +147,7 @@ interface WithClusterResourceId {
*/
WithCreate withClusterResourceId(String clusterResourceId);
}
+
/** The stage of the FleetMember definition allowing to specify group. */
interface WithGroup {
/**
@@ -153,6 +158,7 @@ interface WithGroup {
*/
WithCreate withGroup(String group);
}
+
/** The stage of the FleetMember definition allowing to specify ifMatch. */
interface WithIfMatch {
/**
@@ -163,6 +169,7 @@ interface WithIfMatch {
*/
WithCreate withIfMatch(String ifMatch);
}
+
/** The stage of the FleetMember definition allowing to specify ifNoneMatch. */
interface WithIfNoneMatch {
/**
@@ -174,6 +181,7 @@ interface WithIfNoneMatch {
WithCreate withIfNoneMatch(String ifNoneMatch);
}
}
+
/**
* Begins update for the FleetMember resource.
*
@@ -198,6 +206,7 @@ interface Update extends UpdateStages.WithGroup, UpdateStages.WithIfMatch {
*/
FleetMember apply(Context context);
}
+
/** The FleetMember update stages. */
interface UpdateStages {
/** The stage of the FleetMember update allowing to specify group. */
@@ -210,6 +219,7 @@ interface WithGroup {
*/
Update withGroup(String group);
}
+
/** The stage of the FleetMember update allowing to specify ifMatch. */
interface WithIfMatch {
/**
@@ -221,6 +231,7 @@ interface WithIfMatch {
Update withIfMatch(String ifMatch);
}
}
+
/**
* Refreshes the resource to sync with Azure.
*
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetPatch.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetPatch.java
index b30127962ba6..f91f23d30594 100644
--- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetPatch.java
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetPatch.java
@@ -19,6 +19,12 @@ public final class FleetPatch {
@JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map tags;
+ /*
+ * Managed identity.
+ */
+ @JsonProperty(value = "identity")
+ private ManagedServiceIdentity identity;
+
/** Creates an instance of FleetPatch class. */
public FleetPatch() {
}
@@ -43,11 +49,34 @@ public FleetPatch withTags(Map tags) {
return this;
}
+ /**
+ * Get the identity property: Managed identity.
+ *
+ * @return the identity value.
+ */
+ public ManagedServiceIdentity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: Managed identity.
+ *
+ * @param identity the identity value to set.
+ * @return the FleetPatch object itself.
+ */
+ public FleetPatch withIdentity(ManagedServiceIdentity identity) {
+ this.identity = identity;
+ return this;
+ }
+
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
+ if (identity() != null) {
+ identity().validate();
+ }
}
}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategies.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategies.java
new file mode 100644
index 000000000000..c2cdb4982af0
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategies.java
@@ -0,0 +1,144 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.containerservicefleet.models;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+
+/** Resource collection API of FleetUpdateStrategies. */
+public interface FleetUpdateStrategies {
+ /**
+ * List FleetUpdateStrategy resources by Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet 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 response of a FleetUpdateStrategy list operation as paginated response with {@link PagedIterable}.
+ */
+ PagedIterable listByFleet(String resourceGroupName, String fleetName);
+
+ /**
+ * List FleetUpdateStrategy resources by Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @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 response of a FleetUpdateStrategy list operation as paginated response with {@link PagedIterable}.
+ */
+ PagedIterable listByFleet(String resourceGroupName, String fleetName, Context context);
+
+ /**
+ * Get a FleetUpdateStrategy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateStrategyName The name of the UpdateStrategy resource.
+ * @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 a FleetUpdateStrategy along with {@link Response}.
+ */
+ Response getWithResponse(
+ String resourceGroupName, String fleetName, String updateStrategyName, Context context);
+
+ /**
+ * Get a FleetUpdateStrategy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateStrategyName The name of the UpdateStrategy 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 a FleetUpdateStrategy.
+ */
+ FleetUpdateStrategy get(String resourceGroupName, String fleetName, String updateStrategyName);
+
+ /**
+ * Delete a FleetUpdateStrategy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateStrategyName The name of the UpdateStrategy 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.
+ */
+ void delete(String resourceGroupName, String fleetName, String updateStrategyName);
+
+ /**
+ * Delete a FleetUpdateStrategy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateStrategyName The name of the UpdateStrategy resource.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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.
+ */
+ void delete(String resourceGroupName, String fleetName, String updateStrategyName, String ifMatch, Context context);
+
+ /**
+ * Get a FleetUpdateStrategy.
+ *
+ * @param id the resource ID.
+ * @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 a FleetUpdateStrategy along with {@link Response}.
+ */
+ FleetUpdateStrategy getById(String id);
+
+ /**
+ * Get a FleetUpdateStrategy.
+ *
+ * @param id the resource ID.
+ * @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 a FleetUpdateStrategy along with {@link Response}.
+ */
+ Response getByIdWithResponse(String id, Context context);
+
+ /**
+ * Delete a FleetUpdateStrategy.
+ *
+ * @param id the resource ID.
+ * @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.
+ */
+ void deleteById(String id);
+
+ /**
+ * Delete a FleetUpdateStrategy.
+ *
+ * @param id the resource ID.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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.
+ */
+ void deleteByIdWithResponse(String id, String ifMatch, Context context);
+
+ /**
+ * Begins definition for a new FleetUpdateStrategy resource.
+ *
+ * @param name resource name.
+ * @return the first stage of the new FleetUpdateStrategy definition.
+ */
+ FleetUpdateStrategy.DefinitionStages.Blank define(String name);
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategy.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategy.java
new file mode 100644
index 000000000000..59a6897f62ae
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategy.java
@@ -0,0 +1,225 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.containerservicefleet.models;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetUpdateStrategyInner;
+
+/** An immutable client-side representation of FleetUpdateStrategy. */
+public interface FleetUpdateStrategy {
+ /**
+ * Gets the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * Gets the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * Gets the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * Gets the etag property: If eTag is provided in the response body, it may also be provided as a header per the
+ * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource.
+ * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26),
+ * and If-Range (section 14.27) header fields.
+ *
+ * @return the etag value.
+ */
+ String etag();
+
+ /**
+ * Gets the provisioningState property: The provisioning state of the UpdateStrategy resource.
+ *
+ * @return the provisioningState value.
+ */
+ FleetUpdateStrategyProvisioningState provisioningState();
+
+ /**
+ * Gets the strategy property: Defines the update sequence of the clusters.
+ *
+ * @return the strategy value.
+ */
+ UpdateRunStrategy strategy();
+
+ /**
+ * Gets the name of the resource group.
+ *
+ * @return the name of the resource group.
+ */
+ String resourceGroupName();
+
+ /**
+ * Gets the inner com.azure.resourcemanager.containerservicefleet.fluent.models.FleetUpdateStrategyInner object.
+ *
+ * @return the inner object.
+ */
+ FleetUpdateStrategyInner innerModel();
+
+ /** The entirety of the FleetUpdateStrategy definition. */
+ interface Definition
+ extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate {
+ }
+
+ /** The FleetUpdateStrategy definition stages. */
+ interface DefinitionStages {
+ /** The first stage of the FleetUpdateStrategy definition. */
+ interface Blank extends WithParentResource {
+ }
+
+ /** The stage of the FleetUpdateStrategy definition allowing to specify parent resource. */
+ interface WithParentResource {
+ /**
+ * Specifies resourceGroupName, fleetName.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @return the next definition stage.
+ */
+ WithCreate withExistingFleet(String resourceGroupName, String fleetName);
+ }
+
+ /**
+ * The stage of the FleetUpdateStrategy definition which contains all the minimum required properties for the
+ * resource to be created, but also allows for any other optional properties to be specified.
+ */
+ interface WithCreate
+ extends DefinitionStages.WithStrategy, DefinitionStages.WithIfMatch, DefinitionStages.WithIfNoneMatch {
+ /**
+ * Executes the create request.
+ *
+ * @return the created resource.
+ */
+ FleetUpdateStrategy create();
+
+ /**
+ * Executes the create request.
+ *
+ * @param context The context to associate with this operation.
+ * @return the created resource.
+ */
+ FleetUpdateStrategy create(Context context);
+ }
+
+ /** The stage of the FleetUpdateStrategy definition allowing to specify strategy. */
+ interface WithStrategy {
+ /**
+ * Specifies the strategy property: Defines the update sequence of the clusters..
+ *
+ * @param strategy Defines the update sequence of the clusters.
+ * @return the next definition stage.
+ */
+ WithCreate withStrategy(UpdateRunStrategy strategy);
+ }
+
+ /** The stage of the FleetUpdateStrategy definition allowing to specify ifMatch. */
+ interface WithIfMatch {
+ /**
+ * Specifies the ifMatch property: The request should only proceed if an entity matches this string..
+ *
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @return the next definition stage.
+ */
+ WithCreate withIfMatch(String ifMatch);
+ }
+
+ /** The stage of the FleetUpdateStrategy definition allowing to specify ifNoneMatch. */
+ interface WithIfNoneMatch {
+ /**
+ * Specifies the ifNoneMatch property: The request should only proceed if no entity matches this string..
+ *
+ * @param ifNoneMatch The request should only proceed if no entity matches this string.
+ * @return the next definition stage.
+ */
+ WithCreate withIfNoneMatch(String ifNoneMatch);
+ }
+ }
+
+ /**
+ * Begins update for the FleetUpdateStrategy resource.
+ *
+ * @return the stage of resource update.
+ */
+ FleetUpdateStrategy.Update update();
+
+ /** The template for FleetUpdateStrategy update. */
+ interface Update extends UpdateStages.WithStrategy, UpdateStages.WithIfMatch, UpdateStages.WithIfNoneMatch {
+ /**
+ * Executes the update request.
+ *
+ * @return the updated resource.
+ */
+ FleetUpdateStrategy apply();
+
+ /**
+ * Executes the update request.
+ *
+ * @param context The context to associate with this operation.
+ * @return the updated resource.
+ */
+ FleetUpdateStrategy apply(Context context);
+ }
+
+ /** The FleetUpdateStrategy update stages. */
+ interface UpdateStages {
+ /** The stage of the FleetUpdateStrategy update allowing to specify strategy. */
+ interface WithStrategy {
+ /**
+ * Specifies the strategy property: Defines the update sequence of the clusters..
+ *
+ * @param strategy Defines the update sequence of the clusters.
+ * @return the next definition stage.
+ */
+ Update withStrategy(UpdateRunStrategy strategy);
+ }
+
+ /** The stage of the FleetUpdateStrategy update allowing to specify ifMatch. */
+ interface WithIfMatch {
+ /**
+ * Specifies the ifMatch property: The request should only proceed if an entity matches this string..
+ *
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @return the next definition stage.
+ */
+ Update withIfMatch(String ifMatch);
+ }
+
+ /** The stage of the FleetUpdateStrategy update allowing to specify ifNoneMatch. */
+ interface WithIfNoneMatch {
+ /**
+ * Specifies the ifNoneMatch property: The request should only proceed if no entity matches this string..
+ *
+ * @param ifNoneMatch The request should only proceed if no entity matches this string.
+ * @return the next definition stage.
+ */
+ Update withIfNoneMatch(String ifNoneMatch);
+ }
+ }
+
+ /**
+ * Refreshes the resource to sync with Azure.
+ *
+ * @return the refreshed resource.
+ */
+ FleetUpdateStrategy refresh();
+
+ /**
+ * Refreshes the resource to sync with Azure.
+ *
+ * @param context The context to associate with this operation.
+ * @return the refreshed resource.
+ */
+ FleetUpdateStrategy refresh(Context context);
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategyListResult.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategyListResult.java
new file mode 100644
index 000000000000..4d98a9102439
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategyListResult.java
@@ -0,0 +1,89 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.containerservicefleet.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetUpdateStrategyInner;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** The response of a FleetUpdateStrategy list operation. */
+@Fluent
+public final class FleetUpdateStrategyListResult {
+ /*
+ * The FleetUpdateStrategy items on this page
+ */
+ @JsonProperty(value = "value", required = true)
+ private List value;
+
+ /*
+ * The link to the next page of items
+ */
+ @JsonProperty(value = "nextLink")
+ private String nextLink;
+
+ /** Creates an instance of FleetUpdateStrategyListResult class. */
+ public FleetUpdateStrategyListResult() {
+ }
+
+ /**
+ * Get the value property: The FleetUpdateStrategy items on this page.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Set the value property: The FleetUpdateStrategy items on this page.
+ *
+ * @param value the value value to set.
+ * @return the FleetUpdateStrategyListResult object itself.
+ */
+ public FleetUpdateStrategyListResult withValue(List value) {
+ this.value = value;
+ return this;
+ }
+
+ /**
+ * Get the nextLink property: The link to the next page of items.
+ *
+ * @return the nextLink value.
+ */
+ public String nextLink() {
+ return this.nextLink;
+ }
+
+ /**
+ * Set the nextLink property: The link to the next page of items.
+ *
+ * @param nextLink the nextLink value to set.
+ * @return the FleetUpdateStrategyListResult object itself.
+ */
+ public FleetUpdateStrategyListResult withNextLink(String nextLink) {
+ this.nextLink = nextLink;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (value() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property value in model FleetUpdateStrategyListResult"));
+ } else {
+ value().forEach(e -> e.validate());
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(FleetUpdateStrategyListResult.class);
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategyProvisioningState.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategyProvisioningState.java
new file mode 100644
index 000000000000..160854df88e7
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategyProvisioningState.java
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.containerservicefleet.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** The provisioning state of the UpdateStrategy resource. */
+public final class FleetUpdateStrategyProvisioningState
+ extends ExpandableStringEnum {
+ /** Static value Succeeded for FleetUpdateStrategyProvisioningState. */
+ public static final FleetUpdateStrategyProvisioningState SUCCEEDED = fromString("Succeeded");
+
+ /** Static value Failed for FleetUpdateStrategyProvisioningState. */
+ public static final FleetUpdateStrategyProvisioningState FAILED = fromString("Failed");
+
+ /** Static value Canceled for FleetUpdateStrategyProvisioningState. */
+ public static final FleetUpdateStrategyProvisioningState CANCELED = fromString("Canceled");
+
+ /**
+ * Creates a new instance of FleetUpdateStrategyProvisioningState value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public FleetUpdateStrategyProvisioningState() {
+ }
+
+ /**
+ * Creates or finds a FleetUpdateStrategyProvisioningState from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding FleetUpdateStrategyProvisioningState.
+ */
+ @JsonCreator
+ public static FleetUpdateStrategyProvisioningState fromString(String name) {
+ return fromString(name, FleetUpdateStrategyProvisioningState.class);
+ }
+
+ /**
+ * Gets known FleetUpdateStrategyProvisioningState values.
+ *
+ * @return known FleetUpdateStrategyProvisioningState values.
+ */
+ public static Collection values() {
+ return values(FleetUpdateStrategyProvisioningState.class);
+ }
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedClusterUpdate.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedClusterUpdate.java
index 50aeaa31f228..c720623b9d7a 100644
--- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedClusterUpdate.java
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedClusterUpdate.java
@@ -17,6 +17,12 @@ public final class ManagedClusterUpdate {
@JsonProperty(value = "upgrade", required = true)
private ManagedClusterUpgradeSpec upgrade;
+ /*
+ * The node image upgrade to be applied to the target nodes in update run.
+ */
+ @JsonProperty(value = "nodeImageSelection")
+ private NodeImageSelection nodeImageSelection;
+
/** Creates an instance of ManagedClusterUpdate class. */
public ManagedClusterUpdate() {
}
@@ -41,6 +47,26 @@ public ManagedClusterUpdate withUpgrade(ManagedClusterUpgradeSpec upgrade) {
return this;
}
+ /**
+ * Get the nodeImageSelection property: The node image upgrade to be applied to the target nodes in update run.
+ *
+ * @return the nodeImageSelection value.
+ */
+ public NodeImageSelection nodeImageSelection() {
+ return this.nodeImageSelection;
+ }
+
+ /**
+ * Set the nodeImageSelection property: The node image upgrade to be applied to the target nodes in update run.
+ *
+ * @param nodeImageSelection the nodeImageSelection value to set.
+ * @return the ManagedClusterUpdate object itself.
+ */
+ public ManagedClusterUpdate withNodeImageSelection(NodeImageSelection nodeImageSelection) {
+ this.nodeImageSelection = nodeImageSelection;
+ return this;
+ }
+
/**
* Validates the instance.
*
@@ -54,6 +80,9 @@ public void validate() {
} else {
upgrade().validate();
}
+ if (nodeImageSelection() != null) {
+ nodeImageSelection().validate();
+ }
}
private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterUpdate.class);
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedServiceIdentity.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedServiceIdentity.java
new file mode 100644
index 000000000000..ea8e5411345b
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedServiceIdentity.java
@@ -0,0 +1,143 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.containerservicefleet.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+import java.util.UUID;
+
+/** Managed service identity (system assigned and/or user assigned identities). */
+@Fluent
+public final class ManagedServiceIdentity {
+ /*
+ * The service principal ID of the system assigned identity. This property will only be provided for a system
+ * assigned identity.
+ */
+ @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY)
+ private UUID principalId;
+
+ /*
+ * The tenant ID of the system assigned identity. This property will only be provided for a system assigned
+ * identity.
+ */
+ @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY)
+ private UUID tenantId;
+
+ /*
+ * Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
+ */
+ @JsonProperty(value = "type", required = true)
+ private ManagedServiceIdentityType type;
+
+ /*
+ * The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys
+ * will be ARM resource ids in the form:
+ * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
+ * The dictionary values can be empty objects ({}) in requests.
+ */
+ @JsonProperty(value = "userAssignedIdentities")
+ @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
+ private Map userAssignedIdentities;
+
+ /** Creates an instance of ManagedServiceIdentity class. */
+ public ManagedServiceIdentity() {
+ }
+
+ /**
+ * Get the principalId property: The service principal ID of the system assigned identity. This property will only
+ * be provided for a system assigned identity.
+ *
+ * @return the principalId value.
+ */
+ public UUID principalId() {
+ return this.principalId;
+ }
+
+ /**
+ * Get the tenantId property: The tenant ID of the system assigned identity. This property will only be provided for
+ * a system assigned identity.
+ *
+ * @return the tenantId value.
+ */
+ public UUID tenantId() {
+ return this.tenantId;
+ }
+
+ /**
+ * Get the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are
+ * allowed).
+ *
+ * @return the type value.
+ */
+ public ManagedServiceIdentityType type() {
+ return this.type;
+ }
+
+ /**
+ * Set the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are
+ * allowed).
+ *
+ * @param type the type value to set.
+ * @return the ManagedServiceIdentity object itself.
+ */
+ public ManagedServiceIdentity withType(ManagedServiceIdentityType type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Get the userAssignedIdentities property: The set of user assigned identities associated with the resource. The
+ * userAssignedIdentities dictionary keys will be ARM resource ids in the form:
+ * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
+ * The dictionary values can be empty objects ({}) in requests.
+ *
+ * @return the userAssignedIdentities value.
+ */
+ public Map userAssignedIdentities() {
+ return this.userAssignedIdentities;
+ }
+
+ /**
+ * Set the userAssignedIdentities property: The set of user assigned identities associated with the resource. The
+ * userAssignedIdentities dictionary keys will be ARM resource ids in the form:
+ * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
+ * The dictionary values can be empty objects ({}) in requests.
+ *
+ * @param userAssignedIdentities the userAssignedIdentities value to set.
+ * @return the ManagedServiceIdentity object itself.
+ */
+ public ManagedServiceIdentity withUserAssignedIdentities(Map userAssignedIdentities) {
+ this.userAssignedIdentities = userAssignedIdentities;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (type() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property type in model ManagedServiceIdentity"));
+ }
+ if (userAssignedIdentities() != null) {
+ userAssignedIdentities()
+ .values()
+ .forEach(
+ e -> {
+ if (e != null) {
+ e.validate();
+ }
+ });
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ManagedServiceIdentity.class);
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedServiceIdentityType.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedServiceIdentityType.java
new file mode 100644
index 000000000000..6c8b5c0ececf
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedServiceIdentityType.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.containerservicefleet.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). */
+public final class ManagedServiceIdentityType extends ExpandableStringEnum {
+ /** Static value None for ManagedServiceIdentityType. */
+ public static final ManagedServiceIdentityType NONE = fromString("None");
+
+ /** Static value SystemAssigned for ManagedServiceIdentityType. */
+ public static final ManagedServiceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned");
+
+ /** Static value UserAssigned for ManagedServiceIdentityType. */
+ public static final ManagedServiceIdentityType USER_ASSIGNED = fromString("UserAssigned");
+
+ /** Static value SystemAssigned, UserAssigned for ManagedServiceIdentityType. */
+ public static final ManagedServiceIdentityType SYSTEM_ASSIGNED_USER_ASSIGNED =
+ fromString("SystemAssigned, UserAssigned");
+
+ /**
+ * Creates a new instance of ManagedServiceIdentityType value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public ManagedServiceIdentityType() {
+ }
+
+ /**
+ * Creates or finds a ManagedServiceIdentityType from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding ManagedServiceIdentityType.
+ */
+ @JsonCreator
+ public static ManagedServiceIdentityType fromString(String name) {
+ return fromString(name, ManagedServiceIdentityType.class);
+ }
+
+ /**
+ * Gets known ManagedServiceIdentityType values.
+ *
+ * @return known ManagedServiceIdentityType values.
+ */
+ public static Collection values() {
+ return values(ManagedServiceIdentityType.class);
+ }
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/MemberUpdateStatus.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/MemberUpdateStatus.java
index ac39d6959039..14dcfc32be3c 100644
--- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/MemberUpdateStatus.java
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/MemberUpdateStatus.java
@@ -34,6 +34,12 @@ public final class MemberUpdateStatus {
@JsonProperty(value = "operationId", access = JsonProperty.Access.WRITE_ONLY)
private String operationId;
+ /*
+ * The status message after processing the member update operation.
+ */
+ @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY)
+ private String message;
+
/** Creates an instance of MemberUpdateStatus class. */
public MemberUpdateStatus() {
}
@@ -74,6 +80,15 @@ public String operationId() {
return this.operationId;
}
+ /**
+ * Get the message property: The status message after processing the member update operation.
+ *
+ * @return the message value.
+ */
+ public String message() {
+ return this.message;
+ }
+
/**
* Validates the instance.
*
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageSelection.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageSelection.java
new file mode 100644
index 000000000000..1bd5f5b43521
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageSelection.java
@@ -0,0 +1,58 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.containerservicefleet.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The node image upgrade to be applied to the target nodes in update run. */
+@Fluent
+public final class NodeImageSelection {
+ /*
+ * The node image upgrade type.
+ */
+ @JsonProperty(value = "type", required = true)
+ private NodeImageSelectionType type;
+
+ /** Creates an instance of NodeImageSelection class. */
+ public NodeImageSelection() {
+ }
+
+ /**
+ * Get the type property: The node image upgrade type.
+ *
+ * @return the type value.
+ */
+ public NodeImageSelectionType type() {
+ return this.type;
+ }
+
+ /**
+ * Set the type property: The node image upgrade type.
+ *
+ * @param type the type value to set.
+ * @return the NodeImageSelection object itself.
+ */
+ public NodeImageSelection withType(NodeImageSelectionType type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (type() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property type in model NodeImageSelection"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(NodeImageSelection.class);
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageSelectionStatus.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageSelectionStatus.java
new file mode 100644
index 000000000000..99be24967dff
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageSelectionStatus.java
@@ -0,0 +1,43 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.containerservicefleet.models;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** The node image upgrade specs for the update run. */
+@Immutable
+public final class NodeImageSelectionStatus {
+ /*
+ * The image versions to upgrade the nodes to.
+ */
+ @JsonProperty(value = "selectedNodeImageVersions", access = JsonProperty.Access.WRITE_ONLY)
+ private List selectedNodeImageVersions;
+
+ /** Creates an instance of NodeImageSelectionStatus class. */
+ public NodeImageSelectionStatus() {
+ }
+
+ /**
+ * Get the selectedNodeImageVersions property: The image versions to upgrade the nodes to.
+ *
+ * @return the selectedNodeImageVersions value.
+ */
+ public List selectedNodeImageVersions() {
+ return this.selectedNodeImageVersions;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (selectedNodeImageVersions() != null) {
+ selectedNodeImageVersions().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageSelectionType.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageSelectionType.java
new file mode 100644
index 000000000000..36b051843e7d
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageSelectionType.java
@@ -0,0 +1,47 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.containerservicefleet.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** The node image upgrade type. */
+public final class NodeImageSelectionType extends ExpandableStringEnum {
+ /** Static value Latest for NodeImageSelectionType. */
+ public static final NodeImageSelectionType LATEST = fromString("Latest");
+
+ /** Static value Consistent for NodeImageSelectionType. */
+ public static final NodeImageSelectionType CONSISTENT = fromString("Consistent");
+
+ /**
+ * Creates a new instance of NodeImageSelectionType value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public NodeImageSelectionType() {
+ }
+
+ /**
+ * Creates or finds a NodeImageSelectionType from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding NodeImageSelectionType.
+ */
+ @JsonCreator
+ public static NodeImageSelectionType fromString(String name) {
+ return fromString(name, NodeImageSelectionType.class);
+ }
+
+ /**
+ * Gets known NodeImageSelectionType values.
+ *
+ * @return known NodeImageSelectionType values.
+ */
+ public static Collection values() {
+ return values(NodeImageSelectionType.class);
+ }
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageVersion.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageVersion.java
new file mode 100644
index 000000000000..ba7d55c932b3
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageVersion.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.containerservicefleet.models;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The node upgrade image version. */
+@Immutable
+public final class NodeImageVersion {
+ /*
+ * The image version to upgrade the nodes to (e.g., 'AKSUbuntu-1804gen2containerd-2022.12.13').
+ */
+ @JsonProperty(value = "version", access = JsonProperty.Access.WRITE_ONLY)
+ private String version;
+
+ /** Creates an instance of NodeImageVersion class. */
+ public NodeImageVersion() {
+ }
+
+ /**
+ * Get the version property: The image version to upgrade the nodes to (e.g.,
+ * 'AKSUbuntu-1804gen2containerd-2022.12.13').
+ *
+ * @return the version value.
+ */
+ public String version() {
+ return this.version;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateGroup.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateGroup.java
index 7e4d18ad9b3f..2e8d4a747970 100644
--- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateGroup.java
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateGroup.java
@@ -12,9 +12,8 @@
@Fluent
public final class UpdateGroup {
/*
- * The name of the Fleet member group to update.
- * It should match the name of an existing FleetMember group.
- * A group can only appear once across all UpdateStages in the UpdateRun.
+ * Name of the group.
+ * It must match a group name of an existing fleet member.
*/
@JsonProperty(value = "name", required = true)
private String name;
@@ -24,8 +23,7 @@ public UpdateGroup() {
}
/**
- * Get the name property: The name of the Fleet member group to update. It should match the name of an existing
- * FleetMember group. A group can only appear once across all UpdateStages in the UpdateRun.
+ * Get the name property: Name of the group. It must match a group name of an existing fleet member.
*
* @return the name value.
*/
@@ -34,8 +32,7 @@ public String name() {
}
/**
- * Set the name property: The name of the Fleet member group to update. It should match the name of an existing
- * FleetMember group. A group can only appear once across all UpdateStages in the UpdateRun.
+ * Set the name property: Name of the group. It must match a group name of an existing fleet member.
*
* @param name the name value to set.
* @return the UpdateGroup object itself.
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRun.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRun.java
index 98b10bf2d212..f884d5a1d9e9 100644
--- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRun.java
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRun.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.containerservicefleet.models;
-import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.containerservicefleet.fluent.models.UpdateRunInner;
@@ -42,18 +41,29 @@ public interface UpdateRun {
String etag();
/**
- * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ * Gets the provisioningState property: The provisioning state of the UpdateRun resource.
*
- * @return the systemData value.
+ * @return the provisioningState value.
*/
- SystemData systemData();
+ UpdateRunProvisioningState provisioningState();
/**
- * Gets the provisioningState property: The provisioning state of the UpdateRun resource.
+ * Gets the updateStrategyId property: The resource id of the FleetUpdateStrategy resource to reference.
*
- * @return the provisioningState value.
+ * When creating a new run, there are three ways to define a strategy for the run: 1. Define a new strategy in
+ * place: Set the "strategy" field. 2. Use an existing strategy: Set the "updateStrategyId" field. (since
+ * 2023-08-15-preview) 3. Use the default strategy to update all the members one by one: Leave both
+ * "updateStrategyId" and "strategy" unset. (since 2023-08-15-preview)
+ *
+ *
Setting both "updateStrategyId" and "strategy" is invalid.
+ *
+ *
UpdateRuns created by "updateStrategyId" snapshot the referenced UpdateStrategy at the time of creation and
+ * store it in the "strategy" field. Subsequent changes to the referenced FleetUpdateStrategy resource do not
+ * propagate. UpdateRunStrategy changes can be made directly on the "strategy" field before launching the UpdateRun.
+ *
+ * @return the updateStrategyId value.
*/
- UpdateRunProvisioningState provisioningState();
+ String updateStrategyId();
/**
* Gets the strategy property: The strategy defines the order in which the clusters will be updated. If not set, all
@@ -97,11 +107,13 @@ public interface UpdateRun {
interface Definition
extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate {
}
+
/** The UpdateRun definition stages. */
interface DefinitionStages {
/** The first stage of the UpdateRun definition. */
interface Blank extends WithParentResource {
}
+
/** The stage of the UpdateRun definition allowing to specify parent resource. */
interface WithParentResource {
/**
@@ -113,12 +125,14 @@ interface WithParentResource {
*/
WithCreate withExistingFleet(String resourceGroupName, String fleetName);
}
+
/**
* The stage of the UpdateRun definition which contains all the minimum required properties for the resource to
* be created, but also allows for any other optional properties to be specified.
*/
interface WithCreate
- extends DefinitionStages.WithStrategy,
+ extends DefinitionStages.WithUpdateStrategyId,
+ DefinitionStages.WithStrategy,
DefinitionStages.WithManagedClusterUpdate,
DefinitionStages.WithIfMatch,
DefinitionStages.WithIfNoneMatch {
@@ -137,6 +151,40 @@ interface WithCreate
*/
UpdateRun create(Context context);
}
+
+ /** The stage of the UpdateRun definition allowing to specify updateStrategyId. */
+ interface WithUpdateStrategyId {
+ /**
+ * Specifies the updateStrategyId property: The resource id of the FleetUpdateStrategy resource to
+ * reference.
+ *
+ *
When creating a new run, there are three ways to define a strategy for the run: 1. Define a new
+ * strategy in place: Set the "strategy" field. 2. Use an existing strategy: Set the "updateStrategyId"
+ * field. (since 2023-08-15-preview) 3. Use the default strategy to update all the members one by one: Leave
+ * both "updateStrategyId" and "strategy" unset. (since 2023-08-15-preview)
+ *
+ *
Setting both "updateStrategyId" and "strategy" is invalid.
+ *
+ *
UpdateRuns created by "updateStrategyId" snapshot the referenced UpdateStrategy at the time of
+ * creation and store it in the "strategy" field. Subsequent changes to the referenced FleetUpdateStrategy
+ * resource do not propagate. UpdateRunStrategy changes can be made directly on the "strategy" field before
+ * launching the UpdateRun..
+ *
+ * @param updateStrategyId The resource id of the FleetUpdateStrategy resource to reference.
+ *
When creating a new run, there are three ways to define a strategy for the run: 1. Define a new
+ * strategy in place: Set the "strategy" field. 2. Use an existing strategy: Set the "updateStrategyId"
+ * field. (since 2023-08-15-preview) 3. Use the default strategy to update all the members one by one:
+ * Leave both "updateStrategyId" and "strategy" unset. (since 2023-08-15-preview)
+ *
Setting both "updateStrategyId" and "strategy" is invalid.
+ *
UpdateRuns created by "updateStrategyId" snapshot the referenced UpdateStrategy at the time of
+ * creation and store it in the "strategy" field. Subsequent changes to the referenced
+ * FleetUpdateStrategy resource do not propagate. UpdateRunStrategy changes can be made directly on the
+ * "strategy" field before launching the UpdateRun.
+ * @return the next definition stage.
+ */
+ WithCreate withUpdateStrategyId(String updateStrategyId);
+ }
+
/** The stage of the UpdateRun definition allowing to specify strategy. */
interface WithStrategy {
/**
@@ -153,6 +201,7 @@ interface WithStrategy {
*/
WithCreate withStrategy(UpdateRunStrategy strategy);
}
+
/** The stage of the UpdateRun definition allowing to specify managedClusterUpdate. */
interface WithManagedClusterUpdate {
/**
@@ -165,6 +214,7 @@ interface WithManagedClusterUpdate {
*/
WithCreate withManagedClusterUpdate(ManagedClusterUpdate managedClusterUpdate);
}
+
/** The stage of the UpdateRun definition allowing to specify ifMatch. */
interface WithIfMatch {
/**
@@ -175,6 +225,7 @@ interface WithIfMatch {
*/
WithCreate withIfMatch(String ifMatch);
}
+
/** The stage of the UpdateRun definition allowing to specify ifNoneMatch. */
interface WithIfNoneMatch {
/**
@@ -186,6 +237,7 @@ interface WithIfNoneMatch {
WithCreate withIfNoneMatch(String ifNoneMatch);
}
}
+
/**
* Begins update for the UpdateRun resource.
*
@@ -195,7 +247,8 @@ interface WithIfNoneMatch {
/** The template for UpdateRun update. */
interface Update
- extends UpdateStages.WithStrategy,
+ extends UpdateStages.WithUpdateStrategyId,
+ UpdateStages.WithStrategy,
UpdateStages.WithManagedClusterUpdate,
UpdateStages.WithIfMatch,
UpdateStages.WithIfNoneMatch {
@@ -214,8 +267,42 @@ interface Update
*/
UpdateRun apply(Context context);
}
+
/** The UpdateRun update stages. */
interface UpdateStages {
+ /** The stage of the UpdateRun update allowing to specify updateStrategyId. */
+ interface WithUpdateStrategyId {
+ /**
+ * Specifies the updateStrategyId property: The resource id of the FleetUpdateStrategy resource to
+ * reference.
+ *
+ *
When creating a new run, there are three ways to define a strategy for the run: 1. Define a new
+ * strategy in place: Set the "strategy" field. 2. Use an existing strategy: Set the "updateStrategyId"
+ * field. (since 2023-08-15-preview) 3. Use the default strategy to update all the members one by one: Leave
+ * both "updateStrategyId" and "strategy" unset. (since 2023-08-15-preview)
+ *
+ *
Setting both "updateStrategyId" and "strategy" is invalid.
+ *
+ *
UpdateRuns created by "updateStrategyId" snapshot the referenced UpdateStrategy at the time of
+ * creation and store it in the "strategy" field. Subsequent changes to the referenced FleetUpdateStrategy
+ * resource do not propagate. UpdateRunStrategy changes can be made directly on the "strategy" field before
+ * launching the UpdateRun..
+ *
+ * @param updateStrategyId The resource id of the FleetUpdateStrategy resource to reference.
+ *
When creating a new run, there are three ways to define a strategy for the run: 1. Define a new
+ * strategy in place: Set the "strategy" field. 2. Use an existing strategy: Set the "updateStrategyId"
+ * field. (since 2023-08-15-preview) 3. Use the default strategy to update all the members one by one:
+ * Leave both "updateStrategyId" and "strategy" unset. (since 2023-08-15-preview)
+ *
Setting both "updateStrategyId" and "strategy" is invalid.
+ *
UpdateRuns created by "updateStrategyId" snapshot the referenced UpdateStrategy at the time of
+ * creation and store it in the "strategy" field. Subsequent changes to the referenced
+ * FleetUpdateStrategy resource do not propagate. UpdateRunStrategy changes can be made directly on the
+ * "strategy" field before launching the UpdateRun.
+ * @return the next definition stage.
+ */
+ Update withUpdateStrategyId(String updateStrategyId);
+ }
+
/** The stage of the UpdateRun update allowing to specify strategy. */
interface WithStrategy {
/**
@@ -232,6 +319,7 @@ interface WithStrategy {
*/
Update withStrategy(UpdateRunStrategy strategy);
}
+
/** The stage of the UpdateRun update allowing to specify managedClusterUpdate. */
interface WithManagedClusterUpdate {
/**
@@ -244,6 +332,7 @@ interface WithManagedClusterUpdate {
*/
Update withManagedClusterUpdate(ManagedClusterUpdate managedClusterUpdate);
}
+
/** The stage of the UpdateRun update allowing to specify ifMatch. */
interface WithIfMatch {
/**
@@ -254,6 +343,7 @@ interface WithIfMatch {
*/
Update withIfMatch(String ifMatch);
}
+
/** The stage of the UpdateRun update allowing to specify ifNoneMatch. */
interface WithIfNoneMatch {
/**
@@ -265,6 +355,7 @@ interface WithIfNoneMatch {
Update withIfNoneMatch(String ifNoneMatch);
}
}
+
/**
* Refreshes the resource to sync with Azure.
*
@@ -285,7 +376,7 @@ interface WithIfNoneMatch {
*
* @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 an UpdateRun is a multi-stage process to perform update operations across members of a Fleet.
+ * @return a multi-stage process to perform update operations across members of a Fleet.
*/
UpdateRun start();
@@ -297,7 +388,7 @@ interface WithIfNoneMatch {
* @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 an UpdateRun is a multi-stage process to perform update operations across members of a Fleet.
+ * @return a multi-stage process to perform update operations across members of a Fleet.
*/
UpdateRun start(String ifMatch, Context context);
@@ -306,7 +397,7 @@ interface WithIfNoneMatch {
*
* @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 an UpdateRun is a multi-stage process to perform update operations across members of a Fleet.
+ * @return a multi-stage process to perform update operations across members of a Fleet.
*/
UpdateRun stop();
@@ -318,7 +409,7 @@ interface WithIfNoneMatch {
* @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 an UpdateRun is a multi-stage process to perform update operations across members of a Fleet.
+ * @return a multi-stage process to perform update operations across members of a Fleet.
*/
UpdateRun stop(String ifMatch, Context context);
}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunStatus.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunStatus.java
index 4a27c8860ebb..cee4a783e7b8 100644
--- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunStatus.java
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunStatus.java
@@ -23,6 +23,13 @@ public final class UpdateRunStatus {
@JsonProperty(value = "stages", access = JsonProperty.Access.WRITE_ONLY)
private List stages;
+ /*
+ * The node image upgrade specs for the update run. It is only set in update run when `NodeImageSelection.type` is
+ * `Consistent`.
+ */
+ @JsonProperty(value = "nodeImageSelection", access = JsonProperty.Access.WRITE_ONLY)
+ private NodeImageSelectionStatus nodeImageSelection;
+
/** Creates an instance of UpdateRunStatus class. */
public UpdateRunStatus() {
}
@@ -45,6 +52,16 @@ public List stages() {
return this.stages;
}
+ /**
+ * Get the nodeImageSelection property: The node image upgrade specs for the update run. It is only set in update
+ * run when `NodeImageSelection.type` is `Consistent`.
+ *
+ * @return the nodeImageSelection value.
+ */
+ public NodeImageSelectionStatus nodeImageSelection() {
+ return this.nodeImageSelection;
+ }
+
/**
* Validates the instance.
*
@@ -57,5 +74,8 @@ public void validate() {
if (stages() != null) {
stages().forEach(e -> e.validate());
}
+ if (nodeImageSelection() != null) {
+ nodeImageSelection().validate();
+ }
}
}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunStrategy.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunStrategy.java
index e421d43301af..1ef2c287bf34 100644
--- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunStrategy.java
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunStrategy.java
@@ -9,11 +9,18 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
-/** The UpdateRunStrategy configures the sequence of Stages and Groups in which the clusters will be updated. */
+/**
+ * Defines the update sequence of the clusters via stages and groups.
+ *
+ * Stages within a run are executed sequentially one after another. Groups within a stage are executed in parallel.
+ * Member clusters within a group are updated sequentially one after another.
+ *
+ *
A valid strategy contains no duplicate groups within or across stages.
+ */
@Fluent
public final class UpdateRunStrategy {
/*
- * The list of stages that compose this update run.
+ * The list of stages that compose this update run. Min size: 1.
*/
@JsonProperty(value = "stages", required = true)
private List stages;
@@ -23,7 +30,7 @@ public UpdateRunStrategy() {
}
/**
- * Get the stages property: The list of stages that compose this update run.
+ * Get the stages property: The list of stages that compose this update run. Min size: 1.
*
* @return the stages value.
*/
@@ -32,7 +39,7 @@ public List stages() {
}
/**
- * Set the stages property: The list of stages that compose this update run.
+ * Set the stages property: The list of stages that compose this update run. Min size: 1.
*
* @param stages the stages value to set.
* @return the UpdateRunStrategy object itself.
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRuns.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRuns.java
index 7e20b85918aa..5b2a8ce71315 100644
--- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRuns.java
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRuns.java
@@ -98,7 +98,7 @@ Response getWithResponse(
* @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 an UpdateRun is a multi-stage process to perform update operations across members of a Fleet.
+ * @return a multi-stage process to perform update operations across members of a Fleet.
*/
UpdateRun start(String resourceGroupName, String fleetName, String updateRunName);
@@ -113,7 +113,7 @@ Response getWithResponse(
* @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 an UpdateRun is a multi-stage process to perform update operations across members of a Fleet.
+ * @return a multi-stage process to perform update operations across members of a Fleet.
*/
UpdateRun start(String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context);
@@ -126,7 +126,7 @@ Response getWithResponse(
* @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 an UpdateRun is a multi-stage process to perform update operations across members of a Fleet.
+ * @return a multi-stage process to perform update operations across members of a Fleet.
*/
UpdateRun stop(String resourceGroupName, String fleetName, String updateRunName);
@@ -141,7 +141,7 @@ Response getWithResponse(
* @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 an UpdateRun is a multi-stage process to perform update operations across members of a Fleet.
+ * @return a multi-stage process to perform update operations across members of a Fleet.
*/
UpdateRun stop(String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context);
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateStage.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateStage.java
index 0f40baa100a6..33c74cd98287 100644
--- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateStage.java
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateStage.java
@@ -10,9 +10,8 @@
import java.util.List;
/**
- * Contains the groups to be updated by an UpdateRun. Update order: - Sequential between stages: Stages run
- * sequentially. The previous stage must complete before the next one starts. - Parallel within a stage: Groups within a
- * stage run in parallel. - Sequential within a group: Clusters within a group are updated sequentially.
+ * Defines a stage which contains the groups to update and the steps to take (e.g., wait for a time period) before
+ * starting the next stage.
*/
@Fluent
public final class UpdateStage {
@@ -23,8 +22,7 @@ public final class UpdateStage {
private String name;
/*
- * A list of group names that compose the stage.
- * The groups will be updated in parallel. Each group name can only appear once in the UpdateRun.
+ * Defines the groups to be executed in parallel in this stage. Duplicate groups are not allowed. Min size: 1.
*/
@JsonProperty(value = "groups")
private List groups;
@@ -61,8 +59,8 @@ public UpdateStage withName(String name) {
}
/**
- * Get the groups property: A list of group names that compose the stage. The groups will be updated in parallel.
- * Each group name can only appear once in the UpdateRun.
+ * Get the groups property: Defines the groups to be executed in parallel in this stage. Duplicate groups are not
+ * allowed. Min size: 1.
*
* @return the groups value.
*/
@@ -71,8 +69,8 @@ public List groups() {
}
/**
- * Set the groups property: A list of group names that compose the stage. The groups will be updated in parallel.
- * Each group name can only appear once in the UpdateRun.
+ * Set the groups property: Defines the groups to be executed in parallel in this stage. Duplicate groups are not
+ * allowed. Min size: 1.
*
* @param groups the groups value to set.
* @return the UpdateStage object itself.
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateState.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateState.java
index 36e514a8a3c5..b5ad2b403422 100644
--- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateState.java
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateState.java
@@ -22,6 +22,9 @@ public final class UpdateState extends ExpandableStringEnum {
/** Static value Stopped for UpdateState. */
public static final UpdateState STOPPED = fromString("Stopped");
+ /** Static value Skipped for UpdateState. */
+ public static final UpdateState SKIPPED = fromString("Skipped");
+
/** Static value Failed for UpdateState. */
public static final UpdateState FAILED = fromString("Failed");
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UserAssignedIdentity.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UserAssignedIdentity.java
new file mode 100644
index 000000000000..a85b9c11535f
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UserAssignedIdentity.java
@@ -0,0 +1,55 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.containerservicefleet.models;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.UUID;
+
+/** User assigned identity properties. */
+@Immutable
+public final class UserAssignedIdentity {
+ /*
+ * The principal ID of the assigned identity.
+ */
+ @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY)
+ private UUID principalId;
+
+ /*
+ * The client ID of the assigned identity.
+ */
+ @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY)
+ private UUID clientId;
+
+ /** Creates an instance of UserAssignedIdentity class. */
+ public UserAssignedIdentity() {
+ }
+
+ /**
+ * Get the principalId property: The principal ID of the assigned identity.
+ *
+ * @return the principalId value.
+ */
+ public UUID principalId() {
+ return this.principalId;
+ }
+
+ /**
+ * Get the clientId property: The client ID of the assigned identity.
+ *
+ * @return the clientId value.
+ */
+ public UUID clientId() {
+ return this.clientId;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersCreateSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersCreateSamples.java
index 4cd1dd9dd177..355ff392a4f7 100644
--- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersCreateSamples.java
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersCreateSamples.java
@@ -7,7 +7,7 @@
/** Samples for FleetMembers Create. */
public final class FleetMembersCreateSamples {
/*
- * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/FleetMembers_Create.json
+ * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-08-15-preview/examples/FleetMembers_Create.json
*/
/**
* Sample code: Creates a FleetMember resource with a long running operation.
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersDeleteSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersDeleteSamples.java
index 06b3c7d148d1..d678e1403348 100644
--- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersDeleteSamples.java
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersDeleteSamples.java
@@ -7,7 +7,7 @@
/** Samples for FleetMembers Delete. */
public final class FleetMembersDeleteSamples {
/*
- * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/FleetMembers_Delete.json
+ * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-08-15-preview/examples/FleetMembers_Delete.json
*/
/**
* Sample code: Deletes a FleetMember resource asynchronously with a long running operation.
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersGetSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersGetSamples.java
index 78368062b879..9ccf9eea319d 100644
--- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersGetSamples.java
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersGetSamples.java
@@ -7,7 +7,7 @@
/** Samples for FleetMembers Get. */
public final class FleetMembersGetSamples {
/*
- * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/FleetMembers_Get.json
+ * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-08-15-preview/examples/FleetMembers_Get.json
*/
/**
* Sample code: Gets a FleetMember resource.
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersListByFleetSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersListByFleetSamples.java
index 31e8867aa21c..8337aee6af02 100644
--- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersListByFleetSamples.java
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersListByFleetSamples.java
@@ -7,7 +7,7 @@
/** Samples for FleetMembers ListByFleet. */
public final class FleetMembersListByFleetSamples {
/*
- * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/FleetMembers_ListByFleet.json
+ * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-08-15-preview/examples/FleetMembers_ListByFleet.json
*/
/**
* Sample code: Lists the members of a Fleet.
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersUpdateSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersUpdateSamples.java
index f5aacfc5fa00..708134055f8c 100644
--- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersUpdateSamples.java
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersUpdateSamples.java
@@ -9,7 +9,7 @@
/** Samples for FleetMembers Update. */
public final class FleetMembersUpdateSamples {
/*
- * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/FleetMembers_Update.json
+ * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-08-15-preview/examples/FleetMembers_Update.json
*/
/**
* Sample code: Updates a FleetMember resource synchronously.
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesCreateOrUpdateSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesCreateOrUpdateSamples.java
new file mode 100644
index 000000000000..73b55d7e636e
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesCreateOrUpdateSamples.java
@@ -0,0 +1,39 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.containerservicefleet.generated;
+
+import com.azure.resourcemanager.containerservicefleet.models.UpdateGroup;
+import com.azure.resourcemanager.containerservicefleet.models.UpdateRunStrategy;
+import com.azure.resourcemanager.containerservicefleet.models.UpdateStage;
+import java.util.Arrays;
+
+/** Samples for FleetUpdateStrategies CreateOrUpdate. */
+public final class FleetUpdateStrategiesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-08-15-preview/examples/UpdateStrategies_CreateOrUpdate.json
+ */
+ /**
+ * Sample code: Create a FleetUpdateStrategy.
+ *
+ * @param manager Entry point to ContainerServiceFleetManager.
+ */
+ public static void createAFleetUpdateStrategy(
+ com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) {
+ manager
+ .fleetUpdateStrategies()
+ .define("strartegy1")
+ .withExistingFleet("rg1", "fleet1")
+ .withStrategy(
+ new UpdateRunStrategy()
+ .withStages(
+ Arrays
+ .asList(
+ new UpdateStage()
+ .withName("stage1")
+ .withGroups(Arrays.asList(new UpdateGroup().withName("group-a")))
+ .withAfterStageWaitInSeconds(3600))))
+ .create();
+ }
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesDeleteSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesDeleteSamples.java
new file mode 100644
index 000000000000..d6f6ba13d3f7
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesDeleteSamples.java
@@ -0,0 +1,21 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.containerservicefleet.generated;
+
+/** Samples for FleetUpdateStrategies Delete. */
+public final class FleetUpdateStrategiesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-08-15-preview/examples/UpdateStrategies_Delete.json
+ */
+ /**
+ * Sample code: Delete a FleetUpdateStrategy resource.
+ *
+ * @param manager Entry point to ContainerServiceFleetManager.
+ */
+ public static void deleteAFleetUpdateStrategyResource(
+ com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) {
+ manager.fleetUpdateStrategies().delete("rg1", "fleet1", "strategy1", null, com.azure.core.util.Context.NONE);
+ }
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesGetSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesGetSamples.java
new file mode 100644
index 000000000000..a15f915fa02d
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesGetSamples.java
@@ -0,0 +1,21 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.containerservicefleet.generated;
+
+/** Samples for FleetUpdateStrategies Get. */
+public final class FleetUpdateStrategiesGetSamples {
+ /*
+ * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-08-15-preview/examples/UpdateStrategies_Get.json
+ */
+ /**
+ * Sample code: Get a FleetUpdateStrategy resource.
+ *
+ * @param manager Entry point to ContainerServiceFleetManager.
+ */
+ public static void getAFleetUpdateStrategyResource(
+ com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) {
+ manager.fleetUpdateStrategies().getWithResponse("rg1", "fleet1", "strategy1", com.azure.core.util.Context.NONE);
+ }
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesListByFleetSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesListByFleetSamples.java
new file mode 100644
index 000000000000..c88d18956150
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesListByFleetSamples.java
@@ -0,0 +1,21 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.containerservicefleet.generated;
+
+/** Samples for FleetUpdateStrategies ListByFleet. */
+public final class FleetUpdateStrategiesListByFleetSamples {
+ /*
+ * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-08-15-preview/examples/UpdateStrategies_ListByFleet.json
+ */
+ /**
+ * Sample code: List the FleetUpdateStrategy resources by fleet.
+ *
+ * @param manager Entry point to ContainerServiceFleetManager.
+ */
+ public static void listTheFleetUpdateStrategyResourcesByFleet(
+ com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) {
+ manager.fleetUpdateStrategies().listByFleet("rg1", "fleet1", com.azure.core.util.Context.NONE);
+ }
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsCreateOrUpdateSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsCreateOrUpdateSamples.java
index e7c6cf562b6b..220bbf535b75 100644
--- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsCreateOrUpdateSamples.java
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsCreateOrUpdateSamples.java
@@ -11,7 +11,7 @@
/** Samples for Fleets CreateOrUpdate. */
public final class FleetsCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_CreateOrUpdate.json
+ * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-08-15-preview/examples/Fleets_CreateOrUpdate.json
*/
/**
* Sample code: Creates a Fleet resource with a long running operation.
@@ -30,6 +30,7 @@ public static void createsAFleetResourceWithALongRunningOperation(
.create();
}
+ // Use "Map.of" if available
@SuppressWarnings("unchecked")
private static Map mapOf(Object... inputs) {
Map map = new HashMap<>();
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsDeleteSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsDeleteSamples.java
index f239aa84d589..52aeb1855f2b 100644
--- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsDeleteSamples.java
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsDeleteSamples.java
@@ -7,7 +7,7 @@
/** Samples for Fleets Delete. */
public final class FleetsDeleteSamples {
/*
- * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_Delete.json
+ * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-08-15-preview/examples/Fleets_Delete.json
*/
/**
* Sample code: Deletes a Fleet resource asynchronously with a long running operation.
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsGetByResourceGroupSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsGetByResourceGroupSamples.java
index b5c13a06033a..e666acd3f869 100644
--- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsGetByResourceGroupSamples.java
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsGetByResourceGroupSamples.java
@@ -7,7 +7,7 @@
/** Samples for Fleets GetByResourceGroup. */
public final class FleetsGetByResourceGroupSamples {
/*
- * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_Get.json
+ * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-08-15-preview/examples/Fleets_Get.json
*/
/**
* Sample code: Gets a Fleet resource.
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListByResourceGroupSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListByResourceGroupSamples.java
index a189cc22b9f0..704ea45c8f3d 100644
--- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListByResourceGroupSamples.java
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListByResourceGroupSamples.java
@@ -7,7 +7,7 @@
/** Samples for Fleets ListByResourceGroup. */
public final class FleetsListByResourceGroupSamples {
/*
- * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_ListByResourceGroup.json
+ * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-08-15-preview/examples/Fleets_ListByResourceGroup.json
*/
/**
* Sample code: Lists the Fleet resources in a resource group.
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListCredentialsSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListCredentialsSamples.java
index 451da254b650..0f5b966f71d5 100644
--- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListCredentialsSamples.java
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListCredentialsSamples.java
@@ -7,7 +7,7 @@
/** Samples for Fleets ListCredentials. */
public final class FleetsListCredentialsSamples {
/*
- * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_ListCredentialsResult.json
+ * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-08-15-preview/examples/Fleets_ListCredentialsResult.json
*/
/**
* Sample code: Lists the user credentials of a Fleet.
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListSamples.java
index f823b805c039..521a862565d8 100644
--- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListSamples.java
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListSamples.java
@@ -7,7 +7,7 @@
/** Samples for Fleets List. */
public final class FleetsListSamples {
/*
- * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_ListBySub.json
+ * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-08-15-preview/examples/Fleets_ListBySub.json
*/
/**
* Sample code: Lists the Fleet resources in a subscription.
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsUpdateSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsUpdateSamples.java
index 34e247053b16..7ee152bc232d 100644
--- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsUpdateSamples.java
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsUpdateSamples.java
@@ -11,7 +11,7 @@
/** Samples for Fleets Update. */
public final class FleetsUpdateSamples {
/*
- * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_PatchTags.json
+ * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-08-15-preview/examples/Fleets_PatchTags.json
*/
/**
* Sample code: Update a Fleet.
@@ -28,6 +28,7 @@ public static void updateAFleet(
resource.update().withTags(mapOf("env", "prod", "tier", "secure")).withIfMatch("dfjkwelr7384").apply();
}
+ // Use "Map.of" if available
@SuppressWarnings("unchecked")
private static