diff --git a/specification/containerservice/Fleet.Management/gate.tsp b/specification/containerservice/Fleet.Management/gate.tsp new file mode 100644 index 000000000000..e0c0fb47e5a6 --- /dev/null +++ b/specification/containerservice/Fleet.Management/gate.tsp @@ -0,0 +1,182 @@ +import "@typespec/rest"; +import "./helpers.tsp"; + +using TypeSpec.Http; +using TypeSpec.Rest; +using TypeSpec.Versioning; +using Azure.Core; +using Azure.ResourceManager; +using TypeSpec.OpenAPI; + +namespace Microsoft.ContainerService; + +@doc("A Gate controls the progression during a staged rollout, e.g. in an Update Run.") +@added(Versions.v2025_04_01_preview) +@resource("gate") +@parentResource(Fleet) +model Gate is ProxyResource { + @doc("The name of the Gate resource, a GUID.") + @pattern("^[0-9a-f]{8}[-][0-9a-f]{4}[-][0-9a-f]{4}[-][0-9a-f]{4}[-][0-9a-f]{12}$") + @minLength(36) + @maxLength(36) + @key("gateName") + @path + @segment("gates") + @visibility(Lifecycle.Read) + name: string; + + ...EntityTagProperty; +} + +@doc("The type of the Gate determines how it is completed.") +@added(Versions.v2025_04_01_preview) +union GateType { + string, + + @doc("An Approval Gate is completed by patching its status.") + Approval: "Approval", +} + +@doc("The state of the Gate.") +@added(Versions.v2025_04_01_preview) +union GateState { + string, + + @doc("A Pending Gate will continue to block the staged rollout process it is controlling.") + Pending: "Pending", + + @doc("An Completed Gate allows the staged rollout process to continue.") + Completed: "Completed", +} + +@doc("A Gate controls the progression during a staged rollout, e.g. in an Update Run.") +@added(Versions.v2025_04_01_preview) +model GateProperties { + // adding a response header in the model currently impacts the model used in the List result model. + // omitting it for now as response headers do not impact SDK generation. + // ...EtagResponseEnvelope; + + @doc("The provisioning state of the Gate resource.") + @visibility(Lifecycle.Read) + provisioningState?: GateProvisioningState; + + @doc("The human-readable display name of the Gate.") + @visibility(Lifecycle.Create, Lifecycle.Read) + @pattern("^[A-Za-z0-9].*$") + @minLength(1) + @maxLength(100) + displayName: string; + + @doc("The target that the Gate is controlling, e.g. an Update Run.") + @visibility(Lifecycle.Create, Lifecycle.Read) + target: GateTarget; + + @doc("The type of the Gate determines how it is completed.") + @visibility(Lifecycle.Create, Lifecycle.Read) + gateType: GateType; + + @doc("The status of the Gate.") + @visibility(Lifecycle.Create, Lifecycle.Update, Lifecycle.Read) + status: GateState; +} + +@doc("The type of staged rollout that the Gate is targeting.") +@added(Versions.v2025_04_01_preview) +union GateTargetType { + @doc("The Gate is controlling the staged rollout of an Update Run.") + updateRun: UpdateRunGateTargetType, +} + +@doc("Whether the Gate is placed before or after the target.") +@added(Versions.v2025_04_01_preview) +union BeforeOrAfter { + string, + + @doc("The Gate is before the target.") + Before: "Before", + + @doc("The Gate is after the target.") + After: "After", +} + +@doc("The Gate is targeting an Update Run staged rollout.") +@added(Versions.v2025_04_01_preview) +model UpdateRunGateTargetType { + @doc("The name of the Update Run.") + @visibility(Lifecycle.Read) + @pattern("^[a-z0-9]([-a-z0-9]*[a-z0-9])?$") + @minLength(1) + @maxLength(50) + name: string; + + @doc("The Update Stage of the Update Run.") + @visibility(Lifecycle.Read) + @pattern("^[a-z0-9]([-a-z0-9]*[a-z0-9])?$") + @minLength(1) + @maxLength(50) + stage: string; + + @doc("The Update Group of the Update Run.") + @visibility(Lifecycle.Read) + @pattern("^[a-z0-9]([-a-z0-9]*[a-z0-9])?$") + @minLength(1) + @maxLength(50) + group?: string; + + @doc("Whether the Gate is placed before or after the update itself.") + @visibility(Lifecycle.Create, Lifecycle.Read) + beforeOrAfter: BeforeOrAfter; +} + +scalar UpdateRunResourceId + extends Azure.Core.armResourceIdentifier<[ + { + type: "Microsoft.ContainerService/fleets/updateRuns", + } + ]>; + +@doc("The resource id of staged rollout that the Gate is targeting.") +@added(Versions.v2025_04_01_preview) +union GateTargetId { + @doc("The Gate is controlling the staged rollout of an Update Run.") + updateRun: UpdateRunResourceId, +} + +@doc("The target that the Gate is controlling, e.g. an Update Run.") +@added(Versions.v2025_04_01_preview) +model GateTarget { + @doc("The status of the Gate.") + @visibility(Lifecycle.Create, Lifecycle.Read) + id: GateTargetId; + + @doc("The status of the Gate.") + @visibility(Lifecycle.Create, Lifecycle.Read) + type: GateTargetType; +} + +@doc("The provisioning state of the Gate resource.") +@lroStatus +union GateProvisioningState { + string, + ResourceProvisioningState, +} + +@armResourceOperations +@added(Versions.v2025_04_01_preview) +interface Gates { + get is ArmResourceRead; + + // The create and delete APIs are both internal-only as Gates are created by the Update Run during + // its processing. As such, we only expose the update API here. + #suppress "@azure-tools/typespec-azure-core/invalid-final-state" "must change at next release" + @Azure.Core.useFinalStateVia("azure-async-operation") + update is ArmResourcePatchAsync< + Gate, + GateProperties, + Azure.ResourceManager.Foundations.BaseParameters & + IfMatchParameters & + IfNoneMatchParameters + >; + + listByFleet is ArmResourceListByParent; +} diff --git a/specification/containerservice/Fleet.Management/main.tsp b/specification/containerservice/Fleet.Management/main.tsp index 67831c2a942a..e0a5ce11e6d7 100644 --- a/specification/containerservice/Fleet.Management/main.tsp +++ b/specification/containerservice/Fleet.Management/main.tsp @@ -2,6 +2,7 @@ import "@typespec/versioning"; import "@azure-tools/typespec-azure-resource-manager"; import "./fleet.tsp"; import "./fleetmember.tsp"; +import "./gate.tsp"; import "./update/common.tsp"; import "./update/run.tsp"; import "./update/strategy.tsp"; diff --git a/specification/containerservice/Fleet.Management/update/common.tsp b/specification/containerservice/Fleet.Management/update/common.tsp index 258ff298c61a..b858b7e9a210 100644 --- a/specification/containerservice/Fleet.Management/update/common.tsp +++ b/specification/containerservice/Fleet.Management/update/common.tsp @@ -1,5 +1,7 @@ import "@typespec/openapi"; + using TypeSpec.OpenAPI; +using TypeSpec.Versioning; namespace Microsoft.ContainerService; @@ -32,6 +34,16 @@ model UpdateStage { @doc("The time in seconds to wait at the end of this stage before starting the next one. Defaults to 0 seconds if unspecified.") afterStageWaitInSeconds?: int32; + + @doc("A list of Gates that will be created before this Stage is updated.") + @added(Versions.v2025_04_01_preview) + @extension("x-ms-identifiers", ["displayName"]) + beforeGates?: GateConfiguration[]; + + @doc("A list of Gates that will be created after this Stage is updated.") + @added(Versions.v2025_04_01_preview) + @extension("x-ms-identifiers", ["displayName"]) + afterGates?: GateConfiguration[]; } @doc("A group to be updated.") @@ -44,4 +56,27 @@ model UpdateGroup { @minLength(1) @maxLength(50) name: string; + + @doc("A list of Gates that will be created before this Group is updated.") + @added(Versions.v2025_04_01_preview) + @extension("x-ms-identifiers", ["displayName"]) + beforeGates?: GateConfiguration[]; + + @doc("A list of Gates that will be created after this Group is updated.") + @added(Versions.v2025_04_01_preview) + @extension("x-ms-identifiers", ["displayName"]) + afterGates?: GateConfiguration[]; +} + +@doc("GateConfiguration is used to define where Gates should be placed within the Update Run.") +@added(Versions.v2025_04_01_preview) +model GateConfiguration { + @doc("The human-readable display name of the Gate.") + @pattern("^[A-Za-z0-9].*$") + @minLength(1) + @maxLength(100) + displayName: string; + + @doc("The type of the Gate determines how it is completed.") + type: GateType; } diff --git a/specification/containerservice/Fleet.Management/update/run.tsp b/specification/containerservice/Fleet.Management/update/run.tsp index 0614b271ccc6..8b04bad3c53d 100644 --- a/specification/containerservice/Fleet.Management/update/run.tsp +++ b/specification/containerservice/Fleet.Management/update/run.tsp @@ -50,6 +50,13 @@ scalar AutoUpgradeProfileId } ]>; +scalar GateResourceId + extends Azure.Core.armResourceIdentifier<[ + { + type: "Microsoft.ContainerService/fleets/gates", + } + ]>; + @doc("The properties of the UpdateRun.") model UpdateRunProperties { @visibility("read") @@ -254,6 +261,18 @@ model UpdateStageStatus { @doc("The list of groups to be updated as part of this UpdateStage.") groups?: UpdateGroupStatus[]; + @visibility("read") + @extension("x-ms-identifiers", ["displayName"]) + @doc("The list of Gates that will run before this UpdateStage.") + @added(Versions.v2025_04_01_preview) + beforeGates?: UpdateGateStatus[]; + + @visibility("read") + @extension("x-ms-identifiers", ["displayName"]) + @doc("The list of Gates that will run after this UpdateStage.") + @added(Versions.v2025_04_01_preview) + afterGates?: UpdateGateStatus[]; + @visibility("read") @doc("The status of the wait period configured on the UpdateStage.") afterStageWaitStatus?: WaitStatus; @@ -273,6 +292,18 @@ model UpdateGroupStatus { @extension("x-ms-identifiers", ["name"]) @doc("The list of member this UpdateGroup updates.") members?: MemberUpdateStatus[]; + + @visibility("read") + @extension("x-ms-identifiers", ["displayName"]) + @doc("The list of Gates that will run before this UpdateGroup.") + @added(Versions.v2025_04_01_preview) + beforeGates?: UpdateGateStatus[]; + + @visibility("read") + @extension("x-ms-identifiers", ["displayName"]) + @doc("The list of Gates that will run after this UpdateGroup.") + @added(Versions.v2025_04_01_preview) + afterGates?: UpdateGateStatus[]; } @doc("The status of the wait duration.") @@ -286,6 +317,25 @@ model WaitStatus { waitDurationInSeconds?: int32; } +@doc("The status of the Gate, as represented in the Update Run.") +@added(Versions.v2025_04_01_preview) +model UpdateGateStatus { + @doc("The human-readable display name of the Gate.") + @visibility("read") + @pattern("^[A-Za-z0-9].*$") + @minLength(1) + @maxLength(100) + displayName: string; + + @doc("The status of the Gate.") + @visibility("read") + status?: UpdateStatus; + + @doc("The resource id of the Gate.") + @visibility("read") + gateId?: GateResourceId; +} + @doc("The status of a member update operation.") model MemberUpdateStatus { @visibility("read") diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2025-04-01-preview/fleets.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2025-04-01-preview/fleets.json index f0c1bae79a44..babf3e3aa1f2 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2025-04-01-preview/fleets.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2025-04-01-preview/fleets.json @@ -48,6 +48,9 @@ { "name": "FleetMembers" }, + { + "name": "Gates" + }, { "name": "UpdateRuns" }, @@ -799,6 +802,202 @@ "x-ms-long-running-operation": true } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/gate": { + "get": { + "operationId": "Gates_ListByFleet", + "tags": [ + "Gates" + ], + "description": "List Gate resources by Fleet", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "fleetName", + "in": "path", + "description": "The name of the Fleet resource.", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 63, + "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/GateListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/gate/{gateName}": { + "get": { + "operationId": "Gates_Get", + "tags": [ + "Gates" + ], + "description": "Get a Gate", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "fleetName", + "in": "path", + "description": "The name of the Fleet resource.", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 63, + "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + }, + { + "name": "gateName", + "in": "path", + "description": "The name of the Gate resource, a GUID.", + "required": true, + "type": "string", + "minLength": 36, + "maxLength": 36, + "pattern": "^[0-9a-f]{8}[-][0-9a-f]{4}[-][0-9a-f]{4}[-][0-9a-f]{4}[-][0-9a-f]{12}$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/Gate" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + } + }, + "patch": { + "operationId": "Gates_Update", + "tags": [ + "Gates" + ], + "description": "Update a Gate", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "If-Match", + "in": "header", + "description": "The request should only proceed if an entity matches this string.", + "required": false, + "type": "string", + "x-ms-client-name": "ifMatch" + }, + { + "name": "If-None-Match", + "in": "header", + "description": "The request should only proceed if no entity matches this string.", + "required": false, + "type": "string", + "x-ms-client-name": "ifNoneMatch" + }, + { + "name": "fleetName", + "in": "path", + "description": "The name of the Fleet resource.", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 63, + "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + }, + { + "name": "gateName", + "in": "path", + "description": "The name of the Gate resource, a GUID.", + "required": true, + "type": "string", + "minLength": 36, + "maxLength": 36, + "pattern": "^[0-9a-f]{8}[-][0-9a-f]{4}[-][0-9a-f]{4}[-][0-9a-f]{4}[-][0-9a-f]{12}$" + }, + { + "name": "properties", + "in": "body", + "description": "The resource properties to be updated.", + "required": true, + "schema": { + "$ref": "#/definitions/GateUpdate" + } + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/Gate" + } + }, + "202": { + "description": "Resource update request accepted.", + "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/listCredentials": { "post": { "operationId": "Fleets_ListCredentials", @@ -2348,6 +2547,30 @@ }, "readOnly": true }, + "BeforeOrAfter": { + "type": "string", + "description": "Whether the Gate is placed before or after the target.", + "enum": [ + "Before", + "After" + ], + "x-ms-enum": { + "name": "BeforeOrAfter", + "modelAsString": true, + "values": [ + { + "name": "Before", + "value": "Before", + "description": "The Gate is before the target." + }, + { + "name": "After", + "value": "After", + "description": "The Gate is after the target." + } + ] + } + }, "ClusterResourceId": { "type": "string", "format": "arm-id", @@ -2863,6 +3086,277 @@ ] } }, + "Gate": { + "type": "object", + "description": "A Gate controls the progression during a staged rollout, e.g. in an Update Run.", + "properties": { + "properties": { + "$ref": "#/definitions/GateProperties", + "description": "The resource-specific properties for this resource.", + "x-ms-client-flatten": true + }, + "eTag": { + "type": "string", + "description": "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.", + "readOnly": true + } + }, + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" + } + ] + }, + "GateConfiguration": { + "type": "object", + "description": "GateConfiguration is used to define where Gates should be placed within the Update Run.", + "properties": { + "displayName": { + "type": "string", + "description": "The human-readable display name of the Gate.", + "minLength": 1, + "maxLength": 100, + "pattern": "^[A-Za-z0-9].*$" + }, + "type": { + "$ref": "#/definitions/GateType", + "description": "The type of the Gate determines how it is completed." + } + }, + "required": [ + "displayName", + "type" + ] + }, + "GateListResult": { + "type": "object", + "description": "The response of a Gate list operation.", + "properties": { + "value": { + "type": "array", + "description": "The Gate items on this page", + "items": { + "$ref": "#/definitions/Gate" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "GateProperties": { + "type": "object", + "description": "A Gate controls the progression during a staged rollout, e.g. in an Update Run.", + "properties": { + "provisioningState": { + "$ref": "#/definitions/GateProvisioningState", + "description": "The provisioning state of the Gate resource.", + "readOnly": true + }, + "displayName": { + "type": "string", + "description": "The human-readable display name of the Gate.", + "minLength": 1, + "maxLength": 100, + "pattern": "^[A-Za-z0-9].*$", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "target": { + "$ref": "#/definitions/GateTarget", + "description": "The target that the Gate is controlling, e.g. an Update Run.", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "gateType": { + "$ref": "#/definitions/GateType", + "description": "The type of the Gate determines how it is completed.", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "status": { + "$ref": "#/definitions/GateState", + "description": "The status of the Gate.", + "x-ms-mutability": [ + "read", + "update", + "create" + ] + } + }, + "required": [ + "displayName", + "target", + "gateType", + "status" + ] + }, + "GatePropertiesUpdate": { + "type": "object", + "description": "A Gate controls the progression during a staged rollout, e.g. in an Update Run.", + "properties": { + "status": { + "$ref": "#/definitions/GateState", + "description": "The status of the Gate.", + "x-ms-mutability": [ + "read", + "update", + "create" + ] + } + } + }, + "GateProvisioningState": { + "type": "string", + "description": "The provisioning state of the Gate resource.", + "enum": [ + "Succeeded", + "Failed", + "Canceled" + ], + "x-ms-enum": { + "name": "GateProvisioningState", + "modelAsString": true, + "values": [ + { + "name": "Succeeded", + "value": "Succeeded", + "description": "Resource has been created." + }, + { + "name": "Failed", + "value": "Failed", + "description": "Resource creation failed." + }, + { + "name": "Canceled", + "value": "Canceled", + "description": "Resource creation was canceled." + } + ] + }, + "readOnly": true + }, + "GateResourceId": { + "type": "string", + "format": "arm-id", + "description": "A type definition that refers the id to an Azure Resource Manager resource.", + "x-ms-arm-id-details": { + "allowedResources": [ + { + "type": "Microsoft.ContainerService/fleets/gates" + } + ] + } + }, + "GateState": { + "type": "string", + "description": "The state of the Gate.", + "enum": [ + "Pending", + "Completed" + ], + "x-ms-enum": { + "name": "GateState", + "modelAsString": true, + "values": [ + { + "name": "Pending", + "value": "Pending", + "description": "A Pending Gate will continue to block the staged rollout process it is controlling." + }, + { + "name": "Completed", + "value": "Completed", + "description": "An Completed Gate allows the staged rollout process to continue." + } + ] + } + }, + "GateTarget": { + "type": "object", + "description": "The target that the Gate is controlling, e.g. an Update Run.", + "properties": { + "id": { + "$ref": "#/definitions/GateTargetId", + "description": "The status of the Gate.", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "type": { + "$ref": "#/definitions/GateTargetType", + "description": "The status of the Gate.", + "x-ms-mutability": [ + "read", + "create" + ] + } + }, + "required": [ + "id", + "type" + ] + }, + "GateTargetId": { + "$ref": "#/definitions/UpdateRunResourceId", + "x-nullable": false + }, + "GateTargetType": { + "type": "object", + "x-nullable": false, + "allOf": [ + { + "$ref": "#/definitions/UpdateRunGateTargetType" + } + ] + }, + "GateType": { + "type": "string", + "description": "The type of the Gate determines how it is completed.", + "enum": [ + "Approval" + ], + "x-ms-enum": { + "name": "GateType", + "modelAsString": true, + "values": [ + { + "name": "Approval", + "value": "Approval", + "description": "An Approval Gate is completed by patching its status." + } + ] + } + }, + "GateUpdate": { + "type": "object", + "description": "A Gate controls the progression during a staged rollout, e.g. in an Update Run.", + "properties": { + "properties": { + "$ref": "#/definitions/GatePropertiesUpdate", + "description": "The resource-specific properties for this resource.", + "x-ms-client-flatten": true + } + }, + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" + } + ] + }, "KubernetesVersion": { "type": "string" }, @@ -3136,6 +3630,33 @@ ] } }, + "UpdateGateStatus": { + "type": "object", + "description": "The status of the Gate, as represented in the Update Run.", + "properties": { + "displayName": { + "type": "string", + "description": "The human-readable display name of the Gate.", + "minLength": 1, + "maxLength": 100, + "pattern": "^[A-Za-z0-9].*$", + "readOnly": true + }, + "status": { + "$ref": "#/definitions/UpdateStatus", + "description": "The status of the Gate.", + "readOnly": true + }, + "gateId": { + "$ref": "#/definitions/GateResourceId", + "description": "The resource id of the Gate.", + "readOnly": true + } + }, + "required": [ + "displayName" + ] + }, "UpdateGroup": { "type": "object", "description": "A group to be updated.", @@ -3146,6 +3667,26 @@ "minLength": 1, "maxLength": 50, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + }, + "beforeGates": { + "type": "array", + "description": "A list of Gates that will be created before this Group is updated.", + "items": { + "$ref": "#/definitions/GateConfiguration" + }, + "x-ms-identifiers": [ + "displayName" + ] + }, + "afterGates": { + "type": "array", + "description": "A list of Gates that will be created after this Group is updated.", + "items": { + "$ref": "#/definitions/GateConfiguration" + }, + "x-ms-identifiers": [ + "displayName" + ] } }, "required": [ @@ -3176,6 +3717,28 @@ "x-ms-identifiers": [ "name" ] + }, + "beforeGates": { + "type": "array", + "description": "The list of Gates that will run before this UpdateGroup.", + "items": { + "$ref": "#/definitions/UpdateGateStatus" + }, + "readOnly": true, + "x-ms-identifiers": [ + "displayName" + ] + }, + "afterGates": { + "type": "array", + "description": "The list of Gates that will run after this UpdateGroup.", + "items": { + "$ref": "#/definitions/UpdateGateStatus" + }, + "readOnly": true, + "x-ms-identifiers": [ + "displayName" + ] } } }, @@ -3200,6 +3763,49 @@ } ] }, + "UpdateRunGateTargetType": { + "type": "object", + "description": "The Gate is targeting an Update Run staged rollout.", + "properties": { + "name": { + "type": "string", + "description": "The name of the Update Run.", + "minLength": 1, + "maxLength": 50, + "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$", + "readOnly": true + }, + "stage": { + "type": "string", + "description": "The Update Stage of the Update Run.", + "minLength": 1, + "maxLength": 50, + "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$", + "readOnly": true + }, + "group": { + "type": "string", + "description": "The Update Group of the Update Run.", + "minLength": 1, + "maxLength": 50, + "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$", + "readOnly": true + }, + "beforeOrAfter": { + "$ref": "#/definitions/BeforeOrAfter", + "description": "Whether the Gate is placed before or after the update itself.", + "x-ms-mutability": [ + "read", + "create" + ] + } + }, + "required": [ + "name", + "stage", + "beforeOrAfter" + ] + }, "UpdateRunListResult": { "type": "object", "description": "The response of a UpdateRun list operation.", @@ -3288,6 +3894,18 @@ }, "readOnly": true }, + "UpdateRunResourceId": { + "type": "string", + "format": "arm-id", + "description": "A type definition that refers the id to an Azure Resource Manager resource.", + "x-ms-arm-id-details": { + "allowedResources": [ + { + "type": "Microsoft.ContainerService/fleets/updateRuns" + } + ] + } + }, "UpdateRunStatus": { "type": "object", "description": "The status of a UpdateRun.", @@ -3359,6 +3977,26 @@ "type": "integer", "format": "int32", "description": "The time in seconds to wait at the end of this stage before starting the next one. Defaults to 0 seconds if unspecified." + }, + "beforeGates": { + "type": "array", + "description": "A list of Gates that will be created before this Stage is updated.", + "items": { + "$ref": "#/definitions/GateConfiguration" + }, + "x-ms-identifiers": [ + "displayName" + ] + }, + "afterGates": { + "type": "array", + "description": "A list of Gates that will be created after this Stage is updated.", + "items": { + "$ref": "#/definitions/GateConfiguration" + }, + "x-ms-identifiers": [ + "displayName" + ] } }, "required": [ @@ -3390,6 +4028,28 @@ "name" ] }, + "beforeGates": { + "type": "array", + "description": "The list of Gates that will run before this UpdateStage.", + "items": { + "$ref": "#/definitions/UpdateGateStatus" + }, + "readOnly": true, + "x-ms-identifiers": [ + "displayName" + ] + }, + "afterGates": { + "type": "array", + "description": "The list of Gates that will run after this UpdateStage.", + "items": { + "$ref": "#/definitions/UpdateGateStatus" + }, + "readOnly": true, + "x-ms-identifiers": [ + "displayName" + ] + }, "afterStageWaitStatus": { "$ref": "#/definitions/WaitStatus", "description": "The status of the wait period configured on the UpdateStage.",