Skip to content
Merged
1 change: 1 addition & 0 deletions src/containerapp/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Release History
upcoming
++++++
* 'az containerapp create': Fix Role assignment error when the default Azure Container Registry could not be found
* Upgrade api-version to 2024-10-02-preview

1.0.0b4
++++++
Expand Down
2 changes: 1 addition & 1 deletion src/containerapp/azext_containerapp/_clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

logger = get_logger(__name__)

PREVIEW_API_VERSION = "2024-02-02-preview"
PREVIEW_API_VERSION = "2024-10-02-preview"
AUG_PREVIEW_API_VERSION = "2024-08-02-preview"
Comment thread
Greedygre marked this conversation as resolved.
Outdated
POLLING_TIMEOUT = 1500 # how many seconds before exiting
POLLING_SECONDS = 2 # how many seconds between requests
Expand Down
26 changes: 26 additions & 0 deletions src/containerapp/azext_containerapp/_decorator_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,32 @@ def process_loaded_yaml(yaml_containerapp):
return yaml_containerapp


def process_loaded_yaml_for_connected_env_dapr(yaml_dapr_component):
if not isinstance(yaml_dapr_component, dict): # pylint: disable=unidiomatic-typecheck
raise ValidationError('Invalid YAML provided. Please see https://aka.ms/azure-container-apps-yaml for a valid containerapps YAML spec.')
if not yaml_dapr_component.get('properties'):
yaml_dapr_component['properties'] = {}

nested_properties = ["componentType",
"version",
"ignoreErrors",
"initTimeout",
"secrets",
"secretStoreComponent",
"metadata",
"scopes",
"serviceComponentBind",
"provisioningState",
"deploymentErrors"]
for nested_property in nested_properties:
Comment thread
Greedygre marked this conversation as resolved.
Outdated
tmp = yaml_dapr_component.get(nested_property)
if nested_property in yaml_dapr_component:
yaml_dapr_component['properties'][nested_property] = tmp
del yaml_dapr_component[nested_property]

return yaml_dapr_component


def process_containerapp_resiliency_yaml(containerapp_resiliency):

if not isinstance(containerapp_resiliency, dict): # pylint: disable=unidiomatic-typecheck
Expand Down
77 changes: 74 additions & 3 deletions src/containerapp/azext_containerapp/_sdk_enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@ class ActiveRevisionsMode(str, Enum, metaclass=CaseInsensitiveEnumMeta):

.. raw:: html

<list><item>Multiple: multiple revisions can be active.</item><item>Single: Only one
revision can be active at a time. Revision weights can not be used in this mode. If no value if
provided, this is the default.</item></list>.
<list><item>Single: Only one revision can be active at a time. Traffic weights cannot be
used. This is the default.</item><item>Multiple: Multiple revisions can be active, including
optional traffic weights and labels.</item><item>Labels: Only revisions with labels are active.
Traffic weights can be applied to labels.</item></list>.
"""

MULTIPLE = "Multiple"
SINGLE = "Single"
LABELS = "Labels"


class Affinity(str, Enum, metaclass=CaseInsensitiveEnumMeta):
Expand Down Expand Up @@ -69,6 +71,7 @@ class BindingType(str, Enum, metaclass=CaseInsensitiveEnumMeta):

DISABLED = "Disabled"
SNI_ENABLED = "SniEnabled"
AUTO = "Auto"


class BuilderProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
Expand Down Expand Up @@ -129,6 +132,15 @@ class CheckNameAvailabilityReason(str, Enum, metaclass=CaseInsensitiveEnumMeta):
ALREADY_EXISTS = "AlreadyExists"


class ConnectedEnvironmentDaprComponentProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Provisioning state of the Connected Environment Dapr Component."""

SUCCEEDED = "Succeeded"
FAILED = "Failed"
CANCELED = "Canceled"
IN_PROGRESS = "InProgress"


class ConnectedEnvironmentProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Provisioning state of the Kubernetes Environment."""

Expand All @@ -142,6 +154,15 @@ class ConnectedEnvironmentProvisioningState(str, Enum, metaclass=CaseInsensitive
SCHEDULED_FOR_DELETE = "ScheduledForDelete"


class ConnectedEnvironmentStorageProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Provisioning state of the storage."""

SUCCEEDED = "Succeeded"
FAILED = "Failed"
CANCELED = "Canceled"
IN_PROGRESS = "InProgress"


class ContainerAppContainerRunningState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Current running state of the container."""

Expand All @@ -168,6 +189,21 @@ class ContainerAppReplicaRunningState(str, Enum, metaclass=CaseInsensitiveEnumMe
UNKNOWN = "Unknown"


class ContainerAppRunningStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Running status of the Container App."""

PROGRESSING = "Progressing"
"""Container App is transitioning between Stopped and Running states."""
RUNNING = "Running"
"""Container App is in Running state."""
STOPPED = "Stopped"
"""Container App is in Stopped state."""
SUSPENDED = "Suspended"
"""Container App Job is in Suspended state."""
READY = "Ready"
"""Container App Job is in Ready state."""


class ContainerType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""The container type of the sessions."""

Expand Down Expand Up @@ -258,6 +294,18 @@ class ForwardProxyConvention(str, Enum, metaclass=CaseInsensitiveEnumMeta):
CUSTOM = "Custom"


class HttpRouteProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""The current provisioning state."""

SUCCEEDED = "Succeeded"
FAILED = "Failed"
CANCELED = "Canceled"
WAITING = "Waiting"
UPDATING = "Updating"
DELETING = "Deleting"
PENDING = "Pending"


class IdentitySettingsLifeCycle(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Use to select the lifecycle stages of a Container App during which the Managed Identity should
be available.
Expand Down Expand Up @@ -321,6 +369,7 @@ class JavaComponentType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
SPRING_BOOT_ADMIN = "SpringBootAdmin"
SPRING_CLOUD_EUREKA = "SpringCloudEureka"
SPRING_CLOUD_CONFIG = "SpringCloudConfig"
SPRING_CLOUD_GATEWAY = "SpringCloudGateway"
NACOS = "Nacos"


Expand All @@ -346,6 +395,14 @@ class JobProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
DELETING = "Deleting"


class JobRunningState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Current running state of the job."""

READY = "Ready"
PROGRESSING = "Progressing"
SUSPENDED = "Suspended"


class Kind(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Metadata used to render different experiences for resources of the same type; e.g. WorkflowApp
is a kind of Microsoft.App/ContainerApps type. If supported, the resource provider must
Expand Down Expand Up @@ -535,6 +592,20 @@ class UnauthenticatedClientActionV2(str, Enum, metaclass=CaseInsensitiveEnumMeta
RETURN403 = "Return403"


class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Day of the week when a managed environment can be patched."""

MONDAY = "Monday"
TUESDAY = "Tuesday"
WEDNESDAY = "Wednesday"
THURSDAY = "Thursday"
FRIDAY = "Friday"
SATURDAY = "Saturday"
SUNDAY = "Sunday"
EVERYDAY = "Everyday"
WEEKEND = "Weekend"


class WorkflowHealthState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Gets or sets the workflow health state."""

Expand Down
Loading