File: _enums.py

package info (click to toggle)
python-azure 20251014%2Bgit-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 766,472 kB
  • sloc: python: 6,314,744; ansic: 804; javascript: 287; makefile: 198; sh: 198; xml: 109
file content (288 lines) | stat: -rw-r--r-- 12,451 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) Python Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from enum import Enum
from azure.core import CaseInsensitiveEnumMeta


class ActionType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
    """Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal
    only APIs.
    """

    INTERNAL = "Internal"
    """Actions are for internal-only APIs."""


class AutoUpgradeLastTriggerStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta):
    """AutoUpgradeLastTriggerStatus is the status of the last AutoUpgrade trigger (attempt to
    automatically create and start UpdateRun when there are new released versions) of an auto
    upgrade profile.
    """

    SUCCEEDED = "Succeeded"
    """The last AutoUpgrade trigger was succeeded."""
    FAILED = "Failed"
    """The last AutoUpgrade trigger failed."""


class AutoUpgradeNodeImageSelectionType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
    """The node image upgrade type."""

    LATEST = "Latest"
    """Use the latest image version when upgrading nodes. Clusters may use different image versions
    (e.g., 'AKSUbuntu-1804gen2containerd-2021.10.12' and 'AKSUbuntu-1804gen2containerd-2021.10.19')
    because, for example, the latest available version is different in different regions."""
    CONSISTENT = "Consistent"
    """The image versions to upgrade nodes to are selected as described below: for each node pool in
    managed clusters affected by the update run, the system selects the latest image version such
    that it is available across all other node pools (in all other clusters) of the same image
    type. As a result, all node pools of the same image type will be upgraded to the same image
    version. For example, if the latest image version for image type 'AKSUbuntu-1804gen2containerd'
    is 'AKSUbuntu-1804gen2containerd-2021.10.12' for a node pool in cluster A in region X, and is
    'AKSUbuntu-1804gen2containerd-2021.10.17' for a node pool in cluster B in region Y, the system
    will upgrade both node pools to image version 'AKSUbuntu-1804gen2containerd-2021.10.12'."""


class AutoUpgradeProfileProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
    """The provisioning state of the AutoUpgradeProfile resource."""

    SUCCEEDED = "Succeeded"
    """Resource has been created."""
    FAILED = "Failed"
    """Resource creation failed."""
    CANCELED = "Canceled"
    """Resource creation was canceled."""


class CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
    """The kind of entity that created the resource."""

    USER = "User"
    """The entity was created by a user."""
    APPLICATION = "Application"
    """The entity was created by an application."""
    MANAGED_IDENTITY = "ManagedIdentity"
    """The entity was created by a managed identity."""
    KEY = "Key"
    """The entity was created by a key."""


class FleetMemberProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
    """The provisioning state of the last accepted operation."""

    SUCCEEDED = "Succeeded"
    """Resource has been created."""
    FAILED = "Failed"
    """Resource creation failed."""
    CANCELED = "Canceled"
    """Resource creation was canceled."""
    JOINING = "Joining"
    """The provisioning state of a member joining a fleet."""
    LEAVING = "Leaving"
    """The provisioning state of a member leaving a fleet."""
    UPDATING = "Updating"
    """The provisioning state of a member being updated."""


class FleetProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
    """The provisioning state of the last accepted operation."""

    SUCCEEDED = "Succeeded"
    """Resource has been created."""
    FAILED = "Failed"
    """Resource creation failed."""
    CANCELED = "Canceled"
    """Resource creation was canceled."""
    CREATING = "Creating"
    """The provisioning state of a fleet being created."""
    UPDATING = "Updating"
    """The provisioning state of a fleet being updated."""
    DELETING = "Deleting"
    """The provisioning state of a fleet being deleted."""


class FleetUpdateStrategyProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
    """The provisioning state of the UpdateStrategy resource."""

    SUCCEEDED = "Succeeded"
    """Resource has been created."""
    FAILED = "Failed"
    """Resource creation failed."""
    CANCELED = "Canceled"
    """Resource creation was canceled."""


class GateProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
    """The provisioning state of the Gate resource."""

    SUCCEEDED = "Succeeded"
    """Resource has been created."""
    FAILED = "Failed"
    """Resource creation failed."""
    CANCELED = "Canceled"
    """Resource creation was canceled."""


class GateState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
    """The state of the Gate."""

    PENDING = "Pending"
    """A Pending Gate will continue to block the staged rollout process it is controlling."""
    SKIPPED = "Skipped"
    """A Skipped Gate means that the staged rollout process it is controlling was skipped."""
    COMPLETED = "Completed"
    """An Completed Gate allows the staged rollout process to continue."""


class GateType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
    """The type of the Gate determines how it is completed."""

    APPROVAL = "Approval"
    """An approval gate is completed by setting its state to be Completed."""


class ManagedClusterUpgradeType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
    """The type of upgrade to perform when targeting ManagedClusters."""

    FULL = "Full"
    """Full upgrades the control plane and all agent pools of the target ManagedClusters. Requires the
    ManagedClusterUpgradeSpec.KubernetesVersion property to be set."""
    NODE_IMAGE_ONLY = "NodeImageOnly"
    """NodeImageOnly upgrades only the node images of the target ManagedClusters. Requires the
    ManagedClusterUpgradeSpec.KubernetesVersion property to NOT be set."""
    CONTROL_PLANE_ONLY = "ControlPlaneOnly"
    """ControlPlaneOnly upgrades only targets the KubernetesVersion of the ManagedClusters and will
    not be applied to the AgentPool. Requires the ManagedClusterUpgradeSpec.KubernetesVersion
    property to be set."""


class ManagedServiceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
    """Type of managed service identity (where both SystemAssigned and UserAssigned types are
    allowed).
    """

    NONE = "None"
    """No managed identity."""
    SYSTEM_ASSIGNED = "SystemAssigned"
    """System assigned managed identity."""
    USER_ASSIGNED = "UserAssigned"
    """User assigned managed identity."""
    SYSTEM_ASSIGNED_USER_ASSIGNED = "SystemAssigned, UserAssigned"
    """System and user assigned managed identity."""


class NodeImageSelectionType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
    """The node image upgrade type."""

    LATEST = "Latest"
    """Use the latest image version when upgrading nodes. Clusters may use different image versions
    (e.g., 'AKSUbuntu-1804gen2containerd-2021.10.12' and 'AKSUbuntu-1804gen2containerd-2021.10.19')
    because, for example, the latest available version is different in different regions."""
    CONSISTENT = "Consistent"
    """The image versions to upgrade nodes to are selected as described below: for each node pool in
    managed clusters affected by the update run, the system selects the latest image version such
    that it is available across all other node pools (in all other clusters) of the same image
    type. As a result, all node pools of the same image type will be upgraded to the same image
    version. For example, if the latest image version for image type 'AKSUbuntu-1804gen2containerd'
    is 'AKSUbuntu-1804gen2containerd-2021.10.12' for a node pool in cluster A in region X, and is
    'AKSUbuntu-1804gen2containerd-2021.10.17' for a node pool in cluster B in region Y, the system
    will upgrade both node pools to image version 'AKSUbuntu-1804gen2containerd-2021.10.12'."""
    CUSTOM = "Custom"
    """Upgrade the nodes to the custom image versions. When set, update run will use node image
    versions provided in customNodeImageVersions to upgrade the nodes. If set,
    customNodeImageVersions must not be empty."""


class Origin(str, Enum, metaclass=CaseInsensitiveEnumMeta):
    """The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit
    logs UX. Default value is "user,system".
    """

    USER = "user"
    """Indicates the operation is initiated by a user."""
    SYSTEM = "system"
    """Indicates the operation is initiated by a system."""
    USER_SYSTEM = "user,system"
    """Indicates the operation is initiated by a user or system."""


class TargetType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
    """The target type of a skip request."""

    MEMBER = "Member"
    """Skip the update of a member."""
    GROUP = "Group"
    """Skip the update of a group."""
    STAGE = "Stage"
    """Skip the update of an entire stage including the after stage wait."""
    AFTER_STAGE_WAIT = "AfterStageWait"
    """Skip the update of the after stage wait of a certain stage."""


class Timing(str, Enum, metaclass=CaseInsensitiveEnumMeta):
    """Whether the Gate is placed before or after the target."""

    BEFORE = "Before"
    """The Gate is before the target."""
    AFTER = "After"
    """The Gate is after the target."""


class UpdateRunProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
    """The provisioning state of the UpdateRun resource."""

    SUCCEEDED = "Succeeded"
    """Resource has been created."""
    FAILED = "Failed"
    """Resource creation failed."""
    CANCELED = "Canceled"
    """Resource creation was canceled."""


class UpdateState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
    """The state of the UpdateRun, UpdateStage, UpdateGroup, or MemberUpdate."""

    NOT_STARTED = "NotStarted"
    """The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that has not been started."""
    RUNNING = "Running"
    """The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that is running."""
    STOPPING = "Stopping"
    """The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that is being stopped."""
    STOPPED = "Stopped"
    """The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that has stopped."""
    SKIPPED = "Skipped"
    """The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that has been skipped."""
    FAILED = "Failed"
    """The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that has failed."""
    PENDING = "Pending"
    """The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that is pending."""
    COMPLETED = "Completed"
    """The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that has completed."""


class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta):
    """Configuration of how auto upgrade will be run."""

    STABLE = "Stable"
    """ Upgrades the clusters kubernetes version to the latest supported patch release on minor
    version N-1, where N is the latest supported minor version.
     For example, if a cluster runs version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1
    are available, the cluster upgrades to 1.18.6."""
    RAPID = "Rapid"
    """Upgrades the clusters kubernetes version to the latest supported patch release on the latest
    supported minor version."""
    NODE_IMAGE = "NodeImage"
    """Upgrade node image version of the clusters."""
    TARGET_KUBERNETES_VERSION = "TargetKubernetesVersion"
    """  Upgrades the clusters Kubernetes version to the latest supported patch version of the
    specified target Kubernetes version.
      For information on the behavior of update run for Kubernetes version upgrade,
      see
    `https://learn.microsoft.com/en-us/azure/kubernetes-fleet/update-orchestration?tabs=azure-portal
    <https://learn.microsoft.com/en-us/azure/kubernetes-fleet/update-orchestration?tabs=azure-portal>`_"""